commit 1a39307826a4cb256764bb7d6699477f2113017a Author: Batuhan Berk Başoğlu Date: Sun Nov 3 21:53:42 2024 -0500 Auto-generated commit diff --git a/.nojekyll b/.nojekyll new file mode 100644 index 00000000..e69de29b diff --git a/404.html b/404.html new file mode 100644 index 00000000..f4f1adab --- /dev/null +++ b/404.html @@ -0,0 +1,52 @@ + + + + + + + + Kargı Sitesi Resmi Sayfası + + + + + + + + + + + + + + + + + +
+
+
+
+
+
+
+ +
+ + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/assets/css/animate.css b/assets/css/animate.css new file mode 100644 index 00000000..54fa40e1 --- /dev/null +++ b/assets/css/animate.css @@ -0,0 +1,3272 @@ +@charset "UTF-8"; + +/*! +Animate.css - http://daneden.me/animate +Licensed under the MIT license - http://opensource.org/licenses/MIT + +Copyright (c) 2015 Daniel Eden +*/ + +.animated { + -webkit-animation-duration: 1s; + animation-duration: 1s; + -webkit-animation-fill-mode: both; + animation-fill-mode: both; +} + +.animated.infinite { + -webkit-animation-iteration-count: infinite; + animation-iteration-count: infinite; +} + +.animated.hinge { + -webkit-animation-duration: 2s; + animation-duration: 2s; +} + +.animated.bounceIn, +.animated.bounceOut { + -webkit-animation-duration: .75s; + animation-duration: .75s; +} + +.animated.flipOutX, +.animated.flipOutY { + -webkit-animation-duration: .75s; + animation-duration: .75s; +} + +@-webkit-keyframes bounce { + from, 20%, 53%, 80%, 100% { + -webkit-animation-timing-function: cubic-bezier(0.215, 0.610, 0.355, 1.000); + animation-timing-function: cubic-bezier(0.215, 0.610, 0.355, 1.000); + -webkit-transform: translate3d(0,0,0); + transform: translate3d(0,0,0); + } + + 40%, 43% { + -webkit-animation-timing-function: cubic-bezier(0.755, 0.050, 0.855, 0.060); + animation-timing-function: cubic-bezier(0.755, 0.050, 0.855, 0.060); + -webkit-transform: translate3d(0, -30px, 0); + transform: translate3d(0, -30px, 0); + } + + 70% { + -webkit-animation-timing-function: cubic-bezier(0.755, 0.050, 0.855, 0.060); + animation-timing-function: cubic-bezier(0.755, 0.050, 0.855, 0.060); + -webkit-transform: translate3d(0, -15px, 0); + transform: translate3d(0, -15px, 0); + } + + 90% { + -webkit-transform: translate3d(0,-4px,0); + transform: translate3d(0,-4px,0); + } +} + +@keyframes bounce { + from, 20%, 53%, 80%, 100% { + -webkit-animation-timing-function: cubic-bezier(0.215, 0.610, 0.355, 1.000); + animation-timing-function: cubic-bezier(0.215, 0.610, 0.355, 1.000); + -webkit-transform: translate3d(0,0,0); + transform: translate3d(0,0,0); + } + + 40%, 43% { + -webkit-animation-timing-function: cubic-bezier(0.755, 0.050, 0.855, 0.060); + animation-timing-function: cubic-bezier(0.755, 0.050, 0.855, 0.060); + -webkit-transform: translate3d(0, -30px, 0); + transform: translate3d(0, -30px, 0); + } + + 70% { + -webkit-animation-timing-function: cubic-bezier(0.755, 0.050, 0.855, 0.060); + animation-timing-function: cubic-bezier(0.755, 0.050, 0.855, 0.060); + -webkit-transform: translate3d(0, -15px, 0); + transform: translate3d(0, -15px, 0); + } + + 90% { + -webkit-transform: translate3d(0,-4px,0); + transform: translate3d(0,-4px,0); + } +} + +.bounce { + -webkit-animation-name: bounce; + animation-name: bounce; + -webkit-transform-origin: center bottom; + transform-origin: center bottom; +} + +@-webkit-keyframes flash { + from, 50%, 100% { + opacity: 1; + } + + 25%, 75% { + opacity: 0; + } +} + +@keyframes flash { + from, 50%, 100% { + opacity: 1; + } + + 25%, 75% { + opacity: 0; + } +} + +.flash { + -webkit-animation-name: flash; + animation-name: flash; +} + +/* originally authored by Nick Pettit - https://github.com/nickpettit/glide */ + +@-webkit-keyframes pulse { + from { + -webkit-transform: scale3d(1, 1, 1); + transform: scale3d(1, 1, 1); + } + + 50% { + -webkit-transform: scale3d(1.05, 1.05, 1.05); + transform: scale3d(1.05, 1.05, 1.05); + } + + 100% { + -webkit-transform: scale3d(1, 1, 1); + transform: scale3d(1, 1, 1); + } +} + +@keyframes pulse { + from { + -webkit-transform: scale3d(1, 1, 1); + transform: scale3d(1, 1, 1); + } + + 50% { + -webkit-transform: scale3d(1.05, 1.05, 1.05); + transform: scale3d(1.05, 1.05, 1.05); + } + + 100% { + -webkit-transform: scale3d(1, 1, 1); + transform: scale3d(1, 1, 1); + } +} + +.pulse { + -webkit-animation-name: pulse; + animation-name: pulse; +} + +@-webkit-keyframes rubberBand { + from { + -webkit-transform: scale3d(1, 1, 1); + transform: scale3d(1, 1, 1); + } + + 30% { + -webkit-transform: scale3d(1.25, 0.75, 1); + transform: scale3d(1.25, 0.75, 1); + } + + 40% { + -webkit-transform: scale3d(0.75, 1.25, 1); + transform: scale3d(0.75, 1.25, 1); + } + + 50% { + -webkit-transform: scale3d(1.15, 0.85, 1); + transform: scale3d(1.15, 0.85, 1); + } + + 65% { + -webkit-transform: scale3d(.95, 1.05, 1); + transform: scale3d(.95, 1.05, 1); + } + + 75% { + -webkit-transform: scale3d(1.05, .95, 1); + transform: scale3d(1.05, .95, 1); + } + + 100% { + -webkit-transform: scale3d(1, 1, 1); + transform: scale3d(1, 1, 1); + } +} + +@keyframes rubberBand { + from { + -webkit-transform: scale3d(1, 1, 1); + transform: scale3d(1, 1, 1); + } + + 30% { + -webkit-transform: scale3d(1.25, 0.75, 1); + transform: scale3d(1.25, 0.75, 1); + } + + 40% { + -webkit-transform: scale3d(0.75, 1.25, 1); + transform: scale3d(0.75, 1.25, 1); + } + + 50% { + -webkit-transform: scale3d(1.15, 0.85, 1); + transform: scale3d(1.15, 0.85, 1); + } + + 65% { + -webkit-transform: scale3d(.95, 1.05, 1); + transform: scale3d(.95, 1.05, 1); + } + + 75% { + -webkit-transform: scale3d(1.05, .95, 1); + transform: scale3d(1.05, .95, 1); + } + + 100% { + -webkit-transform: scale3d(1, 1, 1); + transform: scale3d(1, 1, 1); + } +} + +.rubberBand { + -webkit-animation-name: rubberBand; + animation-name: rubberBand; +} + +@-webkit-keyframes shake { + from, 100% { + -webkit-transform: translate3d(0, 0, 0); + transform: translate3d(0, 0, 0); + } + + 10%, 30%, 50%, 70%, 90% { + -webkit-transform: translate3d(-10px, 0, 0); + transform: translate3d(-10px, 0, 0); + } + + 20%, 40%, 60%, 80% { + -webkit-transform: translate3d(10px, 0, 0); + transform: translate3d(10px, 0, 0); + } +} + +@keyframes shake { + from, 100% { + -webkit-transform: translate3d(0, 0, 0); + transform: translate3d(0, 0, 0); + } + + 10%, 30%, 50%, 70%, 90% { + -webkit-transform: translate3d(-10px, 0, 0); + transform: translate3d(-10px, 0, 0); + } + + 20%, 40%, 60%, 80% { + -webkit-transform: translate3d(10px, 0, 0); + transform: translate3d(10px, 0, 0); + } +} + +.shake { + -webkit-animation-name: shake; + animation-name: shake; +} + +@-webkit-keyframes swing { + 20% { + -webkit-transform: rotate3d(0, 0, 1, 15deg); + transform: rotate3d(0, 0, 1, 15deg); + } + + 40% { + -webkit-transform: rotate3d(0, 0, 1, -10deg); + transform: rotate3d(0, 0, 1, -10deg); + } + + 60% { + -webkit-transform: rotate3d(0, 0, 1, 5deg); + transform: rotate3d(0, 0, 1, 5deg); + } + + 80% { + -webkit-transform: rotate3d(0, 0, 1, -5deg); + transform: rotate3d(0, 0, 1, -5deg); + } + + 100% { + -webkit-transform: rotate3d(0, 0, 1, 0deg); + transform: rotate3d(0, 0, 1, 0deg); + } +} + +@keyframes swing { + 20% { + -webkit-transform: rotate3d(0, 0, 1, 15deg); + transform: rotate3d(0, 0, 1, 15deg); + } + + 40% { + -webkit-transform: rotate3d(0, 0, 1, -10deg); + transform: rotate3d(0, 0, 1, -10deg); + } + + 60% { + -webkit-transform: rotate3d(0, 0, 1, 5deg); + transform: rotate3d(0, 0, 1, 5deg); + } + + 80% { + -webkit-transform: rotate3d(0, 0, 1, -5deg); + transform: rotate3d(0, 0, 1, -5deg); + } + + 100% { + -webkit-transform: rotate3d(0, 0, 1, 0deg); + transform: rotate3d(0, 0, 1, 0deg); + } +} + +.swing { + -webkit-transform-origin: top center; + transform-origin: top center; + -webkit-animation-name: swing; + animation-name: swing; +} + +@-webkit-keyframes tada { + from { + -webkit-transform: scale3d(1, 1, 1); + transform: scale3d(1, 1, 1); + } + + 10%, 20% { + -webkit-transform: scale3d(.9, .9, .9) rotate3d(0, 0, 1, -3deg); + transform: scale3d(.9, .9, .9) rotate3d(0, 0, 1, -3deg); + } + + 30%, 50%, 70%, 90% { + -webkit-transform: scale3d(1.1, 1.1, 1.1) rotate3d(0, 0, 1, 3deg); + transform: scale3d(1.1, 1.1, 1.1) rotate3d(0, 0, 1, 3deg); + } + + 40%, 60%, 80% { + -webkit-transform: scale3d(1.1, 1.1, 1.1) rotate3d(0, 0, 1, -3deg); + transform: scale3d(1.1, 1.1, 1.1) rotate3d(0, 0, 1, -3deg); + } + + 100% { + -webkit-transform: scale3d(1, 1, 1); + transform: scale3d(1, 1, 1); + } +} + +@keyframes tada { + from { + -webkit-transform: scale3d(1, 1, 1); + transform: scale3d(1, 1, 1); + } + + 10%, 20% { + -webkit-transform: scale3d(.9, .9, .9) rotate3d(0, 0, 1, -3deg); + transform: scale3d(.9, .9, .9) rotate3d(0, 0, 1, -3deg); + } + + 30%, 50%, 70%, 90% { + -webkit-transform: scale3d(1.1, 1.1, 1.1) rotate3d(0, 0, 1, 3deg); + transform: scale3d(1.1, 1.1, 1.1) rotate3d(0, 0, 1, 3deg); + } + + 40%, 60%, 80% { + -webkit-transform: scale3d(1.1, 1.1, 1.1) rotate3d(0, 0, 1, -3deg); + transform: scale3d(1.1, 1.1, 1.1) rotate3d(0, 0, 1, -3deg); + } + + 100% { + -webkit-transform: scale3d(1, 1, 1); + transform: scale3d(1, 1, 1); + } +} + +.tada { + -webkit-animation-name: tada; + animation-name: tada; +} + +/* originally authored by Nick Pettit - https://github.com/nickpettit/glide */ + +@-webkit-keyframes wobble { + from { + -webkit-transform: none; + transform: none; + } + + 15% { + -webkit-transform: translate3d(-25%, 0, 0) rotate3d(0, 0, 1, -5deg); + transform: translate3d(-25%, 0, 0) rotate3d(0, 0, 1, -5deg); + } + + 30% { + -webkit-transform: translate3d(20%, 0, 0) rotate3d(0, 0, 1, 3deg); + transform: translate3d(20%, 0, 0) rotate3d(0, 0, 1, 3deg); + } + + 45% { + -webkit-transform: translate3d(-15%, 0, 0) rotate3d(0, 0, 1, -3deg); + transform: translate3d(-15%, 0, 0) rotate3d(0, 0, 1, -3deg); + } + + 60% { + -webkit-transform: translate3d(10%, 0, 0) rotate3d(0, 0, 1, 2deg); + transform: translate3d(10%, 0, 0) rotate3d(0, 0, 1, 2deg); + } + + 75% { + -webkit-transform: translate3d(-5%, 0, 0) rotate3d(0, 0, 1, -1deg); + transform: translate3d(-5%, 0, 0) rotate3d(0, 0, 1, -1deg); + } + + 100% { + -webkit-transform: none; + transform: none; + } +} + +@keyframes wobble { + from { + -webkit-transform: none; + transform: none; + } + + 15% { + -webkit-transform: translate3d(-25%, 0, 0) rotate3d(0, 0, 1, -5deg); + transform: translate3d(-25%, 0, 0) rotate3d(0, 0, 1, -5deg); + } + + 30% { + -webkit-transform: translate3d(20%, 0, 0) rotate3d(0, 0, 1, 3deg); + transform: translate3d(20%, 0, 0) rotate3d(0, 0, 1, 3deg); + } + + 45% { + -webkit-transform: translate3d(-15%, 0, 0) rotate3d(0, 0, 1, -3deg); + transform: translate3d(-15%, 0, 0) rotate3d(0, 0, 1, -3deg); + } + + 60% { + -webkit-transform: translate3d(10%, 0, 0) rotate3d(0, 0, 1, 2deg); + transform: translate3d(10%, 0, 0) rotate3d(0, 0, 1, 2deg); + } + + 75% { + -webkit-transform: translate3d(-5%, 0, 0) rotate3d(0, 0, 1, -1deg); + transform: translate3d(-5%, 0, 0) rotate3d(0, 0, 1, -1deg); + } + + 100% { + -webkit-transform: none; + transform: none; + } +} + +.wobble { + -webkit-animation-name: wobble; + animation-name: wobble; +} + +@-webkit-keyframes jello { + from, 11.1%, 100% { + -webkit-transform: none; + transform: none; + } + + 22.2% { + -webkit-transform: skewX(-12.5deg) skewY(-12.5deg); + transform: skewX(-12.5deg) skewY(-12.5deg); + } + + 33.3% { + -webkit-transform: skewX(6.25deg) skewY(6.25deg); + transform: skewX(6.25deg) skewY(6.25deg); + } + + 44.4% { + -webkit-transform: skewX(-3.125deg) skewY(-3.125deg); + transform: skewX(-3.125deg) skewY(-3.125deg); + } + + 55.5% { + -webkit-transform: skewX(1.5625deg) skewY(1.5625deg); + transform: skewX(1.5625deg) skewY(1.5625deg); + } + + 66.6% { + -webkit-transform: skewX(-0.78125deg) skewY(-0.78125deg); + transform: skewX(-0.78125deg) skewY(-0.78125deg); + } + + 77.7% { + -webkit-transform: skewX(0.390625deg) skewY(0.390625deg); + transform: skewX(0.390625deg) skewY(0.390625deg); + } + + 88.8% { + -webkit-transform: skewX(-0.1953125deg) skewY(-0.1953125deg); + transform: skewX(-0.1953125deg) skewY(-0.1953125deg); + } +} + +@keyframes jello { + from, 11.1%, 100% { + -webkit-transform: none; + transform: none; + } + + 22.2% { + -webkit-transform: skewX(-12.5deg) skewY(-12.5deg); + transform: skewX(-12.5deg) skewY(-12.5deg); + } + + 33.3% { + -webkit-transform: skewX(6.25deg) skewY(6.25deg); + transform: skewX(6.25deg) skewY(6.25deg); + } + + 44.4% { + -webkit-transform: skewX(-3.125deg) skewY(-3.125deg); + transform: skewX(-3.125deg) skewY(-3.125deg); + } + + 55.5% { + -webkit-transform: skewX(1.5625deg) skewY(1.5625deg); + transform: skewX(1.5625deg) skewY(1.5625deg); + } + + 66.6% { + -webkit-transform: skewX(-0.78125deg) skewY(-0.78125deg); + transform: skewX(-0.78125deg) skewY(-0.78125deg); + } + + 77.7% { + -webkit-transform: skewX(0.390625deg) skewY(0.390625deg); + transform: skewX(0.390625deg) skewY(0.390625deg); + } + + 88.8% { + -webkit-transform: skewX(-0.1953125deg) skewY(-0.1953125deg); + transform: skewX(-0.1953125deg) skewY(-0.1953125deg); + } +} + +.jello { + -webkit-animation-name: jello; + animation-name: jello; + -webkit-transform-origin: center; + transform-origin: center; +} + +@-webkit-keyframes bounceIn { + from, 20%, 40%, 60%, 80%, 100% { + -webkit-animation-timing-function: cubic-bezier(0.215, 0.610, 0.355, 1.000); + animation-timing-function: cubic-bezier(0.215, 0.610, 0.355, 1.000); + } + + 0% { + opacity: 0; + -webkit-transform: scale3d(.3, .3, .3); + transform: scale3d(.3, .3, .3); + } + + 20% { + -webkit-transform: scale3d(1.1, 1.1, 1.1); + transform: scale3d(1.1, 1.1, 1.1); + } + + 40% { + -webkit-transform: scale3d(.9, .9, .9); + transform: scale3d(.9, .9, .9); + } + + 60% { + opacity: 1; + -webkit-transform: scale3d(1.03, 1.03, 1.03); + transform: scale3d(1.03, 1.03, 1.03); + } + + 80% { + -webkit-transform: scale3d(.97, .97, .97); + transform: scale3d(.97, .97, .97); + } + + 100% { + opacity: 1; + -webkit-transform: scale3d(1, 1, 1); + transform: scale3d(1, 1, 1); + } +} + +@keyframes bounceIn { + from, 20%, 40%, 60%, 80%, 100% { + -webkit-animation-timing-function: cubic-bezier(0.215, 0.610, 0.355, 1.000); + animation-timing-function: cubic-bezier(0.215, 0.610, 0.355, 1.000); + } + + 0% { + opacity: 0; + -webkit-transform: scale3d(.3, .3, .3); + transform: scale3d(.3, .3, .3); + } + + 20% { + -webkit-transform: scale3d(1.1, 1.1, 1.1); + transform: scale3d(1.1, 1.1, 1.1); + } + + 40% { + -webkit-transform: scale3d(.9, .9, .9); + transform: scale3d(.9, .9, .9); + } + + 60% { + opacity: 1; + -webkit-transform: scale3d(1.03, 1.03, 1.03); + transform: scale3d(1.03, 1.03, 1.03); + } + + 80% { + -webkit-transform: scale3d(.97, .97, .97); + transform: scale3d(.97, .97, .97); + } + + 100% { + opacity: 1; + -webkit-transform: scale3d(1, 1, 1); + transform: scale3d(1, 1, 1); + } +} + +.bounceIn { + -webkit-animation-name: bounceIn; + animation-name: bounceIn; +} + +@-webkit-keyframes bounceInDown { + from, 60%, 75%, 90%, 100% { + -webkit-animation-timing-function: cubic-bezier(0.215, 0.610, 0.355, 1.000); + animation-timing-function: cubic-bezier(0.215, 0.610, 0.355, 1.000); + } + + 0% { + opacity: 0; + -webkit-transform: translate3d(0, -3000px, 0); + transform: translate3d(0, -3000px, 0); + } + + 60% { + opacity: 1; + -webkit-transform: translate3d(0, 25px, 0); + transform: translate3d(0, 25px, 0); + } + + 75% { + -webkit-transform: translate3d(0, -10px, 0); + transform: translate3d(0, -10px, 0); + } + + 90% { + -webkit-transform: translate3d(0, 5px, 0); + transform: translate3d(0, 5px, 0); + } + + 100% { + -webkit-transform: none; + transform: none; + } +} + +@keyframes bounceInDown { + from, 60%, 75%, 90%, 100% { + -webkit-animation-timing-function: cubic-bezier(0.215, 0.610, 0.355, 1.000); + animation-timing-function: cubic-bezier(0.215, 0.610, 0.355, 1.000); + } + + 0% { + opacity: 0; + -webkit-transform: translate3d(0, -3000px, 0); + transform: translate3d(0, -3000px, 0); + } + + 60% { + opacity: 1; + -webkit-transform: translate3d(0, 25px, 0); + transform: translate3d(0, 25px, 0); + } + + 75% { + -webkit-transform: translate3d(0, -10px, 0); + transform: translate3d(0, -10px, 0); + } + + 90% { + -webkit-transform: translate3d(0, 5px, 0); + transform: translate3d(0, 5px, 0); + } + + 100% { + -webkit-transform: none; + transform: none; + } +} + +.bounceInDown { + -webkit-animation-name: bounceInDown; + animation-name: bounceInDown; +} + +@-webkit-keyframes bounceInLeft { + from, 60%, 75%, 90%, 100% { + -webkit-animation-timing-function: cubic-bezier(0.215, 0.610, 0.355, 1.000); + animation-timing-function: cubic-bezier(0.215, 0.610, 0.355, 1.000); + } + + 0% { + opacity: 0; + -webkit-transform: translate3d(-3000px, 0, 0); + transform: translate3d(-3000px, 0, 0); + } + + 60% { + opacity: 1; + -webkit-transform: translate3d(25px, 0, 0); + transform: translate3d(25px, 0, 0); + } + + 75% { + -webkit-transform: translate3d(-10px, 0, 0); + transform: translate3d(-10px, 0, 0); + } + + 90% { + -webkit-transform: translate3d(5px, 0, 0); + transform: translate3d(5px, 0, 0); + } + + 100% { + -webkit-transform: none; + transform: none; + } +} + +@keyframes bounceInLeft { + from, 60%, 75%, 90%, 100% { + -webkit-animation-timing-function: cubic-bezier(0.215, 0.610, 0.355, 1.000); + animation-timing-function: cubic-bezier(0.215, 0.610, 0.355, 1.000); + } + + 0% { + opacity: 0; + -webkit-transform: translate3d(-3000px, 0, 0); + transform: translate3d(-3000px, 0, 0); + } + + 60% { + opacity: 1; + -webkit-transform: translate3d(25px, 0, 0); + transform: translate3d(25px, 0, 0); + } + + 75% { + -webkit-transform: translate3d(-10px, 0, 0); + transform: translate3d(-10px, 0, 0); + } + + 90% { + -webkit-transform: translate3d(5px, 0, 0); + transform: translate3d(5px, 0, 0); + } + + 100% { + -webkit-transform: none; + transform: none; + } +} + +.bounceInLeft { + -webkit-animation-name: bounceInLeft; + animation-name: bounceInLeft; +} + +@-webkit-keyframes bounceInRight { + from, 60%, 75%, 90%, 100% { + -webkit-animation-timing-function: cubic-bezier(0.215, 0.610, 0.355, 1.000); + animation-timing-function: cubic-bezier(0.215, 0.610, 0.355, 1.000); + } + + from { + opacity: 0; + -webkit-transform: translate3d(3000px, 0, 0); + transform: translate3d(3000px, 0, 0); + } + + 60% { + opacity: 1; + -webkit-transform: translate3d(-25px, 0, 0); + transform: translate3d(-25px, 0, 0); + } + + 75% { + -webkit-transform: translate3d(10px, 0, 0); + transform: translate3d(10px, 0, 0); + } + + 90% { + -webkit-transform: translate3d(-5px, 0, 0); + transform: translate3d(-5px, 0, 0); + } + + 100% { + -webkit-transform: none; + transform: none; + } +} + +@keyframes bounceInRight { + from, 60%, 75%, 90%, 100% { + -webkit-animation-timing-function: cubic-bezier(0.215, 0.610, 0.355, 1.000); + animation-timing-function: cubic-bezier(0.215, 0.610, 0.355, 1.000); + } + + from { + opacity: 0; + -webkit-transform: translate3d(3000px, 0, 0); + transform: translate3d(3000px, 0, 0); + } + + 60% { + opacity: 1; + -webkit-transform: translate3d(-25px, 0, 0); + transform: translate3d(-25px, 0, 0); + } + + 75% { + -webkit-transform: translate3d(10px, 0, 0); + transform: translate3d(10px, 0, 0); + } + + 90% { + -webkit-transform: translate3d(-5px, 0, 0); + transform: translate3d(-5px, 0, 0); + } + + 100% { + -webkit-transform: none; + transform: none; + } +} + +.bounceInRight { + -webkit-animation-name: bounceInRight; + animation-name: bounceInRight; +} + +@-webkit-keyframes bounceInUp { + from, 60%, 75%, 90%, 100% { + -webkit-animation-timing-function: cubic-bezier(0.215, 0.610, 0.355, 1.000); + animation-timing-function: cubic-bezier(0.215, 0.610, 0.355, 1.000); + } + + from { + opacity: 0; + -webkit-transform: translate3d(0, 3000px, 0); + transform: translate3d(0, 3000px, 0); + } + + 60% { + opacity: 1; + -webkit-transform: translate3d(0, -20px, 0); + transform: translate3d(0, -20px, 0); + } + + 75% { + -webkit-transform: translate3d(0, 10px, 0); + transform: translate3d(0, 10px, 0); + } + + 90% { + -webkit-transform: translate3d(0, -5px, 0); + transform: translate3d(0, -5px, 0); + } + + 100% { + -webkit-transform: translate3d(0, 0, 0); + transform: translate3d(0, 0, 0); + } +} + +@keyframes bounceInUp { + from, 60%, 75%, 90%, 100% { + -webkit-animation-timing-function: cubic-bezier(0.215, 0.610, 0.355, 1.000); + animation-timing-function: cubic-bezier(0.215, 0.610, 0.355, 1.000); + } + + from { + opacity: 0; + -webkit-transform: translate3d(0, 3000px, 0); + transform: translate3d(0, 3000px, 0); + } + + 60% { + opacity: 1; + -webkit-transform: translate3d(0, -20px, 0); + transform: translate3d(0, -20px, 0); + } + + 75% { + -webkit-transform: translate3d(0, 10px, 0); + transform: translate3d(0, 10px, 0); + } + + 90% { + -webkit-transform: translate3d(0, -5px, 0); + transform: translate3d(0, -5px, 0); + } + + 100% { + -webkit-transform: translate3d(0, 0, 0); + transform: translate3d(0, 0, 0); + } +} + +.bounceInUp { + -webkit-animation-name: bounceInUp; + animation-name: bounceInUp; +} + +@-webkit-keyframes bounceOut { + 20% { + -webkit-transform: scale3d(.9, .9, .9); + transform: scale3d(.9, .9, .9); + } + + 50%, 55% { + opacity: 1; + -webkit-transform: scale3d(1.1, 1.1, 1.1); + transform: scale3d(1.1, 1.1, 1.1); + } + + 100% { + opacity: 0; + -webkit-transform: scale3d(.3, .3, .3); + transform: scale3d(.3, .3, .3); + } +} + +@keyframes bounceOut { + 20% { + -webkit-transform: scale3d(.9, .9, .9); + transform: scale3d(.9, .9, .9); + } + + 50%, 55% { + opacity: 1; + -webkit-transform: scale3d(1.1, 1.1, 1.1); + transform: scale3d(1.1, 1.1, 1.1); + } + + 100% { + opacity: 0; + -webkit-transform: scale3d(.3, .3, .3); + transform: scale3d(.3, .3, .3); + } +} + +.bounceOut { + -webkit-animation-name: bounceOut; + animation-name: bounceOut; +} + +@-webkit-keyframes bounceOutDown { + 20% { + -webkit-transform: translate3d(0, 10px, 0); + transform: translate3d(0, 10px, 0); + } + + 40%, 45% { + opacity: 1; + -webkit-transform: translate3d(0, -20px, 0); + transform: translate3d(0, -20px, 0); + } + + 100% { + opacity: 0; + -webkit-transform: translate3d(0, 2000px, 0); + transform: translate3d(0, 2000px, 0); + } +} + +@keyframes bounceOutDown { + 20% { + -webkit-transform: translate3d(0, 10px, 0); + transform: translate3d(0, 10px, 0); + } + + 40%, 45% { + opacity: 1; + -webkit-transform: translate3d(0, -20px, 0); + transform: translate3d(0, -20px, 0); + } + + 100% { + opacity: 0; + -webkit-transform: translate3d(0, 2000px, 0); + transform: translate3d(0, 2000px, 0); + } +} + +.bounceOutDown { + -webkit-animation-name: bounceOutDown; + animation-name: bounceOutDown; +} + +@-webkit-keyframes bounceOutLeft { + 20% { + opacity: 1; + -webkit-transform: translate3d(20px, 0, 0); + transform: translate3d(20px, 0, 0); + } + + 100% { + opacity: 0; + -webkit-transform: translate3d(-2000px, 0, 0); + transform: translate3d(-2000px, 0, 0); + } +} + +@keyframes bounceOutLeft { + 20% { + opacity: 1; + -webkit-transform: translate3d(20px, 0, 0); + transform: translate3d(20px, 0, 0); + } + + 100% { + opacity: 0; + -webkit-transform: translate3d(-2000px, 0, 0); + transform: translate3d(-2000px, 0, 0); + } +} + +.bounceOutLeft { + -webkit-animation-name: bounceOutLeft; + animation-name: bounceOutLeft; +} + +@-webkit-keyframes bounceOutRight { + 20% { + opacity: 1; + -webkit-transform: translate3d(-20px, 0, 0); + transform: translate3d(-20px, 0, 0); + } + + 100% { + opacity: 0; + -webkit-transform: translate3d(2000px, 0, 0); + transform: translate3d(2000px, 0, 0); + } +} + +@keyframes bounceOutRight { + 20% { + opacity: 1; + -webkit-transform: translate3d(-20px, 0, 0); + transform: translate3d(-20px, 0, 0); + } + + 100% { + opacity: 0; + -webkit-transform: translate3d(2000px, 0, 0); + transform: translate3d(2000px, 0, 0); + } +} + +.bounceOutRight { + -webkit-animation-name: bounceOutRight; + animation-name: bounceOutRight; +} + +@-webkit-keyframes bounceOutUp { + 20% { + -webkit-transform: translate3d(0, -10px, 0); + transform: translate3d(0, -10px, 0); + } + + 40%, 45% { + opacity: 1; + -webkit-transform: translate3d(0, 20px, 0); + transform: translate3d(0, 20px, 0); + } + + 100% { + opacity: 0; + -webkit-transform: translate3d(0, -2000px, 0); + transform: translate3d(0, -2000px, 0); + } +} + +@keyframes bounceOutUp { + 20% { + -webkit-transform: translate3d(0, -10px, 0); + transform: translate3d(0, -10px, 0); + } + + 40%, 45% { + opacity: 1; + -webkit-transform: translate3d(0, 20px, 0); + transform: translate3d(0, 20px, 0); + } + + 100% { + opacity: 0; + -webkit-transform: translate3d(0, -2000px, 0); + transform: translate3d(0, -2000px, 0); + } +} + +.bounceOutUp { + -webkit-animation-name: bounceOutUp; + animation-name: bounceOutUp; +} + +@-webkit-keyframes fadeIn { + from { + opacity: 0; + } + + 100% { + opacity: 1; + } +} + +@keyframes fadeIn { + from { + opacity: 0; + } + + 100% { + opacity: 1; + } +} + +.fadeIn { + -webkit-animation-name: fadeIn; + animation-name: fadeIn; +} + +@-webkit-keyframes fadeInDown { + from { + opacity: 0; + -webkit-transform: translate3d(0, -100%, 0); + transform: translate3d(0, -100%, 0); + } + + 100% { + opacity: 1; + -webkit-transform: none; + transform: none; + } +} + +@keyframes fadeInDown { + from { + opacity: 0; + -webkit-transform: translate3d(0, -100%, 0); + transform: translate3d(0, -100%, 0); + } + + 100% { + opacity: 1; + -webkit-transform: none; + transform: none; + } +} + +.fadeInDown { + -webkit-animation-name: fadeInDown; + animation-name: fadeInDown; +} + +@-webkit-keyframes fadeInDownBig { + from { + opacity: 0; + -webkit-transform: translate3d(0, -2000px, 0); + transform: translate3d(0, -2000px, 0); + } + + 100% { + opacity: 1; + -webkit-transform: none; + transform: none; + } +} + +@keyframes fadeInDownBig { + from { + opacity: 0; + -webkit-transform: translate3d(0, -2000px, 0); + transform: translate3d(0, -2000px, 0); + } + + 100% { + opacity: 1; + -webkit-transform: none; + transform: none; + } +} + +.fadeInDownBig { + -webkit-animation-name: fadeInDownBig; + animation-name: fadeInDownBig; +} + +@-webkit-keyframes fadeInLeft { + from { + opacity: 0; + -webkit-transform: translate3d(-100%, 0, 0); + transform: translate3d(-100%, 0, 0); + } + + 100% { + opacity: 1; + -webkit-transform: none; + transform: none; + } +} + +@keyframes fadeInLeft { + from { + opacity: 0; + -webkit-transform: translate3d(-100%, 0, 0); + transform: translate3d(-100%, 0, 0); + } + + 100% { + opacity: 1; + -webkit-transform: none; + transform: none; + } +} + +.fadeInLeft { + -webkit-animation-name: fadeInLeft; + animation-name: fadeInLeft; +} + +@-webkit-keyframes fadeInLeftBig { + from { + opacity: 0; + -webkit-transform: translate3d(-2000px, 0, 0); + transform: translate3d(-2000px, 0, 0); + } + + 100% { + opacity: 1; + -webkit-transform: none; + transform: none; + } +} + +@keyframes fadeInLeftBig { + from { + opacity: 0; + -webkit-transform: translate3d(-2000px, 0, 0); + transform: translate3d(-2000px, 0, 0); + } + + 100% { + opacity: 1; + -webkit-transform: none; + transform: none; + } +} + +.fadeInLeftBig { + -webkit-animation-name: fadeInLeftBig; + animation-name: fadeInLeftBig; +} + +@-webkit-keyframes fadeInRight { + from { + opacity: 0; + -webkit-transform: translate3d(100%, 0, 0); + transform: translate3d(100%, 0, 0); + } + + 100% { + opacity: 1; + -webkit-transform: none; + transform: none; + } +} + +@keyframes fadeInRight { + from { + opacity: 0; + -webkit-transform: translate3d(100%, 0, 0); + transform: translate3d(100%, 0, 0); + } + + 100% { + opacity: 1; + -webkit-transform: none; + transform: none; + } +} + +.fadeInRight { + -webkit-animation-name: fadeInRight; + animation-name: fadeInRight; +} + +@-webkit-keyframes fadeInRightBig { + from { + opacity: 0; + -webkit-transform: translate3d(2000px, 0, 0); + transform: translate3d(2000px, 0, 0); + } + + 100% { + opacity: 1; + -webkit-transform: none; + transform: none; + } +} + +@keyframes fadeInRightBig { + from { + opacity: 0; + -webkit-transform: translate3d(2000px, 0, 0); + transform: translate3d(2000px, 0, 0); + } + + 100% { + opacity: 1; + -webkit-transform: none; + transform: none; + } +} + +.fadeInRightBig { + -webkit-animation-name: fadeInRightBig; + animation-name: fadeInRightBig; +} + +@-webkit-keyframes fadeInUp { + from { + opacity: 0; + -webkit-transform: translate3d(0, 100%, 0); + transform: translate3d(0, 100%, 0); + } + + 100% { + opacity: 1; + -webkit-transform: none; + transform: none; + } +} + +@keyframes fadeInUp { + from { + opacity: 0; + -webkit-transform: translate3d(0, 100%, 0); + transform: translate3d(0, 100%, 0); + } + + 100% { + opacity: 1; + -webkit-transform: none; + transform: none; + } +} + +.fadeInUp { + -webkit-animation-name: fadeInUp; + animation-name: fadeInUp; +} + +@-webkit-keyframes fadeInUpBig { + from { + opacity: 0; + -webkit-transform: translate3d(0, 2000px, 0); + transform: translate3d(0, 2000px, 0); + } + + 100% { + opacity: 1; + -webkit-transform: none; + transform: none; + } +} + +@keyframes fadeInUpBig { + from { + opacity: 0; + -webkit-transform: translate3d(0, 2000px, 0); + transform: translate3d(0, 2000px, 0); + } + + 100% { + opacity: 1; + -webkit-transform: none; + transform: none; + } +} + +.fadeInUpBig { + -webkit-animation-name: fadeInUpBig; + animation-name: fadeInUpBig; +} + +@-webkit-keyframes fadeOut { + from { + opacity: 1; + } + + 100% { + opacity: 0; + } +} + +@keyframes fadeOut { + from { + opacity: 1; + } + + 100% { + opacity: 0; + } +} + +.fadeOut { + -webkit-animation-name: fadeOut; + animation-name: fadeOut; +} + +@-webkit-keyframes fadeOutDown { + from { + opacity: 1; + } + + 100% { + opacity: 0; + -webkit-transform: translate3d(0, 100%, 0); + transform: translate3d(0, 100%, 0); + } +} + +@keyframes fadeOutDown { + from { + opacity: 1; + } + + 100% { + opacity: 0; + -webkit-transform: translate3d(0, 100%, 0); + transform: translate3d(0, 100%, 0); + } +} + +.fadeOutDown { + -webkit-animation-name: fadeOutDown; + animation-name: fadeOutDown; +} + +@-webkit-keyframes fadeOutDownBig { + from { + opacity: 1; + } + + 100% { + opacity: 0; + -webkit-transform: translate3d(0, 2000px, 0); + transform: translate3d(0, 2000px, 0); + } +} + +@keyframes fadeOutDownBig { + from { + opacity: 1; + } + + 100% { + opacity: 0; + -webkit-transform: translate3d(0, 2000px, 0); + transform: translate3d(0, 2000px, 0); + } +} + +.fadeOutDownBig { + -webkit-animation-name: fadeOutDownBig; + animation-name: fadeOutDownBig; +} + +@-webkit-keyframes fadeOutLeft { + from { + opacity: 1; + } + + 100% { + opacity: 0; + -webkit-transform: translate3d(-100%, 0, 0); + transform: translate3d(-100%, 0, 0); + } +} + +@keyframes fadeOutLeft { + from { + opacity: 1; + } + + 100% { + opacity: 0; + -webkit-transform: translate3d(-100%, 0, 0); + transform: translate3d(-100%, 0, 0); + } +} + +.fadeOutLeft { + -webkit-animation-name: fadeOutLeft; + animation-name: fadeOutLeft; +} + +@-webkit-keyframes fadeOutLeftBig { + from { + opacity: 1; + } + + 100% { + opacity: 0; + -webkit-transform: translate3d(-2000px, 0, 0); + transform: translate3d(-2000px, 0, 0); + } +} + +@keyframes fadeOutLeftBig { + from { + opacity: 1; + } + + 100% { + opacity: 0; + -webkit-transform: translate3d(-2000px, 0, 0); + transform: translate3d(-2000px, 0, 0); + } +} + +.fadeOutLeftBig { + -webkit-animation-name: fadeOutLeftBig; + animation-name: fadeOutLeftBig; +} + +@-webkit-keyframes fadeOutRight { + from { + opacity: 1; + } + + 100% { + opacity: 0; + -webkit-transform: translate3d(100%, 0, 0); + transform: translate3d(100%, 0, 0); + } +} + +@keyframes fadeOutRight { + from { + opacity: 1; + } + + 100% { + opacity: 0; + -webkit-transform: translate3d(100%, 0, 0); + transform: translate3d(100%, 0, 0); + } +} + +.fadeOutRight { + -webkit-animation-name: fadeOutRight; + animation-name: fadeOutRight; +} + +@-webkit-keyframes fadeOutRightBig { + from { + opacity: 1; + } + + 100% { + opacity: 0; + -webkit-transform: translate3d(2000px, 0, 0); + transform: translate3d(2000px, 0, 0); + } +} + +@keyframes fadeOutRightBig { + from { + opacity: 1; + } + + 100% { + opacity: 0; + -webkit-transform: translate3d(2000px, 0, 0); + transform: translate3d(2000px, 0, 0); + } +} + +.fadeOutRightBig { + -webkit-animation-name: fadeOutRightBig; + animation-name: fadeOutRightBig; +} + +@-webkit-keyframes fadeOutUp { + from { + opacity: 1; + } + + 100% { + opacity: 0; + -webkit-transform: translate3d(0, -100%, 0); + transform: translate3d(0, -100%, 0); + } +} + +@keyframes fadeOutUp { + from { + opacity: 1; + } + + 100% { + opacity: 0; + -webkit-transform: translate3d(0, -100%, 0); + transform: translate3d(0, -100%, 0); + } +} + +.fadeOutUp { + -webkit-animation-name: fadeOutUp; + animation-name: fadeOutUp; +} + +@-webkit-keyframes fadeOutUpBig { + from { + opacity: 1; + } + + 100% { + opacity: 0; + -webkit-transform: translate3d(0, -2000px, 0); + transform: translate3d(0, -2000px, 0); + } +} + +@keyframes fadeOutUpBig { + from { + opacity: 1; + } + + 100% { + opacity: 0; + -webkit-transform: translate3d(0, -2000px, 0); + transform: translate3d(0, -2000px, 0); + } +} + +.fadeOutUpBig { + -webkit-animation-name: fadeOutUpBig; + animation-name: fadeOutUpBig; +} + +@-webkit-keyframes flip { + from { + -webkit-transform: perspective(400px) rotate3d(0, 1, 0, -360deg); + transform: perspective(400px) rotate3d(0, 1, 0, -360deg); + -webkit-animation-timing-function: ease-out; + animation-timing-function: ease-out; + } + + 40% { + -webkit-transform: perspective(400px) translate3d(0, 0, 150px) rotate3d(0, 1, 0, -190deg); + transform: perspective(400px) translate3d(0, 0, 150px) rotate3d(0, 1, 0, -190deg); + -webkit-animation-timing-function: ease-out; + animation-timing-function: ease-out; + } + + 50% { + -webkit-transform: perspective(400px) translate3d(0, 0, 150px) rotate3d(0, 1, 0, -170deg); + transform: perspective(400px) translate3d(0, 0, 150px) rotate3d(0, 1, 0, -170deg); + -webkit-animation-timing-function: ease-in; + animation-timing-function: ease-in; + } + + 80% { + -webkit-transform: perspective(400px) scale3d(.95, .95, .95); + transform: perspective(400px) scale3d(.95, .95, .95); + -webkit-animation-timing-function: ease-in; + animation-timing-function: ease-in; + } + + 100% { + -webkit-transform: perspective(400px); + transform: perspective(400px); + -webkit-animation-timing-function: ease-in; + animation-timing-function: ease-in; + } +} + +@keyframes flip { + from { + -webkit-transform: perspective(400px) rotate3d(0, 1, 0, -360deg); + transform: perspective(400px) rotate3d(0, 1, 0, -360deg); + -webkit-animation-timing-function: ease-out; + animation-timing-function: ease-out; + } + + 40% { + -webkit-transform: perspective(400px) translate3d(0, 0, 150px) rotate3d(0, 1, 0, -190deg); + transform: perspective(400px) translate3d(0, 0, 150px) rotate3d(0, 1, 0, -190deg); + -webkit-animation-timing-function: ease-out; + animation-timing-function: ease-out; + } + + 50% { + -webkit-transform: perspective(400px) translate3d(0, 0, 150px) rotate3d(0, 1, 0, -170deg); + transform: perspective(400px) translate3d(0, 0, 150px) rotate3d(0, 1, 0, -170deg); + -webkit-animation-timing-function: ease-in; + animation-timing-function: ease-in; + } + + 80% { + -webkit-transform: perspective(400px) scale3d(.95, .95, .95); + transform: perspective(400px) scale3d(.95, .95, .95); + -webkit-animation-timing-function: ease-in; + animation-timing-function: ease-in; + } + + 100% { + -webkit-transform: perspective(400px); + transform: perspective(400px); + -webkit-animation-timing-function: ease-in; + animation-timing-function: ease-in; + } +} + +.animated.flip { + -webkit-backface-visibility: visible; + backface-visibility: visible; + -webkit-animation-name: flip; + animation-name: flip; +} + +@-webkit-keyframes flipInX { + from { + -webkit-transform: perspective(400px) rotate3d(1, 0, 0, 90deg); + transform: perspective(400px) rotate3d(1, 0, 0, 90deg); + -webkit-animation-timing-function: ease-in; + animation-timing-function: ease-in; + opacity: 0; + } + + 40% { + -webkit-transform: perspective(400px) rotate3d(1, 0, 0, -20deg); + transform: perspective(400px) rotate3d(1, 0, 0, -20deg); + -webkit-animation-timing-function: ease-in; + animation-timing-function: ease-in; + } + + 60% { + -webkit-transform: perspective(400px) rotate3d(1, 0, 0, 10deg); + transform: perspective(400px) rotate3d(1, 0, 0, 10deg); + opacity: 1; + } + + 80% { + -webkit-transform: perspective(400px) rotate3d(1, 0, 0, -5deg); + transform: perspective(400px) rotate3d(1, 0, 0, -5deg); + } + + 100% { + -webkit-transform: perspective(400px); + transform: perspective(400px); + } +} + +@keyframes flipInX { + from { + -webkit-transform: perspective(400px) rotate3d(1, 0, 0, 90deg); + transform: perspective(400px) rotate3d(1, 0, 0, 90deg); + -webkit-animation-timing-function: ease-in; + animation-timing-function: ease-in; + opacity: 0; + } + + 40% { + -webkit-transform: perspective(400px) rotate3d(1, 0, 0, -20deg); + transform: perspective(400px) rotate3d(1, 0, 0, -20deg); + -webkit-animation-timing-function: ease-in; + animation-timing-function: ease-in; + } + + 60% { + -webkit-transform: perspective(400px) rotate3d(1, 0, 0, 10deg); + transform: perspective(400px) rotate3d(1, 0, 0, 10deg); + opacity: 1; + } + + 80% { + -webkit-transform: perspective(400px) rotate3d(1, 0, 0, -5deg); + transform: perspective(400px) rotate3d(1, 0, 0, -5deg); + } + + 100% { + -webkit-transform: perspective(400px); + transform: perspective(400px); + } +} + +.flipInX { + -webkit-backface-visibility: visible !important; + backface-visibility: visible !important; + -webkit-animation-name: flipInX; + animation-name: flipInX; +} + +@-webkit-keyframes flipInY { + from { + -webkit-transform: perspective(400px) rotate3d(0, 1, 0, 90deg); + transform: perspective(400px) rotate3d(0, 1, 0, 90deg); + -webkit-animation-timing-function: ease-in; + animation-timing-function: ease-in; + opacity: 0; + } + + 40% { + -webkit-transform: perspective(400px) rotate3d(0, 1, 0, -20deg); + transform: perspective(400px) rotate3d(0, 1, 0, -20deg); + -webkit-animation-timing-function: ease-in; + animation-timing-function: ease-in; + } + + 60% { + -webkit-transform: perspective(400px) rotate3d(0, 1, 0, 10deg); + transform: perspective(400px) rotate3d(0, 1, 0, 10deg); + opacity: 1; + } + + 80% { + -webkit-transform: perspective(400px) rotate3d(0, 1, 0, -5deg); + transform: perspective(400px) rotate3d(0, 1, 0, -5deg); + } + + 100% { + -webkit-transform: perspective(400px); + transform: perspective(400px); + } +} + +@keyframes flipInY { + from { + -webkit-transform: perspective(400px) rotate3d(0, 1, 0, 90deg); + transform: perspective(400px) rotate3d(0, 1, 0, 90deg); + -webkit-animation-timing-function: ease-in; + animation-timing-function: ease-in; + opacity: 0; + } + + 40% { + -webkit-transform: perspective(400px) rotate3d(0, 1, 0, -20deg); + transform: perspective(400px) rotate3d(0, 1, 0, -20deg); + -webkit-animation-timing-function: ease-in; + animation-timing-function: ease-in; + } + + 60% { + -webkit-transform: perspective(400px) rotate3d(0, 1, 0, 10deg); + transform: perspective(400px) rotate3d(0, 1, 0, 10deg); + opacity: 1; + } + + 80% { + -webkit-transform: perspective(400px) rotate3d(0, 1, 0, -5deg); + transform: perspective(400px) rotate3d(0, 1, 0, -5deg); + } + + 100% { + -webkit-transform: perspective(400px); + transform: perspective(400px); + } +} + +.flipInY { + -webkit-backface-visibility: visible !important; + backface-visibility: visible !important; + -webkit-animation-name: flipInY; + animation-name: flipInY; +} + +@-webkit-keyframes flipOutX { + from { + -webkit-transform: perspective(400px); + transform: perspective(400px); + } + + 30% { + -webkit-transform: perspective(400px) rotate3d(1, 0, 0, -20deg); + transform: perspective(400px) rotate3d(1, 0, 0, -20deg); + opacity: 1; + } + + 100% { + -webkit-transform: perspective(400px) rotate3d(1, 0, 0, 90deg); + transform: perspective(400px) rotate3d(1, 0, 0, 90deg); + opacity: 0; + } +} + +@keyframes flipOutX { + from { + -webkit-transform: perspective(400px); + transform: perspective(400px); + } + + 30% { + -webkit-transform: perspective(400px) rotate3d(1, 0, 0, -20deg); + transform: perspective(400px) rotate3d(1, 0, 0, -20deg); + opacity: 1; + } + + 100% { + -webkit-transform: perspective(400px) rotate3d(1, 0, 0, 90deg); + transform: perspective(400px) rotate3d(1, 0, 0, 90deg); + opacity: 0; + } +} + +.flipOutX { + -webkit-animation-name: flipOutX; + animation-name: flipOutX; + -webkit-backface-visibility: visible !important; + backface-visibility: visible !important; +} + +@-webkit-keyframes flipOutY { + from { + -webkit-transform: perspective(400px); + transform: perspective(400px); + } + + 30% { + -webkit-transform: perspective(400px) rotate3d(0, 1, 0, -15deg); + transform: perspective(400px) rotate3d(0, 1, 0, -15deg); + opacity: 1; + } + + 100% { + -webkit-transform: perspective(400px) rotate3d(0, 1, 0, 90deg); + transform: perspective(400px) rotate3d(0, 1, 0, 90deg); + opacity: 0; + } +} + +@keyframes flipOutY { + from { + -webkit-transform: perspective(400px); + transform: perspective(400px); + } + + 30% { + -webkit-transform: perspective(400px) rotate3d(0, 1, 0, -15deg); + transform: perspective(400px) rotate3d(0, 1, 0, -15deg); + opacity: 1; + } + + 100% { + -webkit-transform: perspective(400px) rotate3d(0, 1, 0, 90deg); + transform: perspective(400px) rotate3d(0, 1, 0, 90deg); + opacity: 0; + } +} + +.flipOutY { + -webkit-backface-visibility: visible !important; + backface-visibility: visible !important; + -webkit-animation-name: flipOutY; + animation-name: flipOutY; +} + +@-webkit-keyframes lightSpeedIn { + from { + -webkit-transform: translate3d(100%, 0, 0) skewX(-30deg); + transform: translate3d(100%, 0, 0) skewX(-30deg); + opacity: 0; + } + + 60% { + -webkit-transform: skewX(20deg); + transform: skewX(20deg); + opacity: 1; + } + + 80% { + -webkit-transform: skewX(-5deg); + transform: skewX(-5deg); + opacity: 1; + } + + 100% { + -webkit-transform: none; + transform: none; + opacity: 1; + } +} + +@keyframes lightSpeedIn { + from { + -webkit-transform: translate3d(100%, 0, 0) skewX(-30deg); + transform: translate3d(100%, 0, 0) skewX(-30deg); + opacity: 0; + } + + 60% { + -webkit-transform: skewX(20deg); + transform: skewX(20deg); + opacity: 1; + } + + 80% { + -webkit-transform: skewX(-5deg); + transform: skewX(-5deg); + opacity: 1; + } + + 100% { + -webkit-transform: none; + transform: none; + opacity: 1; + } +} + +.lightSpeedIn { + -webkit-animation-name: lightSpeedIn; + animation-name: lightSpeedIn; + -webkit-animation-timing-function: ease-out; + animation-timing-function: ease-out; +} + +@-webkit-keyframes lightSpeedOut { + from { + opacity: 1; + } + + 100% { + -webkit-transform: translate3d(100%, 0, 0) skewX(30deg); + transform: translate3d(100%, 0, 0) skewX(30deg); + opacity: 0; + } +} + +@keyframes lightSpeedOut { + from { + opacity: 1; + } + + 100% { + -webkit-transform: translate3d(100%, 0, 0) skewX(30deg); + transform: translate3d(100%, 0, 0) skewX(30deg); + opacity: 0; + } +} + +.lightSpeedOut { + -webkit-animation-name: lightSpeedOut; + animation-name: lightSpeedOut; + -webkit-animation-timing-function: ease-in; + animation-timing-function: ease-in; +} + +@-webkit-keyframes rotateIn { + from { + -webkit-transform-origin: center; + transform-origin: center; + -webkit-transform: rotate3d(0, 0, 1, -200deg); + transform: rotate3d(0, 0, 1, -200deg); + opacity: 0; + } + + 100% { + -webkit-transform-origin: center; + transform-origin: center; + -webkit-transform: none; + transform: none; + opacity: 1; + } +} + +@keyframes rotateIn { + from { + -webkit-transform-origin: center; + transform-origin: center; + -webkit-transform: rotate3d(0, 0, 1, -200deg); + transform: rotate3d(0, 0, 1, -200deg); + opacity: 0; + } + + 100% { + -webkit-transform-origin: center; + transform-origin: center; + -webkit-transform: none; + transform: none; + opacity: 1; + } +} + +.rotateIn { + -webkit-animation-name: rotateIn; + animation-name: rotateIn; +} + +@-webkit-keyframes rotateInDownLeft { + from { + -webkit-transform-origin: left bottom; + transform-origin: left bottom; + -webkit-transform: rotate3d(0, 0, 1, -45deg); + transform: rotate3d(0, 0, 1, -45deg); + opacity: 0; + } + + 100% { + -webkit-transform-origin: left bottom; + transform-origin: left bottom; + -webkit-transform: none; + transform: none; + opacity: 1; + } +} + +@keyframes rotateInDownLeft { + from { + -webkit-transform-origin: left bottom; + transform-origin: left bottom; + -webkit-transform: rotate3d(0, 0, 1, -45deg); + transform: rotate3d(0, 0, 1, -45deg); + opacity: 0; + } + + 100% { + -webkit-transform-origin: left bottom; + transform-origin: left bottom; + -webkit-transform: none; + transform: none; + opacity: 1; + } +} + +.rotateInDownLeft { + -webkit-animation-name: rotateInDownLeft; + animation-name: rotateInDownLeft; +} + +@-webkit-keyframes rotateInDownRight { + from { + -webkit-transform-origin: right bottom; + transform-origin: right bottom; + -webkit-transform: rotate3d(0, 0, 1, 45deg); + transform: rotate3d(0, 0, 1, 45deg); + opacity: 0; + } + + 100% { + -webkit-transform-origin: right bottom; + transform-origin: right bottom; + -webkit-transform: none; + transform: none; + opacity: 1; + } +} + +@keyframes rotateInDownRight { + from { + -webkit-transform-origin: right bottom; + transform-origin: right bottom; + -webkit-transform: rotate3d(0, 0, 1, 45deg); + transform: rotate3d(0, 0, 1, 45deg); + opacity: 0; + } + + 100% { + -webkit-transform-origin: right bottom; + transform-origin: right bottom; + -webkit-transform: none; + transform: none; + opacity: 1; + } +} + +.rotateInDownRight { + -webkit-animation-name: rotateInDownRight; + animation-name: rotateInDownRight; +} + +@-webkit-keyframes rotateInUpLeft { + from { + -webkit-transform-origin: left bottom; + transform-origin: left bottom; + -webkit-transform: rotate3d(0, 0, 1, 45deg); + transform: rotate3d(0, 0, 1, 45deg); + opacity: 0; + } + + 100% { + -webkit-transform-origin: left bottom; + transform-origin: left bottom; + -webkit-transform: none; + transform: none; + opacity: 1; + } +} + +@keyframes rotateInUpLeft { + from { + -webkit-transform-origin: left bottom; + transform-origin: left bottom; + -webkit-transform: rotate3d(0, 0, 1, 45deg); + transform: rotate3d(0, 0, 1, 45deg); + opacity: 0; + } + + 100% { + -webkit-transform-origin: left bottom; + transform-origin: left bottom; + -webkit-transform: none; + transform: none; + opacity: 1; + } +} + +.rotateInUpLeft { + -webkit-animation-name: rotateInUpLeft; + animation-name: rotateInUpLeft; +} + +@-webkit-keyframes rotateInUpRight { + from { + -webkit-transform-origin: right bottom; + transform-origin: right bottom; + -webkit-transform: rotate3d(0, 0, 1, -90deg); + transform: rotate3d(0, 0, 1, -90deg); + opacity: 0; + } + + 100% { + -webkit-transform-origin: right bottom; + transform-origin: right bottom; + -webkit-transform: none; + transform: none; + opacity: 1; + } +} + +@keyframes rotateInUpRight { + from { + -webkit-transform-origin: right bottom; + transform-origin: right bottom; + -webkit-transform: rotate3d(0, 0, 1, -90deg); + transform: rotate3d(0, 0, 1, -90deg); + opacity: 0; + } + + 100% { + -webkit-transform-origin: right bottom; + transform-origin: right bottom; + -webkit-transform: none; + transform: none; + opacity: 1; + } +} + +.rotateInUpRight { + -webkit-animation-name: rotateInUpRight; + animation-name: rotateInUpRight; +} + +@-webkit-keyframes rotateOut { + from { + -webkit-transform-origin: center; + transform-origin: center; + opacity: 1; + } + + 100% { + -webkit-transform-origin: center; + transform-origin: center; + -webkit-transform: rotate3d(0, 0, 1, 200deg); + transform: rotate3d(0, 0, 1, 200deg); + opacity: 0; + } +} + +@keyframes rotateOut { + from { + -webkit-transform-origin: center; + transform-origin: center; + opacity: 1; + } + + 100% { + -webkit-transform-origin: center; + transform-origin: center; + -webkit-transform: rotate3d(0, 0, 1, 200deg); + transform: rotate3d(0, 0, 1, 200deg); + opacity: 0; + } +} + +.rotateOut { + -webkit-animation-name: rotateOut; + animation-name: rotateOut; +} + +@-webkit-keyframes rotateOutDownLeft { + from { + -webkit-transform-origin: left bottom; + transform-origin: left bottom; + opacity: 1; + } + + 100% { + -webkit-transform-origin: left bottom; + transform-origin: left bottom; + -webkit-transform: rotate3d(0, 0, 1, 45deg); + transform: rotate3d(0, 0, 1, 45deg); + opacity: 0; + } +} + +@keyframes rotateOutDownLeft { + from { + -webkit-transform-origin: left bottom; + transform-origin: left bottom; + opacity: 1; + } + + 100% { + -webkit-transform-origin: left bottom; + transform-origin: left bottom; + -webkit-transform: rotate3d(0, 0, 1, 45deg); + transform: rotate3d(0, 0, 1, 45deg); + opacity: 0; + } +} + +.rotateOutDownLeft { + -webkit-animation-name: rotateOutDownLeft; + animation-name: rotateOutDownLeft; +} + +@-webkit-keyframes rotateOutDownRight { + from { + -webkit-transform-origin: right bottom; + transform-origin: right bottom; + opacity: 1; + } + + 100% { + -webkit-transform-origin: right bottom; + transform-origin: right bottom; + -webkit-transform: rotate3d(0, 0, 1, -45deg); + transform: rotate3d(0, 0, 1, -45deg); + opacity: 0; + } +} + +@keyframes rotateOutDownRight { + from { + -webkit-transform-origin: right bottom; + transform-origin: right bottom; + opacity: 1; + } + + 100% { + -webkit-transform-origin: right bottom; + transform-origin: right bottom; + -webkit-transform: rotate3d(0, 0, 1, -45deg); + transform: rotate3d(0, 0, 1, -45deg); + opacity: 0; + } +} + +.rotateOutDownRight { + -webkit-animation-name: rotateOutDownRight; + animation-name: rotateOutDownRight; +} + +@-webkit-keyframes rotateOutUpLeft { + from { + -webkit-transform-origin: left bottom; + transform-origin: left bottom; + opacity: 1; + } + + 100% { + -webkit-transform-origin: left bottom; + transform-origin: left bottom; + -webkit-transform: rotate3d(0, 0, 1, -45deg); + transform: rotate3d(0, 0, 1, -45deg); + opacity: 0; + } +} + +@keyframes rotateOutUpLeft { + from { + -webkit-transform-origin: left bottom; + transform-origin: left bottom; + opacity: 1; + } + + 100% { + -webkit-transform-origin: left bottom; + transform-origin: left bottom; + -webkit-transform: rotate3d(0, 0, 1, -45deg); + transform: rotate3d(0, 0, 1, -45deg); + opacity: 0; + } +} + +.rotateOutUpLeft { + -webkit-animation-name: rotateOutUpLeft; + animation-name: rotateOutUpLeft; +} + +@-webkit-keyframes rotateOutUpRight { + from { + -webkit-transform-origin: right bottom; + transform-origin: right bottom; + opacity: 1; + } + + 100% { + -webkit-transform-origin: right bottom; + transform-origin: right bottom; + -webkit-transform: rotate3d(0, 0, 1, 90deg); + transform: rotate3d(0, 0, 1, 90deg); + opacity: 0; + } +} + +@keyframes rotateOutUpRight { + from { + -webkit-transform-origin: right bottom; + transform-origin: right bottom; + opacity: 1; + } + + 100% { + -webkit-transform-origin: right bottom; + transform-origin: right bottom; + -webkit-transform: rotate3d(0, 0, 1, 90deg); + transform: rotate3d(0, 0, 1, 90deg); + opacity: 0; + } +} + +.rotateOutUpRight { + -webkit-animation-name: rotateOutUpRight; + animation-name: rotateOutUpRight; +} + +@-webkit-keyframes hinge { + 0% { + -webkit-transform-origin: top left; + transform-origin: top left; + -webkit-animation-timing-function: ease-in-out; + animation-timing-function: ease-in-out; + } + + 20%, 60% { + -webkit-transform: rotate3d(0, 0, 1, 80deg); + transform: rotate3d(0, 0, 1, 80deg); + -webkit-transform-origin: top left; + transform-origin: top left; + -webkit-animation-timing-function: ease-in-out; + animation-timing-function: ease-in-out; + } + + 40%, 80% { + -webkit-transform: rotate3d(0, 0, 1, 60deg); + transform: rotate3d(0, 0, 1, 60deg); + -webkit-transform-origin: top left; + transform-origin: top left; + -webkit-animation-timing-function: ease-in-out; + animation-timing-function: ease-in-out; + opacity: 1; + } + + 100% { + -webkit-transform: translate3d(0, 700px, 0); + transform: translate3d(0, 700px, 0); + opacity: 0; + } +} + +@keyframes hinge { + 0% { + -webkit-transform-origin: top left; + transform-origin: top left; + -webkit-animation-timing-function: ease-in-out; + animation-timing-function: ease-in-out; + } + + 20%, 60% { + -webkit-transform: rotate3d(0, 0, 1, 80deg); + transform: rotate3d(0, 0, 1, 80deg); + -webkit-transform-origin: top left; + transform-origin: top left; + -webkit-animation-timing-function: ease-in-out; + animation-timing-function: ease-in-out; + } + + 40%, 80% { + -webkit-transform: rotate3d(0, 0, 1, 60deg); + transform: rotate3d(0, 0, 1, 60deg); + -webkit-transform-origin: top left; + transform-origin: top left; + -webkit-animation-timing-function: ease-in-out; + animation-timing-function: ease-in-out; + opacity: 1; + } + + 100% { + -webkit-transform: translate3d(0, 700px, 0); + transform: translate3d(0, 700px, 0); + opacity: 0; + } +} + +.hinge { + -webkit-animation-name: hinge; + animation-name: hinge; +} + +/* originally authored by Nick Pettit - https://github.com/nickpettit/glide */ + +@-webkit-keyframes rollIn { + from { + opacity: 0; + -webkit-transform: translate3d(-100%, 0, 0) rotate3d(0, 0, 1, -120deg); + transform: translate3d(-100%, 0, 0) rotate3d(0, 0, 1, -120deg); + } + + 100% { + opacity: 1; + -webkit-transform: none; + transform: none; + } +} + +@keyframes rollIn { + from { + opacity: 0; + -webkit-transform: translate3d(-100%, 0, 0) rotate3d(0, 0, 1, -120deg); + transform: translate3d(-100%, 0, 0) rotate3d(0, 0, 1, -120deg); + } + + 100% { + opacity: 1; + -webkit-transform: none; + transform: none; + } +} + +.rollIn { + -webkit-animation-name: rollIn; + animation-name: rollIn; +} + +/* originally authored by Nick Pettit - https://github.com/nickpettit/glide */ + +@-webkit-keyframes rollOut { + from { + opacity: 1; + } + + 100% { + opacity: 0; + -webkit-transform: translate3d(100%, 0, 0) rotate3d(0, 0, 1, 120deg); + transform: translate3d(100%, 0, 0) rotate3d(0, 0, 1, 120deg); + } +} + +@keyframes rollOut { + from { + opacity: 1; + } + + 100% { + opacity: 0; + -webkit-transform: translate3d(100%, 0, 0) rotate3d(0, 0, 1, 120deg); + transform: translate3d(100%, 0, 0) rotate3d(0, 0, 1, 120deg); + } +} + +.rollOut { + -webkit-animation-name: rollOut; + animation-name: rollOut; +} + +@-webkit-keyframes zoomIn { + from { + opacity: 0; + -webkit-transform: scale3d(.3, .3, .3); + transform: scale3d(.3, .3, .3); + } + + 50% { + opacity: 1; + } +} + +@keyframes zoomIn { + from { + opacity: 0; + -webkit-transform: scale3d(.3, .3, .3); + transform: scale3d(.3, .3, .3); + } + + 50% { + opacity: 1; + } +} + +.zoomIn { + -webkit-animation-name: zoomIn; + animation-name: zoomIn; +} + +@-webkit-keyframes zoomInDown { + from { + opacity: 0; + -webkit-transform: scale3d(.1, .1, .1) translate3d(0, -1000px, 0); + transform: scale3d(.1, .1, .1) translate3d(0, -1000px, 0); + -webkit-animation-timing-function: cubic-bezier(0.550, 0.055, 0.675, 0.190); + animation-timing-function: cubic-bezier(0.550, 0.055, 0.675, 0.190); + } + + 60% { + opacity: 1; + -webkit-transform: scale3d(.475, .475, .475) translate3d(0, 60px, 0); + transform: scale3d(.475, .475, .475) translate3d(0, 60px, 0); + -webkit-animation-timing-function: cubic-bezier(0.175, 0.885, 0.320, 1); + animation-timing-function: cubic-bezier(0.175, 0.885, 0.320, 1); + } +} + +@keyframes zoomInDown { + from { + opacity: 0; + -webkit-transform: scale3d(.1, .1, .1) translate3d(0, -1000px, 0); + transform: scale3d(.1, .1, .1) translate3d(0, -1000px, 0); + -webkit-animation-timing-function: cubic-bezier(0.550, 0.055, 0.675, 0.190); + animation-timing-function: cubic-bezier(0.550, 0.055, 0.675, 0.190); + } + + 60% { + opacity: 1; + -webkit-transform: scale3d(.475, .475, .475) translate3d(0, 60px, 0); + transform: scale3d(.475, .475, .475) translate3d(0, 60px, 0); + -webkit-animation-timing-function: cubic-bezier(0.175, 0.885, 0.320, 1); + animation-timing-function: cubic-bezier(0.175, 0.885, 0.320, 1); + } +} + +.zoomInDown { + -webkit-animation-name: zoomInDown; + animation-name: zoomInDown; +} + +@-webkit-keyframes zoomInLeft { + from { + opacity: 0; + -webkit-transform: scale3d(.1, .1, .1) translate3d(-1000px, 0, 0); + transform: scale3d(.1, .1, .1) translate3d(-1000px, 0, 0); + -webkit-animation-timing-function: cubic-bezier(0.550, 0.055, 0.675, 0.190); + animation-timing-function: cubic-bezier(0.550, 0.055, 0.675, 0.190); + } + + 60% { + opacity: 1; + -webkit-transform: scale3d(.475, .475, .475) translate3d(10px, 0, 0); + transform: scale3d(.475, .475, .475) translate3d(10px, 0, 0); + -webkit-animation-timing-function: cubic-bezier(0.175, 0.885, 0.320, 1); + animation-timing-function: cubic-bezier(0.175, 0.885, 0.320, 1); + } +} + +@keyframes zoomInLeft { + from { + opacity: 0; + -webkit-transform: scale3d(.1, .1, .1) translate3d(-1000px, 0, 0); + transform: scale3d(.1, .1, .1) translate3d(-1000px, 0, 0); + -webkit-animation-timing-function: cubic-bezier(0.550, 0.055, 0.675, 0.190); + animation-timing-function: cubic-bezier(0.550, 0.055, 0.675, 0.190); + } + + 60% { + opacity: 1; + -webkit-transform: scale3d(.475, .475, .475) translate3d(10px, 0, 0); + transform: scale3d(.475, .475, .475) translate3d(10px, 0, 0); + -webkit-animation-timing-function: cubic-bezier(0.175, 0.885, 0.320, 1); + animation-timing-function: cubic-bezier(0.175, 0.885, 0.320, 1); + } +} + +.zoomInLeft { + -webkit-animation-name: zoomInLeft; + animation-name: zoomInLeft; +} + +@-webkit-keyframes zoomInRight { + from { + opacity: 0; + -webkit-transform: scale3d(.1, .1, .1) translate3d(1000px, 0, 0); + transform: scale3d(.1, .1, .1) translate3d(1000px, 0, 0); + -webkit-animation-timing-function: cubic-bezier(0.550, 0.055, 0.675, 0.190); + animation-timing-function: cubic-bezier(0.550, 0.055, 0.675, 0.190); + } + + 60% { + opacity: 1; + -webkit-transform: scale3d(.475, .475, .475) translate3d(-10px, 0, 0); + transform: scale3d(.475, .475, .475) translate3d(-10px, 0, 0); + -webkit-animation-timing-function: cubic-bezier(0.175, 0.885, 0.320, 1); + animation-timing-function: cubic-bezier(0.175, 0.885, 0.320, 1); + } +} + +@keyframes zoomInRight { + from { + opacity: 0; + -webkit-transform: scale3d(.1, .1, .1) translate3d(1000px, 0, 0); + transform: scale3d(.1, .1, .1) translate3d(1000px, 0, 0); + -webkit-animation-timing-function: cubic-bezier(0.550, 0.055, 0.675, 0.190); + animation-timing-function: cubic-bezier(0.550, 0.055, 0.675, 0.190); + } + + 60% { + opacity: 1; + -webkit-transform: scale3d(.475, .475, .475) translate3d(-10px, 0, 0); + transform: scale3d(.475, .475, .475) translate3d(-10px, 0, 0); + -webkit-animation-timing-function: cubic-bezier(0.175, 0.885, 0.320, 1); + animation-timing-function: cubic-bezier(0.175, 0.885, 0.320, 1); + } +} + +.zoomInRight { + -webkit-animation-name: zoomInRight; + animation-name: zoomInRight; +} + +@-webkit-keyframes zoomInUp { + from { + opacity: 0; + -webkit-transform: scale3d(.1, .1, .1) translate3d(0, 1000px, 0); + transform: scale3d(.1, .1, .1) translate3d(0, 1000px, 0); + -webkit-animation-timing-function: cubic-bezier(0.550, 0.055, 0.675, 0.190); + animation-timing-function: cubic-bezier(0.550, 0.055, 0.675, 0.190); + } + + 60% { + opacity: 1; + -webkit-transform: scale3d(.475, .475, .475) translate3d(0, -60px, 0); + transform: scale3d(.475, .475, .475) translate3d(0, -60px, 0); + -webkit-animation-timing-function: cubic-bezier(0.175, 0.885, 0.320, 1); + animation-timing-function: cubic-bezier(0.175, 0.885, 0.320, 1); + } +} + +@keyframes zoomInUp { + from { + opacity: 0; + -webkit-transform: scale3d(.1, .1, .1) translate3d(0, 1000px, 0); + transform: scale3d(.1, .1, .1) translate3d(0, 1000px, 0); + -webkit-animation-timing-function: cubic-bezier(0.550, 0.055, 0.675, 0.190); + animation-timing-function: cubic-bezier(0.550, 0.055, 0.675, 0.190); + } + + 60% { + opacity: 1; + -webkit-transform: scale3d(.475, .475, .475) translate3d(0, -60px, 0); + transform: scale3d(.475, .475, .475) translate3d(0, -60px, 0); + -webkit-animation-timing-function: cubic-bezier(0.175, 0.885, 0.320, 1); + animation-timing-function: cubic-bezier(0.175, 0.885, 0.320, 1); + } +} + +.zoomInUp { + -webkit-animation-name: zoomInUp; + animation-name: zoomInUp; +} + +@-webkit-keyframes zoomOut { + from { + opacity: 1; + } + + 50% { + opacity: 0; + -webkit-transform: scale3d(.3, .3, .3); + transform: scale3d(.3, .3, .3); + } + + 100% { + opacity: 0; + } +} + +@keyframes zoomOut { + from { + opacity: 1; + } + + 50% { + opacity: 0; + -webkit-transform: scale3d(.3, .3, .3); + transform: scale3d(.3, .3, .3); + } + + 100% { + opacity: 0; + } +} + +.zoomOut { + -webkit-animation-name: zoomOut; + animation-name: zoomOut; +} + +@-webkit-keyframes zoomOutDown { + 40% { + opacity: 1; + -webkit-transform: scale3d(.475, .475, .475) translate3d(0, -60px, 0); + transform: scale3d(.475, .475, .475) translate3d(0, -60px, 0); + -webkit-animation-timing-function: cubic-bezier(0.550, 0.055, 0.675, 0.190); + animation-timing-function: cubic-bezier(0.550, 0.055, 0.675, 0.190); + } + + 100% { + opacity: 0; + -webkit-transform: scale3d(.1, .1, .1) translate3d(0, 2000px, 0); + transform: scale3d(.1, .1, .1) translate3d(0, 2000px, 0); + -webkit-transform-origin: center bottom; + transform-origin: center bottom; + -webkit-animation-timing-function: cubic-bezier(0.175, 0.885, 0.320, 1); + animation-timing-function: cubic-bezier(0.175, 0.885, 0.320, 1); + } +} + +@keyframes zoomOutDown { + 40% { + opacity: 1; + -webkit-transform: scale3d(.475, .475, .475) translate3d(0, -60px, 0); + transform: scale3d(.475, .475, .475) translate3d(0, -60px, 0); + -webkit-animation-timing-function: cubic-bezier(0.550, 0.055, 0.675, 0.190); + animation-timing-function: cubic-bezier(0.550, 0.055, 0.675, 0.190); + } + + 100% { + opacity: 0; + -webkit-transform: scale3d(.1, .1, .1) translate3d(0, 2000px, 0); + transform: scale3d(.1, .1, .1) translate3d(0, 2000px, 0); + -webkit-transform-origin: center bottom; + transform-origin: center bottom; + -webkit-animation-timing-function: cubic-bezier(0.175, 0.885, 0.320, 1); + animation-timing-function: cubic-bezier(0.175, 0.885, 0.320, 1); + } +} + +.zoomOutDown { + -webkit-animation-name: zoomOutDown; + animation-name: zoomOutDown; +} + +@-webkit-keyframes zoomOutLeft { + 40% { + opacity: 1; + -webkit-transform: scale3d(.475, .475, .475) translate3d(42px, 0, 0); + transform: scale3d(.475, .475, .475) translate3d(42px, 0, 0); + } + + 100% { + opacity: 0; + -webkit-transform: scale(.1) translate3d(-2000px, 0, 0); + transform: scale(.1) translate3d(-2000px, 0, 0); + -webkit-transform-origin: left center; + transform-origin: left center; + } +} + +@keyframes zoomOutLeft { + 40% { + opacity: 1; + -webkit-transform: scale3d(.475, .475, .475) translate3d(42px, 0, 0); + transform: scale3d(.475, .475, .475) translate3d(42px, 0, 0); + } + + 100% { + opacity: 0; + -webkit-transform: scale(.1) translate3d(-2000px, 0, 0); + transform: scale(.1) translate3d(-2000px, 0, 0); + -webkit-transform-origin: left center; + transform-origin: left center; + } +} + +.zoomOutLeft { + -webkit-animation-name: zoomOutLeft; + animation-name: zoomOutLeft; +} + +@-webkit-keyframes zoomOutRight { + 40% { + opacity: 1; + -webkit-transform: scale3d(.475, .475, .475) translate3d(-42px, 0, 0); + transform: scale3d(.475, .475, .475) translate3d(-42px, 0, 0); + } + + 100% { + opacity: 0; + -webkit-transform: scale(.1) translate3d(2000px, 0, 0); + transform: scale(.1) translate3d(2000px, 0, 0); + -webkit-transform-origin: right center; + transform-origin: right center; + } +} + +@keyframes zoomOutRight { + 40% { + opacity: 1; + -webkit-transform: scale3d(.475, .475, .475) translate3d(-42px, 0, 0); + transform: scale3d(.475, .475, .475) translate3d(-42px, 0, 0); + } + + 100% { + opacity: 0; + -webkit-transform: scale(.1) translate3d(2000px, 0, 0); + transform: scale(.1) translate3d(2000px, 0, 0); + -webkit-transform-origin: right center; + transform-origin: right center; + } +} + +.zoomOutRight { + -webkit-animation-name: zoomOutRight; + animation-name: zoomOutRight; +} + +@-webkit-keyframes zoomOutUp { + 40% { + opacity: 1; + -webkit-transform: scale3d(.475, .475, .475) translate3d(0, 60px, 0); + transform: scale3d(.475, .475, .475) translate3d(0, 60px, 0); + -webkit-animation-timing-function: cubic-bezier(0.550, 0.055, 0.675, 0.190); + animation-timing-function: cubic-bezier(0.550, 0.055, 0.675, 0.190); + } + + 100% { + opacity: 0; + -webkit-transform: scale3d(.1, .1, .1) translate3d(0, -2000px, 0); + transform: scale3d(.1, .1, .1) translate3d(0, -2000px, 0); + -webkit-transform-origin: center bottom; + transform-origin: center bottom; + -webkit-animation-timing-function: cubic-bezier(0.175, 0.885, 0.320, 1); + animation-timing-function: cubic-bezier(0.175, 0.885, 0.320, 1); + } +} + +@keyframes zoomOutUp { + 40% { + opacity: 1; + -webkit-transform: scale3d(.475, .475, .475) translate3d(0, 60px, 0); + transform: scale3d(.475, .475, .475) translate3d(0, 60px, 0); + -webkit-animation-timing-function: cubic-bezier(0.550, 0.055, 0.675, 0.190); + animation-timing-function: cubic-bezier(0.550, 0.055, 0.675, 0.190); + } + + 100% { + opacity: 0; + -webkit-transform: scale3d(.1, .1, .1) translate3d(0, -2000px, 0); + transform: scale3d(.1, .1, .1) translate3d(0, -2000px, 0); + -webkit-transform-origin: center bottom; + transform-origin: center bottom; + -webkit-animation-timing-function: cubic-bezier(0.175, 0.885, 0.320, 1); + animation-timing-function: cubic-bezier(0.175, 0.885, 0.320, 1); + } +} + +.zoomOutUp { + -webkit-animation-name: zoomOutUp; + animation-name: zoomOutUp; +} + +@-webkit-keyframes slideInDown { + from { + -webkit-transform: translate3d(0, -100%, 0); + transform: translate3d(0, -100%, 0); + visibility: visible; + } + + 100% { + -webkit-transform: translate3d(0, 0, 0); + transform: translate3d(0, 0, 0); + } +} + +@keyframes slideInDown { + from { + -webkit-transform: translate3d(0, -100%, 0); + transform: translate3d(0, -100%, 0); + visibility: visible; + } + + 100% { + -webkit-transform: translate3d(0, 0, 0); + transform: translate3d(0, 0, 0); + } +} + +.slideInDown { + -webkit-animation-name: slideInDown; + animation-name: slideInDown; +} + +@-webkit-keyframes slideInLeft { + from { + -webkit-transform: translate3d(-100%, 0, 0); + transform: translate3d(-100%, 0, 0); + visibility: visible; + } + + 100% { + -webkit-transform: translate3d(0, 0, 0); + transform: translate3d(0, 0, 0); + } +} + +@keyframes slideInLeft { + from { + -webkit-transform: translate3d(-100%, 0, 0); + transform: translate3d(-100%, 0, 0); + visibility: visible; + } + + 100% { + -webkit-transform: translate3d(0, 0, 0); + transform: translate3d(0, 0, 0); + } +} + +.slideInLeft { + -webkit-animation-name: slideInLeft; + animation-name: slideInLeft; +} + +@-webkit-keyframes slideInRight { + from { + -webkit-transform: translate3d(100%, 0, 0); + transform: translate3d(100%, 0, 0); + visibility: visible; + } + + 100% { + -webkit-transform: translate3d(0, 0, 0); + transform: translate3d(0, 0, 0); + } +} + +@keyframes slideInRight { + from { + -webkit-transform: translate3d(100%, 0, 0); + transform: translate3d(100%, 0, 0); + visibility: visible; + } + + 100% { + -webkit-transform: translate3d(0, 0, 0); + transform: translate3d(0, 0, 0); + } +} + +.slideInRight { + -webkit-animation-name: slideInRight; + animation-name: slideInRight; +} + +@-webkit-keyframes slideInUp { + from { + -webkit-transform: translate3d(0, 100%, 0); + transform: translate3d(0, 100%, 0); + visibility: visible; + } + + 100% { + -webkit-transform: translate3d(0, 0, 0); + transform: translate3d(0, 0, 0); + } +} + +@keyframes slideInUp { + from { + -webkit-transform: translate3d(0, 100%, 0); + transform: translate3d(0, 100%, 0); + visibility: visible; + } + + 100% { + -webkit-transform: translate3d(0, 0, 0); + transform: translate3d(0, 0, 0); + } +} + +.slideInUp { + -webkit-animation-name: slideInUp; + animation-name: slideInUp; +} + +@-webkit-keyframes slideOutDown { + from { + -webkit-transform: translate3d(0, 0, 0); + transform: translate3d(0, 0, 0); + } + + 100% { + visibility: hidden; + -webkit-transform: translate3d(0, 100%, 0); + transform: translate3d(0, 100%, 0); + } +} + +@keyframes slideOutDown { + from { + -webkit-transform: translate3d(0, 0, 0); + transform: translate3d(0, 0, 0); + } + + 100% { + visibility: hidden; + -webkit-transform: translate3d(0, 100%, 0); + transform: translate3d(0, 100%, 0); + } +} + +.slideOutDown { + -webkit-animation-name: slideOutDown; + animation-name: slideOutDown; +} + +@-webkit-keyframes slideOutLeft { + from { + -webkit-transform: translate3d(0, 0, 0); + transform: translate3d(0, 0, 0); + } + + 100% { + visibility: hidden; + -webkit-transform: translate3d(-100%, 0, 0); + transform: translate3d(-100%, 0, 0); + } +} + +@keyframes slideOutLeft { + from { + -webkit-transform: translate3d(0, 0, 0); + transform: translate3d(0, 0, 0); + } + + 100% { + visibility: hidden; + -webkit-transform: translate3d(-100%, 0, 0); + transform: translate3d(-100%, 0, 0); + } +} + +.slideOutLeft { + -webkit-animation-name: slideOutLeft; + animation-name: slideOutLeft; +} + +@-webkit-keyframes slideOutRight { + from { + -webkit-transform: translate3d(0, 0, 0); + transform: translate3d(0, 0, 0); + } + + 100% { + visibility: hidden; + -webkit-transform: translate3d(100%, 0, 0); + transform: translate3d(100%, 0, 0); + } +} + +@keyframes slideOutRight { + from { + -webkit-transform: translate3d(0, 0, 0); + transform: translate3d(0, 0, 0); + } + + 100% { + visibility: hidden; + -webkit-transform: translate3d(100%, 0, 0); + transform: translate3d(100%, 0, 0); + } +} + +.slideOutRight { + -webkit-animation-name: slideOutRight; + animation-name: slideOutRight; +} + +@-webkit-keyframes slideOutUp { + from { + -webkit-transform: translate3d(0, 0, 0); + transform: translate3d(0, 0, 0); + } + + 100% { + visibility: hidden; + -webkit-transform: translate3d(0, -100%, 0); + transform: translate3d(0, -100%, 0); + } +} + +@keyframes slideOutUp { + from { + -webkit-transform: translate3d(0, 0, 0); + transform: translate3d(0, 0, 0); + } + + 100% { + visibility: hidden; + -webkit-transform: translate3d(0, -100%, 0); + transform: translate3d(0, -100%, 0); + } +} + +.slideOutUp { + -webkit-animation-name: slideOutUp; + animation-name: slideOutUp; +} \ No newline at end of file diff --git a/assets/css/font-awesome.css b/assets/css/font-awesome.css new file mode 100644 index 00000000..331f9cbd --- /dev/null +++ b/assets/css/font-awesome.css @@ -0,0 +1,2342 @@ +/*! + * Font Awesome 4.7.0 by @davegandy - http://fontawesome.io - @fontawesome + * License - http://fontawesome.io/license (Font: SIL OFL 1.1, CSS: MIT License) + */ +/* FONT PATH + * -------------------------- */ +@font-face { + font-family: 'FontAwesome'; + src: url('../fonts/fontawesome-webfont.eot?v=4.7.0'); + src: url('../fonts/fontawesome-webfont.eot?#iefix&v=4.7.0') format('embedded-opentype'), url('../fonts/fontawesome-webfont.woff2?v=4.7.0') format('woff2'), url('../fonts/fontawesome-webfont.woff?v=4.7.0') format('woff'), url('../fonts/fontawesome-webfont.ttf?v=4.7.0') format('truetype'), url('../fonts/fontawesome-webfont.svg?v=4.7.0#fontawesomeregular') format('svg'); + font-weight: normal; + font-style: normal; +} +.fa { + display: inline-block; + font: normal normal normal 14px/1 FontAwesome; + font-size: inherit; + text-rendering: auto; + -webkit-font-smoothing: antialiased; + -moz-osx-font-smoothing: grayscale; +} +/* makes the font 33% larger relative to the icon container */ +.fa-lg { + font-size: 1.33333333em; + line-height: 0.75em; + vertical-align: -15%; +} +.fa-2x { + font-size: 2em; +} +.fa-3x { + font-size: 3em; +} +.fa-4x { + font-size: 4em; +} +.fa-5x { + font-size: 5em; +} +.fa-fw { + width: 1.28571429em; + text-align: center; +} +.fa-ul { + padding-left: 0; + margin-left: 2.14285714em; + list-style-type: none; +} +.fa-ul > li { + position: relative; +} +.fa-li { + position: absolute; + left: -2.14285714em; + width: 2.14285714em; + top: 0.14285714em; + text-align: center; +} +.fa-li.fa-lg { + left: -1.85714286em; +} +.fa-border { + padding: .2em .25em .15em; + border: solid 0.08em #eeeeee; + border-radius: .1em; +} +.fa-pull-left { + float: left; +} +.fa-pull-right { + float: right; +} +.fa.fa-pull-left { + margin-right: .3em; +} +.fa.fa-pull-right { + margin-left: .3em; +} +/* Deprecated as of 4.4.0 */ +.pull-right { + float: right; +} +.pull-left { + float: left; +} +.fa.pull-left { + margin-right: .3em; +} +.fa.pull-right { + margin-left: .3em; +} +.fa-spin { + -webkit-animation: fa-spin 2s infinite linear; + animation: fa-spin 2s infinite linear; +} +.fa-pulse { + -webkit-animation: fa-spin 1s infinite steps(8); + animation: fa-spin 1s infinite steps(8); +} +@-webkit-keyframes fa-spin { + 0% { + -webkit-transform: rotate(0deg); + transform: rotate(0deg); + } + 100% { + -webkit-transform: rotate(359deg); + transform: rotate(359deg); + } +} +@keyframes fa-spin { + 0% { + -webkit-transform: rotate(0deg); + transform: rotate(0deg); + } + 100% { + -webkit-transform: rotate(359deg); + transform: rotate(359deg); + } +} +.fa-rotate-90 { + -ms-filter: "progid:DXImageTransform.Microsoft.BasicImage(rotation=1)"; + filter: "progid:DXImageTransform.Microsoft.BasicImage(rotation=1)"; + -webkit-transform: rotate(90deg); + -ms-transform: rotate(90deg); + transform: rotate(90deg); +} +.fa-rotate-180 { + -ms-filter: "progid:DXImageTransform.Microsoft.BasicImage(rotation=2)"; + filter: "progid:DXImageTransform.Microsoft.BasicImage(rotation=2)"; + -webkit-transform: rotate(180deg); + -ms-transform: rotate(180deg); + transform: rotate(180deg); +} +.fa-rotate-270 { + -ms-filter: "progid:DXImageTransform.Microsoft.BasicImage(rotation=3)"; + filter: "progid:DXImageTransform.Microsoft.BasicImage(rotation=3)"; + -webkit-transform: rotate(270deg); + -ms-transform: rotate(270deg); + transform: rotate(270deg); +} +.fa-flip-horizontal { + -ms-filter: "progid:DXImageTransform.Microsoft.BasicImage(rotation=0, mirror=1)"; + filter: "progid:DXImageTransform.Microsoft.BasicImage(rotation=0, mirror=1)"; + -webkit-transform: scale(-1, 1); + -ms-transform: scale(-1, 1); + transform: scale(-1, 1); +} +.fa-flip-vertical { + -ms-filter: "progid:DXImageTransform.Microsoft.BasicImage(rotation=2, mirror=1)"; + filter: "progid:DXImageTransform.Microsoft.BasicImage(rotation=2, mirror=1)"; + -webkit-transform: scale(1, -1); + -ms-transform: scale(1, -1); + transform: scale(1, -1); +} +:root .fa-rotate-90, +:root .fa-rotate-180, +:root .fa-rotate-270, +:root .fa-flip-horizontal, +:root .fa-flip-vertical { + filter: none; +} +.fa-stack { + position: relative; + display: inline-block; + width: 2em; + height: 2em; + line-height: 2em; + vertical-align: middle; +} +.fa-stack-1x, +.fa-stack-2x { + position: absolute; + left: 0; + width: 100%; + text-align: center; +} +.fa-stack-1x { + line-height: inherit; +} +.fa-stack-2x { + font-size: 2em; +} +.fa-inverse { + color: #ffffff; +} +/* Font Awesome uses the Unicode Private Use Area (PUA) to ensure screen + readers do not read off random characters that represent icons */ +.fa-glass:before { + content: "\f000"; +} +.fa-music:before { + content: "\f001"; +} +.fa-search:before { + content: "\f002"; +} +.fa-envelope-o:before { + content: "\f003"; +} +.fa-heart:before { + content: "\f004"; +} +.fa-star:before { + content: "\f005"; +} +.fa-star-o:before { + content: "\f006"; +} +.fa-user:before { + content: "\f007"; +} +.fa-film:before { + content: "\f008"; +} +.fa-th-large:before { + content: "\f009"; +} +.fa-th:before { + content: "\f00a"; +} +.fa-th-list:before { + content: "\f00b"; +} +.fa-check:before { + content: "\f00c"; +} +.fa-remove:before, +.fa-close:before, +.fa-times:before { + content: "\f00d"; +} +.fa-search-plus:before { + content: "\f00e"; +} +.fa-search-minus:before { + content: "\f010"; +} +.fa-power-off:before { + content: "\f011"; +} +.fa-signal:before { + content: "\f012"; +} +.fa-gear:before, +.fa-cog:before { + content: "\f013"; +} +.fa-trash-o:before { + content: "\f014"; +} +.fa-home:before { + content: "\f015"; +} +.fa-file-o:before { + content: "\f016"; +} +.fa-clock-o:before { + content: "\f017"; +} +.fa-road:before { + content: "\f018"; +} +.fa-download:before { + content: "\f019"; +} +.fa-arrow-circle-o-down:before { + content: "\f01a"; +} +.fa-arrow-circle-o-up:before { + content: "\f01b"; +} +.fa-inbox:before { + content: "\f01c"; +} +.fa-play-circle-o:before { + content: "\f01d"; +} +.fa-rotate-right:before, +.fa-repeat:before { + content: "\f01e"; +} +.fa-refresh:before { + content: "\f021"; +} +.fa-list-alt:before { + content: "\f022"; +} +.fa-lock:before { + content: "\f023"; +} +.fa-flag:before { + content: "\f024"; +} +.fa-headphones:before { + content: "\f025"; +} +.fa-volume-off:before { + content: "\f026"; +} +.fa-volume-down:before { + content: "\f027"; +} +.fa-volume-up:before { + content: "\f028"; +} +.fa-qrcode:before { + content: "\f029"; +} +.fa-barcode:before { + content: "\f02a"; +} +.fa-tag:before { + content: "\f02b"; +} +.fa-tags:before { + content: "\f02c"; +} +.fa-book:before { + content: "\f02d"; +} +.fa-bookmark:before { + content: "\f02e"; +} +.fa-print:before { + content: "\f02f"; +} +.fa-camera:before { + content: "\f030"; +} +.fa-font:before { + content: "\f031"; +} +.fa-bold:before { + content: "\f032"; +} +.fa-italic:before { + content: "\f033"; +} +.fa-text-height:before { + content: "\f034"; +} +.fa-text-width:before { + content: "\f035"; +} +.fa-align-left:before { + content: "\f036"; +} +.fa-align-center:before { + content: "\f037"; +} +.fa-align-right:before { + content: "\f038"; +} +.fa-align-justify:before { + content: "\f039"; +} +.fa-list:before { + content: "\f03a"; +} +.fa-dedent:before, +.fa-outdent:before { + content: "\f03b"; +} +.fa-indent:before { + content: "\f03c"; +} +.fa-video-camera:before { + content: "\f03d"; +} +.fa-photo:before, +.fa-image:before, +.fa-picture-o:before { + content: "\f03e"; +} +.fa-pencil:before { + content: "\f040"; +} +.fa-map-marker:before { + content: "\f041"; +} +.fa-adjust:before { + content: "\f042"; +} +.fa-tint:before { + content: "\f043"; +} +.fa-edit:before, +.fa-pencil-square-o:before { + content: "\f044"; +} +.fa-share-square-o:before { + content: "\f045"; +} +.fa-check-square-o:before { + content: "\f046"; +} +.fa-arrows:before { + content: "\f047"; +} +.fa-step-backward:before { + content: "\f048"; +} +.fa-fast-backward:before { + content: "\f049"; +} +.fa-backward:before { + content: "\f04a"; +} +.fa-play:before { + content: "\f04b"; +} +.fa-pause:before { + content: "\f04c"; +} +.fa-stop:before { + content: "\f04d"; +} +.fa-forward:before { + content: "\f04e"; +} +.fa-fast-forward:before { + content: "\f050"; +} +.fa-step-forward:before { + content: "\f051"; +} +.fa-eject:before { + content: "\f052"; +} +.fa-chevron-left:before { + content: "\f053"; +} +.fa-chevron-right:before { + content: "\f054"; +} +.fa-plus-circle:before { + content: "\f055"; +} +.fa-minus-circle:before { + content: "\f056"; +} +.fa-times-circle:before { + content: "\f057"; +} +.fa-check-circle:before { + content: "\f058"; +} +.fa-question-circle:before { + content: "\f059"; +} +.fa-info-circle:before { + content: "\f05a"; +} +.fa-crosshairs:before { + content: "\f05b"; +} +.fa-times-circle-o:before { + content: "\f05c"; +} +.fa-check-circle-o:before { + content: "\f05d"; +} +.fa-ban:before { + content: "\f05e"; +} +.fa-arrow-left:before { + content: "\f060"; +} +.fa-arrow-right:before { + content: "\f061"; +} +.fa-arrow-up:before { + content: "\f062"; +} +.fa-arrow-down:before { + content: "\f063"; +} +.fa-mail-forward:before, +.fa-share:before { + content: "\f064"; +} +.fa-expand:before { + content: "\f065"; +} +.fa-compress:before { + content: "\f066"; +} +.fa-plus:before { + content: "\f067"; +} +.fa-minus:before { + content: "\f068"; +} +.fa-asterisk:before { + content: "\f069"; +} +.fa-exclamation-circle:before { + content: "\f06a"; +} +.fa-gift:before { + content: "\f06b"; +} +.fa-leaf:before { + content: "\f06c"; +} +.fa-fire:before { + content: "\f06d"; +} +.fa-eye:before { + content: "\f06e"; +} +.fa-eye-slash:before { + content: "\f070"; +} +.fa-warning:before, +.fa-exclamation-triangle:before { + content: "\f071"; +} +.fa-plane:before { + content: "\f072"; +} +.fa-calendar:before { + content: "\f073"; +} +.fa-random:before { + content: "\f074"; +} +.fa-comment:before { + content: "\f075"; +} +.fa-magnet:before { + content: "\f076"; +} +.fa-chevron-up:before { + content: "\f077"; +} +.fa-chevron-down:before { + content: "\f078"; +} +.fa-retweet:before { + content: "\f079"; +} +.fa-shopping-cart:before { + content: "\f07a"; +} +.fa-folder:before { + content: "\f07b"; +} +.fa-folder-open:before { + content: "\f07c"; +} +.fa-arrows-v:before { + content: "\f07d"; +} +.fa-arrows-h:before { + content: "\f07e"; +} +.fa-bar-chart-o:before, +.fa-bar-chart:before { + content: "\f080"; +} +.fa-twitter-square:before { + content: "\f081"; +} +.fa-facebook-square:before { + content: "\f082"; +} +.fa-camera-retro:before { + content: "\f083"; +} +.fa-key:before { + content: "\f084"; +} +.fa-gears:before, +.fa-cogs:before { + content: "\f085"; +} +.fa-comments:before { + content: "\f086"; +} +.fa-thumbs-o-up:before { + content: "\f087"; +} +.fa-thumbs-o-down:before { + content: "\f088"; +} +.fa-star-half:before { + content: "\f089"; +} +.fa-heart-o:before { + content: "\f08a"; +} +.fa-sign-out:before { + content: "\f08b"; +} +.fa-linkedin-square:before { + content: "\f08c"; +} +.fa-thumb-tack:before { + content: "\f08d"; +} +.fa-external-link:before { + content: "\f08e"; +} +.fa-sign-in:before { + content: "\f090"; +} +.fa-trophy:before { + content: "\f091"; +} +.fa-github-square:before { + content: "\f092"; +} +.fa-upload:before { + content: "\f093"; +} +.fa-lemon-o:before { + content: "\f094"; +} +.fa-phone:before { + content: "\f095"; +} +.fa-square-o:before { + content: "\f096"; +} +.fa-bookmark-o:before { + content: "\f097"; +} +.fa-phone-square:before { + content: "\f098"; +} +.fa-twitter:before { + content: "\f099"; +} +.fa-facebook-f:before, +.fa-facebook:before { + content: "\f09a"; +} +.fa-github:before { + content: "\f09b"; +} +.fa-unlock:before { + content: "\f09c"; +} +.fa-credit-card:before { + content: "\f09d"; +} +.fa-feed:before, +.fa-rss:before { + content: "\f09e"; +} +.fa-hdd-o:before { + content: "\f0a0"; +} +.fa-bullhorn:before { + content: "\f0a1"; +} +.fa-bell:before { + content: "\f0f3"; +} +.fa-certificate:before { + content: "\f0a3"; +} +.fa-hand-o-right:before { + content: "\f0a4"; +} +.fa-hand-o-left:before { + content: "\f0a5"; +} +.fa-hand-o-up:before { + content: "\f0a6"; +} +.fa-hand-o-down:before { + content: "\f0a7"; +} +.fa-arrow-circle-left:before { + content: "\f0a8"; +} +.fa-arrow-circle-right:before { + content: "\f0a9"; +} +.fa-arrow-circle-up:before { + content: "\f0aa"; +} +.fa-arrow-circle-down:before { + content: "\f0ab"; +} +.fa-globe:before { + content: "\f0ac"; +} +.fa-wrench:before { + content: "\f0ad"; +} +.fa-tasks:before { + content: "\f0ae"; +} +.fa-filter:before { + content: "\f0b0"; +} +.fa-briefcase:before { + content: "\f0b1"; +} +.fa-arrows-alt:before { + content: "\f0b2"; +} +.fa-group:before, +.fa-users:before { + content: "\f0c0"; +} +.fa-chain:before, +.fa-link:before { + content: "\f0c1"; +} +.fa-cloud:before { + content: "\f0c2"; +} +.fa-flask:before { + content: "\f0c3"; +} +.fa-cut:before, +.fa-scissors:before { + content: "\f0c4"; +} +.fa-copy:before, +.fa-files-o:before { + content: "\f0c5"; +} +.fa-paperclip:before { + content: "\f0c6"; +} +.fa-save:before, +.fa-floppy-o:before { + content: "\f0c7"; +} +.fa-square:before { + content: "\f0c8"; +} +.fa-navicon:before, +.fa-reorder:before, +.fa-bars:before { + content: "\f0c9"; +} +.fa-list-ul:before { + content: "\f0ca"; +} +.fa-list-ol:before { + content: "\f0cb"; +} +.fa-strikethrough:before { + content: "\f0cc"; +} +.fa-underline:before { + content: "\f0cd"; +} +.fa-table:before { + content: "\f0ce"; +} +.fa-magic:before { + content: "\f0d0"; +} +.fa-truck:before { + content: "\f0d1"; +} +.fa-pinterest:before { + content: "\f0d2"; +} +.fa-pinterest-square:before { + content: "\f0d3"; +} +.fa-google-plus-square:before { + content: "\f0d4"; +} +.fa-google-plus:before { + content: "\f0d5"; +} +.fa-money:before { + content: "\f0d6"; +} +.fa-caret-down:before { + content: "\f0d7"; +} +.fa-caret-up:before { + content: "\f0d8"; +} +.fa-caret-left:before { + content: "\f0d9"; +} +.fa-caret-right:before { + content: "\f0da"; +} +.fa-columns:before { + content: "\f0db"; +} +.fa-unsorted:before, +.fa-sort:before { + content: "\f0dc"; +} +.fa-sort-down:before, +.fa-sort-desc:before { + content: "\f0dd"; +} +.fa-sort-up:before, +.fa-sort-asc:before { + content: "\f0de"; +} +.fa-envelope:before { + content: "\f0e0"; +} +.fa-linkedin:before { + content: "\f0e1"; +} +.fa-rotate-left:before, +.fa-undo:before { + content: "\f0e2"; +} +.fa-legal:before, +.fa-gavel:before { + content: "\f0e3"; +} +.fa-dashboard:before, +.fa-tachometer:before { + content: "\f0e4"; +} +.fa-comment-o:before { + content: "\f0e5"; +} +.fa-comments-o:before { + content: "\f0e6"; +} +.fa-flash:before, +.fa-bolt:before { + content: "\f0e7"; +} +.fa-sitemap:before { + content: "\f0e8"; +} +.fa-umbrella:before { + content: "\f0e9"; +} +.fa-paste:before, +.fa-clipboard:before { + content: "\f0ea"; +} +.fa-lightbulb-o:before { + content: "\f0eb"; +} +.fa-exchange:before { + content: "\f0ec"; +} +.fa-cloud-download:before { + content: "\f0ed"; +} +.fa-cloud-upload:before { + content: "\f0ee"; +} +.fa-user-md:before { + content: "\f0f0"; +} +.fa-stethoscope:before { + content: "\f0f1"; +} +.fa-suitcase:before { + content: "\f0f2"; +} +.fa-bell-o:before { + content: "\f0a2"; +} +.fa-coffee:before { + content: "\f0f4"; +} +.fa-cutlery:before { + content: "\f0f5"; +} +.fa-file-text-o:before { + content: "\f0f6"; +} +.fa-building-o:before { + content: "\f0f7"; +} +.fa-hospital-o:before { + content: "\f0f8"; +} +.fa-ambulance:before { + content: "\f0f9"; +} +.fa-medkit:before { + content: "\f0fa"; +} +.fa-fighter-jet:before { + content: "\f0fb"; +} +.fa-beer:before { + content: "\f0fc"; +} +.fa-h-square:before { + content: "\f0fd"; +} +.fa-plus-square:before { + content: "\f0fe"; +} +.fa-angle-double-left:before { + content: "\f100"; +} +.fa-angle-double-right:before { + content: "\f101"; +} +.fa-angle-double-up:before { + content: "\f102"; +} +.fa-angle-double-down:before { + content: "\f103"; +} +.fa-angle-left:before { + content: "\f104"; +} +.fa-angle-right:before { + content: "\f105"; +} +.fa-angle-up:before { + content: "\f106"; +} +.fa-angle-down:before { + content: "\f107"; +} +.fa-desktop:before { + content: "\f108"; +} +.fa-laptop:before { + content: "\f109"; +} +.fa-tablet:before { + content: "\f10a"; +} +.fa-mobile-phone:before, +.fa-mobile:before { + content: "\f10b"; +} +.fa-circle-o:before { + content: "\f10c"; +} +.fa-quote-left:before { + content: "\f10d"; +} +.fa-quote-right:before { + content: "\f10e"; +} +.fa-spinner:before { + content: "\f110"; +} +.fa-circle:before { + content: "\f111"; +} +.fa-mail-reply:before, +.fa-reply:before { + content: "\f112"; +} +.fa-github-alt:before { + content: "\f113"; +} +.fa-folder-o:before { + content: "\f114"; +} +.fa-folder-open-o:before { + content: "\f115"; +} +.fa-smile-o:before { + content: "\f118"; +} +.fa-frown-o:before { + content: "\f119"; +} +.fa-meh-o:before { + content: "\f11a"; +} +.fa-gamepad:before { + content: "\f11b"; +} +.fa-keyboard-o:before { + content: "\f11c"; +} +.fa-flag-o:before { + content: "\f11d"; +} +.fa-flag-checkered:before { + content: "\f11e"; +} +.fa-terminal:before { + content: "\f120"; +} +.fa-code:before { + content: "\f121"; +} +.fa-mail-reply-all:before, +.fa-reply-all:before { + content: "\f122"; +} +.fa-star-half-empty:before, +.fa-star-half-full:before, +.fa-star-half-o:before { + content: "\f123"; +} +.fa-location-arrow:before { + content: "\f124"; +} +.fa-crop:before { + content: "\f125"; +} +.fa-code-fork:before { + content: "\f126"; +} +.fa-unlink:before, +.fa-chain-broken:before { + content: "\f127"; +} +.fa-question:before { + content: "\f128"; +} +.fa-info:before { + content: "\f129"; +} +.fa-exclamation:before { + content: "\f12a"; +} +.fa-superscript:before { + content: "\f12b"; +} +.fa-subscript:before { + content: "\f12c"; +} +.fa-eraser:before { + content: "\f12d"; +} +.fa-puzzle-piece:before { + content: "\f12e"; +} +.fa-microphone:before { + content: "\f130"; +} +.fa-microphone-slash:before { + content: "\f131"; +} +.fa-shield:before { + content: "\f132"; +} +.fa-calendar-o:before { + content: "\f133"; +} +.fa-fire-extinguisher:before { + content: "\f134"; +} +.fa-rocket:before { + content: "\f135"; +} +.fa-maxcdn:before { + content: "\f136"; +} +.fa-chevron-circle-left:before { + content: "\f137"; +} +.fa-chevron-circle-right:before { + content: "\f138"; +} +.fa-chevron-circle-up:before { + content: "\f139"; +} +.fa-chevron-circle-down:before { + content: "\f13a"; +} +.fa-html5:before { + content: "\f13b"; +} +.fa-css3:before { + content: "\f13c"; +} +.fa-anchor:before { + content: "\f13d"; +} +.fa-unlock-alt:before { + content: "\f13e"; +} +.fa-bullseye:before { + content: "\f140"; +} +.fa-ellipsis-h:before { + content: "\f141"; +} +.fa-ellipsis-v:before { + content: "\f142"; +} +.fa-rss-square:before { + content: "\f143"; +} +.fa-play-circle:before { + content: "\f144"; +} +.fa-ticket:before { + content: "\f145"; +} +.fa-minus-square:before { + content: "\f146"; +} +.fa-minus-square-o:before { + content: "\f147"; +} +.fa-level-up:before { + content: "\f148"; +} +.fa-level-down:before { + content: "\f149"; +} +.fa-check-square:before { + content: "\f14a"; +} +.fa-pencil-square:before { + content: "\f14b"; +} +.fa-external-link-square:before { + content: "\f14c"; +} +.fa-share-square:before { + content: "\f14d"; +} +.fa-compass:before { + content: "\f14e"; +} +.fa-toggle-down:before, +.fa-caret-square-o-down:before { + content: "\f150"; +} +.fa-toggle-up:before, +.fa-caret-square-o-up:before { + content: "\f151"; +} +.fa-toggle-right:before, +.fa-caret-square-o-right:before { + content: "\f152"; +} +.fa-euro:before, +.fa-eur:before { + content: "\f153"; +} +.fa-gbp:before { + content: "\f154"; +} +.fa-dollar:before, +.fa-usd:before { + content: "\f155"; +} +.fa-rupee:before, +.fa-inr:before { + content: "\f156"; +} +.fa-cny:before, +.fa-rmb:before, +.fa-yen:before, +.fa-jpy:before { + content: "\f157"; +} +.fa-ruble:before, +.fa-rouble:before, +.fa-rub:before { + content: "\f158"; +} +.fa-won:before, +.fa-krw:before { + content: "\f159"; +} +.fa-bitcoin:before, +.fa-btc:before { + content: "\f15a"; +} +.fa-file:before { + content: "\f15b"; +} +.fa-file-text:before { + content: "\f15c"; +} +.fa-sort-alpha-asc:before { + content: "\f15d"; +} +.fa-sort-alpha-desc:before { + content: "\f15e"; +} +.fa-sort-amount-asc:before { + content: "\f160"; +} +.fa-sort-amount-desc:before { + content: "\f161"; +} +.fa-sort-numeric-asc:before { + content: "\f162"; +} +.fa-sort-numeric-desc:before { + content: "\f163"; +} +.fa-thumbs-up:before { + content: "\f164"; +} +.fa-thumbs-down:before { + content: "\f165"; +} +.fa-youtube-square:before { + content: "\f166"; +} +.fa-youtube:before { + content: "\f167"; +} +.fa-xing:before { + content: "\f168"; +} +.fa-xing-square:before { + content: "\f169"; +} +.fa-youtube-play:before { + content: "\f16a"; +} +.fa-dropbox:before { + content: "\f16b"; +} +.fa-stack-overflow:before { + content: "\f16c"; +} +.fa-instagram:before { + content: "\f16d"; +} +.fa-flickr:before { + content: "\f16e"; +} +.fa-adn:before { + content: "\f170"; +} +.fa-bitbucket:before { + content: "\f171"; +} +.fa-bitbucket-square:before { + content: "\f172"; +} +.fa-tumblr:before { + content: "\f173"; +} +.fa-tumblr-square:before { + content: "\f174"; +} +.fa-long-arrow-down:before { + content: "\f175"; +} +.fa-long-arrow-up:before { + content: "\f176"; +} +.fa-long-arrow-left:before { + content: "\f177"; +} +.fa-long-arrow-right:before { + content: "\f178"; +} +.fa-apple:before { + content: "\f179"; +} +.fa-windows:before { + content: "\f17a"; +} +.fa-android:before { + content: "\f17b"; +} +.fa-linux:before { + content: "\f17c"; +} +.fa-dribbble:before { + content: "\f17d"; +} +.fa-skype:before { + content: "\f17e"; +} +.fa-foursquare:before { + content: "\f180"; +} +.fa-trello:before { + content: "\f181"; +} +.fa-female:before { + content: "\f182"; +} +.fa-male:before { + content: "\f183"; +} +.fa-gittip:before, +.fa-gratipay:before { + content: "\f184"; +} +.fa-sun-o:before { + content: "\f185"; +} +.fa-moon-o:before { + content: "\f186"; +} +.fa-archive:before { + content: "\f187"; +} +.fa-bug:before { + content: "\f188"; +} +.fa-vk:before { + content: "\f189"; +} +.fa-weibo:before { + content: "\f18a"; +} +.fa-renren:before { + content: "\f18b"; +} +.fa-pagelines:before { + content: "\f18c"; +} +.fa-stack-exchange:before { + content: "\f18d"; +} +.fa-arrow-circle-o-right:before { + content: "\f18e"; +} +.fa-arrow-circle-o-left:before { + content: "\f190"; +} +.fa-toggle-left:before, +.fa-caret-square-o-left:before { + content: "\f191"; +} +.fa-dot-circle-o:before { + content: "\f192"; +} +.fa-wheelchair:before { + content: "\f193"; +} +.fa-vimeo-square:before { + content: "\f194"; +} +.fa-turkish-lira:before, +.fa-try:before { + content: "\f195"; +} +.fa-plus-square-o:before { + content: "\f196"; +} +.fa-space-shuttle:before { + content: "\f197"; +} +.fa-slack:before { + content: "\f198"; +} +.fa-envelope-square:before { + content: "\f199"; +} +.fa-wordpress:before { + content: "\f19a"; +} +.fa-openid:before { + content: "\f19b"; +} +.fa-institution:before, +.fa-bank:before, +.fa-university:before { + content: "\f19c"; +} +.fa-mortar-board:before, +.fa-graduation-cap:before { + content: "\f19d"; +} +.fa-yahoo:before { + content: "\f19e"; +} +.fa-google:before { + content: "\f1a0"; +} +.fa-reddit:before { + content: "\f1a1"; +} +.fa-reddit-square:before { + content: "\f1a2"; +} +.fa-stumbleupon-circle:before { + content: "\f1a3"; +} +.fa-stumbleupon:before { + content: "\f1a4"; +} +.fa-delicious:before { + content: "\f1a5"; +} +.fa-digg:before { + content: "\f1a6"; +} +.fa-pied-piper-pp:before { + content: "\f1a7"; +} +.fa-pied-piper-alt:before { + content: "\f1a8"; +} +.fa-drupal:before { + content: "\f1a9"; +} +.fa-joomla:before { + content: "\f1aa"; +} +.fa-language:before { + content: "\f1ab"; +} +.fa-fax:before { + content: "\f1ac"; +} +.fa-building:before { + content: "\f1ad"; +} +.fa-child:before { + content: "\f1ae"; +} +.fa-paw:before { + content: "\f1b0"; +} +.fa-spoon:before { + content: "\f1b1"; +} +.fa-cube:before { + content: "\f1b2"; +} +.fa-cubes:before { + content: "\f1b3"; +} +.fa-behance:before { + content: "\f1b4"; +} +.fa-behance-square:before { + content: "\f1b5"; +} +.fa-steam:before { + content: "\f1b6"; +} +.fa-steam-square:before { + content: "\f1b7"; +} +.fa-recycle:before { + content: "\f1b8"; +} +.fa-automobile:before, +.fa-car:before { + content: "\f1b9"; +} +.fa-cab:before, +.fa-taxi:before { + content: "\f1ba"; +} +.fa-tree:before { + content: "\f1bb"; +} +.fa-spotify:before { + content: "\f1bc"; +} +.fa-deviantart:before { + content: "\f1bd"; +} +.fa-soundcloud:before { + content: "\f1be"; +} +.fa-database:before { + content: "\f1c0"; +} +.fa-file-pdf-o:before { + content: "\f1c1"; +} +.fa-file-word-o:before { + content: "\f1c2"; +} +.fa-file-excel-o:before { + content: "\f1c3"; +} +.fa-file-powerpoint-o:before { + content: "\f1c4"; +} +.fa-file-photo-o:before, +.fa-file-picture-o:before, +.fa-file-image-o:before { + content: "\f1c5"; +} +.fa-file-zip-o:before, +.fa-file-archive-o:before { + content: "\f1c6"; +} +.fa-file-sound-o:before, +.fa-file-audio-o:before { + content: "\f1c7"; +} +.fa-file-movie-o:before, +.fa-file-video-o:before { + content: "\f1c8"; +} +.fa-file-code-o:before { + content: "\f1c9"; +} +.fa-vine:before { + content: "\f1ca"; +} +.fa-codepen:before { + content: "\f1cb"; +} +.fa-jsfiddle:before { + content: "\f1cc"; +} +.fa-life-bouy:before, +.fa-life-buoy:before, +.fa-life-saver:before, +.fa-support:before, +.fa-life-ring:before { + content: "\f1cd"; +} +.fa-circle-o-notch:before { + content: "\f1ce"; +} +.fa-ra:before, +.fa-resistance:before, +.fa-rebel:before { + content: "\f1d0"; +} +.fa-ge:before, +.fa-empire:before { + content: "\f1d1"; +} +.fa-git-square:before { + content: "\f1d2"; +} +.fa-git:before { + content: "\f1d3"; +} +.fa-y-combinator-square:before, +.fa-yc-square:before, +.fa-hacker-news:before { + content: "\f1d4"; +} +.fa-tencent-weibo:before { + content: "\f1d5"; +} +.fa-qq:before { + content: "\f1d6"; +} +.fa-wechat:before, +.fa-weixin:before { + content: "\f1d7"; +} +.fa-send:before, +.fa-paper-plane:before { + content: "\f1d8"; +} +.fa-send-o:before, +.fa-paper-plane-o:before { + content: "\f1d9"; +} +.fa-history:before { + content: "\f1da"; +} +.fa-circle-thin:before { + content: "\f1db"; +} +.fa-header:before { + content: "\f1dc"; +} +.fa-paragraph:before { + content: "\f1dd"; +} +.fa-sliders:before { + content: "\f1de"; +} +.fa-share-alt:before { + content: "\f1e0"; +} +.fa-share-alt-square:before { + content: "\f1e1"; +} +.fa-bomb:before { + content: "\f1e2"; +} +.fa-soccer-ball-o:before, +.fa-futbol-o:before { + content: "\f1e3"; +} +.fa-tty:before { + content: "\f1e4"; +} +.fa-binoculars:before { + content: "\f1e5"; +} +.fa-plug:before { + content: "\f1e6"; +} +.fa-slideshare:before { + content: "\f1e7"; +} +.fa-twitch:before { + content: "\f1e8"; +} +.fa-yelp:before { + content: "\f1e9"; +} +.fa-newspaper-o:before { + content: "\f1ea"; +} +.fa-wifi:before { + content: "\f1eb"; +} +.fa-calculator:before { + content: "\f1ec"; +} +.fa-paypal:before { + content: "\f1ed"; +} +.fa-google-wallet:before { + content: "\f1ee"; +} +.fa-cc-visa:before { + content: "\f1f0"; +} +.fa-cc-mastercard:before { + content: "\f1f1"; +} +.fa-cc-discover:before { + content: "\f1f2"; +} +.fa-cc-amex:before { + content: "\f1f3"; +} +.fa-cc-paypal:before { + content: "\f1f4"; +} +.fa-cc-stripe:before { + content: "\f1f5"; +} +.fa-bell-slash:before { + content: "\f1f6"; +} +.fa-bell-slash-o:before { + content: "\f1f7"; +} +.fa-trash:before { + content: "\f1f8"; +} +.fa-copyright:before { + content: "\f1f9"; +} +.fa-at:before { + content: "\f1fa"; +} +.fa-eyedropper:before { + content: "\f1fb"; +} +.fa-paint-brush:before { + content: "\f1fc"; +} +.fa-birthday-cake:before { + content: "\f1fd"; +} +.fa-area-chart:before { + content: "\f1fe"; +} +.fa-pie-chart:before { + content: "\f200"; +} +.fa-line-chart:before { + content: "\f201"; +} +.fa-lastfm:before { + content: "\f202"; +} +.fa-lastfm-square:before { + content: "\f203"; +} +.fa-toggle-off:before { + content: "\f204"; +} +.fa-toggle-on:before { + content: "\f205"; +} +.fa-bicycle:before { + content: "\f206"; +} +.fa-bus:before { + content: "\f207"; +} +.fa-ioxhost:before { + content: "\f208"; +} +.fa-angellist:before { + content: "\f209"; +} +.fa-cc:before { + content: "\f20a"; +} +.fa-shekel:before, +.fa-sheqel:before, +.fa-ils:before { + content: "\f20b"; +} +.fa-meanpath:before { + content: "\f20c"; +} +.fa-buysellads:before { + content: "\f20d"; +} +.fa-connectdevelop:before { + content: "\f20e"; +} +.fa-dashcube:before { + content: "\f210"; +} +.fa-forumbee:before { + content: "\f211"; +} +.fa-leanpub:before { + content: "\f212"; +} +.fa-sellsy:before { + content: "\f213"; +} +.fa-shirtsinbulk:before { + content: "\f214"; +} +.fa-simplybuilt:before { + content: "\f215"; +} +.fa-skyatlas:before { + content: "\f216"; +} +.fa-cart-plus:before { + content: "\f217"; +} +.fa-cart-arrow-down:before { + content: "\f218"; +} +.fa-diamond:before { + content: "\f219"; +} +.fa-ship:before { + content: "\f21a"; +} +.fa-user-secret:before { + content: "\f21b"; +} +.fa-motorcycle:before { + content: "\f21c"; +} +.fa-street-view:before { + content: "\f21d"; +} +.fa-heartbeat:before { + content: "\f21e"; +} +.fa-venus:before { + content: "\f221"; +} +.fa-mars:before { + content: "\f222"; +} +.fa-mercury:before { + content: "\f223"; +} +.fa-intersex:before, +.fa-transgender:before { + content: "\f224"; +} +.fa-transgender-alt:before { + content: "\f225"; +} +.fa-venus-double:before { + content: "\f226"; +} +.fa-mars-double:before { + content: "\f227"; +} +.fa-venus-mars:before { + content: "\f228"; +} +.fa-mars-stroke:before { + content: "\f229"; +} +.fa-mars-stroke-v:before { + content: "\f22a"; +} +.fa-mars-stroke-h:before { + content: "\f22b"; +} +.fa-neuter:before { + content: "\f22c"; +} +.fa-genderless:before { + content: "\f22d"; +} +.fa-facebook-official:before { + content: "\f230"; +} +.fa-pinterest-p:before { + content: "\f231"; +} +.fa-whatsapp:before { + content: "\f232"; +} +.fa-server:before { + content: "\f233"; +} +.fa-user-plus:before { + content: "\f234"; +} +.fa-user-times:before { + content: "\f235"; +} +.fa-hotel:before, +.fa-bed:before { + content: "\f236"; +} +.fa-viacoin:before { + content: "\f237"; +} +.fa-train:before { + content: "\f238"; +} +.fa-subway:before { + content: "\f239"; +} +.fa-medium:before { + content: "\f23a"; +} +.fa-yc:before, +.fa-y-combinator:before { + content: "\f23b"; +} +.fa-optin-monster:before { + content: "\f23c"; +} +.fa-opencart:before { + content: "\f23d"; +} +.fa-expeditedssl:before { + content: "\f23e"; +} +.fa-battery-4:before, +.fa-battery:before, +.fa-battery-full:before { + content: "\f240"; +} +.fa-battery-3:before, +.fa-battery-three-quarters:before { + content: "\f241"; +} +.fa-battery-2:before, +.fa-battery-half:before { + content: "\f242"; +} +.fa-battery-1:before, +.fa-battery-quarter:before { + content: "\f243"; +} +.fa-battery-0:before, +.fa-battery-empty:before { + content: "\f244"; +} +.fa-mouse-pointer:before { + content: "\f245"; +} +.fa-i-cursor:before { + content: "\f246"; +} +.fa-object-group:before { + content: "\f247"; +} +.fa-object-ungroup:before { + content: "\f248"; +} +.fa-sticky-note:before { + content: "\f249"; +} +.fa-sticky-note-o:before { + content: "\f24a"; +} +.fa-cc-jcb:before { + content: "\f24b"; +} +.fa-cc-diners-club:before { + content: "\f24c"; +} +.fa-clone:before { + content: "\f24d"; +} +.fa-balance-scale:before { + content: "\f24e"; +} +.fa-hourglass-o:before { + content: "\f250"; +} +.fa-hourglass-1:before, +.fa-hourglass-start:before { + content: "\f251"; +} +.fa-hourglass-2:before, +.fa-hourglass-half:before { + content: "\f252"; +} +.fa-hourglass-3:before, +.fa-hourglass-end:before { + content: "\f253"; +} +.fa-hourglass:before { + content: "\f254"; +} +.fa-hand-grab-o:before, +.fa-hand-rock-o:before { + content: "\f255"; +} +.fa-hand-stop-o:before, +.fa-hand-paper-o:before { + content: "\f256"; +} +.fa-hand-scissors-o:before { + content: "\f257"; +} +.fa-hand-lizard-o:before { + content: "\f258"; +} +.fa-hand-spock-o:before { + content: "\f259"; +} +.fa-hand-pointer-o:before { + content: "\f25a"; +} +.fa-hand-peace-o:before { + content: "\f25b"; +} +.fa-trademark:before { + content: "\f25c"; +} +.fa-registered:before { + content: "\f25d"; +} +.fa-creative-commons:before { + content: "\f25e"; +} +.fa-gg:before { + content: "\f260"; +} +.fa-gg-circle:before { + content: "\f261"; +} +.fa-tripadvisor:before { + content: "\f262"; +} +.fa-odnoklassniki:before { + content: "\f263"; +} +.fa-odnoklassniki-square:before { + content: "\f264"; +} +.fa-get-pocket:before { + content: "\f265"; +} +.fa-wikipedia-w:before { + content: "\f266"; +} +.fa-safari:before { + content: "\f267"; +} +.fa-chrome:before { + content: "\f268"; +} +.fa-firefox:before { + content: "\f269"; +} +.fa-opera:before { + content: "\f26a"; +} +.fa-internet-explorer:before { + content: "\f26b"; +} +.fa-tv:before, +.fa-television:before { + content: "\f26c"; +} +.fa-contao:before { + content: "\f26d"; +} +.fa-500px:before { + content: "\f26e"; +} +.fa-amazon:before { + content: "\f270"; +} +.fa-calendar-plus-o:before { + content: "\f271"; +} +.fa-calendar-minus-o:before { + content: "\f272"; +} +.fa-calendar-times-o:before { + content: "\f273"; +} +.fa-calendar-check-o:before { + content: "\f274"; +} +.fa-industry:before { + content: "\f275"; +} +.fa-map-pin:before { + content: "\f276"; +} +.fa-map-signs:before { + content: "\f277"; +} +.fa-map-o:before { + content: "\f278"; +} +.fa-map:before { + content: "\f279"; +} +.fa-commenting:before { + content: "\f27a"; +} +.fa-commenting-o:before { + content: "\f27b"; +} +.fa-houzz:before { + content: "\f27c"; +} +.fa-vimeo:before { + content: "\f27d"; +} +.fa-black-tie:before { + content: "\f27e"; +} +.fa-fonticons:before { + content: "\f280"; +} +.fa-reddit-alien:before { + content: "\f281"; +} +.fa-edge:before { + content: "\f282"; +} +.fa-credit-card-alt:before { + content: "\f283"; +} +.fa-codiepie:before { + content: "\f284"; +} +.fa-modx:before { + content: "\f285"; +} +.fa-fort-awesome:before { + content: "\f286"; +} +.fa-usb:before { + content: "\f287"; +} +.fa-product-hunt:before { + content: "\f288"; +} +.fa-mixcloud:before { + content: "\f289"; +} +.fa-scribd:before { + content: "\f28a"; +} +.fa-pause-circle:before { + content: "\f28b"; +} +.fa-pause-circle-o:before { + content: "\f28c"; +} +.fa-stop-circle:before { + content: "\f28d"; +} +.fa-stop-circle-o:before { + content: "\f28e"; +} +.fa-shopping-bag:before { + content: "\f290"; +} +.fa-shopping-basket:before { + content: "\f291"; +} +.fa-hashtag:before { + content: "\f292"; +} +.fa-bluetooth:before { + content: "\f293"; +} +.fa-bluetooth-b:before { + content: "\f294"; +} +.fa-percent:before { + content: "\f295"; +} +.fa-gitlab:before { + content: "\f296"; +} +.fa-wpbeginner:before { + content: "\f297"; +} +.fa-wpforms:before { + content: "\f298"; +} +.fa-envira:before { + content: "\f299"; +} +.fa-universal-access:before { + content: "\f29a"; +} +.fa-wheelchair-alt:before { + content: "\f29b"; +} +.fa-question-circle-o:before { + content: "\f29c"; +} +.fa-blind:before { + content: "\f29d"; +} +.fa-audio-description:before { + content: "\f29e"; +} +.fa-volume-control-phone:before { + content: "\f2a0"; +} +.fa-braille:before { + content: "\f2a1"; +} +.fa-assistive-listening-systems:before { + content: "\f2a2"; +} +.fa-asl-interpreting:before, +.fa-american-sign-language-interpreting:before { + content: "\f2a3"; +} +.fa-deafness:before, +.fa-hard-of-hearing:before, +.fa-deaf:before { + content: "\f2a4"; +} +.fa-glide:before { + content: "\f2a5"; +} +.fa-glide-g:before { + content: "\f2a6"; +} +.fa-signing:before, +.fa-sign-language:before { + content: "\f2a7"; +} +.fa-low-vision:before { + content: "\f2a8"; +} +.fa-viadeo:before { + content: "\f2a9"; +} +.fa-viadeo-square:before { + content: "\f2aa"; +} +.fa-snapchat:before { + content: "\f2ab"; +} +.fa-snapchat-ghost:before { + content: "\f2ac"; +} +.fa-snapchat-square:before { + content: "\f2ad"; +} +.fa-pied-piper:before { + content: "\f2ae"; +} +.fa-first-order:before { + content: "\f2b0"; +} +.fa-yoast:before { + content: "\f2b1"; +} +.fa-themeisle:before { + content: "\f2b2"; +} +.fa-google-plus-circle:before, +.fa-google-plus-official:before { + content: "\f2b3"; +} +.fa-fa:before, +.fa-font-awesome:before { + content: "\f2b4"; +} +.fa-handshake-o:before { + content: "\f2b5"; +} +.fa-envelope-open:before { + content: "\f2b6"; +} +.fa-envelope-open-o:before { + content: "\f2b7"; +} +.fa-linode:before { + content: "\f2b8"; +} +.fa-address-book:before { + content: "\f2b9"; +} +.fa-address-book-o:before { + content: "\f2ba"; +} +.fa-vcard:before, +.fa-address-card:before { + content: "\f2bb"; +} +.fa-vcard-o:before, +.fa-address-card-o:before { + content: "\f2bc"; +} +.fa-user-circle:before { + content: "\f2bd"; +} +.fa-user-circle-o:before { + content: "\f2be"; +} +.fa-user-o:before { + content: "\f2c0"; +} +.fa-id-badge:before { + content: "\f2c1"; +} +.fa-drivers-license:before, +.fa-id-card:before { + content: "\f2c2"; +} +.fa-drivers-license-o:before, +.fa-id-card-o:before { + content: "\f2c3"; +} +.fa-quora:before { + content: "\f2c4"; +} +.fa-free-code-camp:before { + content: "\f2c5"; +} +.fa-telegram:before { + content: "\f2c6"; +} +.fa-thermometer-4:before, +.fa-thermometer:before, +.fa-thermometer-full:before { + content: "\f2c7"; +} +.fa-thermometer-3:before, +.fa-thermometer-three-quarters:before { + content: "\f2c8"; +} +.fa-thermometer-2:before, +.fa-thermometer-half:before { + content: "\f2c9"; +} +.fa-thermometer-1:before, +.fa-thermometer-quarter:before { + content: "\f2ca"; +} +.fa-thermometer-0:before, +.fa-thermometer-empty:before { + content: "\f2cb"; +} +.fa-shower:before { + content: "\f2cc"; +} +.fa-bathtub:before, +.fa-s15:before, +.fa-bath:before { + content: "\f2cd"; +} +.fa-podcast:before { + content: "\f2ce"; +} +.fa-window-maximize:before { + content: "\f2d0"; +} +.fa-window-minimize:before { + content: "\f2d1"; +} +.fa-window-restore:before { + content: "\f2d2"; +} +.fa-times-rectangle:before, +.fa-window-close:before { + content: "\f2d3"; +} +.fa-times-rectangle-o:before, +.fa-window-close-o:before { + content: "\f2d4"; +} +.fa-bandcamp:before { + content: "\f2d5"; +} +.fa-grav:before { + content: "\f2d6"; +} +.fa-etsy:before { + content: "\f2d7"; +} +.fa-imdb:before { + content: "\f2d8"; +} +.fa-ravelry:before { + content: "\f2d9"; +} +.fa-eercast:before { + content: "\f2da"; +} +.fa-microchip:before { + content: "\f2db"; +} +.fa-snowflake-o:before { + content: "\f2dc"; +} +.fa-superpowers:before { + content: "\f2dd"; +} +.fa-wpexplorer:before { + content: "\f2de"; +} +.fa-meetup:before { + content: "\f2e0"; +} +.sr-only { + position: absolute; + width: 1px; + height: 1px; + padding: 0; + margin: -1px; + overflow: hidden; + clip: rect(0, 0, 0, 0); + border: 0; +} +.sr-only-focusable:active, +.sr-only-focusable:focus { + position: static; + width: auto; + height: auto; + margin: 0; + overflow: visible; + clip: auto; +} diff --git a/assets/css/font-awesome.min.css b/assets/css/font-awesome.min.css new file mode 100644 index 00000000..540440ce --- /dev/null +++ b/assets/css/font-awesome.min.css @@ -0,0 +1,4 @@ +/*! + * Font Awesome 4.7.0 by @davegandy - http://fontawesome.io - @fontawesome + * License - http://fontawesome.io/license (Font: SIL OFL 1.1, CSS: MIT License) + */@font-face{font-family:'FontAwesome';src:url('../fonts/fontawesome-webfont.eot?v=4.7.0');src:url('../fonts/fontawesome-webfont.eot?#iefix&v=4.7.0') format('embedded-opentype'),url('../fonts/fontawesome-webfont.woff2?v=4.7.0') format('woff2'),url('../fonts/fontawesome-webfont.woff?v=4.7.0') format('woff'),url('../fonts/fontawesome-webfont.ttf?v=4.7.0') format('truetype'),url('../fonts/fontawesome-webfont.svg?v=4.7.0#fontawesomeregular') format('svg');font-weight:normal;font-style:normal}.fa{display:inline-block;font:normal normal normal 14px/1 FontAwesome;font-size:inherit;text-rendering:auto;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.fa-lg{font-size:1.33333333em;line-height:.75em;vertical-align:-15%}.fa-2x{font-size:2em}.fa-3x{font-size:3em}.fa-4x{font-size:4em}.fa-5x{font-size:5em}.fa-fw{width:1.28571429em;text-align:center}.fa-ul{padding-left:0;margin-left:2.14285714em;list-style-type:none}.fa-ul>li{position:relative}.fa-li{position:absolute;left:-2.14285714em;width:2.14285714em;top:.14285714em;text-align:center}.fa-li.fa-lg{left:-1.85714286em}.fa-border{padding:.2em .25em .15em;border:solid .08em #eee;border-radius:.1em}.fa-pull-left{float:left}.fa-pull-right{float:right}.fa.fa-pull-left{margin-right:.3em}.fa.fa-pull-right{margin-left:.3em}.pull-right{float:right}.pull-left{float:left}.fa.pull-left{margin-right:.3em}.fa.pull-right{margin-left:.3em}.fa-spin{-webkit-animation:fa-spin 2s infinite linear;animation:fa-spin 2s infinite linear}.fa-pulse{-webkit-animation:fa-spin 1s infinite steps(8);animation:fa-spin 1s infinite steps(8)}@-webkit-keyframes fa-spin{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}100%{-webkit-transform:rotate(359deg);transform:rotate(359deg)}}@keyframes fa-spin{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}100%{-webkit-transform:rotate(359deg);transform:rotate(359deg)}}.fa-rotate-90{-ms-filter:"progid:DXImageTransform.Microsoft.BasicImage(rotation=1)";-webkit-transform:rotate(90deg);-ms-transform:rotate(90deg);transform:rotate(90deg)}.fa-rotate-180{-ms-filter:"progid:DXImageTransform.Microsoft.BasicImage(rotation=2)";-webkit-transform:rotate(180deg);-ms-transform:rotate(180deg);transform:rotate(180deg)}.fa-rotate-270{-ms-filter:"progid:DXImageTransform.Microsoft.BasicImage(rotation=3)";-webkit-transform:rotate(270deg);-ms-transform:rotate(270deg);transform:rotate(270deg)}.fa-flip-horizontal{-ms-filter:"progid:DXImageTransform.Microsoft.BasicImage(rotation=0, mirror=1)";-webkit-transform:scale(-1, 1);-ms-transform:scale(-1, 1);transform:scale(-1, 1)}.fa-flip-vertical{-ms-filter:"progid:DXImageTransform.Microsoft.BasicImage(rotation=2, mirror=1)";-webkit-transform:scale(1, -1);-ms-transform:scale(1, -1);transform:scale(1, -1)}:root .fa-rotate-90,:root .fa-rotate-180,:root .fa-rotate-270,:root .fa-flip-horizontal,:root .fa-flip-vertical{filter:none}.fa-stack{position:relative;display:inline-block;width:2em;height:2em;line-height:2em;vertical-align:middle}.fa-stack-1x,.fa-stack-2x{position:absolute;left:0;width:100%;text-align:center}.fa-stack-1x{line-height:inherit}.fa-stack-2x{font-size:2em}.fa-inverse{color:#fff}.fa-glass:before{content:"\f000"}.fa-music:before{content:"\f001"}.fa-search:before{content:"\f002"}.fa-envelope-o:before{content:"\f003"}.fa-heart:before{content:"\f004"}.fa-star:before{content:"\f005"}.fa-star-o:before{content:"\f006"}.fa-user:before{content:"\f007"}.fa-film:before{content:"\f008"}.fa-th-large:before{content:"\f009"}.fa-th:before{content:"\f00a"}.fa-th-list:before{content:"\f00b"}.fa-check:before{content:"\f00c"}.fa-remove:before,.fa-close:before,.fa-times:before{content:"\f00d"}.fa-search-plus:before{content:"\f00e"}.fa-search-minus:before{content:"\f010"}.fa-power-off:before{content:"\f011"}.fa-signal:before{content:"\f012"}.fa-gear:before,.fa-cog:before{content:"\f013"}.fa-trash-o:before{content:"\f014"}.fa-home:before{content:"\f015"}.fa-file-o:before{content:"\f016"}.fa-clock-o:before{content:"\f017"}.fa-road:before{content:"\f018"}.fa-download:before{content:"\f019"}.fa-arrow-circle-o-down:before{content:"\f01a"}.fa-arrow-circle-o-up:before{content:"\f01b"}.fa-inbox:before{content:"\f01c"}.fa-play-circle-o:before{content:"\f01d"}.fa-rotate-right:before,.fa-repeat:before{content:"\f01e"}.fa-refresh:before{content:"\f021"}.fa-list-alt:before{content:"\f022"}.fa-lock:before{content:"\f023"}.fa-flag:before{content:"\f024"}.fa-headphones:before{content:"\f025"}.fa-volume-off:before{content:"\f026"}.fa-volume-down:before{content:"\f027"}.fa-volume-up:before{content:"\f028"}.fa-qrcode:before{content:"\f029"}.fa-barcode:before{content:"\f02a"}.fa-tag:before{content:"\f02b"}.fa-tags:before{content:"\f02c"}.fa-book:before{content:"\f02d"}.fa-bookmark:before{content:"\f02e"}.fa-print:before{content:"\f02f"}.fa-camera:before{content:"\f030"}.fa-font:before{content:"\f031"}.fa-bold:before{content:"\f032"}.fa-italic:before{content:"\f033"}.fa-text-height:before{content:"\f034"}.fa-text-width:before{content:"\f035"}.fa-align-left:before{content:"\f036"}.fa-align-center:before{content:"\f037"}.fa-align-right:before{content:"\f038"}.fa-align-justify:before{content:"\f039"}.fa-list:before{content:"\f03a"}.fa-dedent:before,.fa-outdent:before{content:"\f03b"}.fa-indent:before{content:"\f03c"}.fa-video-camera:before{content:"\f03d"}.fa-photo:before,.fa-image:before,.fa-picture-o:before{content:"\f03e"}.fa-pencil:before{content:"\f040"}.fa-map-marker:before{content:"\f041"}.fa-adjust:before{content:"\f042"}.fa-tint:before{content:"\f043"}.fa-edit:before,.fa-pencil-square-o:before{content:"\f044"}.fa-share-square-o:before{content:"\f045"}.fa-check-square-o:before{content:"\f046"}.fa-arrows:before{content:"\f047"}.fa-step-backward:before{content:"\f048"}.fa-fast-backward:before{content:"\f049"}.fa-backward:before{content:"\f04a"}.fa-play:before{content:"\f04b"}.fa-pause:before{content:"\f04c"}.fa-stop:before{content:"\f04d"}.fa-forward:before{content:"\f04e"}.fa-fast-forward:before{content:"\f050"}.fa-step-forward:before{content:"\f051"}.fa-eject:before{content:"\f052"}.fa-chevron-left:before{content:"\f053"}.fa-chevron-right:before{content:"\f054"}.fa-plus-circle:before{content:"\f055"}.fa-minus-circle:before{content:"\f056"}.fa-times-circle:before{content:"\f057"}.fa-check-circle:before{content:"\f058"}.fa-question-circle:before{content:"\f059"}.fa-info-circle:before{content:"\f05a"}.fa-crosshairs:before{content:"\f05b"}.fa-times-circle-o:before{content:"\f05c"}.fa-check-circle-o:before{content:"\f05d"}.fa-ban:before{content:"\f05e"}.fa-arrow-left:before{content:"\f060"}.fa-arrow-right:before{content:"\f061"}.fa-arrow-up:before{content:"\f062"}.fa-arrow-down:before{content:"\f063"}.fa-mail-forward:before,.fa-share:before{content:"\f064"}.fa-expand:before{content:"\f065"}.fa-compress:before{content:"\f066"}.fa-plus:before{content:"\f067"}.fa-minus:before{content:"\f068"}.fa-asterisk:before{content:"\f069"}.fa-exclamation-circle:before{content:"\f06a"}.fa-gift:before{content:"\f06b"}.fa-leaf:before{content:"\f06c"}.fa-fire:before{content:"\f06d"}.fa-eye:before{content:"\f06e"}.fa-eye-slash:before{content:"\f070"}.fa-warning:before,.fa-exclamation-triangle:before{content:"\f071"}.fa-plane:before{content:"\f072"}.fa-calendar:before{content:"\f073"}.fa-random:before{content:"\f074"}.fa-comment:before{content:"\f075"}.fa-magnet:before{content:"\f076"}.fa-chevron-up:before{content:"\f077"}.fa-chevron-down:before{content:"\f078"}.fa-retweet:before{content:"\f079"}.fa-shopping-cart:before{content:"\f07a"}.fa-folder:before{content:"\f07b"}.fa-folder-open:before{content:"\f07c"}.fa-arrows-v:before{content:"\f07d"}.fa-arrows-h:before{content:"\f07e"}.fa-bar-chart-o:before,.fa-bar-chart:before{content:"\f080"}.fa-twitter-square:before{content:"\f081"}.fa-facebook-square:before{content:"\f082"}.fa-camera-retro:before{content:"\f083"}.fa-key:before{content:"\f084"}.fa-gears:before,.fa-cogs:before{content:"\f085"}.fa-comments:before{content:"\f086"}.fa-thumbs-o-up:before{content:"\f087"}.fa-thumbs-o-down:before{content:"\f088"}.fa-star-half:before{content:"\f089"}.fa-heart-o:before{content:"\f08a"}.fa-sign-out:before{content:"\f08b"}.fa-linkedin-square:before{content:"\f08c"}.fa-thumb-tack:before{content:"\f08d"}.fa-external-link:before{content:"\f08e"}.fa-sign-in:before{content:"\f090"}.fa-trophy:before{content:"\f091"}.fa-github-square:before{content:"\f092"}.fa-upload:before{content:"\f093"}.fa-lemon-o:before{content:"\f094"}.fa-phone:before{content:"\f095"}.fa-square-o:before{content:"\f096"}.fa-bookmark-o:before{content:"\f097"}.fa-phone-square:before{content:"\f098"}.fa-twitter:before{content:"\f099"}.fa-facebook-f:before,.fa-facebook:before{content:"\f09a"}.fa-github:before{content:"\f09b"}.fa-unlock:before{content:"\f09c"}.fa-credit-card:before{content:"\f09d"}.fa-feed:before,.fa-rss:before{content:"\f09e"}.fa-hdd-o:before{content:"\f0a0"}.fa-bullhorn:before{content:"\f0a1"}.fa-bell:before{content:"\f0f3"}.fa-certificate:before{content:"\f0a3"}.fa-hand-o-right:before{content:"\f0a4"}.fa-hand-o-left:before{content:"\f0a5"}.fa-hand-o-up:before{content:"\f0a6"}.fa-hand-o-down:before{content:"\f0a7"}.fa-arrow-circle-left:before{content:"\f0a8"}.fa-arrow-circle-right:before{content:"\f0a9"}.fa-arrow-circle-up:before{content:"\f0aa"}.fa-arrow-circle-down:before{content:"\f0ab"}.fa-globe:before{content:"\f0ac"}.fa-wrench:before{content:"\f0ad"}.fa-tasks:before{content:"\f0ae"}.fa-filter:before{content:"\f0b0"}.fa-briefcase:before{content:"\f0b1"}.fa-arrows-alt:before{content:"\f0b2"}.fa-group:before,.fa-users:before{content:"\f0c0"}.fa-chain:before,.fa-link:before{content:"\f0c1"}.fa-cloud:before{content:"\f0c2"}.fa-flask:before{content:"\f0c3"}.fa-cut:before,.fa-scissors:before{content:"\f0c4"}.fa-copy:before,.fa-files-o:before{content:"\f0c5"}.fa-paperclip:before{content:"\f0c6"}.fa-save:before,.fa-floppy-o:before{content:"\f0c7"}.fa-square:before{content:"\f0c8"}.fa-navicon:before,.fa-reorder:before,.fa-bars:before{content:"\f0c9"}.fa-list-ul:before{content:"\f0ca"}.fa-list-ol:before{content:"\f0cb"}.fa-strikethrough:before{content:"\f0cc"}.fa-underline:before{content:"\f0cd"}.fa-table:before{content:"\f0ce"}.fa-magic:before{content:"\f0d0"}.fa-truck:before{content:"\f0d1"}.fa-pinterest:before{content:"\f0d2"}.fa-pinterest-square:before{content:"\f0d3"}.fa-google-plus-square:before{content:"\f0d4"}.fa-google-plus:before{content:"\f0d5"}.fa-money:before{content:"\f0d6"}.fa-caret-down:before{content:"\f0d7"}.fa-caret-up:before{content:"\f0d8"}.fa-caret-left:before{content:"\f0d9"}.fa-caret-right:before{content:"\f0da"}.fa-columns:before{content:"\f0db"}.fa-unsorted:before,.fa-sort:before{content:"\f0dc"}.fa-sort-down:before,.fa-sort-desc:before{content:"\f0dd"}.fa-sort-up:before,.fa-sort-asc:before{content:"\f0de"}.fa-envelope:before{content:"\f0e0"}.fa-linkedin:before{content:"\f0e1"}.fa-rotate-left:before,.fa-undo:before{content:"\f0e2"}.fa-legal:before,.fa-gavel:before{content:"\f0e3"}.fa-dashboard:before,.fa-tachometer:before{content:"\f0e4"}.fa-comment-o:before{content:"\f0e5"}.fa-comments-o:before{content:"\f0e6"}.fa-flash:before,.fa-bolt:before{content:"\f0e7"}.fa-sitemap:before{content:"\f0e8"}.fa-umbrella:before{content:"\f0e9"}.fa-paste:before,.fa-clipboard:before{content:"\f0ea"}.fa-lightbulb-o:before{content:"\f0eb"}.fa-exchange:before{content:"\f0ec"}.fa-cloud-download:before{content:"\f0ed"}.fa-cloud-upload:before{content:"\f0ee"}.fa-user-md:before{content:"\f0f0"}.fa-stethoscope:before{content:"\f0f1"}.fa-suitcase:before{content:"\f0f2"}.fa-bell-o:before{content:"\f0a2"}.fa-coffee:before{content:"\f0f4"}.fa-cutlery:before{content:"\f0f5"}.fa-file-text-o:before{content:"\f0f6"}.fa-building-o:before{content:"\f0f7"}.fa-hospital-o:before{content:"\f0f8"}.fa-ambulance:before{content:"\f0f9"}.fa-medkit:before{content:"\f0fa"}.fa-fighter-jet:before{content:"\f0fb"}.fa-beer:before{content:"\f0fc"}.fa-h-square:before{content:"\f0fd"}.fa-plus-square:before{content:"\f0fe"}.fa-angle-double-left:before{content:"\f100"}.fa-angle-double-right:before{content:"\f101"}.fa-angle-double-up:before{content:"\f102"}.fa-angle-double-down:before{content:"\f103"}.fa-angle-left:before{content:"\f104"}.fa-angle-right:before{content:"\f105"}.fa-angle-up:before{content:"\f106"}.fa-angle-down:before{content:"\f107"}.fa-desktop:before{content:"\f108"}.fa-laptop:before{content:"\f109"}.fa-tablet:before{content:"\f10a"}.fa-mobile-phone:before,.fa-mobile:before{content:"\f10b"}.fa-circle-o:before{content:"\f10c"}.fa-quote-left:before{content:"\f10d"}.fa-quote-right:before{content:"\f10e"}.fa-spinner:before{content:"\f110"}.fa-circle:before{content:"\f111"}.fa-mail-reply:before,.fa-reply:before{content:"\f112"}.fa-github-alt:before{content:"\f113"}.fa-folder-o:before{content:"\f114"}.fa-folder-open-o:before{content:"\f115"}.fa-smile-o:before{content:"\f118"}.fa-frown-o:before{content:"\f119"}.fa-meh-o:before{content:"\f11a"}.fa-gamepad:before{content:"\f11b"}.fa-keyboard-o:before{content:"\f11c"}.fa-flag-o:before{content:"\f11d"}.fa-flag-checkered:before{content:"\f11e"}.fa-terminal:before{content:"\f120"}.fa-code:before{content:"\f121"}.fa-mail-reply-all:before,.fa-reply-all:before{content:"\f122"}.fa-star-half-empty:before,.fa-star-half-full:before,.fa-star-half-o:before{content:"\f123"}.fa-location-arrow:before{content:"\f124"}.fa-crop:before{content:"\f125"}.fa-code-fork:before{content:"\f126"}.fa-unlink:before,.fa-chain-broken:before{content:"\f127"}.fa-question:before{content:"\f128"}.fa-info:before{content:"\f129"}.fa-exclamation:before{content:"\f12a"}.fa-superscript:before{content:"\f12b"}.fa-subscript:before{content:"\f12c"}.fa-eraser:before{content:"\f12d"}.fa-puzzle-piece:before{content:"\f12e"}.fa-microphone:before{content:"\f130"}.fa-microphone-slash:before{content:"\f131"}.fa-shield:before{content:"\f132"}.fa-calendar-o:before{content:"\f133"}.fa-fire-extinguisher:before{content:"\f134"}.fa-rocket:before{content:"\f135"}.fa-maxcdn:before{content:"\f136"}.fa-chevron-circle-left:before{content:"\f137"}.fa-chevron-circle-right:before{content:"\f138"}.fa-chevron-circle-up:before{content:"\f139"}.fa-chevron-circle-down:before{content:"\f13a"}.fa-html5:before{content:"\f13b"}.fa-css3:before{content:"\f13c"}.fa-anchor:before{content:"\f13d"}.fa-unlock-alt:before{content:"\f13e"}.fa-bullseye:before{content:"\f140"}.fa-ellipsis-h:before{content:"\f141"}.fa-ellipsis-v:before{content:"\f142"}.fa-rss-square:before{content:"\f143"}.fa-play-circle:before{content:"\f144"}.fa-ticket:before{content:"\f145"}.fa-minus-square:before{content:"\f146"}.fa-minus-square-o:before{content:"\f147"}.fa-level-up:before{content:"\f148"}.fa-level-down:before{content:"\f149"}.fa-check-square:before{content:"\f14a"}.fa-pencil-square:before{content:"\f14b"}.fa-external-link-square:before{content:"\f14c"}.fa-share-square:before{content:"\f14d"}.fa-compass:before{content:"\f14e"}.fa-toggle-down:before,.fa-caret-square-o-down:before{content:"\f150"}.fa-toggle-up:before,.fa-caret-square-o-up:before{content:"\f151"}.fa-toggle-right:before,.fa-caret-square-o-right:before{content:"\f152"}.fa-euro:before,.fa-eur:before{content:"\f153"}.fa-gbp:before{content:"\f154"}.fa-dollar:before,.fa-usd:before{content:"\f155"}.fa-rupee:before,.fa-inr:before{content:"\f156"}.fa-cny:before,.fa-rmb:before,.fa-yen:before,.fa-jpy:before{content:"\f157"}.fa-ruble:before,.fa-rouble:before,.fa-rub:before{content:"\f158"}.fa-won:before,.fa-krw:before{content:"\f159"}.fa-bitcoin:before,.fa-btc:before{content:"\f15a"}.fa-file:before{content:"\f15b"}.fa-file-text:before{content:"\f15c"}.fa-sort-alpha-asc:before{content:"\f15d"}.fa-sort-alpha-desc:before{content:"\f15e"}.fa-sort-amount-asc:before{content:"\f160"}.fa-sort-amount-desc:before{content:"\f161"}.fa-sort-numeric-asc:before{content:"\f162"}.fa-sort-numeric-desc:before{content:"\f163"}.fa-thumbs-up:before{content:"\f164"}.fa-thumbs-down:before{content:"\f165"}.fa-youtube-square:before{content:"\f166"}.fa-youtube:before{content:"\f167"}.fa-xing:before{content:"\f168"}.fa-xing-square:before{content:"\f169"}.fa-youtube-play:before{content:"\f16a"}.fa-dropbox:before{content:"\f16b"}.fa-stack-overflow:before{content:"\f16c"}.fa-instagram:before{content:"\f16d"}.fa-flickr:before{content:"\f16e"}.fa-adn:before{content:"\f170"}.fa-bitbucket:before{content:"\f171"}.fa-bitbucket-square:before{content:"\f172"}.fa-tumblr:before{content:"\f173"}.fa-tumblr-square:before{content:"\f174"}.fa-long-arrow-down:before{content:"\f175"}.fa-long-arrow-up:before{content:"\f176"}.fa-long-arrow-left:before{content:"\f177"}.fa-long-arrow-right:before{content:"\f178"}.fa-apple:before{content:"\f179"}.fa-windows:before{content:"\f17a"}.fa-android:before{content:"\f17b"}.fa-linux:before{content:"\f17c"}.fa-dribbble:before{content:"\f17d"}.fa-skype:before{content:"\f17e"}.fa-foursquare:before{content:"\f180"}.fa-trello:before{content:"\f181"}.fa-female:before{content:"\f182"}.fa-male:before{content:"\f183"}.fa-gittip:before,.fa-gratipay:before{content:"\f184"}.fa-sun-o:before{content:"\f185"}.fa-moon-o:before{content:"\f186"}.fa-archive:before{content:"\f187"}.fa-bug:before{content:"\f188"}.fa-vk:before{content:"\f189"}.fa-weibo:before{content:"\f18a"}.fa-renren:before{content:"\f18b"}.fa-pagelines:before{content:"\f18c"}.fa-stack-exchange:before{content:"\f18d"}.fa-arrow-circle-o-right:before{content:"\f18e"}.fa-arrow-circle-o-left:before{content:"\f190"}.fa-toggle-left:before,.fa-caret-square-o-left:before{content:"\f191"}.fa-dot-circle-o:before{content:"\f192"}.fa-wheelchair:before{content:"\f193"}.fa-vimeo-square:before{content:"\f194"}.fa-turkish-lira:before,.fa-try:before{content:"\f195"}.fa-plus-square-o:before{content:"\f196"}.fa-space-shuttle:before{content:"\f197"}.fa-slack:before{content:"\f198"}.fa-envelope-square:before{content:"\f199"}.fa-wordpress:before{content:"\f19a"}.fa-openid:before{content:"\f19b"}.fa-institution:before,.fa-bank:before,.fa-university:before{content:"\f19c"}.fa-mortar-board:before,.fa-graduation-cap:before{content:"\f19d"}.fa-yahoo:before{content:"\f19e"}.fa-google:before{content:"\f1a0"}.fa-reddit:before{content:"\f1a1"}.fa-reddit-square:before{content:"\f1a2"}.fa-stumbleupon-circle:before{content:"\f1a3"}.fa-stumbleupon:before{content:"\f1a4"}.fa-delicious:before{content:"\f1a5"}.fa-digg:before{content:"\f1a6"}.fa-pied-piper-pp:before{content:"\f1a7"}.fa-pied-piper-alt:before{content:"\f1a8"}.fa-drupal:before{content:"\f1a9"}.fa-joomla:before{content:"\f1aa"}.fa-language:before{content:"\f1ab"}.fa-fax:before{content:"\f1ac"}.fa-building:before{content:"\f1ad"}.fa-child:before{content:"\f1ae"}.fa-paw:before{content:"\f1b0"}.fa-spoon:before{content:"\f1b1"}.fa-cube:before{content:"\f1b2"}.fa-cubes:before{content:"\f1b3"}.fa-behance:before{content:"\f1b4"}.fa-behance-square:before{content:"\f1b5"}.fa-steam:before{content:"\f1b6"}.fa-steam-square:before{content:"\f1b7"}.fa-recycle:before{content:"\f1b8"}.fa-automobile:before,.fa-car:before{content:"\f1b9"}.fa-cab:before,.fa-taxi:before{content:"\f1ba"}.fa-tree:before{content:"\f1bb"}.fa-spotify:before{content:"\f1bc"}.fa-deviantart:before{content:"\f1bd"}.fa-soundcloud:before{content:"\f1be"}.fa-database:before{content:"\f1c0"}.fa-file-pdf-o:before{content:"\f1c1"}.fa-file-word-o:before{content:"\f1c2"}.fa-file-excel-o:before{content:"\f1c3"}.fa-file-powerpoint-o:before{content:"\f1c4"}.fa-file-photo-o:before,.fa-file-picture-o:before,.fa-file-image-o:before{content:"\f1c5"}.fa-file-zip-o:before,.fa-file-archive-o:before{content:"\f1c6"}.fa-file-sound-o:before,.fa-file-audio-o:before{content:"\f1c7"}.fa-file-movie-o:before,.fa-file-video-o:before{content:"\f1c8"}.fa-file-code-o:before{content:"\f1c9"}.fa-vine:before{content:"\f1ca"}.fa-codepen:before{content:"\f1cb"}.fa-jsfiddle:before{content:"\f1cc"}.fa-life-bouy:before,.fa-life-buoy:before,.fa-life-saver:before,.fa-support:before,.fa-life-ring:before{content:"\f1cd"}.fa-circle-o-notch:before{content:"\f1ce"}.fa-ra:before,.fa-resistance:before,.fa-rebel:before{content:"\f1d0"}.fa-ge:before,.fa-empire:before{content:"\f1d1"}.fa-git-square:before{content:"\f1d2"}.fa-git:before{content:"\f1d3"}.fa-y-combinator-square:before,.fa-yc-square:before,.fa-hacker-news:before{content:"\f1d4"}.fa-tencent-weibo:before{content:"\f1d5"}.fa-qq:before{content:"\f1d6"}.fa-wechat:before,.fa-weixin:before{content:"\f1d7"}.fa-send:before,.fa-paper-plane:before{content:"\f1d8"}.fa-send-o:before,.fa-paper-plane-o:before{content:"\f1d9"}.fa-history:before{content:"\f1da"}.fa-circle-thin:before{content:"\f1db"}.fa-header:before{content:"\f1dc"}.fa-paragraph:before{content:"\f1dd"}.fa-sliders:before{content:"\f1de"}.fa-share-alt:before{content:"\f1e0"}.fa-share-alt-square:before{content:"\f1e1"}.fa-bomb:before{content:"\f1e2"}.fa-soccer-ball-o:before,.fa-futbol-o:before{content:"\f1e3"}.fa-tty:before{content:"\f1e4"}.fa-binoculars:before{content:"\f1e5"}.fa-plug:before{content:"\f1e6"}.fa-slideshare:before{content:"\f1e7"}.fa-twitch:before{content:"\f1e8"}.fa-yelp:before{content:"\f1e9"}.fa-newspaper-o:before{content:"\f1ea"}.fa-wifi:before{content:"\f1eb"}.fa-calculator:before{content:"\f1ec"}.fa-paypal:before{content:"\f1ed"}.fa-google-wallet:before{content:"\f1ee"}.fa-cc-visa:before{content:"\f1f0"}.fa-cc-mastercard:before{content:"\f1f1"}.fa-cc-discover:before{content:"\f1f2"}.fa-cc-amex:before{content:"\f1f3"}.fa-cc-paypal:before{content:"\f1f4"}.fa-cc-stripe:before{content:"\f1f5"}.fa-bell-slash:before{content:"\f1f6"}.fa-bell-slash-o:before{content:"\f1f7"}.fa-trash:before{content:"\f1f8"}.fa-copyright:before{content:"\f1f9"}.fa-at:before{content:"\f1fa"}.fa-eyedropper:before{content:"\f1fb"}.fa-paint-brush:before{content:"\f1fc"}.fa-birthday-cake:before{content:"\f1fd"}.fa-area-chart:before{content:"\f1fe"}.fa-pie-chart:before{content:"\f200"}.fa-line-chart:before{content:"\f201"}.fa-lastfm:before{content:"\f202"}.fa-lastfm-square:before{content:"\f203"}.fa-toggle-off:before{content:"\f204"}.fa-toggle-on:before{content:"\f205"}.fa-bicycle:before{content:"\f206"}.fa-bus:before{content:"\f207"}.fa-ioxhost:before{content:"\f208"}.fa-angellist:before{content:"\f209"}.fa-cc:before{content:"\f20a"}.fa-shekel:before,.fa-sheqel:before,.fa-ils:before{content:"\f20b"}.fa-meanpath:before{content:"\f20c"}.fa-buysellads:before{content:"\f20d"}.fa-connectdevelop:before{content:"\f20e"}.fa-dashcube:before{content:"\f210"}.fa-forumbee:before{content:"\f211"}.fa-leanpub:before{content:"\f212"}.fa-sellsy:before{content:"\f213"}.fa-shirtsinbulk:before{content:"\f214"}.fa-simplybuilt:before{content:"\f215"}.fa-skyatlas:before{content:"\f216"}.fa-cart-plus:before{content:"\f217"}.fa-cart-arrow-down:before{content:"\f218"}.fa-diamond:before{content:"\f219"}.fa-ship:before{content:"\f21a"}.fa-user-secret:before{content:"\f21b"}.fa-motorcycle:before{content:"\f21c"}.fa-street-view:before{content:"\f21d"}.fa-heartbeat:before{content:"\f21e"}.fa-venus:before{content:"\f221"}.fa-mars:before{content:"\f222"}.fa-mercury:before{content:"\f223"}.fa-intersex:before,.fa-transgender:before{content:"\f224"}.fa-transgender-alt:before{content:"\f225"}.fa-venus-double:before{content:"\f226"}.fa-mars-double:before{content:"\f227"}.fa-venus-mars:before{content:"\f228"}.fa-mars-stroke:before{content:"\f229"}.fa-mars-stroke-v:before{content:"\f22a"}.fa-mars-stroke-h:before{content:"\f22b"}.fa-neuter:before{content:"\f22c"}.fa-genderless:before{content:"\f22d"}.fa-facebook-official:before{content:"\f230"}.fa-pinterest-p:before{content:"\f231"}.fa-whatsapp:before{content:"\f232"}.fa-server:before{content:"\f233"}.fa-user-plus:before{content:"\f234"}.fa-user-times:before{content:"\f235"}.fa-hotel:before,.fa-bed:before{content:"\f236"}.fa-viacoin:before{content:"\f237"}.fa-train:before{content:"\f238"}.fa-subway:before{content:"\f239"}.fa-medium:before{content:"\f23a"}.fa-yc:before,.fa-y-combinator:before{content:"\f23b"}.fa-optin-monster:before{content:"\f23c"}.fa-opencart:before{content:"\f23d"}.fa-expeditedssl:before{content:"\f23e"}.fa-battery-4:before,.fa-battery:before,.fa-battery-full:before{content:"\f240"}.fa-battery-3:before,.fa-battery-three-quarters:before{content:"\f241"}.fa-battery-2:before,.fa-battery-half:before{content:"\f242"}.fa-battery-1:before,.fa-battery-quarter:before{content:"\f243"}.fa-battery-0:before,.fa-battery-empty:before{content:"\f244"}.fa-mouse-pointer:before{content:"\f245"}.fa-i-cursor:before{content:"\f246"}.fa-object-group:before{content:"\f247"}.fa-object-ungroup:before{content:"\f248"}.fa-sticky-note:before{content:"\f249"}.fa-sticky-note-o:before{content:"\f24a"}.fa-cc-jcb:before{content:"\f24b"}.fa-cc-diners-club:before{content:"\f24c"}.fa-clone:before{content:"\f24d"}.fa-balance-scale:before{content:"\f24e"}.fa-hourglass-o:before{content:"\f250"}.fa-hourglass-1:before,.fa-hourglass-start:before{content:"\f251"}.fa-hourglass-2:before,.fa-hourglass-half:before{content:"\f252"}.fa-hourglass-3:before,.fa-hourglass-end:before{content:"\f253"}.fa-hourglass:before{content:"\f254"}.fa-hand-grab-o:before,.fa-hand-rock-o:before{content:"\f255"}.fa-hand-stop-o:before,.fa-hand-paper-o:before{content:"\f256"}.fa-hand-scissors-o:before{content:"\f257"}.fa-hand-lizard-o:before{content:"\f258"}.fa-hand-spock-o:before{content:"\f259"}.fa-hand-pointer-o:before{content:"\f25a"}.fa-hand-peace-o:before{content:"\f25b"}.fa-trademark:before{content:"\f25c"}.fa-registered:before{content:"\f25d"}.fa-creative-commons:before{content:"\f25e"}.fa-gg:before{content:"\f260"}.fa-gg-circle:before{content:"\f261"}.fa-tripadvisor:before{content:"\f262"}.fa-odnoklassniki:before{content:"\f263"}.fa-odnoklassniki-square:before{content:"\f264"}.fa-get-pocket:before{content:"\f265"}.fa-wikipedia-w:before{content:"\f266"}.fa-safari:before{content:"\f267"}.fa-chrome:before{content:"\f268"}.fa-firefox:before{content:"\f269"}.fa-opera:before{content:"\f26a"}.fa-internet-explorer:before{content:"\f26b"}.fa-tv:before,.fa-television:before{content:"\f26c"}.fa-contao:before{content:"\f26d"}.fa-500px:before{content:"\f26e"}.fa-amazon:before{content:"\f270"}.fa-calendar-plus-o:before{content:"\f271"}.fa-calendar-minus-o:before{content:"\f272"}.fa-calendar-times-o:before{content:"\f273"}.fa-calendar-check-o:before{content:"\f274"}.fa-industry:before{content:"\f275"}.fa-map-pin:before{content:"\f276"}.fa-map-signs:before{content:"\f277"}.fa-map-o:before{content:"\f278"}.fa-map:before{content:"\f279"}.fa-commenting:before{content:"\f27a"}.fa-commenting-o:before{content:"\f27b"}.fa-houzz:before{content:"\f27c"}.fa-vimeo:before{content:"\f27d"}.fa-black-tie:before{content:"\f27e"}.fa-fonticons:before{content:"\f280"}.fa-reddit-alien:before{content:"\f281"}.fa-edge:before{content:"\f282"}.fa-credit-card-alt:before{content:"\f283"}.fa-codiepie:before{content:"\f284"}.fa-modx:before{content:"\f285"}.fa-fort-awesome:before{content:"\f286"}.fa-usb:before{content:"\f287"}.fa-product-hunt:before{content:"\f288"}.fa-mixcloud:before{content:"\f289"}.fa-scribd:before{content:"\f28a"}.fa-pause-circle:before{content:"\f28b"}.fa-pause-circle-o:before{content:"\f28c"}.fa-stop-circle:before{content:"\f28d"}.fa-stop-circle-o:before{content:"\f28e"}.fa-shopping-bag:before{content:"\f290"}.fa-shopping-basket:before{content:"\f291"}.fa-hashtag:before{content:"\f292"}.fa-bluetooth:before{content:"\f293"}.fa-bluetooth-b:before{content:"\f294"}.fa-percent:before{content:"\f295"}.fa-gitlab:before{content:"\f296"}.fa-wpbeginner:before{content:"\f297"}.fa-wpforms:before{content:"\f298"}.fa-envira:before{content:"\f299"}.fa-universal-access:before{content:"\f29a"}.fa-wheelchair-alt:before{content:"\f29b"}.fa-question-circle-o:before{content:"\f29c"}.fa-blind:before{content:"\f29d"}.fa-audio-description:before{content:"\f29e"}.fa-volume-control-phone:before{content:"\f2a0"}.fa-braille:before{content:"\f2a1"}.fa-assistive-listening-systems:before{content:"\f2a2"}.fa-asl-interpreting:before,.fa-american-sign-language-interpreting:before{content:"\f2a3"}.fa-deafness:before,.fa-hard-of-hearing:before,.fa-deaf:before{content:"\f2a4"}.fa-glide:before{content:"\f2a5"}.fa-glide-g:before{content:"\f2a6"}.fa-signing:before,.fa-sign-language:before{content:"\f2a7"}.fa-low-vision:before{content:"\f2a8"}.fa-viadeo:before{content:"\f2a9"}.fa-viadeo-square:before{content:"\f2aa"}.fa-snapchat:before{content:"\f2ab"}.fa-snapchat-ghost:before{content:"\f2ac"}.fa-snapchat-square:before{content:"\f2ad"}.fa-pied-piper:before{content:"\f2ae"}.fa-first-order:before{content:"\f2b0"}.fa-yoast:before{content:"\f2b1"}.fa-themeisle:before{content:"\f2b2"}.fa-google-plus-circle:before,.fa-google-plus-official:before{content:"\f2b3"}.fa-fa:before,.fa-font-awesome:before{content:"\f2b4"}.fa-handshake-o:before{content:"\f2b5"}.fa-envelope-open:before{content:"\f2b6"}.fa-envelope-open-o:before{content:"\f2b7"}.fa-linode:before{content:"\f2b8"}.fa-address-book:before{content:"\f2b9"}.fa-address-book-o:before{content:"\f2ba"}.fa-vcard:before,.fa-address-card:before{content:"\f2bb"}.fa-vcard-o:before,.fa-address-card-o:before{content:"\f2bc"}.fa-user-circle:before{content:"\f2bd"}.fa-user-circle-o:before{content:"\f2be"}.fa-user-o:before{content:"\f2c0"}.fa-id-badge:before{content:"\f2c1"}.fa-drivers-license:before,.fa-id-card:before{content:"\f2c2"}.fa-drivers-license-o:before,.fa-id-card-o:before{content:"\f2c3"}.fa-quora:before{content:"\f2c4"}.fa-free-code-camp:before{content:"\f2c5"}.fa-telegram:before{content:"\f2c6"}.fa-thermometer-4:before,.fa-thermometer:before,.fa-thermometer-full:before{content:"\f2c7"}.fa-thermometer-3:before,.fa-thermometer-three-quarters:before{content:"\f2c8"}.fa-thermometer-2:before,.fa-thermometer-half:before{content:"\f2c9"}.fa-thermometer-1:before,.fa-thermometer-quarter:before{content:"\f2ca"}.fa-thermometer-0:before,.fa-thermometer-empty:before{content:"\f2cb"}.fa-shower:before{content:"\f2cc"}.fa-bathtub:before,.fa-s15:before,.fa-bath:before{content:"\f2cd"}.fa-podcast:before{content:"\f2ce"}.fa-window-maximize:before{content:"\f2d0"}.fa-window-minimize:before{content:"\f2d1"}.fa-window-restore:before{content:"\f2d2"}.fa-times-rectangle:before,.fa-window-close:before{content:"\f2d3"}.fa-times-rectangle-o:before,.fa-window-close-o:before{content:"\f2d4"}.fa-bandcamp:before{content:"\f2d5"}.fa-grav:before{content:"\f2d6"}.fa-etsy:before{content:"\f2d7"}.fa-imdb:before{content:"\f2d8"}.fa-ravelry:before{content:"\f2d9"}.fa-eercast:before{content:"\f2da"}.fa-microchip:before{content:"\f2db"}.fa-snowflake-o:before{content:"\f2dc"}.fa-superpowers:before{content:"\f2dd"}.fa-wpexplorer:before{content:"\f2de"}.fa-meetup:before{content:"\f2e0"}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0, 0, 0, 0);border:0}.sr-only-focusable:active,.sr-only-focusable:focus{position:static;width:auto;height:auto;margin:0;overflow:visible;clip:auto} diff --git a/assets/css/namari-color.css b/assets/css/namari-color.css new file mode 100644 index 00000000..c1614701 --- /dev/null +++ b/assets/css/namari-color.css @@ -0,0 +1,323 @@ +/* Namari Landing Page Dynamic Style Index + +1. Website Default Styling +2. Navigation +3. Primary and Secondary Colors +4. Banner +5. Typography +6. Buttons +7. Footer + + +/*------------------------------------------------------------------------------------------*/ +/* 1. Website Default Styling */ +/*------------------------------------------------------------------------------------------*/ + +body { + background: #fff; +} + +/* Default Link Color */ + +a, +.la-ball-triangle-path { + color: #d2b356; +} + +a:hover, +#header.nav-solid nav a:hover { + color: #d2b356; +} + +/* Default Icon Color */ + +.icon i { + color: #d2b356; +} + +/* Border Color */ + +#banner .section-heading:before, +.testimonial.classic footer:before { + background: #d2b356; +} + +.pricing-block-content:hover { + border-color: #d2b356; +} + +/*------------------------------------------------------------------------------------------*/ +/* 2. Navigation */ +/*------------------------------------------------------------------------------------------*/ + +/* Transparent Navigation Color on a Banner */ + +#header nav a, +#header i { + color: #111; +} + +/* Navigation Colors when the Navigation is sticky and solid */ + +#header.nav-solid, +#header.nav-solid a, +#header.nav-solid i, +#nav-mobile ul li a { + color: #333; +} + +/* Navigation Active State */ + +#header.nav-solid .active { + color: #d2b356; + border-color: #d2b356; +} + +/*------------------------------------------------------------------------------------------*/ +/* 3. Primary and Secondary Colors */ +/*------------------------------------------------------------------------------------------*/ + +/* Primary Background and Text Colors */ + +.primary-color, +.featured .pricing { + background-color: #d2b356; +} + +.primary-color, +.primary-color .section-title, +.primary-color .section-subtitle, +.featured .pricing, +.featured .pricing p { + color: #fff; +} + +.section-heading h2:after { + background: #d2b356; + content: ""; + display: block; + width: 30px; + height: 5px; + margin-top: 30px; +} + +.text-center .section-heading h2:after { + margin: 30px auto 25px auto; +} + +/* Primary Icon Colors */ + +.primary-color .icon i, +.primary-color i { + color: #fff; +} + +/* Secondary Background and Text Colors */ + +.secondary-color { + background-color: #f5f5f5; +} + +/*------------------------------------------------------------------------------------------*/ +/* 4. Banner */ +/*------------------------------------------------------------------------------------------*/ + +/* Banner Background and Text Colors */ + +#banner { + background: url("assets/images/banner-images/banner-image-1.jpg") no-repeat + center top; + background-size: cover; +} + +/*------------------------------------------------------------------------------------------*/ +/* 5. Typography */ +/*------------------------------------------------------------------------------------------*/ + +body { + font-family: "Open Sans", sans-serif, Arial, Helvetica; + font-size: 15px; + font-weight: normal; + color: #111; +} + +/* Logo, if you are using Fonts as Logo and not image + +#logo h1 { + font-family:; + font-size:; + font-weight:; + color:; +} + +#logo h2 { + font-family:; + font-size:; + font-weight:; + color:; +} + +*/ + +/* Banner Typography */ + +#banner h1 { + font-family: "Open Sans", sans-serif, Arial, Helvetica; + font-size: 62px; + line-height: 60px; + font-weight: 800; + color: #111; +} + +#banner h2 { + font-family: "Open Sans", sans-serif, Arial, Helvetica; + font-size: 18px; + font-weight: 300; + color: #111; +} + +/* Section Title and Subtitle */ + +.section-title { + font-family: "Open Sans", sans-serif, Arial, Helvetica; + font-size: 34px; + font-weight: 700; + color: #111; +} + +.section-subtitle { + font-family: "Open Sans", sans-serif, Arial, Helvetica; + font-size: 16px; + font-weight: 300; + color: #9c9c9c; +} + +/* Testimonial */ + +.testimonial q { + font-family: "Open Sans", sans-serif, Arial, Helvetica; + font-size: 17px; + font-weight: 300; +} + +.testimonial.classic q, +.testimonial.classic footer { + color: #111; +} + +/* Standard Headings h1-h6 */ + +h1 { + font-family: "Open Sans", sans-serif, Arial, Helvetica; + font-size: 40px; + font-weight: 300; + color: #111; +} + +h2 { + font-family: "Open Sans", sans-serif, Arial, Helvetica; + font-size: 34px; + font-weight: 300; + color: #111; +} + +h3 { + font-family: "Open Sans", sans-serif, Arial, Helvetica; + font-size: 30px; + font-weight: 700; + color: #111; +} + +h4 { + font-family: "Open Sans", sans-serif, Arial, Helvetica; + font-size: 18px; + font-weight: 400; + color: #111; +} + +h5 { + font-family: "Open Sans", sans-serif, Arial, Helvetica; + font-size: 16px; + font-weight: 400; + color: #111; +} + +h6 { + font-family: "Open Sans", sans-serif, Arial, Helvetica; + font-size: 14px; + font-weight: 400; + color: #111; +} + +/*------------------------------------------------------------------------------------------*/ +/* 6. Buttons */ +/*------------------------------------------------------------------------------------------*/ + +/* ----------Default Buttons---------- */ + +/* Button Text */ + +.button, +input[type="submit"] { + font-family: "Open Sans", sans-serif, Arial, Helvetica; + font-size: 14px; + font-weight: bold; + color: #111; +} + +/* Button Color */ + +.button, +input[type="submit"] { + border-color: #111; +} + +/* Button Hover Color */ + +.button:hover, +input[type="submit"]:hover { + border-color: #d2b356; + color: #d2b356; +} + +/* ----------Banner Buttons---------- */ + +/* Button Text */ + +#banner .button { + font-family: "Open Sans", sans-serif, Arial, Helvetica; + font-size: 16px; + color: #111; +} + +/* Button Color */ + +#banner .button { + border-color: #111; +} + +/* Button Hover Color */ + +#banner .button:hover { + color: #d2b356; + border-color: #d2b356; +} + +/*------------------------------------------------------------------------------------------*/ +/* 7. Footer */ +/*------------------------------------------------------------------------------------------*/ + +#landing-footer, +#landing-footer p, +#landing-footer a { + font-family: "Open Sans", sans-serif, Arial, Helvetica; + font-size: 12px; + font-weight: normal; + color: #999; +} + +/* Footer Icon Color */ + +#landing-footer i { + color: #999; +} diff --git a/assets/fonts/FontAwesome.otf b/assets/fonts/FontAwesome.otf new file mode 100644 index 00000000..401ec0f3 Binary files /dev/null and b/assets/fonts/FontAwesome.otf differ diff --git a/assets/fonts/fontawesome-webfont.eot b/assets/fonts/fontawesome-webfont.eot new file mode 100644 index 00000000..e9f60ca9 Binary files /dev/null and b/assets/fonts/fontawesome-webfont.eot differ diff --git a/assets/fonts/fontawesome-webfont.svg b/assets/fonts/fontawesome-webfont.svg new file mode 100644 index 00000000..855c845e --- /dev/null +++ b/assets/fonts/fontawesome-webfont.svg @@ -0,0 +1,2671 @@ + + + + +Created by FontForge 20120731 at Mon Oct 24 17:37:40 2016 + By ,,, +Copyright Dave Gandy 2016. All rights reserved. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/assets/fonts/fontawesome-webfont.ttf b/assets/fonts/fontawesome-webfont.ttf new file mode 100644 index 00000000..35acda2f Binary files /dev/null and b/assets/fonts/fontawesome-webfont.ttf differ diff --git a/assets/fonts/fontawesome-webfont.woff b/assets/fonts/fontawesome-webfont.woff new file mode 100644 index 00000000..400014a4 Binary files /dev/null and b/assets/fonts/fontawesome-webfont.woff differ diff --git a/assets/fonts/fontawesome-webfont.woff2 b/assets/fonts/fontawesome-webfont.woff2 new file mode 100644 index 00000000..4d13fc60 Binary files /dev/null and b/assets/fonts/fontawesome-webfont.woff2 differ diff --git a/assets/images/banner-images/banner-image-1.jpg b/assets/images/banner-images/banner-image-1.jpg new file mode 100644 index 00000000..6cbea662 Binary files /dev/null and b/assets/images/banner-images/banner-image-1.jpg differ diff --git a/assets/images/company-images/company-logo1.png b/assets/images/company-images/company-logo1.png new file mode 100644 index 00000000..c6480d70 Binary files /dev/null and b/assets/images/company-images/company-logo1.png differ diff --git a/assets/images/company-images/company-logo2.png b/assets/images/company-images/company-logo2.png new file mode 100644 index 00000000..a9420c05 Binary files /dev/null and b/assets/images/company-images/company-logo2.png differ diff --git a/assets/images/company-images/company-logo3.png b/assets/images/company-images/company-logo3.png new file mode 100644 index 00000000..b7daece9 Binary files /dev/null and b/assets/images/company-images/company-logo3.png differ diff --git a/assets/images/company-images/company-logo4.png b/assets/images/company-images/company-logo4.png new file mode 100644 index 00000000..2a7d2dec Binary files /dev/null and b/assets/images/company-images/company-logo4.png differ diff --git a/assets/images/company-images/company-logo5.png b/assets/images/company-images/company-logo5.png new file mode 100644 index 00000000..89721540 Binary files /dev/null and b/assets/images/company-images/company-logo5.png differ diff --git a/assets/images/company-images/company-logo6.png b/assets/images/company-images/company-logo6.png new file mode 100644 index 00000000..cee25a63 Binary files /dev/null and b/assets/images/company-images/company-logo6.png differ diff --git a/assets/images/company-images/company-logo7.png b/assets/images/company-images/company-logo7.png new file mode 100644 index 00000000..b163b47a Binary files /dev/null and b/assets/images/company-images/company-logo7.png differ diff --git a/assets/images/company-images/company-logo8.png b/assets/images/company-images/company-logo8.png new file mode 100644 index 00000000..8e52becd Binary files /dev/null and b/assets/images/company-images/company-logo8.png differ diff --git a/assets/images/company-images/company-logo9.png b/assets/images/company-images/company-logo9.png new file mode 100644 index 00000000..5c7ddeba Binary files /dev/null and b/assets/images/company-images/company-logo9.png differ diff --git a/assets/images/dancer.jpg b/assets/images/dancer.jpg new file mode 100644 index 00000000..8ffb94ea Binary files /dev/null and b/assets/images/dancer.jpg differ diff --git a/assets/images/duyuru-images/Duyuru1-img.jpg b/assets/images/duyuru-images/Duyuru1-img.jpg new file mode 100644 index 00000000..5354a697 Binary files /dev/null and b/assets/images/duyuru-images/Duyuru1-img.jpg differ diff --git a/assets/images/duyuru-images/duyuru-2.jpg b/assets/images/duyuru-images/duyuru-2.jpg new file mode 100644 index 00000000..addd54f7 Binary files /dev/null and b/assets/images/duyuru-images/duyuru-2.jpg differ diff --git a/assets/images/duyuru-images/duyuru.jpg b/assets/images/duyuru-images/duyuru.jpg new file mode 100644 index 00000000..5f58392a Binary files /dev/null and b/assets/images/duyuru-images/duyuru.jpg differ diff --git a/assets/images/favicon.ico b/assets/images/favicon.ico new file mode 100644 index 00000000..c84786bb Binary files /dev/null and b/assets/images/favicon.ico differ diff --git a/assets/images/gallery-images/gallery-image-1.jpg b/assets/images/gallery-images/gallery-image-1.jpg new file mode 100644 index 00000000..81d5c7a6 Binary files /dev/null and b/assets/images/gallery-images/gallery-image-1.jpg differ diff --git a/assets/images/gallery-images/gallery-image-10.jpg b/assets/images/gallery-images/gallery-image-10.jpg new file mode 100644 index 00000000..2ed236ec Binary files /dev/null and b/assets/images/gallery-images/gallery-image-10.jpg differ diff --git a/assets/images/gallery-images/gallery-image-11.jpg b/assets/images/gallery-images/gallery-image-11.jpg new file mode 100644 index 00000000..87d66ce4 Binary files /dev/null and b/assets/images/gallery-images/gallery-image-11.jpg differ diff --git a/assets/images/gallery-images/gallery-image-12.jpg b/assets/images/gallery-images/gallery-image-12.jpg new file mode 100644 index 00000000..1236f93a Binary files /dev/null and b/assets/images/gallery-images/gallery-image-12.jpg differ diff --git a/assets/images/gallery-images/gallery-image-2.jpg b/assets/images/gallery-images/gallery-image-2.jpg new file mode 100644 index 00000000..e2287a3f Binary files /dev/null and b/assets/images/gallery-images/gallery-image-2.jpg differ diff --git a/assets/images/gallery-images/gallery-image-3.jpg b/assets/images/gallery-images/gallery-image-3.jpg new file mode 100644 index 00000000..cba917d8 Binary files /dev/null and b/assets/images/gallery-images/gallery-image-3.jpg differ diff --git a/assets/images/gallery-images/gallery-image-4.jpg b/assets/images/gallery-images/gallery-image-4.jpg new file mode 100644 index 00000000..d87b8a6f Binary files /dev/null and b/assets/images/gallery-images/gallery-image-4.jpg differ diff --git a/assets/images/gallery-images/gallery-image-5.jpg b/assets/images/gallery-images/gallery-image-5.jpg new file mode 100644 index 00000000..84db0e01 Binary files /dev/null and b/assets/images/gallery-images/gallery-image-5.jpg differ diff --git a/assets/images/gallery-images/gallery-image-6.jpg b/assets/images/gallery-images/gallery-image-6.jpg new file mode 100644 index 00000000..4b33b415 Binary files /dev/null and b/assets/images/gallery-images/gallery-image-6.jpg differ diff --git a/assets/images/gallery-images/gallery-image-7.jpg b/assets/images/gallery-images/gallery-image-7.jpg new file mode 100644 index 00000000..cbb57157 Binary files /dev/null and b/assets/images/gallery-images/gallery-image-7.jpg differ diff --git a/assets/images/gallery-images/gallery-image-8.jpg b/assets/images/gallery-images/gallery-image-8.jpg new file mode 100644 index 00000000..18dc4e72 Binary files /dev/null and b/assets/images/gallery-images/gallery-image-8.jpg differ diff --git a/assets/images/gallery-images/gallery-image-9.jpg b/assets/images/gallery-images/gallery-image-9.jpg new file mode 100644 index 00000000..541b47eb Binary files /dev/null and b/assets/images/gallery-images/gallery-image-9.jpg differ diff --git a/assets/images/hizmet-images/hizmet.png b/assets/images/hizmet-images/hizmet.png new file mode 100644 index 00000000..cfe425a8 Binary files /dev/null and b/assets/images/hizmet-images/hizmet.png differ diff --git a/assets/images/logo-2.jpg b/assets/images/logo-2.jpg new file mode 100644 index 00000000..cddff8cb Binary files /dev/null and b/assets/images/logo-2.jpg differ diff --git a/assets/images/logo.jpg b/assets/images/logo.jpg new file mode 100644 index 00000000..2a530a00 Binary files /dev/null and b/assets/images/logo.jpg differ diff --git a/assets/images/user-images/user-1.jpg b/assets/images/user-images/user-1.jpg new file mode 100644 index 00000000..d33299c8 Binary files /dev/null and b/assets/images/user-images/user-1.jpg differ diff --git a/assets/images/user-images/user-2.jpg b/assets/images/user-images/user-2.jpg new file mode 100644 index 00000000..7a8a8432 Binary files /dev/null and b/assets/images/user-images/user-2.jpg differ diff --git a/assets/images/user-images/user-3.jpg b/assets/images/user-images/user-3.jpg new file mode 100644 index 00000000..7a8a8432 Binary files /dev/null and b/assets/images/user-images/user-3.jpg differ diff --git a/assets/images/user-images/user-4.jpg b/assets/images/user-images/user-4.jpg new file mode 100644 index 00000000..7a8a8432 Binary files /dev/null and b/assets/images/user-images/user-4.jpg differ diff --git a/assets/images/user-images/user-5.jpg b/assets/images/user-images/user-5.jpg new file mode 100644 index 00000000..7a8a8432 Binary files /dev/null and b/assets/images/user-images/user-5.jpg differ diff --git a/assets/images/user-images/user-6.jpg b/assets/images/user-images/user-6.jpg new file mode 100644 index 00000000..7a8a8432 Binary files /dev/null and b/assets/images/user-images/user-6.jpg differ diff --git a/assets/instagram-96.png b/assets/instagram-96.png new file mode 100644 index 00000000..8667b424 Binary files /dev/null and b/assets/instagram-96.png differ diff --git a/assets/js/featherlight.gallery.min.js b/assets/js/featherlight.gallery.min.js new file mode 100644 index 00000000..ed9757f6 --- /dev/null +++ b/assets/js/featherlight.gallery.min.js @@ -0,0 +1,7 @@ +/** + * Featherlight Gallery – an extension for the ultra slim jQuery lightbox + * Version 1.3.3 - http://noelboss.github.io/featherlight/ + * + * Copyright 2015, Noël Raoul Bossart (http://www.noelboss.com) + * MIT Licensed. +**/!function(a){"use strict";function b(c,d){if(!(this instanceof b)){var e=new b(a.extend({$source:c,$currentTarget:c.first()},d));return e.open(),e}a.featherlight.apply(this,arguments),this.chainCallbacks(h)}var c=function(a){window.console&&window.console.warn&&window.console.warn("FeatherlightGallery: "+a)};if("undefined"==typeof a)return c("Too much lightness, Featherlight needs jQuery.");if(!a.featherlight)return c("Load the featherlight plugin before the gallery plugin");var d="ontouchstart"in window||window.DocumentTouch&&document instanceof DocumentTouch,e=a.event&&a.event.special.swipeleft&&a,f=window.Hammer&&function(a){var b=new window.Hammer.Manager(a[0]);return b.add(new window.Hammer.Swipe),b},g=d&&(e||f);d&&!g&&c("No compatible swipe library detected; one must be included before featherlightGallery for swipe motions to navigate the galleries.");var h={afterClose:function(a,b){var c=this;return c.$instance.off("next."+c.namespace+" previous."+c.namespace),c._swiper&&(c._swiper.off("swipeleft",c._swipeleft).off("swiperight",c._swiperight),c._swiper=null),a(b)},beforeOpen:function(a,b){var c=this;return c.$instance.on("next."+c.namespace+" previous."+c.namespace,function(a){var b="next"===a.type?1:-1;c.navigateTo(c.currentNavigation()+b)}),g?c._swiper=g(c.$instance).on("swipeleft",c._swipeleft=function(){c.$instance.trigger("next")}).on("swiperight",c._swiperight=function(){c.$instance.trigger("previous")}):c.$instance.find("."+c.namespace+"-content").append(c.createNavigation("previous")).append(c.createNavigation("next")),a(b)},onKeyUp:function(a,b){var c={37:"previous",39:"next"}[b.keyCode];return c?(this.$instance.trigger(c),!1):a(b)}};a.featherlight.extend(b,{autoBind:"[data-featherlight-gallery]"}),a.extend(b.prototype,{previousIcon:"",nextIcon:"",galleryFadeIn:100,galleryFadeOut:300,slides:function(){return this.filter?this.$source.find(this.filter):this.$source},images:function(){return c("images is deprecated, please use slides instead"),this.slides()},currentNavigation:function(){return this.slides().index(this.$currentTarget)},navigateTo:function(b){var c=this,d=c.slides(),e=d.length,f=c.$instance.find("."+c.namespace+"-inner");return b=(b%e+e)%e,c.$currentTarget=d.eq(b),c.beforeContent(),a.when(c.getContent(),f.fadeTo(c.galleryFadeOut,.2)).always(function(a){c.setContent(a),c.afterContent(),a.fadeTo(c.galleryFadeIn,1)})},createNavigation:function(b){var c=this;return a(''+this[b+"Icon"]+"").click(function(){a(this).trigger(b+"."+c.namespace)})}}),a.featherlightGallery=b,a.fn.featherlightGallery=function(a){return b.attach(this,a)},a(document).ready(function(){b._onReady()})}(jQuery); \ No newline at end of file diff --git a/assets/js/featherlight.min.js b/assets/js/featherlight.min.js new file mode 100644 index 00000000..87942d9c --- /dev/null +++ b/assets/js/featherlight.min.js @@ -0,0 +1,8 @@ +/** + * Featherlight - ultra slim jQuery lightbox + * Version 1.3.3 - http://noelboss.github.io/featherlight/ + * + * Copyright 2015, Noël Raoul Bossart (http://www.noelboss.com) + * MIT Licensed. +**/ +!function(a){"use strict";function b(a,c){if(!(this instanceof b)){var d=new b(a,c);return d.open(),d}this.id=b.id++,this.setup(a,c),this.chainCallbacks(b._callbackChain)}if("undefined"==typeof a)return void("console"in window&&window.console.info("Too much lightness, Featherlight needs jQuery."));var c=[],d=function(b){return c=a.grep(c,function(a){return a!==b&&a.$instance.closest("body").length>0})},e=function(a,b){var c={},d=new RegExp("^"+b+"([A-Z])(.*)");for(var e in a){var f=e.match(d);if(f){var g=(f[1]+f[2].replace(/([A-Z])/g,"-$1")).toLowerCase();c[g]=a[e]}}return c},f={keyup:"onKeyUp",resize:"onResize"},g=function(c){a.each(b.opened().reverse(),function(){return c.isDefaultPrevented()||!1!==this[f[c.type]](c)?void 0:(c.preventDefault(),c.stopPropagation(),!1)})},h=function(c){if(c!==b._globalHandlerInstalled){b._globalHandlerInstalled=c;var d=a.map(f,function(a,c){return c+"."+b.prototype.namespace}).join(" ");a(window)[c?"on":"off"](d,g)}};b.prototype={constructor:b,namespace:"featherlight",targetAttr:"data-featherlight",variant:null,resetCss:!1,background:null,openTrigger:"click",closeTrigger:"click",filter:null,root:"body",openSpeed:250,closeSpeed:250,closeOnClick:"background",closeOnEsc:!0,closeIcon:"✕",loading:"",persist:!1,otherClose:null,beforeOpen:a.noop,beforeContent:a.noop,beforeClose:a.noop,afterOpen:a.noop,afterContent:a.noop,afterClose:a.noop,onKeyUp:a.noop,onResize:a.noop,type:null,contentFilters:["jquery","image","html","ajax","iframe","text"],setup:function(b,c){"object"!=typeof b||b instanceof a!=!1||c||(c=b,b=void 0);var d=a.extend(this,c,{target:b}),e=d.resetCss?d.namespace+"-reset":d.namespace,f=a(d.background||['
','
','',d.closeIcon,"",'
'+d.loading+"
","
","
"].join("")),g="."+d.namespace+"-close"+(d.otherClose?","+d.otherClose:"");return d.$instance=f.clone().addClass(d.variant),d.$instance.on(d.closeTrigger+"."+d.namespace,function(b){var c=a(b.target);("background"===d.closeOnClick&&c.is("."+d.namespace)||"anywhere"===d.closeOnClick||c.closest(g).length)&&(b.preventDefault(),d.close())}),this},getContent:function(){if(this.persist!==!1&&this.$content)return this.$content;var b=this,c=this.constructor.contentFilters,d=function(a){return b.$currentTarget&&b.$currentTarget.attr(a)},e=d(b.targetAttr),f=b.target||e||"",g=c[b.type];if(!g&&f in c&&(g=c[f],f=b.target&&e),f=f||d("href")||"",!g)for(var h in c)b[h]&&(g=c[h],f=b[h]);if(!g){var i=f;if(f=null,a.each(b.contentFilters,function(){return g=c[this],g.test&&(f=g.test(i)),!f&&g.regex&&i.match&&i.match(g.regex)&&(f=i),!f}),!f)return"console"in window&&window.console.error("Featherlight: no content filter found "+(i?' for "'+i+'"':" (no target specified)")),!1}return g.process.call(b,f)},setContent:function(b){var c=this;return(b.is("iframe")||a("iframe",b).length>0)&&c.$instance.addClass(c.namespace+"-iframe"),c.$instance.removeClass(c.namespace+"-loading"),c.$instance.find("."+c.namespace+"-inner").not(b).slice(1).remove().end().replaceWith(a.contains(c.$instance[0],b[0])?"":b),c.$content=b.addClass(c.namespace+"-inner"),c},open:function(b){var d=this;if(d.$instance.hide().appendTo(d.root),!(b&&b.isDefaultPrevented()||d.beforeOpen(b)===!1)){b&&b.preventDefault();var e=d.getContent();if(e)return c.push(d),h(!0),d.$instance.fadeIn(d.openSpeed),d.beforeContent(b),a.when(e).always(function(a){d.setContent(a),d.afterContent(b)}).then(d.$instance.promise()).done(function(){d.afterOpen(b)})}return d.$instance.detach(),a.Deferred().reject().promise()},close:function(b){var c=this,e=a.Deferred();return c.beforeClose(b)===!1?e.reject():(0===d(c).length&&h(!1),c.$instance.fadeOut(c.closeSpeed,function(){c.$instance.detach(),c.afterClose(b),e.resolve()})),e.promise()},chainCallbacks:function(b){for(var c in b)this[c]=a.proxy(b[c],this,a.proxy(this[c],this))}},a.extend(b,{id:0,autoBind:"[data-featherlight]",defaults:b.prototype,contentFilters:{jquery:{regex:/^[#.]\w/,test:function(b){return b instanceof a&&b},process:function(b){return this.persist!==!1?a(b):a(b).clone(!0)}},image:{regex:/\.(png|jpg|jpeg|gif|tiff|bmp|svg)(\?\S*)?$/i,process:function(b){var c=this,d=a.Deferred(),e=new Image,f=a('');return e.onload=function(){f.naturalWidth=e.width,f.naturalHeight=e.height,d.resolve(f)},e.onerror=function(){d.reject(f)},e.src=b,d.promise()}},html:{regex:/^\s*<[\w!][^<]*>/,process:function(b){return a(b)}},ajax:{regex:/./,process:function(b){var c=a.Deferred(),d=a("
").load(b,function(a,b){"error"!==b&&c.resolve(d.contents()),c.fail()});return c.promise()}},iframe:{process:function(b){var c=new a.Deferred,d=a("',d='
',e='
',f='
',g='
',h='
',i="
";if(a("body").append(h+g+f+e+d+c+i),a("#slvj-window").hide(),"youtube"==a(this).data("videosite"))var j="http://www.youtube.com/embed/"+a(this).data("videoid")+"?autoplay=1";else if("vimeo"==a(this).data("videosite"))var j="http://player.vimeo.com/video/"+a(this).data("videoid")+"?autoplay=1";return a("#slvj-window").fadeIn(),a("#slvj-video-embed").attr("src",j),a("#slvj-close-icon").click(function(){a("#slvj-window").fadeOut(a.simpleLightboxVideo.vars.delayAnimation,function(){a(this).remove()})}),a("#slvj-background-close").click(function(){a("#slvj-window").fadeOut(a.simpleLightboxVideo.vars.delayAnimation,function(){a(this).remove()})}),!1}),a(document).keyup(function(b){27==b.keyCode&&a("#slvj-window").fadeOut(a.simpleLightboxVideo.vars.delayAnimation,function(){a(this).remove()})}),a(window).resize(function(){if(window.innerHeight>540)var b=(window.innerHeight-540)/2;else var b=0;a(".slvj-lightbox").css({marginTop:b+"px"})}),!1}})}(jQuery),function(a){a.simpleLightboxVideo=function(b,c){return a(c).simpleLightboxVideo()}}(jQuery); \ No newline at end of file diff --git a/assets/js/pushy.min.js b/assets/js/pushy.min.js new file mode 100644 index 00000000..16e4c18c --- /dev/null +++ b/assets/js/pushy.min.js @@ -0,0 +1 @@ +$(function(){function a(){e.toggleClass(j),d.toggleClass(i),f.toggleClass(k),g.toggleClass(l)}function b(){e.addClass(j),d.animate({left:"0px"},n),f.animate({left:o},n),g.animate({left:o},n)}function c(){e.removeClass(j),d.animate({left:"-"+o},n),f.animate({left:"0px"},n),g.animate({left:"0px"},n)}var d=$(".pushy"),e=$("body"),f=$("#container"),g=$(".push"),h=$(".site-overlay"),i="pushy-left pushy-open",j="pushy-active",k="container-push",l="push-push",m=$(".menu-btn, .pushy a"),n=200,o=d.width()+"px";if(cssTransforms3d=function(){var a=document.createElement("p"),b=!1,c={webkitTransform:"-webkit-transform",OTransform:"-o-transform",msTransform:"-ms-transform",MozTransform:"-moz-transform",transform:"transform"};document.body.insertBefore(a,null);for(var d in c)void 0!==a.style[d]&&(a.style[d]="translate3d(1px,1px,1px)",b=window.getComputedStyle(a).getPropertyValue(c[d]));return document.body.removeChild(a),void 0!==b&&b.length>0&&"none"!==b}())m.click(function(){a()}),h.click(function(){a()});else{d.css({left:"-"+o}),f.css({"overflow-x":"hidden"});var p=!0;m.click(function(){p?(b(),p=!1):(c(),p=!0)}),h.click(function(){p?(b(),p=!1):(c(),p=!0)})}}); \ No newline at end of file diff --git a/assets/js/site.js b/assets/js/site.js new file mode 100644 index 00000000..c8b2c592 --- /dev/null +++ b/assets/js/site.js @@ -0,0 +1,67 @@ +"use strict"; + +$(document).ready(function () { + /* Video Lightbox */ + if (!!$.prototype.simpleLightboxVideo) { + $('.video').simpleLightboxVideo(); + } + + /*ScrollUp*/ + if (!!$.prototype.scrollUp) { + $.scrollUp(); + } + + /*Responsive Navigation*/ + $("#nav-mobile").html($("#nav-main").html()); + $("#nav-trigger span").on("click",function() { + if ($("nav#nav-mobile ul").hasClass("expanded")) { + $("nav#nav-mobile ul.expanded").removeClass("expanded").slideUp(250); + $(this).removeClass("open"); + } else { + $("nav#nav-mobile ul").addClass("expanded").slideDown(250); + $(this).addClass("open"); + } + }); + + $("#nav-mobile").html($("#nav-main").html()); + $("#nav-mobile ul a").on("click",function() { + if ($("nav#nav-mobile ul").hasClass("expanded")) { + $("nav#nav-mobile ul.expanded").removeClass("expanded").slideUp(250); + $("#nav-trigger span").removeClass("open"); + } + }); + + /* Sticky Navigation */ + if (!!$.prototype.stickyNavbar) { + $('#header').stickyNavbar(); + } + + $('#content').waypoint(function (direction) { + if (direction === 'down') { + $('#header').addClass('nav-solid fadeInDown'); + } + else { + $('#header').removeClass('nav-solid fadeInDown'); + } + }); + +}); + + +/* Preloader and animations */ +$(window).load(function () { // makes sure the whole site is loaded + $('#status').fadeOut(); // will first fade out the loading animation + $('#preloader').delay(350).fadeOut('slow'); // will fade out the white DIV that covers the website. + $('body').delay(350).css({'overflow-y': 'visible'}); + + /* WOW Elements */ + if (typeof WOW == 'function') { + new WOW().init(); + } + + /* Parallax Effects */ + if (!!$.prototype.enllax) { + $(window).enllax(); + } + +}); diff --git a/assets/js/wow.min.js b/assets/js/wow.min.js new file mode 100644 index 00000000..25609b8a --- /dev/null +++ b/assets/js/wow.min.js @@ -0,0 +1,2 @@ +/*! WOW - v1.1.2 - 2015-08-19 +* Copyright (c) 2015 Matthieu Aussaguel; Licensed MIT */(function(){var a,b,c,d,e,f=function(a,b){return function(){return a.apply(b,arguments)}},g=[].indexOf||function(a){for(var b=0,c=this.length;c>b;b++)if(b in this&&this[b]===a)return b;return-1};b=function(){function a(){}return a.prototype.extend=function(a,b){var c,d;for(c in b)d=b[c],null==a[c]&&(a[c]=d);return a},a.prototype.isMobile=function(a){return/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(a)},a.prototype.createEvent=function(a,b,c,d){var e;return null==b&&(b=!1),null==c&&(c=!1),null==d&&(d=null),null!=document.createEvent?(e=document.createEvent("CustomEvent"),e.initCustomEvent(a,b,c,d)):null!=document.createEventObject?(e=document.createEventObject(),e.eventType=a):e.eventName=a,e},a.prototype.emitEvent=function(a,b){return null!=a.dispatchEvent?a.dispatchEvent(b):b in(null!=a)?a[b]():"on"+b in(null!=a)?a["on"+b]():void 0},a.prototype.addEvent=function(a,b,c){return null!=a.addEventListener?a.addEventListener(b,c,!1):null!=a.attachEvent?a.attachEvent("on"+b,c):a[b]=c},a.prototype.removeEvent=function(a,b,c){return null!=a.removeEventListener?a.removeEventListener(b,c,!1):null!=a.detachEvent?a.detachEvent("on"+b,c):delete a[b]},a.prototype.innerHeight=function(){return"innerHeight"in window?window.innerHeight:document.documentElement.clientHeight},a}(),c=this.WeakMap||this.MozWeakMap||(c=function(){function a(){this.keys=[],this.values=[]}return a.prototype.get=function(a){var b,c,d,e,f;for(f=this.keys,b=d=0,e=f.length;e>d;b=++d)if(c=f[b],c===a)return this.values[b]},a.prototype.set=function(a,b){var c,d,e,f,g;for(g=this.keys,c=e=0,f=g.length;f>e;c=++e)if(d=g[c],d===a)return void(this.values[c]=b);return this.keys.push(a),this.values.push(b)},a}()),a=this.MutationObserver||this.WebkitMutationObserver||this.MozMutationObserver||(a=function(){function a(){"undefined"!=typeof console&&null!==console&&console.warn("MutationObserver is not supported by your browser."),"undefined"!=typeof console&&null!==console&&console.warn("WOW.js cannot detect dom mutations, please call .sync() after loading new content.")}return a.notSupported=!0,a.prototype.observe=function(){},a}()),d=this.getComputedStyle||function(a){return this.getPropertyValue=function(b){var c;return"float"===b&&(b="styleFloat"),e.test(b)&&b.replace(e,function(a,b){return b.toUpperCase()}),(null!=(c=a.currentStyle)?c[b]:void 0)||null},this},e=/(\-([a-z]){1})/g,this.WOW=function(){function e(a){null==a&&(a={}),this.scrollCallback=f(this.scrollCallback,this),this.scrollHandler=f(this.scrollHandler,this),this.resetAnimation=f(this.resetAnimation,this),this.start=f(this.start,this),this.scrolled=!0,this.config=this.util().extend(a,this.defaults),null!=a.scrollContainer&&(this.config.scrollContainer=document.querySelector(a.scrollContainer)),this.animationNameCache=new c,this.wowEvent=this.util().createEvent(this.config.boxClass)}return e.prototype.defaults={boxClass:"wow",animateClass:"animated",offset:0,mobile:!0,live:!0,callback:null,scrollContainer:null},e.prototype.init=function(){var a;return this.element=window.document.documentElement,"interactive"===(a=document.readyState)||"complete"===a?this.start():this.util().addEvent(document,"DOMContentLoaded",this.start),this.finished=[]},e.prototype.start=function(){var b,c,d,e;if(this.stopped=!1,this.boxes=function(){var a,c,d,e;for(d=this.element.querySelectorAll("."+this.config.boxClass),e=[],a=0,c=d.length;c>a;a++)b=d[a],e.push(b);return e}.call(this),this.all=function(){var a,c,d,e;for(d=this.boxes,e=[],a=0,c=d.length;c>a;a++)b=d[a],e.push(b);return e}.call(this),this.boxes.length)if(this.disabled())this.resetStyle();else for(e=this.boxes,c=0,d=e.length;d>c;c++)b=e[c],this.applyStyle(b,!0);return this.disabled()||(this.util().addEvent(this.config.scrollContainer||window,"scroll",this.scrollHandler),this.util().addEvent(window,"resize",this.scrollHandler),this.interval=setInterval(this.scrollCallback,50)),this.config.live?new a(function(a){return function(b){var c,d,e,f,g;for(g=[],c=0,d=b.length;d>c;c++)f=b[c],g.push(function(){var a,b,c,d;for(c=f.addedNodes||[],d=[],a=0,b=c.length;b>a;a++)e=c[a],d.push(this.doSync(e));return d}.call(a));return g}}(this)).observe(document.body,{childList:!0,subtree:!0}):void 0},e.prototype.stop=function(){return this.stopped=!0,this.util().removeEvent(this.config.scrollContainer||window,"scroll",this.scrollHandler),this.util().removeEvent(window,"resize",this.scrollHandler),null!=this.interval?clearInterval(this.interval):void 0},e.prototype.sync=function(){return a.notSupported?this.doSync(this.element):void 0},e.prototype.doSync=function(a){var b,c,d,e,f;if(null==a&&(a=this.element),1===a.nodeType){for(a=a.parentNode||a,e=a.querySelectorAll("."+this.config.boxClass),f=[],c=0,d=e.length;d>c;c++)b=e[c],g.call(this.all,b)<0?(this.boxes.push(b),this.all.push(b),this.stopped||this.disabled()?this.resetStyle():this.applyStyle(b,!0),f.push(this.scrolled=!0)):f.push(void 0);return f}},e.prototype.show=function(a){return this.applyStyle(a),a.className=a.className+" "+this.config.animateClass,null!=this.config.callback&&this.config.callback(a),this.util().emitEvent(a,this.wowEvent),this.util().addEvent(a,"animationend",this.resetAnimation),this.util().addEvent(a,"oanimationend",this.resetAnimation),this.util().addEvent(a,"webkitAnimationEnd",this.resetAnimation),this.util().addEvent(a,"MSAnimationEnd",this.resetAnimation),a},e.prototype.applyStyle=function(a,b){var c,d,e;return d=a.getAttribute("data-wow-duration"),c=a.getAttribute("data-wow-delay"),e=a.getAttribute("data-wow-iteration"),this.animate(function(f){return function(){return f.customStyle(a,b,d,c,e)}}(this))},e.prototype.animate=function(){return"requestAnimationFrame"in window?function(a){return window.requestAnimationFrame(a)}:function(a){return a()}}(),e.prototype.resetStyle=function(){var a,b,c,d,e;for(d=this.boxes,e=[],b=0,c=d.length;c>b;b++)a=d[b],e.push(a.style.visibility="visible");return e},e.prototype.resetAnimation=function(a){var b;return a.type.toLowerCase().indexOf("animationend")>=0?(b=a.target||a.srcElement,b.className=b.className.replace(this.config.animateClass,"").trim()):void 0},e.prototype.customStyle=function(a,b,c,d,e){return b&&this.cacheAnimationName(a),a.style.visibility=b?"hidden":"visible",c&&this.vendorSet(a.style,{animationDuration:c}),d&&this.vendorSet(a.style,{animationDelay:d}),e&&this.vendorSet(a.style,{animationIterationCount:e}),this.vendorSet(a.style,{animationName:b?"none":this.cachedAnimationName(a)}),a},e.prototype.vendors=["moz","webkit"],e.prototype.vendorSet=function(a,b){var c,d,e,f;d=[];for(c in b)e=b[c],a[""+c]=e,d.push(function(){var b,d,g,h;for(g=this.vendors,h=[],b=0,d=g.length;d>b;b++)f=g[b],h.push(a[""+f+c.charAt(0).toUpperCase()+c.substr(1)]=e);return h}.call(this));return d},e.prototype.vendorCSS=function(a,b){var c,e,f,g,h,i;for(h=d(a),g=h.getPropertyCSSValue(b),f=this.vendors,c=0,e=f.length;e>c;c++)i=f[c],g=g||h.getPropertyCSSValue("-"+i+"-"+b);return g},e.prototype.animationName=function(a){var b;try{b=this.vendorCSS(a,"animation-name").cssText}catch(c){b=d(a).getPropertyValue("animation-name")}return"none"===b?"":b},e.prototype.cacheAnimationName=function(a){return this.animationNameCache.set(a,this.animationName(a))},e.prototype.cachedAnimationName=function(a){return this.animationNameCache.get(a)},e.prototype.scrollHandler=function(){return this.scrolled=!0},e.prototype.scrollCallback=function(){var a;return!this.scrolled||(this.scrolled=!1,this.boxes=function(){var b,c,d,e;for(d=this.boxes,e=[],b=0,c=d.length;c>b;b++)a=d[b],a&&(this.isVisible(a)?this.show(a):e.push(a));return e}.call(this),this.boxes.length||this.config.live)?void 0:this.stop()},e.prototype.offsetTop=function(a){for(var b;void 0===a.offsetTop;)a=a.parentNode;for(b=a.offsetTop;a=a.offsetParent;)b+=a.offsetTop;return b},e.prototype.isVisible=function(a){var b,c,d,e,f;return c=a.getAttribute("data-wow-offset")||this.config.offset,f=this.config.scrollContainer&&this.config.scrollContainer.scrollTop||window.pageYOffset,e=f+Math.min(this.element.clientHeight,this.util().innerHeight())-c,d=this.offsetTop(a),b=d+a.clientHeight,e>=d&&b>=f},e.prototype.util=function(){return null!=this._util?this._util:this._util=new b},e.prototype.disabled=function(){return!this.config.mobile&&this.util().isMobile(navigator.userAgent)},e}()}).call(this); \ No newline at end of file diff --git a/assets/socialmedia-96.png b/assets/socialmedia-96.png new file mode 100644 index 00000000..97557daf Binary files /dev/null and b/assets/socialmedia-96.png differ diff --git a/banner-image-1.jpg b/banner-image-1.jpg new file mode 100644 index 00000000..6cbea662 Binary files /dev/null and b/banner-image-1.jpg differ diff --git a/favicon.ico b/favicon.ico new file mode 100644 index 00000000..8081c7ce Binary files /dev/null and b/favicon.ico differ diff --git a/fontawesome-webfont.eot b/fontawesome-webfont.eot new file mode 100644 index 00000000..e9f60ca9 Binary files /dev/null and b/fontawesome-webfont.eot differ diff --git a/fontawesome-webfont.svg b/fontawesome-webfont.svg new file mode 100644 index 00000000..855c845e --- /dev/null +++ b/fontawesome-webfont.svg @@ -0,0 +1,2671 @@ + + + + +Created by FontForge 20120731 at Mon Oct 24 17:37:40 2016 + By ,,, +Copyright Dave Gandy 2016. All rights reserved. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/fontawesome-webfont.ttf b/fontawesome-webfont.ttf new file mode 100644 index 00000000..35acda2f Binary files /dev/null and b/fontawesome-webfont.ttf differ diff --git a/fontawesome-webfont.woff b/fontawesome-webfont.woff new file mode 100644 index 00000000..400014a4 Binary files /dev/null and b/fontawesome-webfont.woff differ diff --git a/fontawesome-webfont.woff2 b/fontawesome-webfont.woff2 new file mode 100644 index 00000000..4d13fc60 Binary files /dev/null and b/fontawesome-webfont.woff2 differ diff --git a/index.html b/index.html new file mode 100644 index 00000000..f4f1adab --- /dev/null +++ b/index.html @@ -0,0 +1,52 @@ + + + + + + + + Kargı Sitesi Resmi Sayfası + + + + + + + + + + + + + + + + + +
+
+
+
+
+
+
+ +
+ + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/main.js b/main.js new file mode 100644 index 00000000..87fcedf5 --- /dev/null +++ b/main.js @@ -0,0 +1,1446 @@ +(self["webpackChunkwebsitePractise"] = self["webpackChunkwebsitePractise"] || []).push([["main"],{ + +/***/ 2145: +/*!************************************************!*\ + !*** ./src/app/anasayfa/anasayfa.component.ts ***! + \************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ AnasayfaComponent: () => (/* binding */ AnasayfaComponent) +/* harmony export */ }); +/* harmony import */ var _anasayfa_component_html_ngResource__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./anasayfa.component.html?ngResource */ 4398); +/* harmony import */ var _anasayfa_component_css_ngResource__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./anasayfa.component.css?ngResource */ 1507); +/* harmony import */ var _anasayfa_component_css_ngResource__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_anasayfa_component_css_ngResource__WEBPACK_IMPORTED_MODULE_1__); +/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @angular/core */ 7580); +var __decorate = undefined && undefined.__decorate || function (decorators, target, key, desc) { + var c = arguments.length, + r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, + d; + if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; + return c > 3 && r && Object.defineProperty(target, key, r), r; +}; + + + +let AnasayfaComponent = class AnasayfaComponent { + constructor() { + this.header = {}; + } + ngOnInit() {} + getHeader() {} + static { + this.ctorParameters = () => []; + } +}; +AnasayfaComponent = __decorate([(0,_angular_core__WEBPACK_IMPORTED_MODULE_2__.Component)({ + selector: 'app-anasayfa', + template: _anasayfa_component_html_ngResource__WEBPACK_IMPORTED_MODULE_0__, + styles: [(_anasayfa_component_css_ngResource__WEBPACK_IMPORTED_MODULE_1___default())] +})], AnasayfaComponent); + + +/***/ }), + +/***/ 4114: +/*!***************************************!*\ + !*** ./src/app/app-routing.module.ts ***! + \***************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ AppRoutingModule: () => (/* binding */ AppRoutingModule) +/* harmony export */ }); +/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! @angular/core */ 7580); +/* harmony import */ var _angular_common__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! @angular/common */ 316); +/* harmony import */ var _angular_router__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! @angular/router */ 5072); +/* harmony import */ var _hizmetlerimiz_hizmetlerimiz_component__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./hizmetlerimiz/hizmetlerimiz.component */ 4152); +/* harmony import */ var _siteg_rselleri_siteg_rselleri_component__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./sitegörselleri/sitegörselleri.component */ 2590); +/* harmony import */ var _genelkurul_genelkurul_component__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./genelkurul/genelkurul.component */ 6966); +/* harmony import */ var _kurumsal_kurumsal_component__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./kurumsal/kurumsal.component */ 3634); +/* harmony import */ var _iletisim_iletisim_component__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./iletisim/iletisim.component */ 1150); +/* harmony import */ var _anasayfa_anasayfa_component__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./anasayfa/anasayfa.component */ 2145); +/* harmony import */ var _faaliyet_faaliyet_component__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./faaliyet/faaliyet.component */ 6744); +/* harmony import */ var _duyurular_duyurular_component__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./duyurular/duyurular.component */ 3632); +/* harmony import */ var _duyurular_duyuru1_duyuru1_component__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./duyurular/duyuru1/duyuru1.component */ 4476); +/* harmony import */ var _duyurular_duyuru2_duyuru2_component__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./duyurular/duyuru2/duyuru2.component */ 1744); +/* harmony import */ var _duyurular_duyuru3_duyuru3_component__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./duyurular/duyuru3/duyuru3.component */ 6884); +var __decorate = undefined && undefined.__decorate || function (decorators, target, key, desc) { + var c = arguments.length, + r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, + d; + if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; + return c > 3 && r && Object.defineProperty(target, key, r), r; +}; + + + + + + + + + + + + + + +const routes = [{ + path: '', + redirectTo: '/Anasayfa', + pathMatch: 'full' +}, { + path: 'Anasayfa', + component: _anasayfa_anasayfa_component__WEBPACK_IMPORTED_MODULE_5__.AnasayfaComponent +}, { + path: 'Kurumsal', + component: _kurumsal_kurumsal_component__WEBPACK_IMPORTED_MODULE_3__.KurumsalComponent +}, { + path: 'Hizmetlerimiz', + component: _hizmetlerimiz_hizmetlerimiz_component__WEBPACK_IMPORTED_MODULE_0__.HizmetlerimizComponent +}, { + path: 'Sitegörselleri', + component: _siteg_rselleri_siteg_rselleri_component__WEBPACK_IMPORTED_MODULE_1__["SitegörselleriComponent"] +}, { + path: 'Duyurular', + component: _duyurular_duyurular_component__WEBPACK_IMPORTED_MODULE_7__.DuyurularComponent +}, { + path: 'Duyurular/Duyuru1', + component: _duyurular_duyuru1_duyuru1_component__WEBPACK_IMPORTED_MODULE_8__.Duyuru1Component +}, { + path: 'Duyurular/Duyuru2', + component: _duyurular_duyuru2_duyuru2_component__WEBPACK_IMPORTED_MODULE_9__.Duyuru2Component +}, { + path: 'Duyurular/Duyuru3', + component: _duyurular_duyuru3_duyuru3_component__WEBPACK_IMPORTED_MODULE_10__.Duyuru3Component +}, { + path: 'Genelkurul', + component: _genelkurul_genelkurul_component__WEBPACK_IMPORTED_MODULE_2__.GenelkurulComponent +}, { + path: 'Faaliyet', + component: _faaliyet_faaliyet_component__WEBPACK_IMPORTED_MODULE_6__.FaaliyetComponent +}, { + path: 'Iletisim', + component: _iletisim_iletisim_component__WEBPACK_IMPORTED_MODULE_4__.IletisimComponent +}]; +let AppRoutingModule = class AppRoutingModule {}; +AppRoutingModule = __decorate([(0,_angular_core__WEBPACK_IMPORTED_MODULE_11__.NgModule)({ + imports: [_angular_common__WEBPACK_IMPORTED_MODULE_12__.CommonModule, _angular_router__WEBPACK_IMPORTED_MODULE_13__.RouterModule.forRoot(routes)], + exports: [_angular_router__WEBPACK_IMPORTED_MODULE_13__.RouterModule], + declarations: [] +})], AppRoutingModule); + + +/***/ }), + +/***/ 92: +/*!**********************************!*\ + !*** ./src/app/app.component.ts ***! + \**********************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ AppComponent: () => (/* binding */ AppComponent) +/* harmony export */ }); +/* harmony import */ var _app_component_html_ngResource__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./app.component.html?ngResource */ 1584); +/* harmony import */ var _app_component_css_ngResource__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./app.component.css?ngResource */ 309); +/* harmony import */ var _app_component_css_ngResource__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_app_component_css_ngResource__WEBPACK_IMPORTED_MODULE_1__); +/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @angular/core */ 7580); +var __decorate = undefined && undefined.__decorate || function (decorators, target, key, desc) { + var c = arguments.length, + r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, + d; + if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; + return c > 3 && r && Object.defineProperty(target, key, r), r; +}; + + + +let AppComponent = class AppComponent { + constructor() { + this.title = 'Kargi-Sitesi'; + } +}; +AppComponent = __decorate([(0,_angular_core__WEBPACK_IMPORTED_MODULE_2__.Component)({ + selector: 'app-root', + template: _app_component_html_ngResource__WEBPACK_IMPORTED_MODULE_0__, + styles: [(_app_component_css_ngResource__WEBPACK_IMPORTED_MODULE_1___default())] +})], AppComponent); + + +/***/ }), + +/***/ 635: +/*!*******************************!*\ + !*** ./src/app/app.module.ts ***! + \*******************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__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_19__ = __webpack_require__(/*! @angular/platform-browser */ 436); +/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! @angular/core */ 7580); +/* harmony import */ var _app_component__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./app.component */ 92); +/* harmony import */ var _hizmetlerimiz_hizmetlerimiz_component__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./hizmetlerimiz/hizmetlerimiz.component */ 4152); +/* harmony import */ var _siteg_rselleri_siteg_rselleri_component__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./sitegörselleri/sitegörselleri.component */ 2590); +/* harmony import */ var _genelkurul_genelkurul_component__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./genelkurul/genelkurul.component */ 6966); +/* harmony import */ var _faaliyet_faaliyet_component__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./faaliyet/faaliyet.component */ 6744); +/* harmony import */ var _kurumsal_kurumsal_component__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./kurumsal/kurumsal.component */ 3634); +/* harmony import */ var _footer_footer_component__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./footer/footer.component */ 708); +/* harmony import */ var _duyurular_duyurular_component__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./duyurular/duyurular.component */ 3632); +/* harmony import */ var _iletisim_iletisim_component__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./iletisim/iletisim.component */ 1150); +/* harmony import */ var _anasayfa_anasayfa_component__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./anasayfa/anasayfa.component */ 2145); +/* harmony import */ var _social_social_component__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./social/social.component */ 8880); +/* harmony import */ var _navigation_navigation_component__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./navigation/navigation.component */ 5150); +/* harmony import */ var _duyurular_duyuru1_duyuru1_component__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./duyurular/duyuru1/duyuru1.component */ 4476); +/* harmony import */ var _duyurular_duyuru2_duyuru2_component__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./duyurular/duyuru2/duyuru2.component */ 1744); +/* harmony import */ var _duyurular_duyuru3_duyuru3_component__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ./duyurular/duyuru3/duyuru3.component */ 6884); +/* harmony import */ var _app_routing_module__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ./app-routing.module */ 4114); +/* harmony import */ var _angular_forms__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! @angular/forms */ 4456); +/* harmony import */ var _services_service__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ./services.service */ 8798); +/* harmony import */ var _angular_common_http__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! @angular/common/http */ 6443); +var __decorate = undefined && undefined.__decorate || function (decorators, target, key, desc) { + var c = arguments.length, + r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, + d; + if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; + return c > 3 && r && Object.defineProperty(target, key, r), r; +}; + + + + + + + + + + + + + + + + + + +/*import { AgmCoreModule } from '@agm/core';*/ //AGM Module is deprecated. + + + +let AppModule = class AppModule {}; +AppModule = __decorate([(0,_angular_core__WEBPACK_IMPORTED_MODULE_17__.NgModule)({ + declarations: [_app_component__WEBPACK_IMPORTED_MODULE_0__.AppComponent, _hizmetlerimiz_hizmetlerimiz_component__WEBPACK_IMPORTED_MODULE_1__.HizmetlerimizComponent, _siteg_rselleri_siteg_rselleri_component__WEBPACK_IMPORTED_MODULE_2__["SitegörselleriComponent"], _genelkurul_genelkurul_component__WEBPACK_IMPORTED_MODULE_3__.GenelkurulComponent, _faaliyet_faaliyet_component__WEBPACK_IMPORTED_MODULE_4__.FaaliyetComponent, _kurumsal_kurumsal_component__WEBPACK_IMPORTED_MODULE_5__.KurumsalComponent, _footer_footer_component__WEBPACK_IMPORTED_MODULE_6__.FooterComponent, _iletisim_iletisim_component__WEBPACK_IMPORTED_MODULE_8__.IletisimComponent, _duyurular_duyurular_component__WEBPACK_IMPORTED_MODULE_7__.DuyurularComponent, _anasayfa_anasayfa_component__WEBPACK_IMPORTED_MODULE_9__.AnasayfaComponent, _duyurular_duyuru1_duyuru1_component__WEBPACK_IMPORTED_MODULE_12__.Duyuru1Component, _duyurular_duyuru2_duyuru2_component__WEBPACK_IMPORTED_MODULE_13__.Duyuru2Component, _duyurular_duyuru3_duyuru3_component__WEBPACK_IMPORTED_MODULE_14__.Duyuru3Component, _social_social_component__WEBPACK_IMPORTED_MODULE_10__.SocialComponent, _navigation_navigation_component__WEBPACK_IMPORTED_MODULE_11__.NavigationComponent], + bootstrap: [_app_component__WEBPACK_IMPORTED_MODULE_0__.AppComponent], + imports: [_angular_forms__WEBPACK_IMPORTED_MODULE_18__.FormsModule, _angular_forms__WEBPACK_IMPORTED_MODULE_18__.ReactiveFormsModule, _angular_platform_browser__WEBPACK_IMPORTED_MODULE_19__.BrowserModule, _app_routing_module__WEBPACK_IMPORTED_MODULE_15__.AppRoutingModule + /*AgmCoreModule.forRoot({ + apiKey: 'AIzaSyC5TiZoTEwEcB_HUZRhe_rXrcSWW1Z5x8I' + })*/ //AGM Module is deprecated. + ], + providers: [_services_service__WEBPACK_IMPORTED_MODULE_16__.ServicesService, (0,_angular_common_http__WEBPACK_IMPORTED_MODULE_20__.provideHttpClient)((0,_angular_common_http__WEBPACK_IMPORTED_MODULE_20__.withInterceptorsFromDi)())] +})], AppModule); + + +/***/ }), + +/***/ 4476: +/*!********************************************************!*\ + !*** ./src/app/duyurular/duyuru1/duyuru1.component.ts ***! + \********************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ Duyuru1Component: () => (/* binding */ Duyuru1Component) +/* harmony export */ }); +/* harmony import */ var _duyuru1_component_html_ngResource__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./duyuru1.component.html?ngResource */ 9784); +/* harmony import */ var _duyuru1_component_css_ngResource__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./duyuru1.component.css?ngResource */ 3549); +/* harmony import */ var _duyuru1_component_css_ngResource__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_duyuru1_component_css_ngResource__WEBPACK_IMPORTED_MODULE_1__); +/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @angular/core */ 7580); +var __decorate = undefined && undefined.__decorate || function (decorators, target, key, desc) { + var c = arguments.length, + r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, + d; + if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; + return c > 3 && r && Object.defineProperty(target, key, r), r; +}; + + + +let Duyuru1Component = class Duyuru1Component { + constructor() {} + ngOnInit() {} + static { + this.ctorParameters = () => []; + } +}; +Duyuru1Component = __decorate([(0,_angular_core__WEBPACK_IMPORTED_MODULE_2__.Component)({ + selector: "app-duyuru1", + template: _duyuru1_component_html_ngResource__WEBPACK_IMPORTED_MODULE_0__, + styles: [(_duyuru1_component_css_ngResource__WEBPACK_IMPORTED_MODULE_1___default())] +})], Duyuru1Component); + + +/***/ }), + +/***/ 1744: +/*!********************************************************!*\ + !*** ./src/app/duyurular/duyuru2/duyuru2.component.ts ***! + \********************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ Duyuru2Component: () => (/* binding */ Duyuru2Component) +/* harmony export */ }); +/* harmony import */ var _duyuru2_component_html_ngResource__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./duyuru2.component.html?ngResource */ 3428); +/* harmony import */ var _duyuru2_component_css_ngResource__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./duyuru2.component.css?ngResource */ 7121); +/* harmony import */ var _duyuru2_component_css_ngResource__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_duyuru2_component_css_ngResource__WEBPACK_IMPORTED_MODULE_1__); +/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @angular/core */ 7580); +var __decorate = undefined && undefined.__decorate || function (decorators, target, key, desc) { + var c = arguments.length, + r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, + d; + if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; + return c > 3 && r && Object.defineProperty(target, key, r), r; +}; + + + +let Duyuru2Component = class Duyuru2Component { + constructor() {} + ngOnInit() {} + static { + this.ctorParameters = () => []; + } +}; +Duyuru2Component = __decorate([(0,_angular_core__WEBPACK_IMPORTED_MODULE_2__.Component)({ + selector: "app-duyuru2", + template: _duyuru2_component_html_ngResource__WEBPACK_IMPORTED_MODULE_0__, + styles: [(_duyuru2_component_css_ngResource__WEBPACK_IMPORTED_MODULE_1___default())] +})], Duyuru2Component); + + +/***/ }), + +/***/ 6884: +/*!********************************************************!*\ + !*** ./src/app/duyurular/duyuru3/duyuru3.component.ts ***! + \********************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ Duyuru3Component: () => (/* binding */ Duyuru3Component) +/* harmony export */ }); +/* harmony import */ var _duyuru3_component_html_ngResource__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./duyuru3.component.html?ngResource */ 9616); +/* harmony import */ var _duyuru3_component_css_ngResource__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./duyuru3.component.css?ngResource */ 8061); +/* harmony import */ var _duyuru3_component_css_ngResource__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_duyuru3_component_css_ngResource__WEBPACK_IMPORTED_MODULE_1__); +/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @angular/core */ 7580); +var __decorate = undefined && undefined.__decorate || function (decorators, target, key, desc) { + var c = arguments.length, + r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, + d; + if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; + return c > 3 && r && Object.defineProperty(target, key, r), r; +}; + + + +let Duyuru3Component = class Duyuru3Component { + constructor() {} + ngOnInit() {} + static { + this.ctorParameters = () => []; + } +}; +Duyuru3Component = __decorate([(0,_angular_core__WEBPACK_IMPORTED_MODULE_2__.Component)({ + selector: "app-duyuru3", + template: _duyuru3_component_html_ngResource__WEBPACK_IMPORTED_MODULE_0__, + styles: [(_duyuru3_component_css_ngResource__WEBPACK_IMPORTED_MODULE_1___default())] +})], Duyuru3Component); + + +/***/ }), + +/***/ 3632: +/*!**************************************************!*\ + !*** ./src/app/duyurular/duyurular.component.ts ***! + \**************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ DuyurularComponent: () => (/* binding */ DuyurularComponent) +/* harmony export */ }); +/* harmony import */ var _duyurular_component_html_ngResource__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./duyurular.component.html?ngResource */ 1776); +/* harmony import */ var _duyurular_component_css_ngResource__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./duyurular.component.css?ngResource */ 6417); +/* harmony import */ var _duyurular_component_css_ngResource__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_duyurular_component_css_ngResource__WEBPACK_IMPORTED_MODULE_1__); +/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @angular/core */ 7580); +var __decorate = undefined && undefined.__decorate || function (decorators, target, key, desc) { + var c = arguments.length, + r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, + d; + if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; + return c > 3 && r && Object.defineProperty(target, key, r), r; +}; + + + +let DuyurularComponent = class DuyurularComponent { + constructor() { + this.imgSrc = "assets/images/duyuru-images/duyuru.jpg"; + this.imgSrc2 = "assets/images/duyuru-images/duyuru.jpg"; + this.imgSrc3 = "assets/images/duyuru-images/duyuru.jpg"; + } + ngOnInit() {} + onMouseOver() { + this.imgSrc = "assets/images/duyuru-images/duyuru-2.jpg"; + } + onMouseOut() { + this.imgSrc = "assets/images/duyuru-images/duyuru.jpg"; + } + onMouseOver2() { + this.imgSrc2 = "assets/images/duyuru-images/duyuru-2.jpg"; + } + onMouseOut2() { + this.imgSrc2 = "assets/images/duyuru-images/duyuru.jpg"; + } + onMouseOver3() { + this.imgSrc3 = "assets/images/duyuru-images/duyuru-2.jpg"; + } + onMouseOut3() { + this.imgSrc3 = "assets/images/duyuru-images/duyuru.jpg"; + } + static { + this.ctorParameters = () => []; + } +}; +DuyurularComponent = __decorate([(0,_angular_core__WEBPACK_IMPORTED_MODULE_2__.Component)({ + selector: 'app-duyurular', + template: _duyurular_component_html_ngResource__WEBPACK_IMPORTED_MODULE_0__, + styles: [(_duyurular_component_css_ngResource__WEBPACK_IMPORTED_MODULE_1___default())] +})], DuyurularComponent); + + +/***/ }), + +/***/ 6744: +/*!************************************************!*\ + !*** ./src/app/faaliyet/faaliyet.component.ts ***! + \************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ FaaliyetComponent: () => (/* binding */ FaaliyetComponent) +/* harmony export */ }); +/* harmony import */ var _faaliyet_component_html_ngResource__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./faaliyet.component.html?ngResource */ 3008); +/* harmony import */ var _faaliyet_component_css_ngResource__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./faaliyet.component.css?ngResource */ 3121); +/* harmony import */ var _faaliyet_component_css_ngResource__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_faaliyet_component_css_ngResource__WEBPACK_IMPORTED_MODULE_1__); +/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @angular/core */ 7580); +var __decorate = undefined && undefined.__decorate || function (decorators, target, key, desc) { + var c = arguments.length, + r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, + d; + if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; + return c > 3 && r && Object.defineProperty(target, key, r), r; +}; + + + +let FaaliyetComponent = class FaaliyetComponent { + constructor() {} + ngOnInit() {} + static { + this.ctorParameters = () => []; + } +}; +FaaliyetComponent = __decorate([(0,_angular_core__WEBPACK_IMPORTED_MODULE_2__.Component)({ + selector: "app-faaliyet", + template: _faaliyet_component_html_ngResource__WEBPACK_IMPORTED_MODULE_0__, + styles: [(_faaliyet_component_css_ngResource__WEBPACK_IMPORTED_MODULE_1___default())] +})], FaaliyetComponent); + + +/***/ }), + +/***/ 708: +/*!********************************************!*\ + !*** ./src/app/footer/footer.component.ts ***! + \********************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ FooterComponent: () => (/* binding */ FooterComponent) +/* harmony export */ }); +/* harmony import */ var _footer_component_html_ngResource__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./footer.component.html?ngResource */ 6756); +/* harmony import */ var _footer_component_css_ngResource__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./footer.component.css?ngResource */ 9401); +/* harmony import */ var _footer_component_css_ngResource__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_footer_component_css_ngResource__WEBPACK_IMPORTED_MODULE_1__); +/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @angular/core */ 7580); +var __decorate = undefined && undefined.__decorate || function (decorators, target, key, desc) { + var c = arguments.length, + r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, + d; + if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; + return c > 3 && r && Object.defineProperty(target, key, r), r; +}; + + + +let FooterComponent = class FooterComponent { + constructor() { + this.lat = 8.988759; + this.lng = 38.788968; + } + ngOnInit() {} + static { + this.ctorParameters = () => []; + } +}; +FooterComponent = __decorate([(0,_angular_core__WEBPACK_IMPORTED_MODULE_2__.Component)({ + selector: "app-footer", + template: _footer_component_html_ngResource__WEBPACK_IMPORTED_MODULE_0__, + styles: [(_footer_component_css_ngResource__WEBPACK_IMPORTED_MODULE_1___default())] +})], FooterComponent); + + +/***/ }), + +/***/ 6966: +/*!****************************************************!*\ + !*** ./src/app/genelkurul/genelkurul.component.ts ***! + \****************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ GenelkurulComponent: () => (/* binding */ GenelkurulComponent) +/* harmony export */ }); +/* harmony import */ var _genelkurul_component_html_ngResource__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./genelkurul.component.html?ngResource */ 3046); +/* harmony import */ var _genelkurul_component_css_ngResource__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./genelkurul.component.css?ngResource */ 7695); +/* harmony import */ var _genelkurul_component_css_ngResource__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_genelkurul_component_css_ngResource__WEBPACK_IMPORTED_MODULE_1__); +/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @angular/core */ 7580); +var __decorate = undefined && undefined.__decorate || function (decorators, target, key, desc) { + var c = arguments.length, + r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, + d; + if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; + return c > 3 && r && Object.defineProperty(target, key, r), r; +}; + + + +let GenelkurulComponent = class GenelkurulComponent { + constructor() {} + ngOnInit() {} + static { + this.ctorParameters = () => []; + } +}; +GenelkurulComponent = __decorate([(0,_angular_core__WEBPACK_IMPORTED_MODULE_2__.Component)({ + selector: "app-genelkurul", + template: _genelkurul_component_html_ngResource__WEBPACK_IMPORTED_MODULE_0__, + styles: [(_genelkurul_component_css_ngResource__WEBPACK_IMPORTED_MODULE_1___default())] +})], GenelkurulComponent); + + +/***/ }), + +/***/ 4152: +/*!**********************************************************!*\ + !*** ./src/app/hizmetlerimiz/hizmetlerimiz.component.ts ***! + \**********************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ HizmetlerimizComponent: () => (/* binding */ HizmetlerimizComponent) +/* harmony export */ }); +/* harmony import */ var _hizmetlerimiz_component_html_ngResource__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./hizmetlerimiz.component.html?ngResource */ 8800); +/* harmony import */ var _hizmetlerimiz_component_css_ngResource__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./hizmetlerimiz.component.css?ngResource */ 4457); +/* harmony import */ var _hizmetlerimiz_component_css_ngResource__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_hizmetlerimiz_component_css_ngResource__WEBPACK_IMPORTED_MODULE_1__); +/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @angular/core */ 7580); +var __decorate = undefined && undefined.__decorate || function (decorators, target, key, desc) { + var c = arguments.length, + r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, + d; + if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; + return c > 3 && r && Object.defineProperty(target, key, r), r; +}; + + + +let HizmetlerimizComponent = class HizmetlerimizComponent { + constructor() {} + ngOnInit() {} + static { + this.ctorParameters = () => []; + } +}; +HizmetlerimizComponent = __decorate([(0,_angular_core__WEBPACK_IMPORTED_MODULE_2__.Component)({ + selector: "app-intro", + template: _hizmetlerimiz_component_html_ngResource__WEBPACK_IMPORTED_MODULE_0__, + styles: [(_hizmetlerimiz_component_css_ngResource__WEBPACK_IMPORTED_MODULE_1___default())] +})], HizmetlerimizComponent); + + +/***/ }), + +/***/ 1150: +/*!************************************************!*\ + !*** ./src/app/iletisim/iletisim.component.ts ***! + \************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ IletisimComponent: () => (/* binding */ IletisimComponent) +/* harmony export */ }); +/* harmony import */ var _iletisim_component_html_ngResource__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./iletisim.component.html?ngResource */ 5678); +/* harmony import */ var _iletisim_component_css_ngResource__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./iletisim.component.css?ngResource */ 5587); +/* harmony import */ var _iletisim_component_css_ngResource__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_iletisim_component_css_ngResource__WEBPACK_IMPORTED_MODULE_1__); +/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @angular/core */ 7580); +/* harmony import */ var _angular_forms__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @angular/forms */ 4456); +/* harmony import */ var _services_service__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../services.service */ 8798); +var __decorate = undefined && undefined.__decorate || function (decorators, target, key, desc) { + var c = arguments.length, + r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, + d; + if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; + return c > 3 && r && Object.defineProperty(target, key, r), r; +}; + + + + + +let IletisimComponent = class IletisimComponent { + constructor(builder, contact) { + this.builder = builder; + this.contact = contact; + this.lat = 37.00850309346716; + this.lng = 27.32525836435135; + } + ngOnInit() { + this.FormData = this.builder.group({ + Name: new _angular_forms__WEBPACK_IMPORTED_MODULE_3__.UntypedFormControl('', [_angular_forms__WEBPACK_IMPORTED_MODULE_3__.Validators.required]), + Email: new _angular_forms__WEBPACK_IMPORTED_MODULE_3__.UntypedFormControl('', [_angular_forms__WEBPACK_IMPORTED_MODULE_3__.Validators.compose([_angular_forms__WEBPACK_IMPORTED_MODULE_3__.Validators.required, _angular_forms__WEBPACK_IMPORTED_MODULE_3__.Validators.email])]), + Phone: new _angular_forms__WEBPACK_IMPORTED_MODULE_3__.UntypedFormControl('', [_angular_forms__WEBPACK_IMPORTED_MODULE_3__.Validators.pattern("^[0-9]*$")]), + Message: new _angular_forms__WEBPACK_IMPORTED_MODULE_3__.UntypedFormControl('', [_angular_forms__WEBPACK_IMPORTED_MODULE_3__.Validators.required]) + }); + } + get Name() { + return this.FormData.get('Name'); + } + get Email() { + return this.FormData.get('Email'); + } + get Phone() { + return this.FormData.get('Phone'); + } + get Message() { + return this.FormData.get('Message'); + } + onSubmit(FormData) { + console.log(FormData); + this.contact.PostMessage(FormData).subscribe(response => { + location.href = 'https://mailthis.to/confirm'; + console.log(response); + }, error => { + console.warn(error.responseText); + console.log({ + error + }); + }); + } + static { + this.ctorParameters = () => [{ + type: _angular_forms__WEBPACK_IMPORTED_MODULE_3__.UntypedFormBuilder + }, { + type: _services_service__WEBPACK_IMPORTED_MODULE_2__.ServicesService + }]; + } +}; +IletisimComponent = __decorate([(0,_angular_core__WEBPACK_IMPORTED_MODULE_4__.Component)({ + selector: 'app-iletisim', + template: _iletisim_component_html_ngResource__WEBPACK_IMPORTED_MODULE_0__, + styles: [(_iletisim_component_css_ngResource__WEBPACK_IMPORTED_MODULE_1___default())] +})], IletisimComponent); + + +/***/ }), + +/***/ 3634: +/*!************************************************!*\ + !*** ./src/app/kurumsal/kurumsal.component.ts ***! + \************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ KurumsalComponent: () => (/* binding */ KurumsalComponent) +/* harmony export */ }); +/* harmony import */ var _kurumsal_component_html_ngResource__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./kurumsal.component.html?ngResource */ 9690); +/* harmony import */ var _kurumsal_component_css_ngResource__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./kurumsal.component.css?ngResource */ 9055); +/* harmony import */ var _kurumsal_component_css_ngResource__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_kurumsal_component_css_ngResource__WEBPACK_IMPORTED_MODULE_1__); +/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @angular/core */ 7580); +var __decorate = undefined && undefined.__decorate || function (decorators, target, key, desc) { + var c = arguments.length, + r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, + d; + if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; + return c > 3 && r && Object.defineProperty(target, key, r), r; +}; + + + +let KurumsalComponent = class KurumsalComponent { + constructor() {} + ngOnInit() {} + static { + this.ctorParameters = () => []; + } +}; +KurumsalComponent = __decorate([(0,_angular_core__WEBPACK_IMPORTED_MODULE_2__.Component)({ + selector: 'app-kurumsal', + template: _kurumsal_component_html_ngResource__WEBPACK_IMPORTED_MODULE_0__, + styles: [(_kurumsal_component_css_ngResource__WEBPACK_IMPORTED_MODULE_1___default())] +})], KurumsalComponent); + + +/***/ }), + +/***/ 5150: +/*!****************************************************!*\ + !*** ./src/app/navigation/navigation.component.ts ***! + \****************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ NavigationComponent: () => (/* binding */ NavigationComponent) +/* harmony export */ }); +/* harmony import */ var _navigation_component_html_ngResource__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./navigation.component.html?ngResource */ 9230); +/* harmony import */ var _navigation_component_css_ngResource__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./navigation.component.css?ngResource */ 8091); +/* harmony import */ var _navigation_component_css_ngResource__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_navigation_component_css_ngResource__WEBPACK_IMPORTED_MODULE_1__); +/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @angular/core */ 7580); +var __decorate = undefined && undefined.__decorate || function (decorators, target, key, desc) { + var c = arguments.length, + r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, + d; + if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; + return c > 3 && r && Object.defineProperty(target, key, r), r; +}; + + + +let NavigationComponent = class NavigationComponent { + constructor() { + this.activetab = "home"; + } + ngOnInit() {} + getActiveTab(tabname) { + this.activetab = tabname; + } + static { + this.ctorParameters = () => []; + } +}; +NavigationComponent = __decorate([(0,_angular_core__WEBPACK_IMPORTED_MODULE_2__.Component)({ + selector: "app-navigation", + template: _navigation_component_html_ngResource__WEBPACK_IMPORTED_MODULE_0__, + styles: [(_navigation_component_css_ngResource__WEBPACK_IMPORTED_MODULE_1___default())] +})], NavigationComponent); + + +/***/ }), + +/***/ 8798: +/*!*************************************!*\ + !*** ./src/app/services.service.ts ***! + \*************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ ServicesService: () => (/* binding */ ServicesService) +/* harmony export */ }); +/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @angular/core */ 7580); +/* harmony import */ var _angular_common_http__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @angular/common/http */ 6443); +/* harmony import */ var rxjs_operators__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! rxjs/operators */ 5443); +var __decorate = undefined && undefined.__decorate || function (decorators, target, key, desc) { + var c = arguments.length, + r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, + d; + if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; + return c > 3 && r && Object.defineProperty(target, key, r), r; +}; + + + +let ServicesService = class ServicesService { + constructor(http) { + this.http = http; + this.mailApi = 'https://mailthis.to/kargisitesi@gmail.com'; + } + PostMessage(input) { + return this.http.post(this.mailApi, input, { + responseType: 'text' + }).pipe((0,rxjs_operators__WEBPACK_IMPORTED_MODULE_0__.map)(response => { + if (response) { + return response; + } + }, error => { + return error; + })); + } + static { + this.ctorParameters = () => [{ + type: _angular_common_http__WEBPACK_IMPORTED_MODULE_1__.HttpClient + }]; + } +}; +ServicesService = __decorate([(0,_angular_core__WEBPACK_IMPORTED_MODULE_2__.Injectable)({ + providedIn: 'root' +})], ServicesService); + + +/***/ }), + +/***/ 2590: +/*!************************************************************!*\ + !*** ./src/app/sitegörselleri/sitegörselleri.component.ts ***! + \************************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "SitegörselleriComponent": () => (/* binding */ SitegörselleriComponent) +/* harmony export */ }); +/* harmony import */ var _siteg_rselleri_component_html_ngResource__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./sitegörselleri.component.html?ngResource */ 7494); +/* harmony import */ var _siteg_rselleri_component_css_ngResource__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./sitegörselleri.component.css?ngResource */ 7783); +/* harmony import */ var _siteg_rselleri_component_css_ngResource__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_siteg_rselleri_component_css_ngResource__WEBPACK_IMPORTED_MODULE_1__); +/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @angular/core */ 7580); +var __decorate = undefined && undefined.__decorate || function (decorators, target, key, desc) { + var c = arguments.length, + r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, + d; + if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; + return c > 3 && r && Object.defineProperty(target, key, r), r; +}; + + + +let SitegörselleriComponent = class SitegörselleriComponent { + constructor() {} + ngOnInit() {} + static { + this.ctorParameters = () => []; + } +}; +SitegörselleriComponent = __decorate([(0,_angular_core__WEBPACK_IMPORTED_MODULE_2__.Component)({ + selector: "app-sitegörselleri", + template: _siteg_rselleri_component_html_ngResource__WEBPACK_IMPORTED_MODULE_0__, + styles: [(_siteg_rselleri_component_css_ngResource__WEBPACK_IMPORTED_MODULE_1___default())] +})], SitegörselleriComponent); + + +/***/ }), + +/***/ 8880: +/*!********************************************!*\ + !*** ./src/app/social/social.component.ts ***! + \********************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ SocialComponent: () => (/* binding */ SocialComponent) +/* harmony export */ }); +/* harmony import */ var _social_component_html_ngResource__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./social.component.html?ngResource */ 7608); +/* harmony import */ var _social_component_css_ngResource__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./social.component.css?ngResource */ 241); +/* harmony import */ var _social_component_css_ngResource__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_social_component_css_ngResource__WEBPACK_IMPORTED_MODULE_1__); +/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @angular/core */ 7580); +var __decorate = undefined && undefined.__decorate || function (decorators, target, key, desc) { + var c = arguments.length, + r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, + d; + if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; + return c > 3 && r && Object.defineProperty(target, key, r), r; +}; + + + +let SocialComponent = class SocialComponent { + constructor() {} + ngOnInit() {} + static { + this.ctorParameters = () => []; + } +}; +SocialComponent = __decorate([(0,_angular_core__WEBPACK_IMPORTED_MODULE_2__.Component)({ + selector: 'app-social', + template: _social_component_html_ngResource__WEBPACK_IMPORTED_MODULE_0__, + styles: [(_social_component_css_ngResource__WEBPACK_IMPORTED_MODULE_1___default())] +})], SocialComponent); + + +/***/ }), + +/***/ 5312: +/*!*****************************************!*\ + !*** ./src/environments/environment.ts ***! + \*****************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__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 --prod` replaces `environment.ts` with `environment.prod.ts`. +// The list of file replacements can be found in `angular.json`. +const environment = { + production: false +}; +/* + * 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. + +/***/ }), + +/***/ 4429: +/*!*********************!*\ + !*** ./src/main.ts ***! + \*********************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @angular/core */ 7580); +/* harmony import */ var _angular_platform_browser_dynamic__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @angular/platform-browser-dynamic */ 2476); +/* harmony import */ var _app_app_module__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./app/app.module */ 635); +/* harmony import */ var _environments_environment__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./environments/environment */ 5312); + + + + +if (_environments_environment__WEBPACK_IMPORTED_MODULE_1__.environment.production) { + (0,_angular_core__WEBPACK_IMPORTED_MODULE_2__.enableProdMode)(); +} +(0,_angular_platform_browser_dynamic__WEBPACK_IMPORTED_MODULE_3__.platformBrowserDynamic)().bootstrapModule(_app_app_module__WEBPACK_IMPORTED_MODULE_0__.AppModule).catch(err => console.log(err)); + +/***/ }), + +/***/ 1507: +/*!************************************************************!*\ + !*** ./src/app/anasayfa/anasayfa.component.css?ngResource ***! + \************************************************************/ +/***/ ((module, __unused_webpack_exports, __webpack_require__) => { + +// Imports +var ___CSS_LOADER_API_SOURCEMAP_IMPORT___ = __webpack_require__(/*! ../../../node_modules/css-loader/dist/runtime/sourceMaps.js */ 3142); +var ___CSS_LOADER_API_IMPORT___ = __webpack_require__(/*! ../../../node_modules/css-loader/dist/runtime/api.js */ 5950); +var ___CSS_LOADER_EXPORT___ = ___CSS_LOADER_API_IMPORT___(___CSS_LOADER_API_SOURCEMAP_IMPORT___); +// Module +___CSS_LOADER_EXPORT___.push([module.id, ``, "",{"version":3,"sources":[],"names":[],"mappings":"","sourceRoot":""}]); +// Exports +module.exports = ___CSS_LOADER_EXPORT___.toString(); + + +/***/ }), + +/***/ 309: +/*!**********************************************!*\ + !*** ./src/app/app.component.css?ngResource ***! + \**********************************************/ +/***/ ((module, __unused_webpack_exports, __webpack_require__) => { + +// Imports +var ___CSS_LOADER_API_SOURCEMAP_IMPORT___ = __webpack_require__(/*! ../../node_modules/css-loader/dist/runtime/sourceMaps.js */ 3142); +var ___CSS_LOADER_API_IMPORT___ = __webpack_require__(/*! ../../node_modules/css-loader/dist/runtime/api.js */ 5950); +var ___CSS_LOADER_EXPORT___ = ___CSS_LOADER_API_IMPORT___(___CSS_LOADER_API_SOURCEMAP_IMPORT___); +// Module +___CSS_LOADER_EXPORT___.push([module.id, ` +`, "",{"version":3,"sources":[],"names":[],"mappings":"","sourceRoot":""}]); +// Exports +module.exports = ___CSS_LOADER_EXPORT___.toString(); + + +/***/ }), + +/***/ 3549: +/*!********************************************************************!*\ + !*** ./src/app/duyurular/duyuru1/duyuru1.component.css?ngResource ***! + \********************************************************************/ +/***/ ((module, __unused_webpack_exports, __webpack_require__) => { + +// Imports +var ___CSS_LOADER_API_SOURCEMAP_IMPORT___ = __webpack_require__(/*! ../../../../node_modules/css-loader/dist/runtime/sourceMaps.js */ 3142); +var ___CSS_LOADER_API_IMPORT___ = __webpack_require__(/*! ../../../../node_modules/css-loader/dist/runtime/api.js */ 5950); +var ___CSS_LOADER_EXPORT___ = ___CSS_LOADER_API_IMPORT___(___CSS_LOADER_API_SOURCEMAP_IMPORT___); +// Module +___CSS_LOADER_EXPORT___.push([module.id, ``, "",{"version":3,"sources":[],"names":[],"mappings":"","sourceRoot":""}]); +// Exports +module.exports = ___CSS_LOADER_EXPORT___.toString(); + + +/***/ }), + +/***/ 7121: +/*!********************************************************************!*\ + !*** ./src/app/duyurular/duyuru2/duyuru2.component.css?ngResource ***! + \********************************************************************/ +/***/ ((module, __unused_webpack_exports, __webpack_require__) => { + +// Imports +var ___CSS_LOADER_API_SOURCEMAP_IMPORT___ = __webpack_require__(/*! ../../../../node_modules/css-loader/dist/runtime/sourceMaps.js */ 3142); +var ___CSS_LOADER_API_IMPORT___ = __webpack_require__(/*! ../../../../node_modules/css-loader/dist/runtime/api.js */ 5950); +var ___CSS_LOADER_EXPORT___ = ___CSS_LOADER_API_IMPORT___(___CSS_LOADER_API_SOURCEMAP_IMPORT___); +// Module +___CSS_LOADER_EXPORT___.push([module.id, ``, "",{"version":3,"sources":[],"names":[],"mappings":"","sourceRoot":""}]); +// Exports +module.exports = ___CSS_LOADER_EXPORT___.toString(); + + +/***/ }), + +/***/ 8061: +/*!********************************************************************!*\ + !*** ./src/app/duyurular/duyuru3/duyuru3.component.css?ngResource ***! + \********************************************************************/ +/***/ ((module, __unused_webpack_exports, __webpack_require__) => { + +// Imports +var ___CSS_LOADER_API_SOURCEMAP_IMPORT___ = __webpack_require__(/*! ../../../../node_modules/css-loader/dist/runtime/sourceMaps.js */ 3142); +var ___CSS_LOADER_API_IMPORT___ = __webpack_require__(/*! ../../../../node_modules/css-loader/dist/runtime/api.js */ 5950); +var ___CSS_LOADER_EXPORT___ = ___CSS_LOADER_API_IMPORT___(___CSS_LOADER_API_SOURCEMAP_IMPORT___); +// Module +___CSS_LOADER_EXPORT___.push([module.id, ``, "",{"version":3,"sources":[],"names":[],"mappings":"","sourceRoot":""}]); +// Exports +module.exports = ___CSS_LOADER_EXPORT___.toString(); + + +/***/ }), + +/***/ 6417: +/*!**************************************************************!*\ + !*** ./src/app/duyurular/duyurular.component.css?ngResource ***! + \**************************************************************/ +/***/ ((module, __unused_webpack_exports, __webpack_require__) => { + +// Imports +var ___CSS_LOADER_API_SOURCEMAP_IMPORT___ = __webpack_require__(/*! ../../../node_modules/css-loader/dist/runtime/sourceMaps.js */ 3142); +var ___CSS_LOADER_API_IMPORT___ = __webpack_require__(/*! ../../../node_modules/css-loader/dist/runtime/api.js */ 5950); +var ___CSS_LOADER_EXPORT___ = ___CSS_LOADER_API_IMPORT___(___CSS_LOADER_API_SOURCEMAP_IMPORT___); +// Module +___CSS_LOADER_EXPORT___.push([module.id, ``, "",{"version":3,"sources":[],"names":[],"mappings":"","sourceRoot":""}]); +// Exports +module.exports = ___CSS_LOADER_EXPORT___.toString(); + + +/***/ }), + +/***/ 3121: +/*!************************************************************!*\ + !*** ./src/app/faaliyet/faaliyet.component.css?ngResource ***! + \************************************************************/ +/***/ ((module, __unused_webpack_exports, __webpack_require__) => { + +// Imports +var ___CSS_LOADER_API_SOURCEMAP_IMPORT___ = __webpack_require__(/*! ../../../node_modules/css-loader/dist/runtime/sourceMaps.js */ 3142); +var ___CSS_LOADER_API_IMPORT___ = __webpack_require__(/*! ../../../node_modules/css-loader/dist/runtime/api.js */ 5950); +var ___CSS_LOADER_EXPORT___ = ___CSS_LOADER_API_IMPORT___(___CSS_LOADER_API_SOURCEMAP_IMPORT___); +// Module +___CSS_LOADER_EXPORT___.push([module.id, ``, "",{"version":3,"sources":[],"names":[],"mappings":"","sourceRoot":""}]); +// Exports +module.exports = ___CSS_LOADER_EXPORT___.toString(); + + +/***/ }), + +/***/ 9401: +/*!********************************************************!*\ + !*** ./src/app/footer/footer.component.css?ngResource ***! + \********************************************************/ +/***/ ((module, __unused_webpack_exports, __webpack_require__) => { + +// Imports +var ___CSS_LOADER_API_SOURCEMAP_IMPORT___ = __webpack_require__(/*! ../../../node_modules/css-loader/dist/runtime/sourceMaps.js */ 3142); +var ___CSS_LOADER_API_IMPORT___ = __webpack_require__(/*! ../../../node_modules/css-loader/dist/runtime/api.js */ 5950); +var ___CSS_LOADER_EXPORT___ = ___CSS_LOADER_API_IMPORT___(___CSS_LOADER_API_SOURCEMAP_IMPORT___); +// Module +___CSS_LOADER_EXPORT___.push([module.id, `a img:hover { + opacity: 0.7; +}`, "",{"version":3,"sources":["webpack://./src/app/footer/footer.component.css"],"names":[],"mappings":"AAAA;IACI,YAAY;AAChB","sourcesContent":["a img:hover {\n opacity: 0.7;\n}"],"sourceRoot":""}]); +// Exports +module.exports = ___CSS_LOADER_EXPORT___.toString(); + + +/***/ }), + +/***/ 7695: +/*!****************************************************************!*\ + !*** ./src/app/genelkurul/genelkurul.component.css?ngResource ***! + \****************************************************************/ +/***/ ((module, __unused_webpack_exports, __webpack_require__) => { + +// Imports +var ___CSS_LOADER_API_SOURCEMAP_IMPORT___ = __webpack_require__(/*! ../../../node_modules/css-loader/dist/runtime/sourceMaps.js */ 3142); +var ___CSS_LOADER_API_IMPORT___ = __webpack_require__(/*! ../../../node_modules/css-loader/dist/runtime/api.js */ 5950); +var ___CSS_LOADER_EXPORT___ = ___CSS_LOADER_API_IMPORT___(___CSS_LOADER_API_SOURCEMAP_IMPORT___); +// Module +___CSS_LOADER_EXPORT___.push([module.id, ``, "",{"version":3,"sources":[],"names":[],"mappings":"","sourceRoot":""}]); +// Exports +module.exports = ___CSS_LOADER_EXPORT___.toString(); + + +/***/ }), + +/***/ 4457: +/*!**********************************************************************!*\ + !*** ./src/app/hizmetlerimiz/hizmetlerimiz.component.css?ngResource ***! + \**********************************************************************/ +/***/ ((module, __unused_webpack_exports, __webpack_require__) => { + +// Imports +var ___CSS_LOADER_API_SOURCEMAP_IMPORT___ = __webpack_require__(/*! ../../../node_modules/css-loader/dist/runtime/sourceMaps.js */ 3142); +var ___CSS_LOADER_API_IMPORT___ = __webpack_require__(/*! ../../../node_modules/css-loader/dist/runtime/api.js */ 5950); +var ___CSS_LOADER_EXPORT___ = ___CSS_LOADER_API_IMPORT___(___CSS_LOADER_API_SOURCEMAP_IMPORT___); +// Module +___CSS_LOADER_EXPORT___.push([module.id, ``, "",{"version":3,"sources":[],"names":[],"mappings":"","sourceRoot":""}]); +// Exports +module.exports = ___CSS_LOADER_EXPORT___.toString(); + + +/***/ }), + +/***/ 5587: +/*!************************************************************!*\ + !*** ./src/app/iletisim/iletisim.component.css?ngResource ***! + \************************************************************/ +/***/ ((module, __unused_webpack_exports, __webpack_require__) => { + +// Imports +var ___CSS_LOADER_API_SOURCEMAP_IMPORT___ = __webpack_require__(/*! ../../../node_modules/css-loader/dist/runtime/sourceMaps.js */ 3142); +var ___CSS_LOADER_API_IMPORT___ = __webpack_require__(/*! ../../../node_modules/css-loader/dist/runtime/api.js */ 5950); +var ___CSS_LOADER_EXPORT___ = ___CSS_LOADER_API_IMPORT___(___CSS_LOADER_API_SOURCEMAP_IMPORT___); +// Module +___CSS_LOADER_EXPORT___.push([module.id, `agm-map { + height: 300px; +} + +.fcf-form-wrap { + max-width: 500px; + padding: 30px; + border-radius: 4px; + background-color: #ffffff; +} + +#fcf-form { + background-color: #ffffff; + color: #363636; +} + +.button.is-link { + background-color: #363636; + border-color: transparent; + color: #ffffff; +} + +.button.is-link:hover { + background-color: #808080; + color: #ffffff; + border-color: transparent; +} + +.button.is-link[disabled] { + background-color: #808080; + border-color: transparent; + box-shadow: none; +} + +`, "",{"version":3,"sources":["webpack://./src/app/iletisim/iletisim.component.css"],"names":[],"mappings":"AAAA;IACI,aAAa;AACjB;;AAEA;IACI,gBAAgB;IAChB,aAAa;IACb,kBAAkB;IAClB,yBAAyB;AAC7B;;AAEA;IACI,yBAAyB;IACzB,cAAc;AAClB;;AAEA;IACI,yBAAyB;IACzB,yBAAyB;IACzB,cAAc;AAClB;;AAEA;IACI,yBAAyB;IACzB,cAAc;IACd,yBAAyB;AAC7B;;AAEA;IACI,yBAAyB;IACzB,yBAAyB;IACzB,gBAAgB;AACpB","sourcesContent":["agm-map {\n height: 300px;\n}\n\n.fcf-form-wrap {\n max-width: 500px;\n padding: 30px;\n border-radius: 4px;\n background-color: #ffffff;\n}\n\n#fcf-form {\n background-color: #ffffff;\n color: #363636;\n}\n\n.button.is-link {\n background-color: #363636;\n border-color: transparent;\n color: #ffffff;\n}\n\n.button.is-link:hover {\n background-color: #808080;\n color: #ffffff;\n border-color: transparent;\n}\n\n.button.is-link[disabled] {\n background-color: #808080;\n border-color: transparent;\n box-shadow: none;\n}\n\n"],"sourceRoot":""}]); +// Exports +module.exports = ___CSS_LOADER_EXPORT___.toString(); + + +/***/ }), + +/***/ 9055: +/*!************************************************************!*\ + !*** ./src/app/kurumsal/kurumsal.component.css?ngResource ***! + \************************************************************/ +/***/ ((module, __unused_webpack_exports, __webpack_require__) => { + +// Imports +var ___CSS_LOADER_API_SOURCEMAP_IMPORT___ = __webpack_require__(/*! ../../../node_modules/css-loader/dist/runtime/sourceMaps.js */ 3142); +var ___CSS_LOADER_API_IMPORT___ = __webpack_require__(/*! ../../../node_modules/css-loader/dist/runtime/api.js */ 5950); +var ___CSS_LOADER_EXPORT___ = ___CSS_LOADER_API_IMPORT___(___CSS_LOADER_API_SOURCEMAP_IMPORT___); +// Module +___CSS_LOADER_EXPORT___.push([module.id, ``, "",{"version":3,"sources":[],"names":[],"mappings":"","sourceRoot":""}]); +// Exports +module.exports = ___CSS_LOADER_EXPORT___.toString(); + + +/***/ }), + +/***/ 8091: +/*!****************************************************************!*\ + !*** ./src/app/navigation/navigation.component.css?ngResource ***! + \****************************************************************/ +/***/ ((module, __unused_webpack_exports, __webpack_require__) => { + +// Imports +var ___CSS_LOADER_API_SOURCEMAP_IMPORT___ = __webpack_require__(/*! ../../../node_modules/css-loader/dist/runtime/sourceMaps.js */ 3142); +var ___CSS_LOADER_API_IMPORT___ = __webpack_require__(/*! ../../../node_modules/css-loader/dist/runtime/api.js */ 5950); +var ___CSS_LOADER_EXPORT___ = ___CSS_LOADER_API_IMPORT___(___CSS_LOADER_API_SOURCEMAP_IMPORT___); +// Module +___CSS_LOADER_EXPORT___.push([module.id, ``, "",{"version":3,"sources":[],"names":[],"mappings":"","sourceRoot":""}]); +// Exports +module.exports = ___CSS_LOADER_EXPORT___.toString(); + + +/***/ }), + +/***/ 7783: +/*!************************************************************************!*\ + !*** ./src/app/sitegörselleri/sitegörselleri.component.css?ngResource ***! + \************************************************************************/ +/***/ ((module, __unused_webpack_exports, __webpack_require__) => { + +// Imports +var ___CSS_LOADER_API_SOURCEMAP_IMPORT___ = __webpack_require__(/*! ../../../node_modules/css-loader/dist/runtime/sourceMaps.js */ 3142); +var ___CSS_LOADER_API_IMPORT___ = __webpack_require__(/*! ../../../node_modules/css-loader/dist/runtime/api.js */ 5950); +var ___CSS_LOADER_EXPORT___ = ___CSS_LOADER_API_IMPORT___(___CSS_LOADER_API_SOURCEMAP_IMPORT___); +// Module +___CSS_LOADER_EXPORT___.push([module.id, ``, "",{"version":3,"sources":[],"names":[],"mappings":"","sourceRoot":""}]); +// Exports +module.exports = ___CSS_LOADER_EXPORT___.toString(); + + +/***/ }), + +/***/ 241: +/*!********************************************************!*\ + !*** ./src/app/social/social.component.css?ngResource ***! + \********************************************************/ +/***/ ((module, __unused_webpack_exports, __webpack_require__) => { + +// Imports +var ___CSS_LOADER_API_SOURCEMAP_IMPORT___ = __webpack_require__(/*! ../../../node_modules/css-loader/dist/runtime/sourceMaps.js */ 3142); +var ___CSS_LOADER_API_IMPORT___ = __webpack_require__(/*! ../../../node_modules/css-loader/dist/runtime/api.js */ 5950); +var ___CSS_LOADER_EXPORT___ = ___CSS_LOADER_API_IMPORT___(___CSS_LOADER_API_SOURCEMAP_IMPORT___); +// Module +___CSS_LOADER_EXPORT___.push([module.id, ``, "",{"version":3,"sources":[],"names":[],"mappings":"","sourceRoot":""}]); +// Exports +module.exports = ___CSS_LOADER_EXPORT___.toString(); + + +/***/ }), + +/***/ 4398: +/*!*************************************************************!*\ + !*** ./src/app/anasayfa/anasayfa.component.html?ngResource ***! + \*************************************************************/ +/***/ ((module) => { + +"use strict"; +module.exports = "
\n \n
\n\n
\n\n
\n

Kargı Sitesi

\n

\n

SEVGİLİ KOMŞULARIMIZ

\n

\n Bodrum, iklimi, denizi, ışığı ile huzurun kapısını bize açan belde. Pekçoğumuzunu büyük şehirlerin karmaşasından kaçıp sığındığı evlerimizin olduğu Kargı, Camel Beach ise ayrı bir alem.. Bölgenin en güzel denizi vahşi tabiatı, her anlamda başka yerlerde rastlanamayacak insan dokusuyla söylensek de kızsak da vazgeçemediğimiz.\n Muhteşem denizli üç koya açılan kıyıları, denize kavuşan dereleri, her mevsim şahane iklimi görüp; çorak yolu bile olmayan tepelere ev yapmayı hayal edenlerin o günkü şartlarda altyapısı, düzeni ile bir inanılmazı yarattıkları yer.\n Her iş yapan hata da yapabilir, doğaldır diye düşünürüz. Evler bazı bölgelerde bu kadar sıkışık olmasaydı , alt üst katlar yerine daha küçük ama müstakil evler olsaydı dediğimiz ama bazı şeylerin değişmesinin mümkün olmadığı ancak düzeltilebilineceğine inandığımız bölgenin en iyi yerleşimlerinden biri. \n Eleştirdiğimiz, bakımsız, ileriye dönük bir planın varlığını hissedemememiz, hergeçengün çöktüğünü gözlemlediğimiz altyapı, işletmecilerin insafına bırakılmış kıyıları ile çaresiz, Sitemiz. Madem vazgeçemiyoruz beğenmediğimiz yanları düzeltmeye çalışalım elimizi taşın altına koymaktan korkmayalım dedik ve yola çıktık.\n Huzurlu yaşamak için komşuların haklarına saygılı, bir düzenin hüküm sürdüğü, kuralların hakları korumak için ve huzurun anahtarı olduğunu anlatma gayretindeyiz. Kuralların takipçisi olunduğunda kural çiğneyenlerin, eski alışkanlıkları sürdürmek isteyenlerin sesleri her nedense fazla duyulur. Ayrıcalık değil, genel menfaat ve huzurun öncelikli olarak hakim olacağının altını bir kez daha çizmekte fayda var. Kural çiğneyenlerin bilmesi gereken huzur için gereken kurallara herkes gibi onların da birgün ihtiyaç duyacağıdır. Bu anlamda iletişim en büyük eksiğimizdi. İş güç ve çaresiz sık sık yaptığımız genel kurulların ağır stresi ve iş yoğunluğu sebebi ile ihmale uğramış web sitemiz bundan böyle hizmet verecek.\n Yaplan işleri, yanlışları, gözlemlenen güzellikleri üyelerimizin mutlu günlerini , paylaşmak istedikleri bilgileri burada sizlerle paylaşacağız. Aidat ve hesap durumlarınıza sadece size ait şifre ile ulaşarak durum güncellemesi yapmanız, yapılan uygulama değişiklikleri hakkında bilgi sahibi olmanız mümkün olacak. Zaman içinde sitemizin sizlerin istediği doğrultuda hizmetleri vermesi yine sizlerin talebiyle oluşturulacaktır. Sizlerin beldemiz ile ilgili sunacağınız yapıcı eleştiri ve fikirlerinizden faydalanmaya gayret edeceğiz.\n Kargı Sitemiz sizlerin, bizlerin ve burada yaşayanlarındır. Birlikte olursak daha iyiye daha güzele ulaşmak Zor olmayacaktır.\n Kargı Sitesi web sayfasının hayırlı olmasını diliyor, hepinize şahsım, yönetim ve denetim kurullarımız adına sevgi ve saygılarımızı sunuyorum.\n

\n
\n

Kargı Sitesi Yönetim Kurulu Başkanı

\n

Kamuran Başoğlu

\n
\n\n \n Daha Fazla Bilgi\n \n\n
\n
\n \n
\n"; + +/***/ }), + +/***/ 1584: +/*!***********************************************!*\ + !*** ./src/app/app.component.html?ngResource ***! + \***********************************************/ +/***/ ((module) => { + +"use strict"; +module.exports = "
\n
\n \n \n \n\n\n
\n \n \n \n
\n\n"; + +/***/ }), + +/***/ 9784: +/*!*********************************************************************!*\ + !*** ./src/app/duyurular/duyuru1/duyuru1.component.html?ngResource ***! + \*********************************************************************/ +/***/ ((module) => { + +"use strict"; +module.exports = "\n
\n
\n
\n
\n

COVID-19 Duyurusu

\n

\n Covid-19 (Corona) virüsü ile etkin mücadele sağlanabilmesi, halkımızın ve personelimizin sağlığının\n korunabilmesi amacıyla birtakım tedbirler almak zorundayız.
\n
\n 1- Ellerinizi sık sık su ve sabun ile en az 20 saniye boyunca ovarak yıkayın.
\n 2- Soğuk algınlığı belirtileri gösteren kișilerle aranıza en az 3-4 adım mesafe koyun.
\n 3- Öksürme veya hapșırma sırasında ağız ve burunu tek kullanımlık mendille kapatın. Mendil yoksa dirseğin\n iç kısmını kullanın.
\n 4- Tokalașma, sarılma gibi yakın temaslardan kaçının.
\n 5- Ellerinizle gözlerinize, ağzınıza ve burnunuza dokunmayın.
\n 6- Yurt dıșı seyahatlerinizi iptal edin ya da erteleyin.
\n 7- Yurt dıșından dönüște ilk 14 günü evinizde geçirin.
\n 8- Bulunduğunuz ortamları sık sık havalandırın.
\n 9- Kıyafetlerinizi 60-90OC’de normal deterjanla yıkayın.
\n 10- Kapı kolları, armatürler, lavabolar gibi sık kullandığınız yüzeyleri su ve deterjanla her gün\n temizleyin.
\n 11- Soğuk algınlığı belirtileriniz varsa yașlılar ve kronik hastalığı olanlarla temas etmeyin, maske\n takmadan dıșarı çıkmayın.
\n 12- Havlu gibi kișisel eșyalarınızı ortak kullanmayın.
\n 13- Bol sıvı tüketin, dengeli beslenin, uyku düzeninize dikkat edin.
\n 14- Düșmeyen ateș, öksürük ve nefes darlığınız varsa, maske takarak bir sağlık kurulușuna bașvurun.\n

\n
\n
\n\n
\n \n
\n
\n
\n"; + +/***/ }), + +/***/ 3428: +/*!*********************************************************************!*\ + !*** ./src/app/duyurular/duyuru2/duyuru2.component.html?ngResource ***! + \*********************************************************************/ +/***/ ((module) => { + +"use strict"; +module.exports = "\n
\n
\n \n
\n \n
\n Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do\n eiusmod tempor incididunt ut labore et dolore magna aliqua\n
— John Doe, Happy Customer
\n
\n \n
\n \n\n \n
\n
\n

BELIEVING

\n

Focusing On What Matters Most

\n

\n Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do\n eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad\n minim veniam!\n

\n
\n

\n Sed ut perspiciatis unde omnis iste natus error sit voluptatem\n accusantium doloremque laudantium, totam rem aperiam, eaque ipsa quae ab\n illo inventore veritatis et quasi architecto beatae vitae dicta sunt\n explicabo.\n

\n

\n Nemo enim ipsam voluptatem quia voluptas sit aspernatur aut odit aut\n fugit, sed quia consequuntur magni dolores eos qui ratione voluptatem\n sequi nesciunt. Neque porro quisquam est, qui dolorem ipsum quia dolor\n sit amet!\n

\n \n \n WATCH VIDEO \n \n
\n \n\n
\n \"Dancer\"\n
\n
\n
\n\n"; + +/***/ }), + +/***/ 9616: +/*!*********************************************************************!*\ + !*** ./src/app/duyurular/duyuru3/duyuru3.component.html?ngResource ***! + \*********************************************************************/ +/***/ ((module) => { + +"use strict"; +module.exports = "\n
\n
\n \n
\n \n
\n Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do\n eiusmod tempor incididunt ut labore et dolore magna aliqua\n
— John Doe, Happy Customer
\n
\n \n
\n \n\n \n
\n
\n

BELIEVING

\n

Focusing On What Matters Most

\n

\n Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do\n eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad\n minim veniam!\n

\n
\n

\n Sed ut perspiciatis unde omnis iste natus error sit voluptatem\n accusantium doloremque laudantium, totam rem aperiam, eaque ipsa quae ab\n illo inventore veritatis et quasi architecto beatae vitae dicta sunt\n explicabo.\n

\n

\n Nemo enim ipsam voluptatem quia voluptas sit aspernatur aut odit aut\n fugit, sed quia consequuntur magni dolores eos qui ratione voluptatem\n sequi nesciunt. Neque porro quisquam est, qui dolorem ipsum quia dolor\n sit amet!\n

\n \n \n WATCH VIDEO \n \n
\n \n\n
\n \"Dancer\"\n
\n
\n
\n\n"; + +/***/ }), + +/***/ 1776: +/*!***************************************************************!*\ + !*** ./src/app/duyurular/duyurular.component.html?ngResource ***! + \***************************************************************/ +/***/ ((module) => { + +"use strict"; +module.exports = "\n
\n
\n
\n

DUYURULAR

\n

Sizin için Duyurularımız

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

Duyuru #1

\n

01/01/2020

\n
\n \n
\n
    \n
  • COVID-19 Duyurusu
  • \n
  • \n
\n Daha Fazlası\n
\n
\n \n\n \n
\n
\n

Duyuru #2

\n

01/01/2020

\n
\n \n
\n
    \n
  • Duyuru İsmi
  • \n
  • \n
\n Daha Fazlası\n
\n
\n \n\n \n
\n
\n

Duyuru #3

\n

01/01/2020

\n
\n \n
\n
    \n
  • Duyuru İsmi
  • \n
  • \n
\n Daha Fazlası\n
\n
\n \n
\n
\n"; + +/***/ }), + +/***/ 3008: +/*!*************************************************************!*\ + !*** ./src/app/faaliyet/faaliyet.component.html?ngResource ***! + \*************************************************************/ +/***/ ((module) => { + +"use strict"; +module.exports = "\n
\n
\n
\n

FAALİYET RAPORLARI

\n

Yaptığımız Faaliyetlerin Raporları

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

Faaliyet Raporu #1

\n

Karar İsmi

\n

01/01/2020

\n Daha Fazlası\n
\n
\n \n\n \n
\n
\n

Faaliyet Raporu #2

\n

Karar İsmi

\n

01/01/2020

\n Daha Fazlası\n
\n
\n \n\n \n
\n
\n

Faaliyet Raporu #3

\n

Karar İsmi

\n

01/01/2020

\n Daha Fazlası\n
\n
\n \n\n \n
\n
\n

Faaliyet Raporu #4

\n

Karar İsmi

\n

01/01/2020

\n Daha Fazlası\n
\n
\n \n\n \n
\n
\n

Faaliyet Raporu #5

\n

Karar İsmi

\n

01/01/2020

\n Daha Fazla\n
\n
\n \n\n \n
\n
\n

Faaliyet Raporu #6

\n

Karar İsmi

\n

01/01/2020

\n Daha Fazla\n
\n
\n \n
\n
\n"; + +/***/ }), + +/***/ 6756: +/*!*********************************************************!*\ + !*** ./src/app/footer/footer.component.html?ngResource ***! + \*********************************************************/ +/***/ ((module) => { + +"use strict"; +module.exports = "\n
\n
\n\n
\n

\n Adresimiz
\n Yahşi Mh., Kargı Cd., 48420
\n Ortakent yahşi
\n Bld./Bodrum/Muğla
\n Tel:\n

\n
\n
\n

\n Bizi takip edin
\n \n \n
\n
\n Made by Batuhan Başoğlu\n

\n
\n
\n
\n\n"; + +/***/ }), + +/***/ 3046: +/*!*****************************************************************!*\ + !*** ./src/app/genelkurul/genelkurul.component.html?ngResource ***! + \*****************************************************************/ +/***/ ((module) => { + +"use strict"; +module.exports = "\n
\n
\n
\n

GENEL KURUL KARARLARI

\n

Aldığımız Genel Kurul Kararları

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

Genel Kurul Kararı #1

\n

Karar İsmi

\n

01/01/2020

\n Daha Fazlası\n
\n
\n \n\n \n
\n
\n

Genel Kurul Kararı #2

\n

Karar İsmi

\n

01/01/2020

\n Daha Fazlası\n
\n
\n \n\n \n
\n
\n

Genel Kurul Kararı #3

\n

Karar İsmi

\n

01/01/2020

\n Daha Fazlası\n
\n
\n \n\n \n
\n
\n

Genel Kurul Kararı #4

\n

Karar İsmi

\n

01/01/2020

\n Daha Fazlası\n
\n
\n \n\n \n
\n
\n

Genel Kurul Kararı #5

\n

Karar İsmi

\n

01/01/2020

\n Daha Fazlası\n
\n
\n \n\n \n
\n
\n

Genel Kurul Kararı #6

\n

Karar İsmi

\n

01/01/2020

\n Daha Fazlası\n
\n
\n \n
\n
\n"; + +/***/ }), + +/***/ 8800: +/*!***********************************************************************!*\ + !*** ./src/app/hizmetlerimiz/hizmetlerimiz.component.html?ngResource ***! + \***********************************************************************/ +/***/ ((module) => { + +"use strict"; +module.exports = "\n
\n
\n
\n
\n

HİZMETLERİMİZ

\n

Çalışma Saatleri

\n

\n Sabah: 08.00-12.00
\n Öğlen: 13.00-17.00
\n Hafta Sonu (Cumartesi): 08.00-13.00\n

\n
\n
\n
\n\n
\n \"Landing\n
\n\n
\n \n
\n \n
\n \n
\n \n
\n

Teknik Hizmetler

\n

\n Bu kadroda çalışan personel; Kat maliklerimizin konutlarındaki su sayacına kadar olan arızalarda bakım ve\n onarımı, ortak alanlar ve\n site genelindeki elektrik, su ve kanalizasyon şebekesinde meydana gelen arızaların onarımlarıyla ilgili\n teknik servis hizmeti vermektedirler.\n

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

Ulaşım Hizmetleri

\n

\n Yaz sezonunda; Yönetimce belirlenen saatlerde, site içi hizmet vermektedir. Ayrıca her gün Sahile Shuttle\n hizmeti verilmektedir.\n

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

Güvenlik Hizmetleri

\n

\n 24 saat kesintisiz olarak verilen site koruma ve güvenlik hizmetleri, özel güvenlik şirketi aracılığı ile\n yürütülmektedir.\n Site kamera görüntülerinin izlenmesi, siteye gelenlerin geliş amacına göre yönlendirilmesi ve takibi gibi\n her türlü güvenlik hizmetleri;\n özel güvenlik şirketiyle yapılmış olan koruma ve güvenlik hizmet sözleşmesi, 5188 sayılı Kanun, ilgili\n yönetmelikler, güvenlik yönetmeliği ve\n görev talimatları çerçevesinde yürütülmektedir.\n

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

Sahil ve Kumsal Hizmetleri

\n

\n ...\n

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

Temizlik ve Genel Bahçe Hizmetleri

\n

\n Site içi ara yolların süpürülmesi, sitenin genel ve ortak alanların temizliği, site içi bahçe atıklarının\n belirli günlerde toplanması,\n peyzaj çalışması yapılan alanlar, parklar ve ortak alanların budama ile ot temizlikleri, alt yapı\n arızalarının giderilmesi ve tamirat hizmetleri vermektedir.\n

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

Arıtma Tesisi ve Sulama Hizmetleri

\n

\n Arıtma tesisinin düzenli ve kontrollü olarak çalışması, tesisin her türlü periyodik bakım-onarım\n çalışmalarının yapılması,\n arıtmadan çıkan arıtılmış atık suyun sulama havuzuna aktarılması, ortak alanların, parkların ve peyzaj\n çalışması yapılmış olan\n tüm alanların düzenli olarak sulanması ve sulama hatlarının kontrolü hizmetleridir.\n

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

İlaçlama Hizmetleri

\n

\n Tüm yıl boyunca rögar ve fosseptiklerin ilaçlanması, yaz sezonunda haftada 3 gün ULV ilaçlama yapılması, çöp\n bidonlarının ilaçlanması hizmetleridir.\n

\n
\n
\n \n
\n
\n
\n"; + +/***/ }), + +/***/ 5678: +/*!*************************************************************!*\ + !*** ./src/app/iletisim/iletisim.component.html?ngResource ***! + \*************************************************************/ +/***/ ((module) => { + +"use strict"; +module.exports = "\n
\n
\n\n
\n\n
\n

İLETİŞİM

\n

İletişim Bilgileri

\n

\n Kargı Sitesi
\n Kargı Caddesi 48420
\n Ortakent-Yahşi Bulvarı
\n Muğla, Bodrum
\n Telefon:

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

Bize Ulaşın

\n
\n
\n
\n
\n
\n \n
\n
İsim gerekli.
\n
\n
\n
\n
\n
\n \n
\n
Doğru bir e-mail adresi gerekli.
\n
\n
\n
\n
\n
\n \n
\n
Telefon numarası numerik olmalı.
\n
\n
\n
\n
\n
\n \n
\n
Mesaj gerekli.
\n
\n
\n
\n
\n \n
\n
\n
\n
\n
\n
\n
\n\n
\n\n"; + +/***/ }), + +/***/ 9690: +/*!*************************************************************!*\ + !*** ./src/app/kurumsal/kurumsal.component.html?ngResource ***! + \*************************************************************/ +/***/ ((module) => { + +"use strict"; +module.exports = "\n\n"; + +/***/ }), + +/***/ 9230: +/*!*****************************************************************!*\ + !*** ./src/app/navigation/navigation.component.html?ngResource ***! + \*****************************************************************/ +/***/ ((module) => { + +"use strict"; +module.exports = "\n
\n
\n
\n \n
\n \n \"Landing\n \n\n \n \n \n
\n \n \n\n \n \n \n
\n \n
\n
\n
\n\n"; + +/***/ }), + +/***/ 7494: +/*!*************************************************************************!*\ + !*** ./src/app/sitegörselleri/sitegörselleri.component.html?ngResource ***! + \*************************************************************************/ +/***/ ((module) => { + +"use strict"; +module.exports = "\n\n \n \n \n \n \n \n \n \n \n \n \n \n\n\n"; + +/***/ }), + +/***/ 7608: +/*!*********************************************************!*\ + !*** ./src/app/social/social.component.html?ngResource ***! + \*********************************************************/ +/***/ ((module) => { + +"use strict"; +module.exports = ""; + +/***/ }) + +}, +/******/ __webpack_require__ => { // webpackRuntimeModules +/******/ var __webpack_exec__ = (moduleId) => (__webpack_require__(__webpack_require__.s = moduleId)) +/******/ __webpack_require__.O(0, ["vendor"], () => (__webpack_exec__(4429))); +/******/ var __webpack_exports__ = __webpack_require__.O(); +/******/ } +]); +//# sourceMappingURL=main.js.map \ No newline at end of file diff --git a/main.js.map b/main.js.map new file mode 100644 index 00000000..40d3d3ae --- /dev/null +++ b/main.js.map @@ -0,0 +1 @@ +{"version":3,"file":"main.js","mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAkD;AAO3C,IAAMC,iBAAiB,GAAvB,MAAMA,iBAAiB;EAG5BC,YAAA;IAFA,KAAAC,MAAM,GAAG,EAAG;EAEG;EAEfC,QAAQA,CAAA,GACR;EAEAC,SAASA,CAAA,GACT;;;;;AATWJ,iBAAiB,GAAAK,UAAA,EAL7BN,wDAAS,CAAC;EACTO,QAAQ,EAAE,cAAc;EACxBC,QAAA,EAAAC,gEAAwC;;CAEzC,CAAC,GACWR,iBAAiB,CAU7B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ACjBwC;AACM;AACQ;AAE0B;AACG;AACZ;AACN;AACA;AACA;AACA;AACG;AACI;AACA;AACA;AAEzE,MAAMsB,MAAM,GAAW,CACrB;EAAEC,IAAI,EAAE,EAAE;EAAEC,UAAU,EAAE,WAAW;EAAEC,SAAS,EAAE;AAAM,CAAE,EACxD;EAAEF,IAAI,EAAE,UAAU;EAAEG,SAAS,EAAE1B,2EAAiBA;AAAA,CAAE,EAClD;EAAEuB,IAAI,EAAE,UAAU;EAAEG,SAAS,EAAEX,2EAAiBA;AAAA,CAAE,EAClD;EAAEQ,IAAI,EAAE,eAAe;EAAEG,SAAS,EAAEd,0FAAsBA;AAAA,CAAE,EAC5D;EAAEW,IAAI,EAAE,gBAAgB;EAAEG,SAAS,EAAEb,gGAAuBA;AAAA,CAAE,EAC9D;EAAEU,IAAI,EAAE,WAAW;EAAEG,SAAS,EAAER,8EAAkBA;AAAA,CAAE,EACpD;EAAEK,IAAI,EAAE,mBAAmB;EAAEG,SAAS,EAAEP,kFAAgBA;AAAA,CAAE,EAC1D;EAAEI,IAAI,EAAE,mBAAmB;EAAEG,SAAS,EAAEN,kFAAgBA;AAAA,CAAE,EAC1D;EAAEG,IAAI,EAAE,mBAAmB;EAAEG,SAAS,EAAEL,mFAAgBA;AAAA,CAAE,EAC1D;EAAEE,IAAI,EAAE,YAAY;EAAEG,SAAS,EAAEZ,iFAAmBA;AAAA,CAAE,EACtD;EAAES,IAAI,EAAE,UAAU;EAAEG,SAAS,EAAET,2EAAiBA;AAAA,CAAE,EAClD;EAAEM,IAAI,EAAE,UAAU;EAAEG,SAAS,EAAEV,2EAAiBA;AAAA,CAAE,CACnD;AAcM,IAAMW,gBAAgB,GAAtB,MAAMA,gBAAgB,GAAI;AAApBA,gBAAgB,GAAAtB,UAAA,EAZ5BI,wDAAQ,CAAC;EACRmB,OAAO,EAAE,CACPlB,0DAAY,EACZC,0DAAY,CAACkB,OAAO,CAACP,MAAM,CAAC,CAC7B;EACDQ,OAAO,EAAE,CACPnB,0DAAY,CACb;EACDoB,YAAY,EAAE;CAEf,CAAC,GAEWJ,gBAAgB,CAAI;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AC3CS;AAOnC,IAAMK,YAAY,GAAlB,MAAMA,YAAY;EAAlB/B,YAAA;IACL,KAAAgC,KAAK,GAAG,cAAc;EACxB;CAAC;AAFYD,YAAY,GAAA3B,UAAA,EALxBN,wDAAS,CAAC;EACTO,QAAQ,EAAE,UAAU;EACpBC,QAAA,EAAAC,2DAAmC;;CAEpC,CAAC,GACWwB,YAAY,CAExB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ACTyD;AACjB;AAEM;AACkC;AACG;AACZ;AACN;AACA;AACN;AACS;AACH;AACA;AACN;AACY;AACC;AACA;AACA;AACjB;AACxD,+CAA+C;AACmB;AACb;AAIvB;AAgCvB,IAAMW,SAAS,GAAf,MAAMA,SAAS,GAAG;AAAZA,SAAS,GAAAtC,UAAA,EA9BrBI,wDAAQ,CAAC;EACRsB,YAAY,EAAE,CACZC,wDAAY,EACZpB,0FAAsB,EACtBC,gGAAuB,EACvBC,iFAAmB,EACnBG,2EAAiB,EACjBF,2EAAiB,EACjBoB,qEAAe,EACfnB,2EAAiB,EACjBE,8EAAkB,EAClBlB,2EAAiB,EACjBmB,mFAAgB,EAChBC,mFAAgB,EAChBC,mFAAgB,EAChBe,sEAAe,EACfC,kFAAmB,CACpB;EACDO,SAAS,EAAE,CAACZ,wDAAY,CAAC;EACzBJ,OAAO,EAAE,CACPU,wDAAW,EACXC,gEAAmB,EACnBL,qEAAa,EACbP,kEAAgBA;EAChB;;UAAA,CAES;EAAA,CACV;EACDkB,SAAS,EAAE,CAACL,+DAAe,EAAEC,wEAAiB,CAACC,6EAAsB,EAAE,CAAC;CACzE,CAAC,GACWC,SAAS,CAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ACzDyB;AAO3C,IAAMxB,gBAAgB,GAAtB,MAAMA,gBAAgB;EAC3BlB,YAAA,GAAe;EAEfE,QAAQA,CAAA,GAAI;;;;;AAHDgB,gBAAgB,GAAAd,UAAA,EAL5BN,wDAAS,CAAC;EACTO,QAAQ,EAAE,aAAa;EACvBC,QAAA,EAAAC,+DAAuC;;CAExC,CAAC,GACWW,gBAAgB,CAI5B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ACXiD;AAO3C,IAAMC,gBAAgB,GAAtB,MAAMA,gBAAgB;EAC3BnB,YAAA,GAAe;EAEfE,QAAQA,CAAA,GAAI;;;;;AAHDiB,gBAAgB,GAAAf,UAAA,EAL5BN,wDAAS,CAAC;EACTO,QAAQ,EAAE,aAAa;EACvBC,QAAA,EAAAC,+DAAuC;;CAExC,CAAC,GACWY,gBAAgB,CAI5B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ACXiD;AAO3C,IAAMC,gBAAgB,GAAtB,MAAMA,gBAAgB;EAC3BpB,YAAA,GAAe;EAEfE,QAAQA,CAAA,GAAI;;;;;AAHDkB,gBAAgB,GAAAhB,UAAA,EAL5BN,wDAAS,CAAC;EACTO,QAAQ,EAAE,aAAa;EACvBC,QAAA,EAAAC,+DAAuC;;CAExC,CAAC,GACWa,gBAAgB,CAI5B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ACXiD;AAO3C,IAAMH,kBAAkB,GAAxB,MAAMA,kBAAkB;EAE7BjB,YAAA;IAKA,KAAA6C,MAAM,GAAW,wCAAwC;IACzD,KAAAC,OAAO,GAAW,wCAAwC;IAC1D,KAAAC,OAAO,GAAW,wCAAwC;EAP1C;EAEhB7C,QAAQA,CAAA,GACR;EAMA8C,WAAWA,CAAA;IACT,IAAI,CAACH,MAAM,GAAG,0CAA0C;EAC1D;EAEAI,UAAUA,CAAA;IACR,IAAI,CAACJ,MAAM,GAAG,wCAAwC;EACxD;EAEAK,YAAYA,CAAA;IACV,IAAI,CAACJ,OAAO,GAAG,0CAA0C;EAC3D;EAEAK,WAAWA,CAAA;IACT,IAAI,CAACL,OAAO,GAAG,wCAAwC;EACzD;EAEAM,YAAYA,CAAA;IACV,IAAI,CAACL,OAAO,GAAG,0CAA0C;EAC3D;EAEAM,WAAWA,CAAA;IACT,IAAI,CAACN,OAAO,GAAG,wCAAwC;EACzD;;;;;AAjCW9B,kBAAkB,GAAAb,UAAA,EAL9BN,wDAAS,CAAC;EACTO,QAAQ,EAAE,eAAe;EACzBC,QAAA,EAAAC,iEAAyC;;CAE1C,CAAC,GACWU,kBAAkB,CAkC9B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ACzCiD;AAO3C,IAAMD,iBAAiB,GAAvB,MAAMA,iBAAiB;EAC5BhB,YAAA,GAAe;EAEfE,QAAQA,CAAA,GAAI;;;;;AAHDc,iBAAiB,GAAAZ,UAAA,EAL7BN,wDAAS,CAAC;EACTO,QAAQ,EAAE,cAAc;EACxBC,QAAA,EAAAC,gEAAwC;;CAEzC,CAAC,GACWS,iBAAiB,CAI7B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ACXiD;AAO3C,IAAMkB,eAAe,GAArB,MAAMA,eAAe;EAG1BlC,YAAA;IAFA,KAAAsD,GAAG,GAAG,QAAQ;IACd,KAAAC,GAAG,GAAG,SAAS;EACA;EAEfrD,QAAQA,CAAA,GAAI;;;;;AALDgC,eAAe,GAAA9B,UAAA,EAL3BN,wDAAS,CAAC;EACTO,QAAQ,EAAE,YAAY;EACtBC,QAAA,EAAAC,8DAAsC;;CAEvC,CAAC,GACW2B,eAAe,CAM3B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ACbiD;AAO3C,IAAMrB,mBAAmB,GAAzB,MAAMA,mBAAmB;EAC9Bb,YAAA,GAAe;EAEfE,QAAQA,CAAA,GAAI;;;;;AAHDW,mBAAmB,GAAAT,UAAA,EAL/BN,wDAAS,CAAC;EACTO,QAAQ,EAAE,gBAAgB;EAC1BC,QAAA,EAAAC,kEAA0C;;CAE3C,CAAC,GACWM,mBAAmB,CAI/B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ACXiD;AAO3C,IAAMF,sBAAsB,GAA5B,MAAMA,sBAAsB;EACjCX,YAAA,GAAe;EAEfE,QAAQA,CAAA,GAAI;;;;;AAHDS,sBAAsB,GAAAP,UAAA,EALlCN,wDAAS,CAAC;EACTO,QAAQ,EAAE,WAAW;EACrBC,QAAA,EAAAC,qEAA6C;;CAE9C,CAAC,GACWI,sBAAsB,CAIlC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ACXiD;AACmD;AAC/C;AAO/C,IAAMI,iBAAiB,GAAvB,MAAMA,iBAAiB;EAK5Bf,YAAoB2D,OAA2B,EAAUC,OAAwB;IAA7D,KAAAD,OAAO,GAAPA,OAAO;IAA8B,KAAAC,OAAO,GAAPA,OAAO;IAJhE,KAAAN,GAAG,GAAG,iBAAiB;IACvB,KAAAC,GAAG,GAAG,iBAAiB;EAG8D;EAErFrD,QAAQA,CAAA;IACN,IAAI,CAAC2D,QAAQ,GAAG,IAAI,CAACF,OAAO,CAACG,KAAK,CAAC;MACjCC,IAAI,EAAE,IAAIN,8DAAkB,CAAC,EAAE,EAAE,CAACC,sDAAU,CAACM,QAAQ,CAAC,CAAC;MACvDC,KAAK,EAAE,IAAIR,8DAAkB,CAAC,EAAE,EAAE,CAACC,sDAAU,CAACQ,OAAO,CAAC,CAACR,sDAAU,CAACM,QAAQ,EAAEN,sDAAU,CAACS,KAAK,CAAC,CAAC,CAAC,CAAC;MAChGC,KAAK,EAAE,IAAIX,8DAAkB,CAAC,EAAE,EAAE,CAACC,sDAAU,CAACW,OAAO,CAAC,UAAU,CAAC,CAAC,CAAC;MACnEC,OAAO,EAAE,IAAIb,8DAAkB,CAAC,EAAE,EAAE,CAACC,sDAAU,CAACM,QAAQ,CAAC;KAC1D,CAAC;EACJ;EAEA,IAAID,IAAIA,CAAA;IAAI,OAAO,IAAI,CAACF,QAAQ,CAACU,GAAG,CAAC,MAAM,CAAC;EAAE;EAC9C,IAAIN,KAAKA,CAAA;IAAI,OAAO,IAAI,CAACJ,QAAQ,CAACU,GAAG,CAAC,OAAO,CAAC;EAAE;EAChD,IAAIH,KAAKA,CAAA;IAAI,OAAO,IAAI,CAACP,QAAQ,CAACU,GAAG,CAAC,OAAO,CAAC;EAAE;EAChD,IAAID,OAAOA,CAAA;IAAI,OAAO,IAAI,CAACT,QAAQ,CAACU,GAAG,CAAC,SAAS,CAAC;EAAE;EAEpDC,QAAQA,CAACX,QAAQ;IACfY,OAAO,CAACC,GAAG,CAACb,QAAQ,CAAC;IACrB,IAAI,CAACD,OAAO,CAACe,WAAW,CAACd,QAAQ,CAAC,CAC/Be,SAAS,CAACC,QAAQ,IAAG;MACpBC,QAAQ,CAACC,IAAI,GAAG,6BAA6B;MAC7CN,OAAO,CAACC,GAAG,CAACG,QAAQ,CAAC;IACvB,CAAC,EAAEG,KAAK,IAAG;MACTP,OAAO,CAACQ,IAAI,CAACD,KAAK,CAACE,YAAY,CAAC;MAChCT,OAAO,CAACC,GAAG,CAAC;QAAEM;MAAK,CAAE,CAAC;IACxB,CAAC,CAAC;EACN;;;;;;;;;AA/BWjE,iBAAiB,GAAAX,UAAA,EAL7BN,wDAAS,CAAC;EACTO,QAAQ,EAAE,cAAc;EACxBC,QAAA,EAAAC,gEAAwC;;CAEzC,CAAC,GACWQ,iBAAiB,CAgC7B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ACzCiD;AAO3C,IAAMD,iBAAiB,GAAvB,MAAMA,iBAAiB;EAE5Bd,YAAA,GAAgB;EAEhBE,QAAQA,CAAA,GACR;;;;;AALWY,iBAAiB,GAAAV,UAAA,EAL7BN,wDAAS,CAAC;EACTO,QAAQ,EAAE,cAAc;EACxBC,QAAA,EAAAC,gEAAwC;;CAEzC,CAAC,GACWO,iBAAiB,CAO7B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ACdiD;AAO3C,IAAMsB,mBAAmB,GAAzB,MAAMA,mBAAmB;EAG9BpC,YAAA;IAFA,KAAAmF,SAAS,GAAG,MAAM;EAEH;EAEfjF,QAAQA,CAAA,GAAI;EAEZkF,YAAYA,CAACC,OAAe;IAC1B,IAAI,CAACF,SAAS,GAAGE,OAAO;EAC1B;;;;;AATWjD,mBAAmB,GAAAhC,UAAA,EAL/BN,wDAAS,CAAC;EACTO,QAAQ,EAAE,gBAAgB;EAC1BC,QAAA,EAAAC,kEAA0C;;CAE3C,CAAC,GACW6B,mBAAmB,CAU/B;;;;;;;;;;;;;;;;;;;;;;;;;;ACjB0C;AACO;AACd;AAK7B,IAAMG,eAAe,GAArB,MAAMA,eAAe;EAG1BvC,YAAoByF,IAAgB;IAAhB,KAAAA,IAAI,GAAJA,IAAI;IAFhB,KAAAC,OAAO,GAAG,2CAA2C;EAErB;EAExCf,WAAWA,CAACgB,KAAU;IACpB,OAAO,IAAI,CAACF,IAAI,CAACG,IAAI,CAAC,IAAI,CAACF,OAAO,EAAEC,KAAK,EAAE;MAAEE,YAAY,EAAE;IAAM,CAAE,CAAC,CACjEC,IAAI,CACHN,mDAAG,CACAX,QAAQ,IAAI;MACX,IAAIA,QAAQ,EAAE;QACZ,OAAOA,QAAQ;MACjB;IACF,CAAC,EACAG,KAAU,IAAI;MACb,OAAOA,KAAK;IACd,CAAC,CACF,CACF;EACL;;;;;;;AAnBWzC,eAAe,GAAAnC,UAAA,EAH3BkF,yDAAU,CAAC;EACVS,UAAU,EAAE;CACb,CAAC,GACWxD,eAAe,CAqB3B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AC5BiD;AAO3C,IAAM3B,uBAAuB,GAA7B,MAAMA,uBAAuB;EAClCZ,YAAA,GAAe;EAEfE,QAAQA,CAAA,GAAI;;;;;AAHDU,uBAAuB,GAAAR,UAAA,EALnCN,wDAAS,CAAC;EACTO,QAAQ,EAAE,oBAAoB;EAC9BC,QAAA,EAAAC,sEAA8C;;CAE/C,CAAC,GACWK,uBAAuB,CAInC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ACXiD;AAO3C,IAAMuB,eAAe,GAArB,MAAMA,eAAe;EAE1BnC,YAAA,GAAgB;EAEhBE,QAAQA,CAAA,GACR;;;;;AALWiC,eAAe,GAAA/B,UAAA,EAL3BN,wDAAS,CAAC;EACTO,QAAQ,EAAE,YAAY;EACtBC,QAAA,EAAAC,8DAAsC;;CAEvC,CAAC,GACW4B,eAAe,CAO3B;;;;;;;;;;;;;;;;ACdD;AACA;AACA;AAEO,MAAM6D,WAAW,GAAG;EACzBC,UAAU,EAAE;CACb;AAED;;;;;;;AAOA;;;;;;;;;;;;;;;;ACf+C;AAC4B;AAE9B;AACY;AAEzD,IAAID,kEAAW,CAACC,UAAU,EAAE;EAC1BC,6DAAc,EAAE;AAClB;AAEAC,yFAAsB,EAAE,CAACC,eAAe,CAAC1D,sDAAS,CAAC,CAChD2D,KAAK,CAACC,GAAG,IAAI7B,OAAO,CAACC,GAAG,CAAC4B,GAAG,CAAC,CAAC;;;;;;;;;;ACXjC;AACA,4CAA4C,mBAAO,CAAC,uEAA6D;AACjH,kCAAkC,mBAAO,CAAC,gEAAsD;AAChG;AACA;AACA,iDAAiD,kEAAkE;AACnH;AACA;;;;;;;;;;;ACPA;AACA,4CAA4C,mBAAO,CAAC,oEAA0D;AAC9G,kCAAkC,mBAAO,CAAC,6DAAmD;AAC7F;AACA;AACA;AACA,OAAO,kEAAkE;AACzE;AACA;;;;;;;;;;;ACRA;AACA,4CAA4C,mBAAO,CAAC,0EAAgE;AACpH,kCAAkC,mBAAO,CAAC,mEAAyD;AACnG;AACA;AACA,iDAAiD,kEAAkE;AACnH;AACA;;;;;;;;;;;ACPA;AACA,4CAA4C,mBAAO,CAAC,0EAAgE;AACpH,kCAAkC,mBAAO,CAAC,mEAAyD;AACnG;AACA;AACA,iDAAiD,kEAAkE;AACnH;AACA;;;;;;;;;;;ACPA;AACA,4CAA4C,mBAAO,CAAC,0EAAgE;AACpH,kCAAkC,mBAAO,CAAC,mEAAyD;AACnG;AACA;AACA,iDAAiD,kEAAkE;AACnH;AACA;;;;;;;;;;;ACPA;AACA,4CAA4C,mBAAO,CAAC,uEAA6D;AACjH,kCAAkC,mBAAO,CAAC,gEAAsD;AAChG;AACA;AACA,iDAAiD,kEAAkE;AACnH;AACA;;;;;;;;;;;ACPA;AACA,4CAA4C,mBAAO,CAAC,uEAA6D;AACjH,kCAAkC,mBAAO,CAAC,gEAAsD;AAChG;AACA;AACA,iDAAiD,kEAAkE;AACnH;AACA;;;;;;;;;;;ACPA;AACA,4CAA4C,mBAAO,CAAC,uEAA6D;AACjH,kCAAkC,mBAAO,CAAC,gEAAsD;AAChG;AACA;AACA;AACA;AACA,CAAC,OAAO,sGAAsG,UAAU,uCAAuC,mBAAmB,GAAG,mBAAmB;AACxM;AACA;;;;;;;;;;;ACTA;AACA,4CAA4C,mBAAO,CAAC,uEAA6D;AACjH,kCAAkC,mBAAO,CAAC,gEAAsD;AAChG;AACA;AACA,iDAAiD,kEAAkE;AACnH;AACA;;;;;;;;;;;ACPA;AACA,4CAA4C,mBAAO,CAAC,uEAA6D;AACjH,kCAAkC,mBAAO,CAAC,gEAAsD;AAChG;AACA;AACA,iDAAiD,kEAAkE;AACnH;AACA;;;;;;;;;;;ACPA;AACA,4CAA4C,mBAAO,CAAC,uEAA6D;AACjH,kCAAkC,mBAAO,CAAC,gEAAsD;AAChG;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA,OAAO,0GAA0G,UAAU,OAAO,KAAK,YAAY,WAAW,YAAY,aAAa,OAAO,KAAK,YAAY,WAAW,OAAO,KAAK,YAAY,aAAa,WAAW,OAAO,KAAK,YAAY,WAAW,YAAY,OAAO,KAAK,YAAY,aAAa,aAAa,mCAAmC,oBAAoB,GAAG,oBAAoB,uBAAuB,oBAAoB,yBAAyB,gCAAgC,GAAG,eAAe,gCAAgC,qBAAqB,GAAG,qBAAqB,gCAAgC,gCAAgC,qBAAqB,GAAG,2BAA2B,gCAAgC,qBAAqB,gCAAgC,GAAG,+BAA+B,gCAAgC,gCAAgC,uBAAuB,GAAG,uBAAuB;AACv9B;AACA;;;;;;;;;;;ACzCA;AACA,4CAA4C,mBAAO,CAAC,uEAA6D;AACjH,kCAAkC,mBAAO,CAAC,gEAAsD;AAChG;AACA;AACA,iDAAiD,kEAAkE;AACnH;AACA;;;;;;;;;;;ACPA;AACA,4CAA4C,mBAAO,CAAC,uEAA6D;AACjH,kCAAkC,mBAAO,CAAC,gEAAsD;AAChG;AACA;AACA,iDAAiD,kEAAkE;AACnH;AACA;;;;;;;;;;;ACPA;AACA,4CAA4C,mBAAO,CAAC,uEAA6D;AACjH,kCAAkC,mBAAO,CAAC,gEAAsD;AAChG;AACA;AACA,iDAAiD,kEAAkE;AACnH;AACA;;;;;;;;;;;ACPA;AACA,4CAA4C,mBAAO,CAAC,uEAA6D;AACjH,kCAAkC,mBAAO,CAAC,gEAAsD;AAChG;AACA;AACA,iDAAiD,kEAAkE;AACnH;AACA","sources":["./src/app/anasayfa/anasayfa.component.ts","./src/app/app-routing.module.ts","./src/app/app.component.ts","./src/app/app.module.ts","./src/app/duyurular/duyuru1/duyuru1.component.ts","./src/app/duyurular/duyuru2/duyuru2.component.ts","./src/app/duyurular/duyuru3/duyuru3.component.ts","./src/app/duyurular/duyurular.component.ts","./src/app/faaliyet/faaliyet.component.ts","./src/app/footer/footer.component.ts","./src/app/genelkurul/genelkurul.component.ts","./src/app/hizmetlerimiz/hizmetlerimiz.component.ts","./src/app/iletisim/iletisim.component.ts","./src/app/kurumsal/kurumsal.component.ts","./src/app/navigation/navigation.component.ts","./src/app/services.service.ts","./src/app/sitegörselleri/sitegörselleri.component.ts","./src/app/social/social.component.ts","./src/environments/environment.ts","./src/main.ts","./src/app/anasayfa/anasayfa.component.css","./src/app/app.component.css","./src/app/duyurular/duyuru1/duyuru1.component.css","./src/app/duyurular/duyuru2/duyuru2.component.css","./src/app/duyurular/duyuru3/duyuru3.component.css","./src/app/duyurular/duyurular.component.css","./src/app/faaliyet/faaliyet.component.css","./src/app/footer/footer.component.css","./src/app/genelkurul/genelkurul.component.css","./src/app/hizmetlerimiz/hizmetlerimiz.component.css","./src/app/iletisim/iletisim.component.css","./src/app/kurumsal/kurumsal.component.css","./src/app/navigation/navigation.component.css","./src/app/sitegörselleri/sitegörselleri.component.css","./src/app/social/social.component.css"],"sourcesContent":["import { Component, OnInit } from '@angular/core';\n\n@Component({\n selector: 'app-anasayfa',\n templateUrl: './anasayfa.component.html',\n styleUrls: ['./anasayfa.component.css']\n})\nexport class AnasayfaComponent implements OnInit {\n header = { };\n\n constructor() {}\n\n ngOnInit() {\n }\n\n getHeader() {\n }\n}\n","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { RouterModule, Routes } from '@angular/router';\n\nimport { HizmetlerimizComponent } from './hizmetlerimiz/hizmetlerimiz.component';\nimport { SitegörselleriComponent } from './sitegörselleri/sitegörselleri.component';\nimport { GenelkurulComponent } from './genelkurul/genelkurul.component';\nimport { KurumsalComponent } from './kurumsal/kurumsal.component';\nimport { IletisimComponent } from './iletisim/iletisim.component';\nimport { AnasayfaComponent } from './anasayfa/anasayfa.component';\nimport { FaaliyetComponent } from './faaliyet/faaliyet.component';\nimport { DuyurularComponent } from './duyurular/duyurular.component';\nimport { Duyuru1Component } from './duyurular/duyuru1/duyuru1.component';\nimport { Duyuru2Component } from './duyurular/duyuru2/duyuru2.component';\nimport { Duyuru3Component } from './duyurular/duyuru3/duyuru3.component';\n\nconst routes: Routes = [\n { path: '', redirectTo: '/Anasayfa', pathMatch: 'full' },\n { path: 'Anasayfa', component: AnasayfaComponent },\n { path: 'Kurumsal', component: KurumsalComponent },\n { path: 'Hizmetlerimiz', component: HizmetlerimizComponent },\n { path: 'Sitegörselleri', component: SitegörselleriComponent },\n { path: 'Duyurular', component: DuyurularComponent },\n { path: 'Duyurular/Duyuru1', component: Duyuru1Component },\n { path: 'Duyurular/Duyuru2', component: Duyuru2Component },\n { path: 'Duyurular/Duyuru3', component: Duyuru3Component },\n { path: 'Genelkurul', component: GenelkurulComponent },\n { path: 'Faaliyet', component: FaaliyetComponent },\n { path: 'Iletisim', component: IletisimComponent },\n];\n\n@NgModule({\n imports: [\n CommonModule,\n RouterModule.forRoot(routes)\n ],\n exports: [\n RouterModule\n ],\n declarations: [\n ]\n})\n\nexport class AppRoutingModule { }\n","import { Component } from '@angular/core';\n\n@Component({\n selector: 'app-root',\n templateUrl: './app.component.html',\n styleUrls: ['./app.component.css']\n})\nexport class AppComponent {\n title = 'Kargi-Sitesi';\n}\n","import { BrowserModule } from \"@angular/platform-browser\";\nimport { NgModule } from \"@angular/core\";\n\nimport { AppComponent } from \"./app.component\";\nimport { HizmetlerimizComponent } from \"./hizmetlerimiz/hizmetlerimiz.component\";\nimport { SitegörselleriComponent } from \"./sitegörselleri/sitegörselleri.component\";\nimport { GenelkurulComponent } from \"./genelkurul/genelkurul.component\";\nimport { FaaliyetComponent } from \"./faaliyet/faaliyet.component\";\nimport { KurumsalComponent } from \"./kurumsal/kurumsal.component\";\nimport { FooterComponent } from \"./footer/footer.component\";\nimport { DuyurularComponent } from \"./duyurular/duyurular.component\";\nimport { IletisimComponent } from \"./iletisim/iletisim.component\";\nimport { AnasayfaComponent } from \"./anasayfa/anasayfa.component\";\nimport { SocialComponent } from \"./social/social.component\";\nimport { NavigationComponent } from \"./navigation/navigation.component\";\nimport { Duyuru1Component } from \"./duyurular/duyuru1/duyuru1.component\";\nimport { Duyuru2Component } from \"./duyurular/duyuru2/duyuru2.component\";\nimport { Duyuru3Component } from \"./duyurular/duyuru3/duyuru3.component\";\nimport { AppRoutingModule } from \"./app-routing.module\";\n/*import { AgmCoreModule } from '@agm/core';*/ //AGM Module is deprecated.\nimport { FormsModule, ReactiveFormsModule } from \"@angular/forms\";\nimport { ServicesService } from \"./services.service\";\nimport {\n provideHttpClient,\n withInterceptorsFromDi,\n} from \"@angular/common/http\";\n\n@NgModule({\n declarations: [\n AppComponent,\n HizmetlerimizComponent,\n SitegörselleriComponent,\n GenelkurulComponent,\n FaaliyetComponent,\n KurumsalComponent,\n FooterComponent,\n IletisimComponent,\n DuyurularComponent,\n AnasayfaComponent,\n Duyuru1Component,\n Duyuru2Component,\n Duyuru3Component,\n SocialComponent,\n NavigationComponent,\n ],\n bootstrap: [AppComponent],\n imports: [\n FormsModule,\n ReactiveFormsModule,\n BrowserModule,\n AppRoutingModule,\n /*AgmCoreModule.forRoot({\n apiKey: 'AIzaSyC5TiZoTEwEcB_HUZRhe_rXrcSWW1Z5x8I'\n })*/ //AGM Module is deprecated.\n ],\n providers: [ServicesService, provideHttpClient(withInterceptorsFromDi())],\n})\nexport class AppModule {}\n","import { Component, OnInit } from \"@angular/core\";\n\n@Component({\n selector: \"app-duyuru1\",\n templateUrl: \"./duyuru1.component.html\",\n styleUrls: [\"./duyuru1.component.css\"],\n})\nexport class Duyuru1Component implements OnInit {\n constructor() {}\n\n ngOnInit() {}\n}\n","import { Component, OnInit } from \"@angular/core\";\n\n@Component({\n selector: \"app-duyuru2\",\n templateUrl: \"./duyuru2.component.html\",\n styleUrls: [\"./duyuru2.component.css\"],\n})\nexport class Duyuru2Component implements OnInit {\n constructor() {}\n\n ngOnInit() {}\n}\n","import { Component, OnInit } from \"@angular/core\";\n\n@Component({\n selector: \"app-duyuru3\",\n templateUrl: \"./duyuru3.component.html\",\n styleUrls: [\"./duyuru3.component.css\"],\n})\nexport class Duyuru3Component implements OnInit {\n constructor() {}\n\n ngOnInit() {}\n}\n","import { Component, OnInit } from '@angular/core';\n\n@Component({\n selector: 'app-duyurular',\n templateUrl: './duyurular.component.html',\n styleUrls: ['./duyurular.component.css']\n})\nexport class DuyurularComponent implements OnInit {\n\n constructor() { }\n\n ngOnInit() {\n }\n\n imgSrc: string = \"assets/images/duyuru-images/duyuru.jpg\";\n imgSrc2: string = \"assets/images/duyuru-images/duyuru.jpg\";\n imgSrc3: string = \"assets/images/duyuru-images/duyuru.jpg\";\n\n onMouseOver(): void {\n this.imgSrc = \"assets/images/duyuru-images/duyuru-2.jpg\";\n }\n\n onMouseOut(): void {\n this.imgSrc = \"assets/images/duyuru-images/duyuru.jpg\";\n }\n\n onMouseOver2(): void {\n this.imgSrc2 = \"assets/images/duyuru-images/duyuru-2.jpg\";\n }\n\n onMouseOut2(): void {\n this.imgSrc2 = \"assets/images/duyuru-images/duyuru.jpg\";\n }\n\n onMouseOver3(): void {\n this.imgSrc3 = \"assets/images/duyuru-images/duyuru-2.jpg\";\n }\n\n onMouseOut3(): void {\n this.imgSrc3 = \"assets/images/duyuru-images/duyuru.jpg\";\n }\n}\n","import { Component, OnInit } from \"@angular/core\";\n\n@Component({\n selector: \"app-faaliyet\",\n templateUrl: \"./faaliyet.component.html\",\n styleUrls: [\"./faaliyet.component.css\"],\n})\nexport class FaaliyetComponent implements OnInit {\n constructor() {}\n\n ngOnInit() {}\n}\n","import { Component, OnInit } from \"@angular/core\";\n\n@Component({\n selector: \"app-footer\",\n templateUrl: \"./footer.component.html\",\n styleUrls: [\"./footer.component.css\"],\n})\nexport class FooterComponent implements OnInit {\n lat = 8.988759;\n lng = 38.788968;\n constructor() {}\n\n ngOnInit() {}\n}\n","import { Component, OnInit } from \"@angular/core\";\n\n@Component({\n selector: \"app-genelkurul\",\n templateUrl: \"./genelkurul.component.html\",\n styleUrls: [\"./genelkurul.component.css\"],\n})\nexport class GenelkurulComponent implements OnInit {\n constructor() {}\n\n ngOnInit() {}\n}\n","import { Component, OnInit } from \"@angular/core\";\n\n@Component({\n selector: \"app-intro\",\n templateUrl: \"./hizmetlerimiz.component.html\",\n styleUrls: [\"./hizmetlerimiz.component.css\"],\n})\nexport class HizmetlerimizComponent implements OnInit {\n constructor() {}\n\n ngOnInit() {}\n}\n","import { Component, OnInit } from '@angular/core';\nimport { UntypedFormBuilder, UntypedFormControl, UntypedFormGroup, Validators} from '@angular/forms';\nimport { ServicesService } from '../services.service';\n\n@Component({\n selector: 'app-iletisim',\n templateUrl: './iletisim.component.html',\n styleUrls: ['./iletisim.component.css']\n})\nexport class IletisimComponent implements OnInit{\n lat = 37.00850309346716;\n lng = 27.32525836435135;\n\n FormData: UntypedFormGroup;\n constructor(private builder: UntypedFormBuilder, private contact: ServicesService) { }\n\n ngOnInit() {\n this.FormData = this.builder.group({\n Name: new UntypedFormControl('', [Validators.required]),\n Email: new UntypedFormControl('', [Validators.compose([Validators.required, Validators.email])]),\n Phone: new UntypedFormControl('', [Validators.pattern(\"^[0-9]*$\")]),\n Message: new UntypedFormControl('', [Validators.required])\n });\n }\n\n get Name() {return this.FormData.get('Name'); }\n get Email() {return this.FormData.get('Email'); }\n get Phone() {return this.FormData.get('Phone'); }\n get Message() {return this.FormData.get('Message'); }\n\n onSubmit(FormData) {\n console.log(FormData)\n this.contact.PostMessage(FormData)\n .subscribe(response => {\n location.href = 'https://mailthis.to/confirm'\n console.log(response)\n }, error => {\n console.warn(error.responseText)\n console.log({ error })\n })\n }\n}\n","import { Component, OnInit } from '@angular/core';\n\n@Component({\n selector: 'app-kurumsal',\n templateUrl: './kurumsal.component.html',\n styleUrls: ['./kurumsal.component.css']\n})\nexport class KurumsalComponent implements OnInit {\n\n constructor() { }\n\n ngOnInit() {\n }\n\n}\n","import { Component, OnInit } from \"@angular/core\";\n\n@Component({\n selector: \"app-navigation\",\n templateUrl: \"./navigation.component.html\",\n styleUrls: [\"./navigation.component.css\"],\n})\nexport class NavigationComponent implements OnInit {\n activetab = \"home\";\n\n constructor() {}\n\n ngOnInit() {}\n\n getActiveTab(tabname: string) {\n this.activetab = tabname;\n }\n}\n","import { Injectable } from '@angular/core';\nimport { HttpClient } from '@angular/common/http';\nimport { map } from 'rxjs/operators'\n\n@Injectable({\n providedIn: 'root'\n})\nexport class ServicesService {\n private mailApi = 'https://mailthis.to/kargisitesi@gmail.com'\n\n constructor(private http: HttpClient) { }\n\n PostMessage(input: any) {\n return this.http.post(this.mailApi, input, { responseType: 'text' })\n .pipe(\n map(\n (response) => {\n if (response) {\n return response;\n }\n },\n (error: any) => {\n return error;\n }\n )\n )\n }\n\n}\n","import { Component, OnInit } from \"@angular/core\";\n\n@Component({\n selector: \"app-sitegörselleri\",\n templateUrl: \"./sitegörselleri.component.html\",\n styleUrls: [\"./sitegörselleri.component.css\"],\n})\nexport class SitegörselleriComponent implements OnInit {\n constructor() {}\n\n ngOnInit() {}\n}\n","import { Component, OnInit } from '@angular/core';\n\n@Component({\n selector: 'app-social',\n templateUrl: './social.component.html',\n styleUrls: ['./social.component.css']\n})\nexport class SocialComponent implements OnInit {\n\n constructor() { }\n\n ngOnInit() {\n }\n\n}\n","// This file can be replaced during build by using the `fileReplacements` array.\n// `ng build --prod` 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};\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().bootstrapModule(AppModule)\n .catch(err => console.log(err));\n\n","// Imports\nvar ___CSS_LOADER_API_SOURCEMAP_IMPORT___ = require(\"../../../node_modules/css-loader/dist/runtime/sourceMaps.js\");\nvar ___CSS_LOADER_API_IMPORT___ = require(\"../../../node_modules/css-loader/dist/runtime/api.js\");\nvar ___CSS_LOADER_EXPORT___ = ___CSS_LOADER_API_IMPORT___(___CSS_LOADER_API_SOURCEMAP_IMPORT___);\n// Module\n___CSS_LOADER_EXPORT___.push([module.id, ``, \"\",{\"version\":3,\"sources\":[],\"names\":[],\"mappings\":\"\",\"sourceRoot\":\"\"}]);\n// Exports\nmodule.exports = ___CSS_LOADER_EXPORT___.toString();\n","// Imports\nvar ___CSS_LOADER_API_SOURCEMAP_IMPORT___ = require(\"../../node_modules/css-loader/dist/runtime/sourceMaps.js\");\nvar ___CSS_LOADER_API_IMPORT___ = require(\"../../node_modules/css-loader/dist/runtime/api.js\");\nvar ___CSS_LOADER_EXPORT___ = ___CSS_LOADER_API_IMPORT___(___CSS_LOADER_API_SOURCEMAP_IMPORT___);\n// Module\n___CSS_LOADER_EXPORT___.push([module.id, `\n`, \"\",{\"version\":3,\"sources\":[],\"names\":[],\"mappings\":\"\",\"sourceRoot\":\"\"}]);\n// Exports\nmodule.exports = ___CSS_LOADER_EXPORT___.toString();\n","// Imports\nvar ___CSS_LOADER_API_SOURCEMAP_IMPORT___ = require(\"../../../../node_modules/css-loader/dist/runtime/sourceMaps.js\");\nvar ___CSS_LOADER_API_IMPORT___ = require(\"../../../../node_modules/css-loader/dist/runtime/api.js\");\nvar ___CSS_LOADER_EXPORT___ = ___CSS_LOADER_API_IMPORT___(___CSS_LOADER_API_SOURCEMAP_IMPORT___);\n// Module\n___CSS_LOADER_EXPORT___.push([module.id, ``, \"\",{\"version\":3,\"sources\":[],\"names\":[],\"mappings\":\"\",\"sourceRoot\":\"\"}]);\n// Exports\nmodule.exports = ___CSS_LOADER_EXPORT___.toString();\n","// Imports\nvar ___CSS_LOADER_API_SOURCEMAP_IMPORT___ = require(\"../../../../node_modules/css-loader/dist/runtime/sourceMaps.js\");\nvar ___CSS_LOADER_API_IMPORT___ = require(\"../../../../node_modules/css-loader/dist/runtime/api.js\");\nvar ___CSS_LOADER_EXPORT___ = ___CSS_LOADER_API_IMPORT___(___CSS_LOADER_API_SOURCEMAP_IMPORT___);\n// Module\n___CSS_LOADER_EXPORT___.push([module.id, ``, \"\",{\"version\":3,\"sources\":[],\"names\":[],\"mappings\":\"\",\"sourceRoot\":\"\"}]);\n// Exports\nmodule.exports = ___CSS_LOADER_EXPORT___.toString();\n","// Imports\nvar ___CSS_LOADER_API_SOURCEMAP_IMPORT___ = require(\"../../../../node_modules/css-loader/dist/runtime/sourceMaps.js\");\nvar ___CSS_LOADER_API_IMPORT___ = require(\"../../../../node_modules/css-loader/dist/runtime/api.js\");\nvar ___CSS_LOADER_EXPORT___ = ___CSS_LOADER_API_IMPORT___(___CSS_LOADER_API_SOURCEMAP_IMPORT___);\n// Module\n___CSS_LOADER_EXPORT___.push([module.id, ``, \"\",{\"version\":3,\"sources\":[],\"names\":[],\"mappings\":\"\",\"sourceRoot\":\"\"}]);\n// Exports\nmodule.exports = ___CSS_LOADER_EXPORT___.toString();\n","// Imports\nvar ___CSS_LOADER_API_SOURCEMAP_IMPORT___ = require(\"../../../node_modules/css-loader/dist/runtime/sourceMaps.js\");\nvar ___CSS_LOADER_API_IMPORT___ = require(\"../../../node_modules/css-loader/dist/runtime/api.js\");\nvar ___CSS_LOADER_EXPORT___ = ___CSS_LOADER_API_IMPORT___(___CSS_LOADER_API_SOURCEMAP_IMPORT___);\n// Module\n___CSS_LOADER_EXPORT___.push([module.id, ``, \"\",{\"version\":3,\"sources\":[],\"names\":[],\"mappings\":\"\",\"sourceRoot\":\"\"}]);\n// Exports\nmodule.exports = ___CSS_LOADER_EXPORT___.toString();\n","// Imports\nvar ___CSS_LOADER_API_SOURCEMAP_IMPORT___ = require(\"../../../node_modules/css-loader/dist/runtime/sourceMaps.js\");\nvar ___CSS_LOADER_API_IMPORT___ = require(\"../../../node_modules/css-loader/dist/runtime/api.js\");\nvar ___CSS_LOADER_EXPORT___ = ___CSS_LOADER_API_IMPORT___(___CSS_LOADER_API_SOURCEMAP_IMPORT___);\n// Module\n___CSS_LOADER_EXPORT___.push([module.id, ``, \"\",{\"version\":3,\"sources\":[],\"names\":[],\"mappings\":\"\",\"sourceRoot\":\"\"}]);\n// Exports\nmodule.exports = ___CSS_LOADER_EXPORT___.toString();\n","// Imports\nvar ___CSS_LOADER_API_SOURCEMAP_IMPORT___ = require(\"../../../node_modules/css-loader/dist/runtime/sourceMaps.js\");\nvar ___CSS_LOADER_API_IMPORT___ = require(\"../../../node_modules/css-loader/dist/runtime/api.js\");\nvar ___CSS_LOADER_EXPORT___ = ___CSS_LOADER_API_IMPORT___(___CSS_LOADER_API_SOURCEMAP_IMPORT___);\n// Module\n___CSS_LOADER_EXPORT___.push([module.id, `a img:hover {\n opacity: 0.7;\n}`, \"\",{\"version\":3,\"sources\":[\"webpack://./src/app/footer/footer.component.css\"],\"names\":[],\"mappings\":\"AAAA;IACI,YAAY;AAChB\",\"sourcesContent\":[\"a img:hover {\\n opacity: 0.7;\\n}\"],\"sourceRoot\":\"\"}]);\n// Exports\nmodule.exports = ___CSS_LOADER_EXPORT___.toString();\n","// Imports\nvar ___CSS_LOADER_API_SOURCEMAP_IMPORT___ = require(\"../../../node_modules/css-loader/dist/runtime/sourceMaps.js\");\nvar ___CSS_LOADER_API_IMPORT___ = require(\"../../../node_modules/css-loader/dist/runtime/api.js\");\nvar ___CSS_LOADER_EXPORT___ = ___CSS_LOADER_API_IMPORT___(___CSS_LOADER_API_SOURCEMAP_IMPORT___);\n// Module\n___CSS_LOADER_EXPORT___.push([module.id, ``, \"\",{\"version\":3,\"sources\":[],\"names\":[],\"mappings\":\"\",\"sourceRoot\":\"\"}]);\n// Exports\nmodule.exports = ___CSS_LOADER_EXPORT___.toString();\n","// Imports\nvar ___CSS_LOADER_API_SOURCEMAP_IMPORT___ = require(\"../../../node_modules/css-loader/dist/runtime/sourceMaps.js\");\nvar ___CSS_LOADER_API_IMPORT___ = require(\"../../../node_modules/css-loader/dist/runtime/api.js\");\nvar ___CSS_LOADER_EXPORT___ = ___CSS_LOADER_API_IMPORT___(___CSS_LOADER_API_SOURCEMAP_IMPORT___);\n// Module\n___CSS_LOADER_EXPORT___.push([module.id, ``, \"\",{\"version\":3,\"sources\":[],\"names\":[],\"mappings\":\"\",\"sourceRoot\":\"\"}]);\n// Exports\nmodule.exports = ___CSS_LOADER_EXPORT___.toString();\n","// Imports\nvar ___CSS_LOADER_API_SOURCEMAP_IMPORT___ = require(\"../../../node_modules/css-loader/dist/runtime/sourceMaps.js\");\nvar ___CSS_LOADER_API_IMPORT___ = require(\"../../../node_modules/css-loader/dist/runtime/api.js\");\nvar ___CSS_LOADER_EXPORT___ = ___CSS_LOADER_API_IMPORT___(___CSS_LOADER_API_SOURCEMAP_IMPORT___);\n// Module\n___CSS_LOADER_EXPORT___.push([module.id, `agm-map {\n height: 300px;\n}\n\n.fcf-form-wrap {\n max-width: 500px;\n padding: 30px;\n border-radius: 4px;\n background-color: #ffffff;\n}\n\n#fcf-form {\n background-color: #ffffff;\n color: #363636;\n}\n\n.button.is-link {\n background-color: #363636;\n border-color: transparent;\n color: #ffffff;\n}\n\n.button.is-link:hover {\n background-color: #808080;\n color: #ffffff;\n border-color: transparent;\n}\n\n.button.is-link[disabled] {\n background-color: #808080;\n border-color: transparent;\n box-shadow: none;\n}\n\n`, \"\",{\"version\":3,\"sources\":[\"webpack://./src/app/iletisim/iletisim.component.css\"],\"names\":[],\"mappings\":\"AAAA;IACI,aAAa;AACjB;;AAEA;IACI,gBAAgB;IAChB,aAAa;IACb,kBAAkB;IAClB,yBAAyB;AAC7B;;AAEA;IACI,yBAAyB;IACzB,cAAc;AAClB;;AAEA;IACI,yBAAyB;IACzB,yBAAyB;IACzB,cAAc;AAClB;;AAEA;IACI,yBAAyB;IACzB,cAAc;IACd,yBAAyB;AAC7B;;AAEA;IACI,yBAAyB;IACzB,yBAAyB;IACzB,gBAAgB;AACpB\",\"sourcesContent\":[\"agm-map {\\n height: 300px;\\n}\\n\\n.fcf-form-wrap {\\n max-width: 500px;\\n padding: 30px;\\n border-radius: 4px;\\n background-color: #ffffff;\\n}\\n\\n#fcf-form {\\n background-color: #ffffff;\\n color: #363636;\\n}\\n\\n.button.is-link {\\n background-color: #363636;\\n border-color: transparent;\\n color: #ffffff;\\n}\\n\\n.button.is-link:hover {\\n background-color: #808080;\\n color: #ffffff;\\n border-color: transparent;\\n}\\n\\n.button.is-link[disabled] {\\n background-color: #808080;\\n border-color: transparent;\\n box-shadow: none;\\n}\\n\\n\"],\"sourceRoot\":\"\"}]);\n// Exports\nmodule.exports = ___CSS_LOADER_EXPORT___.toString();\n","// Imports\nvar ___CSS_LOADER_API_SOURCEMAP_IMPORT___ = require(\"../../../node_modules/css-loader/dist/runtime/sourceMaps.js\");\nvar ___CSS_LOADER_API_IMPORT___ = require(\"../../../node_modules/css-loader/dist/runtime/api.js\");\nvar ___CSS_LOADER_EXPORT___ = ___CSS_LOADER_API_IMPORT___(___CSS_LOADER_API_SOURCEMAP_IMPORT___);\n// Module\n___CSS_LOADER_EXPORT___.push([module.id, ``, \"\",{\"version\":3,\"sources\":[],\"names\":[],\"mappings\":\"\",\"sourceRoot\":\"\"}]);\n// Exports\nmodule.exports = ___CSS_LOADER_EXPORT___.toString();\n","// Imports\nvar ___CSS_LOADER_API_SOURCEMAP_IMPORT___ = require(\"../../../node_modules/css-loader/dist/runtime/sourceMaps.js\");\nvar ___CSS_LOADER_API_IMPORT___ = require(\"../../../node_modules/css-loader/dist/runtime/api.js\");\nvar ___CSS_LOADER_EXPORT___ = ___CSS_LOADER_API_IMPORT___(___CSS_LOADER_API_SOURCEMAP_IMPORT___);\n// Module\n___CSS_LOADER_EXPORT___.push([module.id, ``, \"\",{\"version\":3,\"sources\":[],\"names\":[],\"mappings\":\"\",\"sourceRoot\":\"\"}]);\n// Exports\nmodule.exports = ___CSS_LOADER_EXPORT___.toString();\n","// Imports\nvar ___CSS_LOADER_API_SOURCEMAP_IMPORT___ = require(\"../../../node_modules/css-loader/dist/runtime/sourceMaps.js\");\nvar ___CSS_LOADER_API_IMPORT___ = require(\"../../../node_modules/css-loader/dist/runtime/api.js\");\nvar ___CSS_LOADER_EXPORT___ = ___CSS_LOADER_API_IMPORT___(___CSS_LOADER_API_SOURCEMAP_IMPORT___);\n// Module\n___CSS_LOADER_EXPORT___.push([module.id, ``, \"\",{\"version\":3,\"sources\":[],\"names\":[],\"mappings\":\"\",\"sourceRoot\":\"\"}]);\n// Exports\nmodule.exports = ___CSS_LOADER_EXPORT___.toString();\n","// Imports\nvar ___CSS_LOADER_API_SOURCEMAP_IMPORT___ = require(\"../../../node_modules/css-loader/dist/runtime/sourceMaps.js\");\nvar ___CSS_LOADER_API_IMPORT___ = require(\"../../../node_modules/css-loader/dist/runtime/api.js\");\nvar ___CSS_LOADER_EXPORT___ = ___CSS_LOADER_API_IMPORT___(___CSS_LOADER_API_SOURCEMAP_IMPORT___);\n// Module\n___CSS_LOADER_EXPORT___.push([module.id, ``, \"\",{\"version\":3,\"sources\":[],\"names\":[],\"mappings\":\"\",\"sourceRoot\":\"\"}]);\n// Exports\nmodule.exports = ___CSS_LOADER_EXPORT___.toString();\n"],"names":["Component","AnasayfaComponent","constructor","header","ngOnInit","getHeader","__decorate","selector","template","__NG_CLI_RESOURCE__0","NgModule","CommonModule","RouterModule","HizmetlerimizComponent","SitegörselleriComponent","GenelkurulComponent","KurumsalComponent","IletisimComponent","FaaliyetComponent","DuyurularComponent","Duyuru1Component","Duyuru2Component","Duyuru3Component","routes","path","redirectTo","pathMatch","component","AppRoutingModule","imports","forRoot","exports","declarations","AppComponent","title","BrowserModule","FooterComponent","SocialComponent","NavigationComponent","FormsModule","ReactiveFormsModule","ServicesService","provideHttpClient","withInterceptorsFromDi","AppModule","bootstrap","providers","imgSrc","imgSrc2","imgSrc3","onMouseOver","onMouseOut","onMouseOver2","onMouseOut2","onMouseOver3","onMouseOut3","lat","lng","UntypedFormBuilder","UntypedFormControl","Validators","builder","contact","FormData","group","Name","required","Email","compose","email","Phone","pattern","Message","get","onSubmit","console","log","PostMessage","subscribe","response","location","href","error","warn","responseText","activetab","getActiveTab","tabname","Injectable","HttpClient","map","http","mailApi","input","post","responseType","pipe","providedIn","environment","production","enableProdMode","platformBrowserDynamic","bootstrapModule","catch","err"],"sourceRoot":"webpack:///","x_google_ignoreList":[]} \ No newline at end of file diff --git a/polyfills.js b/polyfills.js new file mode 100644 index 00000000..ba8603ff --- /dev/null +++ b/polyfills.js @@ -0,0 +1,39445 @@ +"use strict"; +(self["webpackChunkwebsitePractise"] = self["webpackChunkwebsitePractise"] || []).push([["polyfills"],{ + +/***/ 4050: +/*!**************************!*\ + !*** ./src/polyfills.ts ***! + \**************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var core_js_es7_reflect__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! core-js/es7/reflect */ 4375); +/* harmony import */ var core_js_es7_reflect__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(core_js_es7_reflect__WEBPACK_IMPORTED_MODULE_0__); +/* harmony import */ var zone_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! zone.js */ 4124); +/* harmony import */ var zone_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(zone_js__WEBPACK_IMPORTED_MODULE_1__); +/** + * 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/docs/ts/latest/guide/browser-support.html + */ +/*************************************************************************************************** + * BROWSER POLYFILLS + */ +/** IE9, IE10 and IE11 requires all of the following polyfills. **/ +// import 'core-js/es6/symbol'; +// import 'core-js/es6/object'; +// import 'core-js/es6/function'; +// import 'core-js/es6/parse-int'; +// import 'core-js/es6/parse-float'; +// import 'core-js/es6/number'; +// import 'core-js/es6/math'; +// import 'core-js/es6/string'; +// import 'core-js/es6/date'; +// import 'core-js/es6/array'; +// import 'core-js/es6/regexp'; +// import 'core-js/es6/map'; +// import 'core-js/es6/weak-map'; +// import 'core-js/es6/set'; +/** IE10 and IE11 requires the following for the Reflect API. */ +// import 'core-js/es6/reflect'; +/** Evergreen browsers require these. **/ +// Used for reflect-metadata in JIT. If you use AOT (and only Angular decorators), you can remove. + +/** + * By default, zone.js will patch all possible macroTask and DomEvents + * user can disable parts of macroTask/DomEvents patch by setting following flags + */ +// (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__BLACK_LISTED_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 + */ + +/***/ }), + +/***/ 4124: +/*!***********************************************!*\ + !*** ./node_modules/zone.js/fesm2015/zone.js ***! + \***********************************************/ +/***/ (() => { + + + +/** + * @license Angular v + * (c) 2010-2024 Google LLC. https://angular.io/ + * License: MIT + */ +const global = globalThis; +// __Zone_symbol_prefix global can be used to override the default zone +// symbol prefix with a custom one if needed. +function __symbol__(name) { + const symbolPrefix = global['__Zone_symbol_prefix'] || '__zone_symbol__'; + return symbolPrefix + name; +} +function initZone() { + 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'); + class ZoneImpl { + // 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 = ZoneImpl.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 + const checkDuplicate = global[__symbol__('forceDuplicateZoneCheck')] === true; + 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, ZoneImpl, _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 + ')'); + } + const zoneTask = task; + // 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 + const { + type, + data: { + isPeriodic = false, + isRefreshable = false + } = {} + } = task; + if (task.state === notScheduled && (type === eventTask || type === macroTask)) { + return; + } + const reEntryGuard = task.state != running; + reEntryGuard && zoneTask._transitionTo(running, scheduled); + const previousTask = _currentTask; + _currentTask = zoneTask; + _currentZoneFrame = { + parent: _currentZoneFrame, + zone: this + }; + try { + if (type == macroTask && task.data && !isPeriodic && !isRefreshable) { + task.cancelFn = undefined; + } + try { + return this._zoneDelegate.invokeTask(this, zoneTask, 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 + const state = task.state; + if (state !== notScheduled && state !== unknown) { + if (type == eventTask || isPeriodic || isRefreshable && state === scheduling) { + reEntryGuard && zoneTask._transitionTo(scheduled, running, scheduling); + } else { + const zoneDelegates = zoneTask._zoneDelegates; + this._updateTaskCount(zoneTask, -1); + reEntryGuard && zoneTask._transitionTo(notScheduled, running, notScheduled); + if (isRefreshable) { + zoneTask._zoneDelegates = zoneDelegates; + } + } + } + _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 = -1; + 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 { + get zone() { + return this._zone; + } + 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 = this._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 ZoneImpl(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); + } + returnTask = this._scheduleTaskZS.onScheduleTask(this._scheduleTaskDlgt, this._scheduleTaskCurrZone, targetZone, task); + 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: () => !ZoneImpl[__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 ZoneImpl(null, null) + }; + let _currentTask = null; + let _numberOfNestedTaskFrames = 0; + function noop() {} + performanceMeasure('Zone', 'Zone'); + return ZoneImpl; +} +function loadZone() { + // 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. + const global = globalThis; + const checkDuplicate = global[__symbol__('forceDuplicateZoneCheck')] === true; + if (global['Zone'] && (checkDuplicate || typeof global['Zone'].__symbol__ !== 'function')) { + throw new Error('Zone already loaded.'); + } + // Initialize global `Zone` constant. + global['Zone'] ??= initZone(); + return global['Zone']; +} + +/** + * 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 = __symbol__(ADD_EVENT_LISTENER_STR); +/** zoneSymbol removeEventListener */ +const ZONE_SYMBOL_REMOVE_EVENT_LISTENER = __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 = __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 = __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' && _global.process.toString() === '[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' && _global.process.toString() === '[object process]' && !isWebWorker && !!(isWindowExists && internalWindow['HTMLElement']); +const zoneSymbolEventNames$1 = {}; +const enableBeforeunloadSymbol = zoneSymbol('enable_beforeunload'); +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 ( + // https://github.com/angular/angular/issues/47579 + // https://www.w3.org/TR/2011/WD-html5-20110525/history.html#beforeunloadevent + // This is the only specific case we should check for. The spec defines that the + // `returnValue` attribute represents the message to show the user. When the event + // is created, this attribute must be set to the empty string. + event.type === 'beforeunload' && + // To prevent any breaking changes resulting from this change, given that + // it was already causing a significant number of failures in G3, we have hidden + // that behavior behind a global configuration flag. Consumers can enable this + // flag explicitly if they want the `beforeunload` event to be handled as defined + // in the specification. + _global[enableBeforeunloadSymbol] && + // The IDL event definition is `attribute DOMString returnValue`, so we check whether + // `typeof result` is a string. + typeof result === 'string') { + event.returnValue = result; + } else 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; +} +function isFunction(value) { + return typeof value === 'function'; +} +function isNumber(value) { + return typeof value === 'number'; +} + +/** + * @fileoverview + * @suppress {missingRequire} + */ +// Note that passive event listeners are now supported by most modern browsers, +// including Chrome, Firefox, Safari, and Edge. There's a pending change that +// would remove support for legacy browsers by zone.js. Removing `passiveSupported` +// from the codebase will reduce the final code size for existing apps that still use zone.js. +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; + // We use a shared global `taskData` to pass data for `scheduleEventTask`, + // eliminating the need to create a new object solely for passing data. + // WARNING: This object has a static lifetime, meaning it is not created + // each time `addEventListener` is called. It is instantiated only once + // and captured by reference inside the `addEventListener` and + // `removeEventListener` functions. Do not add any new properties to this + // object, as doing so would necessitate maintaining the information + // between `addEventListener` calls. + 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); + }; + /** + * In the context of events and listeners, this function will be + * called at the end by `cancelTask`, which, in turn, calls `task.cancelFn`. + * Cancelling a task is primarily used to remove event listeners from + * the task target. + */ + 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 (task.removeAbortListener) { + task.removeAbortListener(); + task.removeAbortListener = null; + } + 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')]; + function copyEventListenerOptions(options) { + if (typeof options === 'object' && options !== null) { + // We need to destructure the target `options` object since it may + // be frozen or sealed (possibly provided implicitly by a third-party + // library), or its properties may be readonly. + const newOptions = { + ...options + }; + // The `signal` option was recently introduced, which caused regressions in + // third-party scenarios where `AbortController` was directly provided to + // `addEventListener` as options. For instance, in cases like + // `document.addEventListener('keydown', callback, abortControllerInstance)`, + // which is valid because `AbortController` includes a `signal` getter, spreading + // `{...options}` wouldn't copy the `signal`. Additionally, using `Object.create` + // isn't feasible since `AbortController` is a built-in object type, and attempting + // to create a new object directly with it as the prototype might result in + // unexpected behavior. + if (options.signal) { + newOptions.signal = options.signal; + } + return newOptions; + } + return options; + } + 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 = copyEventListenerOptions(buildEventListenerOptions(arguments[2], passive)); + const signal = options?.signal; + 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); + } + // In the code below, `options` should no longer be reassigned; instead, it + // should only be mutated. This is because we pass that object to the native + // `addEventListener`. + // It's generally recommended to use the same object reference for options. + // This ensures consistency and avoids potential issues. + taskData.options = options; + if (once) { + // When using `addEventListener` with the `once` option, we don't pass + // the `once` option directly to the native `addEventListener` method. + // Instead, we keep the `once` setting and handle it 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) { + // When using `addEventListener` with the `signal` option, we don't pass + // the `signal` option directly to the native `addEventListener` method. + // Instead, we keep the `signal` setting and handle it ourselves. + taskData.options.signal = undefined; + } + // The `scheduleEventTask` function will ultimately call `customScheduleGlobal`, + // which in turn calls the native `addEventListener`. This is why `taskData.options` + // is updated before scheduling the task, as `customScheduleGlobal` uses + // `taskData.options` to pass it to the native `addEventListener`. + 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; + // Wrapping `task` in a weak reference would not prevent memory leaks. Weak references are + // primarily used for preventing strong references cycles. `onAbort` is always reachable + // as it's an event listener, so its closure retains a strong reference to the `task`. + const onAbort = () => task.zone.cancelTask(task); + nativeListener.call(signal, 'abort', onAbort, { + once: true + }); + // We need to remove the `abort` listener when the event listener is going to be removed, + // as it creates a closure that captures `task`. This closure retains a reference to the + // `task` object even after it goes out of scope, preventing `task` from being garbage + // collected. + task.removeAbortListener = () => signal.removeEventListener('abort', onAbort); + } + // 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) { + taskData.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]; + // `existingTasks` may not exist if the `addEventListener` was called before + // it was patched by zone.js. Please refer to the attached issue for + // clarification, particularly after the `if` condition, before calling + // the native `removeEventListener`. + 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 with capture=false were removed + // https:// github.com/angular/angular/issues/31643 + // https://github.com/angular/angular/issues/54581 + if (!capture && typeof eventName === 'string') { + const onPropertySymbol = ZONE_SYMBOL_PREFIX + 'ON_PROPERTY' + eventName; + target[onPropertySymbol] = null; + } + } + // In all other conditions, when `addEventListener` is called after being + // patched by zone.js, we would always find an event task on the `EventTarget`. + // This will trigger `cancelFn` on the `existingTask`, leading to `customCancelGlobal`, + // which ultimately removes an event listener and cleans up the abort listener + // (if an `AbortSignal` was provided when scheduling a task). + existingTask.zone.cancelTask(existingTask); + if (returnTarget) { + return target; + } + return; + } + } + } + // https://github.com/angular/zone.js/issues/930 + // We may encounter a situation where the `addEventListener` was + // called on the event target before zone.js is loaded, resulting + // in no task being stored on the event target due to its invocation + // of the native implementation. In this scenario, we simply need to + // invoke the native `removeEventListener`. + 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); + }); + } +} + +/** + * @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); + }; + const handleOrId = setNative.apply(window, data.args); + // Whlist on Node.js when get can the ID by using `[Symbol.toPrimitive]()` we do + // to this so that we do not cause potentally leaks when using `setTimeout` + // since this can be periodic when using `.refresh`. + if (isNumber(handleOrId)) { + data.handleId = handleOrId; + } else { + data.handle = handleOrId; + // On Node.js a timeout and interval can be restarted over and over again by using the `.refresh` method. + data.isRefreshable = isFunction(handleOrId.refresh); + } + return task; + } + function clearTask(task) { + const { + handle, + handleId + } = task.data; + return clearNative.call(window, handle ?? handleId); + } + setNative = patchMethod(window, setName, delegate => function (self, args) { + if (isFunction(args[0])) { + const options = { + isRefreshable: false, + 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. + const { + handle, + handleId, + isPeriodic, + isRefreshable + } = options; + if (!isPeriodic && !isRefreshable) { + if (handleId) { + // in non-nodejs env, we remove timerId + // from local cache + delete tasksByHandleId[handleId]; + } else if (handle) { + // Node returns complex objects as handleIds + // we remove task reference from timer object + handle[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 { + handleId, + handle, + isRefreshable, + isPeriodic + } = task.data; + if (handleId) { + // for non nodejs env, we save handleId: task + // mapping in local cache for clearTimeout + tasksByHandleId[handleId] = task; + } else if (handle) { + // for nodejs env, we save task + // reference in timerId Object for clearTimeout + handle[taskSymbol] = task; + if (isRefreshable && !isPeriodic) { + const originalRefresh = handle.refresh; + handle.refresh = function () { + const { + zone, + state + } = task; + if (state === 'notScheduled') { + task._state = 'scheduled'; + zone._updateTaskCount(task, 1); + } else if (state === 'running') { + task._state = 'scheduling'; + } + return originalRefresh.call(this); + }; + } + } + return handle ?? handleId ?? 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 (isNumber(id)) { + // non nodejs env. + task = tasksByHandleId[id]; + delete tasksByHandleId[id]; + } else { + // nodejs env ?? other environments. + task = id?.[taskSymbol]; + if (task) { + id[taskSymbol] = null; + } else { + task = id; + } + } + if (task?.type) { + if (task.cancelFn) { + // 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 {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); + } +} + +/** + * @fileoverview + * @suppress {missingRequire} + */ +function patchBrowser(Zone) { + 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); + }); +} +function patchPromise(Zone) { + 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; + }); +} +function patchToString(Zone) { + // 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); + }; + }); +} +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); +} +function patchUtil(Zone) { + 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 + }); + }); +} +function patchCommon(Zone) { + patchPromise(Zone); + patchToString(Zone); + patchUtil(Zone); +} +const Zone$1 = loadZone(); +patchCommon(Zone$1); +patchBrowser(Zone$1); + +/***/ }), + +/***/ 359: +/*!******************************************************!*\ + !*** ./node_modules/core-js/internals/a-callable.js ***! + \******************************************************/ +/***/ ((module, __unused_webpack_exports, __webpack_require__) => { + + +var isCallable = __webpack_require__(/*! ../internals/is-callable */ 4946); +var tryToString = __webpack_require__(/*! ../internals/try-to-string */ 4824); + +var $TypeError = TypeError; + +// `Assert: IsCallable(argument) is true` +module.exports = function (argument) { + if (isCallable(argument)) return argument; + throw new $TypeError(tryToString(argument) + ' is not a function'); +}; + + +/***/ }), + +/***/ 387: +/*!****************************************************************!*\ + !*** ./node_modules/core-js/internals/a-possible-prototype.js ***! + \****************************************************************/ +/***/ ((module, __unused_webpack_exports, __webpack_require__) => { + + +var isPossiblePrototype = __webpack_require__(/*! ../internals/is-possible-prototype */ 3290); + +var $String = String; +var $TypeError = TypeError; + +module.exports = function (argument) { + if (isPossiblePrototype(argument)) return argument; + throw new $TypeError("Can't set " + $String(argument) + ' as a prototype'); +}; + + +/***/ }), + +/***/ 8852: +/*!*******************************************************!*\ + !*** ./node_modules/core-js/internals/an-instance.js ***! + \*******************************************************/ +/***/ ((module, __unused_webpack_exports, __webpack_require__) => { + + +var isPrototypeOf = __webpack_require__(/*! ../internals/object-is-prototype-of */ 5824); + +var $TypeError = TypeError; + +module.exports = function (it, Prototype) { + if (isPrototypeOf(Prototype, it)) return it; + throw new $TypeError('Incorrect invocation'); +}; + + +/***/ }), + +/***/ 4363: +/*!*****************************************************!*\ + !*** ./node_modules/core-js/internals/an-object.js ***! + \*****************************************************/ +/***/ ((module, __unused_webpack_exports, __webpack_require__) => { + + +var isObject = __webpack_require__(/*! ../internals/is-object */ 2181); + +var $String = String; +var $TypeError = TypeError; + +// `Assert: Type(argument) is Object` +module.exports = function (argument) { + if (isObject(argument)) return argument; + throw new $TypeError($String(argument) + ' is not an object'); +}; + + +/***/ }), + +/***/ 4591: +/*!***********************************************************************!*\ + !*** ./node_modules/core-js/internals/array-buffer-non-extensible.js ***! + \***********************************************************************/ +/***/ ((module, __unused_webpack_exports, __webpack_require__) => { + + +// FF26- bug: ArrayBuffers are non-extensible, but Object.isExtensible does not report it +var fails = __webpack_require__(/*! ../internals/fails */ 4948); + +module.exports = fails(function () { + if (typeof ArrayBuffer == 'function') { + var buffer = new ArrayBuffer(8); + // eslint-disable-next-line es/no-object-isextensible, es/no-object-defineproperty -- safe + if (Object.isExtensible(buffer)) Object.defineProperty(buffer, 'a', { value: 8 }); + } +}); + + +/***/ }), + +/***/ 4556: +/*!**********************************************************!*\ + !*** ./node_modules/core-js/internals/array-includes.js ***! + \**********************************************************/ +/***/ ((module, __unused_webpack_exports, __webpack_require__) => { + + +var toIndexedObject = __webpack_require__(/*! ../internals/to-indexed-object */ 5654); +var toAbsoluteIndex = __webpack_require__(/*! ../internals/to-absolute-index */ 5129); +var lengthOfArrayLike = __webpack_require__(/*! ../internals/length-of-array-like */ 5543); + +// `Array.prototype.{ indexOf, includes }` methods implementation +var createMethod = function (IS_INCLUDES) { + return function ($this, el, fromIndex) { + var O = toIndexedObject($this); + var length = lengthOfArrayLike(O); + if (length === 0) return !IS_INCLUDES && -1; + var index = toAbsoluteIndex(fromIndex, length); + var value; + // Array#includes uses SameValueZero equality algorithm + // eslint-disable-next-line no-self-compare -- NaN check + if (IS_INCLUDES && el !== el) while (length > index) { + value = O[index++]; + // eslint-disable-next-line no-self-compare -- NaN check + if (value !== value) return true; + // Array#indexOf ignores holes, Array#includes - not + } else for (;length > index; index++) { + if ((IS_INCLUDES || index in O) && O[index] === el) return IS_INCLUDES || index || 0; + } return !IS_INCLUDES && -1; + }; +}; + +module.exports = { + // `Array.prototype.includes` method + // https://tc39.es/ecma262/#sec-array.prototype.includes + includes: createMethod(true), + // `Array.prototype.indexOf` method + // https://tc39.es/ecma262/#sec-array.prototype.indexof + indexOf: createMethod(false) +}; + + +/***/ }), + +/***/ 1982: +/*!***********************************************************!*\ + !*** ./node_modules/core-js/internals/array-iteration.js ***! + \***********************************************************/ +/***/ ((module, __unused_webpack_exports, __webpack_require__) => { + + +var bind = __webpack_require__(/*! ../internals/function-bind-context */ 1807); +var uncurryThis = __webpack_require__(/*! ../internals/function-uncurry-this */ 4811); +var IndexedObject = __webpack_require__(/*! ../internals/indexed-object */ 9114); +var toObject = __webpack_require__(/*! ../internals/to-object */ 9754); +var lengthOfArrayLike = __webpack_require__(/*! ../internals/length-of-array-like */ 5543); +var arraySpeciesCreate = __webpack_require__(/*! ../internals/array-species-create */ 2928); + +var push = uncurryThis([].push); + +// `Array.prototype.{ forEach, map, filter, some, every, find, findIndex, filterReject }` methods implementation +var createMethod = function (TYPE) { + var IS_MAP = TYPE === 1; + var IS_FILTER = TYPE === 2; + var IS_SOME = TYPE === 3; + var IS_EVERY = TYPE === 4; + var IS_FIND_INDEX = TYPE === 6; + var IS_FILTER_REJECT = TYPE === 7; + var NO_HOLES = TYPE === 5 || IS_FIND_INDEX; + return function ($this, callbackfn, that, specificCreate) { + var O = toObject($this); + var self = IndexedObject(O); + var length = lengthOfArrayLike(self); + var boundFunction = bind(callbackfn, that); + var index = 0; + var create = specificCreate || arraySpeciesCreate; + var target = IS_MAP ? create($this, length) : IS_FILTER || IS_FILTER_REJECT ? create($this, 0) : undefined; + var value, result; + for (;length > index; index++) if (NO_HOLES || index in self) { + value = self[index]; + result = boundFunction(value, index, O); + if (TYPE) { + if (IS_MAP) target[index] = result; // map + else if (result) switch (TYPE) { + case 3: return true; // some + case 5: return value; // find + case 6: return index; // findIndex + case 2: push(target, value); // filter + } else switch (TYPE) { + case 4: return false; // every + case 7: push(target, value); // filterReject + } + } + } + return IS_FIND_INDEX ? -1 : IS_SOME || IS_EVERY ? IS_EVERY : target; + }; +}; + +module.exports = { + // `Array.prototype.forEach` method + // https://tc39.es/ecma262/#sec-array.prototype.foreach + forEach: createMethod(0), + // `Array.prototype.map` method + // https://tc39.es/ecma262/#sec-array.prototype.map + map: createMethod(1), + // `Array.prototype.filter` method + // https://tc39.es/ecma262/#sec-array.prototype.filter + filter: createMethod(2), + // `Array.prototype.some` method + // https://tc39.es/ecma262/#sec-array.prototype.some + some: createMethod(3), + // `Array.prototype.every` method + // https://tc39.es/ecma262/#sec-array.prototype.every + every: createMethod(4), + // `Array.prototype.find` method + // https://tc39.es/ecma262/#sec-array.prototype.find + find: createMethod(5), + // `Array.prototype.findIndex` method + // https://tc39.es/ecma262/#sec-array.prototype.findIndex + findIndex: createMethod(6), + // `Array.prototype.filterReject` method + // https://github.com/tc39/proposal-array-filtering + filterReject: createMethod(7) +}; + + +/***/ }), + +/***/ 7147: +/*!*******************************************************!*\ + !*** ./node_modules/core-js/internals/array-slice.js ***! + \*******************************************************/ +/***/ ((module, __unused_webpack_exports, __webpack_require__) => { + + +var uncurryThis = __webpack_require__(/*! ../internals/function-uncurry-this */ 4811); + +module.exports = uncurryThis([].slice); + + +/***/ }), + +/***/ 8674: +/*!*********************************************************************!*\ + !*** ./node_modules/core-js/internals/array-species-constructor.js ***! + \*********************************************************************/ +/***/ ((module, __unused_webpack_exports, __webpack_require__) => { + + +var isArray = __webpack_require__(/*! ../internals/is-array */ 9062); +var isConstructor = __webpack_require__(/*! ../internals/is-constructor */ 3668); +var isObject = __webpack_require__(/*! ../internals/is-object */ 2181); +var wellKnownSymbol = __webpack_require__(/*! ../internals/well-known-symbol */ 7920); + +var SPECIES = wellKnownSymbol('species'); +var $Array = Array; + +// a part of `ArraySpeciesCreate` abstract operation +// https://tc39.es/ecma262/#sec-arrayspeciescreate +module.exports = function (originalArray) { + var C; + if (isArray(originalArray)) { + C = originalArray.constructor; + // cross-realm fallback + if (isConstructor(C) && (C === $Array || isArray(C.prototype))) C = undefined; + else if (isObject(C)) { + C = C[SPECIES]; + if (C === null) C = undefined; + } + } return C === undefined ? $Array : C; +}; + + +/***/ }), + +/***/ 2928: +/*!****************************************************************!*\ + !*** ./node_modules/core-js/internals/array-species-create.js ***! + \****************************************************************/ +/***/ ((module, __unused_webpack_exports, __webpack_require__) => { + + +var arraySpeciesConstructor = __webpack_require__(/*! ../internals/array-species-constructor */ 8674); + +// `ArraySpeciesCreate` abstract operation +// https://tc39.es/ecma262/#sec-arrayspeciescreate +module.exports = function (originalArray, length) { + return new (arraySpeciesConstructor(originalArray))(length === 0 ? 0 : length); +}; + + +/***/ }), + +/***/ 9922: +/*!***********************************************************!*\ + !*** ./node_modules/core-js/internals/array-unique-by.js ***! + \***********************************************************/ +/***/ ((module, __unused_webpack_exports, __webpack_require__) => { + + +var uncurryThis = __webpack_require__(/*! ../internals/function-uncurry-this */ 4811); +var aCallable = __webpack_require__(/*! ../internals/a-callable */ 359); +var isNullOrUndefined = __webpack_require__(/*! ../internals/is-null-or-undefined */ 3448); +var lengthOfArrayLike = __webpack_require__(/*! ../internals/length-of-array-like */ 5543); +var toObject = __webpack_require__(/*! ../internals/to-object */ 9754); +var MapHelpers = __webpack_require__(/*! ../internals/map-helpers */ 4671); +var iterate = __webpack_require__(/*! ../internals/map-iterate */ 9092); + +var Map = MapHelpers.Map; +var mapHas = MapHelpers.has; +var mapSet = MapHelpers.set; +var push = uncurryThis([].push); + +// `Array.prototype.uniqueBy` method +// https://github.com/tc39/proposal-array-unique +module.exports = function uniqueBy(resolver) { + var that = toObject(this); + var length = lengthOfArrayLike(that); + var result = []; + var map = new Map(); + var resolverFunction = !isNullOrUndefined(resolver) ? aCallable(resolver) : function (value) { + return value; + }; + var index, item, key; + for (index = 0; index < length; index++) { + item = that[index]; + key = resolverFunction(item); + if (!mapHas(map, key)) mapSet(map, key, item); + } + iterate(map, function (value) { + push(result, value); + }); + return result; +}; + + +/***/ }), + +/***/ 7393: +/*!**************************************************************************!*\ + !*** ./node_modules/core-js/internals/check-correctness-of-iteration.js ***! + \**************************************************************************/ +/***/ ((module, __unused_webpack_exports, __webpack_require__) => { + + +var wellKnownSymbol = __webpack_require__(/*! ../internals/well-known-symbol */ 7920); + +var ITERATOR = wellKnownSymbol('iterator'); +var SAFE_CLOSING = false; + +try { + var called = 0; + var iteratorWithReturn = { + next: function () { + return { done: !!called++ }; + }, + 'return': function () { + SAFE_CLOSING = true; + } + }; + iteratorWithReturn[ITERATOR] = function () { + return this; + }; + // eslint-disable-next-line es/no-array-from, no-throw-literal -- required for testing + Array.from(iteratorWithReturn, function () { throw 2; }); +} catch (error) { /* empty */ } + +module.exports = function (exec, SKIP_CLOSING) { + try { + if (!SKIP_CLOSING && !SAFE_CLOSING) return false; + } catch (error) { return false; } // workaround of old WebKit + `eval` bug + var ITERATION_SUPPORT = false; + try { + var object = {}; + object[ITERATOR] = function () { + return { + next: function () { + return { done: ITERATION_SUPPORT = true }; + } + }; + }; + exec(object); + } catch (error) { /* empty */ } + return ITERATION_SUPPORT; +}; + + +/***/ }), + +/***/ 5255: +/*!*******************************************************!*\ + !*** ./node_modules/core-js/internals/classof-raw.js ***! + \*******************************************************/ +/***/ ((module, __unused_webpack_exports, __webpack_require__) => { + + +var uncurryThis = __webpack_require__(/*! ../internals/function-uncurry-this */ 4811); + +var toString = uncurryThis({}.toString); +var stringSlice = uncurryThis(''.slice); + +module.exports = function (it) { + return stringSlice(toString(it), 8, -1); +}; + + +/***/ }), + +/***/ 7988: +/*!***************************************************!*\ + !*** ./node_modules/core-js/internals/classof.js ***! + \***************************************************/ +/***/ ((module, __unused_webpack_exports, __webpack_require__) => { + + +var TO_STRING_TAG_SUPPORT = __webpack_require__(/*! ../internals/to-string-tag-support */ 8839); +var isCallable = __webpack_require__(/*! ../internals/is-callable */ 4946); +var classofRaw = __webpack_require__(/*! ../internals/classof-raw */ 5255); +var wellKnownSymbol = __webpack_require__(/*! ../internals/well-known-symbol */ 7920); + +var TO_STRING_TAG = wellKnownSymbol('toStringTag'); +var $Object = Object; + +// ES3 wrong here +var CORRECT_ARGUMENTS = classofRaw(function () { return arguments; }()) === 'Arguments'; + +// fallback for IE11 Script Access Denied error +var tryGet = function (it, key) { + try { + return it[key]; + } catch (error) { /* empty */ } +}; + +// getting tag from ES6+ `Object.prototype.toString` +module.exports = TO_STRING_TAG_SUPPORT ? classofRaw : function (it) { + var O, tag, result; + return it === undefined ? 'Undefined' : it === null ? 'Null' + // @@toStringTag case + : typeof (tag = tryGet(O = $Object(it), TO_STRING_TAG)) == 'string' ? tag + // builtinTag case + : CORRECT_ARGUMENTS ? classofRaw(O) + // ES3 arguments fallback + : (result = classofRaw(O)) === 'Object' && isCallable(O.callee) ? 'Arguments' : result; +}; + + +/***/ }), + +/***/ 2913: +/*!*************************************************************!*\ + !*** ./node_modules/core-js/internals/collection-strong.js ***! + \*************************************************************/ +/***/ ((module, __unused_webpack_exports, __webpack_require__) => { + + +var create = __webpack_require__(/*! ../internals/object-create */ 67); +var defineBuiltInAccessor = __webpack_require__(/*! ../internals/define-built-in-accessor */ 8683); +var defineBuiltIns = __webpack_require__(/*! ../internals/define-built-ins */ 5402); +var bind = __webpack_require__(/*! ../internals/function-bind-context */ 1807); +var anInstance = __webpack_require__(/*! ../internals/an-instance */ 8852); +var isNullOrUndefined = __webpack_require__(/*! ../internals/is-null-or-undefined */ 3448); +var iterate = __webpack_require__(/*! ../internals/iterate */ 6239); +var defineIterator = __webpack_require__(/*! ../internals/iterator-define */ 3167); +var createIterResultObject = __webpack_require__(/*! ../internals/create-iter-result-object */ 5430); +var setSpecies = __webpack_require__(/*! ../internals/set-species */ 9494); +var DESCRIPTORS = __webpack_require__(/*! ../internals/descriptors */ 4527); +var fastKey = (__webpack_require__(/*! ../internals/internal-metadata */ 1943).fastKey); +var InternalStateModule = __webpack_require__(/*! ../internals/internal-state */ 9804); + +var setInternalState = InternalStateModule.set; +var internalStateGetterFor = InternalStateModule.getterFor; + +module.exports = { + getConstructor: function (wrapper, CONSTRUCTOR_NAME, IS_MAP, ADDER) { + var Constructor = wrapper(function (that, iterable) { + anInstance(that, Prototype); + setInternalState(that, { + type: CONSTRUCTOR_NAME, + index: create(null), + first: null, + last: null, + size: 0 + }); + if (!DESCRIPTORS) that.size = 0; + if (!isNullOrUndefined(iterable)) iterate(iterable, that[ADDER], { that: that, AS_ENTRIES: IS_MAP }); + }); + + var Prototype = Constructor.prototype; + + var getInternalState = internalStateGetterFor(CONSTRUCTOR_NAME); + + var define = function (that, key, value) { + var state = getInternalState(that); + var entry = getEntry(that, key); + var previous, index; + // change existing entry + if (entry) { + entry.value = value; + // create new entry + } else { + state.last = entry = { + index: index = fastKey(key, true), + key: key, + value: value, + previous: previous = state.last, + next: null, + removed: false + }; + if (!state.first) state.first = entry; + if (previous) previous.next = entry; + if (DESCRIPTORS) state.size++; + else that.size++; + // add to index + if (index !== 'F') state.index[index] = entry; + } return that; + }; + + var getEntry = function (that, key) { + var state = getInternalState(that); + // fast case + var index = fastKey(key); + var entry; + if (index !== 'F') return state.index[index]; + // frozen object case + for (entry = state.first; entry; entry = entry.next) { + if (entry.key === key) return entry; + } + }; + + defineBuiltIns(Prototype, { + // `{ Map, Set }.prototype.clear()` methods + // https://tc39.es/ecma262/#sec-map.prototype.clear + // https://tc39.es/ecma262/#sec-set.prototype.clear + clear: function clear() { + var that = this; + var state = getInternalState(that); + var entry = state.first; + while (entry) { + entry.removed = true; + if (entry.previous) entry.previous = entry.previous.next = null; + entry = entry.next; + } + state.first = state.last = null; + state.index = create(null); + if (DESCRIPTORS) state.size = 0; + else that.size = 0; + }, + // `{ Map, Set }.prototype.delete(key)` methods + // https://tc39.es/ecma262/#sec-map.prototype.delete + // https://tc39.es/ecma262/#sec-set.prototype.delete + 'delete': function (key) { + var that = this; + var state = getInternalState(that); + var entry = getEntry(that, key); + if (entry) { + var next = entry.next; + var prev = entry.previous; + delete state.index[entry.index]; + entry.removed = true; + if (prev) prev.next = next; + if (next) next.previous = prev; + if (state.first === entry) state.first = next; + if (state.last === entry) state.last = prev; + if (DESCRIPTORS) state.size--; + else that.size--; + } return !!entry; + }, + // `{ Map, Set }.prototype.forEach(callbackfn, thisArg = undefined)` methods + // https://tc39.es/ecma262/#sec-map.prototype.foreach + // https://tc39.es/ecma262/#sec-set.prototype.foreach + forEach: function forEach(callbackfn /* , that = undefined */) { + var state = getInternalState(this); + var boundFunction = bind(callbackfn, arguments.length > 1 ? arguments[1] : undefined); + var entry; + while (entry = entry ? entry.next : state.first) { + boundFunction(entry.value, entry.key, this); + // revert to the last existing entry + while (entry && entry.removed) entry = entry.previous; + } + }, + // `{ Map, Set}.prototype.has(key)` methods + // https://tc39.es/ecma262/#sec-map.prototype.has + // https://tc39.es/ecma262/#sec-set.prototype.has + has: function has(key) { + return !!getEntry(this, key); + } + }); + + defineBuiltIns(Prototype, IS_MAP ? { + // `Map.prototype.get(key)` method + // https://tc39.es/ecma262/#sec-map.prototype.get + get: function get(key) { + var entry = getEntry(this, key); + return entry && entry.value; + }, + // `Map.prototype.set(key, value)` method + // https://tc39.es/ecma262/#sec-map.prototype.set + set: function set(key, value) { + return define(this, key === 0 ? 0 : key, value); + } + } : { + // `Set.prototype.add(value)` method + // https://tc39.es/ecma262/#sec-set.prototype.add + add: function add(value) { + return define(this, value = value === 0 ? 0 : value, value); + } + }); + if (DESCRIPTORS) defineBuiltInAccessor(Prototype, 'size', { + configurable: true, + get: function () { + return getInternalState(this).size; + } + }); + return Constructor; + }, + setStrong: function (Constructor, CONSTRUCTOR_NAME, IS_MAP) { + var ITERATOR_NAME = CONSTRUCTOR_NAME + ' Iterator'; + var getInternalCollectionState = internalStateGetterFor(CONSTRUCTOR_NAME); + var getInternalIteratorState = internalStateGetterFor(ITERATOR_NAME); + // `{ Map, Set }.prototype.{ keys, values, entries, @@iterator }()` methods + // https://tc39.es/ecma262/#sec-map.prototype.entries + // https://tc39.es/ecma262/#sec-map.prototype.keys + // https://tc39.es/ecma262/#sec-map.prototype.values + // https://tc39.es/ecma262/#sec-map.prototype-@@iterator + // https://tc39.es/ecma262/#sec-set.prototype.entries + // https://tc39.es/ecma262/#sec-set.prototype.keys + // https://tc39.es/ecma262/#sec-set.prototype.values + // https://tc39.es/ecma262/#sec-set.prototype-@@iterator + defineIterator(Constructor, CONSTRUCTOR_NAME, function (iterated, kind) { + setInternalState(this, { + type: ITERATOR_NAME, + target: iterated, + state: getInternalCollectionState(iterated), + kind: kind, + last: null + }); + }, function () { + var state = getInternalIteratorState(this); + var kind = state.kind; + var entry = state.last; + // revert to the last existing entry + while (entry && entry.removed) entry = entry.previous; + // get next entry + if (!state.target || !(state.last = entry = entry ? entry.next : state.state.first)) { + // or finish the iteration + state.target = null; + return createIterResultObject(undefined, true); + } + // return step by kind + if (kind === 'keys') return createIterResultObject(entry.key, false); + if (kind === 'values') return createIterResultObject(entry.value, false); + return createIterResultObject([entry.key, entry.value], false); + }, IS_MAP ? 'entries' : 'values', !IS_MAP, true); + + // `{ Map, Set }.prototype[@@species]` accessors + // https://tc39.es/ecma262/#sec-get-map-@@species + // https://tc39.es/ecma262/#sec-get-set-@@species + setSpecies(CONSTRUCTOR_NAME); + } +}; + + +/***/ }), + +/***/ 5270: +/*!***********************************************************!*\ + !*** ./node_modules/core-js/internals/collection-weak.js ***! + \***********************************************************/ +/***/ ((module, __unused_webpack_exports, __webpack_require__) => { + + +var uncurryThis = __webpack_require__(/*! ../internals/function-uncurry-this */ 4811); +var defineBuiltIns = __webpack_require__(/*! ../internals/define-built-ins */ 5402); +var getWeakData = (__webpack_require__(/*! ../internals/internal-metadata */ 1943).getWeakData); +var anInstance = __webpack_require__(/*! ../internals/an-instance */ 8852); +var anObject = __webpack_require__(/*! ../internals/an-object */ 4363); +var isNullOrUndefined = __webpack_require__(/*! ../internals/is-null-or-undefined */ 3448); +var isObject = __webpack_require__(/*! ../internals/is-object */ 2181); +var iterate = __webpack_require__(/*! ../internals/iterate */ 6239); +var ArrayIterationModule = __webpack_require__(/*! ../internals/array-iteration */ 1982); +var hasOwn = __webpack_require__(/*! ../internals/has-own-property */ 4404); +var InternalStateModule = __webpack_require__(/*! ../internals/internal-state */ 9804); + +var setInternalState = InternalStateModule.set; +var internalStateGetterFor = InternalStateModule.getterFor; +var find = ArrayIterationModule.find; +var findIndex = ArrayIterationModule.findIndex; +var splice = uncurryThis([].splice); +var id = 0; + +// fallback for uncaught frozen keys +var uncaughtFrozenStore = function (state) { + return state.frozen || (state.frozen = new UncaughtFrozenStore()); +}; + +var UncaughtFrozenStore = function () { + this.entries = []; +}; + +var findUncaughtFrozen = function (store, key) { + return find(store.entries, function (it) { + return it[0] === key; + }); +}; + +UncaughtFrozenStore.prototype = { + get: function (key) { + var entry = findUncaughtFrozen(this, key); + if (entry) return entry[1]; + }, + has: function (key) { + return !!findUncaughtFrozen(this, key); + }, + set: function (key, value) { + var entry = findUncaughtFrozen(this, key); + if (entry) entry[1] = value; + else this.entries.push([key, value]); + }, + 'delete': function (key) { + var index = findIndex(this.entries, function (it) { + return it[0] === key; + }); + if (~index) splice(this.entries, index, 1); + return !!~index; + } +}; + +module.exports = { + getConstructor: function (wrapper, CONSTRUCTOR_NAME, IS_MAP, ADDER) { + var Constructor = wrapper(function (that, iterable) { + anInstance(that, Prototype); + setInternalState(that, { + type: CONSTRUCTOR_NAME, + id: id++, + frozen: null + }); + if (!isNullOrUndefined(iterable)) iterate(iterable, that[ADDER], { that: that, AS_ENTRIES: IS_MAP }); + }); + + var Prototype = Constructor.prototype; + + var getInternalState = internalStateGetterFor(CONSTRUCTOR_NAME); + + var define = function (that, key, value) { + var state = getInternalState(that); + var data = getWeakData(anObject(key), true); + if (data === true) uncaughtFrozenStore(state).set(key, value); + else data[state.id] = value; + return that; + }; + + defineBuiltIns(Prototype, { + // `{ WeakMap, WeakSet }.prototype.delete(key)` methods + // https://tc39.es/ecma262/#sec-weakmap.prototype.delete + // https://tc39.es/ecma262/#sec-weakset.prototype.delete + 'delete': function (key) { + var state = getInternalState(this); + if (!isObject(key)) return false; + var data = getWeakData(key); + if (data === true) return uncaughtFrozenStore(state)['delete'](key); + return data && hasOwn(data, state.id) && delete data[state.id]; + }, + // `{ WeakMap, WeakSet }.prototype.has(key)` methods + // https://tc39.es/ecma262/#sec-weakmap.prototype.has + // https://tc39.es/ecma262/#sec-weakset.prototype.has + has: function has(key) { + var state = getInternalState(this); + if (!isObject(key)) return false; + var data = getWeakData(key); + if (data === true) return uncaughtFrozenStore(state).has(key); + return data && hasOwn(data, state.id); + } + }); + + defineBuiltIns(Prototype, IS_MAP ? { + // `WeakMap.prototype.get(key)` method + // https://tc39.es/ecma262/#sec-weakmap.prototype.get + get: function get(key) { + var state = getInternalState(this); + if (isObject(key)) { + var data = getWeakData(key); + if (data === true) return uncaughtFrozenStore(state).get(key); + if (data) return data[state.id]; + } + }, + // `WeakMap.prototype.set(key, value)` method + // https://tc39.es/ecma262/#sec-weakmap.prototype.set + set: function set(key, value) { + return define(this, key, value); + } + } : { + // `WeakSet.prototype.add(value)` method + // https://tc39.es/ecma262/#sec-weakset.prototype.add + add: function add(value) { + return define(this, value, true); + } + }); + + return Constructor; + } +}; + + +/***/ }), + +/***/ 2833: +/*!******************************************************!*\ + !*** ./node_modules/core-js/internals/collection.js ***! + \******************************************************/ +/***/ ((module, __unused_webpack_exports, __webpack_require__) => { + + +var $ = __webpack_require__(/*! ../internals/export */ 2203); +var globalThis = __webpack_require__(/*! ../internals/global-this */ 1991); +var uncurryThis = __webpack_require__(/*! ../internals/function-uncurry-this */ 4811); +var isForced = __webpack_require__(/*! ../internals/is-forced */ 8367); +var defineBuiltIn = __webpack_require__(/*! ../internals/define-built-in */ 4879); +var InternalMetadataModule = __webpack_require__(/*! ../internals/internal-metadata */ 1943); +var iterate = __webpack_require__(/*! ../internals/iterate */ 6239); +var anInstance = __webpack_require__(/*! ../internals/an-instance */ 8852); +var isCallable = __webpack_require__(/*! ../internals/is-callable */ 4946); +var isNullOrUndefined = __webpack_require__(/*! ../internals/is-null-or-undefined */ 3448); +var isObject = __webpack_require__(/*! ../internals/is-object */ 2181); +var fails = __webpack_require__(/*! ../internals/fails */ 4948); +var checkCorrectnessOfIteration = __webpack_require__(/*! ../internals/check-correctness-of-iteration */ 7393); +var setToStringTag = __webpack_require__(/*! ../internals/set-to-string-tag */ 9200); +var inheritIfRequired = __webpack_require__(/*! ../internals/inherit-if-required */ 3180); + +module.exports = function (CONSTRUCTOR_NAME, wrapper, common) { + var IS_MAP = CONSTRUCTOR_NAME.indexOf('Map') !== -1; + var IS_WEAK = CONSTRUCTOR_NAME.indexOf('Weak') !== -1; + var ADDER = IS_MAP ? 'set' : 'add'; + var NativeConstructor = globalThis[CONSTRUCTOR_NAME]; + var NativePrototype = NativeConstructor && NativeConstructor.prototype; + var Constructor = NativeConstructor; + var exported = {}; + + var fixMethod = function (KEY) { + var uncurriedNativeMethod = uncurryThis(NativePrototype[KEY]); + defineBuiltIn(NativePrototype, KEY, + KEY === 'add' ? function add(value) { + uncurriedNativeMethod(this, value === 0 ? 0 : value); + return this; + } : KEY === 'delete' ? function (key) { + return IS_WEAK && !isObject(key) ? false : uncurriedNativeMethod(this, key === 0 ? 0 : key); + } : KEY === 'get' ? function get(key) { + return IS_WEAK && !isObject(key) ? undefined : uncurriedNativeMethod(this, key === 0 ? 0 : key); + } : KEY === 'has' ? function has(key) { + return IS_WEAK && !isObject(key) ? false : uncurriedNativeMethod(this, key === 0 ? 0 : key); + } : function set(key, value) { + uncurriedNativeMethod(this, key === 0 ? 0 : key, value); + return this; + } + ); + }; + + var REPLACE = isForced( + CONSTRUCTOR_NAME, + !isCallable(NativeConstructor) || !(IS_WEAK || NativePrototype.forEach && !fails(function () { + new NativeConstructor().entries().next(); + })) + ); + + if (REPLACE) { + // create collection constructor + Constructor = common.getConstructor(wrapper, CONSTRUCTOR_NAME, IS_MAP, ADDER); + InternalMetadataModule.enable(); + } else if (isForced(CONSTRUCTOR_NAME, true)) { + var instance = new Constructor(); + // early implementations not supports chaining + var HASNT_CHAINING = instance[ADDER](IS_WEAK ? {} : -0, 1) !== instance; + // V8 ~ Chromium 40- weak-collections throws on primitives, but should return false + var THROWS_ON_PRIMITIVES = fails(function () { instance.has(1); }); + // most early implementations doesn't supports iterables, most modern - not close it correctly + // eslint-disable-next-line no-new -- required for testing + var ACCEPT_ITERABLES = checkCorrectnessOfIteration(function (iterable) { new NativeConstructor(iterable); }); + // for early implementations -0 and +0 not the same + var BUGGY_ZERO = !IS_WEAK && fails(function () { + // V8 ~ Chromium 42- fails only with 5+ elements + var $instance = new NativeConstructor(); + var index = 5; + while (index--) $instance[ADDER](index, index); + return !$instance.has(-0); + }); + + if (!ACCEPT_ITERABLES) { + Constructor = wrapper(function (dummy, iterable) { + anInstance(dummy, NativePrototype); + var that = inheritIfRequired(new NativeConstructor(), dummy, Constructor); + if (!isNullOrUndefined(iterable)) iterate(iterable, that[ADDER], { that: that, AS_ENTRIES: IS_MAP }); + return that; + }); + Constructor.prototype = NativePrototype; + NativePrototype.constructor = Constructor; + } + + if (THROWS_ON_PRIMITIVES || BUGGY_ZERO) { + fixMethod('delete'); + fixMethod('has'); + IS_MAP && fixMethod('get'); + } + + if (BUGGY_ZERO || HASNT_CHAINING) fixMethod(ADDER); + + // weak collections should not contains .clear method + if (IS_WEAK && NativePrototype.clear) delete NativePrototype.clear; + } + + exported[CONSTRUCTOR_NAME] = Constructor; + $({ global: true, constructor: true, forced: Constructor !== NativeConstructor }, exported); + + setToStringTag(Constructor, CONSTRUCTOR_NAME); + + if (!IS_WEAK) common.setStrong(Constructor, CONSTRUCTOR_NAME, IS_MAP); + + return Constructor; +}; + + +/***/ }), + +/***/ 5488: +/*!***********************************************************************!*\ + !*** ./node_modules/core-js/internals/copy-constructor-properties.js ***! + \***********************************************************************/ +/***/ ((module, __unused_webpack_exports, __webpack_require__) => { + + +var hasOwn = __webpack_require__(/*! ../internals/has-own-property */ 4404); +var ownKeys = __webpack_require__(/*! ../internals/own-keys */ 1178); +var getOwnPropertyDescriptorModule = __webpack_require__(/*! ../internals/object-get-own-property-descriptor */ 8158); +var definePropertyModule = __webpack_require__(/*! ../internals/object-define-property */ 2180); + +module.exports = function (target, source, exceptions) { + var keys = ownKeys(source); + var defineProperty = definePropertyModule.f; + var getOwnPropertyDescriptor = getOwnPropertyDescriptorModule.f; + for (var i = 0; i < keys.length; i++) { + var key = keys[i]; + if (!hasOwn(target, key) && !(exceptions && hasOwn(exceptions, key))) { + defineProperty(target, key, getOwnPropertyDescriptor(source, key)); + } + } +}; + + +/***/ }), + +/***/ 2430: +/*!********************************************************************!*\ + !*** ./node_modules/core-js/internals/correct-prototype-getter.js ***! + \********************************************************************/ +/***/ ((module, __unused_webpack_exports, __webpack_require__) => { + + +var fails = __webpack_require__(/*! ../internals/fails */ 4948); + +module.exports = !fails(function () { + function F() { /* empty */ } + F.prototype.constructor = null; + // eslint-disable-next-line es/no-object-getprototypeof -- required for testing + return Object.getPrototypeOf(new F()) !== F.prototype; +}); + + +/***/ }), + +/***/ 5430: +/*!*********************************************************************!*\ + !*** ./node_modules/core-js/internals/create-iter-result-object.js ***! + \*********************************************************************/ +/***/ ((module) => { + + +// `CreateIterResultObject` abstract operation +// https://tc39.es/ecma262/#sec-createiterresultobject +module.exports = function (value, done) { + return { value: value, done: done }; +}; + + +/***/ }), + +/***/ 5250: +/*!**************************************************************************!*\ + !*** ./node_modules/core-js/internals/create-non-enumerable-property.js ***! + \**************************************************************************/ +/***/ ((module, __unused_webpack_exports, __webpack_require__) => { + + +var DESCRIPTORS = __webpack_require__(/*! ../internals/descriptors */ 4527); +var definePropertyModule = __webpack_require__(/*! ../internals/object-define-property */ 2180); +var createPropertyDescriptor = __webpack_require__(/*! ../internals/create-property-descriptor */ 8113); + +module.exports = DESCRIPTORS ? function (object, key, value) { + return definePropertyModule.f(object, key, createPropertyDescriptor(1, value)); +} : function (object, key, value) { + object[key] = value; + return object; +}; + + +/***/ }), + +/***/ 8113: +/*!**********************************************************************!*\ + !*** ./node_modules/core-js/internals/create-property-descriptor.js ***! + \**********************************************************************/ +/***/ ((module) => { + + +module.exports = function (bitmap, value) { + return { + enumerable: !(bitmap & 1), + configurable: !(bitmap & 2), + writable: !(bitmap & 4), + value: value + }; +}; + + +/***/ }), + +/***/ 8683: +/*!********************************************************************!*\ + !*** ./node_modules/core-js/internals/define-built-in-accessor.js ***! + \********************************************************************/ +/***/ ((module, __unused_webpack_exports, __webpack_require__) => { + + +var makeBuiltIn = __webpack_require__(/*! ../internals/make-built-in */ 336); +var defineProperty = __webpack_require__(/*! ../internals/object-define-property */ 2180); + +module.exports = function (target, name, descriptor) { + if (descriptor.get) makeBuiltIn(descriptor.get, name, { getter: true }); + if (descriptor.set) makeBuiltIn(descriptor.set, name, { setter: true }); + return defineProperty.f(target, name, descriptor); +}; + + +/***/ }), + +/***/ 4879: +/*!***********************************************************!*\ + !*** ./node_modules/core-js/internals/define-built-in.js ***! + \***********************************************************/ +/***/ ((module, __unused_webpack_exports, __webpack_require__) => { + + +var isCallable = __webpack_require__(/*! ../internals/is-callable */ 4946); +var definePropertyModule = __webpack_require__(/*! ../internals/object-define-property */ 2180); +var makeBuiltIn = __webpack_require__(/*! ../internals/make-built-in */ 336); +var defineGlobalProperty = __webpack_require__(/*! ../internals/define-global-property */ 7612); + +module.exports = function (O, key, value, options) { + if (!options) options = {}; + var simple = options.enumerable; + var name = options.name !== undefined ? options.name : key; + if (isCallable(value)) makeBuiltIn(value, name, options); + if (options.global) { + if (simple) O[key] = value; + else defineGlobalProperty(key, value); + } else { + try { + if (!options.unsafe) delete O[key]; + else if (O[key]) simple = true; + } catch (error) { /* empty */ } + if (simple) O[key] = value; + else definePropertyModule.f(O, key, { + value: value, + enumerable: false, + configurable: !options.nonConfigurable, + writable: !options.nonWritable + }); + } return O; +}; + + +/***/ }), + +/***/ 5402: +/*!************************************************************!*\ + !*** ./node_modules/core-js/internals/define-built-ins.js ***! + \************************************************************/ +/***/ ((module, __unused_webpack_exports, __webpack_require__) => { + + +var defineBuiltIn = __webpack_require__(/*! ../internals/define-built-in */ 4879); + +module.exports = function (target, src, options) { + for (var key in src) defineBuiltIn(target, key, src[key], options); + return target; +}; + + +/***/ }), + +/***/ 7612: +/*!******************************************************************!*\ + !*** ./node_modules/core-js/internals/define-global-property.js ***! + \******************************************************************/ +/***/ ((module, __unused_webpack_exports, __webpack_require__) => { + + +var globalThis = __webpack_require__(/*! ../internals/global-this */ 1991); + +// eslint-disable-next-line es/no-object-defineproperty -- safe +var defineProperty = Object.defineProperty; + +module.exports = function (key, value) { + try { + defineProperty(globalThis, key, { value: value, configurable: true, writable: true }); + } catch (error) { + globalThis[key] = value; + } return value; +}; + + +/***/ }), + +/***/ 4527: +/*!*******************************************************!*\ + !*** ./node_modules/core-js/internals/descriptors.js ***! + \*******************************************************/ +/***/ ((module, __unused_webpack_exports, __webpack_require__) => { + + +var fails = __webpack_require__(/*! ../internals/fails */ 4948); + +// Detect IE8's incomplete defineProperty implementation +module.exports = !fails(function () { + // eslint-disable-next-line es/no-object-defineproperty -- required for testing + return Object.defineProperty({}, 1, { get: function () { return 7; } })[1] !== 7; +}); + + +/***/ }), + +/***/ 9528: +/*!*******************************************************************!*\ + !*** ./node_modules/core-js/internals/document-create-element.js ***! + \*******************************************************************/ +/***/ ((module, __unused_webpack_exports, __webpack_require__) => { + + +var globalThis = __webpack_require__(/*! ../internals/global-this */ 1991); +var isObject = __webpack_require__(/*! ../internals/is-object */ 2181); + +var document = globalThis.document; +// typeof document.createElement is 'object' in old IE +var EXISTS = isObject(document) && isObject(document.createElement); + +module.exports = function (it) { + return EXISTS ? document.createElement(it) : {}; +}; + + +/***/ }), + +/***/ 1616: +/*!*********************************************************!*\ + !*** ./node_modules/core-js/internals/enum-bug-keys.js ***! + \*********************************************************/ +/***/ ((module) => { + + +// IE8- don't enum bug keys +module.exports = [ + 'constructor', + 'hasOwnProperty', + 'isPrototypeOf', + 'propertyIsEnumerable', + 'toLocaleString', + 'toString', + 'valueOf' +]; + + +/***/ }), + +/***/ 5058: +/*!******************************************************************!*\ + !*** ./node_modules/core-js/internals/environment-user-agent.js ***! + \******************************************************************/ +/***/ ((module, __unused_webpack_exports, __webpack_require__) => { + + +var globalThis = __webpack_require__(/*! ../internals/global-this */ 1991); + +var navigator = globalThis.navigator; +var userAgent = navigator && navigator.userAgent; + +module.exports = userAgent ? String(userAgent) : ''; + + +/***/ }), + +/***/ 1462: +/*!******************************************************************!*\ + !*** ./node_modules/core-js/internals/environment-v8-version.js ***! + \******************************************************************/ +/***/ ((module, __unused_webpack_exports, __webpack_require__) => { + + +var globalThis = __webpack_require__(/*! ../internals/global-this */ 1991); +var userAgent = __webpack_require__(/*! ../internals/environment-user-agent */ 5058); + +var process = globalThis.process; +var Deno = globalThis.Deno; +var versions = process && process.versions || Deno && Deno.version; +var v8 = versions && versions.v8; +var match, version; + +if (v8) { + match = v8.split('.'); + // in old Chrome, versions of V8 isn't V8 = Chrome / 10 + // but their correct versions are not interesting for us + version = match[0] > 0 && match[0] < 4 ? 1 : +(match[0] + match[1]); +} + +// BrowserFS NodeJS `process` polyfill incorrectly set `.v8` to `0.0` +// so check `userAgent` even if `.v8` exists, but 0 +if (!version && userAgent) { + match = userAgent.match(/Edge\/(\d+)/); + if (!match || match[1] >= 74) { + match = userAgent.match(/Chrome\/(\d+)/); + if (match) version = +match[1]; + } +} + +module.exports = version; + + +/***/ }), + +/***/ 2203: +/*!**************************************************!*\ + !*** ./node_modules/core-js/internals/export.js ***! + \**************************************************/ +/***/ ((module, __unused_webpack_exports, __webpack_require__) => { + + +var globalThis = __webpack_require__(/*! ../internals/global-this */ 1991); +var getOwnPropertyDescriptor = (__webpack_require__(/*! ../internals/object-get-own-property-descriptor */ 8158).f); +var createNonEnumerableProperty = __webpack_require__(/*! ../internals/create-non-enumerable-property */ 5250); +var defineBuiltIn = __webpack_require__(/*! ../internals/define-built-in */ 4879); +var defineGlobalProperty = __webpack_require__(/*! ../internals/define-global-property */ 7612); +var copyConstructorProperties = __webpack_require__(/*! ../internals/copy-constructor-properties */ 5488); +var isForced = __webpack_require__(/*! ../internals/is-forced */ 8367); + +/* + options.target - name of the target object + options.global - target is the global object + options.stat - export as static methods of target + options.proto - export as prototype methods of target + options.real - real prototype method for the `pure` version + options.forced - export even if the native feature is available + options.bind - bind methods to the target, required for the `pure` version + options.wrap - wrap constructors to preventing global pollution, required for the `pure` version + options.unsafe - use the simple assignment of property instead of delete + defineProperty + options.sham - add a flag to not completely full polyfills + options.enumerable - export as enumerable property + options.dontCallGetSet - prevent calling a getter on target + options.name - the .name of the function if it does not match the key +*/ +module.exports = function (options, source) { + var TARGET = options.target; + var GLOBAL = options.global; + var STATIC = options.stat; + var FORCED, target, key, targetProperty, sourceProperty, descriptor; + if (GLOBAL) { + target = globalThis; + } else if (STATIC) { + target = globalThis[TARGET] || defineGlobalProperty(TARGET, {}); + } else { + target = globalThis[TARGET] && globalThis[TARGET].prototype; + } + if (target) for (key in source) { + sourceProperty = source[key]; + if (options.dontCallGetSet) { + descriptor = getOwnPropertyDescriptor(target, key); + targetProperty = descriptor && descriptor.value; + } else targetProperty = target[key]; + FORCED = isForced(GLOBAL ? key : TARGET + (STATIC ? '.' : '#') + key, options.forced); + // contained in target + if (!FORCED && targetProperty !== undefined) { + if (typeof sourceProperty == typeof targetProperty) continue; + copyConstructorProperties(sourceProperty, targetProperty); + } + // add a flag to not completely full polyfills + if (options.sham || (targetProperty && targetProperty.sham)) { + createNonEnumerableProperty(sourceProperty, 'sham', true); + } + defineBuiltIn(target, key, sourceProperty, options); + } +}; + + +/***/ }), + +/***/ 4948: +/*!*************************************************!*\ + !*** ./node_modules/core-js/internals/fails.js ***! + \*************************************************/ +/***/ ((module) => { + + +module.exports = function (exec) { + try { + return !!exec(); + } catch (error) { + return true; + } +}; + + +/***/ }), + +/***/ 6681: +/*!****************************************************!*\ + !*** ./node_modules/core-js/internals/freezing.js ***! + \****************************************************/ +/***/ ((module, __unused_webpack_exports, __webpack_require__) => { + + +var fails = __webpack_require__(/*! ../internals/fails */ 4948); + +module.exports = !fails(function () { + // eslint-disable-next-line es/no-object-isextensible, es/no-object-preventextensions -- required for testing + return Object.isExtensible(Object.preventExtensions({})); +}); + + +/***/ }), + +/***/ 1807: +/*!*****************************************************************!*\ + !*** ./node_modules/core-js/internals/function-bind-context.js ***! + \*****************************************************************/ +/***/ ((module, __unused_webpack_exports, __webpack_require__) => { + + +var uncurryThis = __webpack_require__(/*! ../internals/function-uncurry-this-clause */ 8417); +var aCallable = __webpack_require__(/*! ../internals/a-callable */ 359); +var NATIVE_BIND = __webpack_require__(/*! ../internals/function-bind-native */ 7193); + +var bind = uncurryThis(uncurryThis.bind); + +// optional / simple context binding +module.exports = function (fn, that) { + aCallable(fn); + return that === undefined ? fn : NATIVE_BIND ? bind(fn, that) : function (/* ...args */) { + return fn.apply(that, arguments); + }; +}; + + +/***/ }), + +/***/ 7193: +/*!****************************************************************!*\ + !*** ./node_modules/core-js/internals/function-bind-native.js ***! + \****************************************************************/ +/***/ ((module, __unused_webpack_exports, __webpack_require__) => { + + +var fails = __webpack_require__(/*! ../internals/fails */ 4948); + +module.exports = !fails(function () { + // eslint-disable-next-line es/no-function-prototype-bind -- safe + var test = (function () { /* empty */ }).bind(); + // eslint-disable-next-line no-prototype-builtins -- safe + return typeof test != 'function' || test.hasOwnProperty('prototype'); +}); + + +/***/ }), + +/***/ 82: +/*!*********************************************************!*\ + !*** ./node_modules/core-js/internals/function-call.js ***! + \*********************************************************/ +/***/ ((module, __unused_webpack_exports, __webpack_require__) => { + + +var NATIVE_BIND = __webpack_require__(/*! ../internals/function-bind-native */ 7193); + +var call = Function.prototype.call; + +module.exports = NATIVE_BIND ? call.bind(call) : function () { + return call.apply(call, arguments); +}; + + +/***/ }), + +/***/ 6553: +/*!*********************************************************!*\ + !*** ./node_modules/core-js/internals/function-name.js ***! + \*********************************************************/ +/***/ ((module, __unused_webpack_exports, __webpack_require__) => { + + +var DESCRIPTORS = __webpack_require__(/*! ../internals/descriptors */ 4527); +var hasOwn = __webpack_require__(/*! ../internals/has-own-property */ 4404); + +var FunctionPrototype = Function.prototype; +// eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe +var getDescriptor = DESCRIPTORS && Object.getOwnPropertyDescriptor; + +var EXISTS = hasOwn(FunctionPrototype, 'name'); +// additional protection from minified / mangled / dropped function names +var PROPER = EXISTS && (function something() { /* empty */ }).name === 'something'; +var CONFIGURABLE = EXISTS && (!DESCRIPTORS || (DESCRIPTORS && getDescriptor(FunctionPrototype, 'name').configurable)); + +module.exports = { + EXISTS: EXISTS, + PROPER: PROPER, + CONFIGURABLE: CONFIGURABLE +}; + + +/***/ }), + +/***/ 4807: +/*!**************************************************************************!*\ + !*** ./node_modules/core-js/internals/function-uncurry-this-accessor.js ***! + \**************************************************************************/ +/***/ ((module, __unused_webpack_exports, __webpack_require__) => { + + +var uncurryThis = __webpack_require__(/*! ../internals/function-uncurry-this */ 4811); +var aCallable = __webpack_require__(/*! ../internals/a-callable */ 359); + +module.exports = function (object, key, method) { + try { + // eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe + return uncurryThis(aCallable(Object.getOwnPropertyDescriptor(object, key)[method])); + } catch (error) { /* empty */ } +}; + + +/***/ }), + +/***/ 8417: +/*!************************************************************************!*\ + !*** ./node_modules/core-js/internals/function-uncurry-this-clause.js ***! + \************************************************************************/ +/***/ ((module, __unused_webpack_exports, __webpack_require__) => { + + +var classofRaw = __webpack_require__(/*! ../internals/classof-raw */ 5255); +var uncurryThis = __webpack_require__(/*! ../internals/function-uncurry-this */ 4811); + +module.exports = function (fn) { + // Nashorn bug: + // https://github.com/zloirock/core-js/issues/1128 + // https://github.com/zloirock/core-js/issues/1130 + if (classofRaw(fn) === 'Function') return uncurryThis(fn); +}; + + +/***/ }), + +/***/ 4811: +/*!*****************************************************************!*\ + !*** ./node_modules/core-js/internals/function-uncurry-this.js ***! + \*****************************************************************/ +/***/ ((module, __unused_webpack_exports, __webpack_require__) => { + + +var NATIVE_BIND = __webpack_require__(/*! ../internals/function-bind-native */ 7193); + +var FunctionPrototype = Function.prototype; +var call = FunctionPrototype.call; +var uncurryThisWithBind = NATIVE_BIND && FunctionPrototype.bind.bind(call, call); + +module.exports = NATIVE_BIND ? uncurryThisWithBind : function (fn) { + return function () { + return call.apply(fn, arguments); + }; +}; + + +/***/ }), + +/***/ 6102: +/*!********************************************************!*\ + !*** ./node_modules/core-js/internals/get-built-in.js ***! + \********************************************************/ +/***/ ((module, __unused_webpack_exports, __webpack_require__) => { + + +var globalThis = __webpack_require__(/*! ../internals/global-this */ 1991); +var isCallable = __webpack_require__(/*! ../internals/is-callable */ 4946); + +var aFunction = function (argument) { + return isCallable(argument) ? argument : undefined; +}; + +module.exports = function (namespace, method) { + return arguments.length < 2 ? aFunction(globalThis[namespace]) : globalThis[namespace] && globalThis[namespace][method]; +}; + + +/***/ }), + +/***/ 4880: +/*!***************************************************************!*\ + !*** ./node_modules/core-js/internals/get-iterator-method.js ***! + \***************************************************************/ +/***/ ((module, __unused_webpack_exports, __webpack_require__) => { + + +var classof = __webpack_require__(/*! ../internals/classof */ 7988); +var getMethod = __webpack_require__(/*! ../internals/get-method */ 4639); +var isNullOrUndefined = __webpack_require__(/*! ../internals/is-null-or-undefined */ 3448); +var Iterators = __webpack_require__(/*! ../internals/iterators */ 6438); +var wellKnownSymbol = __webpack_require__(/*! ../internals/well-known-symbol */ 7920); + +var ITERATOR = wellKnownSymbol('iterator'); + +module.exports = function (it) { + if (!isNullOrUndefined(it)) return getMethod(it, ITERATOR) + || getMethod(it, '@@iterator') + || Iterators[classof(it)]; +}; + + +/***/ }), + +/***/ 7716: +/*!********************************************************!*\ + !*** ./node_modules/core-js/internals/get-iterator.js ***! + \********************************************************/ +/***/ ((module, __unused_webpack_exports, __webpack_require__) => { + + +var call = __webpack_require__(/*! ../internals/function-call */ 82); +var aCallable = __webpack_require__(/*! ../internals/a-callable */ 359); +var anObject = __webpack_require__(/*! ../internals/an-object */ 4363); +var tryToString = __webpack_require__(/*! ../internals/try-to-string */ 4824); +var getIteratorMethod = __webpack_require__(/*! ../internals/get-iterator-method */ 4880); + +var $TypeError = TypeError; + +module.exports = function (argument, usingIterator) { + var iteratorMethod = arguments.length < 2 ? getIteratorMethod(argument) : usingIterator; + if (aCallable(iteratorMethod)) return anObject(call(iteratorMethod, argument)); + throw new $TypeError(tryToString(argument) + ' is not iterable'); +}; + + +/***/ }), + +/***/ 4639: +/*!******************************************************!*\ + !*** ./node_modules/core-js/internals/get-method.js ***! + \******************************************************/ +/***/ ((module, __unused_webpack_exports, __webpack_require__) => { + + +var aCallable = __webpack_require__(/*! ../internals/a-callable */ 359); +var isNullOrUndefined = __webpack_require__(/*! ../internals/is-null-or-undefined */ 3448); + +// `GetMethod` abstract operation +// https://tc39.es/ecma262/#sec-getmethod +module.exports = function (V, P) { + var func = V[P]; + return isNullOrUndefined(func) ? undefined : aCallable(func); +}; + + +/***/ }), + +/***/ 1991: +/*!*******************************************************!*\ + !*** ./node_modules/core-js/internals/global-this.js ***! + \*******************************************************/ +/***/ (function(module) { + + +var check = function (it) { + return it && it.Math === Math && it; +}; + +// https://github.com/zloirock/core-js/issues/86#issuecomment-115759028 +module.exports = + // eslint-disable-next-line es/no-global-this -- safe + check(typeof globalThis == 'object' && globalThis) || + check(typeof window == 'object' && window) || + // eslint-disable-next-line no-restricted-globals -- safe + check(typeof self == 'object' && self) || + check(typeof global == 'object' && global) || + check(typeof this == 'object' && this) || + // eslint-disable-next-line no-new-func -- fallback + (function () { return this; })() || Function('return this')(); + + +/***/ }), + +/***/ 4404: +/*!************************************************************!*\ + !*** ./node_modules/core-js/internals/has-own-property.js ***! + \************************************************************/ +/***/ ((module, __unused_webpack_exports, __webpack_require__) => { + + +var uncurryThis = __webpack_require__(/*! ../internals/function-uncurry-this */ 4811); +var toObject = __webpack_require__(/*! ../internals/to-object */ 9754); + +var hasOwnProperty = uncurryThis({}.hasOwnProperty); + +// `HasOwnProperty` abstract operation +// https://tc39.es/ecma262/#sec-hasownproperty +// eslint-disable-next-line es/no-object-hasown -- safe +module.exports = Object.hasOwn || function hasOwn(it, key) { + return hasOwnProperty(toObject(it), key); +}; + + +/***/ }), + +/***/ 1930: +/*!*******************************************************!*\ + !*** ./node_modules/core-js/internals/hidden-keys.js ***! + \*******************************************************/ +/***/ ((module) => { + + +module.exports = {}; + + +/***/ }), + +/***/ 3896: +/*!************************************************!*\ + !*** ./node_modules/core-js/internals/html.js ***! + \************************************************/ +/***/ ((module, __unused_webpack_exports, __webpack_require__) => { + + +var getBuiltIn = __webpack_require__(/*! ../internals/get-built-in */ 6102); + +module.exports = getBuiltIn('document', 'documentElement'); + + +/***/ }), + +/***/ 1976: +/*!**********************************************************!*\ + !*** ./node_modules/core-js/internals/ie8-dom-define.js ***! + \**********************************************************/ +/***/ ((module, __unused_webpack_exports, __webpack_require__) => { + + +var DESCRIPTORS = __webpack_require__(/*! ../internals/descriptors */ 4527); +var fails = __webpack_require__(/*! ../internals/fails */ 4948); +var createElement = __webpack_require__(/*! ../internals/document-create-element */ 9528); + +// Thanks to IE8 for its funny defineProperty +module.exports = !DESCRIPTORS && !fails(function () { + // eslint-disable-next-line es/no-object-defineproperty -- required for testing + return Object.defineProperty(createElement('div'), 'a', { + get: function () { return 7; } + }).a !== 7; +}); + + +/***/ }), + +/***/ 9114: +/*!**********************************************************!*\ + !*** ./node_modules/core-js/internals/indexed-object.js ***! + \**********************************************************/ +/***/ ((module, __unused_webpack_exports, __webpack_require__) => { + + +var uncurryThis = __webpack_require__(/*! ../internals/function-uncurry-this */ 4811); +var fails = __webpack_require__(/*! ../internals/fails */ 4948); +var classof = __webpack_require__(/*! ../internals/classof-raw */ 5255); + +var $Object = Object; +var split = uncurryThis(''.split); + +// fallback for non-array-like ES3 and non-enumerable old V8 strings +module.exports = fails(function () { + // throws an error in rhino, see https://github.com/mozilla/rhino/issues/346 + // eslint-disable-next-line no-prototype-builtins -- safe + return !$Object('z').propertyIsEnumerable(0); +}) ? function (it) { + return classof(it) === 'String' ? split(it, '') : $Object(it); +} : $Object; + + +/***/ }), + +/***/ 3180: +/*!***************************************************************!*\ + !*** ./node_modules/core-js/internals/inherit-if-required.js ***! + \***************************************************************/ +/***/ ((module, __unused_webpack_exports, __webpack_require__) => { + + +var isCallable = __webpack_require__(/*! ../internals/is-callable */ 4946); +var isObject = __webpack_require__(/*! ../internals/is-object */ 2181); +var setPrototypeOf = __webpack_require__(/*! ../internals/object-set-prototype-of */ 7888); + +// makes subclassing work correct for wrapped built-ins +module.exports = function ($this, dummy, Wrapper) { + var NewTarget, NewTargetPrototype; + if ( + // it can work only with native `setPrototypeOf` + setPrototypeOf && + // we haven't completely correct pre-ES6 way for getting `new.target`, so use this + isCallable(NewTarget = dummy.constructor) && + NewTarget !== Wrapper && + isObject(NewTargetPrototype = NewTarget.prototype) && + NewTargetPrototype !== Wrapper.prototype + ) setPrototypeOf($this, NewTargetPrototype); + return $this; +}; + + +/***/ }), + +/***/ 8447: +/*!**********************************************************!*\ + !*** ./node_modules/core-js/internals/inspect-source.js ***! + \**********************************************************/ +/***/ ((module, __unused_webpack_exports, __webpack_require__) => { + + +var uncurryThis = __webpack_require__(/*! ../internals/function-uncurry-this */ 4811); +var isCallable = __webpack_require__(/*! ../internals/is-callable */ 4946); +var store = __webpack_require__(/*! ../internals/shared-store */ 728); + +var functionToString = uncurryThis(Function.toString); + +// this helper broken in `core-js@3.4.1-3.4.4`, so we can't use `shared` helper +if (!isCallable(store.inspectSource)) { + store.inspectSource = function (it) { + return functionToString(it); + }; +} + +module.exports = store.inspectSource; + + +/***/ }), + +/***/ 1943: +/*!*************************************************************!*\ + !*** ./node_modules/core-js/internals/internal-metadata.js ***! + \*************************************************************/ +/***/ ((module, __unused_webpack_exports, __webpack_require__) => { + + +var $ = __webpack_require__(/*! ../internals/export */ 2203); +var uncurryThis = __webpack_require__(/*! ../internals/function-uncurry-this */ 4811); +var hiddenKeys = __webpack_require__(/*! ../internals/hidden-keys */ 1930); +var isObject = __webpack_require__(/*! ../internals/is-object */ 2181); +var hasOwn = __webpack_require__(/*! ../internals/has-own-property */ 4404); +var defineProperty = (__webpack_require__(/*! ../internals/object-define-property */ 2180).f); +var getOwnPropertyNamesModule = __webpack_require__(/*! ../internals/object-get-own-property-names */ 2323); +var getOwnPropertyNamesExternalModule = __webpack_require__(/*! ../internals/object-get-own-property-names-external */ 3207); +var isExtensible = __webpack_require__(/*! ../internals/object-is-extensible */ 5317); +var uid = __webpack_require__(/*! ../internals/uid */ 2459); +var FREEZING = __webpack_require__(/*! ../internals/freezing */ 6681); + +var REQUIRED = false; +var METADATA = uid('meta'); +var id = 0; + +var setMetadata = function (it) { + defineProperty(it, METADATA, { value: { + objectID: 'O' + id++, // object ID + weakData: {} // weak collections IDs + } }); +}; + +var fastKey = function (it, create) { + // return a primitive with prefix + if (!isObject(it)) return typeof it == 'symbol' ? it : (typeof it == 'string' ? 'S' : 'P') + it; + if (!hasOwn(it, METADATA)) { + // can't set metadata to uncaught frozen object + if (!isExtensible(it)) return 'F'; + // not necessary to add metadata + if (!create) return 'E'; + // add missing metadata + setMetadata(it); + // return object ID + } return it[METADATA].objectID; +}; + +var getWeakData = function (it, create) { + if (!hasOwn(it, METADATA)) { + // can't set metadata to uncaught frozen object + if (!isExtensible(it)) return true; + // not necessary to add metadata + if (!create) return false; + // add missing metadata + setMetadata(it); + // return the store of weak collections IDs + } return it[METADATA].weakData; +}; + +// add metadata on freeze-family methods calling +var onFreeze = function (it) { + if (FREEZING && REQUIRED && isExtensible(it) && !hasOwn(it, METADATA)) setMetadata(it); + return it; +}; + +var enable = function () { + meta.enable = function () { /* empty */ }; + REQUIRED = true; + var getOwnPropertyNames = getOwnPropertyNamesModule.f; + var splice = uncurryThis([].splice); + var test = {}; + test[METADATA] = 1; + + // prevent exposing of metadata key + if (getOwnPropertyNames(test).length) { + getOwnPropertyNamesModule.f = function (it) { + var result = getOwnPropertyNames(it); + for (var i = 0, length = result.length; i < length; i++) { + if (result[i] === METADATA) { + splice(result, i, 1); + break; + } + } return result; + }; + + $({ target: 'Object', stat: true, forced: true }, { + getOwnPropertyNames: getOwnPropertyNamesExternalModule.f + }); + } +}; + +var meta = module.exports = { + enable: enable, + fastKey: fastKey, + getWeakData: getWeakData, + onFreeze: onFreeze +}; + +hiddenKeys[METADATA] = true; + + +/***/ }), + +/***/ 9804: +/*!**********************************************************!*\ + !*** ./node_modules/core-js/internals/internal-state.js ***! + \**********************************************************/ +/***/ ((module, __unused_webpack_exports, __webpack_require__) => { + + +var NATIVE_WEAK_MAP = __webpack_require__(/*! ../internals/weak-map-basic-detection */ 3839); +var globalThis = __webpack_require__(/*! ../internals/global-this */ 1991); +var isObject = __webpack_require__(/*! ../internals/is-object */ 2181); +var createNonEnumerableProperty = __webpack_require__(/*! ../internals/create-non-enumerable-property */ 5250); +var hasOwn = __webpack_require__(/*! ../internals/has-own-property */ 4404); +var shared = __webpack_require__(/*! ../internals/shared-store */ 728); +var sharedKey = __webpack_require__(/*! ../internals/shared-key */ 2114); +var hiddenKeys = __webpack_require__(/*! ../internals/hidden-keys */ 1930); + +var OBJECT_ALREADY_INITIALIZED = 'Object already initialized'; +var TypeError = globalThis.TypeError; +var WeakMap = globalThis.WeakMap; +var set, get, has; + +var enforce = function (it) { + return has(it) ? get(it) : set(it, {}); +}; + +var getterFor = function (TYPE) { + return function (it) { + var state; + if (!isObject(it) || (state = get(it)).type !== TYPE) { + throw new TypeError('Incompatible receiver, ' + TYPE + ' required'); + } return state; + }; +}; + +if (NATIVE_WEAK_MAP || shared.state) { + var store = shared.state || (shared.state = new WeakMap()); + /* eslint-disable no-self-assign -- prototype methods protection */ + store.get = store.get; + store.has = store.has; + store.set = store.set; + /* eslint-enable no-self-assign -- prototype methods protection */ + set = function (it, metadata) { + if (store.has(it)) throw new TypeError(OBJECT_ALREADY_INITIALIZED); + metadata.facade = it; + store.set(it, metadata); + return metadata; + }; + get = function (it) { + return store.get(it) || {}; + }; + has = function (it) { + return store.has(it); + }; +} else { + var STATE = sharedKey('state'); + hiddenKeys[STATE] = true; + set = function (it, metadata) { + if (hasOwn(it, STATE)) throw new TypeError(OBJECT_ALREADY_INITIALIZED); + metadata.facade = it; + createNonEnumerableProperty(it, STATE, metadata); + return metadata; + }; + get = function (it) { + return hasOwn(it, STATE) ? it[STATE] : {}; + }; + has = function (it) { + return hasOwn(it, STATE); + }; +} + +module.exports = { + set: set, + get: get, + has: has, + enforce: enforce, + getterFor: getterFor +}; + + +/***/ }), + +/***/ 9516: +/*!********************************************************************!*\ + !*** ./node_modules/core-js/internals/is-array-iterator-method.js ***! + \********************************************************************/ +/***/ ((module, __unused_webpack_exports, __webpack_require__) => { + + +var wellKnownSymbol = __webpack_require__(/*! ../internals/well-known-symbol */ 7920); +var Iterators = __webpack_require__(/*! ../internals/iterators */ 6438); + +var ITERATOR = wellKnownSymbol('iterator'); +var ArrayPrototype = Array.prototype; + +// check on default Array iterator +module.exports = function (it) { + return it !== undefined && (Iterators.Array === it || ArrayPrototype[ITERATOR] === it); +}; + + +/***/ }), + +/***/ 9062: +/*!****************************************************!*\ + !*** ./node_modules/core-js/internals/is-array.js ***! + \****************************************************/ +/***/ ((module, __unused_webpack_exports, __webpack_require__) => { + + +var classof = __webpack_require__(/*! ../internals/classof-raw */ 5255); + +// `IsArray` abstract operation +// https://tc39.es/ecma262/#sec-isarray +// eslint-disable-next-line es/no-array-isarray -- safe +module.exports = Array.isArray || function isArray(argument) { + return classof(argument) === 'Array'; +}; + + +/***/ }), + +/***/ 4946: +/*!*******************************************************!*\ + !*** ./node_modules/core-js/internals/is-callable.js ***! + \*******************************************************/ +/***/ ((module) => { + + +// https://tc39.es/ecma262/#sec-IsHTMLDDA-internal-slot +var documentAll = typeof document == 'object' && document.all; + +// `IsCallable` abstract operation +// https://tc39.es/ecma262/#sec-iscallable +// eslint-disable-next-line unicorn/no-typeof-undefined -- required for testing +module.exports = typeof documentAll == 'undefined' && documentAll !== undefined ? function (argument) { + return typeof argument == 'function' || argument === documentAll; +} : function (argument) { + return typeof argument == 'function'; +}; + + +/***/ }), + +/***/ 3668: +/*!**********************************************************!*\ + !*** ./node_modules/core-js/internals/is-constructor.js ***! + \**********************************************************/ +/***/ ((module, __unused_webpack_exports, __webpack_require__) => { + + +var uncurryThis = __webpack_require__(/*! ../internals/function-uncurry-this */ 4811); +var fails = __webpack_require__(/*! ../internals/fails */ 4948); +var isCallable = __webpack_require__(/*! ../internals/is-callable */ 4946); +var classof = __webpack_require__(/*! ../internals/classof */ 7988); +var getBuiltIn = __webpack_require__(/*! ../internals/get-built-in */ 6102); +var inspectSource = __webpack_require__(/*! ../internals/inspect-source */ 8447); + +var noop = function () { /* empty */ }; +var construct = getBuiltIn('Reflect', 'construct'); +var constructorRegExp = /^\s*(?:class|function)\b/; +var exec = uncurryThis(constructorRegExp.exec); +var INCORRECT_TO_STRING = !constructorRegExp.test(noop); + +var isConstructorModern = function isConstructor(argument) { + if (!isCallable(argument)) return false; + try { + construct(noop, [], argument); + return true; + } catch (error) { + return false; + } +}; + +var isConstructorLegacy = function isConstructor(argument) { + if (!isCallable(argument)) return false; + switch (classof(argument)) { + case 'AsyncFunction': + case 'GeneratorFunction': + case 'AsyncGeneratorFunction': return false; + } + try { + // we can't check .prototype since constructors produced by .bind haven't it + // `Function#toString` throws on some built-it function in some legacy engines + // (for example, `DOMQuad` and similar in FF41-) + return INCORRECT_TO_STRING || !!exec(constructorRegExp, inspectSource(argument)); + } catch (error) { + return true; + } +}; + +isConstructorLegacy.sham = true; + +// `IsConstructor` abstract operation +// https://tc39.es/ecma262/#sec-isconstructor +module.exports = !construct || fails(function () { + var called; + return isConstructorModern(isConstructorModern.call) + || !isConstructorModern(Object) + || !isConstructorModern(function () { called = true; }) + || called; +}) ? isConstructorLegacy : isConstructorModern; + + +/***/ }), + +/***/ 8367: +/*!*****************************************************!*\ + !*** ./node_modules/core-js/internals/is-forced.js ***! + \*****************************************************/ +/***/ ((module, __unused_webpack_exports, __webpack_require__) => { + + +var fails = __webpack_require__(/*! ../internals/fails */ 4948); +var isCallable = __webpack_require__(/*! ../internals/is-callable */ 4946); + +var replacement = /#|\.prototype\./; + +var isForced = function (feature, detection) { + var value = data[normalize(feature)]; + return value === POLYFILL ? true + : value === NATIVE ? false + : isCallable(detection) ? fails(detection) + : !!detection; +}; + +var normalize = isForced.normalize = function (string) { + return String(string).replace(replacement, '.').toLowerCase(); +}; + +var data = isForced.data = {}; +var NATIVE = isForced.NATIVE = 'N'; +var POLYFILL = isForced.POLYFILL = 'P'; + +module.exports = isForced; + + +/***/ }), + +/***/ 3448: +/*!****************************************************************!*\ + !*** ./node_modules/core-js/internals/is-null-or-undefined.js ***! + \****************************************************************/ +/***/ ((module) => { + + +// we can't use just `it == null` since of `document.all` special case +// https://tc39.es/ecma262/#sec-IsHTMLDDA-internal-slot-aec +module.exports = function (it) { + return it === null || it === undefined; +}; + + +/***/ }), + +/***/ 2181: +/*!*****************************************************!*\ + !*** ./node_modules/core-js/internals/is-object.js ***! + \*****************************************************/ +/***/ ((module, __unused_webpack_exports, __webpack_require__) => { + + +var isCallable = __webpack_require__(/*! ../internals/is-callable */ 4946); + +module.exports = function (it) { + return typeof it == 'object' ? it !== null : isCallable(it); +}; + + +/***/ }), + +/***/ 3290: +/*!*****************************************************************!*\ + !*** ./node_modules/core-js/internals/is-possible-prototype.js ***! + \*****************************************************************/ +/***/ ((module, __unused_webpack_exports, __webpack_require__) => { + + +var isObject = __webpack_require__(/*! ../internals/is-object */ 2181); + +module.exports = function (argument) { + return isObject(argument) || argument === null; +}; + + +/***/ }), + +/***/ 7064: +/*!***************************************************!*\ + !*** ./node_modules/core-js/internals/is-pure.js ***! + \***************************************************/ +/***/ ((module) => { + + +module.exports = false; + + +/***/ }), + +/***/ 5378: +/*!*****************************************************!*\ + !*** ./node_modules/core-js/internals/is-symbol.js ***! + \*****************************************************/ +/***/ ((module, __unused_webpack_exports, __webpack_require__) => { + + +var getBuiltIn = __webpack_require__(/*! ../internals/get-built-in */ 6102); +var isCallable = __webpack_require__(/*! ../internals/is-callable */ 4946); +var isPrototypeOf = __webpack_require__(/*! ../internals/object-is-prototype-of */ 5824); +var USE_SYMBOL_AS_UID = __webpack_require__(/*! ../internals/use-symbol-as-uid */ 6015); + +var $Object = Object; + +module.exports = USE_SYMBOL_AS_UID ? function (it) { + return typeof it == 'symbol'; +} : function (it) { + var $Symbol = getBuiltIn('Symbol'); + return isCallable($Symbol) && isPrototypeOf($Symbol.prototype, $Object(it)); +}; + + +/***/ }), + +/***/ 2710: +/*!**********************************************************!*\ + !*** ./node_modules/core-js/internals/iterate-simple.js ***! + \**********************************************************/ +/***/ ((module, __unused_webpack_exports, __webpack_require__) => { + + +var call = __webpack_require__(/*! ../internals/function-call */ 82); + +module.exports = function (record, fn, ITERATOR_INSTEAD_OF_RECORD) { + var iterator = ITERATOR_INSTEAD_OF_RECORD ? record : record.iterator; + var next = record.next; + var step, result; + while (!(step = call(next, iterator)).done) { + result = fn(step.value); + if (result !== undefined) return result; + } +}; + + +/***/ }), + +/***/ 6239: +/*!***************************************************!*\ + !*** ./node_modules/core-js/internals/iterate.js ***! + \***************************************************/ +/***/ ((module, __unused_webpack_exports, __webpack_require__) => { + + +var bind = __webpack_require__(/*! ../internals/function-bind-context */ 1807); +var call = __webpack_require__(/*! ../internals/function-call */ 82); +var anObject = __webpack_require__(/*! ../internals/an-object */ 4363); +var tryToString = __webpack_require__(/*! ../internals/try-to-string */ 4824); +var isArrayIteratorMethod = __webpack_require__(/*! ../internals/is-array-iterator-method */ 9516); +var lengthOfArrayLike = __webpack_require__(/*! ../internals/length-of-array-like */ 5543); +var isPrototypeOf = __webpack_require__(/*! ../internals/object-is-prototype-of */ 5824); +var getIterator = __webpack_require__(/*! ../internals/get-iterator */ 7716); +var getIteratorMethod = __webpack_require__(/*! ../internals/get-iterator-method */ 4880); +var iteratorClose = __webpack_require__(/*! ../internals/iterator-close */ 3554); + +var $TypeError = TypeError; + +var Result = function (stopped, result) { + this.stopped = stopped; + this.result = result; +}; + +var ResultPrototype = Result.prototype; + +module.exports = function (iterable, unboundFunction, options) { + var that = options && options.that; + var AS_ENTRIES = !!(options && options.AS_ENTRIES); + var IS_RECORD = !!(options && options.IS_RECORD); + var IS_ITERATOR = !!(options && options.IS_ITERATOR); + var INTERRUPTED = !!(options && options.INTERRUPTED); + var fn = bind(unboundFunction, that); + var iterator, iterFn, index, length, result, next, step; + + var stop = function (condition) { + if (iterator) iteratorClose(iterator, 'normal', condition); + return new Result(true, condition); + }; + + var callFn = function (value) { + if (AS_ENTRIES) { + anObject(value); + return INTERRUPTED ? fn(value[0], value[1], stop) : fn(value[0], value[1]); + } return INTERRUPTED ? fn(value, stop) : fn(value); + }; + + if (IS_RECORD) { + iterator = iterable.iterator; + } else if (IS_ITERATOR) { + iterator = iterable; + } else { + iterFn = getIteratorMethod(iterable); + if (!iterFn) throw new $TypeError(tryToString(iterable) + ' is not iterable'); + // optimisation for array iterators + if (isArrayIteratorMethod(iterFn)) { + for (index = 0, length = lengthOfArrayLike(iterable); length > index; index++) { + result = callFn(iterable[index]); + if (result && isPrototypeOf(ResultPrototype, result)) return result; + } return new Result(false); + } + iterator = getIterator(iterable, iterFn); + } + + next = IS_RECORD ? iterable.next : iterator.next; + while (!(step = call(next, iterator)).done) { + try { + result = callFn(step.value); + } catch (error) { + iteratorClose(iterator, 'throw', error); + } + if (typeof result == 'object' && result && isPrototypeOf(ResultPrototype, result)) return result; + } return new Result(false); +}; + + +/***/ }), + +/***/ 3554: +/*!**********************************************************!*\ + !*** ./node_modules/core-js/internals/iterator-close.js ***! + \**********************************************************/ +/***/ ((module, __unused_webpack_exports, __webpack_require__) => { + + +var call = __webpack_require__(/*! ../internals/function-call */ 82); +var anObject = __webpack_require__(/*! ../internals/an-object */ 4363); +var getMethod = __webpack_require__(/*! ../internals/get-method */ 4639); + +module.exports = function (iterator, kind, value) { + var innerResult, innerError; + anObject(iterator); + try { + innerResult = getMethod(iterator, 'return'); + if (!innerResult) { + if (kind === 'throw') throw value; + return value; + } + innerResult = call(innerResult, iterator); + } catch (error) { + innerError = true; + innerResult = error; + } + if (kind === 'throw') throw value; + if (innerError) throw innerResult; + anObject(innerResult); + return value; +}; + + +/***/ }), + +/***/ 6501: +/*!***********************************************************************!*\ + !*** ./node_modules/core-js/internals/iterator-create-constructor.js ***! + \***********************************************************************/ +/***/ ((module, __unused_webpack_exports, __webpack_require__) => { + + +var IteratorPrototype = (__webpack_require__(/*! ../internals/iterators-core */ 5732).IteratorPrototype); +var create = __webpack_require__(/*! ../internals/object-create */ 67); +var createPropertyDescriptor = __webpack_require__(/*! ../internals/create-property-descriptor */ 8113); +var setToStringTag = __webpack_require__(/*! ../internals/set-to-string-tag */ 9200); +var Iterators = __webpack_require__(/*! ../internals/iterators */ 6438); + +var returnThis = function () { return this; }; + +module.exports = function (IteratorConstructor, NAME, next, ENUMERABLE_NEXT) { + var TO_STRING_TAG = NAME + ' Iterator'; + IteratorConstructor.prototype = create(IteratorPrototype, { next: createPropertyDescriptor(+!ENUMERABLE_NEXT, next) }); + setToStringTag(IteratorConstructor, TO_STRING_TAG, false, true); + Iterators[TO_STRING_TAG] = returnThis; + return IteratorConstructor; +}; + + +/***/ }), + +/***/ 3167: +/*!***********************************************************!*\ + !*** ./node_modules/core-js/internals/iterator-define.js ***! + \***********************************************************/ +/***/ ((module, __unused_webpack_exports, __webpack_require__) => { + + +var $ = __webpack_require__(/*! ../internals/export */ 2203); +var call = __webpack_require__(/*! ../internals/function-call */ 82); +var IS_PURE = __webpack_require__(/*! ../internals/is-pure */ 7064); +var FunctionName = __webpack_require__(/*! ../internals/function-name */ 6553); +var isCallable = __webpack_require__(/*! ../internals/is-callable */ 4946); +var createIteratorConstructor = __webpack_require__(/*! ../internals/iterator-create-constructor */ 6501); +var getPrototypeOf = __webpack_require__(/*! ../internals/object-get-prototype-of */ 3804); +var setPrototypeOf = __webpack_require__(/*! ../internals/object-set-prototype-of */ 7888); +var setToStringTag = __webpack_require__(/*! ../internals/set-to-string-tag */ 9200); +var createNonEnumerableProperty = __webpack_require__(/*! ../internals/create-non-enumerable-property */ 5250); +var defineBuiltIn = __webpack_require__(/*! ../internals/define-built-in */ 4879); +var wellKnownSymbol = __webpack_require__(/*! ../internals/well-known-symbol */ 7920); +var Iterators = __webpack_require__(/*! ../internals/iterators */ 6438); +var IteratorsCore = __webpack_require__(/*! ../internals/iterators-core */ 5732); + +var PROPER_FUNCTION_NAME = FunctionName.PROPER; +var CONFIGURABLE_FUNCTION_NAME = FunctionName.CONFIGURABLE; +var IteratorPrototype = IteratorsCore.IteratorPrototype; +var BUGGY_SAFARI_ITERATORS = IteratorsCore.BUGGY_SAFARI_ITERATORS; +var ITERATOR = wellKnownSymbol('iterator'); +var KEYS = 'keys'; +var VALUES = 'values'; +var ENTRIES = 'entries'; + +var returnThis = function () { return this; }; + +module.exports = function (Iterable, NAME, IteratorConstructor, next, DEFAULT, IS_SET, FORCED) { + createIteratorConstructor(IteratorConstructor, NAME, next); + + var getIterationMethod = function (KIND) { + if (KIND === DEFAULT && defaultIterator) return defaultIterator; + if (!BUGGY_SAFARI_ITERATORS && KIND && KIND in IterablePrototype) return IterablePrototype[KIND]; + + switch (KIND) { + case KEYS: return function keys() { return new IteratorConstructor(this, KIND); }; + case VALUES: return function values() { return new IteratorConstructor(this, KIND); }; + case ENTRIES: return function entries() { return new IteratorConstructor(this, KIND); }; + } + + return function () { return new IteratorConstructor(this); }; + }; + + var TO_STRING_TAG = NAME + ' Iterator'; + var INCORRECT_VALUES_NAME = false; + var IterablePrototype = Iterable.prototype; + var nativeIterator = IterablePrototype[ITERATOR] + || IterablePrototype['@@iterator'] + || DEFAULT && IterablePrototype[DEFAULT]; + var defaultIterator = !BUGGY_SAFARI_ITERATORS && nativeIterator || getIterationMethod(DEFAULT); + var anyNativeIterator = NAME === 'Array' ? IterablePrototype.entries || nativeIterator : nativeIterator; + var CurrentIteratorPrototype, methods, KEY; + + // fix native + if (anyNativeIterator) { + CurrentIteratorPrototype = getPrototypeOf(anyNativeIterator.call(new Iterable())); + if (CurrentIteratorPrototype !== Object.prototype && CurrentIteratorPrototype.next) { + if (!IS_PURE && getPrototypeOf(CurrentIteratorPrototype) !== IteratorPrototype) { + if (setPrototypeOf) { + setPrototypeOf(CurrentIteratorPrototype, IteratorPrototype); + } else if (!isCallable(CurrentIteratorPrototype[ITERATOR])) { + defineBuiltIn(CurrentIteratorPrototype, ITERATOR, returnThis); + } + } + // Set @@toStringTag to native iterators + setToStringTag(CurrentIteratorPrototype, TO_STRING_TAG, true, true); + if (IS_PURE) Iterators[TO_STRING_TAG] = returnThis; + } + } + + // fix Array.prototype.{ values, @@iterator }.name in V8 / FF + if (PROPER_FUNCTION_NAME && DEFAULT === VALUES && nativeIterator && nativeIterator.name !== VALUES) { + if (!IS_PURE && CONFIGURABLE_FUNCTION_NAME) { + createNonEnumerableProperty(IterablePrototype, 'name', VALUES); + } else { + INCORRECT_VALUES_NAME = true; + defaultIterator = function values() { return call(nativeIterator, this); }; + } + } + + // export additional methods + if (DEFAULT) { + methods = { + values: getIterationMethod(VALUES), + keys: IS_SET ? defaultIterator : getIterationMethod(KEYS), + entries: getIterationMethod(ENTRIES) + }; + if (FORCED) for (KEY in methods) { + if (BUGGY_SAFARI_ITERATORS || INCORRECT_VALUES_NAME || !(KEY in IterablePrototype)) { + defineBuiltIn(IterablePrototype, KEY, methods[KEY]); + } + } else $({ target: NAME, proto: true, forced: BUGGY_SAFARI_ITERATORS || INCORRECT_VALUES_NAME }, methods); + } + + // define iterator + if ((!IS_PURE || FORCED) && IterablePrototype[ITERATOR] !== defaultIterator) { + defineBuiltIn(IterablePrototype, ITERATOR, defaultIterator, { name: DEFAULT }); + } + Iterators[NAME] = defaultIterator; + + return methods; +}; + + +/***/ }), + +/***/ 5732: +/*!**********************************************************!*\ + !*** ./node_modules/core-js/internals/iterators-core.js ***! + \**********************************************************/ +/***/ ((module, __unused_webpack_exports, __webpack_require__) => { + + +var fails = __webpack_require__(/*! ../internals/fails */ 4948); +var isCallable = __webpack_require__(/*! ../internals/is-callable */ 4946); +var isObject = __webpack_require__(/*! ../internals/is-object */ 2181); +var create = __webpack_require__(/*! ../internals/object-create */ 67); +var getPrototypeOf = __webpack_require__(/*! ../internals/object-get-prototype-of */ 3804); +var defineBuiltIn = __webpack_require__(/*! ../internals/define-built-in */ 4879); +var wellKnownSymbol = __webpack_require__(/*! ../internals/well-known-symbol */ 7920); +var IS_PURE = __webpack_require__(/*! ../internals/is-pure */ 7064); + +var ITERATOR = wellKnownSymbol('iterator'); +var BUGGY_SAFARI_ITERATORS = false; + +// `%IteratorPrototype%` object +// https://tc39.es/ecma262/#sec-%iteratorprototype%-object +var IteratorPrototype, PrototypeOfArrayIteratorPrototype, arrayIterator; + +/* eslint-disable es/no-array-prototype-keys -- safe */ +if ([].keys) { + arrayIterator = [].keys(); + // Safari 8 has buggy iterators w/o `next` + if (!('next' in arrayIterator)) BUGGY_SAFARI_ITERATORS = true; + else { + PrototypeOfArrayIteratorPrototype = getPrototypeOf(getPrototypeOf(arrayIterator)); + if (PrototypeOfArrayIteratorPrototype !== Object.prototype) IteratorPrototype = PrototypeOfArrayIteratorPrototype; + } +} + +var NEW_ITERATOR_PROTOTYPE = !isObject(IteratorPrototype) || fails(function () { + var test = {}; + // FF44- legacy iterators case + return IteratorPrototype[ITERATOR].call(test) !== test; +}); + +if (NEW_ITERATOR_PROTOTYPE) IteratorPrototype = {}; +else if (IS_PURE) IteratorPrototype = create(IteratorPrototype); + +// `%IteratorPrototype%[@@iterator]()` method +// https://tc39.es/ecma262/#sec-%iteratorprototype%-@@iterator +if (!isCallable(IteratorPrototype[ITERATOR])) { + defineBuiltIn(IteratorPrototype, ITERATOR, function () { + return this; + }); +} + +module.exports = { + IteratorPrototype: IteratorPrototype, + BUGGY_SAFARI_ITERATORS: BUGGY_SAFARI_ITERATORS +}; + + +/***/ }), + +/***/ 6438: +/*!*****************************************************!*\ + !*** ./node_modules/core-js/internals/iterators.js ***! + \*****************************************************/ +/***/ ((module) => { + + +module.exports = {}; + + +/***/ }), + +/***/ 5543: +/*!****************************************************************!*\ + !*** ./node_modules/core-js/internals/length-of-array-like.js ***! + \****************************************************************/ +/***/ ((module, __unused_webpack_exports, __webpack_require__) => { + + +var toLength = __webpack_require__(/*! ../internals/to-length */ 3065); + +// `LengthOfArrayLike` abstract operation +// https://tc39.es/ecma262/#sec-lengthofarraylike +module.exports = function (obj) { + return toLength(obj.length); +}; + + +/***/ }), + +/***/ 336: +/*!*********************************************************!*\ + !*** ./node_modules/core-js/internals/make-built-in.js ***! + \*********************************************************/ +/***/ ((module, __unused_webpack_exports, __webpack_require__) => { + + +var uncurryThis = __webpack_require__(/*! ../internals/function-uncurry-this */ 4811); +var fails = __webpack_require__(/*! ../internals/fails */ 4948); +var isCallable = __webpack_require__(/*! ../internals/is-callable */ 4946); +var hasOwn = __webpack_require__(/*! ../internals/has-own-property */ 4404); +var DESCRIPTORS = __webpack_require__(/*! ../internals/descriptors */ 4527); +var CONFIGURABLE_FUNCTION_NAME = (__webpack_require__(/*! ../internals/function-name */ 6553).CONFIGURABLE); +var inspectSource = __webpack_require__(/*! ../internals/inspect-source */ 8447); +var InternalStateModule = __webpack_require__(/*! ../internals/internal-state */ 9804); + +var enforceInternalState = InternalStateModule.enforce; +var getInternalState = InternalStateModule.get; +var $String = String; +// eslint-disable-next-line es/no-object-defineproperty -- safe +var defineProperty = Object.defineProperty; +var stringSlice = uncurryThis(''.slice); +var replace = uncurryThis(''.replace); +var join = uncurryThis([].join); + +var CONFIGURABLE_LENGTH = DESCRIPTORS && !fails(function () { + return defineProperty(function () { /* empty */ }, 'length', { value: 8 }).length !== 8; +}); + +var TEMPLATE = String(String).split('String'); + +var makeBuiltIn = module.exports = function (value, name, options) { + if (stringSlice($String(name), 0, 7) === 'Symbol(') { + name = '[' + replace($String(name), /^Symbol\(([^)]*)\).*$/, '$1') + ']'; + } + if (options && options.getter) name = 'get ' + name; + if (options && options.setter) name = 'set ' + name; + if (!hasOwn(value, 'name') || (CONFIGURABLE_FUNCTION_NAME && value.name !== name)) { + if (DESCRIPTORS) defineProperty(value, 'name', { value: name, configurable: true }); + else value.name = name; + } + if (CONFIGURABLE_LENGTH && options && hasOwn(options, 'arity') && value.length !== options.arity) { + defineProperty(value, 'length', { value: options.arity }); + } + try { + if (options && hasOwn(options, 'constructor') && options.constructor) { + if (DESCRIPTORS) defineProperty(value, 'prototype', { writable: false }); + // in V8 ~ Chrome 53, prototypes of some methods, like `Array.prototype.values`, are non-writable + } else if (value.prototype) value.prototype = undefined; + } catch (error) { /* empty */ } + var state = enforceInternalState(value); + if (!hasOwn(state, 'source')) { + state.source = join(TEMPLATE, typeof name == 'string' ? name : ''); + } return value; +}; + +// add fake Function#toString for correct work wrapped methods / constructors with methods like LoDash isNative +// eslint-disable-next-line no-extend-native -- required +Function.prototype.toString = makeBuiltIn(function toString() { + return isCallable(this) && getInternalState(this).source || inspectSource(this); +}, 'toString'); + + +/***/ }), + +/***/ 4671: +/*!*******************************************************!*\ + !*** ./node_modules/core-js/internals/map-helpers.js ***! + \*******************************************************/ +/***/ ((module, __unused_webpack_exports, __webpack_require__) => { + + +var uncurryThis = __webpack_require__(/*! ../internals/function-uncurry-this */ 4811); + +// eslint-disable-next-line es/no-map -- safe +var MapPrototype = Map.prototype; + +module.exports = { + // eslint-disable-next-line es/no-map -- safe + Map: Map, + set: uncurryThis(MapPrototype.set), + get: uncurryThis(MapPrototype.get), + has: uncurryThis(MapPrototype.has), + remove: uncurryThis(MapPrototype['delete']), + proto: MapPrototype +}; + + +/***/ }), + +/***/ 9092: +/*!*******************************************************!*\ + !*** ./node_modules/core-js/internals/map-iterate.js ***! + \*******************************************************/ +/***/ ((module, __unused_webpack_exports, __webpack_require__) => { + + +var uncurryThis = __webpack_require__(/*! ../internals/function-uncurry-this */ 4811); +var iterateSimple = __webpack_require__(/*! ../internals/iterate-simple */ 2710); +var MapHelpers = __webpack_require__(/*! ../internals/map-helpers */ 4671); + +var Map = MapHelpers.Map; +var MapPrototype = MapHelpers.proto; +var forEach = uncurryThis(MapPrototype.forEach); +var entries = uncurryThis(MapPrototype.entries); +var next = entries(new Map()).next; + +module.exports = function (map, fn, interruptible) { + return interruptible ? iterateSimple({ iterator: entries(map), next: next }, function (entry) { + return fn(entry[1], entry[0]); + }) : forEach(map, fn); +}; + + +/***/ }), + +/***/ 4896: +/*!******************************************************!*\ + !*** ./node_modules/core-js/internals/math-trunc.js ***! + \******************************************************/ +/***/ ((module) => { + + +var ceil = Math.ceil; +var floor = Math.floor; + +// `Math.trunc` method +// https://tc39.es/ecma262/#sec-math.trunc +// eslint-disable-next-line es/no-math-trunc -- safe +module.exports = Math.trunc || function trunc(x) { + var n = +x; + return (n > 0 ? floor : ceil)(n); +}; + + +/***/ }), + +/***/ 67: +/*!*********************************************************!*\ + !*** ./node_modules/core-js/internals/object-create.js ***! + \*********************************************************/ +/***/ ((module, __unused_webpack_exports, __webpack_require__) => { + + +/* global ActiveXObject -- old IE, WSH */ +var anObject = __webpack_require__(/*! ../internals/an-object */ 4363); +var definePropertiesModule = __webpack_require__(/*! ../internals/object-define-properties */ 9444); +var enumBugKeys = __webpack_require__(/*! ../internals/enum-bug-keys */ 1616); +var hiddenKeys = __webpack_require__(/*! ../internals/hidden-keys */ 1930); +var html = __webpack_require__(/*! ../internals/html */ 3896); +var documentCreateElement = __webpack_require__(/*! ../internals/document-create-element */ 9528); +var sharedKey = __webpack_require__(/*! ../internals/shared-key */ 2114); + +var GT = '>'; +var LT = '<'; +var PROTOTYPE = 'prototype'; +var SCRIPT = 'script'; +var IE_PROTO = sharedKey('IE_PROTO'); + +var EmptyConstructor = function () { /* empty */ }; + +var scriptTag = function (content) { + return LT + SCRIPT + GT + content + LT + '/' + SCRIPT + GT; +}; + +// Create object with fake `null` prototype: use ActiveX Object with cleared prototype +var NullProtoObjectViaActiveX = function (activeXDocument) { + activeXDocument.write(scriptTag('')); + activeXDocument.close(); + var temp = activeXDocument.parentWindow.Object; + // eslint-disable-next-line no-useless-assignment -- avoid memory leak + activeXDocument = null; + return temp; +}; + +// Create object with fake `null` prototype: use iframe Object with cleared prototype +var NullProtoObjectViaIFrame = function () { + // Thrash, waste and sodomy: IE GC bug + var iframe = documentCreateElement('iframe'); + var JS = 'java' + SCRIPT + ':'; + var iframeDocument; + iframe.style.display = 'none'; + html.appendChild(iframe); + // https://github.com/zloirock/core-js/issues/475 + iframe.src = String(JS); + iframeDocument = iframe.contentWindow.document; + iframeDocument.open(); + iframeDocument.write(scriptTag('document.F=Object')); + iframeDocument.close(); + return iframeDocument.F; +}; + +// Check for document.domain and active x support +// No need to use active x approach when document.domain is not set +// see https://github.com/es-shims/es5-shim/issues/150 +// variation of https://github.com/kitcambridge/es5-shim/commit/4f738ac066346 +// avoid IE GC bug +var activeXDocument; +var NullProtoObject = function () { + try { + activeXDocument = new ActiveXObject('htmlfile'); + } catch (error) { /* ignore */ } + NullProtoObject = typeof document != 'undefined' + ? document.domain && activeXDocument + ? NullProtoObjectViaActiveX(activeXDocument) // old IE + : NullProtoObjectViaIFrame() + : NullProtoObjectViaActiveX(activeXDocument); // WSH + var length = enumBugKeys.length; + while (length--) delete NullProtoObject[PROTOTYPE][enumBugKeys[length]]; + return NullProtoObject(); +}; + +hiddenKeys[IE_PROTO] = true; + +// `Object.create` method +// https://tc39.es/ecma262/#sec-object.create +// eslint-disable-next-line es/no-object-create -- safe +module.exports = Object.create || function create(O, Properties) { + var result; + if (O !== null) { + EmptyConstructor[PROTOTYPE] = anObject(O); + result = new EmptyConstructor(); + EmptyConstructor[PROTOTYPE] = null; + // add "__proto__" for Object.getPrototypeOf polyfill + result[IE_PROTO] = O; + } else result = NullProtoObject(); + return Properties === undefined ? result : definePropertiesModule.f(result, Properties); +}; + + +/***/ }), + +/***/ 9444: +/*!********************************************************************!*\ + !*** ./node_modules/core-js/internals/object-define-properties.js ***! + \********************************************************************/ +/***/ ((__unused_webpack_module, exports, __webpack_require__) => { + + +var DESCRIPTORS = __webpack_require__(/*! ../internals/descriptors */ 4527); +var V8_PROTOTYPE_DEFINE_BUG = __webpack_require__(/*! ../internals/v8-prototype-define-bug */ 5229); +var definePropertyModule = __webpack_require__(/*! ../internals/object-define-property */ 2180); +var anObject = __webpack_require__(/*! ../internals/an-object */ 4363); +var toIndexedObject = __webpack_require__(/*! ../internals/to-indexed-object */ 5654); +var objectKeys = __webpack_require__(/*! ../internals/object-keys */ 707); + +// `Object.defineProperties` method +// https://tc39.es/ecma262/#sec-object.defineproperties +// eslint-disable-next-line es/no-object-defineproperties -- safe +exports.f = DESCRIPTORS && !V8_PROTOTYPE_DEFINE_BUG ? Object.defineProperties : function defineProperties(O, Properties) { + anObject(O); + var props = toIndexedObject(Properties); + var keys = objectKeys(Properties); + var length = keys.length; + var index = 0; + var key; + while (length > index) definePropertyModule.f(O, key = keys[index++], props[key]); + return O; +}; + + +/***/ }), + +/***/ 2180: +/*!******************************************************************!*\ + !*** ./node_modules/core-js/internals/object-define-property.js ***! + \******************************************************************/ +/***/ ((__unused_webpack_module, exports, __webpack_require__) => { + + +var DESCRIPTORS = __webpack_require__(/*! ../internals/descriptors */ 4527); +var IE8_DOM_DEFINE = __webpack_require__(/*! ../internals/ie8-dom-define */ 1976); +var V8_PROTOTYPE_DEFINE_BUG = __webpack_require__(/*! ../internals/v8-prototype-define-bug */ 5229); +var anObject = __webpack_require__(/*! ../internals/an-object */ 4363); +var toPropertyKey = __webpack_require__(/*! ../internals/to-property-key */ 9278); + +var $TypeError = TypeError; +// eslint-disable-next-line es/no-object-defineproperty -- safe +var $defineProperty = Object.defineProperty; +// eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe +var $getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor; +var ENUMERABLE = 'enumerable'; +var CONFIGURABLE = 'configurable'; +var WRITABLE = 'writable'; + +// `Object.defineProperty` method +// https://tc39.es/ecma262/#sec-object.defineproperty +exports.f = DESCRIPTORS ? V8_PROTOTYPE_DEFINE_BUG ? function defineProperty(O, P, Attributes) { + anObject(O); + P = toPropertyKey(P); + anObject(Attributes); + if (typeof O === 'function' && P === 'prototype' && 'value' in Attributes && WRITABLE in Attributes && !Attributes[WRITABLE]) { + var current = $getOwnPropertyDescriptor(O, P); + if (current && current[WRITABLE]) { + O[P] = Attributes.value; + Attributes = { + configurable: CONFIGURABLE in Attributes ? Attributes[CONFIGURABLE] : current[CONFIGURABLE], + enumerable: ENUMERABLE in Attributes ? Attributes[ENUMERABLE] : current[ENUMERABLE], + writable: false + }; + } + } return $defineProperty(O, P, Attributes); +} : $defineProperty : function defineProperty(O, P, Attributes) { + anObject(O); + P = toPropertyKey(P); + anObject(Attributes); + if (IE8_DOM_DEFINE) try { + return $defineProperty(O, P, Attributes); + } catch (error) { /* empty */ } + if ('get' in Attributes || 'set' in Attributes) throw new $TypeError('Accessors not supported'); + if ('value' in Attributes) O[P] = Attributes.value; + return O; +}; + + +/***/ }), + +/***/ 8158: +/*!******************************************************************************!*\ + !*** ./node_modules/core-js/internals/object-get-own-property-descriptor.js ***! + \******************************************************************************/ +/***/ ((__unused_webpack_module, exports, __webpack_require__) => { + + +var DESCRIPTORS = __webpack_require__(/*! ../internals/descriptors */ 4527); +var call = __webpack_require__(/*! ../internals/function-call */ 82); +var propertyIsEnumerableModule = __webpack_require__(/*! ../internals/object-property-is-enumerable */ 4038); +var createPropertyDescriptor = __webpack_require__(/*! ../internals/create-property-descriptor */ 8113); +var toIndexedObject = __webpack_require__(/*! ../internals/to-indexed-object */ 5654); +var toPropertyKey = __webpack_require__(/*! ../internals/to-property-key */ 9278); +var hasOwn = __webpack_require__(/*! ../internals/has-own-property */ 4404); +var IE8_DOM_DEFINE = __webpack_require__(/*! ../internals/ie8-dom-define */ 1976); + +// eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe +var $getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor; + +// `Object.getOwnPropertyDescriptor` method +// https://tc39.es/ecma262/#sec-object.getownpropertydescriptor +exports.f = DESCRIPTORS ? $getOwnPropertyDescriptor : function getOwnPropertyDescriptor(O, P) { + O = toIndexedObject(O); + P = toPropertyKey(P); + if (IE8_DOM_DEFINE) try { + return $getOwnPropertyDescriptor(O, P); + } catch (error) { /* empty */ } + if (hasOwn(O, P)) return createPropertyDescriptor(!call(propertyIsEnumerableModule.f, O, P), O[P]); +}; + + +/***/ }), + +/***/ 3207: +/*!**********************************************************************************!*\ + !*** ./node_modules/core-js/internals/object-get-own-property-names-external.js ***! + \**********************************************************************************/ +/***/ ((module, __unused_webpack_exports, __webpack_require__) => { + + +/* eslint-disable es/no-object-getownpropertynames -- safe */ +var classof = __webpack_require__(/*! ../internals/classof-raw */ 5255); +var toIndexedObject = __webpack_require__(/*! ../internals/to-indexed-object */ 5654); +var $getOwnPropertyNames = (__webpack_require__(/*! ../internals/object-get-own-property-names */ 2323).f); +var arraySlice = __webpack_require__(/*! ../internals/array-slice */ 7147); + +var windowNames = typeof window == 'object' && window && Object.getOwnPropertyNames + ? Object.getOwnPropertyNames(window) : []; + +var getWindowNames = function (it) { + try { + return $getOwnPropertyNames(it); + } catch (error) { + return arraySlice(windowNames); + } +}; + +// fallback for IE11 buggy Object.getOwnPropertyNames with iframe and window +module.exports.f = function getOwnPropertyNames(it) { + return windowNames && classof(it) === 'Window' + ? getWindowNames(it) + : $getOwnPropertyNames(toIndexedObject(it)); +}; + + +/***/ }), + +/***/ 2323: +/*!*************************************************************************!*\ + !*** ./node_modules/core-js/internals/object-get-own-property-names.js ***! + \*************************************************************************/ +/***/ ((__unused_webpack_module, exports, __webpack_require__) => { + + +var internalObjectKeys = __webpack_require__(/*! ../internals/object-keys-internal */ 8573); +var enumBugKeys = __webpack_require__(/*! ../internals/enum-bug-keys */ 1616); + +var hiddenKeys = enumBugKeys.concat('length', 'prototype'); + +// `Object.getOwnPropertyNames` method +// https://tc39.es/ecma262/#sec-object.getownpropertynames +// eslint-disable-next-line es/no-object-getownpropertynames -- safe +exports.f = Object.getOwnPropertyNames || function getOwnPropertyNames(O) { + return internalObjectKeys(O, hiddenKeys); +}; + + +/***/ }), + +/***/ 6842: +/*!***************************************************************************!*\ + !*** ./node_modules/core-js/internals/object-get-own-property-symbols.js ***! + \***************************************************************************/ +/***/ ((__unused_webpack_module, exports) => { + + +// eslint-disable-next-line es/no-object-getownpropertysymbols -- safe +exports.f = Object.getOwnPropertySymbols; + + +/***/ }), + +/***/ 3804: +/*!*******************************************************************!*\ + !*** ./node_modules/core-js/internals/object-get-prototype-of.js ***! + \*******************************************************************/ +/***/ ((module, __unused_webpack_exports, __webpack_require__) => { + + +var hasOwn = __webpack_require__(/*! ../internals/has-own-property */ 4404); +var isCallable = __webpack_require__(/*! ../internals/is-callable */ 4946); +var toObject = __webpack_require__(/*! ../internals/to-object */ 9754); +var sharedKey = __webpack_require__(/*! ../internals/shared-key */ 2114); +var CORRECT_PROTOTYPE_GETTER = __webpack_require__(/*! ../internals/correct-prototype-getter */ 2430); + +var IE_PROTO = sharedKey('IE_PROTO'); +var $Object = Object; +var ObjectPrototype = $Object.prototype; + +// `Object.getPrototypeOf` method +// https://tc39.es/ecma262/#sec-object.getprototypeof +// eslint-disable-next-line es/no-object-getprototypeof -- safe +module.exports = CORRECT_PROTOTYPE_GETTER ? $Object.getPrototypeOf : function (O) { + var object = toObject(O); + if (hasOwn(object, IE_PROTO)) return object[IE_PROTO]; + var constructor = object.constructor; + if (isCallable(constructor) && object instanceof constructor) { + return constructor.prototype; + } return object instanceof $Object ? ObjectPrototype : null; +}; + + +/***/ }), + +/***/ 5317: +/*!****************************************************************!*\ + !*** ./node_modules/core-js/internals/object-is-extensible.js ***! + \****************************************************************/ +/***/ ((module, __unused_webpack_exports, __webpack_require__) => { + + +var fails = __webpack_require__(/*! ../internals/fails */ 4948); +var isObject = __webpack_require__(/*! ../internals/is-object */ 2181); +var classof = __webpack_require__(/*! ../internals/classof-raw */ 5255); +var ARRAY_BUFFER_NON_EXTENSIBLE = __webpack_require__(/*! ../internals/array-buffer-non-extensible */ 4591); + +// eslint-disable-next-line es/no-object-isextensible -- safe +var $isExtensible = Object.isExtensible; +var FAILS_ON_PRIMITIVES = fails(function () { $isExtensible(1); }); + +// `Object.isExtensible` method +// https://tc39.es/ecma262/#sec-object.isextensible +module.exports = (FAILS_ON_PRIMITIVES || ARRAY_BUFFER_NON_EXTENSIBLE) ? function isExtensible(it) { + if (!isObject(it)) return false; + if (ARRAY_BUFFER_NON_EXTENSIBLE && classof(it) === 'ArrayBuffer') return false; + return $isExtensible ? $isExtensible(it) : true; +} : $isExtensible; + + +/***/ }), + +/***/ 5824: +/*!******************************************************************!*\ + !*** ./node_modules/core-js/internals/object-is-prototype-of.js ***! + \******************************************************************/ +/***/ ((module, __unused_webpack_exports, __webpack_require__) => { + + +var uncurryThis = __webpack_require__(/*! ../internals/function-uncurry-this */ 4811); + +module.exports = uncurryThis({}.isPrototypeOf); + + +/***/ }), + +/***/ 8573: +/*!****************************************************************!*\ + !*** ./node_modules/core-js/internals/object-keys-internal.js ***! + \****************************************************************/ +/***/ ((module, __unused_webpack_exports, __webpack_require__) => { + + +var uncurryThis = __webpack_require__(/*! ../internals/function-uncurry-this */ 4811); +var hasOwn = __webpack_require__(/*! ../internals/has-own-property */ 4404); +var toIndexedObject = __webpack_require__(/*! ../internals/to-indexed-object */ 5654); +var indexOf = (__webpack_require__(/*! ../internals/array-includes */ 4556).indexOf); +var hiddenKeys = __webpack_require__(/*! ../internals/hidden-keys */ 1930); + +var push = uncurryThis([].push); + +module.exports = function (object, names) { + var O = toIndexedObject(object); + var i = 0; + var result = []; + var key; + for (key in O) !hasOwn(hiddenKeys, key) && hasOwn(O, key) && push(result, key); + // Don't enum bug & hidden keys + while (names.length > i) if (hasOwn(O, key = names[i++])) { + ~indexOf(result, key) || push(result, key); + } + return result; +}; + + +/***/ }), + +/***/ 707: +/*!*******************************************************!*\ + !*** ./node_modules/core-js/internals/object-keys.js ***! + \*******************************************************/ +/***/ ((module, __unused_webpack_exports, __webpack_require__) => { + + +var internalObjectKeys = __webpack_require__(/*! ../internals/object-keys-internal */ 8573); +var enumBugKeys = __webpack_require__(/*! ../internals/enum-bug-keys */ 1616); + +// `Object.keys` method +// https://tc39.es/ecma262/#sec-object.keys +// eslint-disable-next-line es/no-object-keys -- safe +module.exports = Object.keys || function keys(O) { + return internalObjectKeys(O, enumBugKeys); +}; + + +/***/ }), + +/***/ 4038: +/*!*************************************************************************!*\ + !*** ./node_modules/core-js/internals/object-property-is-enumerable.js ***! + \*************************************************************************/ +/***/ ((__unused_webpack_module, exports) => { + + +var $propertyIsEnumerable = {}.propertyIsEnumerable; +// eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe +var getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor; + +// Nashorn ~ JDK8 bug +var NASHORN_BUG = getOwnPropertyDescriptor && !$propertyIsEnumerable.call({ 1: 2 }, 1); + +// `Object.prototype.propertyIsEnumerable` method implementation +// https://tc39.es/ecma262/#sec-object.prototype.propertyisenumerable +exports.f = NASHORN_BUG ? function propertyIsEnumerable(V) { + var descriptor = getOwnPropertyDescriptor(this, V); + return !!descriptor && descriptor.enumerable; +} : $propertyIsEnumerable; + + +/***/ }), + +/***/ 7888: +/*!*******************************************************************!*\ + !*** ./node_modules/core-js/internals/object-set-prototype-of.js ***! + \*******************************************************************/ +/***/ ((module, __unused_webpack_exports, __webpack_require__) => { + + +/* eslint-disable no-proto -- safe */ +var uncurryThisAccessor = __webpack_require__(/*! ../internals/function-uncurry-this-accessor */ 4807); +var isObject = __webpack_require__(/*! ../internals/is-object */ 2181); +var requireObjectCoercible = __webpack_require__(/*! ../internals/require-object-coercible */ 3111); +var aPossiblePrototype = __webpack_require__(/*! ../internals/a-possible-prototype */ 387); + +// `Object.setPrototypeOf` method +// https://tc39.es/ecma262/#sec-object.setprototypeof +// Works with __proto__ only. Old v8 can't work with null proto objects. +// eslint-disable-next-line es/no-object-setprototypeof -- safe +module.exports = Object.setPrototypeOf || ('__proto__' in {} ? function () { + var CORRECT_SETTER = false; + var test = {}; + var setter; + try { + setter = uncurryThisAccessor(Object.prototype, '__proto__', 'set'); + setter(test, []); + CORRECT_SETTER = test instanceof Array; + } catch (error) { /* empty */ } + return function setPrototypeOf(O, proto) { + requireObjectCoercible(O); + aPossiblePrototype(proto); + if (!isObject(O)) return O; + if (CORRECT_SETTER) setter(O, proto); + else O.__proto__ = proto; + return O; + }; +}() : undefined); + + +/***/ }), + +/***/ 2093: +/*!*****************************************************************!*\ + !*** ./node_modules/core-js/internals/ordinary-to-primitive.js ***! + \*****************************************************************/ +/***/ ((module, __unused_webpack_exports, __webpack_require__) => { + + +var call = __webpack_require__(/*! ../internals/function-call */ 82); +var isCallable = __webpack_require__(/*! ../internals/is-callable */ 4946); +var isObject = __webpack_require__(/*! ../internals/is-object */ 2181); + +var $TypeError = TypeError; + +// `OrdinaryToPrimitive` abstract operation +// https://tc39.es/ecma262/#sec-ordinarytoprimitive +module.exports = function (input, pref) { + var fn, val; + if (pref === 'string' && isCallable(fn = input.toString) && !isObject(val = call(fn, input))) return val; + if (isCallable(fn = input.valueOf) && !isObject(val = call(fn, input))) return val; + if (pref !== 'string' && isCallable(fn = input.toString) && !isObject(val = call(fn, input))) return val; + throw new $TypeError("Can't convert object to primitive value"); +}; + + +/***/ }), + +/***/ 1178: +/*!****************************************************!*\ + !*** ./node_modules/core-js/internals/own-keys.js ***! + \****************************************************/ +/***/ ((module, __unused_webpack_exports, __webpack_require__) => { + + +var getBuiltIn = __webpack_require__(/*! ../internals/get-built-in */ 6102); +var uncurryThis = __webpack_require__(/*! ../internals/function-uncurry-this */ 4811); +var getOwnPropertyNamesModule = __webpack_require__(/*! ../internals/object-get-own-property-names */ 2323); +var getOwnPropertySymbolsModule = __webpack_require__(/*! ../internals/object-get-own-property-symbols */ 6842); +var anObject = __webpack_require__(/*! ../internals/an-object */ 4363); + +var concat = uncurryThis([].concat); + +// all object keys, includes non-enumerable and symbols +module.exports = getBuiltIn('Reflect', 'ownKeys') || function ownKeys(it) { + var keys = getOwnPropertyNamesModule.f(anObject(it)); + var getOwnPropertySymbols = getOwnPropertySymbolsModule.f; + return getOwnPropertySymbols ? concat(keys, getOwnPropertySymbols(it)) : keys; +}; + + +/***/ }), + +/***/ 2175: +/*!************************************************************!*\ + !*** ./node_modules/core-js/internals/reflect-metadata.js ***! + \************************************************************/ +/***/ ((module, __unused_webpack_exports, __webpack_require__) => { + + +// TODO: in core-js@4, move /modules/ dependencies to public entries for better optimization by tools like `preset-env` +__webpack_require__(/*! ../modules/es.map */ 5196); +__webpack_require__(/*! ../modules/es.weak-map */ 7763); +var getBuiltIn = __webpack_require__(/*! ../internals/get-built-in */ 6102); +var uncurryThis = __webpack_require__(/*! ../internals/function-uncurry-this */ 4811); +var shared = __webpack_require__(/*! ../internals/shared */ 7232); + +var Map = getBuiltIn('Map'); +var WeakMap = getBuiltIn('WeakMap'); +var push = uncurryThis([].push); + +var metadata = shared('metadata'); +var store = metadata.store || (metadata.store = new WeakMap()); + +var getOrCreateMetadataMap = function (target, targetKey, create) { + var targetMetadata = store.get(target); + if (!targetMetadata) { + if (!create) return; + store.set(target, targetMetadata = new Map()); + } + var keyMetadata = targetMetadata.get(targetKey); + if (!keyMetadata) { + if (!create) return; + targetMetadata.set(targetKey, keyMetadata = new Map()); + } return keyMetadata; +}; + +var ordinaryHasOwnMetadata = function (MetadataKey, O, P) { + var metadataMap = getOrCreateMetadataMap(O, P, false); + return metadataMap === undefined ? false : metadataMap.has(MetadataKey); +}; + +var ordinaryGetOwnMetadata = function (MetadataKey, O, P) { + var metadataMap = getOrCreateMetadataMap(O, P, false); + return metadataMap === undefined ? undefined : metadataMap.get(MetadataKey); +}; + +var ordinaryDefineOwnMetadata = function (MetadataKey, MetadataValue, O, P) { + getOrCreateMetadataMap(O, P, true).set(MetadataKey, MetadataValue); +}; + +var ordinaryOwnMetadataKeys = function (target, targetKey) { + var metadataMap = getOrCreateMetadataMap(target, targetKey, false); + var keys = []; + if (metadataMap) metadataMap.forEach(function (_, key) { push(keys, key); }); + return keys; +}; + +var toMetadataKey = function (it) { + return it === undefined || typeof it == 'symbol' ? it : String(it); +}; + +module.exports = { + store: store, + getMap: getOrCreateMetadataMap, + has: ordinaryHasOwnMetadata, + get: ordinaryGetOwnMetadata, + set: ordinaryDefineOwnMetadata, + keys: ordinaryOwnMetadataKeys, + toKey: toMetadataKey +}; + + +/***/ }), + +/***/ 3111: +/*!********************************************************************!*\ + !*** ./node_modules/core-js/internals/require-object-coercible.js ***! + \********************************************************************/ +/***/ ((module, __unused_webpack_exports, __webpack_require__) => { + + +var isNullOrUndefined = __webpack_require__(/*! ../internals/is-null-or-undefined */ 3448); + +var $TypeError = TypeError; + +// `RequireObjectCoercible` abstract operation +// https://tc39.es/ecma262/#sec-requireobjectcoercible +module.exports = function (it) { + if (isNullOrUndefined(it)) throw new $TypeError("Can't call method on " + it); + return it; +}; + + +/***/ }), + +/***/ 9494: +/*!*******************************************************!*\ + !*** ./node_modules/core-js/internals/set-species.js ***! + \*******************************************************/ +/***/ ((module, __unused_webpack_exports, __webpack_require__) => { + + +var getBuiltIn = __webpack_require__(/*! ../internals/get-built-in */ 6102); +var defineBuiltInAccessor = __webpack_require__(/*! ../internals/define-built-in-accessor */ 8683); +var wellKnownSymbol = __webpack_require__(/*! ../internals/well-known-symbol */ 7920); +var DESCRIPTORS = __webpack_require__(/*! ../internals/descriptors */ 4527); + +var SPECIES = wellKnownSymbol('species'); + +module.exports = function (CONSTRUCTOR_NAME) { + var Constructor = getBuiltIn(CONSTRUCTOR_NAME); + + if (DESCRIPTORS && Constructor && !Constructor[SPECIES]) { + defineBuiltInAccessor(Constructor, SPECIES, { + configurable: true, + get: function () { return this; } + }); + } +}; + + +/***/ }), + +/***/ 9200: +/*!*************************************************************!*\ + !*** ./node_modules/core-js/internals/set-to-string-tag.js ***! + \*************************************************************/ +/***/ ((module, __unused_webpack_exports, __webpack_require__) => { + + +var defineProperty = (__webpack_require__(/*! ../internals/object-define-property */ 2180).f); +var hasOwn = __webpack_require__(/*! ../internals/has-own-property */ 4404); +var wellKnownSymbol = __webpack_require__(/*! ../internals/well-known-symbol */ 7920); + +var TO_STRING_TAG = wellKnownSymbol('toStringTag'); + +module.exports = function (target, TAG, STATIC) { + if (target && !STATIC) target = target.prototype; + if (target && !hasOwn(target, TO_STRING_TAG)) { + defineProperty(target, TO_STRING_TAG, { configurable: true, value: TAG }); + } +}; + + +/***/ }), + +/***/ 2114: +/*!******************************************************!*\ + !*** ./node_modules/core-js/internals/shared-key.js ***! + \******************************************************/ +/***/ ((module, __unused_webpack_exports, __webpack_require__) => { + + +var shared = __webpack_require__(/*! ../internals/shared */ 7232); +var uid = __webpack_require__(/*! ../internals/uid */ 2459); + +var keys = shared('keys'); + +module.exports = function (key) { + return keys[key] || (keys[key] = uid(key)); +}; + + +/***/ }), + +/***/ 728: +/*!********************************************************!*\ + !*** ./node_modules/core-js/internals/shared-store.js ***! + \********************************************************/ +/***/ ((module, __unused_webpack_exports, __webpack_require__) => { + + +var IS_PURE = __webpack_require__(/*! ../internals/is-pure */ 7064); +var globalThis = __webpack_require__(/*! ../internals/global-this */ 1991); +var defineGlobalProperty = __webpack_require__(/*! ../internals/define-global-property */ 7612); + +var SHARED = '__core-js_shared__'; +var store = module.exports = globalThis[SHARED] || defineGlobalProperty(SHARED, {}); + +(store.versions || (store.versions = [])).push({ + version: '3.39.0', + mode: IS_PURE ? 'pure' : 'global', + copyright: '© 2014-2024 Denis Pushkarev (zloirock.ru)', + license: 'https://github.com/zloirock/core-js/blob/v3.39.0/LICENSE', + source: 'https://github.com/zloirock/core-js' +}); + + +/***/ }), + +/***/ 7232: +/*!**************************************************!*\ + !*** ./node_modules/core-js/internals/shared.js ***! + \**************************************************/ +/***/ ((module, __unused_webpack_exports, __webpack_require__) => { + + +var store = __webpack_require__(/*! ../internals/shared-store */ 728); + +module.exports = function (key, value) { + return store[key] || (store[key] = value || {}); +}; + + +/***/ }), + +/***/ 1918: +/*!************************************************************************!*\ + !*** ./node_modules/core-js/internals/symbol-constructor-detection.js ***! + \************************************************************************/ +/***/ ((module, __unused_webpack_exports, __webpack_require__) => { + + +/* eslint-disable es/no-symbol -- required for testing */ +var V8_VERSION = __webpack_require__(/*! ../internals/environment-v8-version */ 1462); +var fails = __webpack_require__(/*! ../internals/fails */ 4948); +var globalThis = __webpack_require__(/*! ../internals/global-this */ 1991); + +var $String = globalThis.String; + +// eslint-disable-next-line es/no-object-getownpropertysymbols -- required for testing +module.exports = !!Object.getOwnPropertySymbols && !fails(function () { + var symbol = Symbol('symbol detection'); + // Chrome 38 Symbol has incorrect toString conversion + // `get-own-property-symbols` polyfill symbols converted to object are not Symbol instances + // nb: Do not call `String` directly to avoid this being optimized out to `symbol+''` which will, + // of course, fail. + return !$String(symbol) || !(Object(symbol) instanceof Symbol) || + // Chrome 38-40 symbols are not inherited from DOM collections prototypes to instances + !Symbol.sham && V8_VERSION && V8_VERSION < 41; +}); + + +/***/ }), + +/***/ 5129: +/*!*************************************************************!*\ + !*** ./node_modules/core-js/internals/to-absolute-index.js ***! + \*************************************************************/ +/***/ ((module, __unused_webpack_exports, __webpack_require__) => { + + +var toIntegerOrInfinity = __webpack_require__(/*! ../internals/to-integer-or-infinity */ 8306); + +var max = Math.max; +var min = Math.min; + +// Helper for a popular repeating case of the spec: +// Let integer be ? ToInteger(index). +// If integer < 0, let result be max((length + integer), 0); else let result be min(integer, length). +module.exports = function (index, length) { + var integer = toIntegerOrInfinity(index); + return integer < 0 ? max(integer + length, 0) : min(integer, length); +}; + + +/***/ }), + +/***/ 5654: +/*!*************************************************************!*\ + !*** ./node_modules/core-js/internals/to-indexed-object.js ***! + \*************************************************************/ +/***/ ((module, __unused_webpack_exports, __webpack_require__) => { + + +// toObject with fallback for non-array-like ES3 strings +var IndexedObject = __webpack_require__(/*! ../internals/indexed-object */ 9114); +var requireObjectCoercible = __webpack_require__(/*! ../internals/require-object-coercible */ 3111); + +module.exports = function (it) { + return IndexedObject(requireObjectCoercible(it)); +}; + + +/***/ }), + +/***/ 8306: +/*!******************************************************************!*\ + !*** ./node_modules/core-js/internals/to-integer-or-infinity.js ***! + \******************************************************************/ +/***/ ((module, __unused_webpack_exports, __webpack_require__) => { + + +var trunc = __webpack_require__(/*! ../internals/math-trunc */ 4896); + +// `ToIntegerOrInfinity` abstract operation +// https://tc39.es/ecma262/#sec-tointegerorinfinity +module.exports = function (argument) { + var number = +argument; + // eslint-disable-next-line no-self-compare -- NaN check + return number !== number || number === 0 ? 0 : trunc(number); +}; + + +/***/ }), + +/***/ 3065: +/*!*****************************************************!*\ + !*** ./node_modules/core-js/internals/to-length.js ***! + \*****************************************************/ +/***/ ((module, __unused_webpack_exports, __webpack_require__) => { + + +var toIntegerOrInfinity = __webpack_require__(/*! ../internals/to-integer-or-infinity */ 8306); + +var min = Math.min; + +// `ToLength` abstract operation +// https://tc39.es/ecma262/#sec-tolength +module.exports = function (argument) { + var len = toIntegerOrInfinity(argument); + return len > 0 ? min(len, 0x1FFFFFFFFFFFFF) : 0; // 2 ** 53 - 1 == 9007199254740991 +}; + + +/***/ }), + +/***/ 9754: +/*!*****************************************************!*\ + !*** ./node_modules/core-js/internals/to-object.js ***! + \*****************************************************/ +/***/ ((module, __unused_webpack_exports, __webpack_require__) => { + + +var requireObjectCoercible = __webpack_require__(/*! ../internals/require-object-coercible */ 3111); + +var $Object = Object; + +// `ToObject` abstract operation +// https://tc39.es/ecma262/#sec-toobject +module.exports = function (argument) { + return $Object(requireObjectCoercible(argument)); +}; + + +/***/ }), + +/***/ 468: +/*!********************************************************!*\ + !*** ./node_modules/core-js/internals/to-primitive.js ***! + \********************************************************/ +/***/ ((module, __unused_webpack_exports, __webpack_require__) => { + + +var call = __webpack_require__(/*! ../internals/function-call */ 82); +var isObject = __webpack_require__(/*! ../internals/is-object */ 2181); +var isSymbol = __webpack_require__(/*! ../internals/is-symbol */ 5378); +var getMethod = __webpack_require__(/*! ../internals/get-method */ 4639); +var ordinaryToPrimitive = __webpack_require__(/*! ../internals/ordinary-to-primitive */ 2093); +var wellKnownSymbol = __webpack_require__(/*! ../internals/well-known-symbol */ 7920); + +var $TypeError = TypeError; +var TO_PRIMITIVE = wellKnownSymbol('toPrimitive'); + +// `ToPrimitive` abstract operation +// https://tc39.es/ecma262/#sec-toprimitive +module.exports = function (input, pref) { + if (!isObject(input) || isSymbol(input)) return input; + var exoticToPrim = getMethod(input, TO_PRIMITIVE); + var result; + if (exoticToPrim) { + if (pref === undefined) pref = 'default'; + result = call(exoticToPrim, input, pref); + if (!isObject(result) || isSymbol(result)) return result; + throw new $TypeError("Can't convert object to primitive value"); + } + if (pref === undefined) pref = 'number'; + return ordinaryToPrimitive(input, pref); +}; + + +/***/ }), + +/***/ 9278: +/*!***********************************************************!*\ + !*** ./node_modules/core-js/internals/to-property-key.js ***! + \***********************************************************/ +/***/ ((module, __unused_webpack_exports, __webpack_require__) => { + + +var toPrimitive = __webpack_require__(/*! ../internals/to-primitive */ 468); +var isSymbol = __webpack_require__(/*! ../internals/is-symbol */ 5378); + +// `ToPropertyKey` abstract operation +// https://tc39.es/ecma262/#sec-topropertykey +module.exports = function (argument) { + var key = toPrimitive(argument, 'string'); + return isSymbol(key) ? key : key + ''; +}; + + +/***/ }), + +/***/ 8839: +/*!*****************************************************************!*\ + !*** ./node_modules/core-js/internals/to-string-tag-support.js ***! + \*****************************************************************/ +/***/ ((module, __unused_webpack_exports, __webpack_require__) => { + + +var wellKnownSymbol = __webpack_require__(/*! ../internals/well-known-symbol */ 7920); + +var TO_STRING_TAG = wellKnownSymbol('toStringTag'); +var test = {}; + +test[TO_STRING_TAG] = 'z'; + +module.exports = String(test) === '[object z]'; + + +/***/ }), + +/***/ 4824: +/*!*********************************************************!*\ + !*** ./node_modules/core-js/internals/try-to-string.js ***! + \*********************************************************/ +/***/ ((module) => { + + +var $String = String; + +module.exports = function (argument) { + try { + return $String(argument); + } catch (error) { + return 'Object'; + } +}; + + +/***/ }), + +/***/ 2459: +/*!***********************************************!*\ + !*** ./node_modules/core-js/internals/uid.js ***! + \***********************************************/ +/***/ ((module, __unused_webpack_exports, __webpack_require__) => { + + +var uncurryThis = __webpack_require__(/*! ../internals/function-uncurry-this */ 4811); + +var id = 0; +var postfix = Math.random(); +var toString = uncurryThis(1.0.toString); + +module.exports = function (key) { + return 'Symbol(' + (key === undefined ? '' : key) + ')_' + toString(++id + postfix, 36); +}; + + +/***/ }), + +/***/ 6015: +/*!*************************************************************!*\ + !*** ./node_modules/core-js/internals/use-symbol-as-uid.js ***! + \*************************************************************/ +/***/ ((module, __unused_webpack_exports, __webpack_require__) => { + + +/* eslint-disable es/no-symbol -- required for testing */ +var NATIVE_SYMBOL = __webpack_require__(/*! ../internals/symbol-constructor-detection */ 1918); + +module.exports = NATIVE_SYMBOL && + !Symbol.sham && + typeof Symbol.iterator == 'symbol'; + + +/***/ }), + +/***/ 5229: +/*!*******************************************************************!*\ + !*** ./node_modules/core-js/internals/v8-prototype-define-bug.js ***! + \*******************************************************************/ +/***/ ((module, __unused_webpack_exports, __webpack_require__) => { + + +var DESCRIPTORS = __webpack_require__(/*! ../internals/descriptors */ 4527); +var fails = __webpack_require__(/*! ../internals/fails */ 4948); + +// V8 ~ Chrome 36- +// https://bugs.chromium.org/p/v8/issues/detail?id=3334 +module.exports = DESCRIPTORS && fails(function () { + // eslint-disable-next-line es/no-object-defineproperty -- required for testing + return Object.defineProperty(function () { /* empty */ }, 'prototype', { + value: 42, + writable: false + }).prototype !== 42; +}); + + +/***/ }), + +/***/ 3839: +/*!********************************************************************!*\ + !*** ./node_modules/core-js/internals/weak-map-basic-detection.js ***! + \********************************************************************/ +/***/ ((module, __unused_webpack_exports, __webpack_require__) => { + + +var globalThis = __webpack_require__(/*! ../internals/global-this */ 1991); +var isCallable = __webpack_require__(/*! ../internals/is-callable */ 4946); + +var WeakMap = globalThis.WeakMap; + +module.exports = isCallable(WeakMap) && /native code/.test(String(WeakMap)); + + +/***/ }), + +/***/ 7920: +/*!*************************************************************!*\ + !*** ./node_modules/core-js/internals/well-known-symbol.js ***! + \*************************************************************/ +/***/ ((module, __unused_webpack_exports, __webpack_require__) => { + + +var globalThis = __webpack_require__(/*! ../internals/global-this */ 1991); +var shared = __webpack_require__(/*! ../internals/shared */ 7232); +var hasOwn = __webpack_require__(/*! ../internals/has-own-property */ 4404); +var uid = __webpack_require__(/*! ../internals/uid */ 2459); +var NATIVE_SYMBOL = __webpack_require__(/*! ../internals/symbol-constructor-detection */ 1918); +var USE_SYMBOL_AS_UID = __webpack_require__(/*! ../internals/use-symbol-as-uid */ 6015); + +var Symbol = globalThis.Symbol; +var WellKnownSymbolsStore = shared('wks'); +var createWellKnownSymbol = USE_SYMBOL_AS_UID ? Symbol['for'] || Symbol : Symbol && Symbol.withoutSetter || uid; + +module.exports = function (name) { + if (!hasOwn(WellKnownSymbolsStore, name)) { + WellKnownSymbolsStore[name] = NATIVE_SYMBOL && hasOwn(Symbol, name) + ? Symbol[name] + : createWellKnownSymbol('Symbol.' + name); + } return WellKnownSymbolsStore[name]; +}; + + +/***/ }), + +/***/ 4978: +/*!************************************************************!*\ + !*** ./node_modules/core-js/modules/es.map.constructor.js ***! + \************************************************************/ +/***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => { + + +var collection = __webpack_require__(/*! ../internals/collection */ 2833); +var collectionStrong = __webpack_require__(/*! ../internals/collection-strong */ 2913); + +// `Map` constructor +// https://tc39.es/ecma262/#sec-map-objects +collection('Map', function (init) { + return function Map() { return init(this, arguments.length ? arguments[0] : undefined); }; +}, collectionStrong); + + +/***/ }), + +/***/ 5196: +/*!************************************************!*\ + !*** ./node_modules/core-js/modules/es.map.js ***! + \************************************************/ +/***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => { + + +// TODO: Remove this module from `core-js@4` since it's replaced to module below +__webpack_require__(/*! ../modules/es.map.constructor */ 4978); + + +/***/ }), + +/***/ 6105: +/*!*****************************************************************!*\ + !*** ./node_modules/core-js/modules/es.weak-map.constructor.js ***! + \*****************************************************************/ +/***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => { + + +var FREEZING = __webpack_require__(/*! ../internals/freezing */ 6681); +var globalThis = __webpack_require__(/*! ../internals/global-this */ 1991); +var uncurryThis = __webpack_require__(/*! ../internals/function-uncurry-this */ 4811); +var defineBuiltIns = __webpack_require__(/*! ../internals/define-built-ins */ 5402); +var InternalMetadataModule = __webpack_require__(/*! ../internals/internal-metadata */ 1943); +var collection = __webpack_require__(/*! ../internals/collection */ 2833); +var collectionWeak = __webpack_require__(/*! ../internals/collection-weak */ 5270); +var isObject = __webpack_require__(/*! ../internals/is-object */ 2181); +var enforceInternalState = (__webpack_require__(/*! ../internals/internal-state */ 9804).enforce); +var fails = __webpack_require__(/*! ../internals/fails */ 4948); +var NATIVE_WEAK_MAP = __webpack_require__(/*! ../internals/weak-map-basic-detection */ 3839); + +var $Object = Object; +// eslint-disable-next-line es/no-array-isarray -- safe +var isArray = Array.isArray; +// eslint-disable-next-line es/no-object-isextensible -- safe +var isExtensible = $Object.isExtensible; +// eslint-disable-next-line es/no-object-isfrozen -- safe +var isFrozen = $Object.isFrozen; +// eslint-disable-next-line es/no-object-issealed -- safe +var isSealed = $Object.isSealed; +// eslint-disable-next-line es/no-object-freeze -- safe +var freeze = $Object.freeze; +// eslint-disable-next-line es/no-object-seal -- safe +var seal = $Object.seal; + +var IS_IE11 = !globalThis.ActiveXObject && 'ActiveXObject' in globalThis; +var InternalWeakMap; + +var wrapper = function (init) { + return function WeakMap() { + return init(this, arguments.length ? arguments[0] : undefined); + }; +}; + +// `WeakMap` constructor +// https://tc39.es/ecma262/#sec-weakmap-constructor +var $WeakMap = collection('WeakMap', wrapper, collectionWeak); +var WeakMapPrototype = $WeakMap.prototype; +var nativeSet = uncurryThis(WeakMapPrototype.set); + +// Chakra Edge bug: adding frozen arrays to WeakMap unfreeze them +var hasMSEdgeFreezingBug = function () { + return FREEZING && fails(function () { + var frozenArray = freeze([]); + nativeSet(new $WeakMap(), frozenArray, 1); + return !isFrozen(frozenArray); + }); +}; + +// IE11 WeakMap frozen keys fix +// We can't use feature detection because it crash some old IE builds +// https://github.com/zloirock/core-js/issues/485 +if (NATIVE_WEAK_MAP) if (IS_IE11) { + InternalWeakMap = collectionWeak.getConstructor(wrapper, 'WeakMap', true); + InternalMetadataModule.enable(); + var nativeDelete = uncurryThis(WeakMapPrototype['delete']); + var nativeHas = uncurryThis(WeakMapPrototype.has); + var nativeGet = uncurryThis(WeakMapPrototype.get); + defineBuiltIns(WeakMapPrototype, { + 'delete': function (key) { + if (isObject(key) && !isExtensible(key)) { + var state = enforceInternalState(this); + if (!state.frozen) state.frozen = new InternalWeakMap(); + return nativeDelete(this, key) || state.frozen['delete'](key); + } return nativeDelete(this, key); + }, + has: function has(key) { + if (isObject(key) && !isExtensible(key)) { + var state = enforceInternalState(this); + if (!state.frozen) state.frozen = new InternalWeakMap(); + return nativeHas(this, key) || state.frozen.has(key); + } return nativeHas(this, key); + }, + get: function get(key) { + if (isObject(key) && !isExtensible(key)) { + var state = enforceInternalState(this); + if (!state.frozen) state.frozen = new InternalWeakMap(); + return nativeHas(this, key) ? nativeGet(this, key) : state.frozen.get(key); + } return nativeGet(this, key); + }, + set: function set(key, value) { + if (isObject(key) && !isExtensible(key)) { + var state = enforceInternalState(this); + if (!state.frozen) state.frozen = new InternalWeakMap(); + nativeHas(this, key) ? nativeSet(this, key, value) : state.frozen.set(key, value); + } else nativeSet(this, key, value); + return this; + } + }); +// Chakra Edge frozen keys fix +} else if (hasMSEdgeFreezingBug()) { + defineBuiltIns(WeakMapPrototype, { + set: function set(key, value) { + var arrayIntegrityLevel; + if (isArray(key)) { + if (isFrozen(key)) arrayIntegrityLevel = freeze; + else if (isSealed(key)) arrayIntegrityLevel = seal; + } + nativeSet(this, key, value); + if (arrayIntegrityLevel) arrayIntegrityLevel(key); + return this; + } + }); +} + + +/***/ }), + +/***/ 7763: +/*!*****************************************************!*\ + !*** ./node_modules/core-js/modules/es.weak-map.js ***! + \*****************************************************/ +/***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => { + + +// TODO: Remove this module from `core-js@4` since it's replaced to module below +__webpack_require__(/*! ../modules/es.weak-map.constructor */ 6105); + + +/***/ }), + +/***/ 111: +/*!************************************************************************!*\ + !*** ./node_modules/core-js/modules/esnext.reflect.define-metadata.js ***! + \************************************************************************/ +/***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => { + + +// TODO: Remove from `core-js@4` +var $ = __webpack_require__(/*! ../internals/export */ 2203); +var ReflectMetadataModule = __webpack_require__(/*! ../internals/reflect-metadata */ 2175); +var anObject = __webpack_require__(/*! ../internals/an-object */ 4363); + +var toMetadataKey = ReflectMetadataModule.toKey; +var ordinaryDefineOwnMetadata = ReflectMetadataModule.set; + +// `Reflect.defineMetadata` method +// https://github.com/rbuckton/reflect-metadata +$({ target: 'Reflect', stat: true }, { + defineMetadata: function defineMetadata(metadataKey, metadataValue, target /* , targetKey */) { + var targetKey = arguments.length < 4 ? undefined : toMetadataKey(arguments[3]); + ordinaryDefineOwnMetadata(metadataKey, metadataValue, anObject(target), targetKey); + } +}); + + +/***/ }), + +/***/ 4943: +/*!************************************************************************!*\ + !*** ./node_modules/core-js/modules/esnext.reflect.delete-metadata.js ***! + \************************************************************************/ +/***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => { + + +var $ = __webpack_require__(/*! ../internals/export */ 2203); +var ReflectMetadataModule = __webpack_require__(/*! ../internals/reflect-metadata */ 2175); +var anObject = __webpack_require__(/*! ../internals/an-object */ 4363); + +var toMetadataKey = ReflectMetadataModule.toKey; +var getOrCreateMetadataMap = ReflectMetadataModule.getMap; +var store = ReflectMetadataModule.store; + +// `Reflect.deleteMetadata` method +// https://github.com/rbuckton/reflect-metadata +$({ target: 'Reflect', stat: true }, { + deleteMetadata: function deleteMetadata(metadataKey, target /* , targetKey */) { + var targetKey = arguments.length < 3 ? undefined : toMetadataKey(arguments[2]); + var metadataMap = getOrCreateMetadataMap(anObject(target), targetKey, false); + if (metadataMap === undefined || !metadataMap['delete'](metadataKey)) return false; + if (metadataMap.size) return true; + var targetMetadata = store.get(target); + targetMetadata['delete'](targetKey); + return !!targetMetadata.size || store['delete'](target); + } +}); + + +/***/ }), + +/***/ 1217: +/*!**************************************************************************!*\ + !*** ./node_modules/core-js/modules/esnext.reflect.get-metadata-keys.js ***! + \**************************************************************************/ +/***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => { + + +// TODO: Remove from `core-js@4` +var $ = __webpack_require__(/*! ../internals/export */ 2203); +var uncurryThis = __webpack_require__(/*! ../internals/function-uncurry-this */ 4811); +var ReflectMetadataModule = __webpack_require__(/*! ../internals/reflect-metadata */ 2175); +var anObject = __webpack_require__(/*! ../internals/an-object */ 4363); +var getPrototypeOf = __webpack_require__(/*! ../internals/object-get-prototype-of */ 3804); +var $arrayUniqueBy = __webpack_require__(/*! ../internals/array-unique-by */ 9922); + +var arrayUniqueBy = uncurryThis($arrayUniqueBy); +var concat = uncurryThis([].concat); +var ordinaryOwnMetadataKeys = ReflectMetadataModule.keys; +var toMetadataKey = ReflectMetadataModule.toKey; + +var ordinaryMetadataKeys = function (O, P) { + var oKeys = ordinaryOwnMetadataKeys(O, P); + var parent = getPrototypeOf(O); + if (parent === null) return oKeys; + var pKeys = ordinaryMetadataKeys(parent, P); + return pKeys.length ? oKeys.length ? arrayUniqueBy(concat(oKeys, pKeys)) : pKeys : oKeys; +}; + +// `Reflect.getMetadataKeys` method +// https://github.com/rbuckton/reflect-metadata +$({ target: 'Reflect', stat: true }, { + getMetadataKeys: function getMetadataKeys(target /* , targetKey */) { + var targetKey = arguments.length < 2 ? undefined : toMetadataKey(arguments[1]); + return ordinaryMetadataKeys(anObject(target), targetKey); + } +}); + + +/***/ }), + +/***/ 9840: +/*!*********************************************************************!*\ + !*** ./node_modules/core-js/modules/esnext.reflect.get-metadata.js ***! + \*********************************************************************/ +/***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => { + + +// TODO: Remove from `core-js@4` +var $ = __webpack_require__(/*! ../internals/export */ 2203); +var ReflectMetadataModule = __webpack_require__(/*! ../internals/reflect-metadata */ 2175); +var anObject = __webpack_require__(/*! ../internals/an-object */ 4363); +var getPrototypeOf = __webpack_require__(/*! ../internals/object-get-prototype-of */ 3804); + +var ordinaryHasOwnMetadata = ReflectMetadataModule.has; +var ordinaryGetOwnMetadata = ReflectMetadataModule.get; +var toMetadataKey = ReflectMetadataModule.toKey; + +var ordinaryGetMetadata = function (MetadataKey, O, P) { + var hasOwn = ordinaryHasOwnMetadata(MetadataKey, O, P); + if (hasOwn) return ordinaryGetOwnMetadata(MetadataKey, O, P); + var parent = getPrototypeOf(O); + return parent !== null ? ordinaryGetMetadata(MetadataKey, parent, P) : undefined; +}; + +// `Reflect.getMetadata` method +// https://github.com/rbuckton/reflect-metadata +$({ target: 'Reflect', stat: true }, { + getMetadata: function getMetadata(metadataKey, target /* , targetKey */) { + var targetKey = arguments.length < 3 ? undefined : toMetadataKey(arguments[2]); + return ordinaryGetMetadata(metadataKey, anObject(target), targetKey); + } +}); + + +/***/ }), + +/***/ 6384: +/*!******************************************************************************!*\ + !*** ./node_modules/core-js/modules/esnext.reflect.get-own-metadata-keys.js ***! + \******************************************************************************/ +/***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => { + + +// TODO: Remove from `core-js@4` +var $ = __webpack_require__(/*! ../internals/export */ 2203); +var ReflectMetadataModule = __webpack_require__(/*! ../internals/reflect-metadata */ 2175); +var anObject = __webpack_require__(/*! ../internals/an-object */ 4363); + +var ordinaryOwnMetadataKeys = ReflectMetadataModule.keys; +var toMetadataKey = ReflectMetadataModule.toKey; + +// `Reflect.getOwnMetadataKeys` method +// https://github.com/rbuckton/reflect-metadata +$({ target: 'Reflect', stat: true }, { + getOwnMetadataKeys: function getOwnMetadataKeys(target /* , targetKey */) { + var targetKey = arguments.length < 2 ? undefined : toMetadataKey(arguments[1]); + return ordinaryOwnMetadataKeys(anObject(target), targetKey); + } +}); + + +/***/ }), + +/***/ 4795: +/*!*************************************************************************!*\ + !*** ./node_modules/core-js/modules/esnext.reflect.get-own-metadata.js ***! + \*************************************************************************/ +/***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => { + + +// TODO: Remove from `core-js@4` +var $ = __webpack_require__(/*! ../internals/export */ 2203); +var ReflectMetadataModule = __webpack_require__(/*! ../internals/reflect-metadata */ 2175); +var anObject = __webpack_require__(/*! ../internals/an-object */ 4363); + +var ordinaryGetOwnMetadata = ReflectMetadataModule.get; +var toMetadataKey = ReflectMetadataModule.toKey; + +// `Reflect.getOwnMetadata` method +// https://github.com/rbuckton/reflect-metadata +$({ target: 'Reflect', stat: true }, { + getOwnMetadata: function getOwnMetadata(metadataKey, target /* , targetKey */) { + var targetKey = arguments.length < 3 ? undefined : toMetadataKey(arguments[2]); + return ordinaryGetOwnMetadata(metadataKey, anObject(target), targetKey); + } +}); + + +/***/ }), + +/***/ 5924: +/*!*********************************************************************!*\ + !*** ./node_modules/core-js/modules/esnext.reflect.has-metadata.js ***! + \*********************************************************************/ +/***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => { + + +// TODO: Remove from `core-js@4` +var $ = __webpack_require__(/*! ../internals/export */ 2203); +var ReflectMetadataModule = __webpack_require__(/*! ../internals/reflect-metadata */ 2175); +var anObject = __webpack_require__(/*! ../internals/an-object */ 4363); +var getPrototypeOf = __webpack_require__(/*! ../internals/object-get-prototype-of */ 3804); + +var ordinaryHasOwnMetadata = ReflectMetadataModule.has; +var toMetadataKey = ReflectMetadataModule.toKey; + +var ordinaryHasMetadata = function (MetadataKey, O, P) { + var hasOwn = ordinaryHasOwnMetadata(MetadataKey, O, P); + if (hasOwn) return true; + var parent = getPrototypeOf(O); + return parent !== null ? ordinaryHasMetadata(MetadataKey, parent, P) : false; +}; + +// `Reflect.hasMetadata` method +// https://github.com/rbuckton/reflect-metadata +$({ target: 'Reflect', stat: true }, { + hasMetadata: function hasMetadata(metadataKey, target /* , targetKey */) { + var targetKey = arguments.length < 3 ? undefined : toMetadataKey(arguments[2]); + return ordinaryHasMetadata(metadataKey, anObject(target), targetKey); + } +}); + + +/***/ }), + +/***/ 9407: +/*!*************************************************************************!*\ + !*** ./node_modules/core-js/modules/esnext.reflect.has-own-metadata.js ***! + \*************************************************************************/ +/***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => { + + +// TODO: Remove from `core-js@4` +var $ = __webpack_require__(/*! ../internals/export */ 2203); +var ReflectMetadataModule = __webpack_require__(/*! ../internals/reflect-metadata */ 2175); +var anObject = __webpack_require__(/*! ../internals/an-object */ 4363); + +var ordinaryHasOwnMetadata = ReflectMetadataModule.has; +var toMetadataKey = ReflectMetadataModule.toKey; + +// `Reflect.hasOwnMetadata` method +// https://github.com/rbuckton/reflect-metadata +$({ target: 'Reflect', stat: true }, { + hasOwnMetadata: function hasOwnMetadata(metadataKey, target /* , targetKey */) { + var targetKey = arguments.length < 3 ? undefined : toMetadataKey(arguments[2]); + return ordinaryHasOwnMetadata(metadataKey, anObject(target), targetKey); + } +}); + + +/***/ }), + +/***/ 8079: +/*!*****************************************************************!*\ + !*** ./node_modules/core-js/modules/esnext.reflect.metadata.js ***! + \*****************************************************************/ +/***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => { + + +var $ = __webpack_require__(/*! ../internals/export */ 2203); +var ReflectMetadataModule = __webpack_require__(/*! ../internals/reflect-metadata */ 2175); +var anObject = __webpack_require__(/*! ../internals/an-object */ 4363); + +var toMetadataKey = ReflectMetadataModule.toKey; +var ordinaryDefineOwnMetadata = ReflectMetadataModule.set; + +// `Reflect.metadata` method +// https://github.com/rbuckton/reflect-metadata +$({ target: 'Reflect', stat: true }, { + metadata: function metadata(metadataKey, metadataValue) { + return function decorator(target, key) { + ordinaryDefineOwnMetadata(metadataKey, metadataValue, anObject(target), toMetadataKey(key)); + }; + } +}); + + +/***/ }), + +/***/ 4375: +/*!************************************************************!*\ + !*** ./node_modules/core-js/proposals/reflect-metadata.js ***! + \************************************************************/ +/***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => { + + +// https://github.com/rbuckton/reflect-metadata +__webpack_require__(/*! ../modules/esnext.reflect.define-metadata */ 111); +__webpack_require__(/*! ../modules/esnext.reflect.delete-metadata */ 4943); +__webpack_require__(/*! ../modules/esnext.reflect.get-metadata */ 9840); +__webpack_require__(/*! ../modules/esnext.reflect.get-metadata-keys */ 1217); +__webpack_require__(/*! ../modules/esnext.reflect.get-own-metadata */ 4795); +__webpack_require__(/*! ../modules/esnext.reflect.get-own-metadata-keys */ 6384); +__webpack_require__(/*! ../modules/esnext.reflect.has-metadata */ 5924); +__webpack_require__(/*! ../modules/esnext.reflect.has-own-metadata */ 9407); +__webpack_require__(/*! ../modules/esnext.reflect.metadata */ 8079); + + +/***/ }), + +/***/ 5568: +/*!**************************************************************!*\ + !*** ./node_modules/@angular/compiler/fesm2022/compiler.mjs ***! + \**************************************************************/ +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ AST: () => (/* binding */ AST), +/* harmony export */ ASTWithName: () => (/* binding */ ASTWithName), +/* harmony export */ ASTWithSource: () => (/* binding */ ASTWithSource), +/* harmony export */ AbsoluteSourceSpan: () => (/* binding */ AbsoluteSourceSpan), +/* harmony export */ ArrayType: () => (/* binding */ ArrayType), +/* harmony export */ ArrowFunctionExpr: () => (/* binding */ ArrowFunctionExpr), +/* harmony export */ AstMemoryEfficientTransformer: () => (/* binding */ AstMemoryEfficientTransformer), +/* harmony export */ AstTransformer: () => (/* binding */ AstTransformer), +/* harmony export */ Attribute: () => (/* binding */ Attribute), +/* harmony export */ Binary: () => (/* binding */ Binary), +/* harmony export */ BinaryOperator: () => (/* binding */ BinaryOperator), +/* harmony export */ BinaryOperatorExpr: () => (/* binding */ BinaryOperatorExpr), +/* harmony export */ BindingPipe: () => (/* binding */ BindingPipe), +/* harmony export */ BindingType: () => (/* binding */ BindingType), +/* harmony export */ Block: () => (/* binding */ Block), +/* harmony export */ BlockParameter: () => (/* binding */ BlockParameter), +/* harmony export */ BoundElementProperty: () => (/* binding */ BoundElementProperty), +/* harmony export */ BuiltinType: () => (/* binding */ BuiltinType), +/* harmony export */ BuiltinTypeName: () => (/* binding */ BuiltinTypeName), +/* harmony export */ CUSTOM_ELEMENTS_SCHEMA: () => (/* binding */ CUSTOM_ELEMENTS_SCHEMA), +/* harmony export */ Call: () => (/* binding */ Call), +/* harmony export */ Chain: () => (/* binding */ Chain), +/* harmony export */ ChangeDetectionStrategy: () => (/* binding */ ChangeDetectionStrategy), +/* harmony export */ CommaExpr: () => (/* binding */ CommaExpr), +/* harmony export */ Comment: () => (/* binding */ Comment), +/* harmony export */ CompilerConfig: () => (/* binding */ CompilerConfig), +/* harmony export */ Conditional: () => (/* binding */ Conditional), +/* harmony export */ ConditionalExpr: () => (/* binding */ ConditionalExpr), +/* harmony export */ ConstantPool: () => (/* binding */ ConstantPool), +/* harmony export */ CssSelector: () => (/* binding */ CssSelector), +/* harmony export */ DEFAULT_INTERPOLATION_CONFIG: () => (/* binding */ DEFAULT_INTERPOLATION_CONFIG), +/* harmony export */ DYNAMIC_TYPE: () => (/* binding */ DYNAMIC_TYPE), +/* harmony export */ DeclareFunctionStmt: () => (/* binding */ DeclareFunctionStmt), +/* harmony export */ DeclareVarStmt: () => (/* binding */ DeclareVarStmt), +/* harmony export */ DomElementSchemaRegistry: () => (/* binding */ DomElementSchemaRegistry), +/* harmony export */ DynamicImportExpr: () => (/* binding */ DynamicImportExpr), +/* harmony export */ EOF: () => (/* binding */ EOF), +/* harmony export */ Element: () => (/* binding */ Element), +/* harmony export */ ElementSchemaRegistry: () => (/* binding */ ElementSchemaRegistry), +/* harmony export */ EmitterVisitorContext: () => (/* binding */ EmitterVisitorContext), +/* harmony export */ EmptyExpr: () => (/* binding */ EmptyExpr$1), +/* harmony export */ Expansion: () => (/* binding */ Expansion), +/* harmony export */ ExpansionCase: () => (/* binding */ ExpansionCase), +/* harmony export */ Expression: () => (/* binding */ Expression), +/* harmony export */ ExpressionBinding: () => (/* binding */ ExpressionBinding), +/* harmony export */ ExpressionStatement: () => (/* binding */ ExpressionStatement), +/* harmony export */ ExpressionType: () => (/* binding */ ExpressionType), +/* harmony export */ ExternalExpr: () => (/* binding */ ExternalExpr), +/* harmony export */ ExternalReference: () => (/* binding */ ExternalReference), +/* harmony export */ FactoryTarget: () => (/* binding */ FactoryTarget$1), +/* harmony export */ FunctionExpr: () => (/* binding */ FunctionExpr), +/* harmony export */ HtmlParser: () => (/* binding */ HtmlParser), +/* harmony export */ HtmlTagDefinition: () => (/* binding */ HtmlTagDefinition), +/* harmony export */ I18NHtmlParser: () => (/* binding */ I18NHtmlParser), +/* harmony export */ IfStmt: () => (/* binding */ IfStmt), +/* harmony export */ ImplicitReceiver: () => (/* binding */ ImplicitReceiver), +/* harmony export */ InstantiateExpr: () => (/* binding */ InstantiateExpr), +/* harmony export */ Interpolation: () => (/* binding */ Interpolation$1), +/* harmony export */ InterpolationConfig: () => (/* binding */ InterpolationConfig), +/* harmony export */ InvokeFunctionExpr: () => (/* binding */ InvokeFunctionExpr), +/* harmony export */ JSDocComment: () => (/* binding */ JSDocComment), +/* harmony export */ JitEvaluator: () => (/* binding */ JitEvaluator), +/* harmony export */ KeyedRead: () => (/* binding */ KeyedRead), +/* harmony export */ KeyedWrite: () => (/* binding */ KeyedWrite), +/* harmony export */ LeadingComment: () => (/* binding */ LeadingComment), +/* harmony export */ LetDeclaration: () => (/* binding */ LetDeclaration), +/* harmony export */ Lexer: () => (/* binding */ Lexer), +/* harmony export */ LiteralArray: () => (/* binding */ LiteralArray), +/* harmony export */ LiteralArrayExpr: () => (/* binding */ LiteralArrayExpr), +/* harmony export */ LiteralExpr: () => (/* binding */ LiteralExpr), +/* harmony export */ LiteralMap: () => (/* binding */ LiteralMap), +/* harmony export */ LiteralMapExpr: () => (/* binding */ LiteralMapExpr), +/* harmony export */ LiteralPrimitive: () => (/* binding */ LiteralPrimitive), +/* harmony export */ LocalizedString: () => (/* binding */ LocalizedString), +/* harmony export */ MapType: () => (/* binding */ MapType), +/* harmony export */ MessageBundle: () => (/* binding */ MessageBundle), +/* harmony export */ NONE_TYPE: () => (/* binding */ NONE_TYPE), +/* harmony export */ NO_ERRORS_SCHEMA: () => (/* binding */ NO_ERRORS_SCHEMA), +/* harmony export */ NodeWithI18n: () => (/* binding */ NodeWithI18n), +/* harmony export */ NonNullAssert: () => (/* binding */ NonNullAssert), +/* harmony export */ NotExpr: () => (/* binding */ NotExpr), +/* harmony export */ ParseError: () => (/* binding */ ParseError), +/* harmony export */ ParseErrorLevel: () => (/* binding */ ParseErrorLevel), +/* harmony export */ ParseLocation: () => (/* binding */ ParseLocation), +/* harmony export */ ParseSourceFile: () => (/* binding */ ParseSourceFile), +/* harmony export */ ParseSourceSpan: () => (/* binding */ ParseSourceSpan), +/* harmony export */ ParseSpan: () => (/* binding */ ParseSpan), +/* harmony export */ ParseTreeResult: () => (/* binding */ ParseTreeResult), +/* harmony export */ ParsedEvent: () => (/* binding */ ParsedEvent), +/* harmony export */ ParsedEventType: () => (/* binding */ ParsedEventType), +/* harmony export */ ParsedProperty: () => (/* binding */ ParsedProperty), +/* harmony export */ ParsedPropertyType: () => (/* binding */ ParsedPropertyType), +/* harmony export */ ParsedVariable: () => (/* binding */ ParsedVariable), +/* harmony export */ Parser: () => (/* binding */ Parser), +/* harmony export */ ParserError: () => (/* binding */ ParserError), +/* harmony export */ PrefixNot: () => (/* binding */ PrefixNot), +/* harmony export */ PropertyRead: () => (/* binding */ PropertyRead), +/* harmony export */ PropertyWrite: () => (/* binding */ PropertyWrite), +/* harmony export */ R3BoundTarget: () => (/* binding */ R3BoundTarget), +/* harmony export */ R3Identifiers: () => (/* binding */ Identifiers), +/* harmony export */ R3NgModuleMetadataKind: () => (/* binding */ R3NgModuleMetadataKind), +/* harmony export */ R3SelectorScopeMode: () => (/* binding */ R3SelectorScopeMode), +/* harmony export */ R3TargetBinder: () => (/* binding */ R3TargetBinder), +/* harmony export */ R3TemplateDependencyKind: () => (/* binding */ R3TemplateDependencyKind), +/* harmony export */ ReadKeyExpr: () => (/* binding */ ReadKeyExpr), +/* harmony export */ ReadPropExpr: () => (/* binding */ ReadPropExpr), +/* harmony export */ ReadVarExpr: () => (/* binding */ ReadVarExpr), +/* harmony export */ RecursiveAstVisitor: () => (/* binding */ RecursiveAstVisitor), +/* harmony export */ RecursiveVisitor: () => (/* binding */ RecursiveVisitor), +/* harmony export */ ResourceLoader: () => (/* binding */ ResourceLoader), +/* harmony export */ ReturnStatement: () => (/* binding */ ReturnStatement), +/* harmony export */ STRING_TYPE: () => (/* binding */ STRING_TYPE), +/* harmony export */ SafeCall: () => (/* binding */ SafeCall), +/* harmony export */ SafeKeyedRead: () => (/* binding */ SafeKeyedRead), +/* harmony export */ SafePropertyRead: () => (/* binding */ SafePropertyRead), +/* harmony export */ SelectorContext: () => (/* binding */ SelectorContext), +/* harmony export */ SelectorListContext: () => (/* binding */ SelectorListContext), +/* harmony export */ SelectorMatcher: () => (/* binding */ SelectorMatcher), +/* harmony export */ Serializer: () => (/* binding */ Serializer), +/* harmony export */ SplitInterpolation: () => (/* binding */ SplitInterpolation), +/* harmony export */ Statement: () => (/* binding */ Statement), +/* harmony export */ StmtModifier: () => (/* binding */ StmtModifier), +/* harmony export */ TagContentType: () => (/* binding */ TagContentType), +/* harmony export */ TaggedTemplateExpr: () => (/* binding */ TaggedTemplateExpr), +/* harmony export */ TemplateBindingParseResult: () => (/* binding */ TemplateBindingParseResult), +/* harmony export */ TemplateLiteral: () => (/* binding */ TemplateLiteral), +/* harmony export */ TemplateLiteralElement: () => (/* binding */ TemplateLiteralElement), +/* harmony export */ Text: () => (/* binding */ Text), +/* harmony export */ ThisReceiver: () => (/* binding */ ThisReceiver), +/* harmony export */ TmplAstBlockNode: () => (/* binding */ BlockNode), +/* harmony export */ TmplAstBoundAttribute: () => (/* binding */ BoundAttribute), +/* harmony export */ TmplAstBoundDeferredTrigger: () => (/* binding */ BoundDeferredTrigger), +/* harmony export */ TmplAstBoundEvent: () => (/* binding */ BoundEvent), +/* harmony export */ TmplAstBoundText: () => (/* binding */ BoundText), +/* harmony export */ TmplAstContent: () => (/* binding */ Content), +/* harmony export */ TmplAstDeferredBlock: () => (/* binding */ DeferredBlock), +/* harmony export */ TmplAstDeferredBlockError: () => (/* binding */ DeferredBlockError), +/* harmony export */ TmplAstDeferredBlockLoading: () => (/* binding */ DeferredBlockLoading), +/* harmony export */ TmplAstDeferredBlockPlaceholder: () => (/* binding */ DeferredBlockPlaceholder), +/* harmony export */ TmplAstDeferredTrigger: () => (/* binding */ DeferredTrigger), +/* harmony export */ TmplAstElement: () => (/* binding */ Element$1), +/* harmony export */ TmplAstForLoopBlock: () => (/* binding */ ForLoopBlock), +/* harmony export */ TmplAstForLoopBlockEmpty: () => (/* binding */ ForLoopBlockEmpty), +/* harmony export */ TmplAstHoverDeferredTrigger: () => (/* binding */ HoverDeferredTrigger), +/* harmony export */ TmplAstIcu: () => (/* binding */ Icu$1), +/* harmony export */ TmplAstIdleDeferredTrigger: () => (/* binding */ IdleDeferredTrigger), +/* harmony export */ TmplAstIfBlock: () => (/* binding */ IfBlock), +/* harmony export */ TmplAstIfBlockBranch: () => (/* binding */ IfBlockBranch), +/* harmony export */ TmplAstImmediateDeferredTrigger: () => (/* binding */ ImmediateDeferredTrigger), +/* harmony export */ TmplAstInteractionDeferredTrigger: () => (/* binding */ InteractionDeferredTrigger), +/* harmony export */ TmplAstLetDeclaration: () => (/* binding */ LetDeclaration$1), +/* harmony export */ TmplAstRecursiveVisitor: () => (/* binding */ RecursiveVisitor$1), +/* harmony export */ TmplAstReference: () => (/* binding */ Reference), +/* harmony export */ TmplAstSwitchBlock: () => (/* binding */ SwitchBlock), +/* harmony export */ TmplAstSwitchBlockCase: () => (/* binding */ SwitchBlockCase), +/* harmony export */ TmplAstTemplate: () => (/* binding */ Template), +/* harmony export */ TmplAstText: () => (/* binding */ Text$3), +/* harmony export */ TmplAstTextAttribute: () => (/* binding */ TextAttribute), +/* harmony export */ TmplAstTimerDeferredTrigger: () => (/* binding */ TimerDeferredTrigger), +/* harmony export */ TmplAstUnknownBlock: () => (/* binding */ UnknownBlock), +/* harmony export */ TmplAstVariable: () => (/* binding */ Variable), +/* harmony export */ TmplAstViewportDeferredTrigger: () => (/* binding */ ViewportDeferredTrigger), +/* harmony export */ Token: () => (/* binding */ Token), +/* harmony export */ TokenType: () => (/* binding */ TokenType), +/* harmony export */ TransplantedType: () => (/* binding */ TransplantedType), +/* harmony export */ TreeError: () => (/* binding */ TreeError), +/* harmony export */ Type: () => (/* binding */ Type), +/* harmony export */ TypeModifier: () => (/* binding */ TypeModifier), +/* harmony export */ TypeofExpr: () => (/* binding */ TypeofExpr), +/* harmony export */ Unary: () => (/* binding */ Unary), +/* harmony export */ UnaryOperator: () => (/* binding */ UnaryOperator), +/* harmony export */ UnaryOperatorExpr: () => (/* binding */ UnaryOperatorExpr), +/* harmony export */ VERSION: () => (/* binding */ VERSION), +/* harmony export */ VariableBinding: () => (/* binding */ VariableBinding), +/* harmony export */ Version: () => (/* binding */ Version), +/* harmony export */ ViewEncapsulation: () => (/* binding */ ViewEncapsulation), +/* harmony export */ WrappedNodeExpr: () => (/* binding */ WrappedNodeExpr), +/* harmony export */ WriteKeyExpr: () => (/* binding */ WriteKeyExpr), +/* harmony export */ WritePropExpr: () => (/* binding */ WritePropExpr), +/* harmony export */ WriteVarExpr: () => (/* binding */ WriteVarExpr), +/* harmony export */ Xliff: () => (/* binding */ Xliff), +/* harmony export */ Xliff2: () => (/* binding */ Xliff2), +/* harmony export */ Xmb: () => (/* binding */ Xmb), +/* harmony export */ XmlParser: () => (/* binding */ XmlParser), +/* harmony export */ Xtb: () => (/* binding */ Xtb), +/* harmony export */ compileClassDebugInfo: () => (/* binding */ compileClassDebugInfo), +/* harmony export */ compileClassMetadata: () => (/* binding */ compileClassMetadata), +/* harmony export */ compileComponentClassMetadata: () => (/* binding */ compileComponentClassMetadata), +/* harmony export */ compileComponentDeclareClassMetadata: () => (/* binding */ compileComponentDeclareClassMetadata), +/* harmony export */ compileComponentFromMetadata: () => (/* binding */ compileComponentFromMetadata), +/* harmony export */ compileDeclareClassMetadata: () => (/* binding */ compileDeclareClassMetadata), +/* harmony export */ compileDeclareComponentFromMetadata: () => (/* binding */ compileDeclareComponentFromMetadata), +/* harmony export */ compileDeclareDirectiveFromMetadata: () => (/* binding */ compileDeclareDirectiveFromMetadata), +/* harmony export */ compileDeclareFactoryFunction: () => (/* binding */ compileDeclareFactoryFunction), +/* harmony export */ compileDeclareInjectableFromMetadata: () => (/* binding */ compileDeclareInjectableFromMetadata), +/* harmony export */ compileDeclareInjectorFromMetadata: () => (/* binding */ compileDeclareInjectorFromMetadata), +/* harmony export */ compileDeclareNgModuleFromMetadata: () => (/* binding */ compileDeclareNgModuleFromMetadata), +/* harmony export */ compileDeclarePipeFromMetadata: () => (/* binding */ compileDeclarePipeFromMetadata), +/* harmony export */ compileDeferResolverFunction: () => (/* binding */ compileDeferResolverFunction), +/* harmony export */ compileDirectiveFromMetadata: () => (/* binding */ compileDirectiveFromMetadata), +/* harmony export */ compileFactoryFunction: () => (/* binding */ compileFactoryFunction), +/* harmony export */ compileInjectable: () => (/* binding */ compileInjectable), +/* harmony export */ compileInjector: () => (/* binding */ compileInjector), +/* harmony export */ compileNgModule: () => (/* binding */ compileNgModule), +/* harmony export */ compileOpaqueAsyncClassMetadata: () => (/* binding */ compileOpaqueAsyncClassMetadata), +/* harmony export */ compilePipeFromMetadata: () => (/* binding */ compilePipeFromMetadata), +/* harmony export */ computeMsgId: () => (/* binding */ computeMsgId), +/* harmony export */ core: () => (/* binding */ core), +/* harmony export */ createCssSelectorFromNode: () => (/* binding */ createCssSelectorFromNode), +/* harmony export */ createInjectableType: () => (/* binding */ createInjectableType), +/* harmony export */ createMayBeForwardRefExpression: () => (/* binding */ createMayBeForwardRefExpression), +/* harmony export */ devOnlyGuardedExpression: () => (/* binding */ devOnlyGuardedExpression), +/* harmony export */ emitDistinctChangesOnlyDefaultValue: () => (/* binding */ emitDistinctChangesOnlyDefaultValue), +/* harmony export */ encapsulateStyle: () => (/* binding */ encapsulateStyle), +/* harmony export */ findMatchingDirectivesAndPipes: () => (/* binding */ findMatchingDirectivesAndPipes), +/* harmony export */ getHtmlTagDefinition: () => (/* binding */ getHtmlTagDefinition), +/* harmony export */ getNsPrefix: () => (/* binding */ getNsPrefix), +/* harmony export */ getSafePropertyAccessString: () => (/* binding */ getSafePropertyAccessString), +/* harmony export */ identifierName: () => (/* binding */ identifierName), +/* harmony export */ isIdentifier: () => (/* binding */ isIdentifier), +/* harmony export */ isNgContainer: () => (/* binding */ isNgContainer), +/* harmony export */ isNgContent: () => (/* binding */ isNgContent), +/* harmony export */ isNgTemplate: () => (/* binding */ isNgTemplate), +/* harmony export */ jsDocComment: () => (/* binding */ jsDocComment), +/* harmony export */ leadingComment: () => (/* binding */ leadingComment), +/* harmony export */ literal: () => (/* binding */ literal), +/* harmony export */ literalMap: () => (/* binding */ literalMap), +/* harmony export */ makeBindingParser: () => (/* binding */ makeBindingParser), +/* harmony export */ mergeNsAndName: () => (/* binding */ mergeNsAndName), +/* harmony export */ outputAst: () => (/* binding */ output_ast), +/* harmony export */ parseHostBindings: () => (/* binding */ parseHostBindings), +/* harmony export */ parseTemplate: () => (/* binding */ parseTemplate), +/* harmony export */ preserveWhitespacesDefault: () => (/* binding */ preserveWhitespacesDefault), +/* harmony export */ publishFacade: () => (/* binding */ publishFacade), +/* harmony export */ r3JitTypeSourceSpan: () => (/* binding */ r3JitTypeSourceSpan), +/* harmony export */ sanitizeIdentifier: () => (/* binding */ sanitizeIdentifier), +/* harmony export */ splitNsName: () => (/* binding */ splitNsName), +/* harmony export */ tmplAstVisitAll: () => (/* binding */ visitAll$1), +/* harmony export */ verifyHostBindings: () => (/* binding */ verifyHostBindings), +/* harmony export */ visitAll: () => (/* binding */ visitAll) +/* harmony export */ }); +/** + * @license Angular v18.2.10 + * (c) 2010-2024 Google LLC. https://angular.io/ + * License: MIT + */ + +const _SELECTOR_REGEXP = new RegExp('(\\:not\\()|' + +// 1: ":not(" +'(([\\.\\#]?)[-\\w]+)|' + +// 2: "tag"; 3: "."/"#"; +// "-" should appear first in the regexp below as FF31 parses "[.-\w]" as a range +// 4: attribute; 5: attribute_string; 6: attribute_value +'(?:\\[([-.\\w*\\\\$]+)(?:=(["\']?)([^\\]"\']*)\\5)?\\])|' + +// "[name]", "[name=value]", +// "[name="value"]", +// "[name='value']" +'(\\))|' + +// 7: ")" +'(\\s*,\\s*)', +// 8: "," +'g'); +/** + * A css selector contains an element name, + * css classes and attribute/value pairs with the purpose + * of selecting subsets out of them. + */ +class CssSelector { + constructor() { + this.element = null; + this.classNames = []; + /** + * The selectors are encoded in pairs where: + * - even locations are attribute names + * - odd locations are attribute values. + * + * Example: + * Selector: `[key1=value1][key2]` would parse to: + * ``` + * ['key1', 'value1', 'key2', ''] + * ``` + */ + this.attrs = []; + this.notSelectors = []; + } + static parse(selector) { + const results = []; + const _addResult = (res, cssSel) => { + if (cssSel.notSelectors.length > 0 && !cssSel.element && cssSel.classNames.length == 0 && cssSel.attrs.length == 0) { + cssSel.element = '*'; + } + res.push(cssSel); + }; + let cssSelector = new CssSelector(); + let match; + let current = cssSelector; + let inNot = false; + _SELECTOR_REGEXP.lastIndex = 0; + while (match = _SELECTOR_REGEXP.exec(selector)) { + if (match[1 /* SelectorRegexp.NOT */]) { + if (inNot) { + throw new Error('Nesting :not in a selector is not allowed'); + } + inNot = true; + current = new CssSelector(); + cssSelector.notSelectors.push(current); + } + const tag = match[2 /* SelectorRegexp.TAG */]; + if (tag) { + const prefix = match[3 /* SelectorRegexp.PREFIX */]; + if (prefix === '#') { + // #hash + current.addAttribute('id', tag.slice(1)); + } else if (prefix === '.') { + // Class + current.addClassName(tag.slice(1)); + } else { + // Element + current.setElement(tag); + } + } + const attribute = match[4 /* SelectorRegexp.ATTRIBUTE */]; + if (attribute) { + current.addAttribute(current.unescapeAttribute(attribute), match[6 /* SelectorRegexp.ATTRIBUTE_VALUE */]); + } + if (match[7 /* SelectorRegexp.NOT_END */]) { + inNot = false; + current = cssSelector; + } + if (match[8 /* SelectorRegexp.SEPARATOR */]) { + if (inNot) { + throw new Error('Multiple selectors in :not are not supported'); + } + _addResult(results, cssSelector); + cssSelector = current = new CssSelector(); + } + } + _addResult(results, cssSelector); + return results; + } + /** + * Unescape `\$` sequences from the CSS attribute selector. + * + * This is needed because `$` can have a special meaning in CSS selectors, + * but we might want to match an attribute that contains `$`. + * [MDN web link for more + * info](https://developer.mozilla.org/en-US/docs/Web/CSS/Attribute_selectors). + * @param attr the attribute to unescape. + * @returns the unescaped string. + */ + unescapeAttribute(attr) { + let result = ''; + let escaping = false; + for (let i = 0; i < attr.length; i++) { + const char = attr.charAt(i); + if (char === '\\') { + escaping = true; + continue; + } + if (char === '$' && !escaping) { + throw new Error(`Error in attribute selector "${attr}". ` + `Unescaped "$" is not supported. Please escape with "\\$".`); + } + escaping = false; + result += char; + } + return result; + } + /** + * Escape `$` sequences from the CSS attribute selector. + * + * This is needed because `$` can have a special meaning in CSS selectors, + * with this method we are escaping `$` with `\$'. + * [MDN web link for more + * info](https://developer.mozilla.org/en-US/docs/Web/CSS/Attribute_selectors). + * @param attr the attribute to escape. + * @returns the escaped string. + */ + escapeAttribute(attr) { + return attr.replace(/\\/g, '\\\\').replace(/\$/g, '\\$'); + } + isElementSelector() { + return this.hasElementSelector() && this.classNames.length == 0 && this.attrs.length == 0 && this.notSelectors.length === 0; + } + hasElementSelector() { + return !!this.element; + } + setElement(element = null) { + this.element = element; + } + getAttrs() { + const result = []; + if (this.classNames.length > 0) { + result.push('class', this.classNames.join(' ')); + } + return result.concat(this.attrs); + } + addAttribute(name, value = '') { + this.attrs.push(name, value && value.toLowerCase() || ''); + } + addClassName(name) { + this.classNames.push(name.toLowerCase()); + } + toString() { + let res = this.element || ''; + if (this.classNames) { + this.classNames.forEach(klass => res += `.${klass}`); + } + if (this.attrs) { + for (let i = 0; i < this.attrs.length; i += 2) { + const name = this.escapeAttribute(this.attrs[i]); + const value = this.attrs[i + 1]; + res += `[${name}${value ? '=' + value : ''}]`; + } + } + this.notSelectors.forEach(notSelector => res += `:not(${notSelector})`); + return res; + } +} +/** + * Reads a list of CssSelectors and allows to calculate which ones + * are contained in a given CssSelector. + */ +class SelectorMatcher { + constructor() { + this._elementMap = new Map(); + this._elementPartialMap = new Map(); + this._classMap = new Map(); + this._classPartialMap = new Map(); + this._attrValueMap = new Map(); + this._attrValuePartialMap = new Map(); + this._listContexts = []; + } + static createNotMatcher(notSelectors) { + const notMatcher = new SelectorMatcher(); + notMatcher.addSelectables(notSelectors, null); + return notMatcher; + } + addSelectables(cssSelectors, callbackCtxt) { + let listContext = null; + if (cssSelectors.length > 1) { + listContext = new SelectorListContext(cssSelectors); + this._listContexts.push(listContext); + } + for (let i = 0; i < cssSelectors.length; i++) { + this._addSelectable(cssSelectors[i], callbackCtxt, listContext); + } + } + /** + * Add an object that can be found later on by calling `match`. + * @param cssSelector A css selector + * @param callbackCtxt An opaque object that will be given to the callback of the `match` function + */ + _addSelectable(cssSelector, callbackCtxt, listContext) { + let matcher = this; + const element = cssSelector.element; + const classNames = cssSelector.classNames; + const attrs = cssSelector.attrs; + const selectable = new SelectorContext(cssSelector, callbackCtxt, listContext); + if (element) { + const isTerminal = attrs.length === 0 && classNames.length === 0; + if (isTerminal) { + this._addTerminal(matcher._elementMap, element, selectable); + } else { + matcher = this._addPartial(matcher._elementPartialMap, element); + } + } + if (classNames) { + for (let i = 0; i < classNames.length; i++) { + const isTerminal = attrs.length === 0 && i === classNames.length - 1; + const className = classNames[i]; + if (isTerminal) { + this._addTerminal(matcher._classMap, className, selectable); + } else { + matcher = this._addPartial(matcher._classPartialMap, className); + } + } + } + if (attrs) { + for (let i = 0; i < attrs.length; i += 2) { + const isTerminal = i === attrs.length - 2; + const name = attrs[i]; + const value = attrs[i + 1]; + if (isTerminal) { + const terminalMap = matcher._attrValueMap; + let terminalValuesMap = terminalMap.get(name); + if (!terminalValuesMap) { + terminalValuesMap = new Map(); + terminalMap.set(name, terminalValuesMap); + } + this._addTerminal(terminalValuesMap, value, selectable); + } else { + const partialMap = matcher._attrValuePartialMap; + let partialValuesMap = partialMap.get(name); + if (!partialValuesMap) { + partialValuesMap = new Map(); + partialMap.set(name, partialValuesMap); + } + matcher = this._addPartial(partialValuesMap, value); + } + } + } + } + _addTerminal(map, name, selectable) { + let terminalList = map.get(name); + if (!terminalList) { + terminalList = []; + map.set(name, terminalList); + } + terminalList.push(selectable); + } + _addPartial(map, name) { + let matcher = map.get(name); + if (!matcher) { + matcher = new SelectorMatcher(); + map.set(name, matcher); + } + return matcher; + } + /** + * Find the objects that have been added via `addSelectable` + * whose css selector is contained in the given css selector. + * @param cssSelector A css selector + * @param matchedCallback This callback will be called with the object handed into `addSelectable` + * @return boolean true if a match was found + */ + match(cssSelector, matchedCallback) { + let result = false; + const element = cssSelector.element; + const classNames = cssSelector.classNames; + const attrs = cssSelector.attrs; + for (let i = 0; i < this._listContexts.length; i++) { + this._listContexts[i].alreadyMatched = false; + } + result = this._matchTerminal(this._elementMap, element, cssSelector, matchedCallback) || result; + result = this._matchPartial(this._elementPartialMap, element, cssSelector, matchedCallback) || result; + if (classNames) { + for (let i = 0; i < classNames.length; i++) { + const className = classNames[i]; + result = this._matchTerminal(this._classMap, className, cssSelector, matchedCallback) || result; + result = this._matchPartial(this._classPartialMap, className, cssSelector, matchedCallback) || result; + } + } + if (attrs) { + for (let i = 0; i < attrs.length; i += 2) { + const name = attrs[i]; + const value = attrs[i + 1]; + const terminalValuesMap = this._attrValueMap.get(name); + if (value) { + result = this._matchTerminal(terminalValuesMap, '', cssSelector, matchedCallback) || result; + } + result = this._matchTerminal(terminalValuesMap, value, cssSelector, matchedCallback) || result; + const partialValuesMap = this._attrValuePartialMap.get(name); + if (value) { + result = this._matchPartial(partialValuesMap, '', cssSelector, matchedCallback) || result; + } + result = this._matchPartial(partialValuesMap, value, cssSelector, matchedCallback) || result; + } + } + return result; + } + /** @internal */ + _matchTerminal(map, name, cssSelector, matchedCallback) { + if (!map || typeof name !== 'string') { + return false; + } + let selectables = map.get(name) || []; + const starSelectables = map.get('*'); + if (starSelectables) { + selectables = selectables.concat(starSelectables); + } + if (selectables.length === 0) { + return false; + } + let selectable; + let result = false; + for (let i = 0; i < selectables.length; i++) { + selectable = selectables[i]; + result = selectable.finalize(cssSelector, matchedCallback) || result; + } + return result; + } + /** @internal */ + _matchPartial(map, name, cssSelector, matchedCallback) { + if (!map || typeof name !== 'string') { + return false; + } + const nestedSelector = map.get(name); + if (!nestedSelector) { + return false; + } + // TODO(perf): get rid of recursion and measure again + // TODO(perf): don't pass the whole selector into the recursion, + // but only the not processed parts + return nestedSelector.match(cssSelector, matchedCallback); + } +} +class SelectorListContext { + constructor(selectors) { + this.selectors = selectors; + this.alreadyMatched = false; + } +} +// Store context to pass back selector and context when a selector is matched +class SelectorContext { + constructor(selector, cbContext, listContext) { + this.selector = selector; + this.cbContext = cbContext; + this.listContext = listContext; + this.notSelectors = selector.notSelectors; + } + finalize(cssSelector, callback) { + let result = true; + if (this.notSelectors.length > 0 && (!this.listContext || !this.listContext.alreadyMatched)) { + const notMatcher = SelectorMatcher.createNotMatcher(this.notSelectors); + result = !notMatcher.match(cssSelector, null); + } + if (result && callback && (!this.listContext || !this.listContext.alreadyMatched)) { + if (this.listContext) { + this.listContext.alreadyMatched = true; + } + callback(this.selector, this.cbContext); + } + return result; + } +} + +// Attention: +// Stores the default value of `emitDistinctChangesOnly` when the `emitDistinctChangesOnly` is not +// explicitly set. +const emitDistinctChangesOnlyDefaultValue = true; +var ViewEncapsulation; +(function (ViewEncapsulation) { + ViewEncapsulation[ViewEncapsulation["Emulated"] = 0] = "Emulated"; + // Historically the 1 value was for `Native` encapsulation which has been removed as of v11. + ViewEncapsulation[ViewEncapsulation["None"] = 2] = "None"; + ViewEncapsulation[ViewEncapsulation["ShadowDom"] = 3] = "ShadowDom"; +})(ViewEncapsulation || (ViewEncapsulation = {})); +var ChangeDetectionStrategy; +(function (ChangeDetectionStrategy) { + ChangeDetectionStrategy[ChangeDetectionStrategy["OnPush"] = 0] = "OnPush"; + ChangeDetectionStrategy[ChangeDetectionStrategy["Default"] = 1] = "Default"; +})(ChangeDetectionStrategy || (ChangeDetectionStrategy = {})); +/** Flags describing an input for a directive. */ +var InputFlags; +(function (InputFlags) { + InputFlags[InputFlags["None"] = 0] = "None"; + InputFlags[InputFlags["SignalBased"] = 1] = "SignalBased"; + InputFlags[InputFlags["HasDecoratorInputTransform"] = 2] = "HasDecoratorInputTransform"; +})(InputFlags || (InputFlags = {})); +const CUSTOM_ELEMENTS_SCHEMA = { + name: 'custom-elements' +}; +const NO_ERRORS_SCHEMA = { + name: 'no-errors-schema' +}; +const Type$1 = Function; +var SecurityContext; +(function (SecurityContext) { + SecurityContext[SecurityContext["NONE"] = 0] = "NONE"; + SecurityContext[SecurityContext["HTML"] = 1] = "HTML"; + SecurityContext[SecurityContext["STYLE"] = 2] = "STYLE"; + SecurityContext[SecurityContext["SCRIPT"] = 3] = "SCRIPT"; + SecurityContext[SecurityContext["URL"] = 4] = "URL"; + SecurityContext[SecurityContext["RESOURCE_URL"] = 5] = "RESOURCE_URL"; +})(SecurityContext || (SecurityContext = {})); +var MissingTranslationStrategy; +(function (MissingTranslationStrategy) { + MissingTranslationStrategy[MissingTranslationStrategy["Error"] = 0] = "Error"; + MissingTranslationStrategy[MissingTranslationStrategy["Warning"] = 1] = "Warning"; + MissingTranslationStrategy[MissingTranslationStrategy["Ignore"] = 2] = "Ignore"; +})(MissingTranslationStrategy || (MissingTranslationStrategy = {})); +function parserSelectorToSimpleSelector(selector) { + const classes = selector.classNames && selector.classNames.length ? [8 /* SelectorFlags.CLASS */, ...selector.classNames] : []; + const elementName = selector.element && selector.element !== '*' ? selector.element : ''; + return [elementName, ...selector.attrs, ...classes]; +} +function parserSelectorToNegativeSelector(selector) { + const classes = selector.classNames && selector.classNames.length ? [8 /* SelectorFlags.CLASS */, ...selector.classNames] : []; + if (selector.element) { + return [1 /* SelectorFlags.NOT */ | 4 /* SelectorFlags.ELEMENT */, selector.element, ...selector.attrs, ...classes]; + } else if (selector.attrs.length) { + return [1 /* SelectorFlags.NOT */ | 2 /* SelectorFlags.ATTRIBUTE */, ...selector.attrs, ...classes]; + } else { + return selector.classNames && selector.classNames.length ? [1 /* SelectorFlags.NOT */ | 8 /* SelectorFlags.CLASS */, ...selector.classNames] : []; + } +} +function parserSelectorToR3Selector(selector) { + const positive = parserSelectorToSimpleSelector(selector); + const negative = selector.notSelectors && selector.notSelectors.length ? selector.notSelectors.map(notSelector => parserSelectorToNegativeSelector(notSelector)) : []; + return positive.concat(...negative); +} +function parseSelectorToR3Selector(selector) { + return selector ? CssSelector.parse(selector).map(parserSelectorToR3Selector) : []; +} +var core = /*#__PURE__*/Object.freeze({ + __proto__: null, + emitDistinctChangesOnlyDefaultValue: emitDistinctChangesOnlyDefaultValue, + get ViewEncapsulation() { + return ViewEncapsulation; + }, + get ChangeDetectionStrategy() { + return ChangeDetectionStrategy; + }, + get InputFlags() { + return InputFlags; + }, + CUSTOM_ELEMENTS_SCHEMA: CUSTOM_ELEMENTS_SCHEMA, + NO_ERRORS_SCHEMA: NO_ERRORS_SCHEMA, + Type: Type$1, + get SecurityContext() { + return SecurityContext; + }, + get MissingTranslationStrategy() { + return MissingTranslationStrategy; + }, + parseSelectorToR3Selector: parseSelectorToR3Selector +}); + +/** + * A lazily created TextEncoder instance for converting strings into UTF-8 bytes + */ +let textEncoder; +/** + * Return the message id or compute it using the XLIFF1 digest. + */ +function digest$1(message) { + return message.id || computeDigest(message); +} +/** + * Compute the message id using the XLIFF1 digest. + */ +function computeDigest(message) { + return sha1(serializeNodes(message.nodes).join('') + `[${message.meaning}]`); +} +/** + * Return the message id or compute it using the XLIFF2/XMB/$localize digest. + */ +function decimalDigest(message, preservePlaceholders) { + return message.id || computeDecimalDigest(message, preservePlaceholders); +} +/** + * Compute the message id using the XLIFF2/XMB/$localize digest. + */ +function computeDecimalDigest(message, preservePlaceholders) { + const visitor = new _SerializerIgnoreExpVisitor(preservePlaceholders); + const parts = message.nodes.map(a => a.visit(visitor, null)); + return computeMsgId(parts.join(''), message.meaning); +} +/** + * Serialize the i18n ast to something xml-like in order to generate an UID. + * + * The visitor is also used in the i18n parser tests + * + * @internal + */ +class _SerializerVisitor { + visitText(text, context) { + return text.value; + } + visitContainer(container, context) { + return `[${container.children.map(child => child.visit(this)).join(', ')}]`; + } + visitIcu(icu, context) { + const strCases = Object.keys(icu.cases).map(k => `${k} {${icu.cases[k].visit(this)}}`); + return `{${icu.expression}, ${icu.type}, ${strCases.join(', ')}}`; + } + visitTagPlaceholder(ph, context) { + return ph.isVoid ? `` : `${ph.children.map(child => child.visit(this)).join(', ')}`; + } + visitPlaceholder(ph, context) { + return ph.value ? `${ph.value}` : ``; + } + visitIcuPlaceholder(ph, context) { + return `${ph.value.visit(this)}`; + } + visitBlockPlaceholder(ph, context) { + return `${ph.children.map(child => child.visit(this)).join(', ')}`; + } +} +const serializerVisitor$1 = new _SerializerVisitor(); +function serializeNodes(nodes) { + return nodes.map(a => a.visit(serializerVisitor$1, null)); +} +/** + * Serialize the i18n ast to something xml-like in order to generate an UID. + * + * Ignore the expressions so that message IDs stays identical if only the expression changes. + * + * @internal + */ +class _SerializerIgnoreExpVisitor extends _SerializerVisitor { + constructor(preservePlaceholders) { + super(); + this.preservePlaceholders = preservePlaceholders; + } + visitPlaceholder(ph, context) { + // Do not take the expression into account when `preservePlaceholders` is disabled. + return this.preservePlaceholders ? super.visitPlaceholder(ph, context) : ``; + } + visitIcu(icu) { + let strCases = Object.keys(icu.cases).map(k => `${k} {${icu.cases[k].visit(this)}}`); + // Do not take the expression into account + return `{${icu.type}, ${strCases.join(', ')}}`; + } +} +/** + * Compute the SHA1 of the given string + * + * see https://csrc.nist.gov/publications/fips/fips180-4/fips-180-4.pdf + * + * WARNING: this function has not been designed not tested with security in mind. + * DO NOT USE IT IN A SECURITY SENSITIVE CONTEXT. + */ +function sha1(str) { + textEncoder ??= new TextEncoder(); + const utf8 = [...textEncoder.encode(str)]; + const words32 = bytesToWords32(utf8, Endian.Big); + const len = utf8.length * 8; + const w = new Uint32Array(80); + let a = 0x67452301, + b = 0xefcdab89, + c = 0x98badcfe, + d = 0x10325476, + e = 0xc3d2e1f0; + words32[len >> 5] |= 0x80 << 24 - len % 32; + words32[(len + 64 >> 9 << 4) + 15] = len; + for (let i = 0; i < words32.length; i += 16) { + const h0 = a, + h1 = b, + h2 = c, + h3 = d, + h4 = e; + for (let j = 0; j < 80; j++) { + if (j < 16) { + w[j] = words32[i + j]; + } else { + w[j] = rol32(w[j - 3] ^ w[j - 8] ^ w[j - 14] ^ w[j - 16], 1); + } + const fkVal = fk(j, b, c, d); + const f = fkVal[0]; + const k = fkVal[1]; + const temp = [rol32(a, 5), f, e, k, w[j]].reduce(add32); + e = d; + d = c; + c = rol32(b, 30); + b = a; + a = temp; + } + a = add32(a, h0); + b = add32(b, h1); + c = add32(c, h2); + d = add32(d, h3); + e = add32(e, h4); + } + // Convert the output parts to a 160-bit hexadecimal string + return toHexU32(a) + toHexU32(b) + toHexU32(c) + toHexU32(d) + toHexU32(e); +} +/** + * Convert and format a number as a string representing a 32-bit unsigned hexadecimal number. + * @param value The value to format as a string. + * @returns A hexadecimal string representing the value. + */ +function toHexU32(value) { + // unsigned right shift of zero ensures an unsigned 32-bit number + return (value >>> 0).toString(16).padStart(8, '0'); +} +function fk(index, b, c, d) { + if (index < 20) { + return [b & c | ~b & d, 0x5a827999]; + } + if (index < 40) { + return [b ^ c ^ d, 0x6ed9eba1]; + } + if (index < 60) { + return [b & c | b & d | c & d, 0x8f1bbcdc]; + } + return [b ^ c ^ d, 0xca62c1d6]; +} +/** + * Compute the fingerprint of the given string + * + * The output is 64 bit number encoded as a decimal string + * + * based on: + * https://github.com/google/closure-compiler/blob/master/src/com/google/javascript/jscomp/GoogleJsMessageIdGenerator.java + */ +function fingerprint(str) { + textEncoder ??= new TextEncoder(); + const utf8 = textEncoder.encode(str); + const view = new DataView(utf8.buffer, utf8.byteOffset, utf8.byteLength); + let hi = hash32(view, utf8.length, 0); + let lo = hash32(view, utf8.length, 102072); + if (hi == 0 && (lo == 0 || lo == 1)) { + hi = hi ^ 0x130f9bef; + lo = lo ^ -0x6b5f56d8; + } + return BigInt.asUintN(32, BigInt(hi)) << BigInt(32) | BigInt.asUintN(32, BigInt(lo)); +} +function computeMsgId(msg, meaning = '') { + let msgFingerprint = fingerprint(msg); + if (meaning) { + // Rotate the 64-bit message fingerprint one bit to the left and then add the meaning + // fingerprint. + msgFingerprint = BigInt.asUintN(64, msgFingerprint << BigInt(1)) | msgFingerprint >> BigInt(63) & BigInt(1); + msgFingerprint += fingerprint(meaning); + } + return BigInt.asUintN(63, msgFingerprint).toString(); +} +function hash32(view, length, c) { + let a = 0x9e3779b9, + b = 0x9e3779b9; + let index = 0; + const end = length - 12; + for (; index <= end; index += 12) { + a += view.getUint32(index, true); + b += view.getUint32(index + 4, true); + c += view.getUint32(index + 8, true); + const res = mix(a, b, c); + a = res[0], b = res[1], c = res[2]; + } + const remainder = length - index; + // the first byte of c is reserved for the length + c += length; + if (remainder >= 4) { + a += view.getUint32(index, true); + index += 4; + if (remainder >= 8) { + b += view.getUint32(index, true); + index += 4; + // Partial 32-bit word for c + if (remainder >= 9) { + c += view.getUint8(index++) << 8; + } + if (remainder >= 10) { + c += view.getUint8(index++) << 16; + } + if (remainder === 11) { + c += view.getUint8(index++) << 24; + } + } else { + // Partial 32-bit word for b + if (remainder >= 5) { + b += view.getUint8(index++); + } + if (remainder >= 6) { + b += view.getUint8(index++) << 8; + } + if (remainder === 7) { + b += view.getUint8(index++) << 16; + } + } + } else { + // Partial 32-bit word for a + if (remainder >= 1) { + a += view.getUint8(index++); + } + if (remainder >= 2) { + a += view.getUint8(index++) << 8; + } + if (remainder === 3) { + a += view.getUint8(index++) << 16; + } + } + return mix(a, b, c)[2]; +} +function mix(a, b, c) { + a -= b; + a -= c; + a ^= c >>> 13; + b -= c; + b -= a; + b ^= a << 8; + c -= a; + c -= b; + c ^= b >>> 13; + a -= b; + a -= c; + a ^= c >>> 12; + b -= c; + b -= a; + b ^= a << 16; + c -= a; + c -= b; + c ^= b >>> 5; + a -= b; + a -= c; + a ^= c >>> 3; + b -= c; + b -= a; + b ^= a << 10; + c -= a; + c -= b; + c ^= b >>> 15; + return [a, b, c]; +} +// Utils +var Endian; +(function (Endian) { + Endian[Endian["Little"] = 0] = "Little"; + Endian[Endian["Big"] = 1] = "Big"; +})(Endian || (Endian = {})); +function add32(a, b) { + return add32to64(a, b)[1]; +} +function add32to64(a, b) { + const low = (a & 0xffff) + (b & 0xffff); + const high = (a >>> 16) + (b >>> 16) + (low >>> 16); + return [high >>> 16, high << 16 | low & 0xffff]; +} +// Rotate a 32b number left `count` position +function rol32(a, count) { + return a << count | a >>> 32 - count; +} +function bytesToWords32(bytes, endian) { + const size = bytes.length + 3 >>> 2; + const words32 = []; + for (let i = 0; i < size; i++) { + words32[i] = wordAt(bytes, i * 4, endian); + } + return words32; +} +function byteAt(bytes, index) { + return index >= bytes.length ? 0 : bytes[index]; +} +function wordAt(bytes, index, endian) { + let word = 0; + if (endian === Endian.Big) { + for (let i = 0; i < 4; i++) { + word += byteAt(bytes, index + i) << 24 - 8 * i; + } + } else { + for (let i = 0; i < 4; i++) { + word += byteAt(bytes, index + i) << 8 * i; + } + } + return word; +} + +//// Types +var TypeModifier; +(function (TypeModifier) { + TypeModifier[TypeModifier["None"] = 0] = "None"; + TypeModifier[TypeModifier["Const"] = 1] = "Const"; +})(TypeModifier || (TypeModifier = {})); +class Type { + constructor(modifiers = TypeModifier.None) { + this.modifiers = modifiers; + } + hasModifier(modifier) { + return (this.modifiers & modifier) !== 0; + } +} +var BuiltinTypeName; +(function (BuiltinTypeName) { + BuiltinTypeName[BuiltinTypeName["Dynamic"] = 0] = "Dynamic"; + BuiltinTypeName[BuiltinTypeName["Bool"] = 1] = "Bool"; + BuiltinTypeName[BuiltinTypeName["String"] = 2] = "String"; + BuiltinTypeName[BuiltinTypeName["Int"] = 3] = "Int"; + BuiltinTypeName[BuiltinTypeName["Number"] = 4] = "Number"; + BuiltinTypeName[BuiltinTypeName["Function"] = 5] = "Function"; + BuiltinTypeName[BuiltinTypeName["Inferred"] = 6] = "Inferred"; + BuiltinTypeName[BuiltinTypeName["None"] = 7] = "None"; +})(BuiltinTypeName || (BuiltinTypeName = {})); +class BuiltinType extends Type { + constructor(name, modifiers) { + super(modifiers); + this.name = name; + } + visitType(visitor, context) { + return visitor.visitBuiltinType(this, context); + } +} +class ExpressionType extends Type { + constructor(value, modifiers, typeParams = null) { + super(modifiers); + this.value = value; + this.typeParams = typeParams; + } + visitType(visitor, context) { + return visitor.visitExpressionType(this, context); + } +} +class ArrayType extends Type { + constructor(of, modifiers) { + super(modifiers); + this.of = of; + } + visitType(visitor, context) { + return visitor.visitArrayType(this, context); + } +} +class MapType extends Type { + constructor(valueType, modifiers) { + super(modifiers); + this.valueType = valueType || null; + } + visitType(visitor, context) { + return visitor.visitMapType(this, context); + } +} +class TransplantedType extends Type { + constructor(type, modifiers) { + super(modifiers); + this.type = type; + } + visitType(visitor, context) { + return visitor.visitTransplantedType(this, context); + } +} +const DYNAMIC_TYPE = new BuiltinType(BuiltinTypeName.Dynamic); +const INFERRED_TYPE = new BuiltinType(BuiltinTypeName.Inferred); +const BOOL_TYPE = new BuiltinType(BuiltinTypeName.Bool); +const INT_TYPE = new BuiltinType(BuiltinTypeName.Int); +const NUMBER_TYPE = new BuiltinType(BuiltinTypeName.Number); +const STRING_TYPE = new BuiltinType(BuiltinTypeName.String); +const FUNCTION_TYPE = new BuiltinType(BuiltinTypeName.Function); +const NONE_TYPE = new BuiltinType(BuiltinTypeName.None); +///// Expressions +var UnaryOperator; +(function (UnaryOperator) { + UnaryOperator[UnaryOperator["Minus"] = 0] = "Minus"; + UnaryOperator[UnaryOperator["Plus"] = 1] = "Plus"; +})(UnaryOperator || (UnaryOperator = {})); +var BinaryOperator; +(function (BinaryOperator) { + BinaryOperator[BinaryOperator["Equals"] = 0] = "Equals"; + BinaryOperator[BinaryOperator["NotEquals"] = 1] = "NotEquals"; + BinaryOperator[BinaryOperator["Identical"] = 2] = "Identical"; + BinaryOperator[BinaryOperator["NotIdentical"] = 3] = "NotIdentical"; + BinaryOperator[BinaryOperator["Minus"] = 4] = "Minus"; + BinaryOperator[BinaryOperator["Plus"] = 5] = "Plus"; + BinaryOperator[BinaryOperator["Divide"] = 6] = "Divide"; + BinaryOperator[BinaryOperator["Multiply"] = 7] = "Multiply"; + BinaryOperator[BinaryOperator["Modulo"] = 8] = "Modulo"; + BinaryOperator[BinaryOperator["And"] = 9] = "And"; + BinaryOperator[BinaryOperator["Or"] = 10] = "Or"; + BinaryOperator[BinaryOperator["BitwiseOr"] = 11] = "BitwiseOr"; + BinaryOperator[BinaryOperator["BitwiseAnd"] = 12] = "BitwiseAnd"; + BinaryOperator[BinaryOperator["Lower"] = 13] = "Lower"; + BinaryOperator[BinaryOperator["LowerEquals"] = 14] = "LowerEquals"; + BinaryOperator[BinaryOperator["Bigger"] = 15] = "Bigger"; + BinaryOperator[BinaryOperator["BiggerEquals"] = 16] = "BiggerEquals"; + BinaryOperator[BinaryOperator["NullishCoalesce"] = 17] = "NullishCoalesce"; +})(BinaryOperator || (BinaryOperator = {})); +function nullSafeIsEquivalent(base, other) { + if (base == null || other == null) { + return base == other; + } + return base.isEquivalent(other); +} +function areAllEquivalentPredicate(base, other, equivalentPredicate) { + const len = base.length; + if (len !== other.length) { + return false; + } + for (let i = 0; i < len; i++) { + if (!equivalentPredicate(base[i], other[i])) { + return false; + } + } + return true; +} +function areAllEquivalent(base, other) { + return areAllEquivalentPredicate(base, other, (baseElement, otherElement) => baseElement.isEquivalent(otherElement)); +} +class Expression { + constructor(type, sourceSpan) { + this.type = type || null; + this.sourceSpan = sourceSpan || null; + } + prop(name, sourceSpan) { + return new ReadPropExpr(this, name, null, sourceSpan); + } + key(index, type, sourceSpan) { + return new ReadKeyExpr(this, index, type, sourceSpan); + } + callFn(params, sourceSpan, pure) { + return new InvokeFunctionExpr(this, params, null, sourceSpan, pure); + } + instantiate(params, type, sourceSpan) { + return new InstantiateExpr(this, params, type, sourceSpan); + } + conditional(trueCase, falseCase = null, sourceSpan) { + return new ConditionalExpr(this, trueCase, falseCase, null, sourceSpan); + } + equals(rhs, sourceSpan) { + return new BinaryOperatorExpr(BinaryOperator.Equals, this, rhs, null, sourceSpan); + } + notEquals(rhs, sourceSpan) { + return new BinaryOperatorExpr(BinaryOperator.NotEquals, this, rhs, null, sourceSpan); + } + identical(rhs, sourceSpan) { + return new BinaryOperatorExpr(BinaryOperator.Identical, this, rhs, null, sourceSpan); + } + notIdentical(rhs, sourceSpan) { + return new BinaryOperatorExpr(BinaryOperator.NotIdentical, this, rhs, null, sourceSpan); + } + minus(rhs, sourceSpan) { + return new BinaryOperatorExpr(BinaryOperator.Minus, this, rhs, null, sourceSpan); + } + plus(rhs, sourceSpan) { + return new BinaryOperatorExpr(BinaryOperator.Plus, this, rhs, null, sourceSpan); + } + divide(rhs, sourceSpan) { + return new BinaryOperatorExpr(BinaryOperator.Divide, this, rhs, null, sourceSpan); + } + multiply(rhs, sourceSpan) { + return new BinaryOperatorExpr(BinaryOperator.Multiply, this, rhs, null, sourceSpan); + } + modulo(rhs, sourceSpan) { + return new BinaryOperatorExpr(BinaryOperator.Modulo, this, rhs, null, sourceSpan); + } + and(rhs, sourceSpan) { + return new BinaryOperatorExpr(BinaryOperator.And, this, rhs, null, sourceSpan); + } + bitwiseOr(rhs, sourceSpan, parens = true) { + return new BinaryOperatorExpr(BinaryOperator.BitwiseOr, this, rhs, null, sourceSpan, parens); + } + bitwiseAnd(rhs, sourceSpan, parens = true) { + return new BinaryOperatorExpr(BinaryOperator.BitwiseAnd, this, rhs, null, sourceSpan, parens); + } + or(rhs, sourceSpan) { + return new BinaryOperatorExpr(BinaryOperator.Or, this, rhs, null, sourceSpan); + } + lower(rhs, sourceSpan) { + return new BinaryOperatorExpr(BinaryOperator.Lower, this, rhs, null, sourceSpan); + } + lowerEquals(rhs, sourceSpan) { + return new BinaryOperatorExpr(BinaryOperator.LowerEquals, this, rhs, null, sourceSpan); + } + bigger(rhs, sourceSpan) { + return new BinaryOperatorExpr(BinaryOperator.Bigger, this, rhs, null, sourceSpan); + } + biggerEquals(rhs, sourceSpan) { + return new BinaryOperatorExpr(BinaryOperator.BiggerEquals, this, rhs, null, sourceSpan); + } + isBlank(sourceSpan) { + // Note: We use equals by purpose here to compare to null and undefined in JS. + // We use the typed null to allow strictNullChecks to narrow types. + return this.equals(TYPED_NULL_EXPR, sourceSpan); + } + nullishCoalesce(rhs, sourceSpan) { + return new BinaryOperatorExpr(BinaryOperator.NullishCoalesce, this, rhs, null, sourceSpan); + } + toStmt() { + return new ExpressionStatement(this, null); + } +} +class ReadVarExpr extends Expression { + constructor(name, type, sourceSpan) { + super(type, sourceSpan); + this.name = name; + } + isEquivalent(e) { + return e instanceof ReadVarExpr && this.name === e.name; + } + isConstant() { + return false; + } + visitExpression(visitor, context) { + return visitor.visitReadVarExpr(this, context); + } + clone() { + return new ReadVarExpr(this.name, this.type, this.sourceSpan); + } + set(value) { + return new WriteVarExpr(this.name, value, null, this.sourceSpan); + } +} +class TypeofExpr extends Expression { + constructor(expr, type, sourceSpan) { + super(type, sourceSpan); + this.expr = expr; + } + visitExpression(visitor, context) { + return visitor.visitTypeofExpr(this, context); + } + isEquivalent(e) { + return e instanceof TypeofExpr && e.expr.isEquivalent(this.expr); + } + isConstant() { + return this.expr.isConstant(); + } + clone() { + return new TypeofExpr(this.expr.clone()); + } +} +class WrappedNodeExpr extends Expression { + constructor(node, type, sourceSpan) { + super(type, sourceSpan); + this.node = node; + } + isEquivalent(e) { + return e instanceof WrappedNodeExpr && this.node === e.node; + } + isConstant() { + return false; + } + visitExpression(visitor, context) { + return visitor.visitWrappedNodeExpr(this, context); + } + clone() { + return new WrappedNodeExpr(this.node, this.type, this.sourceSpan); + } +} +class WriteVarExpr extends Expression { + constructor(name, value, type, sourceSpan) { + super(type || value.type, sourceSpan); + this.name = name; + this.value = value; + } + isEquivalent(e) { + return e instanceof WriteVarExpr && this.name === e.name && this.value.isEquivalent(e.value); + } + isConstant() { + return false; + } + visitExpression(visitor, context) { + return visitor.visitWriteVarExpr(this, context); + } + clone() { + return new WriteVarExpr(this.name, this.value.clone(), this.type, this.sourceSpan); + } + toDeclStmt(type, modifiers) { + return new DeclareVarStmt(this.name, this.value, type, modifiers, this.sourceSpan); + } + toConstDecl() { + return this.toDeclStmt(INFERRED_TYPE, StmtModifier.Final); + } +} +class WriteKeyExpr extends Expression { + constructor(receiver, index, value, type, sourceSpan) { + super(type || value.type, sourceSpan); + this.receiver = receiver; + this.index = index; + this.value = value; + } + isEquivalent(e) { + return e instanceof WriteKeyExpr && this.receiver.isEquivalent(e.receiver) && this.index.isEquivalent(e.index) && this.value.isEquivalent(e.value); + } + isConstant() { + return false; + } + visitExpression(visitor, context) { + return visitor.visitWriteKeyExpr(this, context); + } + clone() { + return new WriteKeyExpr(this.receiver.clone(), this.index.clone(), this.value.clone(), this.type, this.sourceSpan); + } +} +class WritePropExpr extends Expression { + constructor(receiver, name, value, type, sourceSpan) { + super(type || value.type, sourceSpan); + this.receiver = receiver; + this.name = name; + this.value = value; + } + isEquivalent(e) { + return e instanceof WritePropExpr && this.receiver.isEquivalent(e.receiver) && this.name === e.name && this.value.isEquivalent(e.value); + } + isConstant() { + return false; + } + visitExpression(visitor, context) { + return visitor.visitWritePropExpr(this, context); + } + clone() { + return new WritePropExpr(this.receiver.clone(), this.name, this.value.clone(), this.type, this.sourceSpan); + } +} +class InvokeFunctionExpr extends Expression { + constructor(fn, args, type, sourceSpan, pure = false) { + super(type, sourceSpan); + this.fn = fn; + this.args = args; + this.pure = pure; + } + // An alias for fn, which allows other logic to handle calls and property reads together. + get receiver() { + return this.fn; + } + isEquivalent(e) { + return e instanceof InvokeFunctionExpr && this.fn.isEquivalent(e.fn) && areAllEquivalent(this.args, e.args) && this.pure === e.pure; + } + isConstant() { + return false; + } + visitExpression(visitor, context) { + return visitor.visitInvokeFunctionExpr(this, context); + } + clone() { + return new InvokeFunctionExpr(this.fn.clone(), this.args.map(arg => arg.clone()), this.type, this.sourceSpan, this.pure); + } +} +class TaggedTemplateExpr extends Expression { + constructor(tag, template, type, sourceSpan) { + super(type, sourceSpan); + this.tag = tag; + this.template = template; + } + isEquivalent(e) { + return e instanceof TaggedTemplateExpr && this.tag.isEquivalent(e.tag) && areAllEquivalentPredicate(this.template.elements, e.template.elements, (a, b) => a.text === b.text) && areAllEquivalent(this.template.expressions, e.template.expressions); + } + isConstant() { + return false; + } + visitExpression(visitor, context) { + return visitor.visitTaggedTemplateExpr(this, context); + } + clone() { + return new TaggedTemplateExpr(this.tag.clone(), this.template.clone(), this.type, this.sourceSpan); + } +} +class InstantiateExpr extends Expression { + constructor(classExpr, args, type, sourceSpan) { + super(type, sourceSpan); + this.classExpr = classExpr; + this.args = args; + } + isEquivalent(e) { + return e instanceof InstantiateExpr && this.classExpr.isEquivalent(e.classExpr) && areAllEquivalent(this.args, e.args); + } + isConstant() { + return false; + } + visitExpression(visitor, context) { + return visitor.visitInstantiateExpr(this, context); + } + clone() { + return new InstantiateExpr(this.classExpr.clone(), this.args.map(arg => arg.clone()), this.type, this.sourceSpan); + } +} +class LiteralExpr extends Expression { + constructor(value, type, sourceSpan) { + super(type, sourceSpan); + this.value = value; + } + isEquivalent(e) { + return e instanceof LiteralExpr && this.value === e.value; + } + isConstant() { + return true; + } + visitExpression(visitor, context) { + return visitor.visitLiteralExpr(this, context); + } + clone() { + return new LiteralExpr(this.value, this.type, this.sourceSpan); + } +} +class TemplateLiteral { + constructor(elements, expressions) { + this.elements = elements; + this.expressions = expressions; + } + clone() { + return new TemplateLiteral(this.elements.map(el => el.clone()), this.expressions.map(expr => expr.clone())); + } +} +class TemplateLiteralElement { + constructor(text, sourceSpan, rawText) { + this.text = text; + this.sourceSpan = sourceSpan; + // If `rawText` is not provided, try to extract the raw string from its + // associated `sourceSpan`. If that is also not available, "fake" the raw + // string instead by escaping the following control sequences: + // - "\" would otherwise indicate that the next character is a control character. + // - "`" and "${" are template string control sequences that would otherwise prematurely + // indicate the end of the template literal element. + this.rawText = rawText ?? sourceSpan?.toString() ?? escapeForTemplateLiteral(escapeSlashes(text)); + } + clone() { + return new TemplateLiteralElement(this.text, this.sourceSpan, this.rawText); + } +} +class LiteralPiece { + constructor(text, sourceSpan) { + this.text = text; + this.sourceSpan = sourceSpan; + } +} +class PlaceholderPiece { + /** + * Create a new instance of a `PlaceholderPiece`. + * + * @param text the name of this placeholder (e.g. `PH_1`). + * @param sourceSpan the location of this placeholder in its localized message the source code. + * @param associatedMessage reference to another message that this placeholder is associated with. + * The `associatedMessage` is mainly used to provide a relationship to an ICU message that has + * been extracted out from the message containing the placeholder. + */ + constructor(text, sourceSpan, associatedMessage) { + this.text = text; + this.sourceSpan = sourceSpan; + this.associatedMessage = associatedMessage; + } +} +const MEANING_SEPARATOR$1 = '|'; +const ID_SEPARATOR$1 = '@@'; +const LEGACY_ID_INDICATOR = '␟'; +class LocalizedString extends Expression { + constructor(metaBlock, messageParts, placeHolderNames, expressions, sourceSpan) { + super(STRING_TYPE, sourceSpan); + this.metaBlock = metaBlock; + this.messageParts = messageParts; + this.placeHolderNames = placeHolderNames; + this.expressions = expressions; + } + isEquivalent(e) { + // return e instanceof LocalizedString && this.message === e.message; + return false; + } + isConstant() { + return false; + } + visitExpression(visitor, context) { + return visitor.visitLocalizedString(this, context); + } + clone() { + return new LocalizedString(this.metaBlock, this.messageParts, this.placeHolderNames, this.expressions.map(expr => expr.clone()), this.sourceSpan); + } + /** + * Serialize the given `meta` and `messagePart` into "cooked" and "raw" strings that can be used + * in a `$localize` tagged string. The format of the metadata is the same as that parsed by + * `parseI18nMeta()`. + * + * @param meta The metadata to serialize + * @param messagePart The first part of the tagged string + */ + serializeI18nHead() { + let metaBlock = this.metaBlock.description || ''; + if (this.metaBlock.meaning) { + metaBlock = `${this.metaBlock.meaning}${MEANING_SEPARATOR$1}${metaBlock}`; + } + if (this.metaBlock.customId) { + metaBlock = `${metaBlock}${ID_SEPARATOR$1}${this.metaBlock.customId}`; + } + if (this.metaBlock.legacyIds) { + this.metaBlock.legacyIds.forEach(legacyId => { + metaBlock = `${metaBlock}${LEGACY_ID_INDICATOR}${legacyId}`; + }); + } + return createCookedRawString(metaBlock, this.messageParts[0].text, this.getMessagePartSourceSpan(0)); + } + getMessagePartSourceSpan(i) { + return this.messageParts[i]?.sourceSpan ?? this.sourceSpan; + } + getPlaceholderSourceSpan(i) { + return this.placeHolderNames[i]?.sourceSpan ?? this.expressions[i]?.sourceSpan ?? this.sourceSpan; + } + /** + * Serialize the given `placeholderName` and `messagePart` into "cooked" and "raw" strings that + * can be used in a `$localize` tagged string. + * + * The format is `:[@@]:`. + * + * The `associated-id` is the message id of the (usually an ICU) message to which this placeholder + * refers. + * + * @param partIndex The index of the message part to serialize. + */ + serializeI18nTemplatePart(partIndex) { + const placeholder = this.placeHolderNames[partIndex - 1]; + const messagePart = this.messageParts[partIndex]; + let metaBlock = placeholder.text; + if (placeholder.associatedMessage?.legacyIds.length === 0) { + metaBlock += `${ID_SEPARATOR$1}${computeMsgId(placeholder.associatedMessage.messageString, placeholder.associatedMessage.meaning)}`; + } + return createCookedRawString(metaBlock, messagePart.text, this.getMessagePartSourceSpan(partIndex)); + } +} +const escapeSlashes = str => str.replace(/\\/g, '\\\\'); +const escapeStartingColon = str => str.replace(/^:/, '\\:'); +const escapeColons = str => str.replace(/:/g, '\\:'); +const escapeForTemplateLiteral = str => str.replace(/`/g, '\\`').replace(/\${/g, '$\\{'); +/** + * Creates a `{cooked, raw}` object from the `metaBlock` and `messagePart`. + * + * The `raw` text must have various character sequences escaped: + * * "\" would otherwise indicate that the next character is a control character. + * * "`" and "${" are template string control sequences that would otherwise prematurely indicate + * the end of a message part. + * * ":" inside a metablock would prematurely indicate the end of the metablock. + * * ":" at the start of a messagePart with no metablock would erroneously indicate the start of a + * metablock. + * + * @param metaBlock Any metadata that should be prepended to the string + * @param messagePart The message part of the string + */ +function createCookedRawString(metaBlock, messagePart, range) { + if (metaBlock === '') { + return { + cooked: messagePart, + raw: escapeForTemplateLiteral(escapeStartingColon(escapeSlashes(messagePart))), + range + }; + } else { + return { + cooked: `:${metaBlock}:${messagePart}`, + raw: escapeForTemplateLiteral(`:${escapeColons(escapeSlashes(metaBlock))}:${escapeSlashes(messagePart)}`), + range + }; + } +} +class ExternalExpr extends Expression { + constructor(value, type, typeParams = null, sourceSpan) { + super(type, sourceSpan); + this.value = value; + this.typeParams = typeParams; + } + isEquivalent(e) { + return e instanceof ExternalExpr && this.value.name === e.value.name && this.value.moduleName === e.value.moduleName && this.value.runtime === e.value.runtime; + } + isConstant() { + return false; + } + visitExpression(visitor, context) { + return visitor.visitExternalExpr(this, context); + } + clone() { + return new ExternalExpr(this.value, this.type, this.typeParams, this.sourceSpan); + } +} +class ExternalReference { + constructor(moduleName, name, runtime) { + this.moduleName = moduleName; + this.name = name; + this.runtime = runtime; + } +} +class ConditionalExpr extends Expression { + constructor(condition, trueCase, falseCase = null, type, sourceSpan) { + super(type || trueCase.type, sourceSpan); + this.condition = condition; + this.falseCase = falseCase; + this.trueCase = trueCase; + } + isEquivalent(e) { + return e instanceof ConditionalExpr && this.condition.isEquivalent(e.condition) && this.trueCase.isEquivalent(e.trueCase) && nullSafeIsEquivalent(this.falseCase, e.falseCase); + } + isConstant() { + return false; + } + visitExpression(visitor, context) { + return visitor.visitConditionalExpr(this, context); + } + clone() { + return new ConditionalExpr(this.condition.clone(), this.trueCase.clone(), this.falseCase?.clone(), this.type, this.sourceSpan); + } +} +class DynamicImportExpr extends Expression { + constructor(url, sourceSpan) { + super(null, sourceSpan); + this.url = url; + } + isEquivalent(e) { + return e instanceof DynamicImportExpr && this.url === e.url; + } + isConstant() { + return false; + } + visitExpression(visitor, context) { + return visitor.visitDynamicImportExpr(this, context); + } + clone() { + return new DynamicImportExpr(this.url, this.sourceSpan); + } +} +class NotExpr extends Expression { + constructor(condition, sourceSpan) { + super(BOOL_TYPE, sourceSpan); + this.condition = condition; + } + isEquivalent(e) { + return e instanceof NotExpr && this.condition.isEquivalent(e.condition); + } + isConstant() { + return false; + } + visitExpression(visitor, context) { + return visitor.visitNotExpr(this, context); + } + clone() { + return new NotExpr(this.condition.clone(), this.sourceSpan); + } +} +class FnParam { + constructor(name, type = null) { + this.name = name; + this.type = type; + } + isEquivalent(param) { + return this.name === param.name; + } + clone() { + return new FnParam(this.name, this.type); + } +} +class FunctionExpr extends Expression { + constructor(params, statements, type, sourceSpan, name) { + super(type, sourceSpan); + this.params = params; + this.statements = statements; + this.name = name; + } + isEquivalent(e) { + return (e instanceof FunctionExpr || e instanceof DeclareFunctionStmt) && areAllEquivalent(this.params, e.params) && areAllEquivalent(this.statements, e.statements); + } + isConstant() { + return false; + } + visitExpression(visitor, context) { + return visitor.visitFunctionExpr(this, context); + } + toDeclStmt(name, modifiers) { + return new DeclareFunctionStmt(name, this.params, this.statements, this.type, modifiers, this.sourceSpan); + } + clone() { + // TODO: Should we deep clone statements? + return new FunctionExpr(this.params.map(p => p.clone()), this.statements, this.type, this.sourceSpan, this.name); + } +} +class ArrowFunctionExpr extends Expression { + // Note that `body: Expression` represents `() => expr` whereas + // `body: Statement[]` represents `() => { expr }`. + constructor(params, body, type, sourceSpan) { + super(type, sourceSpan); + this.params = params; + this.body = body; + } + isEquivalent(e) { + if (!(e instanceof ArrowFunctionExpr) || !areAllEquivalent(this.params, e.params)) { + return false; + } + if (this.body instanceof Expression && e.body instanceof Expression) { + return this.body.isEquivalent(e.body); + } + if (Array.isArray(this.body) && Array.isArray(e.body)) { + return areAllEquivalent(this.body, e.body); + } + return false; + } + isConstant() { + return false; + } + visitExpression(visitor, context) { + return visitor.visitArrowFunctionExpr(this, context); + } + clone() { + // TODO: Should we deep clone statements? + return new ArrowFunctionExpr(this.params.map(p => p.clone()), Array.isArray(this.body) ? this.body : this.body.clone(), this.type, this.sourceSpan); + } + toDeclStmt(name, modifiers) { + return new DeclareVarStmt(name, this, INFERRED_TYPE, modifiers, this.sourceSpan); + } +} +class UnaryOperatorExpr extends Expression { + constructor(operator, expr, type, sourceSpan, parens = true) { + super(type || NUMBER_TYPE, sourceSpan); + this.operator = operator; + this.expr = expr; + this.parens = parens; + } + isEquivalent(e) { + return e instanceof UnaryOperatorExpr && this.operator === e.operator && this.expr.isEquivalent(e.expr); + } + isConstant() { + return false; + } + visitExpression(visitor, context) { + return visitor.visitUnaryOperatorExpr(this, context); + } + clone() { + return new UnaryOperatorExpr(this.operator, this.expr.clone(), this.type, this.sourceSpan, this.parens); + } +} +class BinaryOperatorExpr extends Expression { + constructor(operator, lhs, rhs, type, sourceSpan, parens = true) { + super(type || lhs.type, sourceSpan); + this.operator = operator; + this.rhs = rhs; + this.parens = parens; + this.lhs = lhs; + } + isEquivalent(e) { + return e instanceof BinaryOperatorExpr && this.operator === e.operator && this.lhs.isEquivalent(e.lhs) && this.rhs.isEquivalent(e.rhs); + } + isConstant() { + return false; + } + visitExpression(visitor, context) { + return visitor.visitBinaryOperatorExpr(this, context); + } + clone() { + return new BinaryOperatorExpr(this.operator, this.lhs.clone(), this.rhs.clone(), this.type, this.sourceSpan, this.parens); + } +} +class ReadPropExpr extends Expression { + constructor(receiver, name, type, sourceSpan) { + super(type, sourceSpan); + this.receiver = receiver; + this.name = name; + } + // An alias for name, which allows other logic to handle property reads and keyed reads together. + get index() { + return this.name; + } + isEquivalent(e) { + return e instanceof ReadPropExpr && this.receiver.isEquivalent(e.receiver) && this.name === e.name; + } + isConstant() { + return false; + } + visitExpression(visitor, context) { + return visitor.visitReadPropExpr(this, context); + } + set(value) { + return new WritePropExpr(this.receiver, this.name, value, null, this.sourceSpan); + } + clone() { + return new ReadPropExpr(this.receiver.clone(), this.name, this.type, this.sourceSpan); + } +} +class ReadKeyExpr extends Expression { + constructor(receiver, index, type, sourceSpan) { + super(type, sourceSpan); + this.receiver = receiver; + this.index = index; + } + isEquivalent(e) { + return e instanceof ReadKeyExpr && this.receiver.isEquivalent(e.receiver) && this.index.isEquivalent(e.index); + } + isConstant() { + return false; + } + visitExpression(visitor, context) { + return visitor.visitReadKeyExpr(this, context); + } + set(value) { + return new WriteKeyExpr(this.receiver, this.index, value, null, this.sourceSpan); + } + clone() { + return new ReadKeyExpr(this.receiver.clone(), this.index.clone(), this.type, this.sourceSpan); + } +} +class LiteralArrayExpr extends Expression { + constructor(entries, type, sourceSpan) { + super(type, sourceSpan); + this.entries = entries; + } + isConstant() { + return this.entries.every(e => e.isConstant()); + } + isEquivalent(e) { + return e instanceof LiteralArrayExpr && areAllEquivalent(this.entries, e.entries); + } + visitExpression(visitor, context) { + return visitor.visitLiteralArrayExpr(this, context); + } + clone() { + return new LiteralArrayExpr(this.entries.map(e => e.clone()), this.type, this.sourceSpan); + } +} +class LiteralMapEntry { + constructor(key, value, quoted) { + this.key = key; + this.value = value; + this.quoted = quoted; + } + isEquivalent(e) { + return this.key === e.key && this.value.isEquivalent(e.value); + } + clone() { + return new LiteralMapEntry(this.key, this.value.clone(), this.quoted); + } +} +class LiteralMapExpr extends Expression { + constructor(entries, type, sourceSpan) { + super(type, sourceSpan); + this.entries = entries; + this.valueType = null; + if (type) { + this.valueType = type.valueType; + } + } + isEquivalent(e) { + return e instanceof LiteralMapExpr && areAllEquivalent(this.entries, e.entries); + } + isConstant() { + return this.entries.every(e => e.value.isConstant()); + } + visitExpression(visitor, context) { + return visitor.visitLiteralMapExpr(this, context); + } + clone() { + const entriesClone = this.entries.map(entry => entry.clone()); + return new LiteralMapExpr(entriesClone, this.type, this.sourceSpan); + } +} +class CommaExpr extends Expression { + constructor(parts, sourceSpan) { + super(parts[parts.length - 1].type, sourceSpan); + this.parts = parts; + } + isEquivalent(e) { + return e instanceof CommaExpr && areAllEquivalent(this.parts, e.parts); + } + isConstant() { + return false; + } + visitExpression(visitor, context) { + return visitor.visitCommaExpr(this, context); + } + clone() { + return new CommaExpr(this.parts.map(p => p.clone())); + } +} +const NULL_EXPR = new LiteralExpr(null, null, null); +const TYPED_NULL_EXPR = new LiteralExpr(null, INFERRED_TYPE, null); +//// Statements +var StmtModifier; +(function (StmtModifier) { + StmtModifier[StmtModifier["None"] = 0] = "None"; + StmtModifier[StmtModifier["Final"] = 1] = "Final"; + StmtModifier[StmtModifier["Private"] = 2] = "Private"; + StmtModifier[StmtModifier["Exported"] = 4] = "Exported"; + StmtModifier[StmtModifier["Static"] = 8] = "Static"; +})(StmtModifier || (StmtModifier = {})); +class LeadingComment { + constructor(text, multiline, trailingNewline) { + this.text = text; + this.multiline = multiline; + this.trailingNewline = trailingNewline; + } + toString() { + return this.multiline ? ` ${this.text} ` : this.text; + } +} +class JSDocComment extends LeadingComment { + constructor(tags) { + super('', /* multiline */true, /* trailingNewline */true); + this.tags = tags; + } + toString() { + return serializeTags(this.tags); + } +} +class Statement { + constructor(modifiers = StmtModifier.None, sourceSpan = null, leadingComments) { + this.modifiers = modifiers; + this.sourceSpan = sourceSpan; + this.leadingComments = leadingComments; + } + hasModifier(modifier) { + return (this.modifiers & modifier) !== 0; + } + addLeadingComment(leadingComment) { + this.leadingComments = this.leadingComments ?? []; + this.leadingComments.push(leadingComment); + } +} +class DeclareVarStmt extends Statement { + constructor(name, value, type, modifiers, sourceSpan, leadingComments) { + super(modifiers, sourceSpan, leadingComments); + this.name = name; + this.value = value; + this.type = type || value && value.type || null; + } + isEquivalent(stmt) { + return stmt instanceof DeclareVarStmt && this.name === stmt.name && (this.value ? !!stmt.value && this.value.isEquivalent(stmt.value) : !stmt.value); + } + visitStatement(visitor, context) { + return visitor.visitDeclareVarStmt(this, context); + } +} +class DeclareFunctionStmt extends Statement { + constructor(name, params, statements, type, modifiers, sourceSpan, leadingComments) { + super(modifiers, sourceSpan, leadingComments); + this.name = name; + this.params = params; + this.statements = statements; + this.type = type || null; + } + isEquivalent(stmt) { + return stmt instanceof DeclareFunctionStmt && areAllEquivalent(this.params, stmt.params) && areAllEquivalent(this.statements, stmt.statements); + } + visitStatement(visitor, context) { + return visitor.visitDeclareFunctionStmt(this, context); + } +} +class ExpressionStatement extends Statement { + constructor(expr, sourceSpan, leadingComments) { + super(StmtModifier.None, sourceSpan, leadingComments); + this.expr = expr; + } + isEquivalent(stmt) { + return stmt instanceof ExpressionStatement && this.expr.isEquivalent(stmt.expr); + } + visitStatement(visitor, context) { + return visitor.visitExpressionStmt(this, context); + } +} +class ReturnStatement extends Statement { + constructor(value, sourceSpan = null, leadingComments) { + super(StmtModifier.None, sourceSpan, leadingComments); + this.value = value; + } + isEquivalent(stmt) { + return stmt instanceof ReturnStatement && this.value.isEquivalent(stmt.value); + } + visitStatement(visitor, context) { + return visitor.visitReturnStmt(this, context); + } +} +class IfStmt extends Statement { + constructor(condition, trueCase, falseCase = [], sourceSpan, leadingComments) { + super(StmtModifier.None, sourceSpan, leadingComments); + this.condition = condition; + this.trueCase = trueCase; + this.falseCase = falseCase; + } + isEquivalent(stmt) { + return stmt instanceof IfStmt && this.condition.isEquivalent(stmt.condition) && areAllEquivalent(this.trueCase, stmt.trueCase) && areAllEquivalent(this.falseCase, stmt.falseCase); + } + visitStatement(visitor, context) { + return visitor.visitIfStmt(this, context); + } +} +class RecursiveAstVisitor$1 { + visitType(ast, context) { + return ast; + } + visitExpression(ast, context) { + if (ast.type) { + ast.type.visitType(this, context); + } + return ast; + } + visitBuiltinType(type, context) { + return this.visitType(type, context); + } + visitExpressionType(type, context) { + type.value.visitExpression(this, context); + if (type.typeParams !== null) { + type.typeParams.forEach(param => this.visitType(param, context)); + } + return this.visitType(type, context); + } + visitArrayType(type, context) { + return this.visitType(type, context); + } + visitMapType(type, context) { + return this.visitType(type, context); + } + visitTransplantedType(type, context) { + return type; + } + visitWrappedNodeExpr(ast, context) { + return ast; + } + visitTypeofExpr(ast, context) { + return this.visitExpression(ast, context); + } + visitReadVarExpr(ast, context) { + return this.visitExpression(ast, context); + } + visitWriteVarExpr(ast, context) { + ast.value.visitExpression(this, context); + return this.visitExpression(ast, context); + } + visitWriteKeyExpr(ast, context) { + ast.receiver.visitExpression(this, context); + ast.index.visitExpression(this, context); + ast.value.visitExpression(this, context); + return this.visitExpression(ast, context); + } + visitWritePropExpr(ast, context) { + ast.receiver.visitExpression(this, context); + ast.value.visitExpression(this, context); + return this.visitExpression(ast, context); + } + visitDynamicImportExpr(ast, context) { + return this.visitExpression(ast, context); + } + visitInvokeFunctionExpr(ast, context) { + ast.fn.visitExpression(this, context); + this.visitAllExpressions(ast.args, context); + return this.visitExpression(ast, context); + } + visitTaggedTemplateExpr(ast, context) { + ast.tag.visitExpression(this, context); + this.visitAllExpressions(ast.template.expressions, context); + return this.visitExpression(ast, context); + } + visitInstantiateExpr(ast, context) { + ast.classExpr.visitExpression(this, context); + this.visitAllExpressions(ast.args, context); + return this.visitExpression(ast, context); + } + visitLiteralExpr(ast, context) { + return this.visitExpression(ast, context); + } + visitLocalizedString(ast, context) { + return this.visitExpression(ast, context); + } + visitExternalExpr(ast, context) { + if (ast.typeParams) { + ast.typeParams.forEach(type => type.visitType(this, context)); + } + return this.visitExpression(ast, context); + } + visitConditionalExpr(ast, context) { + ast.condition.visitExpression(this, context); + ast.trueCase.visitExpression(this, context); + ast.falseCase.visitExpression(this, context); + return this.visitExpression(ast, context); + } + visitNotExpr(ast, context) { + ast.condition.visitExpression(this, context); + return this.visitExpression(ast, context); + } + visitFunctionExpr(ast, context) { + this.visitAllStatements(ast.statements, context); + return this.visitExpression(ast, context); + } + visitArrowFunctionExpr(ast, context) { + if (Array.isArray(ast.body)) { + this.visitAllStatements(ast.body, context); + } else { + this.visitExpression(ast.body, context); + } + return this.visitExpression(ast, context); + } + visitUnaryOperatorExpr(ast, context) { + ast.expr.visitExpression(this, context); + return this.visitExpression(ast, context); + } + visitBinaryOperatorExpr(ast, context) { + ast.lhs.visitExpression(this, context); + ast.rhs.visitExpression(this, context); + return this.visitExpression(ast, context); + } + visitReadPropExpr(ast, context) { + ast.receiver.visitExpression(this, context); + return this.visitExpression(ast, context); + } + visitReadKeyExpr(ast, context) { + ast.receiver.visitExpression(this, context); + ast.index.visitExpression(this, context); + return this.visitExpression(ast, context); + } + visitLiteralArrayExpr(ast, context) { + this.visitAllExpressions(ast.entries, context); + return this.visitExpression(ast, context); + } + visitLiteralMapExpr(ast, context) { + ast.entries.forEach(entry => entry.value.visitExpression(this, context)); + return this.visitExpression(ast, context); + } + visitCommaExpr(ast, context) { + this.visitAllExpressions(ast.parts, context); + return this.visitExpression(ast, context); + } + visitAllExpressions(exprs, context) { + exprs.forEach(expr => expr.visitExpression(this, context)); + } + visitDeclareVarStmt(stmt, context) { + if (stmt.value) { + stmt.value.visitExpression(this, context); + } + if (stmt.type) { + stmt.type.visitType(this, context); + } + return stmt; + } + visitDeclareFunctionStmt(stmt, context) { + this.visitAllStatements(stmt.statements, context); + if (stmt.type) { + stmt.type.visitType(this, context); + } + return stmt; + } + visitExpressionStmt(stmt, context) { + stmt.expr.visitExpression(this, context); + return stmt; + } + visitReturnStmt(stmt, context) { + stmt.value.visitExpression(this, context); + return stmt; + } + visitIfStmt(stmt, context) { + stmt.condition.visitExpression(this, context); + this.visitAllStatements(stmt.trueCase, context); + this.visitAllStatements(stmt.falseCase, context); + return stmt; + } + visitAllStatements(stmts, context) { + stmts.forEach(stmt => stmt.visitStatement(this, context)); + } +} +function leadingComment(text, multiline = false, trailingNewline = true) { + return new LeadingComment(text, multiline, trailingNewline); +} +function jsDocComment(tags = []) { + return new JSDocComment(tags); +} +function variable(name, type, sourceSpan) { + return new ReadVarExpr(name, type, sourceSpan); +} +function importExpr(id, typeParams = null, sourceSpan) { + return new ExternalExpr(id, null, typeParams, sourceSpan); +} +function importType(id, typeParams, typeModifiers) { + return id != null ? expressionType(importExpr(id, typeParams, null), typeModifiers) : null; +} +function expressionType(expr, typeModifiers, typeParams) { + return new ExpressionType(expr, typeModifiers, typeParams); +} +function transplantedType(type, typeModifiers) { + return new TransplantedType(type, typeModifiers); +} +function typeofExpr(expr) { + return new TypeofExpr(expr); +} +function literalArr(values, type, sourceSpan) { + return new LiteralArrayExpr(values, type, sourceSpan); +} +function literalMap(values, type = null) { + return new LiteralMapExpr(values.map(e => new LiteralMapEntry(e.key, e.value, e.quoted)), type, null); +} +function unary(operator, expr, type, sourceSpan) { + return new UnaryOperatorExpr(operator, expr, type, sourceSpan); +} +function not(expr, sourceSpan) { + return new NotExpr(expr, sourceSpan); +} +function fn(params, body, type, sourceSpan, name) { + return new FunctionExpr(params, body, type, sourceSpan, name); +} +function arrowFn(params, body, type, sourceSpan) { + return new ArrowFunctionExpr(params, body, type, sourceSpan); +} +function ifStmt(condition, thenClause, elseClause, sourceSpan, leadingComments) { + return new IfStmt(condition, thenClause, elseClause, sourceSpan, leadingComments); +} +function taggedTemplate(tag, template, type, sourceSpan) { + return new TaggedTemplateExpr(tag, template, type, sourceSpan); +} +function literal(value, type, sourceSpan) { + return new LiteralExpr(value, type, sourceSpan); +} +function localizedString(metaBlock, messageParts, placeholderNames, expressions, sourceSpan) { + return new LocalizedString(metaBlock, messageParts, placeholderNames, expressions, sourceSpan); +} +function isNull(exp) { + return exp instanceof LiteralExpr && exp.value === null; +} +/* + * Serializes a `Tag` into a string. + * Returns a string like " @foo {bar} baz" (note the leading whitespace before `@foo`). + */ +function tagToString(tag) { + let out = ''; + if (tag.tagName) { + out += ` @${tag.tagName}`; + } + if (tag.text) { + if (tag.text.match(/\/\*|\*\//)) { + throw new Error('JSDoc text cannot contain "/*" and "*/"'); + } + out += ' ' + tag.text.replace(/@/g, '\\@'); + } + return out; +} +function serializeTags(tags) { + if (tags.length === 0) return ''; + if (tags.length === 1 && tags[0].tagName && !tags[0].text) { + // The JSDOC comment is a single simple tag: e.g `/** @tagname */`. + return `*${tagToString(tags[0])} `; + } + let out = '*\n'; + for (const tag of tags) { + out += ' *'; + // If the tagToString is multi-line, insert " * " prefixes on lines. + out += tagToString(tag).replace(/\n/g, '\n * '); + out += '\n'; + } + out += ' '; + return out; +} +var output_ast = /*#__PURE__*/Object.freeze({ + __proto__: null, + get TypeModifier() { + return TypeModifier; + }, + Type: Type, + get BuiltinTypeName() { + return BuiltinTypeName; + }, + BuiltinType: BuiltinType, + ExpressionType: ExpressionType, + ArrayType: ArrayType, + MapType: MapType, + TransplantedType: TransplantedType, + DYNAMIC_TYPE: DYNAMIC_TYPE, + INFERRED_TYPE: INFERRED_TYPE, + BOOL_TYPE: BOOL_TYPE, + INT_TYPE: INT_TYPE, + NUMBER_TYPE: NUMBER_TYPE, + STRING_TYPE: STRING_TYPE, + FUNCTION_TYPE: FUNCTION_TYPE, + NONE_TYPE: NONE_TYPE, + get UnaryOperator() { + return UnaryOperator; + }, + get BinaryOperator() { + return BinaryOperator; + }, + nullSafeIsEquivalent: nullSafeIsEquivalent, + areAllEquivalent: areAllEquivalent, + Expression: Expression, + ReadVarExpr: ReadVarExpr, + TypeofExpr: TypeofExpr, + WrappedNodeExpr: WrappedNodeExpr, + WriteVarExpr: WriteVarExpr, + WriteKeyExpr: WriteKeyExpr, + WritePropExpr: WritePropExpr, + InvokeFunctionExpr: InvokeFunctionExpr, + TaggedTemplateExpr: TaggedTemplateExpr, + InstantiateExpr: InstantiateExpr, + LiteralExpr: LiteralExpr, + TemplateLiteral: TemplateLiteral, + TemplateLiteralElement: TemplateLiteralElement, + LiteralPiece: LiteralPiece, + PlaceholderPiece: PlaceholderPiece, + LocalizedString: LocalizedString, + ExternalExpr: ExternalExpr, + ExternalReference: ExternalReference, + ConditionalExpr: ConditionalExpr, + DynamicImportExpr: DynamicImportExpr, + NotExpr: NotExpr, + FnParam: FnParam, + FunctionExpr: FunctionExpr, + ArrowFunctionExpr: ArrowFunctionExpr, + UnaryOperatorExpr: UnaryOperatorExpr, + BinaryOperatorExpr: BinaryOperatorExpr, + ReadPropExpr: ReadPropExpr, + ReadKeyExpr: ReadKeyExpr, + LiteralArrayExpr: LiteralArrayExpr, + LiteralMapEntry: LiteralMapEntry, + LiteralMapExpr: LiteralMapExpr, + CommaExpr: CommaExpr, + NULL_EXPR: NULL_EXPR, + TYPED_NULL_EXPR: TYPED_NULL_EXPR, + get StmtModifier() { + return StmtModifier; + }, + LeadingComment: LeadingComment, + JSDocComment: JSDocComment, + Statement: Statement, + DeclareVarStmt: DeclareVarStmt, + DeclareFunctionStmt: DeclareFunctionStmt, + ExpressionStatement: ExpressionStatement, + ReturnStatement: ReturnStatement, + IfStmt: IfStmt, + RecursiveAstVisitor: RecursiveAstVisitor$1, + leadingComment: leadingComment, + jsDocComment: jsDocComment, + variable: variable, + importExpr: importExpr, + importType: importType, + expressionType: expressionType, + transplantedType: transplantedType, + typeofExpr: typeofExpr, + literalArr: literalArr, + literalMap: literalMap, + unary: unary, + not: not, + fn: fn, + arrowFn: arrowFn, + ifStmt: ifStmt, + taggedTemplate: taggedTemplate, + literal: literal, + localizedString: localizedString, + isNull: isNull +}); +const CONSTANT_PREFIX = '_c'; +/** + * `ConstantPool` tries to reuse literal factories when two or more literals are identical. + * We determine whether literals are identical by creating a key out of their AST using the + * `KeyVisitor`. This constant is used to replace dynamic expressions which can't be safely + * converted into a key. E.g. given an expression `{foo: bar()}`, since we don't know what + * the result of `bar` will be, we create a key that looks like `{foo: }`. Note + * that we use a variable, rather than something like `null` in order to avoid collisions. + */ +const UNKNOWN_VALUE_KEY = variable(''); +/** + * Context to use when producing a key. + * + * This ensures we see the constant not the reference variable when producing + * a key. + */ +const KEY_CONTEXT = {}; +/** + * Generally all primitive values are excluded from the `ConstantPool`, but there is an exclusion + * for strings that reach a certain length threshold. This constant defines the length threshold for + * strings. + */ +const POOL_INCLUSION_LENGTH_THRESHOLD_FOR_STRINGS = 50; +/** + * A node that is a place-holder that allows the node to be replaced when the actual + * node is known. + * + * This allows the constant pool to change an expression from a direct reference to + * a constant to a shared constant. It returns a fix-up node that is later allowed to + * change the referenced expression. + */ +class FixupExpression extends Expression { + constructor(resolved) { + super(resolved.type); + this.resolved = resolved; + this.shared = false; + this.original = resolved; + } + visitExpression(visitor, context) { + if (context === KEY_CONTEXT) { + // When producing a key we want to traverse the constant not the + // variable used to refer to it. + return this.original.visitExpression(visitor, context); + } else { + return this.resolved.visitExpression(visitor, context); + } + } + isEquivalent(e) { + return e instanceof FixupExpression && this.resolved.isEquivalent(e.resolved); + } + isConstant() { + return true; + } + clone() { + throw new Error(`Not supported.`); + } + fixup(expression) { + this.resolved = expression; + this.shared = true; + } +} +/** + * A constant pool allows a code emitter to share constant in an output context. + * + * The constant pool also supports sharing access to ivy definitions references. + */ +class ConstantPool { + constructor(isClosureCompilerEnabled = false) { + this.isClosureCompilerEnabled = isClosureCompilerEnabled; + this.statements = []; + this.literals = new Map(); + this.literalFactories = new Map(); + this.sharedConstants = new Map(); + /** + * Constant pool also tracks claimed names from {@link uniqueName}. + * This is useful to avoid collisions if variables are intended to be + * named a certain way- but may conflict. We wouldn't want to always suffix + * them with unique numbers. + */ + this._claimedNames = new Map(); + this.nextNameIndex = 0; + } + getConstLiteral(literal, forceShared) { + if (literal instanceof LiteralExpr && !isLongStringLiteral(literal) || literal instanceof FixupExpression) { + // Do no put simple literals into the constant pool or try to produce a constant for a + // reference to a constant. + return literal; + } + const key = GenericKeyFn.INSTANCE.keyOf(literal); + let fixup = this.literals.get(key); + let newValue = false; + if (!fixup) { + fixup = new FixupExpression(literal); + this.literals.set(key, fixup); + newValue = true; + } + if (!newValue && !fixup.shared || newValue && forceShared) { + // Replace the expression with a variable + const name = this.freshName(); + let definition; + let usage; + if (this.isClosureCompilerEnabled && isLongStringLiteral(literal)) { + // For string literals, Closure will **always** inline the string at + // **all** usages, duplicating it each time. For large strings, this + // unnecessarily bloats bundle size. To work around this restriction, we + // wrap the string in a function, and call that function for each usage. + // This tricks Closure into using inline logic for functions instead of + // string literals. Function calls are only inlined if the body is small + // enough to be worth it. By doing this, very large strings will be + // shared across multiple usages, rather than duplicating the string at + // each usage site. + // + // const myStr = function() { return "very very very long string"; }; + // const usage1 = myStr(); + // const usage2 = myStr(); + definition = variable(name).set(new FunctionExpr([], + // Params. + [ + // Statements. + new ReturnStatement(literal)])); + usage = variable(name).callFn([]); + } else { + // Just declare and use the variable directly, without a function call + // indirection. This saves a few bytes and avoids an unnecessary call. + definition = variable(name).set(literal); + usage = variable(name); + } + this.statements.push(definition.toDeclStmt(INFERRED_TYPE, StmtModifier.Final)); + fixup.fixup(usage); + } + return fixup; + } + getSharedConstant(def, expr) { + const key = def.keyOf(expr); + if (!this.sharedConstants.has(key)) { + const id = this.freshName(); + this.sharedConstants.set(key, variable(id)); + this.statements.push(def.toSharedConstantDeclaration(id, expr)); + } + return this.sharedConstants.get(key); + } + getLiteralFactory(literal) { + // Create a pure function that builds an array of a mix of constant and variable expressions + if (literal instanceof LiteralArrayExpr) { + const argumentsForKey = literal.entries.map(e => e.isConstant() ? e : UNKNOWN_VALUE_KEY); + const key = GenericKeyFn.INSTANCE.keyOf(literalArr(argumentsForKey)); + return this._getLiteralFactory(key, literal.entries, entries => literalArr(entries)); + } else { + const expressionForKey = literalMap(literal.entries.map(e => ({ + key: e.key, + value: e.value.isConstant() ? e.value : UNKNOWN_VALUE_KEY, + quoted: e.quoted + }))); + const key = GenericKeyFn.INSTANCE.keyOf(expressionForKey); + return this._getLiteralFactory(key, literal.entries.map(e => e.value), entries => literalMap(entries.map((value, index) => ({ + key: literal.entries[index].key, + value, + quoted: literal.entries[index].quoted + })))); + } + } + // TODO: useUniqueName(false) is necessary for naming compatibility with + // TemplateDefinitionBuilder, but should be removed once Template Pipeline is the default. + getSharedFunctionReference(fn, prefix, useUniqueName = true) { + const isArrow = fn instanceof ArrowFunctionExpr; + for (const current of this.statements) { + // Arrow functions are saved as variables so we check if the + // value of the variable is the same as the arrow function. + if (isArrow && current instanceof DeclareVarStmt && current.value?.isEquivalent(fn)) { + return variable(current.name); + } + // Function declarations are saved as function statements + // so we compare them directly to the passed-in function. + if (!isArrow && current instanceof DeclareFunctionStmt && fn instanceof FunctionExpr && fn.isEquivalent(current)) { + return variable(current.name); + } + } + // Otherwise declare the function. + const name = useUniqueName ? this.uniqueName(prefix) : prefix; + this.statements.push(fn instanceof FunctionExpr ? fn.toDeclStmt(name, StmtModifier.Final) : new DeclareVarStmt(name, fn, INFERRED_TYPE, StmtModifier.Final, fn.sourceSpan)); + return variable(name); + } + _getLiteralFactory(key, values, resultMap) { + let literalFactory = this.literalFactories.get(key); + const literalFactoryArguments = values.filter(e => !e.isConstant()); + if (!literalFactory) { + const resultExpressions = values.map((e, index) => e.isConstant() ? this.getConstLiteral(e, true) : variable(`a${index}`)); + const parameters = resultExpressions.filter(isVariable).map(e => new FnParam(e.name, DYNAMIC_TYPE)); + const pureFunctionDeclaration = arrowFn(parameters, resultMap(resultExpressions), INFERRED_TYPE); + const name = this.freshName(); + this.statements.push(variable(name).set(pureFunctionDeclaration).toDeclStmt(INFERRED_TYPE, StmtModifier.Final)); + literalFactory = variable(name); + this.literalFactories.set(key, literalFactory); + } + return { + literalFactory, + literalFactoryArguments + }; + } + /** + * Produce a unique name in the context of this pool. + * + * The name might be unique among different prefixes if any of the prefixes end in + * a digit so the prefix should be a constant string (not based on user input) and + * must not end in a digit. + */ + uniqueName(name, alwaysIncludeSuffix = true) { + const count = this._claimedNames.get(name) ?? 0; + const result = count === 0 && !alwaysIncludeSuffix ? `${name}` : `${name}${count}`; + this._claimedNames.set(name, count + 1); + return result; + } + freshName() { + return this.uniqueName(CONSTANT_PREFIX); + } +} +class GenericKeyFn { + static { + this.INSTANCE = new GenericKeyFn(); + } + keyOf(expr) { + if (expr instanceof LiteralExpr && typeof expr.value === 'string') { + return `"${expr.value}"`; + } else if (expr instanceof LiteralExpr) { + return String(expr.value); + } else if (expr instanceof LiteralArrayExpr) { + const entries = []; + for (const entry of expr.entries) { + entries.push(this.keyOf(entry)); + } + return `[${entries.join(',')}]`; + } else if (expr instanceof LiteralMapExpr) { + const entries = []; + for (const entry of expr.entries) { + let key = entry.key; + if (entry.quoted) { + key = `"${key}"`; + } + entries.push(key + ':' + this.keyOf(entry.value)); + } + return `{${entries.join(',')}}`; + } else if (expr instanceof ExternalExpr) { + return `import("${expr.value.moduleName}", ${expr.value.name})`; + } else if (expr instanceof ReadVarExpr) { + return `read(${expr.name})`; + } else if (expr instanceof TypeofExpr) { + return `typeof(${this.keyOf(expr.expr)})`; + } else { + throw new Error(`${this.constructor.name} does not handle expressions of type ${expr.constructor.name}`); + } + } +} +function isVariable(e) { + return e instanceof ReadVarExpr; +} +function isLongStringLiteral(expr) { + return expr instanceof LiteralExpr && typeof expr.value === 'string' && expr.value.length >= POOL_INCLUSION_LENGTH_THRESHOLD_FOR_STRINGS; +} +const CORE = '@angular/core'; +class Identifiers { + /* Methods */ + static { + this.NEW_METHOD = 'factory'; + } + static { + this.TRANSFORM_METHOD = 'transform'; + } + static { + this.PATCH_DEPS = 'patchedDeps'; + } + static { + this.core = { + name: null, + moduleName: CORE + }; + } + /* Instructions */ + static { + this.namespaceHTML = { + name: 'ɵɵnamespaceHTML', + moduleName: CORE + }; + } + static { + this.namespaceMathML = { + name: 'ɵɵnamespaceMathML', + moduleName: CORE + }; + } + static { + this.namespaceSVG = { + name: 'ɵɵnamespaceSVG', + moduleName: CORE + }; + } + static { + this.element = { + name: 'ɵɵelement', + moduleName: CORE + }; + } + static { + this.elementStart = { + name: 'ɵɵelementStart', + moduleName: CORE + }; + } + static { + this.elementEnd = { + name: 'ɵɵelementEnd', + moduleName: CORE + }; + } + static { + this.advance = { + name: 'ɵɵadvance', + moduleName: CORE + }; + } + static { + this.syntheticHostProperty = { + name: 'ɵɵsyntheticHostProperty', + moduleName: CORE + }; + } + static { + this.syntheticHostListener = { + name: 'ɵɵsyntheticHostListener', + moduleName: CORE + }; + } + static { + this.attribute = { + name: 'ɵɵattribute', + moduleName: CORE + }; + } + static { + this.attributeInterpolate1 = { + name: 'ɵɵattributeInterpolate1', + moduleName: CORE + }; + } + static { + this.attributeInterpolate2 = { + name: 'ɵɵattributeInterpolate2', + moduleName: CORE + }; + } + static { + this.attributeInterpolate3 = { + name: 'ɵɵattributeInterpolate3', + moduleName: CORE + }; + } + static { + this.attributeInterpolate4 = { + name: 'ɵɵattributeInterpolate4', + moduleName: CORE + }; + } + static { + this.attributeInterpolate5 = { + name: 'ɵɵattributeInterpolate5', + moduleName: CORE + }; + } + static { + this.attributeInterpolate6 = { + name: 'ɵɵattributeInterpolate6', + moduleName: CORE + }; + } + static { + this.attributeInterpolate7 = { + name: 'ɵɵattributeInterpolate7', + moduleName: CORE + }; + } + static { + this.attributeInterpolate8 = { + name: 'ɵɵattributeInterpolate8', + moduleName: CORE + }; + } + static { + this.attributeInterpolateV = { + name: 'ɵɵattributeInterpolateV', + moduleName: CORE + }; + } + static { + this.classProp = { + name: 'ɵɵclassProp', + moduleName: CORE + }; + } + static { + this.elementContainerStart = { + name: 'ɵɵelementContainerStart', + moduleName: CORE + }; + } + static { + this.elementContainerEnd = { + name: 'ɵɵelementContainerEnd', + moduleName: CORE + }; + } + static { + this.elementContainer = { + name: 'ɵɵelementContainer', + moduleName: CORE + }; + } + static { + this.styleMap = { + name: 'ɵɵstyleMap', + moduleName: CORE + }; + } + static { + this.styleMapInterpolate1 = { + name: 'ɵɵstyleMapInterpolate1', + moduleName: CORE + }; + } + static { + this.styleMapInterpolate2 = { + name: 'ɵɵstyleMapInterpolate2', + moduleName: CORE + }; + } + static { + this.styleMapInterpolate3 = { + name: 'ɵɵstyleMapInterpolate3', + moduleName: CORE + }; + } + static { + this.styleMapInterpolate4 = { + name: 'ɵɵstyleMapInterpolate4', + moduleName: CORE + }; + } + static { + this.styleMapInterpolate5 = { + name: 'ɵɵstyleMapInterpolate5', + moduleName: CORE + }; + } + static { + this.styleMapInterpolate6 = { + name: 'ɵɵstyleMapInterpolate6', + moduleName: CORE + }; + } + static { + this.styleMapInterpolate7 = { + name: 'ɵɵstyleMapInterpolate7', + moduleName: CORE + }; + } + static { + this.styleMapInterpolate8 = { + name: 'ɵɵstyleMapInterpolate8', + moduleName: CORE + }; + } + static { + this.styleMapInterpolateV = { + name: 'ɵɵstyleMapInterpolateV', + moduleName: CORE + }; + } + static { + this.classMap = { + name: 'ɵɵclassMap', + moduleName: CORE + }; + } + static { + this.classMapInterpolate1 = { + name: 'ɵɵclassMapInterpolate1', + moduleName: CORE + }; + } + static { + this.classMapInterpolate2 = { + name: 'ɵɵclassMapInterpolate2', + moduleName: CORE + }; + } + static { + this.classMapInterpolate3 = { + name: 'ɵɵclassMapInterpolate3', + moduleName: CORE + }; + } + static { + this.classMapInterpolate4 = { + name: 'ɵɵclassMapInterpolate4', + moduleName: CORE + }; + } + static { + this.classMapInterpolate5 = { + name: 'ɵɵclassMapInterpolate5', + moduleName: CORE + }; + } + static { + this.classMapInterpolate6 = { + name: 'ɵɵclassMapInterpolate6', + moduleName: CORE + }; + } + static { + this.classMapInterpolate7 = { + name: 'ɵɵclassMapInterpolate7', + moduleName: CORE + }; + } + static { + this.classMapInterpolate8 = { + name: 'ɵɵclassMapInterpolate8', + moduleName: CORE + }; + } + static { + this.classMapInterpolateV = { + name: 'ɵɵclassMapInterpolateV', + moduleName: CORE + }; + } + static { + this.styleProp = { + name: 'ɵɵstyleProp', + moduleName: CORE + }; + } + static { + this.stylePropInterpolate1 = { + name: 'ɵɵstylePropInterpolate1', + moduleName: CORE + }; + } + static { + this.stylePropInterpolate2 = { + name: 'ɵɵstylePropInterpolate2', + moduleName: CORE + }; + } + static { + this.stylePropInterpolate3 = { + name: 'ɵɵstylePropInterpolate3', + moduleName: CORE + }; + } + static { + this.stylePropInterpolate4 = { + name: 'ɵɵstylePropInterpolate4', + moduleName: CORE + }; + } + static { + this.stylePropInterpolate5 = { + name: 'ɵɵstylePropInterpolate5', + moduleName: CORE + }; + } + static { + this.stylePropInterpolate6 = { + name: 'ɵɵstylePropInterpolate6', + moduleName: CORE + }; + } + static { + this.stylePropInterpolate7 = { + name: 'ɵɵstylePropInterpolate7', + moduleName: CORE + }; + } + static { + this.stylePropInterpolate8 = { + name: 'ɵɵstylePropInterpolate8', + moduleName: CORE + }; + } + static { + this.stylePropInterpolateV = { + name: 'ɵɵstylePropInterpolateV', + moduleName: CORE + }; + } + static { + this.nextContext = { + name: 'ɵɵnextContext', + moduleName: CORE + }; + } + static { + this.resetView = { + name: 'ɵɵresetView', + moduleName: CORE + }; + } + static { + this.templateCreate = { + name: 'ɵɵtemplate', + moduleName: CORE + }; + } + static { + this.defer = { + name: 'ɵɵdefer', + moduleName: CORE + }; + } + static { + this.deferWhen = { + name: 'ɵɵdeferWhen', + moduleName: CORE + }; + } + static { + this.deferOnIdle = { + name: 'ɵɵdeferOnIdle', + moduleName: CORE + }; + } + static { + this.deferOnImmediate = { + name: 'ɵɵdeferOnImmediate', + moduleName: CORE + }; + } + static { + this.deferOnTimer = { + name: 'ɵɵdeferOnTimer', + moduleName: CORE + }; + } + static { + this.deferOnHover = { + name: 'ɵɵdeferOnHover', + moduleName: CORE + }; + } + static { + this.deferOnInteraction = { + name: 'ɵɵdeferOnInteraction', + moduleName: CORE + }; + } + static { + this.deferOnViewport = { + name: 'ɵɵdeferOnViewport', + moduleName: CORE + }; + } + static { + this.deferPrefetchWhen = { + name: 'ɵɵdeferPrefetchWhen', + moduleName: CORE + }; + } + static { + this.deferPrefetchOnIdle = { + name: 'ɵɵdeferPrefetchOnIdle', + moduleName: CORE + }; + } + static { + this.deferPrefetchOnImmediate = { + name: 'ɵɵdeferPrefetchOnImmediate', + moduleName: CORE + }; + } + static { + this.deferPrefetchOnTimer = { + name: 'ɵɵdeferPrefetchOnTimer', + moduleName: CORE + }; + } + static { + this.deferPrefetchOnHover = { + name: 'ɵɵdeferPrefetchOnHover', + moduleName: CORE + }; + } + static { + this.deferPrefetchOnInteraction = { + name: 'ɵɵdeferPrefetchOnInteraction', + moduleName: CORE + }; + } + static { + this.deferPrefetchOnViewport = { + name: 'ɵɵdeferPrefetchOnViewport', + moduleName: CORE + }; + } + static { + this.deferEnableTimerScheduling = { + name: 'ɵɵdeferEnableTimerScheduling', + moduleName: CORE + }; + } + static { + this.conditional = { + name: 'ɵɵconditional', + moduleName: CORE + }; + } + static { + this.repeater = { + name: 'ɵɵrepeater', + moduleName: CORE + }; + } + static { + this.repeaterCreate = { + name: 'ɵɵrepeaterCreate', + moduleName: CORE + }; + } + static { + this.repeaterTrackByIndex = { + name: 'ɵɵrepeaterTrackByIndex', + moduleName: CORE + }; + } + static { + this.repeaterTrackByIdentity = { + name: 'ɵɵrepeaterTrackByIdentity', + moduleName: CORE + }; + } + static { + this.componentInstance = { + name: 'ɵɵcomponentInstance', + moduleName: CORE + }; + } + static { + this.text = { + name: 'ɵɵtext', + moduleName: CORE + }; + } + static { + this.enableBindings = { + name: 'ɵɵenableBindings', + moduleName: CORE + }; + } + static { + this.disableBindings = { + name: 'ɵɵdisableBindings', + moduleName: CORE + }; + } + static { + this.getCurrentView = { + name: 'ɵɵgetCurrentView', + moduleName: CORE + }; + } + static { + this.textInterpolate = { + name: 'ɵɵtextInterpolate', + moduleName: CORE + }; + } + static { + this.textInterpolate1 = { + name: 'ɵɵtextInterpolate1', + moduleName: CORE + }; + } + static { + this.textInterpolate2 = { + name: 'ɵɵtextInterpolate2', + moduleName: CORE + }; + } + static { + this.textInterpolate3 = { + name: 'ɵɵtextInterpolate3', + moduleName: CORE + }; + } + static { + this.textInterpolate4 = { + name: 'ɵɵtextInterpolate4', + moduleName: CORE + }; + } + static { + this.textInterpolate5 = { + name: 'ɵɵtextInterpolate5', + moduleName: CORE + }; + } + static { + this.textInterpolate6 = { + name: 'ɵɵtextInterpolate6', + moduleName: CORE + }; + } + static { + this.textInterpolate7 = { + name: 'ɵɵtextInterpolate7', + moduleName: CORE + }; + } + static { + this.textInterpolate8 = { + name: 'ɵɵtextInterpolate8', + moduleName: CORE + }; + } + static { + this.textInterpolateV = { + name: 'ɵɵtextInterpolateV', + moduleName: CORE + }; + } + static { + this.restoreView = { + name: 'ɵɵrestoreView', + moduleName: CORE + }; + } + static { + this.pureFunction0 = { + name: 'ɵɵpureFunction0', + moduleName: CORE + }; + } + static { + this.pureFunction1 = { + name: 'ɵɵpureFunction1', + moduleName: CORE + }; + } + static { + this.pureFunction2 = { + name: 'ɵɵpureFunction2', + moduleName: CORE + }; + } + static { + this.pureFunction3 = { + name: 'ɵɵpureFunction3', + moduleName: CORE + }; + } + static { + this.pureFunction4 = { + name: 'ɵɵpureFunction4', + moduleName: CORE + }; + } + static { + this.pureFunction5 = { + name: 'ɵɵpureFunction5', + moduleName: CORE + }; + } + static { + this.pureFunction6 = { + name: 'ɵɵpureFunction6', + moduleName: CORE + }; + } + static { + this.pureFunction7 = { + name: 'ɵɵpureFunction7', + moduleName: CORE + }; + } + static { + this.pureFunction8 = { + name: 'ɵɵpureFunction8', + moduleName: CORE + }; + } + static { + this.pureFunctionV = { + name: 'ɵɵpureFunctionV', + moduleName: CORE + }; + } + static { + this.pipeBind1 = { + name: 'ɵɵpipeBind1', + moduleName: CORE + }; + } + static { + this.pipeBind2 = { + name: 'ɵɵpipeBind2', + moduleName: CORE + }; + } + static { + this.pipeBind3 = { + name: 'ɵɵpipeBind3', + moduleName: CORE + }; + } + static { + this.pipeBind4 = { + name: 'ɵɵpipeBind4', + moduleName: CORE + }; + } + static { + this.pipeBindV = { + name: 'ɵɵpipeBindV', + moduleName: CORE + }; + } + static { + this.hostProperty = { + name: 'ɵɵhostProperty', + moduleName: CORE + }; + } + static { + this.property = { + name: 'ɵɵproperty', + moduleName: CORE + }; + } + static { + this.propertyInterpolate = { + name: 'ɵɵpropertyInterpolate', + moduleName: CORE + }; + } + static { + this.propertyInterpolate1 = { + name: 'ɵɵpropertyInterpolate1', + moduleName: CORE + }; + } + static { + this.propertyInterpolate2 = { + name: 'ɵɵpropertyInterpolate2', + moduleName: CORE + }; + } + static { + this.propertyInterpolate3 = { + name: 'ɵɵpropertyInterpolate3', + moduleName: CORE + }; + } + static { + this.propertyInterpolate4 = { + name: 'ɵɵpropertyInterpolate4', + moduleName: CORE + }; + } + static { + this.propertyInterpolate5 = { + name: 'ɵɵpropertyInterpolate5', + moduleName: CORE + }; + } + static { + this.propertyInterpolate6 = { + name: 'ɵɵpropertyInterpolate6', + moduleName: CORE + }; + } + static { + this.propertyInterpolate7 = { + name: 'ɵɵpropertyInterpolate7', + moduleName: CORE + }; + } + static { + this.propertyInterpolate8 = { + name: 'ɵɵpropertyInterpolate8', + moduleName: CORE + }; + } + static { + this.propertyInterpolateV = { + name: 'ɵɵpropertyInterpolateV', + moduleName: CORE + }; + } + static { + this.i18n = { + name: 'ɵɵi18n', + moduleName: CORE + }; + } + static { + this.i18nAttributes = { + name: 'ɵɵi18nAttributes', + moduleName: CORE + }; + } + static { + this.i18nExp = { + name: 'ɵɵi18nExp', + moduleName: CORE + }; + } + static { + this.i18nStart = { + name: 'ɵɵi18nStart', + moduleName: CORE + }; + } + static { + this.i18nEnd = { + name: 'ɵɵi18nEnd', + moduleName: CORE + }; + } + static { + this.i18nApply = { + name: 'ɵɵi18nApply', + moduleName: CORE + }; + } + static { + this.i18nPostprocess = { + name: 'ɵɵi18nPostprocess', + moduleName: CORE + }; + } + static { + this.pipe = { + name: 'ɵɵpipe', + moduleName: CORE + }; + } + static { + this.projection = { + name: 'ɵɵprojection', + moduleName: CORE + }; + } + static { + this.projectionDef = { + name: 'ɵɵprojectionDef', + moduleName: CORE + }; + } + static { + this.reference = { + name: 'ɵɵreference', + moduleName: CORE + }; + } + static { + this.inject = { + name: 'ɵɵinject', + moduleName: CORE + }; + } + static { + this.injectAttribute = { + name: 'ɵɵinjectAttribute', + moduleName: CORE + }; + } + static { + this.directiveInject = { + name: 'ɵɵdirectiveInject', + moduleName: CORE + }; + } + static { + this.invalidFactory = { + name: 'ɵɵinvalidFactory', + moduleName: CORE + }; + } + static { + this.invalidFactoryDep = { + name: 'ɵɵinvalidFactoryDep', + moduleName: CORE + }; + } + static { + this.templateRefExtractor = { + name: 'ɵɵtemplateRefExtractor', + moduleName: CORE + }; + } + static { + this.forwardRef = { + name: 'forwardRef', + moduleName: CORE + }; + } + static { + this.resolveForwardRef = { + name: 'resolveForwardRef', + moduleName: CORE + }; + } + static { + this.ɵɵdefineInjectable = { + name: 'ɵɵdefineInjectable', + moduleName: CORE + }; + } + static { + this.declareInjectable = { + name: 'ɵɵngDeclareInjectable', + moduleName: CORE + }; + } + static { + this.InjectableDeclaration = { + name: 'ɵɵInjectableDeclaration', + moduleName: CORE + }; + } + static { + this.resolveWindow = { + name: 'ɵɵresolveWindow', + moduleName: CORE + }; + } + static { + this.resolveDocument = { + name: 'ɵɵresolveDocument', + moduleName: CORE + }; + } + static { + this.resolveBody = { + name: 'ɵɵresolveBody', + moduleName: CORE + }; + } + static { + this.getComponentDepsFactory = { + name: 'ɵɵgetComponentDepsFactory', + moduleName: CORE + }; + } + static { + this.defineComponent = { + name: 'ɵɵdefineComponent', + moduleName: CORE + }; + } + static { + this.declareComponent = { + name: 'ɵɵngDeclareComponent', + moduleName: CORE + }; + } + static { + this.setComponentScope = { + name: 'ɵɵsetComponentScope', + moduleName: CORE + }; + } + static { + this.ChangeDetectionStrategy = { + name: 'ChangeDetectionStrategy', + moduleName: CORE + }; + } + static { + this.ViewEncapsulation = { + name: 'ViewEncapsulation', + moduleName: CORE + }; + } + static { + this.ComponentDeclaration = { + name: 'ɵɵComponentDeclaration', + moduleName: CORE + }; + } + static { + this.FactoryDeclaration = { + name: 'ɵɵFactoryDeclaration', + moduleName: CORE + }; + } + static { + this.declareFactory = { + name: 'ɵɵngDeclareFactory', + moduleName: CORE + }; + } + static { + this.FactoryTarget = { + name: 'ɵɵFactoryTarget', + moduleName: CORE + }; + } + static { + this.defineDirective = { + name: 'ɵɵdefineDirective', + moduleName: CORE + }; + } + static { + this.declareDirective = { + name: 'ɵɵngDeclareDirective', + moduleName: CORE + }; + } + static { + this.DirectiveDeclaration = { + name: 'ɵɵDirectiveDeclaration', + moduleName: CORE + }; + } + static { + this.InjectorDef = { + name: 'ɵɵInjectorDef', + moduleName: CORE + }; + } + static { + this.InjectorDeclaration = { + name: 'ɵɵInjectorDeclaration', + moduleName: CORE + }; + } + static { + this.defineInjector = { + name: 'ɵɵdefineInjector', + moduleName: CORE + }; + } + static { + this.declareInjector = { + name: 'ɵɵngDeclareInjector', + moduleName: CORE + }; + } + static { + this.NgModuleDeclaration = { + name: 'ɵɵNgModuleDeclaration', + moduleName: CORE + }; + } + static { + this.ModuleWithProviders = { + name: 'ModuleWithProviders', + moduleName: CORE + }; + } + static { + this.defineNgModule = { + name: 'ɵɵdefineNgModule', + moduleName: CORE + }; + } + static { + this.declareNgModule = { + name: 'ɵɵngDeclareNgModule', + moduleName: CORE + }; + } + static { + this.setNgModuleScope = { + name: 'ɵɵsetNgModuleScope', + moduleName: CORE + }; + } + static { + this.registerNgModuleType = { + name: 'ɵɵregisterNgModuleType', + moduleName: CORE + }; + } + static { + this.PipeDeclaration = { + name: 'ɵɵPipeDeclaration', + moduleName: CORE + }; + } + static { + this.definePipe = { + name: 'ɵɵdefinePipe', + moduleName: CORE + }; + } + static { + this.declarePipe = { + name: 'ɵɵngDeclarePipe', + moduleName: CORE + }; + } + static { + this.declareClassMetadata = { + name: 'ɵɵngDeclareClassMetadata', + moduleName: CORE + }; + } + static { + this.declareClassMetadataAsync = { + name: 'ɵɵngDeclareClassMetadataAsync', + moduleName: CORE + }; + } + static { + this.setClassMetadata = { + name: 'ɵsetClassMetadata', + moduleName: CORE + }; + } + static { + this.setClassMetadataAsync = { + name: 'ɵsetClassMetadataAsync', + moduleName: CORE + }; + } + static { + this.setClassDebugInfo = { + name: 'ɵsetClassDebugInfo', + moduleName: CORE + }; + } + static { + this.queryRefresh = { + name: 'ɵɵqueryRefresh', + moduleName: CORE + }; + } + static { + this.viewQuery = { + name: 'ɵɵviewQuery', + moduleName: CORE + }; + } + static { + this.loadQuery = { + name: 'ɵɵloadQuery', + moduleName: CORE + }; + } + static { + this.contentQuery = { + name: 'ɵɵcontentQuery', + moduleName: CORE + }; + } + // Signal queries + static { + this.viewQuerySignal = { + name: 'ɵɵviewQuerySignal', + moduleName: CORE + }; + } + static { + this.contentQuerySignal = { + name: 'ɵɵcontentQuerySignal', + moduleName: CORE + }; + } + static { + this.queryAdvance = { + name: 'ɵɵqueryAdvance', + moduleName: CORE + }; + } + // Two-way bindings + static { + this.twoWayProperty = { + name: 'ɵɵtwoWayProperty', + moduleName: CORE + }; + } + static { + this.twoWayBindingSet = { + name: 'ɵɵtwoWayBindingSet', + moduleName: CORE + }; + } + static { + this.twoWayListener = { + name: 'ɵɵtwoWayListener', + moduleName: CORE + }; + } + static { + this.declareLet = { + name: 'ɵɵdeclareLet', + moduleName: CORE + }; + } + static { + this.storeLet = { + name: 'ɵɵstoreLet', + moduleName: CORE + }; + } + static { + this.readContextLet = { + name: 'ɵɵreadContextLet', + moduleName: CORE + }; + } + static { + this.NgOnChangesFeature = { + name: 'ɵɵNgOnChangesFeature', + moduleName: CORE + }; + } + static { + this.InheritDefinitionFeature = { + name: 'ɵɵInheritDefinitionFeature', + moduleName: CORE + }; + } + static { + this.CopyDefinitionFeature = { + name: 'ɵɵCopyDefinitionFeature', + moduleName: CORE + }; + } + static { + this.StandaloneFeature = { + name: 'ɵɵStandaloneFeature', + moduleName: CORE + }; + } + static { + this.ProvidersFeature = { + name: 'ɵɵProvidersFeature', + moduleName: CORE + }; + } + static { + this.HostDirectivesFeature = { + name: 'ɵɵHostDirectivesFeature', + moduleName: CORE + }; + } + static { + this.InputTransformsFeatureFeature = { + name: 'ɵɵInputTransformsFeature', + moduleName: CORE + }; + } + static { + this.listener = { + name: 'ɵɵlistener', + moduleName: CORE + }; + } + static { + this.getInheritedFactory = { + name: 'ɵɵgetInheritedFactory', + moduleName: CORE + }; + } + // sanitization-related functions + static { + this.sanitizeHtml = { + name: 'ɵɵsanitizeHtml', + moduleName: CORE + }; + } + static { + this.sanitizeStyle = { + name: 'ɵɵsanitizeStyle', + moduleName: CORE + }; + } + static { + this.sanitizeResourceUrl = { + name: 'ɵɵsanitizeResourceUrl', + moduleName: CORE + }; + } + static { + this.sanitizeScript = { + name: 'ɵɵsanitizeScript', + moduleName: CORE + }; + } + static { + this.sanitizeUrl = { + name: 'ɵɵsanitizeUrl', + moduleName: CORE + }; + } + static { + this.sanitizeUrlOrResourceUrl = { + name: 'ɵɵsanitizeUrlOrResourceUrl', + moduleName: CORE + }; + } + static { + this.trustConstantHtml = { + name: 'ɵɵtrustConstantHtml', + moduleName: CORE + }; + } + static { + this.trustConstantResourceUrl = { + name: 'ɵɵtrustConstantResourceUrl', + moduleName: CORE + }; + } + static { + this.validateIframeAttribute = { + name: 'ɵɵvalidateIframeAttribute', + moduleName: CORE + }; + } + // type-checking + static { + this.InputSignalBrandWriteType = { + name: 'ɵINPUT_SIGNAL_BRAND_WRITE_TYPE', + moduleName: CORE + }; + } + static { + this.UnwrapDirectiveSignalInputs = { + name: 'ɵUnwrapDirectiveSignalInputs', + moduleName: CORE + }; + } + static { + this.unwrapWritableSignal = { + name: 'ɵunwrapWritableSignal', + moduleName: CORE + }; + } +} +const DASH_CASE_REGEXP = /-+([a-z0-9])/g; +function dashCaseToCamelCase(input) { + return input.replace(DASH_CASE_REGEXP, (...m) => m[1].toUpperCase()); +} +function splitAtColon(input, defaultValues) { + return _splitAt(input, ':', defaultValues); +} +function splitAtPeriod(input, defaultValues) { + return _splitAt(input, '.', defaultValues); +} +function _splitAt(input, character, defaultValues) { + const characterIndex = input.indexOf(character); + if (characterIndex == -1) return defaultValues; + return [input.slice(0, characterIndex).trim(), input.slice(characterIndex + 1).trim()]; +} +function noUndefined(val) { + return val === undefined ? null : val; +} +function error(msg) { + throw new Error(`Internal Error: ${msg}`); +} +// Escape characters that have a special meaning in Regular Expressions +function escapeRegExp(s) { + return s.replace(/([.*+?^=!:${}()|[\]\/\\])/g, '\\$1'); +} +function utf8Encode(str) { + let encoded = []; + for (let index = 0; index < str.length; index++) { + let codePoint = str.charCodeAt(index); + // decode surrogate + // see https://mathiasbynens.be/notes/javascript-encoding#surrogate-formulae + if (codePoint >= 0xd800 && codePoint <= 0xdbff && str.length > index + 1) { + const low = str.charCodeAt(index + 1); + if (low >= 0xdc00 && low <= 0xdfff) { + index++; + codePoint = (codePoint - 0xd800 << 10) + low - 0xdc00 + 0x10000; + } + } + if (codePoint <= 0x7f) { + encoded.push(codePoint); + } else if (codePoint <= 0x7ff) { + encoded.push(codePoint >> 6 & 0x1f | 0xc0, codePoint & 0x3f | 0x80); + } else if (codePoint <= 0xffff) { + encoded.push(codePoint >> 12 | 0xe0, codePoint >> 6 & 0x3f | 0x80, codePoint & 0x3f | 0x80); + } else if (codePoint <= 0x1fffff) { + encoded.push(codePoint >> 18 & 0x07 | 0xf0, codePoint >> 12 & 0x3f | 0x80, codePoint >> 6 & 0x3f | 0x80, codePoint & 0x3f | 0x80); + } + } + return encoded; +} +function stringify(token) { + if (typeof token === 'string') { + return token; + } + if (Array.isArray(token)) { + return '[' + token.map(stringify).join(', ') + ']'; + } + if (token == null) { + return '' + token; + } + if (token.overriddenName) { + return `${token.overriddenName}`; + } + if (token.name) { + return `${token.name}`; + } + if (!token.toString) { + return 'object'; + } + // WARNING: do not try to `JSON.stringify(token)` here + // see https://github.com/angular/angular/issues/23440 + const res = token.toString(); + if (res == null) { + return '' + res; + } + const newLineIndex = res.indexOf('\n'); + return newLineIndex === -1 ? res : res.substring(0, newLineIndex); +} +class Version { + constructor(full) { + this.full = full; + const splits = full.split('.'); + this.major = splits[0]; + this.minor = splits[1]; + this.patch = splits.slice(2).join('.'); + } +} +const _global = globalThis; +function newArray(size, value) { + const list = []; + for (let i = 0; i < size; i++) { + list.push(value); + } + return list; +} +/** + * Partitions a given array into 2 arrays, based on a boolean value returned by the condition + * function. + * + * @param arr Input array that should be partitioned + * @param conditionFn Condition function that is called for each item in a given array and returns a + * boolean value. + */ +function partitionArray(arr, conditionFn) { + const truthy = []; + const falsy = []; + for (const item of arr) { + (conditionFn(item) ? truthy : falsy).push(item); + } + return [truthy, falsy]; +} + +// https://docs.google.com/document/d/1U1RGAehQwRypUTovF1KRlpiOFze0b-_2gc6fAH0KY0k/edit +const VERSION$1 = 3; +const JS_B64_PREFIX = '# sourceMappingURL=data:application/json;base64,'; +class SourceMapGenerator { + constructor(file = null) { + this.file = file; + this.sourcesContent = new Map(); + this.lines = []; + this.lastCol0 = 0; + this.hasMappings = false; + } + // The content is `null` when the content is expected to be loaded using the URL + addSource(url, content = null) { + if (!this.sourcesContent.has(url)) { + this.sourcesContent.set(url, content); + } + return this; + } + addLine() { + this.lines.push([]); + this.lastCol0 = 0; + return this; + } + addMapping(col0, sourceUrl, sourceLine0, sourceCol0) { + if (!this.currentLine) { + throw new Error(`A line must be added before mappings can be added`); + } + if (sourceUrl != null && !this.sourcesContent.has(sourceUrl)) { + throw new Error(`Unknown source file "${sourceUrl}"`); + } + if (col0 == null) { + throw new Error(`The column in the generated code must be provided`); + } + if (col0 < this.lastCol0) { + throw new Error(`Mapping should be added in output order`); + } + if (sourceUrl && (sourceLine0 == null || sourceCol0 == null)) { + throw new Error(`The source location must be provided when a source url is provided`); + } + this.hasMappings = true; + this.lastCol0 = col0; + this.currentLine.push({ + col0, + sourceUrl, + sourceLine0, + sourceCol0 + }); + return this; + } + /** + * @internal strip this from published d.ts files due to + * https://github.com/microsoft/TypeScript/issues/36216 + */ + get currentLine() { + return this.lines.slice(-1)[0]; + } + toJSON() { + if (!this.hasMappings) { + return null; + } + const sourcesIndex = new Map(); + const sources = []; + const sourcesContent = []; + Array.from(this.sourcesContent.keys()).forEach((url, i) => { + sourcesIndex.set(url, i); + sources.push(url); + sourcesContent.push(this.sourcesContent.get(url) || null); + }); + let mappings = ''; + let lastCol0 = 0; + let lastSourceIndex = 0; + let lastSourceLine0 = 0; + let lastSourceCol0 = 0; + this.lines.forEach(segments => { + lastCol0 = 0; + mappings += segments.map(segment => { + // zero-based starting column of the line in the generated code + let segAsStr = toBase64VLQ(segment.col0 - lastCol0); + lastCol0 = segment.col0; + if (segment.sourceUrl != null) { + // zero-based index into the “sources” list + segAsStr += toBase64VLQ(sourcesIndex.get(segment.sourceUrl) - lastSourceIndex); + lastSourceIndex = sourcesIndex.get(segment.sourceUrl); + // the zero-based starting line in the original source + segAsStr += toBase64VLQ(segment.sourceLine0 - lastSourceLine0); + lastSourceLine0 = segment.sourceLine0; + // the zero-based starting column in the original source + segAsStr += toBase64VLQ(segment.sourceCol0 - lastSourceCol0); + lastSourceCol0 = segment.sourceCol0; + } + return segAsStr; + }).join(','); + mappings += ';'; + }); + mappings = mappings.slice(0, -1); + return { + 'file': this.file || '', + 'version': VERSION$1, + 'sourceRoot': '', + 'sources': sources, + 'sourcesContent': sourcesContent, + 'mappings': mappings + }; + } + toJsComment() { + return this.hasMappings ? '//' + JS_B64_PREFIX + toBase64String(JSON.stringify(this, null, 0)) : ''; + } +} +function toBase64String(value) { + let b64 = ''; + const encoded = utf8Encode(value); + for (let i = 0; i < encoded.length;) { + const i1 = encoded[i++]; + const i2 = i < encoded.length ? encoded[i++] : null; + const i3 = i < encoded.length ? encoded[i++] : null; + b64 += toBase64Digit(i1 >> 2); + b64 += toBase64Digit((i1 & 3) << 4 | (i2 === null ? 0 : i2 >> 4)); + b64 += i2 === null ? '=' : toBase64Digit((i2 & 15) << 2 | (i3 === null ? 0 : i3 >> 6)); + b64 += i2 === null || i3 === null ? '=' : toBase64Digit(i3 & 63); + } + return b64; +} +function toBase64VLQ(value) { + value = value < 0 ? (-value << 1) + 1 : value << 1; + let out = ''; + do { + let digit = value & 31; + value = value >> 5; + if (value > 0) { + digit = digit | 32; + } + out += toBase64Digit(digit); + } while (value > 0); + return out; +} +const B64_DIGITS = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'; +function toBase64Digit(value) { + if (value < 0 || value >= 64) { + throw new Error(`Can only encode value in the range [0, 63]`); + } + return B64_DIGITS[value]; +} +const _SINGLE_QUOTE_ESCAPE_STRING_RE = /'|\\|\n|\r|\$/g; +const _LEGAL_IDENTIFIER_RE = /^[$A-Z_][0-9A-Z_$]*$/i; +const _INDENT_WITH = ' '; +class _EmittedLine { + constructor(indent) { + this.indent = indent; + this.partsLength = 0; + this.parts = []; + this.srcSpans = []; + } +} +class EmitterVisitorContext { + static createRoot() { + return new EmitterVisitorContext(0); + } + constructor(_indent) { + this._indent = _indent; + this._lines = [new _EmittedLine(_indent)]; + } + /** + * @internal strip this from published d.ts files due to + * https://github.com/microsoft/TypeScript/issues/36216 + */ + get _currentLine() { + return this._lines[this._lines.length - 1]; + } + println(from, lastPart = '') { + this.print(from || null, lastPart, true); + } + lineIsEmpty() { + return this._currentLine.parts.length === 0; + } + lineLength() { + return this._currentLine.indent * _INDENT_WITH.length + this._currentLine.partsLength; + } + print(from, part, newLine = false) { + if (part.length > 0) { + this._currentLine.parts.push(part); + this._currentLine.partsLength += part.length; + this._currentLine.srcSpans.push(from && from.sourceSpan || null); + } + if (newLine) { + this._lines.push(new _EmittedLine(this._indent)); + } + } + removeEmptyLastLine() { + if (this.lineIsEmpty()) { + this._lines.pop(); + } + } + incIndent() { + this._indent++; + if (this.lineIsEmpty()) { + this._currentLine.indent = this._indent; + } + } + decIndent() { + this._indent--; + if (this.lineIsEmpty()) { + this._currentLine.indent = this._indent; + } + } + toSource() { + return this.sourceLines.map(l => l.parts.length > 0 ? _createIndent(l.indent) + l.parts.join('') : '').join('\n'); + } + toSourceMapGenerator(genFilePath, startsAtLine = 0) { + const map = new SourceMapGenerator(genFilePath); + let firstOffsetMapped = false; + const mapFirstOffsetIfNeeded = () => { + if (!firstOffsetMapped) { + // Add a single space so that tools won't try to load the file from disk. + // Note: We are using virtual urls like `ng:///`, so we have to + // provide a content here. + map.addSource(genFilePath, ' ').addMapping(0, genFilePath, 0, 0); + firstOffsetMapped = true; + } + }; + for (let i = 0; i < startsAtLine; i++) { + map.addLine(); + mapFirstOffsetIfNeeded(); + } + this.sourceLines.forEach((line, lineIdx) => { + map.addLine(); + const spans = line.srcSpans; + const parts = line.parts; + let col0 = line.indent * _INDENT_WITH.length; + let spanIdx = 0; + // skip leading parts without source spans + while (spanIdx < spans.length && !spans[spanIdx]) { + col0 += parts[spanIdx].length; + spanIdx++; + } + if (spanIdx < spans.length && lineIdx === 0 && col0 === 0) { + firstOffsetMapped = true; + } else { + mapFirstOffsetIfNeeded(); + } + while (spanIdx < spans.length) { + const span = spans[spanIdx]; + const source = span.start.file; + const sourceLine = span.start.line; + const sourceCol = span.start.col; + map.addSource(source.url, source.content).addMapping(col0, source.url, sourceLine, sourceCol); + col0 += parts[spanIdx].length; + spanIdx++; + // assign parts without span or the same span to the previous segment + while (spanIdx < spans.length && (span === spans[spanIdx] || !spans[spanIdx])) { + col0 += parts[spanIdx].length; + spanIdx++; + } + } + }); + return map; + } + spanOf(line, column) { + const emittedLine = this._lines[line]; + if (emittedLine) { + let columnsLeft = column - _createIndent(emittedLine.indent).length; + for (let partIndex = 0; partIndex < emittedLine.parts.length; partIndex++) { + const part = emittedLine.parts[partIndex]; + if (part.length > columnsLeft) { + return emittedLine.srcSpans[partIndex]; + } + columnsLeft -= part.length; + } + } + return null; + } + /** + * @internal strip this from published d.ts files due to + * https://github.com/microsoft/TypeScript/issues/36216 + */ + get sourceLines() { + if (this._lines.length && this._lines[this._lines.length - 1].parts.length === 0) { + return this._lines.slice(0, -1); + } + return this._lines; + } +} +class AbstractEmitterVisitor { + constructor(_escapeDollarInStrings) { + this._escapeDollarInStrings = _escapeDollarInStrings; + } + printLeadingComments(stmt, ctx) { + if (stmt.leadingComments === undefined) { + return; + } + for (const comment of stmt.leadingComments) { + if (comment instanceof JSDocComment) { + ctx.print(stmt, `/*${comment.toString()}*/`, comment.trailingNewline); + } else { + if (comment.multiline) { + ctx.print(stmt, `/* ${comment.text} */`, comment.trailingNewline); + } else { + comment.text.split('\n').forEach(line => { + ctx.println(stmt, `// ${line}`); + }); + } + } + } + } + visitExpressionStmt(stmt, ctx) { + this.printLeadingComments(stmt, ctx); + stmt.expr.visitExpression(this, ctx); + ctx.println(stmt, ';'); + return null; + } + visitReturnStmt(stmt, ctx) { + this.printLeadingComments(stmt, ctx); + ctx.print(stmt, `return `); + stmt.value.visitExpression(this, ctx); + ctx.println(stmt, ';'); + return null; + } + visitIfStmt(stmt, ctx) { + this.printLeadingComments(stmt, ctx); + ctx.print(stmt, `if (`); + stmt.condition.visitExpression(this, ctx); + ctx.print(stmt, `) {`); + const hasElseCase = stmt.falseCase != null && stmt.falseCase.length > 0; + if (stmt.trueCase.length <= 1 && !hasElseCase) { + ctx.print(stmt, ` `); + this.visitAllStatements(stmt.trueCase, ctx); + ctx.removeEmptyLastLine(); + ctx.print(stmt, ` `); + } else { + ctx.println(); + ctx.incIndent(); + this.visitAllStatements(stmt.trueCase, ctx); + ctx.decIndent(); + if (hasElseCase) { + ctx.println(stmt, `} else {`); + ctx.incIndent(); + this.visitAllStatements(stmt.falseCase, ctx); + ctx.decIndent(); + } + } + ctx.println(stmt, `}`); + return null; + } + visitWriteVarExpr(expr, ctx) { + const lineWasEmpty = ctx.lineIsEmpty(); + if (!lineWasEmpty) { + ctx.print(expr, '('); + } + ctx.print(expr, `${expr.name} = `); + expr.value.visitExpression(this, ctx); + if (!lineWasEmpty) { + ctx.print(expr, ')'); + } + return null; + } + visitWriteKeyExpr(expr, ctx) { + const lineWasEmpty = ctx.lineIsEmpty(); + if (!lineWasEmpty) { + ctx.print(expr, '('); + } + expr.receiver.visitExpression(this, ctx); + ctx.print(expr, `[`); + expr.index.visitExpression(this, ctx); + ctx.print(expr, `] = `); + expr.value.visitExpression(this, ctx); + if (!lineWasEmpty) { + ctx.print(expr, ')'); + } + return null; + } + visitWritePropExpr(expr, ctx) { + const lineWasEmpty = ctx.lineIsEmpty(); + if (!lineWasEmpty) { + ctx.print(expr, '('); + } + expr.receiver.visitExpression(this, ctx); + ctx.print(expr, `.${expr.name} = `); + expr.value.visitExpression(this, ctx); + if (!lineWasEmpty) { + ctx.print(expr, ')'); + } + return null; + } + visitInvokeFunctionExpr(expr, ctx) { + const shouldParenthesize = expr.fn instanceof ArrowFunctionExpr; + if (shouldParenthesize) { + ctx.print(expr.fn, '('); + } + expr.fn.visitExpression(this, ctx); + if (shouldParenthesize) { + ctx.print(expr.fn, ')'); + } + ctx.print(expr, `(`); + this.visitAllExpressions(expr.args, ctx, ','); + ctx.print(expr, `)`); + return null; + } + visitTaggedTemplateExpr(expr, ctx) { + expr.tag.visitExpression(this, ctx); + ctx.print(expr, '`' + expr.template.elements[0].rawText); + for (let i = 1; i < expr.template.elements.length; i++) { + ctx.print(expr, '${'); + expr.template.expressions[i - 1].visitExpression(this, ctx); + ctx.print(expr, `}${expr.template.elements[i].rawText}`); + } + ctx.print(expr, '`'); + return null; + } + visitWrappedNodeExpr(ast, ctx) { + throw new Error('Abstract emitter cannot visit WrappedNodeExpr.'); + } + visitTypeofExpr(expr, ctx) { + ctx.print(expr, 'typeof '); + expr.expr.visitExpression(this, ctx); + } + visitReadVarExpr(ast, ctx) { + ctx.print(ast, ast.name); + return null; + } + visitInstantiateExpr(ast, ctx) { + ctx.print(ast, `new `); + ast.classExpr.visitExpression(this, ctx); + ctx.print(ast, `(`); + this.visitAllExpressions(ast.args, ctx, ','); + ctx.print(ast, `)`); + return null; + } + visitLiteralExpr(ast, ctx) { + const value = ast.value; + if (typeof value === 'string') { + ctx.print(ast, escapeIdentifier(value, this._escapeDollarInStrings)); + } else { + ctx.print(ast, `${value}`); + } + return null; + } + visitLocalizedString(ast, ctx) { + const head = ast.serializeI18nHead(); + ctx.print(ast, '$localize `' + head.raw); + for (let i = 1; i < ast.messageParts.length; i++) { + ctx.print(ast, '${'); + ast.expressions[i - 1].visitExpression(this, ctx); + ctx.print(ast, `}${ast.serializeI18nTemplatePart(i).raw}`); + } + ctx.print(ast, '`'); + return null; + } + visitConditionalExpr(ast, ctx) { + ctx.print(ast, `(`); + ast.condition.visitExpression(this, ctx); + ctx.print(ast, '? '); + ast.trueCase.visitExpression(this, ctx); + ctx.print(ast, ': '); + ast.falseCase.visitExpression(this, ctx); + ctx.print(ast, `)`); + return null; + } + visitDynamicImportExpr(ast, ctx) { + ctx.print(ast, `import(${ast.url})`); + } + visitNotExpr(ast, ctx) { + ctx.print(ast, '!'); + ast.condition.visitExpression(this, ctx); + return null; + } + visitUnaryOperatorExpr(ast, ctx) { + let opStr; + switch (ast.operator) { + case UnaryOperator.Plus: + opStr = '+'; + break; + case UnaryOperator.Minus: + opStr = '-'; + break; + default: + throw new Error(`Unknown operator ${ast.operator}`); + } + if (ast.parens) ctx.print(ast, `(`); + ctx.print(ast, opStr); + ast.expr.visitExpression(this, ctx); + if (ast.parens) ctx.print(ast, `)`); + return null; + } + visitBinaryOperatorExpr(ast, ctx) { + let opStr; + switch (ast.operator) { + case BinaryOperator.Equals: + opStr = '=='; + break; + case BinaryOperator.Identical: + opStr = '==='; + break; + case BinaryOperator.NotEquals: + opStr = '!='; + break; + case BinaryOperator.NotIdentical: + opStr = '!=='; + break; + case BinaryOperator.And: + opStr = '&&'; + break; + case BinaryOperator.BitwiseOr: + opStr = '|'; + break; + case BinaryOperator.BitwiseAnd: + opStr = '&'; + break; + case BinaryOperator.Or: + opStr = '||'; + break; + case BinaryOperator.Plus: + opStr = '+'; + break; + case BinaryOperator.Minus: + opStr = '-'; + break; + case BinaryOperator.Divide: + opStr = '/'; + break; + case BinaryOperator.Multiply: + opStr = '*'; + break; + case BinaryOperator.Modulo: + opStr = '%'; + break; + case BinaryOperator.Lower: + opStr = '<'; + break; + case BinaryOperator.LowerEquals: + opStr = '<='; + break; + case BinaryOperator.Bigger: + opStr = '>'; + break; + case BinaryOperator.BiggerEquals: + opStr = '>='; + break; + case BinaryOperator.NullishCoalesce: + opStr = '??'; + break; + default: + throw new Error(`Unknown operator ${ast.operator}`); + } + if (ast.parens) ctx.print(ast, `(`); + ast.lhs.visitExpression(this, ctx); + ctx.print(ast, ` ${opStr} `); + ast.rhs.visitExpression(this, ctx); + if (ast.parens) ctx.print(ast, `)`); + return null; + } + visitReadPropExpr(ast, ctx) { + ast.receiver.visitExpression(this, ctx); + ctx.print(ast, `.`); + ctx.print(ast, ast.name); + return null; + } + visitReadKeyExpr(ast, ctx) { + ast.receiver.visitExpression(this, ctx); + ctx.print(ast, `[`); + ast.index.visitExpression(this, ctx); + ctx.print(ast, `]`); + return null; + } + visitLiteralArrayExpr(ast, ctx) { + ctx.print(ast, `[`); + this.visitAllExpressions(ast.entries, ctx, ','); + ctx.print(ast, `]`); + return null; + } + visitLiteralMapExpr(ast, ctx) { + ctx.print(ast, `{`); + this.visitAllObjects(entry => { + ctx.print(ast, `${escapeIdentifier(entry.key, this._escapeDollarInStrings, entry.quoted)}:`); + entry.value.visitExpression(this, ctx); + }, ast.entries, ctx, ','); + ctx.print(ast, `}`); + return null; + } + visitCommaExpr(ast, ctx) { + ctx.print(ast, '('); + this.visitAllExpressions(ast.parts, ctx, ','); + ctx.print(ast, ')'); + return null; + } + visitAllExpressions(expressions, ctx, separator) { + this.visitAllObjects(expr => expr.visitExpression(this, ctx), expressions, ctx, separator); + } + visitAllObjects(handler, expressions, ctx, separator) { + let incrementedIndent = false; + for (let i = 0; i < expressions.length; i++) { + if (i > 0) { + if (ctx.lineLength() > 80) { + ctx.print(null, separator, true); + if (!incrementedIndent) { + // continuation are marked with double indent. + ctx.incIndent(); + ctx.incIndent(); + incrementedIndent = true; + } + } else { + ctx.print(null, separator, false); + } + } + handler(expressions[i]); + } + if (incrementedIndent) { + // continuation are marked with double indent. + ctx.decIndent(); + ctx.decIndent(); + } + } + visitAllStatements(statements, ctx) { + statements.forEach(stmt => stmt.visitStatement(this, ctx)); + } +} +function escapeIdentifier(input, escapeDollar, alwaysQuote = true) { + if (input == null) { + return null; + } + const body = input.replace(_SINGLE_QUOTE_ESCAPE_STRING_RE, (...match) => { + if (match[0] == '$') { + return escapeDollar ? '\\$' : '$'; + } else if (match[0] == '\n') { + return '\\n'; + } else if (match[0] == '\r') { + return '\\r'; + } else { + return `\\${match[0]}`; + } + }); + const requiresQuotes = alwaysQuote || !_LEGAL_IDENTIFIER_RE.test(body); + return requiresQuotes ? `'${body}'` : body; +} +function _createIndent(count) { + let res = ''; + for (let i = 0; i < count; i++) { + res += _INDENT_WITH; + } + return res; +} +function typeWithParameters(type, numParams) { + if (numParams === 0) { + return expressionType(type); + } + const params = []; + for (let i = 0; i < numParams; i++) { + params.push(DYNAMIC_TYPE); + } + return expressionType(type, undefined, params); +} +const ANIMATE_SYMBOL_PREFIX = '@'; +function prepareSyntheticPropertyName(name) { + return `${ANIMATE_SYMBOL_PREFIX}${name}`; +} +function prepareSyntheticListenerName(name, phase) { + return `${ANIMATE_SYMBOL_PREFIX}${name}.${phase}`; +} +function getSafePropertyAccessString(accessor, name) { + const escapedName = escapeIdentifier(name, false, false); + return escapedName !== name ? `${accessor}[${escapedName}]` : `${accessor}.${name}`; +} +function prepareSyntheticListenerFunctionName(name, phase) { + return `animation_${name}_${phase}`; +} +function jitOnlyGuardedExpression(expr) { + return guardedExpression('ngJitMode', expr); +} +function devOnlyGuardedExpression(expr) { + return guardedExpression('ngDevMode', expr); +} +function guardedExpression(guard, expr) { + const guardExpr = new ExternalExpr({ + name: guard, + moduleName: null + }); + const guardNotDefined = new BinaryOperatorExpr(BinaryOperator.Identical, new TypeofExpr(guardExpr), literal('undefined')); + const guardUndefinedOrTrue = new BinaryOperatorExpr(BinaryOperator.Or, guardNotDefined, guardExpr, /* type */undefined, /* sourceSpan */undefined, true); + return new BinaryOperatorExpr(BinaryOperator.And, guardUndefinedOrTrue, expr); +} +function wrapReference(value) { + const wrapped = new WrappedNodeExpr(value); + return { + value: wrapped, + type: wrapped + }; +} +function refsToArray(refs, shouldForwardDeclare) { + const values = literalArr(refs.map(ref => ref.value)); + return shouldForwardDeclare ? arrowFn([], values) : values; +} +function createMayBeForwardRefExpression(expression, forwardRef) { + return { + expression, + forwardRef + }; +} +/** + * Convert a `MaybeForwardRefExpression` to an `Expression`, possibly wrapping its expression in a + * `forwardRef()` call. + * + * If `MaybeForwardRefExpression.forwardRef` is `ForwardRefHandling.Unwrapped` then the expression + * was originally wrapped in a `forwardRef()` call to prevent the value from being eagerly evaluated + * in the code. + * + * See `packages/compiler-cli/src/ngtsc/annotations/src/injectable.ts` and + * `packages/compiler/src/jit_compiler_facade.ts` for more information. + */ +function convertFromMaybeForwardRefExpression({ + expression, + forwardRef +}) { + switch (forwardRef) { + case 0 /* ForwardRefHandling.None */: + case 1 /* ForwardRefHandling.Wrapped */: + return expression; + case 2 /* ForwardRefHandling.Unwrapped */: + return generateForwardRef(expression); + } +} +/** + * Generate an expression that has the given `expr` wrapped in the following form: + * + * ``` + * forwardRef(() => expr) + * ``` + */ +function generateForwardRef(expr) { + return importExpr(Identifiers.forwardRef).callFn([arrowFn([], expr)]); +} +var R3FactoryDelegateType; +(function (R3FactoryDelegateType) { + R3FactoryDelegateType[R3FactoryDelegateType["Class"] = 0] = "Class"; + R3FactoryDelegateType[R3FactoryDelegateType["Function"] = 1] = "Function"; +})(R3FactoryDelegateType || (R3FactoryDelegateType = {})); +var FactoryTarget$1; +(function (FactoryTarget) { + FactoryTarget[FactoryTarget["Directive"] = 0] = "Directive"; + FactoryTarget[FactoryTarget["Component"] = 1] = "Component"; + FactoryTarget[FactoryTarget["Injectable"] = 2] = "Injectable"; + FactoryTarget[FactoryTarget["Pipe"] = 3] = "Pipe"; + FactoryTarget[FactoryTarget["NgModule"] = 4] = "NgModule"; +})(FactoryTarget$1 || (FactoryTarget$1 = {})); +/** + * Construct a factory function expression for the given `R3FactoryMetadata`. + */ +function compileFactoryFunction(meta) { + const t = variable('__ngFactoryType__'); + let baseFactoryVar = null; + // The type to instantiate via constructor invocation. If there is no delegated factory, meaning + // this type is always created by constructor invocation, then this is the type-to-create + // parameter provided by the user (t) if specified, or the current type if not. If there is a + // delegated factory (which is used to create the current type) then this is only the type-to- + // create parameter (t). + const typeForCtor = !isDelegatedFactoryMetadata(meta) ? new BinaryOperatorExpr(BinaryOperator.Or, t, meta.type.value) : t; + let ctorExpr = null; + if (meta.deps !== null) { + // There is a constructor (either explicitly or implicitly defined). + if (meta.deps !== 'invalid') { + ctorExpr = new InstantiateExpr(typeForCtor, injectDependencies(meta.deps, meta.target)); + } + } else { + // There is no constructor, use the base class' factory to construct typeForCtor. + baseFactoryVar = variable(`ɵ${meta.name}_BaseFactory`); + ctorExpr = baseFactoryVar.callFn([typeForCtor]); + } + const body = []; + let retExpr = null; + function makeConditionalFactory(nonCtorExpr) { + const r = variable('__ngConditionalFactory__'); + body.push(r.set(NULL_EXPR).toDeclStmt()); + const ctorStmt = ctorExpr !== null ? r.set(ctorExpr).toStmt() : importExpr(Identifiers.invalidFactory).callFn([]).toStmt(); + body.push(ifStmt(t, [ctorStmt], [r.set(nonCtorExpr).toStmt()])); + return r; + } + if (isDelegatedFactoryMetadata(meta)) { + // This type is created with a delegated factory. If a type parameter is not specified, call + // the factory instead. + const delegateArgs = injectDependencies(meta.delegateDeps, meta.target); + // Either call `new delegate(...)` or `delegate(...)` depending on meta.delegateType. + const factoryExpr = new (meta.delegateType === R3FactoryDelegateType.Class ? InstantiateExpr : InvokeFunctionExpr)(meta.delegate, delegateArgs); + retExpr = makeConditionalFactory(factoryExpr); + } else if (isExpressionFactoryMetadata(meta)) { + // TODO(alxhub): decide whether to lower the value here or in the caller + retExpr = makeConditionalFactory(meta.expression); + } else { + retExpr = ctorExpr; + } + if (retExpr === null) { + // The expression cannot be formed so render an `ɵɵinvalidFactory()` call. + body.push(importExpr(Identifiers.invalidFactory).callFn([]).toStmt()); + } else if (baseFactoryVar !== null) { + // This factory uses a base factory, so call `ɵɵgetInheritedFactory()` to compute it. + const getInheritedFactoryCall = importExpr(Identifiers.getInheritedFactory).callFn([meta.type.value]); + // Memoize the base factoryFn: `baseFactory || (baseFactory = ɵɵgetInheritedFactory(...))` + const baseFactory = new BinaryOperatorExpr(BinaryOperator.Or, baseFactoryVar, baseFactoryVar.set(getInheritedFactoryCall)); + body.push(new ReturnStatement(baseFactory.callFn([typeForCtor]))); + } else { + // This is straightforward factory, just return it. + body.push(new ReturnStatement(retExpr)); + } + let factoryFn = fn([new FnParam(t.name, DYNAMIC_TYPE)], body, INFERRED_TYPE, undefined, `${meta.name}_Factory`); + if (baseFactoryVar !== null) { + // There is a base factory variable so wrap its declaration along with the factory function into + // an IIFE. + factoryFn = arrowFn([], [new DeclareVarStmt(baseFactoryVar.name), new ReturnStatement(factoryFn)]).callFn([], /* sourceSpan */undefined, /* pure */true); + } + return { + expression: factoryFn, + statements: [], + type: createFactoryType(meta) + }; +} +function createFactoryType(meta) { + const ctorDepsType = meta.deps !== null && meta.deps !== 'invalid' ? createCtorDepsType(meta.deps) : NONE_TYPE; + return expressionType(importExpr(Identifiers.FactoryDeclaration, [typeWithParameters(meta.type.type, meta.typeArgumentCount), ctorDepsType])); +} +function injectDependencies(deps, target) { + return deps.map((dep, index) => compileInjectDependency(dep, target, index)); +} +function compileInjectDependency(dep, target, index) { + // Interpret the dependency according to its resolved type. + if (dep.token === null) { + return importExpr(Identifiers.invalidFactoryDep).callFn([literal(index)]); + } else if (dep.attributeNameType === null) { + // Build up the injection flags according to the metadata. + const flags = 0 /* InjectFlags.Default */ | (dep.self ? 2 /* InjectFlags.Self */ : 0) | (dep.skipSelf ? 4 /* InjectFlags.SkipSelf */ : 0) | (dep.host ? 1 /* InjectFlags.Host */ : 0) | (dep.optional ? 8 /* InjectFlags.Optional */ : 0) | (target === FactoryTarget$1.Pipe ? 16 /* InjectFlags.ForPipe */ : 0); + // If this dependency is optional or otherwise has non-default flags, then additional + // parameters describing how to inject the dependency must be passed to the inject function + // that's being used. + let flagsParam = flags !== 0 /* InjectFlags.Default */ || dep.optional ? literal(flags) : null; + // Build up the arguments to the injectFn call. + const injectArgs = [dep.token]; + if (flagsParam) { + injectArgs.push(flagsParam); + } + const injectFn = getInjectFn(target); + return importExpr(injectFn).callFn(injectArgs); + } else { + // The `dep.attributeTypeName` value is defined, which indicates that this is an `@Attribute()` + // type dependency. For the generated JS we still want to use the `dep.token` value in case the + // name given for the attribute is not a string literal. For example given `@Attribute(foo())`, + // we want to generate `ɵɵinjectAttribute(foo())`. + // + // The `dep.attributeTypeName` is only actually used (in `createCtorDepType()`) to generate + // typings. + return importExpr(Identifiers.injectAttribute).callFn([dep.token]); + } +} +function createCtorDepsType(deps) { + let hasTypes = false; + const attributeTypes = deps.map(dep => { + const type = createCtorDepType(dep); + if (type !== null) { + hasTypes = true; + return type; + } else { + return literal(null); + } + }); + if (hasTypes) { + return expressionType(literalArr(attributeTypes)); + } else { + return NONE_TYPE; + } +} +function createCtorDepType(dep) { + const entries = []; + if (dep.attributeNameType !== null) { + entries.push({ + key: 'attribute', + value: dep.attributeNameType, + quoted: false + }); + } + if (dep.optional) { + entries.push({ + key: 'optional', + value: literal(true), + quoted: false + }); + } + if (dep.host) { + entries.push({ + key: 'host', + value: literal(true), + quoted: false + }); + } + if (dep.self) { + entries.push({ + key: 'self', + value: literal(true), + quoted: false + }); + } + if (dep.skipSelf) { + entries.push({ + key: 'skipSelf', + value: literal(true), + quoted: false + }); + } + return entries.length > 0 ? literalMap(entries) : null; +} +function isDelegatedFactoryMetadata(meta) { + return meta.delegateType !== undefined; +} +function isExpressionFactoryMetadata(meta) { + return meta.expression !== undefined; +} +function getInjectFn(target) { + switch (target) { + case FactoryTarget$1.Component: + case FactoryTarget$1.Directive: + case FactoryTarget$1.Pipe: + return Identifiers.directiveInject; + case FactoryTarget$1.NgModule: + case FactoryTarget$1.Injectable: + default: + return Identifiers.inject; + } +} +class ParserError { + constructor(message, input, errLocation, ctxLocation) { + this.input = input; + this.errLocation = errLocation; + this.ctxLocation = ctxLocation; + this.message = `Parser Error: ${message} ${errLocation} [${input}] in ${ctxLocation}`; + } +} +class ParseSpan { + constructor(start, end) { + this.start = start; + this.end = end; + } + toAbsolute(absoluteOffset) { + return new AbsoluteSourceSpan(absoluteOffset + this.start, absoluteOffset + this.end); + } +} +class AST { + constructor(span, + /** + * Absolute location of the expression AST in a source code file. + */ + sourceSpan) { + this.span = span; + this.sourceSpan = sourceSpan; + } + toString() { + return 'AST'; + } +} +class ASTWithName extends AST { + constructor(span, sourceSpan, nameSpan) { + super(span, sourceSpan); + this.nameSpan = nameSpan; + } +} +class EmptyExpr$1 extends AST { + visit(visitor, context = null) { + // do nothing + } +} +class ImplicitReceiver extends AST { + visit(visitor, context = null) { + return visitor.visitImplicitReceiver(this, context); + } +} +/** + * Receiver when something is accessed through `this` (e.g. `this.foo`). Note that this class + * inherits from `ImplicitReceiver`, because accessing something through `this` is treated the + * same as accessing it implicitly inside of an Angular template (e.g. `[attr.title]="this.title"` + * is the same as `[attr.title]="title"`.). Inheriting allows for the `this` accesses to be treated + * the same as implicit ones, except for a couple of exceptions like `$event` and `$any`. + * TODO: we should find a way for this class not to extend from `ImplicitReceiver` in the future. + */ +class ThisReceiver extends ImplicitReceiver { + visit(visitor, context = null) { + return visitor.visitThisReceiver?.(this, context); + } +} +/** + * Multiple expressions separated by a semicolon. + */ +class Chain extends AST { + constructor(span, sourceSpan, expressions) { + super(span, sourceSpan); + this.expressions = expressions; + } + visit(visitor, context = null) { + return visitor.visitChain(this, context); + } +} +class Conditional extends AST { + constructor(span, sourceSpan, condition, trueExp, falseExp) { + super(span, sourceSpan); + this.condition = condition; + this.trueExp = trueExp; + this.falseExp = falseExp; + } + visit(visitor, context = null) { + return visitor.visitConditional(this, context); + } +} +class PropertyRead extends ASTWithName { + constructor(span, sourceSpan, nameSpan, receiver, name) { + super(span, sourceSpan, nameSpan); + this.receiver = receiver; + this.name = name; + } + visit(visitor, context = null) { + return visitor.visitPropertyRead(this, context); + } +} +class PropertyWrite extends ASTWithName { + constructor(span, sourceSpan, nameSpan, receiver, name, value) { + super(span, sourceSpan, nameSpan); + this.receiver = receiver; + this.name = name; + this.value = value; + } + visit(visitor, context = null) { + return visitor.visitPropertyWrite(this, context); + } +} +class SafePropertyRead extends ASTWithName { + constructor(span, sourceSpan, nameSpan, receiver, name) { + super(span, sourceSpan, nameSpan); + this.receiver = receiver; + this.name = name; + } + visit(visitor, context = null) { + return visitor.visitSafePropertyRead(this, context); + } +} +class KeyedRead extends AST { + constructor(span, sourceSpan, receiver, key) { + super(span, sourceSpan); + this.receiver = receiver; + this.key = key; + } + visit(visitor, context = null) { + return visitor.visitKeyedRead(this, context); + } +} +class SafeKeyedRead extends AST { + constructor(span, sourceSpan, receiver, key) { + super(span, sourceSpan); + this.receiver = receiver; + this.key = key; + } + visit(visitor, context = null) { + return visitor.visitSafeKeyedRead(this, context); + } +} +class KeyedWrite extends AST { + constructor(span, sourceSpan, receiver, key, value) { + super(span, sourceSpan); + this.receiver = receiver; + this.key = key; + this.value = value; + } + visit(visitor, context = null) { + return visitor.visitKeyedWrite(this, context); + } +} +class BindingPipe extends ASTWithName { + constructor(span, sourceSpan, exp, name, args, nameSpan) { + super(span, sourceSpan, nameSpan); + this.exp = exp; + this.name = name; + this.args = args; + } + visit(visitor, context = null) { + return visitor.visitPipe(this, context); + } +} +class LiteralPrimitive extends AST { + constructor(span, sourceSpan, value) { + super(span, sourceSpan); + this.value = value; + } + visit(visitor, context = null) { + return visitor.visitLiteralPrimitive(this, context); + } +} +class LiteralArray extends AST { + constructor(span, sourceSpan, expressions) { + super(span, sourceSpan); + this.expressions = expressions; + } + visit(visitor, context = null) { + return visitor.visitLiteralArray(this, context); + } +} +class LiteralMap extends AST { + constructor(span, sourceSpan, keys, values) { + super(span, sourceSpan); + this.keys = keys; + this.values = values; + } + visit(visitor, context = null) { + return visitor.visitLiteralMap(this, context); + } +} +class Interpolation$1 extends AST { + constructor(span, sourceSpan, strings, expressions) { + super(span, sourceSpan); + this.strings = strings; + this.expressions = expressions; + } + visit(visitor, context = null) { + return visitor.visitInterpolation(this, context); + } +} +class Binary extends AST { + constructor(span, sourceSpan, operation, left, right) { + super(span, sourceSpan); + this.operation = operation; + this.left = left; + this.right = right; + } + visit(visitor, context = null) { + return visitor.visitBinary(this, context); + } +} +/** + * For backwards compatibility reasons, `Unary` inherits from `Binary` and mimics the binary AST + * node that was originally used. This inheritance relation can be deleted in some future major, + * after consumers have been given a chance to fully support Unary. + */ +class Unary extends Binary { + /** + * Creates a unary minus expression "-x", represented as `Binary` using "0 - x". + */ + static createMinus(span, sourceSpan, expr) { + return new Unary(span, sourceSpan, '-', expr, '-', new LiteralPrimitive(span, sourceSpan, 0), expr); + } + /** + * Creates a unary plus expression "+x", represented as `Binary` using "x - 0". + */ + static createPlus(span, sourceSpan, expr) { + return new Unary(span, sourceSpan, '+', expr, '-', expr, new LiteralPrimitive(span, sourceSpan, 0)); + } + /** + * During the deprecation period this constructor is private, to avoid consumers from creating + * a `Unary` with the fallback properties for `Binary`. + */ + constructor(span, sourceSpan, operator, expr, binaryOp, binaryLeft, binaryRight) { + super(span, sourceSpan, binaryOp, binaryLeft, binaryRight); + this.operator = operator; + this.expr = expr; + // Redeclare the properties that are inherited from `Binary` as `never`, as consumers should not + // depend on these fields when operating on `Unary`. + this.left = null; + this.right = null; + this.operation = null; + } + visit(visitor, context = null) { + if (visitor.visitUnary !== undefined) { + return visitor.visitUnary(this, context); + } + return visitor.visitBinary(this, context); + } +} +class PrefixNot extends AST { + constructor(span, sourceSpan, expression) { + super(span, sourceSpan); + this.expression = expression; + } + visit(visitor, context = null) { + return visitor.visitPrefixNot(this, context); + } +} +class NonNullAssert extends AST { + constructor(span, sourceSpan, expression) { + super(span, sourceSpan); + this.expression = expression; + } + visit(visitor, context = null) { + return visitor.visitNonNullAssert(this, context); + } +} +class Call extends AST { + constructor(span, sourceSpan, receiver, args, argumentSpan) { + super(span, sourceSpan); + this.receiver = receiver; + this.args = args; + this.argumentSpan = argumentSpan; + } + visit(visitor, context = null) { + return visitor.visitCall(this, context); + } +} +class SafeCall extends AST { + constructor(span, sourceSpan, receiver, args, argumentSpan) { + super(span, sourceSpan); + this.receiver = receiver; + this.args = args; + this.argumentSpan = argumentSpan; + } + visit(visitor, context = null) { + return visitor.visitSafeCall(this, context); + } +} +/** + * Records the absolute position of a text span in a source file, where `start` and `end` are the + * starting and ending byte offsets, respectively, of the text span in a source file. + */ +class AbsoluteSourceSpan { + constructor(start, end) { + this.start = start; + this.end = end; + } +} +class ASTWithSource extends AST { + constructor(ast, source, location, absoluteOffset, errors) { + super(new ParseSpan(0, source === null ? 0 : source.length), new AbsoluteSourceSpan(absoluteOffset, source === null ? absoluteOffset : absoluteOffset + source.length)); + this.ast = ast; + this.source = source; + this.location = location; + this.errors = errors; + } + visit(visitor, context = null) { + if (visitor.visitASTWithSource) { + return visitor.visitASTWithSource(this, context); + } + return this.ast.visit(visitor, context); + } + toString() { + return `${this.source} in ${this.location}`; + } +} +class VariableBinding { + /** + * @param sourceSpan entire span of the binding. + * @param key name of the LHS along with its span. + * @param value optional value for the RHS along with its span. + */ + constructor(sourceSpan, key, value) { + this.sourceSpan = sourceSpan; + this.key = key; + this.value = value; + } +} +class ExpressionBinding { + /** + * @param sourceSpan entire span of the binding. + * @param key binding name, like ngForOf, ngForTrackBy, ngIf, along with its + * span. Note that the length of the span may not be the same as + * `key.source.length`. For example, + * 1. key.source = ngFor, key.span is for "ngFor" + * 2. key.source = ngForOf, key.span is for "of" + * 3. key.source = ngForTrackBy, key.span is for "trackBy" + * @param value optional expression for the RHS. + */ + constructor(sourceSpan, key, value) { + this.sourceSpan = sourceSpan; + this.key = key; + this.value = value; + } +} +class RecursiveAstVisitor { + visit(ast, context) { + // The default implementation just visits every node. + // Classes that extend RecursiveAstVisitor should override this function + // to selectively visit the specified node. + ast.visit(this, context); + } + visitUnary(ast, context) { + this.visit(ast.expr, context); + } + visitBinary(ast, context) { + this.visit(ast.left, context); + this.visit(ast.right, context); + } + visitChain(ast, context) { + this.visitAll(ast.expressions, context); + } + visitConditional(ast, context) { + this.visit(ast.condition, context); + this.visit(ast.trueExp, context); + this.visit(ast.falseExp, context); + } + visitPipe(ast, context) { + this.visit(ast.exp, context); + this.visitAll(ast.args, context); + } + visitImplicitReceiver(ast, context) {} + visitThisReceiver(ast, context) {} + visitInterpolation(ast, context) { + this.visitAll(ast.expressions, context); + } + visitKeyedRead(ast, context) { + this.visit(ast.receiver, context); + this.visit(ast.key, context); + } + visitKeyedWrite(ast, context) { + this.visit(ast.receiver, context); + this.visit(ast.key, context); + this.visit(ast.value, context); + } + visitLiteralArray(ast, context) { + this.visitAll(ast.expressions, context); + } + visitLiteralMap(ast, context) { + this.visitAll(ast.values, context); + } + visitLiteralPrimitive(ast, context) {} + visitPrefixNot(ast, context) { + this.visit(ast.expression, context); + } + visitNonNullAssert(ast, context) { + this.visit(ast.expression, context); + } + visitPropertyRead(ast, context) { + this.visit(ast.receiver, context); + } + visitPropertyWrite(ast, context) { + this.visit(ast.receiver, context); + this.visit(ast.value, context); + } + visitSafePropertyRead(ast, context) { + this.visit(ast.receiver, context); + } + visitSafeKeyedRead(ast, context) { + this.visit(ast.receiver, context); + this.visit(ast.key, context); + } + visitCall(ast, context) { + this.visit(ast.receiver, context); + this.visitAll(ast.args, context); + } + visitSafeCall(ast, context) { + this.visit(ast.receiver, context); + this.visitAll(ast.args, context); + } + // This is not part of the AstVisitor interface, just a helper method + visitAll(asts, context) { + for (const ast of asts) { + this.visit(ast, context); + } + } +} +class AstTransformer { + visitImplicitReceiver(ast, context) { + return ast; + } + visitThisReceiver(ast, context) { + return ast; + } + visitInterpolation(ast, context) { + return new Interpolation$1(ast.span, ast.sourceSpan, ast.strings, this.visitAll(ast.expressions)); + } + visitLiteralPrimitive(ast, context) { + return new LiteralPrimitive(ast.span, ast.sourceSpan, ast.value); + } + visitPropertyRead(ast, context) { + return new PropertyRead(ast.span, ast.sourceSpan, ast.nameSpan, ast.receiver.visit(this), ast.name); + } + visitPropertyWrite(ast, context) { + return new PropertyWrite(ast.span, ast.sourceSpan, ast.nameSpan, ast.receiver.visit(this), ast.name, ast.value.visit(this)); + } + visitSafePropertyRead(ast, context) { + return new SafePropertyRead(ast.span, ast.sourceSpan, ast.nameSpan, ast.receiver.visit(this), ast.name); + } + visitLiteralArray(ast, context) { + return new LiteralArray(ast.span, ast.sourceSpan, this.visitAll(ast.expressions)); + } + visitLiteralMap(ast, context) { + return new LiteralMap(ast.span, ast.sourceSpan, ast.keys, this.visitAll(ast.values)); + } + visitUnary(ast, context) { + switch (ast.operator) { + case '+': + return Unary.createPlus(ast.span, ast.sourceSpan, ast.expr.visit(this)); + case '-': + return Unary.createMinus(ast.span, ast.sourceSpan, ast.expr.visit(this)); + default: + throw new Error(`Unknown unary operator ${ast.operator}`); + } + } + visitBinary(ast, context) { + return new Binary(ast.span, ast.sourceSpan, ast.operation, ast.left.visit(this), ast.right.visit(this)); + } + visitPrefixNot(ast, context) { + return new PrefixNot(ast.span, ast.sourceSpan, ast.expression.visit(this)); + } + visitNonNullAssert(ast, context) { + return new NonNullAssert(ast.span, ast.sourceSpan, ast.expression.visit(this)); + } + visitConditional(ast, context) { + return new Conditional(ast.span, ast.sourceSpan, ast.condition.visit(this), ast.trueExp.visit(this), ast.falseExp.visit(this)); + } + visitPipe(ast, context) { + return new BindingPipe(ast.span, ast.sourceSpan, ast.exp.visit(this), ast.name, this.visitAll(ast.args), ast.nameSpan); + } + visitKeyedRead(ast, context) { + return new KeyedRead(ast.span, ast.sourceSpan, ast.receiver.visit(this), ast.key.visit(this)); + } + visitKeyedWrite(ast, context) { + return new KeyedWrite(ast.span, ast.sourceSpan, ast.receiver.visit(this), ast.key.visit(this), ast.value.visit(this)); + } + visitCall(ast, context) { + return new Call(ast.span, ast.sourceSpan, ast.receiver.visit(this), this.visitAll(ast.args), ast.argumentSpan); + } + visitSafeCall(ast, context) { + return new SafeCall(ast.span, ast.sourceSpan, ast.receiver.visit(this), this.visitAll(ast.args), ast.argumentSpan); + } + visitAll(asts) { + const res = []; + for (let i = 0; i < asts.length; ++i) { + res[i] = asts[i].visit(this); + } + return res; + } + visitChain(ast, context) { + return new Chain(ast.span, ast.sourceSpan, this.visitAll(ast.expressions)); + } + visitSafeKeyedRead(ast, context) { + return new SafeKeyedRead(ast.span, ast.sourceSpan, ast.receiver.visit(this), ast.key.visit(this)); + } +} +// A transformer that only creates new nodes if the transformer makes a change or +// a change is made a child node. +class AstMemoryEfficientTransformer { + visitImplicitReceiver(ast, context) { + return ast; + } + visitThisReceiver(ast, context) { + return ast; + } + visitInterpolation(ast, context) { + const expressions = this.visitAll(ast.expressions); + if (expressions !== ast.expressions) return new Interpolation$1(ast.span, ast.sourceSpan, ast.strings, expressions); + return ast; + } + visitLiteralPrimitive(ast, context) { + return ast; + } + visitPropertyRead(ast, context) { + const receiver = ast.receiver.visit(this); + if (receiver !== ast.receiver) { + return new PropertyRead(ast.span, ast.sourceSpan, ast.nameSpan, receiver, ast.name); + } + return ast; + } + visitPropertyWrite(ast, context) { + const receiver = ast.receiver.visit(this); + const value = ast.value.visit(this); + if (receiver !== ast.receiver || value !== ast.value) { + return new PropertyWrite(ast.span, ast.sourceSpan, ast.nameSpan, receiver, ast.name, value); + } + return ast; + } + visitSafePropertyRead(ast, context) { + const receiver = ast.receiver.visit(this); + if (receiver !== ast.receiver) { + return new SafePropertyRead(ast.span, ast.sourceSpan, ast.nameSpan, receiver, ast.name); + } + return ast; + } + visitLiteralArray(ast, context) { + const expressions = this.visitAll(ast.expressions); + if (expressions !== ast.expressions) { + return new LiteralArray(ast.span, ast.sourceSpan, expressions); + } + return ast; + } + visitLiteralMap(ast, context) { + const values = this.visitAll(ast.values); + if (values !== ast.values) { + return new LiteralMap(ast.span, ast.sourceSpan, ast.keys, values); + } + return ast; + } + visitUnary(ast, context) { + const expr = ast.expr.visit(this); + if (expr !== ast.expr) { + switch (ast.operator) { + case '+': + return Unary.createPlus(ast.span, ast.sourceSpan, expr); + case '-': + return Unary.createMinus(ast.span, ast.sourceSpan, expr); + default: + throw new Error(`Unknown unary operator ${ast.operator}`); + } + } + return ast; + } + visitBinary(ast, context) { + const left = ast.left.visit(this); + const right = ast.right.visit(this); + if (left !== ast.left || right !== ast.right) { + return new Binary(ast.span, ast.sourceSpan, ast.operation, left, right); + } + return ast; + } + visitPrefixNot(ast, context) { + const expression = ast.expression.visit(this); + if (expression !== ast.expression) { + return new PrefixNot(ast.span, ast.sourceSpan, expression); + } + return ast; + } + visitNonNullAssert(ast, context) { + const expression = ast.expression.visit(this); + if (expression !== ast.expression) { + return new NonNullAssert(ast.span, ast.sourceSpan, expression); + } + return ast; + } + visitConditional(ast, context) { + const condition = ast.condition.visit(this); + const trueExp = ast.trueExp.visit(this); + const falseExp = ast.falseExp.visit(this); + if (condition !== ast.condition || trueExp !== ast.trueExp || falseExp !== ast.falseExp) { + return new Conditional(ast.span, ast.sourceSpan, condition, trueExp, falseExp); + } + return ast; + } + visitPipe(ast, context) { + const exp = ast.exp.visit(this); + const args = this.visitAll(ast.args); + if (exp !== ast.exp || args !== ast.args) { + return new BindingPipe(ast.span, ast.sourceSpan, exp, ast.name, args, ast.nameSpan); + } + return ast; + } + visitKeyedRead(ast, context) { + const obj = ast.receiver.visit(this); + const key = ast.key.visit(this); + if (obj !== ast.receiver || key !== ast.key) { + return new KeyedRead(ast.span, ast.sourceSpan, obj, key); + } + return ast; + } + visitKeyedWrite(ast, context) { + const obj = ast.receiver.visit(this); + const key = ast.key.visit(this); + const value = ast.value.visit(this); + if (obj !== ast.receiver || key !== ast.key || value !== ast.value) { + return new KeyedWrite(ast.span, ast.sourceSpan, obj, key, value); + } + return ast; + } + visitAll(asts) { + const res = []; + let modified = false; + for (let i = 0; i < asts.length; ++i) { + const original = asts[i]; + const value = original.visit(this); + res[i] = value; + modified = modified || value !== original; + } + return modified ? res : asts; + } + visitChain(ast, context) { + const expressions = this.visitAll(ast.expressions); + if (expressions !== ast.expressions) { + return new Chain(ast.span, ast.sourceSpan, expressions); + } + return ast; + } + visitCall(ast, context) { + const receiver = ast.receiver.visit(this); + const args = this.visitAll(ast.args); + if (receiver !== ast.receiver || args !== ast.args) { + return new Call(ast.span, ast.sourceSpan, receiver, args, ast.argumentSpan); + } + return ast; + } + visitSafeCall(ast, context) { + const receiver = ast.receiver.visit(this); + const args = this.visitAll(ast.args); + if (receiver !== ast.receiver || args !== ast.args) { + return new SafeCall(ast.span, ast.sourceSpan, receiver, args, ast.argumentSpan); + } + return ast; + } + visitSafeKeyedRead(ast, context) { + const obj = ast.receiver.visit(this); + const key = ast.key.visit(this); + if (obj !== ast.receiver || key !== ast.key) { + return new SafeKeyedRead(ast.span, ast.sourceSpan, obj, key); + } + return ast; + } +} +// Bindings +class ParsedProperty { + constructor(name, expression, type, sourceSpan, keySpan, valueSpan) { + this.name = name; + this.expression = expression; + this.type = type; + this.sourceSpan = sourceSpan; + this.keySpan = keySpan; + this.valueSpan = valueSpan; + this.isLiteral = this.type === ParsedPropertyType.LITERAL_ATTR; + this.isAnimation = this.type === ParsedPropertyType.ANIMATION; + } +} +var ParsedPropertyType; +(function (ParsedPropertyType) { + ParsedPropertyType[ParsedPropertyType["DEFAULT"] = 0] = "DEFAULT"; + ParsedPropertyType[ParsedPropertyType["LITERAL_ATTR"] = 1] = "LITERAL_ATTR"; + ParsedPropertyType[ParsedPropertyType["ANIMATION"] = 2] = "ANIMATION"; + ParsedPropertyType[ParsedPropertyType["TWO_WAY"] = 3] = "TWO_WAY"; +})(ParsedPropertyType || (ParsedPropertyType = {})); +var ParsedEventType; +(function (ParsedEventType) { + // DOM or Directive event + ParsedEventType[ParsedEventType["Regular"] = 0] = "Regular"; + // Animation specific event + ParsedEventType[ParsedEventType["Animation"] = 1] = "Animation"; + // Event side of a two-way binding (e.g. `[(property)]="expression"`). + ParsedEventType[ParsedEventType["TwoWay"] = 2] = "TwoWay"; +})(ParsedEventType || (ParsedEventType = {})); +class ParsedEvent { + constructor(name, targetOrPhase, type, handler, sourceSpan, handlerSpan, keySpan) { + this.name = name; + this.targetOrPhase = targetOrPhase; + this.type = type; + this.handler = handler; + this.sourceSpan = sourceSpan; + this.handlerSpan = handlerSpan; + this.keySpan = keySpan; + } +} +/** + * ParsedVariable represents a variable declaration in a microsyntax expression. + */ +class ParsedVariable { + constructor(name, value, sourceSpan, keySpan, valueSpan) { + this.name = name; + this.value = value; + this.sourceSpan = sourceSpan; + this.keySpan = keySpan; + this.valueSpan = valueSpan; + } +} +var BindingType; +(function (BindingType) { + // A regular binding to a property (e.g. `[property]="expression"`). + BindingType[BindingType["Property"] = 0] = "Property"; + // A binding to an element attribute (e.g. `[attr.name]="expression"`). + BindingType[BindingType["Attribute"] = 1] = "Attribute"; + // A binding to a CSS class (e.g. `[class.name]="condition"`). + BindingType[BindingType["Class"] = 2] = "Class"; + // A binding to a style rule (e.g. `[style.rule]="expression"`). + BindingType[BindingType["Style"] = 3] = "Style"; + // A binding to an animation reference (e.g. `[animate.key]="expression"`). + BindingType[BindingType["Animation"] = 4] = "Animation"; + // Property side of a two-way binding (e.g. `[(property)]="expression"`). + BindingType[BindingType["TwoWay"] = 5] = "TwoWay"; +})(BindingType || (BindingType = {})); +class BoundElementProperty { + constructor(name, type, securityContext, value, unit, sourceSpan, keySpan, valueSpan) { + this.name = name; + this.type = type; + this.securityContext = securityContext; + this.value = value; + this.unit = unit; + this.sourceSpan = sourceSpan; + this.keySpan = keySpan; + this.valueSpan = valueSpan; + } +} +var TagContentType; +(function (TagContentType) { + TagContentType[TagContentType["RAW_TEXT"] = 0] = "RAW_TEXT"; + TagContentType[TagContentType["ESCAPABLE_RAW_TEXT"] = 1] = "ESCAPABLE_RAW_TEXT"; + TagContentType[TagContentType["PARSABLE_DATA"] = 2] = "PARSABLE_DATA"; +})(TagContentType || (TagContentType = {})); +function splitNsName(elementName, fatal = true) { + if (elementName[0] != ':') { + return [null, elementName]; + } + const colonIndex = elementName.indexOf(':', 1); + if (colonIndex === -1) { + if (fatal) { + throw new Error(`Unsupported format "${elementName}" expecting ":namespace:name"`); + } else { + return [null, elementName]; + } + } + return [elementName.slice(1, colonIndex), elementName.slice(colonIndex + 1)]; +} +// `` tags work the same regardless the namespace +function isNgContainer(tagName) { + return splitNsName(tagName)[1] === 'ng-container'; +} +// `` tags work the same regardless the namespace +function isNgContent(tagName) { + return splitNsName(tagName)[1] === 'ng-content'; +} +// `` tags work the same regardless the namespace +function isNgTemplate(tagName) { + return splitNsName(tagName)[1] === 'ng-template'; +} +function getNsPrefix(fullName) { + return fullName === null ? null : splitNsName(fullName)[0]; +} +function mergeNsAndName(prefix, localName) { + return prefix ? `:${prefix}:${localName}` : localName; +} + +/** + * This is an R3 `Node`-like wrapper for a raw `html.Comment` node. We do not currently + * require the implementation of a visitor for Comments as they are only collected at + * the top-level of the R3 AST, and only if `Render3ParseOptions['collectCommentNodes']` + * is true. + */ +class Comment$1 { + constructor(value, sourceSpan) { + this.value = value; + this.sourceSpan = sourceSpan; + } + visit(_visitor) { + throw new Error('visit() not implemented for Comment'); + } +} +class Text$3 { + constructor(value, sourceSpan) { + this.value = value; + this.sourceSpan = sourceSpan; + } + visit(visitor) { + return visitor.visitText(this); + } +} +class BoundText { + constructor(value, sourceSpan, i18n) { + this.value = value; + this.sourceSpan = sourceSpan; + this.i18n = i18n; + } + visit(visitor) { + return visitor.visitBoundText(this); + } +} +/** + * Represents a text attribute in the template. + * + * `valueSpan` may not be present in cases where there is no value `
`. + * `keySpan` may also not be present for synthetic attributes from ICU expansions. + */ +class TextAttribute { + constructor(name, value, sourceSpan, keySpan, valueSpan, i18n) { + this.name = name; + this.value = value; + this.sourceSpan = sourceSpan; + this.keySpan = keySpan; + this.valueSpan = valueSpan; + this.i18n = i18n; + } + visit(visitor) { + return visitor.visitTextAttribute(this); + } +} +class BoundAttribute { + constructor(name, type, securityContext, value, unit, sourceSpan, keySpan, valueSpan, i18n) { + this.name = name; + this.type = type; + this.securityContext = securityContext; + this.value = value; + this.unit = unit; + this.sourceSpan = sourceSpan; + this.keySpan = keySpan; + this.valueSpan = valueSpan; + this.i18n = i18n; + } + static fromBoundElementProperty(prop, i18n) { + if (prop.keySpan === undefined) { + throw new Error(`Unexpected state: keySpan must be defined for bound attributes but was not for ${prop.name}: ${prop.sourceSpan}`); + } + return new BoundAttribute(prop.name, prop.type, prop.securityContext, prop.value, prop.unit, prop.sourceSpan, prop.keySpan, prop.valueSpan, i18n); + } + visit(visitor) { + return visitor.visitBoundAttribute(this); + } +} +class BoundEvent { + constructor(name, type, handler, target, phase, sourceSpan, handlerSpan, keySpan) { + this.name = name; + this.type = type; + this.handler = handler; + this.target = target; + this.phase = phase; + this.sourceSpan = sourceSpan; + this.handlerSpan = handlerSpan; + this.keySpan = keySpan; + } + static fromParsedEvent(event) { + const target = event.type === ParsedEventType.Regular ? event.targetOrPhase : null; + const phase = event.type === ParsedEventType.Animation ? event.targetOrPhase : null; + if (event.keySpan === undefined) { + throw new Error(`Unexpected state: keySpan must be defined for bound event but was not for ${event.name}: ${event.sourceSpan}`); + } + return new BoundEvent(event.name, event.type, event.handler, target, phase, event.sourceSpan, event.handlerSpan, event.keySpan); + } + visit(visitor) { + return visitor.visitBoundEvent(this); + } +} +class Element$1 { + constructor(name, attributes, inputs, outputs, children, references, sourceSpan, startSourceSpan, endSourceSpan, i18n) { + this.name = name; + this.attributes = attributes; + this.inputs = inputs; + this.outputs = outputs; + this.children = children; + this.references = references; + this.sourceSpan = sourceSpan; + this.startSourceSpan = startSourceSpan; + this.endSourceSpan = endSourceSpan; + this.i18n = i18n; + } + visit(visitor) { + return visitor.visitElement(this); + } +} +class DeferredTrigger { + constructor(nameSpan, sourceSpan, prefetchSpan, whenOrOnSourceSpan) { + this.nameSpan = nameSpan; + this.sourceSpan = sourceSpan; + this.prefetchSpan = prefetchSpan; + this.whenOrOnSourceSpan = whenOrOnSourceSpan; + } + visit(visitor) { + return visitor.visitDeferredTrigger(this); + } +} +class BoundDeferredTrigger extends DeferredTrigger { + constructor(value, sourceSpan, prefetchSpan, whenSourceSpan) { + // BoundDeferredTrigger is for 'when' triggers. These aren't really "triggers" and don't have a + // nameSpan. Trigger names are the built in event triggers like hover, interaction, etc. + super( /** nameSpan */null, sourceSpan, prefetchSpan, whenSourceSpan); + this.value = value; + } +} +class IdleDeferredTrigger extends DeferredTrigger {} +class ImmediateDeferredTrigger extends DeferredTrigger {} +class HoverDeferredTrigger extends DeferredTrigger { + constructor(reference, nameSpan, sourceSpan, prefetchSpan, onSourceSpan) { + super(nameSpan, sourceSpan, prefetchSpan, onSourceSpan); + this.reference = reference; + } +} +class TimerDeferredTrigger extends DeferredTrigger { + constructor(delay, nameSpan, sourceSpan, prefetchSpan, onSourceSpan) { + super(nameSpan, sourceSpan, prefetchSpan, onSourceSpan); + this.delay = delay; + } +} +class InteractionDeferredTrigger extends DeferredTrigger { + constructor(reference, nameSpan, sourceSpan, prefetchSpan, onSourceSpan) { + super(nameSpan, sourceSpan, prefetchSpan, onSourceSpan); + this.reference = reference; + } +} +class ViewportDeferredTrigger extends DeferredTrigger { + constructor(reference, nameSpan, sourceSpan, prefetchSpan, onSourceSpan) { + super(nameSpan, sourceSpan, prefetchSpan, onSourceSpan); + this.reference = reference; + } +} +class BlockNode { + constructor(nameSpan, sourceSpan, startSourceSpan, endSourceSpan) { + this.nameSpan = nameSpan; + this.sourceSpan = sourceSpan; + this.startSourceSpan = startSourceSpan; + this.endSourceSpan = endSourceSpan; + } +} +class DeferredBlockPlaceholder extends BlockNode { + constructor(children, minimumTime, nameSpan, sourceSpan, startSourceSpan, endSourceSpan, i18n) { + super(nameSpan, sourceSpan, startSourceSpan, endSourceSpan); + this.children = children; + this.minimumTime = minimumTime; + this.i18n = i18n; + } + visit(visitor) { + return visitor.visitDeferredBlockPlaceholder(this); + } +} +class DeferredBlockLoading extends BlockNode { + constructor(children, afterTime, minimumTime, nameSpan, sourceSpan, startSourceSpan, endSourceSpan, i18n) { + super(nameSpan, sourceSpan, startSourceSpan, endSourceSpan); + this.children = children; + this.afterTime = afterTime; + this.minimumTime = minimumTime; + this.i18n = i18n; + } + visit(visitor) { + return visitor.visitDeferredBlockLoading(this); + } +} +class DeferredBlockError extends BlockNode { + constructor(children, nameSpan, sourceSpan, startSourceSpan, endSourceSpan, i18n) { + super(nameSpan, sourceSpan, startSourceSpan, endSourceSpan); + this.children = children; + this.i18n = i18n; + } + visit(visitor) { + return visitor.visitDeferredBlockError(this); + } +} +class DeferredBlock extends BlockNode { + constructor(children, triggers, prefetchTriggers, placeholder, loading, error, nameSpan, sourceSpan, mainBlockSpan, startSourceSpan, endSourceSpan, i18n) { + super(nameSpan, sourceSpan, startSourceSpan, endSourceSpan); + this.children = children; + this.placeholder = placeholder; + this.loading = loading; + this.error = error; + this.mainBlockSpan = mainBlockSpan; + this.i18n = i18n; + this.triggers = triggers; + this.prefetchTriggers = prefetchTriggers; + // We cache the keys since we know that they won't change and we + // don't want to enumarate them every time we're traversing the AST. + this.definedTriggers = Object.keys(triggers); + this.definedPrefetchTriggers = Object.keys(prefetchTriggers); + } + visit(visitor) { + return visitor.visitDeferredBlock(this); + } + visitAll(visitor) { + this.visitTriggers(this.definedTriggers, this.triggers, visitor); + this.visitTriggers(this.definedPrefetchTriggers, this.prefetchTriggers, visitor); + visitAll$1(visitor, this.children); + const remainingBlocks = [this.placeholder, this.loading, this.error].filter(x => x !== null); + visitAll$1(visitor, remainingBlocks); + } + visitTriggers(keys, triggers, visitor) { + visitAll$1(visitor, keys.map(k => triggers[k])); + } +} +class SwitchBlock extends BlockNode { + constructor(expression, cases, + /** + * These blocks are only captured to allow for autocompletion in the language service. They + * aren't meant to be processed in any other way. + */ + unknownBlocks, sourceSpan, startSourceSpan, endSourceSpan, nameSpan) { + super(nameSpan, sourceSpan, startSourceSpan, endSourceSpan); + this.expression = expression; + this.cases = cases; + this.unknownBlocks = unknownBlocks; + } + visit(visitor) { + return visitor.visitSwitchBlock(this); + } +} +class SwitchBlockCase extends BlockNode { + constructor(expression, children, sourceSpan, startSourceSpan, endSourceSpan, nameSpan, i18n) { + super(nameSpan, sourceSpan, startSourceSpan, endSourceSpan); + this.expression = expression; + this.children = children; + this.i18n = i18n; + } + visit(visitor) { + return visitor.visitSwitchBlockCase(this); + } +} +class ForLoopBlock extends BlockNode { + constructor(item, expression, trackBy, trackKeywordSpan, contextVariables, children, empty, sourceSpan, mainBlockSpan, startSourceSpan, endSourceSpan, nameSpan, i18n) { + super(nameSpan, sourceSpan, startSourceSpan, endSourceSpan); + this.item = item; + this.expression = expression; + this.trackBy = trackBy; + this.trackKeywordSpan = trackKeywordSpan; + this.contextVariables = contextVariables; + this.children = children; + this.empty = empty; + this.mainBlockSpan = mainBlockSpan; + this.i18n = i18n; + } + visit(visitor) { + return visitor.visitForLoopBlock(this); + } +} +class ForLoopBlockEmpty extends BlockNode { + constructor(children, sourceSpan, startSourceSpan, endSourceSpan, nameSpan, i18n) { + super(nameSpan, sourceSpan, startSourceSpan, endSourceSpan); + this.children = children; + this.i18n = i18n; + } + visit(visitor) { + return visitor.visitForLoopBlockEmpty(this); + } +} +class IfBlock extends BlockNode { + constructor(branches, sourceSpan, startSourceSpan, endSourceSpan, nameSpan) { + super(nameSpan, sourceSpan, startSourceSpan, endSourceSpan); + this.branches = branches; + } + visit(visitor) { + return visitor.visitIfBlock(this); + } +} +class IfBlockBranch extends BlockNode { + constructor(expression, children, expressionAlias, sourceSpan, startSourceSpan, endSourceSpan, nameSpan, i18n) { + super(nameSpan, sourceSpan, startSourceSpan, endSourceSpan); + this.expression = expression; + this.children = children; + this.expressionAlias = expressionAlias; + this.i18n = i18n; + } + visit(visitor) { + return visitor.visitIfBlockBranch(this); + } +} +class UnknownBlock { + constructor(name, sourceSpan, nameSpan) { + this.name = name; + this.sourceSpan = sourceSpan; + this.nameSpan = nameSpan; + } + visit(visitor) { + return visitor.visitUnknownBlock(this); + } +} +class LetDeclaration$1 { + constructor(name, value, sourceSpan, nameSpan, valueSpan) { + this.name = name; + this.value = value; + this.sourceSpan = sourceSpan; + this.nameSpan = nameSpan; + this.valueSpan = valueSpan; + } + visit(visitor) { + return visitor.visitLetDeclaration(this); + } +} +class Template { + constructor( + // tagName is the name of the container element, if applicable. + // `null` is a special case for when there is a structural directive on an `ng-template` so + // the renderer can differentiate between the synthetic template and the one written in the + // file. + tagName, attributes, inputs, outputs, templateAttrs, children, references, variables, sourceSpan, startSourceSpan, endSourceSpan, i18n) { + this.tagName = tagName; + this.attributes = attributes; + this.inputs = inputs; + this.outputs = outputs; + this.templateAttrs = templateAttrs; + this.children = children; + this.references = references; + this.variables = variables; + this.sourceSpan = sourceSpan; + this.startSourceSpan = startSourceSpan; + this.endSourceSpan = endSourceSpan; + this.i18n = i18n; + } + visit(visitor) { + return visitor.visitTemplate(this); + } +} +class Content { + constructor(selector, attributes, children, sourceSpan, i18n) { + this.selector = selector; + this.attributes = attributes; + this.children = children; + this.sourceSpan = sourceSpan; + this.i18n = i18n; + this.name = 'ng-content'; + } + visit(visitor) { + return visitor.visitContent(this); + } +} +class Variable { + constructor(name, value, sourceSpan, keySpan, valueSpan) { + this.name = name; + this.value = value; + this.sourceSpan = sourceSpan; + this.keySpan = keySpan; + this.valueSpan = valueSpan; + } + visit(visitor) { + return visitor.visitVariable(this); + } +} +class Reference { + constructor(name, value, sourceSpan, keySpan, valueSpan) { + this.name = name; + this.value = value; + this.sourceSpan = sourceSpan; + this.keySpan = keySpan; + this.valueSpan = valueSpan; + } + visit(visitor) { + return visitor.visitReference(this); + } +} +class Icu$1 { + constructor(vars, placeholders, sourceSpan, i18n) { + this.vars = vars; + this.placeholders = placeholders; + this.sourceSpan = sourceSpan; + this.i18n = i18n; + } + visit(visitor) { + return visitor.visitIcu(this); + } +} +class RecursiveVisitor$1 { + visitElement(element) { + visitAll$1(this, element.attributes); + visitAll$1(this, element.inputs); + visitAll$1(this, element.outputs); + visitAll$1(this, element.children); + visitAll$1(this, element.references); + } + visitTemplate(template) { + visitAll$1(this, template.attributes); + visitAll$1(this, template.inputs); + visitAll$1(this, template.outputs); + visitAll$1(this, template.children); + visitAll$1(this, template.references); + visitAll$1(this, template.variables); + } + visitDeferredBlock(deferred) { + deferred.visitAll(this); + } + visitDeferredBlockPlaceholder(block) { + visitAll$1(this, block.children); + } + visitDeferredBlockError(block) { + visitAll$1(this, block.children); + } + visitDeferredBlockLoading(block) { + visitAll$1(this, block.children); + } + visitSwitchBlock(block) { + visitAll$1(this, block.cases); + } + visitSwitchBlockCase(block) { + visitAll$1(this, block.children); + } + visitForLoopBlock(block) { + const blockItems = [block.item, ...block.contextVariables, ...block.children]; + block.empty && blockItems.push(block.empty); + visitAll$1(this, blockItems); + } + visitForLoopBlockEmpty(block) { + visitAll$1(this, block.children); + } + visitIfBlock(block) { + visitAll$1(this, block.branches); + } + visitIfBlockBranch(block) { + const blockItems = block.children; + block.expressionAlias && blockItems.push(block.expressionAlias); + visitAll$1(this, blockItems); + } + visitContent(content) { + visitAll$1(this, content.children); + } + visitVariable(variable) {} + visitReference(reference) {} + visitTextAttribute(attribute) {} + visitBoundAttribute(attribute) {} + visitBoundEvent(attribute) {} + visitText(text) {} + visitBoundText(text) {} + visitIcu(icu) {} + visitDeferredTrigger(trigger) {} + visitUnknownBlock(block) {} + visitLetDeclaration(decl) {} +} +function visitAll$1(visitor, nodes) { + const result = []; + if (visitor.visit) { + for (const node of nodes) { + visitor.visit(node) || node.visit(visitor); + } + } else { + for (const node of nodes) { + const newNode = node.visit(visitor); + if (newNode) { + result.push(newNode); + } + } + } + return result; +} +class Message { + /** + * @param nodes message AST + * @param placeholders maps placeholder names to static content and their source spans + * @param placeholderToMessage maps placeholder names to messages (used for nested ICU messages) + * @param meaning + * @param description + * @param customId + */ + constructor(nodes, placeholders, placeholderToMessage, meaning, description, customId) { + this.nodes = nodes; + this.placeholders = placeholders; + this.placeholderToMessage = placeholderToMessage; + this.meaning = meaning; + this.description = description; + this.customId = customId; + /** The ids to use if there are no custom id and if `i18nLegacyMessageIdFormat` is not empty */ + this.legacyIds = []; + this.id = this.customId; + this.messageString = serializeMessage(this.nodes); + if (nodes.length) { + this.sources = [{ + filePath: nodes[0].sourceSpan.start.file.url, + startLine: nodes[0].sourceSpan.start.line + 1, + startCol: nodes[0].sourceSpan.start.col + 1, + endLine: nodes[nodes.length - 1].sourceSpan.end.line + 1, + endCol: nodes[0].sourceSpan.start.col + 1 + }]; + } else { + this.sources = []; + } + } +} +class Text$2 { + constructor(value, sourceSpan) { + this.value = value; + this.sourceSpan = sourceSpan; + } + visit(visitor, context) { + return visitor.visitText(this, context); + } +} +// TODO(vicb): do we really need this node (vs an array) ? +class Container { + constructor(children, sourceSpan) { + this.children = children; + this.sourceSpan = sourceSpan; + } + visit(visitor, context) { + return visitor.visitContainer(this, context); + } +} +class Icu { + constructor(expression, type, cases, sourceSpan, expressionPlaceholder) { + this.expression = expression; + this.type = type; + this.cases = cases; + this.sourceSpan = sourceSpan; + this.expressionPlaceholder = expressionPlaceholder; + } + visit(visitor, context) { + return visitor.visitIcu(this, context); + } +} +class TagPlaceholder { + constructor(tag, attrs, startName, closeName, children, isVoid, + // TODO sourceSpan should cover all (we need a startSourceSpan and endSourceSpan) + sourceSpan, startSourceSpan, endSourceSpan) { + this.tag = tag; + this.attrs = attrs; + this.startName = startName; + this.closeName = closeName; + this.children = children; + this.isVoid = isVoid; + this.sourceSpan = sourceSpan; + this.startSourceSpan = startSourceSpan; + this.endSourceSpan = endSourceSpan; + } + visit(visitor, context) { + return visitor.visitTagPlaceholder(this, context); + } +} +class Placeholder { + constructor(value, name, sourceSpan) { + this.value = value; + this.name = name; + this.sourceSpan = sourceSpan; + } + visit(visitor, context) { + return visitor.visitPlaceholder(this, context); + } +} +class IcuPlaceholder { + constructor(value, name, sourceSpan) { + this.value = value; + this.name = name; + this.sourceSpan = sourceSpan; + } + visit(visitor, context) { + return visitor.visitIcuPlaceholder(this, context); + } +} +class BlockPlaceholder { + constructor(name, parameters, startName, closeName, children, sourceSpan, startSourceSpan, endSourceSpan) { + this.name = name; + this.parameters = parameters; + this.startName = startName; + this.closeName = closeName; + this.children = children; + this.sourceSpan = sourceSpan; + this.startSourceSpan = startSourceSpan; + this.endSourceSpan = endSourceSpan; + } + visit(visitor, context) { + return visitor.visitBlockPlaceholder(this, context); + } +} +// Clone the AST +class CloneVisitor { + visitText(text, context) { + return new Text$2(text.value, text.sourceSpan); + } + visitContainer(container, context) { + const children = container.children.map(n => n.visit(this, context)); + return new Container(children, container.sourceSpan); + } + visitIcu(icu, context) { + const cases = {}; + Object.keys(icu.cases).forEach(key => cases[key] = icu.cases[key].visit(this, context)); + const msg = new Icu(icu.expression, icu.type, cases, icu.sourceSpan, icu.expressionPlaceholder); + return msg; + } + visitTagPlaceholder(ph, context) { + const children = ph.children.map(n => n.visit(this, context)); + return new TagPlaceholder(ph.tag, ph.attrs, ph.startName, ph.closeName, children, ph.isVoid, ph.sourceSpan, ph.startSourceSpan, ph.endSourceSpan); + } + visitPlaceholder(ph, context) { + return new Placeholder(ph.value, ph.name, ph.sourceSpan); + } + visitIcuPlaceholder(ph, context) { + return new IcuPlaceholder(ph.value, ph.name, ph.sourceSpan); + } + visitBlockPlaceholder(ph, context) { + const children = ph.children.map(n => n.visit(this, context)); + return new BlockPlaceholder(ph.name, ph.parameters, ph.startName, ph.closeName, children, ph.sourceSpan, ph.startSourceSpan, ph.endSourceSpan); + } +} +// Visit all the nodes recursively +class RecurseVisitor { + visitText(text, context) {} + visitContainer(container, context) { + container.children.forEach(child => child.visit(this)); + } + visitIcu(icu, context) { + Object.keys(icu.cases).forEach(k => { + icu.cases[k].visit(this); + }); + } + visitTagPlaceholder(ph, context) { + ph.children.forEach(child => child.visit(this)); + } + visitPlaceholder(ph, context) {} + visitIcuPlaceholder(ph, context) {} + visitBlockPlaceholder(ph, context) { + ph.children.forEach(child => child.visit(this)); + } +} +/** + * Serialize the message to the Localize backtick string format that would appear in compiled code. + */ +function serializeMessage(messageNodes) { + const visitor = new LocalizeMessageStringVisitor(); + const str = messageNodes.map(n => n.visit(visitor)).join(''); + return str; +} +class LocalizeMessageStringVisitor { + visitText(text) { + return text.value; + } + visitContainer(container) { + return container.children.map(child => child.visit(this)).join(''); + } + visitIcu(icu) { + const strCases = Object.keys(icu.cases).map(k => `${k} {${icu.cases[k].visit(this)}}`); + return `{${icu.expressionPlaceholder}, ${icu.type}, ${strCases.join(' ')}}`; + } + visitTagPlaceholder(ph) { + const children = ph.children.map(child => child.visit(this)).join(''); + return `{$${ph.startName}}${children}{$${ph.closeName}}`; + } + visitPlaceholder(ph) { + return `{$${ph.name}}`; + } + visitIcuPlaceholder(ph) { + return `{$${ph.name}}`; + } + visitBlockPlaceholder(ph) { + const children = ph.children.map(child => child.visit(this)).join(''); + return `{$${ph.startName}}${children}{$${ph.closeName}}`; + } +} +class Serializer { + // Creates a name mapper, see `PlaceholderMapper` + // Returning `null` means that no name mapping is used. + createNameMapper(message) { + return null; + } +} +/** + * A simple mapper that take a function to transform an internal name to a public name + */ +class SimplePlaceholderMapper extends RecurseVisitor { + // create a mapping from the message + constructor(message, mapName) { + super(); + this.mapName = mapName; + this.internalToPublic = {}; + this.publicToNextId = {}; + this.publicToInternal = {}; + message.nodes.forEach(node => node.visit(this)); + } + toPublicName(internalName) { + return this.internalToPublic.hasOwnProperty(internalName) ? this.internalToPublic[internalName] : null; + } + toInternalName(publicName) { + return this.publicToInternal.hasOwnProperty(publicName) ? this.publicToInternal[publicName] : null; + } + visitText(text, context) { + return null; + } + visitTagPlaceholder(ph, context) { + this.visitPlaceholderName(ph.startName); + super.visitTagPlaceholder(ph, context); + this.visitPlaceholderName(ph.closeName); + } + visitPlaceholder(ph, context) { + this.visitPlaceholderName(ph.name); + } + visitBlockPlaceholder(ph, context) { + this.visitPlaceholderName(ph.startName); + super.visitBlockPlaceholder(ph, context); + this.visitPlaceholderName(ph.closeName); + } + visitIcuPlaceholder(ph, context) { + this.visitPlaceholderName(ph.name); + } + // XMB placeholders could only contains A-Z, 0-9 and _ + visitPlaceholderName(internalName) { + if (!internalName || this.internalToPublic.hasOwnProperty(internalName)) { + return; + } + let publicName = this.mapName(internalName); + if (this.publicToInternal.hasOwnProperty(publicName)) { + // Create a new XMB when it has already been used + const nextId = this.publicToNextId[publicName]; + this.publicToNextId[publicName] = nextId + 1; + publicName = `${publicName}_${nextId}`; + } else { + this.publicToNextId[publicName] = 1; + } + this.internalToPublic[internalName] = publicName; + this.publicToInternal[publicName] = internalName; + } +} +class _Visitor$2 { + visitTag(tag) { + const strAttrs = this._serializeAttributes(tag.attrs); + if (tag.children.length == 0) { + return `<${tag.name}${strAttrs}/>`; + } + const strChildren = tag.children.map(node => node.visit(this)); + return `<${tag.name}${strAttrs}>${strChildren.join('')}`; + } + visitText(text) { + return text.value; + } + visitDeclaration(decl) { + return ``; + } + _serializeAttributes(attrs) { + const strAttrs = Object.keys(attrs).map(name => `${name}="${attrs[name]}"`).join(' '); + return strAttrs.length > 0 ? ' ' + strAttrs : ''; + } + visitDoctype(doctype) { + return ``; + } +} +const _visitor = new _Visitor$2(); +function serialize(nodes) { + return nodes.map(node => node.visit(_visitor)).join(''); +} +class Declaration { + constructor(unescapedAttrs) { + this.attrs = {}; + Object.keys(unescapedAttrs).forEach(k => { + this.attrs[k] = escapeXml(unescapedAttrs[k]); + }); + } + visit(visitor) { + return visitor.visitDeclaration(this); + } +} +class Doctype { + constructor(rootTag, dtd) { + this.rootTag = rootTag; + this.dtd = dtd; + } + visit(visitor) { + return visitor.visitDoctype(this); + } +} +class Tag { + constructor(name, unescapedAttrs = {}, children = []) { + this.name = name; + this.children = children; + this.attrs = {}; + Object.keys(unescapedAttrs).forEach(k => { + this.attrs[k] = escapeXml(unescapedAttrs[k]); + }); + } + visit(visitor) { + return visitor.visitTag(this); + } +} +class Text$1 { + constructor(unescapedValue) { + this.value = escapeXml(unescapedValue); + } + visit(visitor) { + return visitor.visitText(this); + } +} +class CR extends Text$1 { + constructor(ws = 0) { + super(`\n${new Array(ws + 1).join(' ')}`); + } +} +const _ESCAPED_CHARS = [[/&/g, '&'], [/"/g, '"'], [/'/g, '''], [//g, '>']]; +// Escape `_ESCAPED_CHARS` characters in the given text with encoded entities +function escapeXml(text) { + return _ESCAPED_CHARS.reduce((text, entry) => text.replace(entry[0], entry[1]), text); +} + +/** + * Defines the `handler` value on the serialized XMB, indicating that Angular + * generated the bundle. This is useful for analytics in Translation Console. + * + * NOTE: Keep in sync with + * packages/localize/tools/src/extract/translation_files/xmb_translation_serializer.ts. + */ +const _XMB_HANDLER = 'angular'; +const _MESSAGES_TAG = 'messagebundle'; +const _MESSAGE_TAG = 'msg'; +const _PLACEHOLDER_TAG$3 = 'ph'; +const _EXAMPLE_TAG = 'ex'; +const _SOURCE_TAG$2 = 'source'; +const _DOCTYPE = ` + + + + + + + + + + + + + + + + + +`; +class Xmb extends Serializer { + constructor(preservePlaceholders = true) { + super(); + this.preservePlaceholders = preservePlaceholders; + } + write(messages, locale) { + const exampleVisitor = new ExampleVisitor(); + const visitor = new _Visitor$1(); + const rootNode = new Tag(_MESSAGES_TAG); + rootNode.attrs['handler'] = _XMB_HANDLER; + messages.forEach(message => { + const attrs = { + id: message.id + }; + if (message.description) { + attrs['desc'] = message.description; + } + if (message.meaning) { + attrs['meaning'] = message.meaning; + } + let sourceTags = []; + message.sources.forEach(source => { + sourceTags.push(new Tag(_SOURCE_TAG$2, {}, [new Text$1(`${source.filePath}:${source.startLine}${source.endLine !== source.startLine ? ',' + source.endLine : ''}`)])); + }); + rootNode.children.push(new CR(2), new Tag(_MESSAGE_TAG, attrs, [...sourceTags, ...visitor.serialize(message.nodes)])); + }); + rootNode.children.push(new CR()); + return serialize([new Declaration({ + version: '1.0', + encoding: 'UTF-8' + }), new CR(), new Doctype(_MESSAGES_TAG, _DOCTYPE), new CR(), exampleVisitor.addDefaultExamples(rootNode), new CR()]); + } + load(content, url) { + throw new Error('Unsupported'); + } + digest(message) { + return digest(message, this.preservePlaceholders); + } + createNameMapper(message) { + return new SimplePlaceholderMapper(message, toPublicName); + } +} +class _Visitor$1 { + visitText(text, context) { + return [new Text$1(text.value)]; + } + visitContainer(container, context) { + const nodes = []; + container.children.forEach(node => nodes.push(...node.visit(this))); + return nodes; + } + visitIcu(icu, context) { + const nodes = [new Text$1(`{${icu.expressionPlaceholder}, ${icu.type}, `)]; + Object.keys(icu.cases).forEach(c => { + nodes.push(new Text$1(`${c} {`), ...icu.cases[c].visit(this), new Text$1(`} `)); + }); + nodes.push(new Text$1(`}`)); + return nodes; + } + visitTagPlaceholder(ph, context) { + const startTagAsText = new Text$1(`<${ph.tag}>`); + const startEx = new Tag(_EXAMPLE_TAG, {}, [startTagAsText]); + // TC requires PH to have a non empty EX, and uses the text node to show the "original" value. + const startTagPh = new Tag(_PLACEHOLDER_TAG$3, { + name: ph.startName + }, [startEx, startTagAsText]); + if (ph.isVoid) { + // void tags have no children nor closing tags + return [startTagPh]; + } + const closeTagAsText = new Text$1(``); + const closeEx = new Tag(_EXAMPLE_TAG, {}, [closeTagAsText]); + // TC requires PH to have a non empty EX, and uses the text node to show the "original" value. + const closeTagPh = new Tag(_PLACEHOLDER_TAG$3, { + name: ph.closeName + }, [closeEx, closeTagAsText]); + return [startTagPh, ...this.serialize(ph.children), closeTagPh]; + } + visitPlaceholder(ph, context) { + const interpolationAsText = new Text$1(`{{${ph.value}}}`); + // Example tag needs to be not-empty for TC. + const exTag = new Tag(_EXAMPLE_TAG, {}, [interpolationAsText]); + return [ + // TC requires PH to have a non empty EX, and uses the text node to show the "original" value. + new Tag(_PLACEHOLDER_TAG$3, { + name: ph.name + }, [exTag, interpolationAsText])]; + } + visitBlockPlaceholder(ph, context) { + const startAsText = new Text$1(`@${ph.name}`); + const startEx = new Tag(_EXAMPLE_TAG, {}, [startAsText]); + // TC requires PH to have a non empty EX, and uses the text node to show the "original" value. + const startTagPh = new Tag(_PLACEHOLDER_TAG$3, { + name: ph.startName + }, [startEx, startAsText]); + const closeAsText = new Text$1(`}`); + const closeEx = new Tag(_EXAMPLE_TAG, {}, [closeAsText]); + // TC requires PH to have a non empty EX, and uses the text node to show the "original" value. + const closeTagPh = new Tag(_PLACEHOLDER_TAG$3, { + name: ph.closeName + }, [closeEx, closeAsText]); + return [startTagPh, ...this.serialize(ph.children), closeTagPh]; + } + visitIcuPlaceholder(ph, context) { + const icuExpression = ph.value.expression; + const icuType = ph.value.type; + const icuCases = Object.keys(ph.value.cases).map(value => value + ' {...}').join(' '); + const icuAsText = new Text$1(`{${icuExpression}, ${icuType}, ${icuCases}}`); + const exTag = new Tag(_EXAMPLE_TAG, {}, [icuAsText]); + return [ + // TC requires PH to have a non empty EX, and uses the text node to show the "original" value. + new Tag(_PLACEHOLDER_TAG$3, { + name: ph.name + }, [exTag, icuAsText])]; + } + serialize(nodes) { + return [].concat(...nodes.map(node => node.visit(this))); + } +} +function digest(message, preservePlaceholders) { + return decimalDigest(message, preservePlaceholders); +} +// TC requires at least one non-empty example on placeholders +class ExampleVisitor { + addDefaultExamples(node) { + node.visit(this); + return node; + } + visitTag(tag) { + if (tag.name === _PLACEHOLDER_TAG$3) { + if (!tag.children || tag.children.length == 0) { + const exText = new Text$1(tag.attrs['name'] || '...'); + tag.children = [new Tag(_EXAMPLE_TAG, {}, [exText])]; + } + } else if (tag.children) { + tag.children.forEach(node => node.visit(this)); + } + } + visitText(text) {} + visitDeclaration(decl) {} + visitDoctype(doctype) {} +} +// XMB/XTB placeholders can only contain A-Z, 0-9 and _ +function toPublicName(internalName) { + return internalName.toUpperCase().replace(/[^A-Z0-9_]/g, '_'); +} + +/** Name of the i18n attributes **/ +const I18N_ATTR = 'i18n'; +const I18N_ATTR_PREFIX = 'i18n-'; +/** Prefix of var expressions used in ICUs */ +const I18N_ICU_VAR_PREFIX = 'VAR_'; +function isI18nAttribute(name) { + return name === I18N_ATTR || name.startsWith(I18N_ATTR_PREFIX); +} +function hasI18nAttrs(element) { + return element.attrs.some(attr => isI18nAttribute(attr.name)); +} +function icuFromI18nMessage(message) { + return message.nodes[0]; +} +function placeholdersToParams(placeholders) { + const params = {}; + placeholders.forEach((values, key) => { + params[key] = literal(values.length > 1 ? `[${values.join('|')}]` : values[0]); + }); + return params; +} +/** + * Format the placeholder names in a map of placeholders to expressions. + * + * The placeholder names are converted from "internal" format (e.g. `START_TAG_DIV_1`) to "external" + * format (e.g. `startTagDiv_1`). + * + * @param params A map of placeholder names to expressions. + * @param useCamelCase whether to camelCase the placeholder name when formatting. + * @returns A new map of formatted placeholder names to expressions. + */ +function formatI18nPlaceholderNamesInMap(params = {}, useCamelCase) { + const _params = {}; + if (params && Object.keys(params).length) { + Object.keys(params).forEach(key => _params[formatI18nPlaceholderName(key, useCamelCase)] = params[key]); + } + return _params; +} +/** + * Converts internal placeholder names to public-facing format + * (for example to use in goog.getMsg call). + * Example: `START_TAG_DIV_1` is converted to `startTagDiv_1`. + * + * @param name The placeholder name that should be formatted + * @returns Formatted placeholder name + */ +function formatI18nPlaceholderName(name, useCamelCase = true) { + const publicName = toPublicName(name); + if (!useCamelCase) { + return publicName; + } + const chunks = publicName.split('_'); + if (chunks.length === 1) { + // if no "_" found - just lowercase the value + return name.toLowerCase(); + } + let postfix; + // eject last element if it's a number + if (/^\d+$/.test(chunks[chunks.length - 1])) { + postfix = chunks.pop(); + } + let raw = chunks.shift().toLowerCase(); + if (chunks.length) { + raw += chunks.map(c => c.charAt(0).toUpperCase() + c.slice(1).toLowerCase()).join(''); + } + return postfix ? `${raw}_${postfix}` : raw; +} + +/** + * Checks whether an object key contains potentially unsafe chars, thus the key should be wrapped in + * quotes. Note: we do not wrap all keys into quotes, as it may have impact on minification and may + * not work in some cases when object keys are mangled by a minifier. + * + * TODO(FW-1136): this is a temporary solution, we need to come up with a better way of working with + * inputs that contain potentially unsafe chars. + */ +const UNSAFE_OBJECT_KEY_NAME_REGEXP = /[-.]/; +/** Name of the temporary to use during data binding */ +const TEMPORARY_NAME = '_t'; +/** Name of the context parameter passed into a template function */ +const CONTEXT_NAME = 'ctx'; +/** Name of the RenderFlag passed into a template function */ +const RENDER_FLAGS = 'rf'; +/** + * Creates an allocator for a temporary variable. + * + * A variable declaration is added to the statements the first time the allocator is invoked. + */ +function temporaryAllocator(pushStatement, name) { + let temp = null; + return () => { + if (!temp) { + pushStatement(new DeclareVarStmt(TEMPORARY_NAME, undefined, DYNAMIC_TYPE)); + temp = variable(name); + } + return temp; + }; +} +function invalid(arg) { + throw new Error(`Invalid state: Visitor ${this.constructor.name} doesn't handle ${arg.constructor.name}`); +} +function asLiteral(value) { + if (Array.isArray(value)) { + return literalArr(value.map(asLiteral)); + } + return literal(value, INFERRED_TYPE); +} +/** + * Serializes inputs and outputs for `defineDirective` and `defineComponent`. + * + * This will attempt to generate optimized data structures to minimize memory or + * file size of fully compiled applications. + */ +function conditionallyCreateDirectiveBindingLiteral(map, forInputs) { + const keys = Object.getOwnPropertyNames(map); + if (keys.length === 0) { + return null; + } + return literalMap(keys.map(key => { + const value = map[key]; + let declaredName; + let publicName; + let minifiedName; + let expressionValue; + if (typeof value === 'string') { + // canonical syntax: `dirProp: publicProp` + declaredName = key; + minifiedName = key; + publicName = value; + expressionValue = asLiteral(publicName); + } else { + minifiedName = key; + declaredName = value.classPropertyName; + publicName = value.bindingPropertyName; + const differentDeclaringName = publicName !== declaredName; + const hasDecoratorInputTransform = value.transformFunction !== null; + let flags = InputFlags.None; + // Build up input flags + if (value.isSignal) { + flags |= InputFlags.SignalBased; + } + if (hasDecoratorInputTransform) { + flags |= InputFlags.HasDecoratorInputTransform; + } + // Inputs, compared to outputs, will track their declared name (for `ngOnChanges`), support + // decorator input transform functions, or store flag information if there is any. + if (forInputs && (differentDeclaringName || hasDecoratorInputTransform || flags !== InputFlags.None)) { + const result = [literal(flags), asLiteral(publicName)]; + if (differentDeclaringName || hasDecoratorInputTransform) { + result.push(asLiteral(declaredName)); + if (hasDecoratorInputTransform) { + result.push(value.transformFunction); + } + } + expressionValue = literalArr(result); + } else { + expressionValue = asLiteral(publicName); + } + } + return { + key: minifiedName, + // put quotes around keys that contain potentially unsafe characters + quoted: UNSAFE_OBJECT_KEY_NAME_REGEXP.test(minifiedName), + value: expressionValue + }; + })); +} +/** + * A representation for an object literal used during codegen of definition objects. The generic + * type `T` allows to reference a documented type of the generated structure, such that the + * property names that are set can be resolved to their documented declaration. + */ +class DefinitionMap { + constructor() { + this.values = []; + } + set(key, value) { + if (value) { + const existing = this.values.find(value => value.key === key); + if (existing) { + existing.value = value; + } else { + this.values.push({ + key: key, + value, + quoted: false + }); + } + } + } + toLiteralMap() { + return literalMap(this.values); + } +} +/** + * Creates a `CssSelector` from an AST node. + */ +function createCssSelectorFromNode(node) { + const elementName = node instanceof Element$1 ? node.name : 'ng-template'; + const attributes = getAttrsForDirectiveMatching(node); + const cssSelector = new CssSelector(); + const elementNameNoNs = splitNsName(elementName)[1]; + cssSelector.setElement(elementNameNoNs); + Object.getOwnPropertyNames(attributes).forEach(name => { + const nameNoNs = splitNsName(name)[1]; + const value = attributes[name]; + cssSelector.addAttribute(nameNoNs, value); + if (name.toLowerCase() === 'class') { + const classes = value.trim().split(/\s+/); + classes.forEach(className => cssSelector.addClassName(className)); + } + }); + return cssSelector; +} +/** + * Extract a map of properties to values for a given element or template node, which can be used + * by the directive matching machinery. + * + * @param elOrTpl the element or template in question + * @return an object set up for directive matching. For attributes on the element/template, this + * object maps a property name to its (static) value. For any bindings, this map simply maps the + * property name to an empty string. + */ +function getAttrsForDirectiveMatching(elOrTpl) { + const attributesMap = {}; + if (elOrTpl instanceof Template && elOrTpl.tagName !== 'ng-template') { + elOrTpl.templateAttrs.forEach(a => attributesMap[a.name] = ''); + } else { + elOrTpl.attributes.forEach(a => { + if (!isI18nAttribute(a.name)) { + attributesMap[a.name] = a.value; + } + }); + elOrTpl.inputs.forEach(i => { + if (i.type === BindingType.Property || i.type === BindingType.TwoWay) { + attributesMap[i.name] = ''; + } + }); + elOrTpl.outputs.forEach(o => { + attributesMap[o.name] = ''; + }); + } + return attributesMap; +} +function compileInjectable(meta, resolveForwardRefs) { + let result = null; + const factoryMeta = { + name: meta.name, + type: meta.type, + typeArgumentCount: meta.typeArgumentCount, + deps: [], + target: FactoryTarget$1.Injectable + }; + if (meta.useClass !== undefined) { + // meta.useClass has two modes of operation. Either deps are specified, in which case `new` is + // used to instantiate the class with dependencies injected, or deps are not specified and + // the factory of the class is used to instantiate it. + // + // A special case exists for useClass: Type where Type is the injectable type itself and no + // deps are specified, in which case 'useClass' is effectively ignored. + const useClassOnSelf = meta.useClass.expression.isEquivalent(meta.type.value); + let deps = undefined; + if (meta.deps !== undefined) { + deps = meta.deps; + } + if (deps !== undefined) { + // factory: () => new meta.useClass(...deps) + result = compileFactoryFunction({ + ...factoryMeta, + delegate: meta.useClass.expression, + delegateDeps: deps, + delegateType: R3FactoryDelegateType.Class + }); + } else if (useClassOnSelf) { + result = compileFactoryFunction(factoryMeta); + } else { + result = { + statements: [], + expression: delegateToFactory(meta.type.value, meta.useClass.expression, resolveForwardRefs) + }; + } + } else if (meta.useFactory !== undefined) { + if (meta.deps !== undefined) { + result = compileFactoryFunction({ + ...factoryMeta, + delegate: meta.useFactory, + delegateDeps: meta.deps || [], + delegateType: R3FactoryDelegateType.Function + }); + } else { + result = { + statements: [], + expression: arrowFn([], meta.useFactory.callFn([])) + }; + } + } else if (meta.useValue !== undefined) { + // Note: it's safe to use `meta.useValue` instead of the `USE_VALUE in meta` check used for + // client code because meta.useValue is an Expression which will be defined even if the actual + // value is undefined. + result = compileFactoryFunction({ + ...factoryMeta, + expression: meta.useValue.expression + }); + } else if (meta.useExisting !== undefined) { + // useExisting is an `inject` call on the existing token. + result = compileFactoryFunction({ + ...factoryMeta, + expression: importExpr(Identifiers.inject).callFn([meta.useExisting.expression]) + }); + } else { + result = { + statements: [], + expression: delegateToFactory(meta.type.value, meta.type.value, resolveForwardRefs) + }; + } + const token = meta.type.value; + const injectableProps = new DefinitionMap(); + injectableProps.set('token', token); + injectableProps.set('factory', result.expression); + // Only generate providedIn property if it has a non-null value + if (meta.providedIn.expression.value !== null) { + injectableProps.set('providedIn', convertFromMaybeForwardRefExpression(meta.providedIn)); + } + const expression = importExpr(Identifiers.ɵɵdefineInjectable).callFn([injectableProps.toLiteralMap()], undefined, true); + return { + expression, + type: createInjectableType(meta), + statements: result.statements + }; +} +function createInjectableType(meta) { + return new ExpressionType(importExpr(Identifiers.InjectableDeclaration, [typeWithParameters(meta.type.type, meta.typeArgumentCount)])); +} +function delegateToFactory(type, useType, unwrapForwardRefs) { + if (type.node === useType.node) { + // The types are the same, so we can simply delegate directly to the type's factory. + // ``` + // factory: type.ɵfac + // ``` + return useType.prop('ɵfac'); + } + if (!unwrapForwardRefs) { + // The type is not wrapped in a `forwardRef()`, so we create a simple factory function that + // accepts a sub-type as an argument. + // ``` + // factory: function(t) { return useType.ɵfac(t); } + // ``` + return createFactoryFunction(useType); + } + // The useType is actually wrapped in a `forwardRef()` so we need to resolve that before + // calling its factory. + // ``` + // factory: function(t) { return core.resolveForwardRef(type).ɵfac(t); } + // ``` + const unwrappedType = importExpr(Identifiers.resolveForwardRef).callFn([useType]); + return createFactoryFunction(unwrappedType); +} +function createFactoryFunction(type) { + const t = new FnParam('__ngFactoryType__', DYNAMIC_TYPE); + return arrowFn([t], type.prop('ɵfac').callFn([variable(t.name)])); +} +const UNUSABLE_INTERPOLATION_REGEXPS = [/@/, +// control flow reserved symbol +/^\s*$/, +// empty +/[<>]/, +// html tag +/^[{}]$/, +// i18n expansion +/&(#|[a-z])/i, +// character reference, +/^\/\// // comment +]; +function assertInterpolationSymbols(identifier, value) { + if (value != null && !(Array.isArray(value) && value.length == 2)) { + throw new Error(`Expected '${identifier}' to be an array, [start, end].`); + } else if (value != null) { + const start = value[0]; + const end = value[1]; + // Check for unusable interpolation symbols + UNUSABLE_INTERPOLATION_REGEXPS.forEach(regexp => { + if (regexp.test(start) || regexp.test(end)) { + throw new Error(`['${start}', '${end}'] contains unusable interpolation symbol.`); + } + }); + } +} +class InterpolationConfig { + static fromArray(markers) { + if (!markers) { + return DEFAULT_INTERPOLATION_CONFIG; + } + assertInterpolationSymbols('interpolation', markers); + return new InterpolationConfig(markers[0], markers[1]); + } + constructor(start, end) { + this.start = start; + this.end = end; + } +} +const DEFAULT_INTERPOLATION_CONFIG = new InterpolationConfig('{{', '}}'); +const DEFAULT_CONTAINER_BLOCKS = new Set(['switch']); +const $EOF = 0; +const $BSPACE = 8; +const $TAB = 9; +const $LF = 10; +const $VTAB = 11; +const $FF = 12; +const $CR = 13; +const $SPACE = 32; +const $BANG = 33; +const $DQ = 34; +const $HASH = 35; +const $$ = 36; +const $PERCENT = 37; +const $AMPERSAND = 38; +const $SQ = 39; +const $LPAREN = 40; +const $RPAREN = 41; +const $STAR = 42; +const $PLUS = 43; +const $COMMA = 44; +const $MINUS = 45; +const $PERIOD = 46; +const $SLASH = 47; +const $COLON = 58; +const $SEMICOLON = 59; +const $LT = 60; +const $EQ = 61; +const $GT = 62; +const $QUESTION = 63; +const $0 = 48; +const $7 = 55; +const $9 = 57; +const $A = 65; +const $E = 69; +const $F = 70; +const $X = 88; +const $Z = 90; +const $LBRACKET = 91; +const $BACKSLASH = 92; +const $RBRACKET = 93; +const $CARET = 94; +const $_ = 95; +const $a = 97; +const $b = 98; +const $e = 101; +const $f = 102; +const $n = 110; +const $r = 114; +const $t = 116; +const $u = 117; +const $v = 118; +const $x = 120; +const $z = 122; +const $LBRACE = 123; +const $BAR = 124; +const $RBRACE = 125; +const $NBSP = 160; +const $PIPE = 124; +const $TILDA = 126; +const $AT = 64; +const $BT = 96; +function isWhitespace(code) { + return code >= $TAB && code <= $SPACE || code == $NBSP; +} +function isDigit(code) { + return $0 <= code && code <= $9; +} +function isAsciiLetter(code) { + return code >= $a && code <= $z || code >= $A && code <= $Z; +} +function isAsciiHexDigit(code) { + return code >= $a && code <= $f || code >= $A && code <= $F || isDigit(code); +} +function isNewLine(code) { + return code === $LF || code === $CR; +} +function isOctalDigit(code) { + return $0 <= code && code <= $7; +} +function isQuote(code) { + return code === $SQ || code === $DQ || code === $BT; +} +class ParseLocation { + constructor(file, offset, line, col) { + this.file = file; + this.offset = offset; + this.line = line; + this.col = col; + } + toString() { + return this.offset != null ? `${this.file.url}@${this.line}:${this.col}` : this.file.url; + } + moveBy(delta) { + const source = this.file.content; + const len = source.length; + let offset = this.offset; + let line = this.line; + let col = this.col; + while (offset > 0 && delta < 0) { + offset--; + delta++; + const ch = source.charCodeAt(offset); + if (ch == $LF) { + line--; + const priorLine = source.substring(0, offset - 1).lastIndexOf(String.fromCharCode($LF)); + col = priorLine > 0 ? offset - priorLine : offset; + } else { + col--; + } + } + while (offset < len && delta > 0) { + const ch = source.charCodeAt(offset); + offset++; + delta--; + if (ch == $LF) { + line++; + col = 0; + } else { + col++; + } + } + return new ParseLocation(this.file, offset, line, col); + } + // Return the source around the location + // Up to `maxChars` or `maxLines` on each side of the location + getContext(maxChars, maxLines) { + const content = this.file.content; + let startOffset = this.offset; + if (startOffset != null) { + if (startOffset > content.length - 1) { + startOffset = content.length - 1; + } + let endOffset = startOffset; + let ctxChars = 0; + let ctxLines = 0; + while (ctxChars < maxChars && startOffset > 0) { + startOffset--; + ctxChars++; + if (content[startOffset] == '\n') { + if (++ctxLines == maxLines) { + break; + } + } + } + ctxChars = 0; + ctxLines = 0; + while (ctxChars < maxChars && endOffset < content.length - 1) { + endOffset++; + ctxChars++; + if (content[endOffset] == '\n') { + if (++ctxLines == maxLines) { + break; + } + } + } + return { + before: content.substring(startOffset, this.offset), + after: content.substring(this.offset, endOffset + 1) + }; + } + return null; + } +} +class ParseSourceFile { + constructor(content, url) { + this.content = content; + this.url = url; + } +} +class ParseSourceSpan { + /** + * Create an object that holds information about spans of tokens/nodes captured during + * lexing/parsing of text. + * + * @param start + * The location of the start of the span (having skipped leading trivia). + * Skipping leading trivia makes source-spans more "user friendly", since things like HTML + * elements will appear to begin at the start of the opening tag, rather than at the start of any + * leading trivia, which could include newlines. + * + * @param end + * The location of the end of the span. + * + * @param fullStart + * The start of the token without skipping the leading trivia. + * This is used by tooling that splits tokens further, such as extracting Angular interpolations + * from text tokens. Such tooling creates new source-spans relative to the original token's + * source-span. If leading trivia characters have been skipped then the new source-spans may be + * incorrectly offset. + * + * @param details + * Additional information (such as identifier names) that should be associated with the span. + */ + constructor(start, end, fullStart = start, details = null) { + this.start = start; + this.end = end; + this.fullStart = fullStart; + this.details = details; + } + toString() { + return this.start.file.content.substring(this.start.offset, this.end.offset); + } +} +var ParseErrorLevel; +(function (ParseErrorLevel) { + ParseErrorLevel[ParseErrorLevel["WARNING"] = 0] = "WARNING"; + ParseErrorLevel[ParseErrorLevel["ERROR"] = 1] = "ERROR"; +})(ParseErrorLevel || (ParseErrorLevel = {})); +class ParseError { + constructor(span, msg, level = ParseErrorLevel.ERROR) { + this.span = span; + this.msg = msg; + this.level = level; + } + contextualMessage() { + const ctx = this.span.start.getContext(100, 3); + return ctx ? `${this.msg} ("${ctx.before}[${ParseErrorLevel[this.level]} ->]${ctx.after}")` : this.msg; + } + toString() { + const details = this.span.details ? `, ${this.span.details}` : ''; + return `${this.contextualMessage()}: ${this.span.start}${details}`; + } +} +/** + * Generates Source Span object for a given R3 Type for JIT mode. + * + * @param kind Component or Directive. + * @param typeName name of the Component or Directive. + * @param sourceUrl reference to Component or Directive source. + * @returns instance of ParseSourceSpan that represent a given Component or Directive. + */ +function r3JitTypeSourceSpan(kind, typeName, sourceUrl) { + const sourceFileName = `in ${kind} ${typeName} in ${sourceUrl}`; + const sourceFile = new ParseSourceFile('', sourceFileName); + return new ParseSourceSpan(new ParseLocation(sourceFile, -1, -1, -1), new ParseLocation(sourceFile, -1, -1, -1)); +} +let _anonymousTypeIndex = 0; +function identifierName(compileIdentifier) { + if (!compileIdentifier || !compileIdentifier.reference) { + return null; + } + const ref = compileIdentifier.reference; + if (ref['__anonymousType']) { + return ref['__anonymousType']; + } + if (ref['__forward_ref__']) { + // We do not want to try to stringify a `forwardRef()` function because that would cause the + // inner function to be evaluated too early, defeating the whole point of the `forwardRef`. + return '__forward_ref__'; + } + let identifier = stringify(ref); + if (identifier.indexOf('(') >= 0) { + // case: anonymous functions! + identifier = `anonymous_${_anonymousTypeIndex++}`; + ref['__anonymousType'] = identifier; + } else { + identifier = sanitizeIdentifier(identifier); + } + return identifier; +} +function sanitizeIdentifier(name) { + return name.replace(/\W/g, '_'); +} + +/** + * In TypeScript, tagged template functions expect a "template object", which is an array of + * "cooked" strings plus a `raw` property that contains an array of "raw" strings. This is + * typically constructed with a function called `__makeTemplateObject(cooked, raw)`, but it may not + * be available in all environments. + * + * This is a JavaScript polyfill that uses __makeTemplateObject when it's available, but otherwise + * creates an inline helper with the same functionality. + * + * In the inline function, if `Object.defineProperty` is available we use that to attach the `raw` + * array. + */ +const makeTemplateObjectPolyfill = '(this&&this.__makeTemplateObject||function(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e})'; +class AbstractJsEmitterVisitor extends AbstractEmitterVisitor { + constructor() { + super(false); + } + visitWrappedNodeExpr(ast, ctx) { + throw new Error('Cannot emit a WrappedNodeExpr in Javascript.'); + } + visitDeclareVarStmt(stmt, ctx) { + ctx.print(stmt, `var ${stmt.name}`); + if (stmt.value) { + ctx.print(stmt, ' = '); + stmt.value.visitExpression(this, ctx); + } + ctx.println(stmt, `;`); + return null; + } + visitTaggedTemplateExpr(ast, ctx) { + // The following convoluted piece of code is effectively the downlevelled equivalent of + // ``` + // tag`...` + // ``` + // which is effectively like: + // ``` + // tag(__makeTemplateObject(cooked, raw), expression1, expression2, ...); + // ``` + const elements = ast.template.elements; + ast.tag.visitExpression(this, ctx); + ctx.print(ast, `(${makeTemplateObjectPolyfill}(`); + ctx.print(ast, `[${elements.map(part => escapeIdentifier(part.text, false)).join(', ')}], `); + ctx.print(ast, `[${elements.map(part => escapeIdentifier(part.rawText, false)).join(', ')}])`); + ast.template.expressions.forEach(expression => { + ctx.print(ast, ', '); + expression.visitExpression(this, ctx); + }); + ctx.print(ast, ')'); + return null; + } + visitFunctionExpr(ast, ctx) { + ctx.print(ast, `function${ast.name ? ' ' + ast.name : ''}(`); + this._visitParams(ast.params, ctx); + ctx.println(ast, `) {`); + ctx.incIndent(); + this.visitAllStatements(ast.statements, ctx); + ctx.decIndent(); + ctx.print(ast, `}`); + return null; + } + visitArrowFunctionExpr(ast, ctx) { + ctx.print(ast, '('); + this._visitParams(ast.params, ctx); + ctx.print(ast, ') =>'); + if (Array.isArray(ast.body)) { + ctx.println(ast, `{`); + ctx.incIndent(); + this.visitAllStatements(ast.body, ctx); + ctx.decIndent(); + ctx.print(ast, `}`); + } else { + const isObjectLiteral = ast.body instanceof LiteralMapExpr; + if (isObjectLiteral) { + ctx.print(ast, '('); + } + ast.body.visitExpression(this, ctx); + if (isObjectLiteral) { + ctx.print(ast, ')'); + } + } + return null; + } + visitDeclareFunctionStmt(stmt, ctx) { + ctx.print(stmt, `function ${stmt.name}(`); + this._visitParams(stmt.params, ctx); + ctx.println(stmt, `) {`); + ctx.incIndent(); + this.visitAllStatements(stmt.statements, ctx); + ctx.decIndent(); + ctx.println(stmt, `}`); + return null; + } + visitLocalizedString(ast, ctx) { + // The following convoluted piece of code is effectively the downlevelled equivalent of + // ``` + // $localize `...` + // ``` + // which is effectively like: + // ``` + // $localize(__makeTemplateObject(cooked, raw), expression1, expression2, ...); + // ``` + ctx.print(ast, `$localize(${makeTemplateObjectPolyfill}(`); + const parts = [ast.serializeI18nHead()]; + for (let i = 1; i < ast.messageParts.length; i++) { + parts.push(ast.serializeI18nTemplatePart(i)); + } + ctx.print(ast, `[${parts.map(part => escapeIdentifier(part.cooked, false)).join(', ')}], `); + ctx.print(ast, `[${parts.map(part => escapeIdentifier(part.raw, false)).join(', ')}])`); + ast.expressions.forEach(expression => { + ctx.print(ast, ', '); + expression.visitExpression(this, ctx); + }); + ctx.print(ast, ')'); + return null; + } + _visitParams(params, ctx) { + this.visitAllObjects(param => ctx.print(null, param.name), params, ctx, ','); + } +} + +/** + * @fileoverview + * A module to facilitate use of a Trusted Types policy within the JIT + * compiler. It lazily constructs the Trusted Types policy, providing helper + * utilities for promoting strings to Trusted Types. When Trusted Types are not + * available, strings are used as a fallback. + * @security All use of this module is security-sensitive and should go through + * security review. + */ +/** + * The Trusted Types policy, or null if Trusted Types are not + * enabled/supported, or undefined if the policy has not been created yet. + */ +let policy; +/** + * Returns the Trusted Types policy, or null if Trusted Types are not + * enabled/supported. The first call to this function will create the policy. + */ +function getPolicy() { + if (policy === undefined) { + const trustedTypes = _global['trustedTypes']; + policy = null; + if (trustedTypes) { + try { + policy = trustedTypes.createPolicy('angular#unsafe-jit', { + createScript: s => s + }); + } catch { + // trustedTypes.createPolicy throws if called with a name that is + // already registered, even in report-only mode. Until the API changes, + // catch the error not to break the applications functionally. In such + // cases, the code will fall back to using strings. + } + } + } + return policy; +} +/** + * Unsafely promote a string to a TrustedScript, falling back to strings when + * Trusted Types are not available. + * @security In particular, it must be assured that the provided string will + * never cause an XSS vulnerability if used in a context that will be + * interpreted and executed as a script by a browser, e.g. when calling eval. + */ +function trustedScriptFromString(script) { + return getPolicy()?.createScript(script) || script; +} +/** + * Unsafely call the Function constructor with the given string arguments. + * @security This is a security-sensitive function; any use of this function + * must go through security review. In particular, it must be assured that it + * is only called from the JIT compiler, as use in other code can lead to XSS + * vulnerabilities. + */ +function newTrustedFunctionForJIT(...args) { + if (!_global['trustedTypes']) { + // In environments that don't support Trusted Types, fall back to the most + // straightforward implementation: + return new Function(...args); + } + // Chrome currently does not support passing TrustedScript to the Function + // constructor. The following implements the workaround proposed on the page + // below, where the Chromium bug is also referenced: + // https://github.com/w3c/webappsec-trusted-types/wiki/Trusted-Types-for-function-constructor + const fnArgs = args.slice(0, -1).join(','); + const fnBody = args[args.length - 1]; + const body = `(function anonymous(${fnArgs} +) { ${fnBody} +})`; + // Using eval directly confuses the compiler and prevents this module from + // being stripped out of JS binaries even if not used. The global['eval'] + // indirection fixes that. + const fn = _global['eval'](trustedScriptFromString(body)); + if (fn.bind === undefined) { + // Workaround for a browser bug that only exists in Chrome 83, where passing + // a TrustedScript to eval just returns the TrustedScript back without + // evaluating it. In that case, fall back to the most straightforward + // implementation: + return new Function(...args); + } + // To completely mimic the behavior of calling "new Function", two more + // things need to happen: + // 1. Stringifying the resulting function should return its source code + fn.toString = () => body; + // 2. When calling the resulting function, `this` should refer to `global` + return fn.bind(_global); + // When Trusted Types support in Function constructors is widely available, + // the implementation of this function can be simplified to: + // return new Function(...args.map(a => trustedScriptFromString(a))); +} + +/** + * A helper class to manage the evaluation of JIT generated code. + */ +class JitEvaluator { + /** + * + * @param sourceUrl The URL of the generated code. + * @param statements An array of Angular statement AST nodes to be evaluated. + * @param refResolver Resolves `o.ExternalReference`s into values. + * @param createSourceMaps If true then create a source-map for the generated code and include it + * inline as a source-map comment. + * @returns A map of all the variables in the generated code. + */ + evaluateStatements(sourceUrl, statements, refResolver, createSourceMaps) { + const converter = new JitEmitterVisitor(refResolver); + const ctx = EmitterVisitorContext.createRoot(); + // Ensure generated code is in strict mode + if (statements.length > 0 && !isUseStrictStatement(statements[0])) { + statements = [literal('use strict').toStmt(), ...statements]; + } + converter.visitAllStatements(statements, ctx); + converter.createReturnStmt(ctx); + return this.evaluateCode(sourceUrl, ctx, converter.getArgs(), createSourceMaps); + } + /** + * Evaluate a piece of JIT generated code. + * @param sourceUrl The URL of this generated code. + * @param ctx A context object that contains an AST of the code to be evaluated. + * @param vars A map containing the names and values of variables that the evaluated code might + * reference. + * @param createSourceMap If true then create a source-map for the generated code and include it + * inline as a source-map comment. + * @returns The result of evaluating the code. + */ + evaluateCode(sourceUrl, ctx, vars, createSourceMap) { + let fnBody = `"use strict";${ctx.toSource()}\n//# sourceURL=${sourceUrl}`; + const fnArgNames = []; + const fnArgValues = []; + for (const argName in vars) { + fnArgValues.push(vars[argName]); + fnArgNames.push(argName); + } + if (createSourceMap) { + // using `new Function(...)` generates a header, 1 line of no arguments, 2 lines otherwise + // E.g. ``` + // function anonymous(a,b,c + // /**/) { ... }``` + // We don't want to hard code this fact, so we auto detect it via an empty function first. + const emptyFn = newTrustedFunctionForJIT(...fnArgNames.concat('return null;')).toString(); + const headerLines = emptyFn.slice(0, emptyFn.indexOf('return null;')).split('\n').length - 1; + fnBody += `\n${ctx.toSourceMapGenerator(sourceUrl, headerLines).toJsComment()}`; + } + const fn = newTrustedFunctionForJIT(...fnArgNames.concat(fnBody)); + return this.executeFunction(fn, fnArgValues); + } + /** + * Execute a JIT generated function by calling it. + * + * This method can be overridden in tests to capture the functions that are generated + * by this `JitEvaluator` class. + * + * @param fn A function to execute. + * @param args The arguments to pass to the function being executed. + * @returns The return value of the executed function. + */ + executeFunction(fn, args) { + return fn(...args); + } +} +/** + * An Angular AST visitor that converts AST nodes into executable JavaScript code. + */ +class JitEmitterVisitor extends AbstractJsEmitterVisitor { + constructor(refResolver) { + super(); + this.refResolver = refResolver; + this._evalArgNames = []; + this._evalArgValues = []; + this._evalExportedVars = []; + } + createReturnStmt(ctx) { + const stmt = new ReturnStatement(new LiteralMapExpr(this._evalExportedVars.map(resultVar => new LiteralMapEntry(resultVar, variable(resultVar), false)))); + stmt.visitStatement(this, ctx); + } + getArgs() { + const result = {}; + for (let i = 0; i < this._evalArgNames.length; i++) { + result[this._evalArgNames[i]] = this._evalArgValues[i]; + } + return result; + } + visitExternalExpr(ast, ctx) { + this._emitReferenceToExternal(ast, this.refResolver.resolveExternalReference(ast.value), ctx); + return null; + } + visitWrappedNodeExpr(ast, ctx) { + this._emitReferenceToExternal(ast, ast.node, ctx); + return null; + } + visitDeclareVarStmt(stmt, ctx) { + if (stmt.hasModifier(StmtModifier.Exported)) { + this._evalExportedVars.push(stmt.name); + } + return super.visitDeclareVarStmt(stmt, ctx); + } + visitDeclareFunctionStmt(stmt, ctx) { + if (stmt.hasModifier(StmtModifier.Exported)) { + this._evalExportedVars.push(stmt.name); + } + return super.visitDeclareFunctionStmt(stmt, ctx); + } + _emitReferenceToExternal(ast, value, ctx) { + let id = this._evalArgValues.indexOf(value); + if (id === -1) { + id = this._evalArgValues.length; + this._evalArgValues.push(value); + const name = identifierName({ + reference: value + }) || 'val'; + this._evalArgNames.push(`jit_${name}_${id}`); + } + ctx.print(ast, this._evalArgNames[id]); + } +} +function isUseStrictStatement(statement) { + return statement.isEquivalent(literal('use strict').toStmt()); +} +function compileInjector(meta) { + const definitionMap = new DefinitionMap(); + if (meta.providers !== null) { + definitionMap.set('providers', meta.providers); + } + if (meta.imports.length > 0) { + definitionMap.set('imports', literalArr(meta.imports)); + } + const expression = importExpr(Identifiers.defineInjector).callFn([definitionMap.toLiteralMap()], undefined, true); + const type = createInjectorType(meta); + return { + expression, + type, + statements: [] + }; +} +function createInjectorType(meta) { + return new ExpressionType(importExpr(Identifiers.InjectorDeclaration, [new ExpressionType(meta.type.type)])); +} + +/** + * Implementation of `CompileReflector` which resolves references to @angular/core + * symbols at runtime, according to a consumer-provided mapping. + * + * Only supports `resolveExternalReference`, all other methods throw. + */ +class R3JitReflector { + constructor(context) { + this.context = context; + } + resolveExternalReference(ref) { + // This reflector only handles @angular/core imports. + if (ref.moduleName !== '@angular/core') { + throw new Error(`Cannot resolve external reference to ${ref.moduleName}, only references to @angular/core are supported.`); + } + if (!this.context.hasOwnProperty(ref.name)) { + throw new Error(`No value provided for @angular/core symbol '${ref.name}'.`); + } + return this.context[ref.name]; + } +} + +/** + * How the selector scope of an NgModule (its declarations, imports, and exports) should be emitted + * as a part of the NgModule definition. + */ +var R3SelectorScopeMode; +(function (R3SelectorScopeMode) { + /** + * Emit the declarations inline into the module definition. + * + * This option is useful in certain contexts where it's known that JIT support is required. The + * tradeoff here is that this emit style prevents directives and pipes from being tree-shaken if + * they are unused, but the NgModule is used. + */ + R3SelectorScopeMode[R3SelectorScopeMode["Inline"] = 0] = "Inline"; + /** + * Emit the declarations using a side effectful function call, `ɵɵsetNgModuleScope`, that is + * guarded with the `ngJitMode` flag. + * + * This form of emit supports JIT and can be optimized away if the `ngJitMode` flag is set to + * false, which allows unused directives and pipes to be tree-shaken. + */ + R3SelectorScopeMode[R3SelectorScopeMode["SideEffect"] = 1] = "SideEffect"; + /** + * Don't generate selector scopes at all. + * + * This is useful for contexts where JIT support is known to be unnecessary. + */ + R3SelectorScopeMode[R3SelectorScopeMode["Omit"] = 2] = "Omit"; +})(R3SelectorScopeMode || (R3SelectorScopeMode = {})); +/** + * The type of the NgModule meta data. + * - Global: Used for full and partial compilation modes which mainly includes R3References. + * - Local: Used for the local compilation mode which mainly includes the raw expressions as appears + * in the NgModule decorator. + */ +var R3NgModuleMetadataKind; +(function (R3NgModuleMetadataKind) { + R3NgModuleMetadataKind[R3NgModuleMetadataKind["Global"] = 0] = "Global"; + R3NgModuleMetadataKind[R3NgModuleMetadataKind["Local"] = 1] = "Local"; +})(R3NgModuleMetadataKind || (R3NgModuleMetadataKind = {})); +/** + * Construct an `R3NgModuleDef` for the given `R3NgModuleMetadata`. + */ +function compileNgModule(meta) { + const statements = []; + const definitionMap = new DefinitionMap(); + definitionMap.set('type', meta.type.value); + // Assign bootstrap definition. In local compilation mode (i.e., for + // `R3NgModuleMetadataKind.LOCAL`) we assign the bootstrap field using the runtime + // `ɵɵsetNgModuleScope`. + if (meta.kind === R3NgModuleMetadataKind.Global && meta.bootstrap.length > 0) { + definitionMap.set('bootstrap', refsToArray(meta.bootstrap, meta.containsForwardDecls)); + } + if (meta.selectorScopeMode === R3SelectorScopeMode.Inline) { + // If requested to emit scope information inline, pass the `declarations`, `imports` and + // `exports` to the `ɵɵdefineNgModule()` call directly. + if (meta.declarations.length > 0) { + definitionMap.set('declarations', refsToArray(meta.declarations, meta.containsForwardDecls)); + } + if (meta.imports.length > 0) { + definitionMap.set('imports', refsToArray(meta.imports, meta.containsForwardDecls)); + } + if (meta.exports.length > 0) { + definitionMap.set('exports', refsToArray(meta.exports, meta.containsForwardDecls)); + } + } else if (meta.selectorScopeMode === R3SelectorScopeMode.SideEffect) { + // In this mode, scope information is not passed into `ɵɵdefineNgModule` as it + // would prevent tree-shaking of the declarations, imports and exports references. Instead, it's + // patched onto the NgModule definition with a `ɵɵsetNgModuleScope` call that's guarded by the + // `ngJitMode` flag. + const setNgModuleScopeCall = generateSetNgModuleScopeCall(meta); + if (setNgModuleScopeCall !== null) { + statements.push(setNgModuleScopeCall); + } + } else { + // Selector scope emit was not requested, so skip it. + } + if (meta.schemas !== null && meta.schemas.length > 0) { + definitionMap.set('schemas', literalArr(meta.schemas.map(ref => ref.value))); + } + if (meta.id !== null) { + definitionMap.set('id', meta.id); + // Generate a side-effectful call to register this NgModule by its id, as per the semantics of + // NgModule ids. + statements.push(importExpr(Identifiers.registerNgModuleType).callFn([meta.type.value, meta.id]).toStmt()); + } + const expression = importExpr(Identifiers.defineNgModule).callFn([definitionMap.toLiteralMap()], undefined, true); + const type = createNgModuleType(meta); + return { + expression, + type, + statements + }; +} +/** + * This function is used in JIT mode to generate the call to `ɵɵdefineNgModule()` from a call to + * `ɵɵngDeclareNgModule()`. + */ +function compileNgModuleDeclarationExpression(meta) { + const definitionMap = new DefinitionMap(); + definitionMap.set('type', new WrappedNodeExpr(meta.type)); + if (meta.bootstrap !== undefined) { + definitionMap.set('bootstrap', new WrappedNodeExpr(meta.bootstrap)); + } + if (meta.declarations !== undefined) { + definitionMap.set('declarations', new WrappedNodeExpr(meta.declarations)); + } + if (meta.imports !== undefined) { + definitionMap.set('imports', new WrappedNodeExpr(meta.imports)); + } + if (meta.exports !== undefined) { + definitionMap.set('exports', new WrappedNodeExpr(meta.exports)); + } + if (meta.schemas !== undefined) { + definitionMap.set('schemas', new WrappedNodeExpr(meta.schemas)); + } + if (meta.id !== undefined) { + definitionMap.set('id', new WrappedNodeExpr(meta.id)); + } + return importExpr(Identifiers.defineNgModule).callFn([definitionMap.toLiteralMap()]); +} +function createNgModuleType(meta) { + if (meta.kind === R3NgModuleMetadataKind.Local) { + return new ExpressionType(meta.type.value); + } + const { + type: moduleType, + declarations, + exports, + imports, + includeImportTypes, + publicDeclarationTypes + } = meta; + return new ExpressionType(importExpr(Identifiers.NgModuleDeclaration, [new ExpressionType(moduleType.type), publicDeclarationTypes === null ? tupleTypeOf(declarations) : tupleOfTypes(publicDeclarationTypes), includeImportTypes ? tupleTypeOf(imports) : NONE_TYPE, tupleTypeOf(exports)])); +} +/** + * Generates a function call to `ɵɵsetNgModuleScope` with all necessary information so that the + * transitive module scope can be computed during runtime in JIT mode. This call is marked pure + * such that the references to declarations, imports and exports may be elided causing these + * symbols to become tree-shakeable. + */ +function generateSetNgModuleScopeCall(meta) { + const scopeMap = new DefinitionMap(); + if (meta.kind === R3NgModuleMetadataKind.Global) { + if (meta.declarations.length > 0) { + scopeMap.set('declarations', refsToArray(meta.declarations, meta.containsForwardDecls)); + } + } else { + if (meta.declarationsExpression) { + scopeMap.set('declarations', meta.declarationsExpression); + } + } + if (meta.kind === R3NgModuleMetadataKind.Global) { + if (meta.imports.length > 0) { + scopeMap.set('imports', refsToArray(meta.imports, meta.containsForwardDecls)); + } + } else { + if (meta.importsExpression) { + scopeMap.set('imports', meta.importsExpression); + } + } + if (meta.kind === R3NgModuleMetadataKind.Global) { + if (meta.exports.length > 0) { + scopeMap.set('exports', refsToArray(meta.exports, meta.containsForwardDecls)); + } + } else { + if (meta.exportsExpression) { + scopeMap.set('exports', meta.exportsExpression); + } + } + if (meta.kind === R3NgModuleMetadataKind.Local && meta.bootstrapExpression) { + scopeMap.set('bootstrap', meta.bootstrapExpression); + } + if (Object.keys(scopeMap.values).length === 0) { + return null; + } + // setNgModuleScope(...) + const fnCall = new InvokeFunctionExpr( /* fn */importExpr(Identifiers.setNgModuleScope), /* args */[meta.type.value, scopeMap.toLiteralMap()]); + // (ngJitMode guard) && setNgModuleScope(...) + const guardedCall = jitOnlyGuardedExpression(fnCall); + // function() { (ngJitMode guard) && setNgModuleScope(...); } + const iife = new FunctionExpr( /* params */[], /* statements */[guardedCall.toStmt()]); + // (function() { (ngJitMode guard) && setNgModuleScope(...); })() + const iifeCall = new InvokeFunctionExpr( /* fn */iife, /* args */[]); + return iifeCall.toStmt(); +} +function tupleTypeOf(exp) { + const types = exp.map(ref => typeofExpr(ref.type)); + return exp.length > 0 ? expressionType(literalArr(types)) : NONE_TYPE; +} +function tupleOfTypes(types) { + const typeofTypes = types.map(type => typeofExpr(type)); + return types.length > 0 ? expressionType(literalArr(typeofTypes)) : NONE_TYPE; +} +function compilePipeFromMetadata(metadata) { + const definitionMapValues = []; + // e.g. `name: 'myPipe'` + definitionMapValues.push({ + key: 'name', + value: literal(metadata.pipeName), + quoted: false + }); + // e.g. `type: MyPipe` + definitionMapValues.push({ + key: 'type', + value: metadata.type.value, + quoted: false + }); + // e.g. `pure: true` + definitionMapValues.push({ + key: 'pure', + value: literal(metadata.pure), + quoted: false + }); + if (metadata.isStandalone) { + definitionMapValues.push({ + key: 'standalone', + value: literal(true), + quoted: false + }); + } + const expression = importExpr(Identifiers.definePipe).callFn([literalMap(definitionMapValues)], undefined, true); + const type = createPipeType(metadata); + return { + expression, + type, + statements: [] + }; +} +function createPipeType(metadata) { + return new ExpressionType(importExpr(Identifiers.PipeDeclaration, [typeWithParameters(metadata.type.type, metadata.typeArgumentCount), new ExpressionType(new LiteralExpr(metadata.pipeName)), new ExpressionType(new LiteralExpr(metadata.isStandalone))])); +} +var R3TemplateDependencyKind; +(function (R3TemplateDependencyKind) { + R3TemplateDependencyKind[R3TemplateDependencyKind["Directive"] = 0] = "Directive"; + R3TemplateDependencyKind[R3TemplateDependencyKind["Pipe"] = 1] = "Pipe"; + R3TemplateDependencyKind[R3TemplateDependencyKind["NgModule"] = 2] = "NgModule"; +})(R3TemplateDependencyKind || (R3TemplateDependencyKind = {})); + +/** + * The following set contains all keywords that can be used in the animation css shorthand + * property and is used during the scoping of keyframes to make sure such keywords + * are not modified. + */ +const animationKeywords = new Set([ +// global values +'inherit', 'initial', 'revert', 'unset', +// animation-direction +'alternate', 'alternate-reverse', 'normal', 'reverse', +// animation-fill-mode +'backwards', 'both', 'forwards', 'none', +// animation-play-state +'paused', 'running', +// animation-timing-function +'ease', 'ease-in', 'ease-in-out', 'ease-out', 'linear', 'step-start', 'step-end', +// `steps()` function +'end', 'jump-both', 'jump-end', 'jump-none', 'jump-start', 'start']); +/** + * The following array contains all of the CSS at-rule identifiers which are scoped. + */ +const scopedAtRuleIdentifiers = ['@media', '@supports', '@document', '@layer', '@container', '@scope', '@starting-style']; +/** + * The following class has its origin from a port of shadowCSS from webcomponents.js to TypeScript. + * It has since diverge in many ways to tailor Angular's needs. + * + * Source: + * https://github.com/webcomponents/webcomponentsjs/blob/4efecd7e0e/src/ShadowCSS/ShadowCSS.js + * + * The original file level comment is reproduced below + */ +/* + This is a limited shim for ShadowDOM css styling. + https://dvcs.w3.org/hg/webcomponents/raw-file/tip/spec/shadow/index.html#styles + + The intention here is to support only the styling features which can be + relatively simply implemented. The goal is to allow users to avoid the + most obvious pitfalls and do so without compromising performance significantly. + For ShadowDOM styling that's not covered here, a set of best practices + can be provided that should allow users to accomplish more complex styling. + + The following is a list of specific ShadowDOM styling features and a brief + discussion of the approach used to shim. + + Shimmed features: + + * :host, :host-context: ShadowDOM allows styling of the shadowRoot's host + element using the :host rule. To shim this feature, the :host styles are + reformatted and prefixed with a given scope name and promoted to a + document level stylesheet. + For example, given a scope name of .foo, a rule like this: + + :host { + background: red; + } + } + + becomes: + + .foo { + background: red; + } + + * encapsulation: Styles defined within ShadowDOM, apply only to + dom inside the ShadowDOM. + The selectors are scoped by adding an attribute selector suffix to each + simple selector that contains the host element tag name. Each element + in the element's ShadowDOM template is also given the scope attribute. + Thus, these rules match only elements that have the scope attribute. + For example, given a scope name of x-foo, a rule like this: + + div { + font-weight: bold; + } + + becomes: + + div[x-foo] { + font-weight: bold; + } + + Note that elements that are dynamically added to a scope must have the scope + selector added to them manually. + + * upper/lower bound encapsulation: Styles which are defined outside a + shadowRoot should not cross the ShadowDOM boundary and should not apply + inside a shadowRoot. + + This styling behavior is not emulated. Some possible ways to do this that + were rejected due to complexity and/or performance concerns include: (1) reset + every possible property for every possible selector for a given scope name; + (2) re-implement css in javascript. + + As an alternative, users should make sure to use selectors + specific to the scope in which they are working. + + * ::distributed: This behavior is not emulated. It's often not necessary + to style the contents of a specific insertion point and instead, descendants + of the host element can be styled selectively. Users can also create an + extra node around an insertion point and style that node's contents + via descendent selectors. For example, with a shadowRoot like this: + + + + + could become: + + +
+ +
+ + Note the use of @polyfill in the comment above a ShadowDOM specific style + declaration. This is a directive to the styling shim to use the selector + in comments in lieu of the next selector when running under polyfill. +*/ +class ShadowCss { + constructor() { + /** + * Regular expression used to extrapolate the possible keyframes from an + * animation declaration (with possibly multiple animation definitions) + * + * The regular expression can be divided in three parts + * - (^|\s+|,) + * captures how many (if any) leading whitespaces are present or a comma + * - (?:(?:(['"])((?:\\\\|\\\2|(?!\2).)+)\2)|(-?[A-Za-z][\w\-]*)) + * captures two different possible keyframes, ones which are quoted or ones which are valid css + * idents (custom properties excluded) + * - (?=[,\s;]|$) + * simply matches the end of the possible keyframe, valid endings are: a comma, a space, a + * semicolon or the end of the string + */ + this._animationDeclarationKeyframesRe = /(^|\s+|,)(?:(?:(['"])((?:\\\\|\\\2|(?!\2).)+)\2)|(-?[A-Za-z][\w\-]*))(?=[,\s]|$)/g; + } + /* + * Shim some cssText with the given selector. Returns cssText that can be included in the document + * + * The selector is the attribute added to all elements inside the host, + * The hostSelector is the attribute added to the host itself. + */ + shimCssText(cssText, selector, hostSelector = '') { + // **NOTE**: Do not strip comments as this will cause component sourcemaps to break + // due to shift in lines. + // Collect comments and replace them with a placeholder, this is done to avoid complicating + // the rule parsing RegExp and keep it safer. + const comments = []; + cssText = cssText.replace(_commentRe, m => { + if (m.match(_commentWithHashRe)) { + comments.push(m); + } else { + // Replace non hash comments with empty lines. + // This is done so that we do not leak any sensitive data in comments. + const newLinesMatches = m.match(_newLinesRe); + comments.push((newLinesMatches?.join('') ?? '') + '\n'); + } + return COMMENT_PLACEHOLDER; + }); + cssText = this._insertDirectives(cssText); + const scopedCssText = this._scopeCssText(cssText, selector, hostSelector); + // Add back comments at the original position. + let commentIdx = 0; + return scopedCssText.replace(_commentWithHashPlaceHolderRe, () => comments[commentIdx++]); + } + _insertDirectives(cssText) { + cssText = this._insertPolyfillDirectivesInCssText(cssText); + return this._insertPolyfillRulesInCssText(cssText); + } + /** + * Process styles to add scope to keyframes. + * + * Modify both the names of the keyframes defined in the component styles and also the css + * animation rules using them. + * + * Animation rules using keyframes defined elsewhere are not modified to allow for globally + * defined keyframes. + * + * For example, we convert this css: + * + * ``` + * .box { + * animation: box-animation 1s forwards; + * } + * + * @keyframes box-animation { + * to { + * background-color: green; + * } + * } + * ``` + * + * to this: + * + * ``` + * .box { + * animation: scopeName_box-animation 1s forwards; + * } + * + * @keyframes scopeName_box-animation { + * to { + * background-color: green; + * } + * } + * ``` + * + * @param cssText the component's css text that needs to be scoped. + * @param scopeSelector the component's scope selector. + * + * @returns the scoped css text. + */ + _scopeKeyframesRelatedCss(cssText, scopeSelector) { + const unscopedKeyframesSet = new Set(); + const scopedKeyframesCssText = processRules(cssText, rule => this._scopeLocalKeyframeDeclarations(rule, scopeSelector, unscopedKeyframesSet)); + return processRules(scopedKeyframesCssText, rule => this._scopeAnimationRule(rule, scopeSelector, unscopedKeyframesSet)); + } + /** + * Scopes local keyframes names, returning the updated css rule and it also + * adds the original keyframe name to a provided set to collect all keyframes names + * so that it can later be used to scope the animation rules. + * + * For example, it takes a rule such as: + * + * ``` + * @keyframes box-animation { + * to { + * background-color: green; + * } + * } + * ``` + * + * and returns: + * + * ``` + * @keyframes scopeName_box-animation { + * to { + * background-color: green; + * } + * } + * ``` + * and as a side effect it adds "box-animation" to the `unscopedKeyframesSet` set + * + * @param cssRule the css rule to process. + * @param scopeSelector the component's scope selector. + * @param unscopedKeyframesSet the set of unscoped keyframes names (which can be + * modified as a side effect) + * + * @returns the css rule modified with the scoped keyframes name. + */ + _scopeLocalKeyframeDeclarations(rule, scopeSelector, unscopedKeyframesSet) { + return { + ...rule, + selector: rule.selector.replace(/(^@(?:-webkit-)?keyframes(?:\s+))(['"]?)(.+)\2(\s*)$/, (_, start, quote, keyframeName, endSpaces) => { + unscopedKeyframesSet.add(unescapeQuotes(keyframeName, quote)); + return `${start}${quote}${scopeSelector}_${keyframeName}${quote}${endSpaces}`; + }) + }; + } + /** + * Function used to scope a keyframes name (obtained from an animation declaration) + * using an existing set of unscopedKeyframes names to discern if the scoping needs to be + * performed (keyframes names of keyframes not defined in the component's css need not to be + * scoped). + * + * @param keyframe the keyframes name to check. + * @param scopeSelector the component's scope selector. + * @param unscopedKeyframesSet the set of unscoped keyframes names. + * + * @returns the scoped name of the keyframe, or the original name is the name need not to be + * scoped. + */ + _scopeAnimationKeyframe(keyframe, scopeSelector, unscopedKeyframesSet) { + return keyframe.replace(/^(\s*)(['"]?)(.+?)\2(\s*)$/, (_, spaces1, quote, name, spaces2) => { + name = `${unscopedKeyframesSet.has(unescapeQuotes(name, quote)) ? scopeSelector + '_' : ''}${name}`; + return `${spaces1}${quote}${name}${quote}${spaces2}`; + }); + } + /** + * Scope an animation rule so that the keyframes mentioned in such rule + * are scoped if defined in the component's css and left untouched otherwise. + * + * It can scope values of both the 'animation' and 'animation-name' properties. + * + * @param rule css rule to scope. + * @param scopeSelector the component's scope selector. + * @param unscopedKeyframesSet the set of unscoped keyframes names. + * + * @returns the updated css rule. + **/ + _scopeAnimationRule(rule, scopeSelector, unscopedKeyframesSet) { + let content = rule.content.replace(/((?:^|\s+|;)(?:-webkit-)?animation\s*:\s*),*([^;]+)/g, (_, start, animationDeclarations) => start + animationDeclarations.replace(this._animationDeclarationKeyframesRe, (original, leadingSpaces, quote = '', quotedName, nonQuotedName) => { + if (quotedName) { + return `${leadingSpaces}${this._scopeAnimationKeyframe(`${quote}${quotedName}${quote}`, scopeSelector, unscopedKeyframesSet)}`; + } else { + return animationKeywords.has(nonQuotedName) ? original : `${leadingSpaces}${this._scopeAnimationKeyframe(nonQuotedName, scopeSelector, unscopedKeyframesSet)}`; + } + })); + content = content.replace(/((?:^|\s+|;)(?:-webkit-)?animation-name(?:\s*):(?:\s*))([^;]+)/g, (_match, start, commaSeparatedKeyframes) => `${start}${commaSeparatedKeyframes.split(',').map(keyframe => this._scopeAnimationKeyframe(keyframe, scopeSelector, unscopedKeyframesSet)).join(',')}`); + return { + ...rule, + content + }; + } + /* + * Process styles to convert native ShadowDOM rules that will trip + * up the css parser; we rely on decorating the stylesheet with inert rules. + * + * For example, we convert this rule: + * + * polyfill-next-selector { content: ':host menu-item'; } + * ::content menu-item { + * + * to this: + * + * scopeName menu-item { + * + **/ + _insertPolyfillDirectivesInCssText(cssText) { + return cssText.replace(_cssContentNextSelectorRe, function (...m) { + return m[2] + '{'; + }); + } + /* + * Process styles to add rules which will only apply under the polyfill + * + * For example, we convert this rule: + * + * polyfill-rule { + * content: ':host menu-item'; + * ... + * } + * + * to this: + * + * scopeName menu-item {...} + * + **/ + _insertPolyfillRulesInCssText(cssText) { + return cssText.replace(_cssContentRuleRe, (...m) => { + const rule = m[0].replace(m[1], '').replace(m[2], ''); + return m[4] + rule; + }); + } + /* Ensure styles are scoped. Pseudo-scoping takes a rule like: + * + * .foo {... } + * + * and converts this to + * + * scopeName .foo { ... } + */ + _scopeCssText(cssText, scopeSelector, hostSelector) { + const unscopedRules = this._extractUnscopedRulesFromCssText(cssText); + // replace :host and :host-context -shadowcsshost and -shadowcsshost respectively + cssText = this._insertPolyfillHostInCssText(cssText); + cssText = this._convertColonHost(cssText); + cssText = this._convertColonHostContext(cssText); + cssText = this._convertShadowDOMSelectors(cssText); + if (scopeSelector) { + cssText = this._scopeKeyframesRelatedCss(cssText, scopeSelector); + cssText = this._scopeSelectors(cssText, scopeSelector, hostSelector); + } + cssText = cssText + '\n' + unscopedRules; + return cssText.trim(); + } + /* + * Process styles to add rules which will only apply under the polyfill + * and do not process via CSSOM. (CSSOM is destructive to rules on rare + * occasions, e.g. -webkit-calc on Safari.) + * For example, we convert this rule: + * + * @polyfill-unscoped-rule { + * content: 'menu-item'; + * ... } + * + * to this: + * + * menu-item {...} + * + **/ + _extractUnscopedRulesFromCssText(cssText) { + let r = ''; + let m; + _cssContentUnscopedRuleRe.lastIndex = 0; + while ((m = _cssContentUnscopedRuleRe.exec(cssText)) !== null) { + const rule = m[0].replace(m[2], '').replace(m[1], m[4]); + r += rule + '\n\n'; + } + return r; + } + /* + * convert a rule like :host(.foo) > .bar { } + * + * to + * + * .foo > .bar + */ + _convertColonHost(cssText) { + return cssText.replace(_cssColonHostRe, (_, hostSelectors, otherSelectors) => { + if (hostSelectors) { + const convertedSelectors = []; + const hostSelectorArray = hostSelectors.split(',').map(p => p.trim()); + for (const hostSelector of hostSelectorArray) { + if (!hostSelector) break; + const convertedSelector = _polyfillHostNoCombinator + hostSelector.replace(_polyfillHost, '') + otherSelectors; + convertedSelectors.push(convertedSelector); + } + return convertedSelectors.join(','); + } else { + return _polyfillHostNoCombinator + otherSelectors; + } + }); + } + /* + * convert a rule like :host-context(.foo) > .bar { } + * + * to + * + * .foo > .bar, .foo > .bar { } + * + * and + * + * :host-context(.foo:host) .bar { ... } + * + * to + * + * .foo .bar { ... } + */ + _convertColonHostContext(cssText) { + return cssText.replace(_cssColonHostContextReGlobal, selectorText => { + // We have captured a selector that contains a `:host-context` rule. + // For backward compatibility `:host-context` may contain a comma separated list of selectors. + // Each context selector group will contain a list of host-context selectors that must match + // an ancestor of the host. + // (Normally `contextSelectorGroups` will only contain a single array of context selectors.) + const contextSelectorGroups = [[]]; + // There may be more than `:host-context` in this selector so `selectorText` could look like: + // `:host-context(.one):host-context(.two)`. + // Execute `_cssColonHostContextRe` over and over until we have extracted all the + // `:host-context` selectors from this selector. + let match; + while (match = _cssColonHostContextRe.exec(selectorText)) { + // `match` = [':host-context()', , ] + // The `` could actually be a comma separated list: `:host-context(.one, .two)`. + const newContextSelectors = (match[1] ?? '').trim().split(',').map(m => m.trim()).filter(m => m !== ''); + // We must duplicate the current selector group for each of these new selectors. + // For example if the current groups are: + // ``` + // [ + // ['a', 'b', 'c'], + // ['x', 'y', 'z'], + // ] + // ``` + // And we have a new set of comma separated selectors: `:host-context(m,n)` then the new + // groups are: + // ``` + // [ + // ['a', 'b', 'c', 'm'], + // ['x', 'y', 'z', 'm'], + // ['a', 'b', 'c', 'n'], + // ['x', 'y', 'z', 'n'], + // ] + // ``` + const contextSelectorGroupsLength = contextSelectorGroups.length; + repeatGroups(contextSelectorGroups, newContextSelectors.length); + for (let i = 0; i < newContextSelectors.length; i++) { + for (let j = 0; j < contextSelectorGroupsLength; j++) { + contextSelectorGroups[j + i * contextSelectorGroupsLength].push(newContextSelectors[i]); + } + } + // Update the `selectorText` and see repeat to see if there are more `:host-context`s. + selectorText = match[2]; + } + // The context selectors now must be combined with each other to capture all the possible + // selectors that `:host-context` can match. See `combineHostContextSelectors()` for more + // info about how this is done. + return contextSelectorGroups.map(contextSelectors => combineHostContextSelectors(contextSelectors, selectorText)).join(', '); + }); + } + /* + * Convert combinators like ::shadow and pseudo-elements like ::content + * by replacing with space. + */ + _convertShadowDOMSelectors(cssText) { + return _shadowDOMSelectorsRe.reduce((result, pattern) => result.replace(pattern, ' '), cssText); + } + // change a selector like 'div' to 'name div' + _scopeSelectors(cssText, scopeSelector, hostSelector) { + return processRules(cssText, rule => { + let selector = rule.selector; + let content = rule.content; + if (rule.selector[0] !== '@') { + selector = this._scopeSelector(rule.selector, scopeSelector, hostSelector); + } else if (scopedAtRuleIdentifiers.some(atRule => rule.selector.startsWith(atRule))) { + content = this._scopeSelectors(rule.content, scopeSelector, hostSelector); + } else if (rule.selector.startsWith('@font-face') || rule.selector.startsWith('@page')) { + content = this._stripScopingSelectors(rule.content); + } + return new CssRule(selector, content); + }); + } + /** + * Handle a css text that is within a rule that should not contain scope selectors by simply + * removing them! An example of such a rule is `@font-face`. + * + * `@font-face` rules cannot contain nested selectors. Nor can they be nested under a selector. + * Normally this would be a syntax error by the author of the styles. But in some rare cases, such + * as importing styles from a library, and applying `:host ::ng-deep` to the imported styles, we + * can end up with broken css if the imported styles happen to contain @font-face rules. + * + * For example: + * + * ``` + * :host ::ng-deep { + * import 'some/lib/containing/font-face'; + * } + * + * Similar logic applies to `@page` rules which can contain a particular set of properties, + * as well as some specific at-rules. Since they can't be encapsulated, we have to strip + * any scoping selectors from them. For more information: https://www.w3.org/TR/css-page-3 + * ``` + */ + _stripScopingSelectors(cssText) { + return processRules(cssText, rule => { + const selector = rule.selector.replace(_shadowDeepSelectors, ' ').replace(_polyfillHostNoCombinatorRe, ' '); + return new CssRule(selector, rule.content); + }); + } + _scopeSelector(selector, scopeSelector, hostSelector) { + return selector.split(/ ?, ?/).map(part => part.split(_shadowDeepSelectors)).map(deepParts => { + const [shallowPart, ...otherParts] = deepParts; + const applyScope = shallowPart => { + if (this._selectorNeedsScoping(shallowPart, scopeSelector)) { + return this._applySelectorScope(shallowPart, scopeSelector, hostSelector); + } else { + return shallowPart; + } + }; + return [applyScope(shallowPart), ...otherParts].join(' '); + }).join(', '); + } + _selectorNeedsScoping(selector, scopeSelector) { + const re = this._makeScopeMatcher(scopeSelector); + return !re.test(selector); + } + _makeScopeMatcher(scopeSelector) { + const lre = /\[/g; + const rre = /\]/g; + scopeSelector = scopeSelector.replace(lre, '\\[').replace(rre, '\\]'); + return new RegExp('^(' + scopeSelector + ')' + _selectorReSuffix, 'm'); + } + // scope via name and [is=name] + _applySimpleSelectorScope(selector, scopeSelector, hostSelector) { + // In Android browser, the lastIndex is not reset when the regex is used in String.replace() + _polyfillHostRe.lastIndex = 0; + if (_polyfillHostRe.test(selector)) { + const replaceBy = `[${hostSelector}]`; + return selector.replace(_polyfillHostNoCombinatorRe, (hnc, selector) => { + return selector.replace(/([^:]*)(:*)(.*)/, (_, before, colon, after) => { + return before + replaceBy + colon + after; + }); + }).replace(_polyfillHostRe, replaceBy + ' '); + } + return scopeSelector + ' ' + selector; + } + // return a selector with [name] suffix on each simple selector + // e.g. .foo.bar > .zot becomes .foo[name].bar[name] > .zot[name] /** @internal */ + _applySelectorScope(selector, scopeSelector, hostSelector) { + const isRe = /\[is=([^\]]*)\]/g; + scopeSelector = scopeSelector.replace(isRe, (_, ...parts) => parts[0]); + const attrName = '[' + scopeSelector + ']'; + const _scopeSelectorPart = p => { + let scopedP = p.trim(); + if (!scopedP) { + return p; + } + if (p.includes(_polyfillHostNoCombinator)) { + scopedP = this._applySimpleSelectorScope(p, scopeSelector, hostSelector); + } else { + // remove :host since it should be unnecessary + const t = p.replace(_polyfillHostRe, ''); + if (t.length > 0) { + const matches = t.match(/([^:]*)(:*)(.*)/); + if (matches) { + scopedP = matches[1] + attrName + matches[2] + matches[3]; + } + } + } + return scopedP; + }; + const safeContent = new SafeSelector(selector); + selector = safeContent.content(); + let scopedSelector = ''; + let startIndex = 0; + let res; + const sep = /( |>|\+|~(?!=))\s*/g; + // If a selector appears before :host it should not be shimmed as it + // matches on ancestor elements and not on elements in the host's shadow + // `:host-context(div)` is transformed to + // `-shadowcsshost-no-combinatordiv, div -shadowcsshost-no-combinator` + // the `div` is not part of the component in the 2nd selectors and should not be scoped. + // Historically `component-tag:host` was matching the component so we also want to preserve + // this behavior to avoid breaking legacy apps (it should not match). + // The behavior should be: + // - `tag:host` -> `tag[h]` (this is to avoid breaking legacy apps, should not match anything) + // - `tag :host` -> `tag [h]` (`tag` is not scoped because it's considered part of a + // `:host-context(tag)`) + const hasHost = selector.includes(_polyfillHostNoCombinator); + // Only scope parts after the first `-shadowcsshost-no-combinator` when it is present + let shouldScope = !hasHost; + while ((res = sep.exec(selector)) !== null) { + const separator = res[1]; + // Do not trim the selector, as otherwise this will break sourcemaps + // when they are defined on multiple lines + // Example: + // div, + // p { color: red} + const part = selector.slice(startIndex, res.index); + // A space following an escaped hex value and followed by another hex character + // (ie: ".\fc ber" for ".über") is not a separator between 2 selectors + // also keep in mind that backslashes are replaced by a placeholder by SafeSelector + // These escaped selectors happen for example when esbuild runs with optimization.minify. + if (part.match(/__esc-ph-(\d+)__/) && selector[res.index + 1]?.match(/[a-fA-F\d]/)) { + continue; + } + shouldScope = shouldScope || part.includes(_polyfillHostNoCombinator); + const scopedPart = shouldScope ? _scopeSelectorPart(part) : part; + scopedSelector += `${scopedPart} ${separator} `; + startIndex = sep.lastIndex; + } + const part = selector.substring(startIndex); + shouldScope = shouldScope || part.includes(_polyfillHostNoCombinator); + scopedSelector += shouldScope ? _scopeSelectorPart(part) : part; + // replace the placeholders with their original values + return safeContent.restore(scopedSelector); + } + _insertPolyfillHostInCssText(selector) { + return selector.replace(_colonHostContextRe, _polyfillHostContext).replace(_colonHostRe, _polyfillHost); + } +} +class SafeSelector { + constructor(selector) { + this.placeholders = []; + this.index = 0; + // Replaces attribute selectors with placeholders. + // The WS in [attr="va lue"] would otherwise be interpreted as a selector separator. + selector = this._escapeRegexMatches(selector, /(\[[^\]]*\])/g); + // CSS allows for certain special characters to be used in selectors if they're escaped. + // E.g. `.foo:blue` won't match a class called `foo:blue`, because the colon denotes a + // pseudo-class, but writing `.foo\:blue` will match, because the colon was escaped. + // Replace all escape sequences (`\` followed by a character) with a placeholder so + // that our handling of pseudo-selectors doesn't mess with them. + // Escaped characters have a specific placeholder so they can be detected separately. + selector = selector.replace(/(\\.)/g, (_, keep) => { + const replaceBy = `__esc-ph-${this.index}__`; + this.placeholders.push(keep); + this.index++; + return replaceBy; + }); + // Replaces the expression in `:nth-child(2n + 1)` with a placeholder. + // WS and "+" would otherwise be interpreted as selector separators. + this._content = selector.replace(/(:nth-[-\w]+)(\([^)]+\))/g, (_, pseudo, exp) => { + const replaceBy = `__ph-${this.index}__`; + this.placeholders.push(exp); + this.index++; + return pseudo + replaceBy; + }); + } + restore(content) { + return content.replace(/__(?:ph|esc-ph)-(\d+)__/g, (_ph, index) => this.placeholders[+index]); + } + content() { + return this._content; + } + /** + * Replaces all of the substrings that match a regex within a + * special string (e.g. `__ph-0__`, `__ph-1__`, etc). + */ + _escapeRegexMatches(content, pattern) { + return content.replace(pattern, (_, keep) => { + const replaceBy = `__ph-${this.index}__`; + this.placeholders.push(keep); + this.index++; + return replaceBy; + }); + } +} +const _cssContentNextSelectorRe = /polyfill-next-selector[^}]*content:[\s]*?(['"])(.*?)\1[;\s]*}([^{]*?){/gim; +const _cssContentRuleRe = /(polyfill-rule)[^}]*(content:[\s]*(['"])(.*?)\3)[;\s]*[^}]*}/gim; +const _cssContentUnscopedRuleRe = /(polyfill-unscoped-rule)[^}]*(content:[\s]*(['"])(.*?)\3)[;\s]*[^}]*}/gim; +const _polyfillHost = '-shadowcsshost'; +// note: :host-context pre-processed to -shadowcsshostcontext. +const _polyfillHostContext = '-shadowcsscontext'; +const _parenSuffix = '(?:\\((' + '(?:\\([^)(]*\\)|[^)(]*)+?' + ')\\))?([^,{]*)'; +const _cssColonHostRe = new RegExp(_polyfillHost + _parenSuffix, 'gim'); +const _cssColonHostContextReGlobal = new RegExp(_polyfillHostContext + _parenSuffix, 'gim'); +const _cssColonHostContextRe = new RegExp(_polyfillHostContext + _parenSuffix, 'im'); +const _polyfillHostNoCombinator = _polyfillHost + '-no-combinator'; +const _polyfillHostNoCombinatorRe = /-shadowcsshost-no-combinator([^\s]*)/; +const _shadowDOMSelectorsRe = [/::shadow/g, /::content/g, +// Deprecated selectors +/\/shadow-deep\//g, /\/shadow\//g]; +// The deep combinator is deprecated in the CSS spec +// Support for `>>>`, `deep`, `::ng-deep` is then also deprecated and will be removed in the future. +// see https://github.com/angular/angular/pull/17677 +const _shadowDeepSelectors = /(?:>>>)|(?:\/deep\/)|(?:::ng-deep)/g; +const _selectorReSuffix = '([>\\s~+[.,{:][\\s\\S]*)?$'; +const _polyfillHostRe = /-shadowcsshost/gim; +const _colonHostRe = /:host/gim; +const _colonHostContextRe = /:host-context/gim; +const _newLinesRe = /\r?\n/g; +const _commentRe = /\/\*[\s\S]*?\*\//g; +const _commentWithHashRe = /\/\*\s*#\s*source(Mapping)?URL=/g; +const COMMENT_PLACEHOLDER = '%COMMENT%'; +const _commentWithHashPlaceHolderRe = new RegExp(COMMENT_PLACEHOLDER, 'g'); +const BLOCK_PLACEHOLDER = '%BLOCK%'; +const _ruleRe = new RegExp(`(\\s*(?:${COMMENT_PLACEHOLDER}\\s*)*)([^;\\{\\}]+?)(\\s*)((?:{%BLOCK%}?\\s*;?)|(?:\\s*;))`, 'g'); +const CONTENT_PAIRS = new Map([['{', '}']]); +const COMMA_IN_PLACEHOLDER = '%COMMA_IN_PLACEHOLDER%'; +const SEMI_IN_PLACEHOLDER = '%SEMI_IN_PLACEHOLDER%'; +const COLON_IN_PLACEHOLDER = '%COLON_IN_PLACEHOLDER%'; +const _cssCommaInPlaceholderReGlobal = new RegExp(COMMA_IN_PLACEHOLDER, 'g'); +const _cssSemiInPlaceholderReGlobal = new RegExp(SEMI_IN_PLACEHOLDER, 'g'); +const _cssColonInPlaceholderReGlobal = new RegExp(COLON_IN_PLACEHOLDER, 'g'); +class CssRule { + constructor(selector, content) { + this.selector = selector; + this.content = content; + } +} +function processRules(input, ruleCallback) { + const escaped = escapeInStrings(input); + const inputWithEscapedBlocks = escapeBlocks(escaped, CONTENT_PAIRS, BLOCK_PLACEHOLDER); + let nextBlockIndex = 0; + const escapedResult = inputWithEscapedBlocks.escapedString.replace(_ruleRe, (...m) => { + const selector = m[2]; + let content = ''; + let suffix = m[4]; + let contentPrefix = ''; + if (suffix && suffix.startsWith('{' + BLOCK_PLACEHOLDER)) { + content = inputWithEscapedBlocks.blocks[nextBlockIndex++]; + suffix = suffix.substring(BLOCK_PLACEHOLDER.length + 1); + contentPrefix = '{'; + } + const rule = ruleCallback(new CssRule(selector, content)); + return `${m[1]}${rule.selector}${m[3]}${contentPrefix}${rule.content}${suffix}`; + }); + return unescapeInStrings(escapedResult); +} +class StringWithEscapedBlocks { + constructor(escapedString, blocks) { + this.escapedString = escapedString; + this.blocks = blocks; + } +} +function escapeBlocks(input, charPairs, placeholder) { + const resultParts = []; + const escapedBlocks = []; + let openCharCount = 0; + let nonBlockStartIndex = 0; + let blockStartIndex = -1; + let openChar; + let closeChar; + for (let i = 0; i < input.length; i++) { + const char = input[i]; + if (char === '\\') { + i++; + } else if (char === closeChar) { + openCharCount--; + if (openCharCount === 0) { + escapedBlocks.push(input.substring(blockStartIndex, i)); + resultParts.push(placeholder); + nonBlockStartIndex = i; + blockStartIndex = -1; + openChar = closeChar = undefined; + } + } else if (char === openChar) { + openCharCount++; + } else if (openCharCount === 0 && charPairs.has(char)) { + openChar = char; + closeChar = charPairs.get(char); + openCharCount = 1; + blockStartIndex = i + 1; + resultParts.push(input.substring(nonBlockStartIndex, blockStartIndex)); + } + } + if (blockStartIndex !== -1) { + escapedBlocks.push(input.substring(blockStartIndex)); + resultParts.push(placeholder); + } else { + resultParts.push(input.substring(nonBlockStartIndex)); + } + return new StringWithEscapedBlocks(resultParts.join(''), escapedBlocks); +} +/** + * Object containing as keys characters that should be substituted by placeholders + * when found in strings during the css text parsing, and as values the respective + * placeholders + */ +const ESCAPE_IN_STRING_MAP = { + ';': SEMI_IN_PLACEHOLDER, + ',': COMMA_IN_PLACEHOLDER, + ':': COLON_IN_PLACEHOLDER +}; +/** + * Parse the provided css text and inside strings (meaning, inside pairs of unescaped single or + * double quotes) replace specific characters with their respective placeholders as indicated + * by the `ESCAPE_IN_STRING_MAP` map. + * + * For example convert the text + * `animation: "my-anim:at\"ion" 1s;` + * to + * `animation: "my-anim%COLON_IN_PLACEHOLDER%at\"ion" 1s;` + * + * This is necessary in order to remove the meaning of some characters when found inside strings + * (for example `;` indicates the end of a css declaration, `,` the sequence of values and `:` the + * division between property and value during a declaration, none of these meanings apply when such + * characters are within strings and so in order to prevent parsing issues they need to be replaced + * with placeholder text for the duration of the css manipulation process). + * + * @param input the original css text. + * + * @returns the css text with specific characters in strings replaced by placeholders. + **/ +function escapeInStrings(input) { + let result = input; + let currentQuoteChar = null; + for (let i = 0; i < result.length; i++) { + const char = result[i]; + if (char === '\\') { + i++; + } else { + if (currentQuoteChar !== null) { + // index i is inside a quoted sub-string + if (char === currentQuoteChar) { + currentQuoteChar = null; + } else { + const placeholder = ESCAPE_IN_STRING_MAP[char]; + if (placeholder) { + result = `${result.substr(0, i)}${placeholder}${result.substr(i + 1)}`; + i += placeholder.length - 1; + } + } + } else if (char === "'" || char === '"') { + currentQuoteChar = char; + } + } + } + return result; +} +/** + * Replace in a string all occurrences of keys in the `ESCAPE_IN_STRING_MAP` map with their + * original representation, this is simply used to revert the changes applied by the + * escapeInStrings function. + * + * For example it reverts the text: + * `animation: "my-anim%COLON_IN_PLACEHOLDER%at\"ion" 1s;` + * to it's original form of: + * `animation: "my-anim:at\"ion" 1s;` + * + * Note: For the sake of simplicity this function does not check that the placeholders are + * actually inside strings as it would anyway be extremely unlikely to find them outside of strings. + * + * @param input the css text containing the placeholders. + * + * @returns the css text without the placeholders. + */ +function unescapeInStrings(input) { + let result = input.replace(_cssCommaInPlaceholderReGlobal, ','); + result = result.replace(_cssSemiInPlaceholderReGlobal, ';'); + result = result.replace(_cssColonInPlaceholderReGlobal, ':'); + return result; +} +/** + * Unescape all quotes present in a string, but only if the string was actually already + * quoted. + * + * This generates a "canonical" representation of strings which can be used to match strings + * which would otherwise only differ because of differently escaped quotes. + * + * For example it converts the string (assumed to be quoted): + * `this \\"is\\" a \\'\\\\'test` + * to: + * `this "is" a '\\\\'test` + * (note that the latter backslashes are not removed as they are not actually escaping the single + * quote) + * + * + * @param input the string possibly containing escaped quotes. + * @param isQuoted boolean indicating whether the string was quoted inside a bigger string (if not + * then it means that it doesn't represent an inner string and thus no unescaping is required) + * + * @returns the string in the "canonical" representation without escaped quotes. + */ +function unescapeQuotes(str, isQuoted) { + return !isQuoted ? str : str.replace(/((?:^|[^\\])(?:\\\\)*)\\(?=['"])/g, '$1'); +} +/** + * Combine the `contextSelectors` with the `hostMarker` and the `otherSelectors` + * to create a selector that matches the same as `:host-context()`. + * + * Given a single context selector `A` we need to output selectors that match on the host and as an + * ancestor of the host: + * + * ``` + * A , A {} + * ``` + * + * When there is more than one context selector we also have to create combinations of those + * selectors with each other. For example if there are `A` and `B` selectors the output is: + * + * ``` + * AB, AB , A B, + * B A, A B , B A {} + * ``` + * + * And so on... + * + * @param contextSelectors an array of context selectors that will be combined. + * @param otherSelectors the rest of the selectors that are not context selectors. + */ +function combineHostContextSelectors(contextSelectors, otherSelectors) { + const hostMarker = _polyfillHostNoCombinator; + _polyfillHostRe.lastIndex = 0; // reset the regex to ensure we get an accurate test + const otherSelectorsHasHost = _polyfillHostRe.test(otherSelectors); + // If there are no context selectors then just output a host marker + if (contextSelectors.length === 0) { + return hostMarker + otherSelectors; + } + const combined = [contextSelectors.pop() || '']; + while (contextSelectors.length > 0) { + const length = combined.length; + const contextSelector = contextSelectors.pop(); + for (let i = 0; i < length; i++) { + const previousSelectors = combined[i]; + // Add the new selector as a descendant of the previous selectors + combined[length * 2 + i] = previousSelectors + ' ' + contextSelector; + // Add the new selector as an ancestor of the previous selectors + combined[length + i] = contextSelector + ' ' + previousSelectors; + // Add the new selector to act on the same element as the previous selectors + combined[i] = contextSelector + previousSelectors; + } + } + // Finally connect the selector to the `hostMarker`s: either acting directly on the host + // (A) or as an ancestor (A ). + return combined.map(s => otherSelectorsHasHost ? `${s}${otherSelectors}` : `${s}${hostMarker}${otherSelectors}, ${s} ${hostMarker}${otherSelectors}`).join(','); +} +/** + * Mutate the given `groups` array so that there are `multiples` clones of the original array + * stored. + * + * For example `repeatGroups([a, b], 3)` will result in `[a, b, a, b, a, b]` - but importantly the + * newly added groups will be clones of the original. + * + * @param groups An array of groups of strings that will be repeated. This array is mutated + * in-place. + * @param multiples The number of times the current groups should appear. + */ +function repeatGroups(groups, multiples) { + const length = groups.length; + for (let i = 1; i < multiples; i++) { + for (let j = 0; j < length; j++) { + groups[j + i * length] = groups[j].slice(0); + } + } +} + +/** + * Distinguishes different kinds of IR operations. + * + * Includes both creation and update operations. + */ +var OpKind; +(function (OpKind) { + /** + * A special operation type which is used to represent the beginning and end nodes of a linked + * list of operations. + */ + OpKind[OpKind["ListEnd"] = 0] = "ListEnd"; + /** + * An operation which wraps an output AST statement. + */ + OpKind[OpKind["Statement"] = 1] = "Statement"; + /** + * An operation which declares and initializes a `SemanticVariable`. + */ + OpKind[OpKind["Variable"] = 2] = "Variable"; + /** + * An operation to begin rendering of an element. + */ + OpKind[OpKind["ElementStart"] = 3] = "ElementStart"; + /** + * An operation to render an element with no children. + */ + OpKind[OpKind["Element"] = 4] = "Element"; + /** + * An operation which declares an embedded view. + */ + OpKind[OpKind["Template"] = 5] = "Template"; + /** + * An operation to end rendering of an element previously started with `ElementStart`. + */ + OpKind[OpKind["ElementEnd"] = 6] = "ElementEnd"; + /** + * An operation to begin an `ng-container`. + */ + OpKind[OpKind["ContainerStart"] = 7] = "ContainerStart"; + /** + * An operation for an `ng-container` with no children. + */ + OpKind[OpKind["Container"] = 8] = "Container"; + /** + * An operation to end an `ng-container`. + */ + OpKind[OpKind["ContainerEnd"] = 9] = "ContainerEnd"; + /** + * An operation disable binding for subsequent elements, which are descendants of a non-bindable + * node. + */ + OpKind[OpKind["DisableBindings"] = 10] = "DisableBindings"; + /** + * An op to conditionally render a template. + */ + OpKind[OpKind["Conditional"] = 11] = "Conditional"; + /** + * An operation to re-enable binding, after it was previously disabled. + */ + OpKind[OpKind["EnableBindings"] = 12] = "EnableBindings"; + /** + * An operation to render a text node. + */ + OpKind[OpKind["Text"] = 13] = "Text"; + /** + * An operation declaring an event listener for an element. + */ + OpKind[OpKind["Listener"] = 14] = "Listener"; + /** + * An operation to interpolate text into a text node. + */ + OpKind[OpKind["InterpolateText"] = 15] = "InterpolateText"; + /** + * An intermediate binding op, that has not yet been processed into an individual property, + * attribute, style, etc. + */ + OpKind[OpKind["Binding"] = 16] = "Binding"; + /** + * An operation to bind an expression to a property of an element. + */ + OpKind[OpKind["Property"] = 17] = "Property"; + /** + * An operation to bind an expression to a style property of an element. + */ + OpKind[OpKind["StyleProp"] = 18] = "StyleProp"; + /** + * An operation to bind an expression to a class property of an element. + */ + OpKind[OpKind["ClassProp"] = 19] = "ClassProp"; + /** + * An operation to bind an expression to the styles of an element. + */ + OpKind[OpKind["StyleMap"] = 20] = "StyleMap"; + /** + * An operation to bind an expression to the classes of an element. + */ + OpKind[OpKind["ClassMap"] = 21] = "ClassMap"; + /** + * An operation to advance the runtime's implicit slot context during the update phase of a view. + */ + OpKind[OpKind["Advance"] = 22] = "Advance"; + /** + * An operation to instantiate a pipe. + */ + OpKind[OpKind["Pipe"] = 23] = "Pipe"; + /** + * An operation to associate an attribute with an element. + */ + OpKind[OpKind["Attribute"] = 24] = "Attribute"; + /** + * An attribute that has been extracted for inclusion in the consts array. + */ + OpKind[OpKind["ExtractedAttribute"] = 25] = "ExtractedAttribute"; + /** + * An operation that configures a `@defer` block. + */ + OpKind[OpKind["Defer"] = 26] = "Defer"; + /** + * An operation that controls when a `@defer` loads. + */ + OpKind[OpKind["DeferOn"] = 27] = "DeferOn"; + /** + * An operation that controls when a `@defer` loads, using a custom expression as the condition. + */ + OpKind[OpKind["DeferWhen"] = 28] = "DeferWhen"; + /** + * An i18n message that has been extracted for inclusion in the consts array. + */ + OpKind[OpKind["I18nMessage"] = 29] = "I18nMessage"; + /** + * A host binding property. + */ + OpKind[OpKind["HostProperty"] = 30] = "HostProperty"; + /** + * A namespace change, which causes the subsequent elements to be processed as either HTML or SVG. + */ + OpKind[OpKind["Namespace"] = 31] = "Namespace"; + /** + * Configure a content projeciton definition for the view. + */ + OpKind[OpKind["ProjectionDef"] = 32] = "ProjectionDef"; + /** + * Create a content projection slot. + */ + OpKind[OpKind["Projection"] = 33] = "Projection"; + /** + * Create a repeater creation instruction op. + */ + OpKind[OpKind["RepeaterCreate"] = 34] = "RepeaterCreate"; + /** + * An update up for a repeater. + */ + OpKind[OpKind["Repeater"] = 35] = "Repeater"; + /** + * An operation to bind an expression to the property side of a two-way binding. + */ + OpKind[OpKind["TwoWayProperty"] = 36] = "TwoWayProperty"; + /** + * An operation declaring the event side of a two-way binding. + */ + OpKind[OpKind["TwoWayListener"] = 37] = "TwoWayListener"; + /** + * A creation-time operation that initializes the slot for a `@let` declaration. + */ + OpKind[OpKind["DeclareLet"] = 38] = "DeclareLet"; + /** + * An update-time operation that stores the current value of a `@let` declaration. + */ + OpKind[OpKind["StoreLet"] = 39] = "StoreLet"; + /** + * The start of an i18n block. + */ + OpKind[OpKind["I18nStart"] = 40] = "I18nStart"; + /** + * A self-closing i18n on a single element. + */ + OpKind[OpKind["I18n"] = 41] = "I18n"; + /** + * The end of an i18n block. + */ + OpKind[OpKind["I18nEnd"] = 42] = "I18nEnd"; + /** + * An expression in an i18n message. + */ + OpKind[OpKind["I18nExpression"] = 43] = "I18nExpression"; + /** + * An instruction that applies a set of i18n expressions. + */ + OpKind[OpKind["I18nApply"] = 44] = "I18nApply"; + /** + * An instruction to create an ICU expression. + */ + OpKind[OpKind["IcuStart"] = 45] = "IcuStart"; + /** + * An instruction to update an ICU expression. + */ + OpKind[OpKind["IcuEnd"] = 46] = "IcuEnd"; + /** + * An instruction representing a placeholder in an ICU expression. + */ + OpKind[OpKind["IcuPlaceholder"] = 47] = "IcuPlaceholder"; + /** + * An i18n context containing information needed to generate an i18n message. + */ + OpKind[OpKind["I18nContext"] = 48] = "I18nContext"; + /** + * A creation op that corresponds to i18n attributes on an element. + */ + OpKind[OpKind["I18nAttributes"] = 49] = "I18nAttributes"; +})(OpKind || (OpKind = {})); +/** + * Distinguishes different kinds of IR expressions. + */ +var ExpressionKind; +(function (ExpressionKind) { + /** + * Read of a variable in a lexical scope. + */ + ExpressionKind[ExpressionKind["LexicalRead"] = 0] = "LexicalRead"; + /** + * A reference to the current view context. + */ + ExpressionKind[ExpressionKind["Context"] = 1] = "Context"; + /** + * A reference to the view context, for use inside a track function. + */ + ExpressionKind[ExpressionKind["TrackContext"] = 2] = "TrackContext"; + /** + * Read of a variable declared in a `VariableOp`. + */ + ExpressionKind[ExpressionKind["ReadVariable"] = 3] = "ReadVariable"; + /** + * Runtime operation to navigate to the next view context in the view hierarchy. + */ + ExpressionKind[ExpressionKind["NextContext"] = 4] = "NextContext"; + /** + * Runtime operation to retrieve the value of a local reference. + */ + ExpressionKind[ExpressionKind["Reference"] = 5] = "Reference"; + /** + * A call storing the value of a `@let` declaration. + */ + ExpressionKind[ExpressionKind["StoreLet"] = 6] = "StoreLet"; + /** + * A reference to a `@let` declaration read from the context view. + */ + ExpressionKind[ExpressionKind["ContextLetReference"] = 7] = "ContextLetReference"; + /** + * Runtime operation to snapshot the current view context. + */ + ExpressionKind[ExpressionKind["GetCurrentView"] = 8] = "GetCurrentView"; + /** + * Runtime operation to restore a snapshotted view. + */ + ExpressionKind[ExpressionKind["RestoreView"] = 9] = "RestoreView"; + /** + * Runtime operation to reset the current view context after `RestoreView`. + */ + ExpressionKind[ExpressionKind["ResetView"] = 10] = "ResetView"; + /** + * Defines and calls a function with change-detected arguments. + */ + ExpressionKind[ExpressionKind["PureFunctionExpr"] = 11] = "PureFunctionExpr"; + /** + * Indicates a positional parameter to a pure function definition. + */ + ExpressionKind[ExpressionKind["PureFunctionParameterExpr"] = 12] = "PureFunctionParameterExpr"; + /** + * Binding to a pipe transformation. + */ + ExpressionKind[ExpressionKind["PipeBinding"] = 13] = "PipeBinding"; + /** + * Binding to a pipe transformation with a variable number of arguments. + */ + ExpressionKind[ExpressionKind["PipeBindingVariadic"] = 14] = "PipeBindingVariadic"; + /* + * A safe property read requiring expansion into a null check. + */ + ExpressionKind[ExpressionKind["SafePropertyRead"] = 15] = "SafePropertyRead"; + /** + * A safe keyed read requiring expansion into a null check. + */ + ExpressionKind[ExpressionKind["SafeKeyedRead"] = 16] = "SafeKeyedRead"; + /** + * A safe function call requiring expansion into a null check. + */ + ExpressionKind[ExpressionKind["SafeInvokeFunction"] = 17] = "SafeInvokeFunction"; + /** + * An intermediate expression that will be expanded from a safe read into an explicit ternary. + */ + ExpressionKind[ExpressionKind["SafeTernaryExpr"] = 18] = "SafeTernaryExpr"; + /** + * An empty expression that will be stipped before generating the final output. + */ + ExpressionKind[ExpressionKind["EmptyExpr"] = 19] = "EmptyExpr"; + /* + * An assignment to a temporary variable. + */ + ExpressionKind[ExpressionKind["AssignTemporaryExpr"] = 20] = "AssignTemporaryExpr"; + /** + * A reference to a temporary variable. + */ + ExpressionKind[ExpressionKind["ReadTemporaryExpr"] = 21] = "ReadTemporaryExpr"; + /** + * An expression that will cause a literal slot index to be emitted. + */ + ExpressionKind[ExpressionKind["SlotLiteralExpr"] = 22] = "SlotLiteralExpr"; + /** + * A test expression for a conditional op. + */ + ExpressionKind[ExpressionKind["ConditionalCase"] = 23] = "ConditionalCase"; + /** + * An expression that will be automatically extracted to the component const array. + */ + ExpressionKind[ExpressionKind["ConstCollected"] = 24] = "ConstCollected"; + /** + * Operation that sets the value of a two-way binding. + */ + ExpressionKind[ExpressionKind["TwoWayBindingSet"] = 25] = "TwoWayBindingSet"; +})(ExpressionKind || (ExpressionKind = {})); +var VariableFlags; +(function (VariableFlags) { + VariableFlags[VariableFlags["None"] = 0] = "None"; + /** + * Always inline this variable, regardless of the number of times it's used. + * An `AlwaysInline` variable may not depend on context, because doing so may cause side effects + * that are illegal when multi-inlined. (The optimizer will enforce this constraint.) + */ + VariableFlags[VariableFlags["AlwaysInline"] = 1] = "AlwaysInline"; +})(VariableFlags || (VariableFlags = {})); +/** + * Distinguishes between different kinds of `SemanticVariable`s. + */ +var SemanticVariableKind; +(function (SemanticVariableKind) { + /** + * Represents the context of a particular view. + */ + SemanticVariableKind[SemanticVariableKind["Context"] = 0] = "Context"; + /** + * Represents an identifier declared in the lexical scope of a view. + */ + SemanticVariableKind[SemanticVariableKind["Identifier"] = 1] = "Identifier"; + /** + * Represents a saved state that can be used to restore a view in a listener handler function. + */ + SemanticVariableKind[SemanticVariableKind["SavedView"] = 2] = "SavedView"; + /** + * An alias generated by a special embedded view type (e.g. a `@for` block). + */ + SemanticVariableKind[SemanticVariableKind["Alias"] = 3] = "Alias"; +})(SemanticVariableKind || (SemanticVariableKind = {})); +/** + * Whether to compile in compatibilty mode. In compatibility mode, the template pipeline will + * attempt to match the output of `TemplateDefinitionBuilder` as exactly as possible, at the cost + * of producing quirky or larger code in some cases. + */ +var CompatibilityMode; +(function (CompatibilityMode) { + CompatibilityMode[CompatibilityMode["Normal"] = 0] = "Normal"; + CompatibilityMode[CompatibilityMode["TemplateDefinitionBuilder"] = 1] = "TemplateDefinitionBuilder"; +})(CompatibilityMode || (CompatibilityMode = {})); +/** + * Enumeration of the types of attributes which can be applied to an element. + */ +var BindingKind; +(function (BindingKind) { + /** + * Static attributes. + */ + BindingKind[BindingKind["Attribute"] = 0] = "Attribute"; + /** + * Class bindings. + */ + BindingKind[BindingKind["ClassName"] = 1] = "ClassName"; + /** + * Style bindings. + */ + BindingKind[BindingKind["StyleProperty"] = 2] = "StyleProperty"; + /** + * Dynamic property bindings. + */ + BindingKind[BindingKind["Property"] = 3] = "Property"; + /** + * Property or attribute bindings on a template. + */ + BindingKind[BindingKind["Template"] = 4] = "Template"; + /** + * Internationalized attributes. + */ + BindingKind[BindingKind["I18n"] = 5] = "I18n"; + /** + * Animation property bindings. + */ + BindingKind[BindingKind["Animation"] = 6] = "Animation"; + /** + * Property side of a two-way binding. + */ + BindingKind[BindingKind["TwoWayProperty"] = 7] = "TwoWayProperty"; +})(BindingKind || (BindingKind = {})); +/** + * Enumeration of possible times i18n params can be resolved. + */ +var I18nParamResolutionTime; +(function (I18nParamResolutionTime) { + /** + * Param is resolved at message creation time. Most params should be resolved at message creation + * time. However, ICU params need to be handled in post-processing. + */ + I18nParamResolutionTime[I18nParamResolutionTime["Creation"] = 0] = "Creation"; + /** + * Param is resolved during post-processing. This should be used for params whose value comes from + * an ICU. + */ + I18nParamResolutionTime[I18nParamResolutionTime["Postproccessing"] = 1] = "Postproccessing"; +})(I18nParamResolutionTime || (I18nParamResolutionTime = {})); +/** + * The contexts in which an i18n expression can be used. + */ +var I18nExpressionFor; +(function (I18nExpressionFor) { + /** + * This expression is used as a value (i.e. inside an i18n block). + */ + I18nExpressionFor[I18nExpressionFor["I18nText"] = 0] = "I18nText"; + /** + * This expression is used in a binding. + */ + I18nExpressionFor[I18nExpressionFor["I18nAttribute"] = 1] = "I18nAttribute"; +})(I18nExpressionFor || (I18nExpressionFor = {})); +/** + * Flags that describe what an i18n param value. These determine how the value is serialized into + * the final map. + */ +var I18nParamValueFlags; +(function (I18nParamValueFlags) { + I18nParamValueFlags[I18nParamValueFlags["None"] = 0] = "None"; + /** + * This value represents an element tag. + */ + I18nParamValueFlags[I18nParamValueFlags["ElementTag"] = 1] = "ElementTag"; + /** + * This value represents a template tag. + */ + I18nParamValueFlags[I18nParamValueFlags["TemplateTag"] = 2] = "TemplateTag"; + /** + * This value represents the opening of a tag. + */ + I18nParamValueFlags[I18nParamValueFlags["OpenTag"] = 4] = "OpenTag"; + /** + * This value represents the closing of a tag. + */ + I18nParamValueFlags[I18nParamValueFlags["CloseTag"] = 8] = "CloseTag"; + /** + * This value represents an i18n expression index. + */ + I18nParamValueFlags[I18nParamValueFlags["ExpressionIndex"] = 16] = "ExpressionIndex"; +})(I18nParamValueFlags || (I18nParamValueFlags = {})); +/** + * Whether the active namespace is HTML, MathML, or SVG mode. + */ +var Namespace; +(function (Namespace) { + Namespace[Namespace["HTML"] = 0] = "HTML"; + Namespace[Namespace["SVG"] = 1] = "SVG"; + Namespace[Namespace["Math"] = 2] = "Math"; +})(Namespace || (Namespace = {})); +/** + * The type of a `@defer` trigger, for use in the ir. + */ +var DeferTriggerKind; +(function (DeferTriggerKind) { + DeferTriggerKind[DeferTriggerKind["Idle"] = 0] = "Idle"; + DeferTriggerKind[DeferTriggerKind["Immediate"] = 1] = "Immediate"; + DeferTriggerKind[DeferTriggerKind["Timer"] = 2] = "Timer"; + DeferTriggerKind[DeferTriggerKind["Hover"] = 3] = "Hover"; + DeferTriggerKind[DeferTriggerKind["Interaction"] = 4] = "Interaction"; + DeferTriggerKind[DeferTriggerKind["Viewport"] = 5] = "Viewport"; +})(DeferTriggerKind || (DeferTriggerKind = {})); +/** + * Kinds of i18n contexts. They can be created because of root i18n blocks, or ICUs. + */ +var I18nContextKind; +(function (I18nContextKind) { + I18nContextKind[I18nContextKind["RootI18n"] = 0] = "RootI18n"; + I18nContextKind[I18nContextKind["Icu"] = 1] = "Icu"; + I18nContextKind[I18nContextKind["Attr"] = 2] = "Attr"; +})(I18nContextKind || (I18nContextKind = {})); +var TemplateKind; +(function (TemplateKind) { + TemplateKind[TemplateKind["NgTemplate"] = 0] = "NgTemplate"; + TemplateKind[TemplateKind["Structural"] = 1] = "Structural"; + TemplateKind[TemplateKind["Block"] = 2] = "Block"; +})(TemplateKind || (TemplateKind = {})); + +/** + * Marker symbol for `ConsumesSlotOpTrait`. + */ +const ConsumesSlot = Symbol('ConsumesSlot'); +/** + * Marker symbol for `DependsOnSlotContextOpTrait`. + */ +const DependsOnSlotContext = Symbol('DependsOnSlotContext'); +/** + * Marker symbol for `ConsumesVars` trait. + */ +const ConsumesVarsTrait = Symbol('ConsumesVars'); +/** + * Marker symbol for `UsesVarOffset` trait. + */ +const UsesVarOffset = Symbol('UsesVarOffset'); +/** + * Default values for most `ConsumesSlotOpTrait` fields (used with the spread operator to initialize + * implementors of the trait). + */ +const TRAIT_CONSUMES_SLOT = { + [ConsumesSlot]: true, + numSlotsUsed: 1 +}; +/** + * Default values for most `DependsOnSlotContextOpTrait` fields (used with the spread operator to + * initialize implementors of the trait). + */ +const TRAIT_DEPENDS_ON_SLOT_CONTEXT = { + [DependsOnSlotContext]: true +}; +/** + * Default values for `UsesVars` fields (used with the spread operator to initialize + * implementors of the trait). + */ +const TRAIT_CONSUMES_VARS = { + [ConsumesVarsTrait]: true +}; +/** + * Test whether an operation implements `ConsumesSlotOpTrait`. + */ +function hasConsumesSlotTrait(op) { + return op[ConsumesSlot] === true; +} +function hasDependsOnSlotContextTrait(value) { + return value[DependsOnSlotContext] === true; +} +function hasConsumesVarsTrait(value) { + return value[ConsumesVarsTrait] === true; +} +/** + * Test whether an expression implements `UsesVarOffsetTrait`. + */ +function hasUsesVarOffsetTrait(expr) { + return expr[UsesVarOffset] === true; +} + +/** + * Create a `StatementOp`. + */ +function createStatementOp(statement) { + return { + kind: OpKind.Statement, + statement, + ...NEW_OP + }; +} +/** + * Create a `VariableOp`. + */ +function createVariableOp(xref, variable, initializer, flags) { + return { + kind: OpKind.Variable, + xref, + variable, + initializer, + flags, + ...NEW_OP + }; +} +/** + * Static structure shared by all operations. + * + * Used as a convenience via the spread operator (`...NEW_OP`) when creating new operations, and + * ensures the fields are always in the same order. + */ +const NEW_OP = { + debugListId: null, + prev: null, + next: null +}; + +/** + * Create an `InterpolationTextOp`. + */ +function createInterpolateTextOp(xref, interpolation, sourceSpan) { + return { + kind: OpKind.InterpolateText, + target: xref, + interpolation, + sourceSpan, + ...TRAIT_DEPENDS_ON_SLOT_CONTEXT, + ...TRAIT_CONSUMES_VARS, + ...NEW_OP + }; +} +class Interpolation { + constructor(strings, expressions, i18nPlaceholders) { + this.strings = strings; + this.expressions = expressions; + this.i18nPlaceholders = i18nPlaceholders; + if (i18nPlaceholders.length !== 0 && i18nPlaceholders.length !== expressions.length) { + throw new Error(`Expected ${expressions.length} placeholders to match interpolation expression count, but got ${i18nPlaceholders.length}`); + } + } +} +/** + * Create a `BindingOp`, not yet transformed into a particular type of binding. + */ +function createBindingOp(target, kind, name, expression, unit, securityContext, isTextAttribute, isStructuralTemplateAttribute, templateKind, i18nMessage, sourceSpan) { + return { + kind: OpKind.Binding, + bindingKind: kind, + target, + name, + expression, + unit, + securityContext, + isTextAttribute, + isStructuralTemplateAttribute, + templateKind, + i18nContext: null, + i18nMessage, + sourceSpan, + ...NEW_OP + }; +} +/** + * Create a `PropertyOp`. + */ +function createPropertyOp(target, name, expression, isAnimationTrigger, securityContext, isStructuralTemplateAttribute, templateKind, i18nContext, i18nMessage, sourceSpan) { + return { + kind: OpKind.Property, + target, + name, + expression, + isAnimationTrigger, + securityContext, + sanitizer: null, + isStructuralTemplateAttribute, + templateKind, + i18nContext, + i18nMessage, + sourceSpan, + ...TRAIT_DEPENDS_ON_SLOT_CONTEXT, + ...TRAIT_CONSUMES_VARS, + ...NEW_OP + }; +} +/** + * Create a `TwoWayPropertyOp`. + */ +function createTwoWayPropertyOp(target, name, expression, securityContext, isStructuralTemplateAttribute, templateKind, i18nContext, i18nMessage, sourceSpan) { + return { + kind: OpKind.TwoWayProperty, + target, + name, + expression, + securityContext, + sanitizer: null, + isStructuralTemplateAttribute, + templateKind, + i18nContext, + i18nMessage, + sourceSpan, + ...TRAIT_DEPENDS_ON_SLOT_CONTEXT, + ...TRAIT_CONSUMES_VARS, + ...NEW_OP + }; +} +/** Create a `StylePropOp`. */ +function createStylePropOp(xref, name, expression, unit, sourceSpan) { + return { + kind: OpKind.StyleProp, + target: xref, + name, + expression, + unit, + sourceSpan, + ...TRAIT_DEPENDS_ON_SLOT_CONTEXT, + ...TRAIT_CONSUMES_VARS, + ...NEW_OP + }; +} +/** + * Create a `ClassPropOp`. + */ +function createClassPropOp(xref, name, expression, sourceSpan) { + return { + kind: OpKind.ClassProp, + target: xref, + name, + expression, + sourceSpan, + ...TRAIT_DEPENDS_ON_SLOT_CONTEXT, + ...TRAIT_CONSUMES_VARS, + ...NEW_OP + }; +} +/** Create a `StyleMapOp`. */ +function createStyleMapOp(xref, expression, sourceSpan) { + return { + kind: OpKind.StyleMap, + target: xref, + expression, + sourceSpan, + ...TRAIT_DEPENDS_ON_SLOT_CONTEXT, + ...TRAIT_CONSUMES_VARS, + ...NEW_OP + }; +} +/** + * Create a `ClassMapOp`. + */ +function createClassMapOp(xref, expression, sourceSpan) { + return { + kind: OpKind.ClassMap, + target: xref, + expression, + sourceSpan, + ...TRAIT_DEPENDS_ON_SLOT_CONTEXT, + ...TRAIT_CONSUMES_VARS, + ...NEW_OP + }; +} +/** + * Create an `AttributeOp`. + */ +function createAttributeOp(target, namespace, name, expression, securityContext, isTextAttribute, isStructuralTemplateAttribute, templateKind, i18nMessage, sourceSpan) { + return { + kind: OpKind.Attribute, + target, + namespace, + name, + expression, + securityContext, + sanitizer: null, + isTextAttribute, + isStructuralTemplateAttribute, + templateKind, + i18nContext: null, + i18nMessage, + sourceSpan, + ...TRAIT_DEPENDS_ON_SLOT_CONTEXT, + ...TRAIT_CONSUMES_VARS, + ...NEW_OP + }; +} +/** + * Create an `AdvanceOp`. + */ +function createAdvanceOp(delta, sourceSpan) { + return { + kind: OpKind.Advance, + delta, + sourceSpan, + ...NEW_OP + }; +} +/** + * Create a conditional op, which will display an embedded view according to a condtion. + */ +function createConditionalOp(target, test, conditions, sourceSpan) { + return { + kind: OpKind.Conditional, + target, + test, + conditions, + processed: null, + sourceSpan, + contextValue: null, + ...NEW_OP, + ...TRAIT_DEPENDS_ON_SLOT_CONTEXT, + ...TRAIT_CONSUMES_VARS + }; +} +function createRepeaterOp(repeaterCreate, targetSlot, collection, sourceSpan) { + return { + kind: OpKind.Repeater, + target: repeaterCreate, + targetSlot, + collection, + sourceSpan, + ...NEW_OP, + ...TRAIT_DEPENDS_ON_SLOT_CONTEXT + }; +} +function createDeferWhenOp(target, expr, prefetch, sourceSpan) { + return { + kind: OpKind.DeferWhen, + target, + expr, + prefetch, + sourceSpan, + ...NEW_OP, + ...TRAIT_DEPENDS_ON_SLOT_CONTEXT, + ...TRAIT_CONSUMES_VARS + }; +} +/** + * Create an i18n expression op. + */ +function createI18nExpressionOp(context, target, i18nOwner, handle, expression, icuPlaceholder, i18nPlaceholder, resolutionTime, usage, name, sourceSpan) { + return { + kind: OpKind.I18nExpression, + context, + target, + i18nOwner, + handle, + expression, + icuPlaceholder, + i18nPlaceholder, + resolutionTime, + usage, + name, + sourceSpan, + ...NEW_OP, + ...TRAIT_CONSUMES_VARS, + ...TRAIT_DEPENDS_ON_SLOT_CONTEXT + }; +} +/** + * Creates an op to apply i18n expression ops. + */ +function createI18nApplyOp(owner, handle, sourceSpan) { + return { + kind: OpKind.I18nApply, + owner, + handle, + sourceSpan, + ...NEW_OP + }; +} +/** + * Creates a `StoreLetOp`. + */ +function createStoreLetOp(target, declaredName, value, sourceSpan) { + return { + kind: OpKind.StoreLet, + target, + declaredName, + value, + sourceSpan, + ...TRAIT_DEPENDS_ON_SLOT_CONTEXT, + ...TRAIT_CONSUMES_VARS, + ...NEW_OP + }; +} +var _a, _b, _c, _d, _e, _f, _g, _h; +/** + * Check whether a given `o.Expression` is a logical IR expression type. + */ +function isIrExpression(expr) { + return expr instanceof ExpressionBase; +} +/** + * Base type used for all logical IR expressions. + */ +class ExpressionBase extends Expression { + constructor(sourceSpan = null) { + super(null, sourceSpan); + } +} +/** + * Logical expression representing a lexical read of a variable name. + */ +class LexicalReadExpr extends ExpressionBase { + constructor(name) { + super(); + this.name = name; + this.kind = ExpressionKind.LexicalRead; + } + visitExpression(visitor, context) {} + isEquivalent(other) { + // We assume that the lexical reads are in the same context, which must be true for parent + // expressions to be equivalent. + // TODO: is this generally safe? + return this.name === other.name; + } + isConstant() { + return false; + } + transformInternalExpressions() {} + clone() { + return new LexicalReadExpr(this.name); + } +} +/** + * Runtime operation to retrieve the value of a local reference. + */ +class ReferenceExpr extends ExpressionBase { + constructor(target, targetSlot, offset) { + super(); + this.target = target; + this.targetSlot = targetSlot; + this.offset = offset; + this.kind = ExpressionKind.Reference; + } + visitExpression() {} + isEquivalent(e) { + return e instanceof ReferenceExpr && e.target === this.target; + } + isConstant() { + return false; + } + transformInternalExpressions() {} + clone() { + return new ReferenceExpr(this.target, this.targetSlot, this.offset); + } +} +class StoreLetExpr extends ExpressionBase { + static { + _a = ConsumesVarsTrait, _b = DependsOnSlotContext; + } + constructor(target, value, sourceSpan) { + super(); + this.target = target; + this.value = value; + this.sourceSpan = sourceSpan; + this.kind = ExpressionKind.StoreLet; + this[_a] = true; + this[_b] = true; + } + visitExpression() {} + isEquivalent(e) { + return e instanceof StoreLetExpr && e.target === this.target && e.value.isEquivalent(this.value); + } + isConstant() { + return false; + } + transformInternalExpressions(transform, flags) { + this.value = transformExpressionsInExpression(this.value, transform, flags); + } + clone() { + return new StoreLetExpr(this.target, this.value, this.sourceSpan); + } +} +class ContextLetReferenceExpr extends ExpressionBase { + constructor(target, targetSlot) { + super(); + this.target = target; + this.targetSlot = targetSlot; + this.kind = ExpressionKind.ContextLetReference; + } + visitExpression() {} + isEquivalent(e) { + return e instanceof ContextLetReferenceExpr && e.target === this.target; + } + isConstant() { + return false; + } + transformInternalExpressions() {} + clone() { + return new ContextLetReferenceExpr(this.target, this.targetSlot); + } +} +/** + * A reference to the current view context (usually the `ctx` variable in a template function). + */ +class ContextExpr extends ExpressionBase { + constructor(view) { + super(); + this.view = view; + this.kind = ExpressionKind.Context; + } + visitExpression() {} + isEquivalent(e) { + return e instanceof ContextExpr && e.view === this.view; + } + isConstant() { + return false; + } + transformInternalExpressions() {} + clone() { + return new ContextExpr(this.view); + } +} +/** + * A reference to the current view context inside a track function. + */ +class TrackContextExpr extends ExpressionBase { + constructor(view) { + super(); + this.view = view; + this.kind = ExpressionKind.TrackContext; + } + visitExpression() {} + isEquivalent(e) { + return e instanceof TrackContextExpr && e.view === this.view; + } + isConstant() { + return false; + } + transformInternalExpressions() {} + clone() { + return new TrackContextExpr(this.view); + } +} +/** + * Runtime operation to navigate to the next view context in the view hierarchy. + */ +class NextContextExpr extends ExpressionBase { + constructor() { + super(); + this.kind = ExpressionKind.NextContext; + this.steps = 1; + } + visitExpression() {} + isEquivalent(e) { + return e instanceof NextContextExpr && e.steps === this.steps; + } + isConstant() { + return false; + } + transformInternalExpressions() {} + clone() { + const expr = new NextContextExpr(); + expr.steps = this.steps; + return expr; + } +} +/** + * Runtime operation to snapshot the current view context. + * + * The result of this operation can be stored in a variable and later used with the `RestoreView` + * operation. + */ +class GetCurrentViewExpr extends ExpressionBase { + constructor() { + super(); + this.kind = ExpressionKind.GetCurrentView; + } + visitExpression() {} + isEquivalent(e) { + return e instanceof GetCurrentViewExpr; + } + isConstant() { + return false; + } + transformInternalExpressions() {} + clone() { + return new GetCurrentViewExpr(); + } +} +/** + * Runtime operation to restore a snapshotted view. + */ +class RestoreViewExpr extends ExpressionBase { + constructor(view) { + super(); + this.view = view; + this.kind = ExpressionKind.RestoreView; + } + visitExpression(visitor, context) { + if (typeof this.view !== 'number') { + this.view.visitExpression(visitor, context); + } + } + isEquivalent(e) { + if (!(e instanceof RestoreViewExpr) || typeof e.view !== typeof this.view) { + return false; + } + if (typeof this.view === 'number') { + return this.view === e.view; + } else { + return this.view.isEquivalent(e.view); + } + } + isConstant() { + return false; + } + transformInternalExpressions(transform, flags) { + if (typeof this.view !== 'number') { + this.view = transformExpressionsInExpression(this.view, transform, flags); + } + } + clone() { + return new RestoreViewExpr(this.view instanceof Expression ? this.view.clone() : this.view); + } +} +/** + * Runtime operation to reset the current view context after `RestoreView`. + */ +class ResetViewExpr extends ExpressionBase { + constructor(expr) { + super(); + this.expr = expr; + this.kind = ExpressionKind.ResetView; + } + visitExpression(visitor, context) { + this.expr.visitExpression(visitor, context); + } + isEquivalent(e) { + return e instanceof ResetViewExpr && this.expr.isEquivalent(e.expr); + } + isConstant() { + return false; + } + transformInternalExpressions(transform, flags) { + this.expr = transformExpressionsInExpression(this.expr, transform, flags); + } + clone() { + return new ResetViewExpr(this.expr.clone()); + } +} +class TwoWayBindingSetExpr extends ExpressionBase { + constructor(target, value) { + super(); + this.target = target; + this.value = value; + this.kind = ExpressionKind.TwoWayBindingSet; + } + visitExpression(visitor, context) { + this.target.visitExpression(visitor, context); + this.value.visitExpression(visitor, context); + } + isEquivalent(other) { + return this.target.isEquivalent(other.target) && this.value.isEquivalent(other.value); + } + isConstant() { + return false; + } + transformInternalExpressions(transform, flags) { + this.target = transformExpressionsInExpression(this.target, transform, flags); + this.value = transformExpressionsInExpression(this.value, transform, flags); + } + clone() { + return new TwoWayBindingSetExpr(this.target, this.value); + } +} +/** + * Read of a variable declared as an `ir.VariableOp` and referenced through its `ir.XrefId`. + */ +class ReadVariableExpr extends ExpressionBase { + constructor(xref) { + super(); + this.xref = xref; + this.kind = ExpressionKind.ReadVariable; + this.name = null; + } + visitExpression() {} + isEquivalent(other) { + return other instanceof ReadVariableExpr && other.xref === this.xref; + } + isConstant() { + return false; + } + transformInternalExpressions() {} + clone() { + const expr = new ReadVariableExpr(this.xref); + expr.name = this.name; + return expr; + } +} +class PureFunctionExpr extends ExpressionBase { + static { + _c = ConsumesVarsTrait, _d = UsesVarOffset; + } + constructor(expression, args) { + super(); + this.kind = ExpressionKind.PureFunctionExpr; + this[_c] = true; + this[_d] = true; + this.varOffset = null; + /** + * Once extracted to the `ConstantPool`, a reference to the function which defines the computation + * of `body`. + */ + this.fn = null; + this.body = expression; + this.args = args; + } + visitExpression(visitor, context) { + this.body?.visitExpression(visitor, context); + for (const arg of this.args) { + arg.visitExpression(visitor, context); + } + } + isEquivalent(other) { + if (!(other instanceof PureFunctionExpr) || other.args.length !== this.args.length) { + return false; + } + return other.body !== null && this.body !== null && other.body.isEquivalent(this.body) && other.args.every((arg, idx) => arg.isEquivalent(this.args[idx])); + } + isConstant() { + return false; + } + transformInternalExpressions(transform, flags) { + if (this.body !== null) { + // TODO: figure out if this is the right flag to pass here. + this.body = transformExpressionsInExpression(this.body, transform, flags | VisitorContextFlag.InChildOperation); + } else if (this.fn !== null) { + this.fn = transformExpressionsInExpression(this.fn, transform, flags); + } + for (let i = 0; i < this.args.length; i++) { + this.args[i] = transformExpressionsInExpression(this.args[i], transform, flags); + } + } + clone() { + const expr = new PureFunctionExpr(this.body?.clone() ?? null, this.args.map(arg => arg.clone())); + expr.fn = this.fn?.clone() ?? null; + expr.varOffset = this.varOffset; + return expr; + } +} +class PureFunctionParameterExpr extends ExpressionBase { + constructor(index) { + super(); + this.index = index; + this.kind = ExpressionKind.PureFunctionParameterExpr; + } + visitExpression() {} + isEquivalent(other) { + return other instanceof PureFunctionParameterExpr && other.index === this.index; + } + isConstant() { + return true; + } + transformInternalExpressions() {} + clone() { + return new PureFunctionParameterExpr(this.index); + } +} +class PipeBindingExpr extends ExpressionBase { + static { + _e = ConsumesVarsTrait, _f = UsesVarOffset; + } + constructor(target, targetSlot, name, args) { + super(); + this.target = target; + this.targetSlot = targetSlot; + this.name = name; + this.args = args; + this.kind = ExpressionKind.PipeBinding; + this[_e] = true; + this[_f] = true; + this.varOffset = null; + } + visitExpression(visitor, context) { + for (const arg of this.args) { + arg.visitExpression(visitor, context); + } + } + isEquivalent() { + return false; + } + isConstant() { + return false; + } + transformInternalExpressions(transform, flags) { + for (let idx = 0; idx < this.args.length; idx++) { + this.args[idx] = transformExpressionsInExpression(this.args[idx], transform, flags); + } + } + clone() { + const r = new PipeBindingExpr(this.target, this.targetSlot, this.name, this.args.map(a => a.clone())); + r.varOffset = this.varOffset; + return r; + } +} +class PipeBindingVariadicExpr extends ExpressionBase { + static { + _g = ConsumesVarsTrait, _h = UsesVarOffset; + } + constructor(target, targetSlot, name, args, numArgs) { + super(); + this.target = target; + this.targetSlot = targetSlot; + this.name = name; + this.args = args; + this.numArgs = numArgs; + this.kind = ExpressionKind.PipeBindingVariadic; + this[_g] = true; + this[_h] = true; + this.varOffset = null; + } + visitExpression(visitor, context) { + this.args.visitExpression(visitor, context); + } + isEquivalent() { + return false; + } + isConstant() { + return false; + } + transformInternalExpressions(transform, flags) { + this.args = transformExpressionsInExpression(this.args, transform, flags); + } + clone() { + const r = new PipeBindingVariadicExpr(this.target, this.targetSlot, this.name, this.args.clone(), this.numArgs); + r.varOffset = this.varOffset; + return r; + } +} +class SafePropertyReadExpr extends ExpressionBase { + constructor(receiver, name) { + super(); + this.receiver = receiver; + this.name = name; + this.kind = ExpressionKind.SafePropertyRead; + } + // An alias for name, which allows other logic to handle property reads and keyed reads together. + get index() { + return this.name; + } + visitExpression(visitor, context) { + this.receiver.visitExpression(visitor, context); + } + isEquivalent() { + return false; + } + isConstant() { + return false; + } + transformInternalExpressions(transform, flags) { + this.receiver = transformExpressionsInExpression(this.receiver, transform, flags); + } + clone() { + return new SafePropertyReadExpr(this.receiver.clone(), this.name); + } +} +class SafeKeyedReadExpr extends ExpressionBase { + constructor(receiver, index, sourceSpan) { + super(sourceSpan); + this.receiver = receiver; + this.index = index; + this.kind = ExpressionKind.SafeKeyedRead; + } + visitExpression(visitor, context) { + this.receiver.visitExpression(visitor, context); + this.index.visitExpression(visitor, context); + } + isEquivalent() { + return false; + } + isConstant() { + return false; + } + transformInternalExpressions(transform, flags) { + this.receiver = transformExpressionsInExpression(this.receiver, transform, flags); + this.index = transformExpressionsInExpression(this.index, transform, flags); + } + clone() { + return new SafeKeyedReadExpr(this.receiver.clone(), this.index.clone(), this.sourceSpan); + } +} +class SafeInvokeFunctionExpr extends ExpressionBase { + constructor(receiver, args) { + super(); + this.receiver = receiver; + this.args = args; + this.kind = ExpressionKind.SafeInvokeFunction; + } + visitExpression(visitor, context) { + this.receiver.visitExpression(visitor, context); + for (const a of this.args) { + a.visitExpression(visitor, context); + } + } + isEquivalent() { + return false; + } + isConstant() { + return false; + } + transformInternalExpressions(transform, flags) { + this.receiver = transformExpressionsInExpression(this.receiver, transform, flags); + for (let i = 0; i < this.args.length; i++) { + this.args[i] = transformExpressionsInExpression(this.args[i], transform, flags); + } + } + clone() { + return new SafeInvokeFunctionExpr(this.receiver.clone(), this.args.map(a => a.clone())); + } +} +class SafeTernaryExpr extends ExpressionBase { + constructor(guard, expr) { + super(); + this.guard = guard; + this.expr = expr; + this.kind = ExpressionKind.SafeTernaryExpr; + } + visitExpression(visitor, context) { + this.guard.visitExpression(visitor, context); + this.expr.visitExpression(visitor, context); + } + isEquivalent() { + return false; + } + isConstant() { + return false; + } + transformInternalExpressions(transform, flags) { + this.guard = transformExpressionsInExpression(this.guard, transform, flags); + this.expr = transformExpressionsInExpression(this.expr, transform, flags); + } + clone() { + return new SafeTernaryExpr(this.guard.clone(), this.expr.clone()); + } +} +class EmptyExpr extends ExpressionBase { + constructor() { + super(...arguments); + this.kind = ExpressionKind.EmptyExpr; + } + visitExpression(visitor, context) {} + isEquivalent(e) { + return e instanceof EmptyExpr; + } + isConstant() { + return true; + } + clone() { + return new EmptyExpr(); + } + transformInternalExpressions() {} +} +class AssignTemporaryExpr extends ExpressionBase { + constructor(expr, xref) { + super(); + this.expr = expr; + this.xref = xref; + this.kind = ExpressionKind.AssignTemporaryExpr; + this.name = null; + } + visitExpression(visitor, context) { + this.expr.visitExpression(visitor, context); + } + isEquivalent() { + return false; + } + isConstant() { + return false; + } + transformInternalExpressions(transform, flags) { + this.expr = transformExpressionsInExpression(this.expr, transform, flags); + } + clone() { + const a = new AssignTemporaryExpr(this.expr.clone(), this.xref); + a.name = this.name; + return a; + } +} +class ReadTemporaryExpr extends ExpressionBase { + constructor(xref) { + super(); + this.xref = xref; + this.kind = ExpressionKind.ReadTemporaryExpr; + this.name = null; + } + visitExpression(visitor, context) {} + isEquivalent() { + return this.xref === this.xref; + } + isConstant() { + return false; + } + transformInternalExpressions(transform, flags) {} + clone() { + const r = new ReadTemporaryExpr(this.xref); + r.name = this.name; + return r; + } +} +class SlotLiteralExpr extends ExpressionBase { + constructor(slot) { + super(); + this.slot = slot; + this.kind = ExpressionKind.SlotLiteralExpr; + } + visitExpression(visitor, context) {} + isEquivalent(e) { + return e instanceof SlotLiteralExpr && e.slot === this.slot; + } + isConstant() { + return true; + } + clone() { + return new SlotLiteralExpr(this.slot); + } + transformInternalExpressions() {} +} +class ConditionalCaseExpr extends ExpressionBase { + /** + * Create an expression for one branch of a conditional. + * @param expr The expression to be tested for this case. Might be null, as in an `else` case. + * @param target The Xref of the view to be displayed if this condition is true. + */ + constructor(expr, target, targetSlot, alias = null) { + super(); + this.expr = expr; + this.target = target; + this.targetSlot = targetSlot; + this.alias = alias; + this.kind = ExpressionKind.ConditionalCase; + } + visitExpression(visitor, context) { + if (this.expr !== null) { + this.expr.visitExpression(visitor, context); + } + } + isEquivalent(e) { + return e instanceof ConditionalCaseExpr && e.expr === this.expr; + } + isConstant() { + return true; + } + clone() { + return new ConditionalCaseExpr(this.expr, this.target, this.targetSlot); + } + transformInternalExpressions(transform, flags) { + if (this.expr !== null) { + this.expr = transformExpressionsInExpression(this.expr, transform, flags); + } + } +} +class ConstCollectedExpr extends ExpressionBase { + constructor(expr) { + super(); + this.expr = expr; + this.kind = ExpressionKind.ConstCollected; + } + transformInternalExpressions(transform, flags) { + this.expr = transform(this.expr, flags); + } + visitExpression(visitor, context) { + this.expr.visitExpression(visitor, context); + } + isEquivalent(e) { + if (!(e instanceof ConstCollectedExpr)) { + return false; + } + return this.expr.isEquivalent(e.expr); + } + isConstant() { + return this.expr.isConstant(); + } + clone() { + return new ConstCollectedExpr(this.expr); + } +} +/** + * Visits all `Expression`s in the AST of `op` with the `visitor` function. + */ +function visitExpressionsInOp(op, visitor) { + transformExpressionsInOp(op, (expr, flags) => { + visitor(expr, flags); + return expr; + }, VisitorContextFlag.None); +} +var VisitorContextFlag; +(function (VisitorContextFlag) { + VisitorContextFlag[VisitorContextFlag["None"] = 0] = "None"; + VisitorContextFlag[VisitorContextFlag["InChildOperation"] = 1] = "InChildOperation"; +})(VisitorContextFlag || (VisitorContextFlag = {})); +function transformExpressionsInInterpolation(interpolation, transform, flags) { + for (let i = 0; i < interpolation.expressions.length; i++) { + interpolation.expressions[i] = transformExpressionsInExpression(interpolation.expressions[i], transform, flags); + } +} +/** + * Transform all `Expression`s in the AST of `op` with the `transform` function. + * + * All such operations will be replaced with the result of applying `transform`, which may be an + * identity transformation. + */ +function transformExpressionsInOp(op, transform, flags) { + switch (op.kind) { + case OpKind.StyleProp: + case OpKind.StyleMap: + case OpKind.ClassProp: + case OpKind.ClassMap: + case OpKind.Binding: + if (op.expression instanceof Interpolation) { + transformExpressionsInInterpolation(op.expression, transform, flags); + } else { + op.expression = transformExpressionsInExpression(op.expression, transform, flags); + } + break; + case OpKind.Property: + case OpKind.HostProperty: + case OpKind.Attribute: + if (op.expression instanceof Interpolation) { + transformExpressionsInInterpolation(op.expression, transform, flags); + } else { + op.expression = transformExpressionsInExpression(op.expression, transform, flags); + } + op.sanitizer = op.sanitizer && transformExpressionsInExpression(op.sanitizer, transform, flags); + break; + case OpKind.TwoWayProperty: + op.expression = transformExpressionsInExpression(op.expression, transform, flags); + op.sanitizer = op.sanitizer && transformExpressionsInExpression(op.sanitizer, transform, flags); + break; + case OpKind.I18nExpression: + op.expression = transformExpressionsInExpression(op.expression, transform, flags); + break; + case OpKind.InterpolateText: + transformExpressionsInInterpolation(op.interpolation, transform, flags); + break; + case OpKind.Statement: + transformExpressionsInStatement(op.statement, transform, flags); + break; + case OpKind.Variable: + op.initializer = transformExpressionsInExpression(op.initializer, transform, flags); + break; + case OpKind.Conditional: + for (const condition of op.conditions) { + if (condition.expr === null) { + // This is a default case. + continue; + } + condition.expr = transformExpressionsInExpression(condition.expr, transform, flags); + } + if (op.processed !== null) { + op.processed = transformExpressionsInExpression(op.processed, transform, flags); + } + if (op.contextValue !== null) { + op.contextValue = transformExpressionsInExpression(op.contextValue, transform, flags); + } + break; + case OpKind.Listener: + case OpKind.TwoWayListener: + for (const innerOp of op.handlerOps) { + transformExpressionsInOp(innerOp, transform, flags | VisitorContextFlag.InChildOperation); + } + break; + case OpKind.ExtractedAttribute: + op.expression = op.expression && transformExpressionsInExpression(op.expression, transform, flags); + op.trustedValueFn = op.trustedValueFn && transformExpressionsInExpression(op.trustedValueFn, transform, flags); + break; + case OpKind.RepeaterCreate: + op.track = transformExpressionsInExpression(op.track, transform, flags); + if (op.trackByFn !== null) { + op.trackByFn = transformExpressionsInExpression(op.trackByFn, transform, flags); + } + break; + case OpKind.Repeater: + op.collection = transformExpressionsInExpression(op.collection, transform, flags); + break; + case OpKind.Defer: + if (op.loadingConfig !== null) { + op.loadingConfig = transformExpressionsInExpression(op.loadingConfig, transform, flags); + } + if (op.placeholderConfig !== null) { + op.placeholderConfig = transformExpressionsInExpression(op.placeholderConfig, transform, flags); + } + if (op.resolverFn !== null) { + op.resolverFn = transformExpressionsInExpression(op.resolverFn, transform, flags); + } + break; + case OpKind.I18nMessage: + for (const [placeholder, expr] of op.params) { + op.params.set(placeholder, transformExpressionsInExpression(expr, transform, flags)); + } + for (const [placeholder, expr] of op.postprocessingParams) { + op.postprocessingParams.set(placeholder, transformExpressionsInExpression(expr, transform, flags)); + } + break; + case OpKind.DeferWhen: + op.expr = transformExpressionsInExpression(op.expr, transform, flags); + break; + case OpKind.StoreLet: + op.value = transformExpressionsInExpression(op.value, transform, flags); + break; + case OpKind.Advance: + case OpKind.Container: + case OpKind.ContainerEnd: + case OpKind.ContainerStart: + case OpKind.DeferOn: + case OpKind.DisableBindings: + case OpKind.Element: + case OpKind.ElementEnd: + case OpKind.ElementStart: + case OpKind.EnableBindings: + case OpKind.I18n: + case OpKind.I18nApply: + case OpKind.I18nContext: + case OpKind.I18nEnd: + case OpKind.I18nStart: + case OpKind.IcuEnd: + case OpKind.IcuStart: + case OpKind.Namespace: + case OpKind.Pipe: + case OpKind.Projection: + case OpKind.ProjectionDef: + case OpKind.Template: + case OpKind.Text: + case OpKind.I18nAttributes: + case OpKind.IcuPlaceholder: + case OpKind.DeclareLet: + // These operations contain no expressions. + break; + default: + throw new Error(`AssertionError: transformExpressionsInOp doesn't handle ${OpKind[op.kind]}`); + } +} +/** + * Transform all `Expression`s in the AST of `expr` with the `transform` function. + * + * All such operations will be replaced with the result of applying `transform`, which may be an + * identity transformation. + */ +function transformExpressionsInExpression(expr, transform, flags) { + if (expr instanceof ExpressionBase) { + expr.transformInternalExpressions(transform, flags); + } else if (expr instanceof BinaryOperatorExpr) { + expr.lhs = transformExpressionsInExpression(expr.lhs, transform, flags); + expr.rhs = transformExpressionsInExpression(expr.rhs, transform, flags); + } else if (expr instanceof UnaryOperatorExpr) { + expr.expr = transformExpressionsInExpression(expr.expr, transform, flags); + } else if (expr instanceof ReadPropExpr) { + expr.receiver = transformExpressionsInExpression(expr.receiver, transform, flags); + } else if (expr instanceof ReadKeyExpr) { + expr.receiver = transformExpressionsInExpression(expr.receiver, transform, flags); + expr.index = transformExpressionsInExpression(expr.index, transform, flags); + } else if (expr instanceof WritePropExpr) { + expr.receiver = transformExpressionsInExpression(expr.receiver, transform, flags); + expr.value = transformExpressionsInExpression(expr.value, transform, flags); + } else if (expr instanceof WriteKeyExpr) { + expr.receiver = transformExpressionsInExpression(expr.receiver, transform, flags); + expr.index = transformExpressionsInExpression(expr.index, transform, flags); + expr.value = transformExpressionsInExpression(expr.value, transform, flags); + } else if (expr instanceof InvokeFunctionExpr) { + expr.fn = transformExpressionsInExpression(expr.fn, transform, flags); + for (let i = 0; i < expr.args.length; i++) { + expr.args[i] = transformExpressionsInExpression(expr.args[i], transform, flags); + } + } else if (expr instanceof LiteralArrayExpr) { + for (let i = 0; i < expr.entries.length; i++) { + expr.entries[i] = transformExpressionsInExpression(expr.entries[i], transform, flags); + } + } else if (expr instanceof LiteralMapExpr) { + for (let i = 0; i < expr.entries.length; i++) { + expr.entries[i].value = transformExpressionsInExpression(expr.entries[i].value, transform, flags); + } + } else if (expr instanceof ConditionalExpr) { + expr.condition = transformExpressionsInExpression(expr.condition, transform, flags); + expr.trueCase = transformExpressionsInExpression(expr.trueCase, transform, flags); + if (expr.falseCase !== null) { + expr.falseCase = transformExpressionsInExpression(expr.falseCase, transform, flags); + } + } else if (expr instanceof TypeofExpr) { + expr.expr = transformExpressionsInExpression(expr.expr, transform, flags); + } else if (expr instanceof WriteVarExpr) { + expr.value = transformExpressionsInExpression(expr.value, transform, flags); + } else if (expr instanceof LocalizedString) { + for (let i = 0; i < expr.expressions.length; i++) { + expr.expressions[i] = transformExpressionsInExpression(expr.expressions[i], transform, flags); + } + } else if (expr instanceof NotExpr) { + expr.condition = transformExpressionsInExpression(expr.condition, transform, flags); + } else if (expr instanceof TaggedTemplateExpr) { + expr.tag = transformExpressionsInExpression(expr.tag, transform, flags); + expr.template.expressions = expr.template.expressions.map(e => transformExpressionsInExpression(e, transform, flags)); + } else if (expr instanceof ArrowFunctionExpr) { + if (Array.isArray(expr.body)) { + for (let i = 0; i < expr.body.length; i++) { + transformExpressionsInStatement(expr.body[i], transform, flags); + } + } else { + expr.body = transformExpressionsInExpression(expr.body, transform, flags); + } + } else if (expr instanceof WrappedNodeExpr) { + // TODO: Do we need to transform any TS nodes nested inside of this expression? + } else if (expr instanceof ReadVarExpr || expr instanceof ExternalExpr || expr instanceof LiteralExpr) { + // No action for these types. + } else { + throw new Error(`Unhandled expression kind: ${expr.constructor.name}`); + } + return transform(expr, flags); +} +/** + * Transform all `Expression`s in the AST of `stmt` with the `transform` function. + * + * All such operations will be replaced with the result of applying `transform`, which may be an + * identity transformation. + */ +function transformExpressionsInStatement(stmt, transform, flags) { + if (stmt instanceof ExpressionStatement) { + stmt.expr = transformExpressionsInExpression(stmt.expr, transform, flags); + } else if (stmt instanceof ReturnStatement) { + stmt.value = transformExpressionsInExpression(stmt.value, transform, flags); + } else if (stmt instanceof DeclareVarStmt) { + if (stmt.value !== undefined) { + stmt.value = transformExpressionsInExpression(stmt.value, transform, flags); + } + } else if (stmt instanceof IfStmt) { + stmt.condition = transformExpressionsInExpression(stmt.condition, transform, flags); + for (const caseStatement of stmt.trueCase) { + transformExpressionsInStatement(caseStatement, transform, flags); + } + for (const caseStatement of stmt.falseCase) { + transformExpressionsInStatement(caseStatement, transform, flags); + } + } else { + throw new Error(`Unhandled statement kind: ${stmt.constructor.name}`); + } +} +/** + * Checks whether the given expression is a string literal. + */ +function isStringLiteral(expr) { + return expr instanceof LiteralExpr && typeof expr.value === 'string'; +} + +/** + * A linked list of `Op` nodes of a given subtype. + * + * @param OpT specific subtype of `Op` nodes which this list contains. + */ +class OpList { + static { + this.nextListId = 0; + } + constructor() { + /** + * Debug ID of this `OpList` instance. + */ + this.debugListId = OpList.nextListId++; + // OpList uses static head/tail nodes of a special `ListEnd` type. + // This avoids the need for special casing of the first and last list + // elements in all list operations. + this.head = { + kind: OpKind.ListEnd, + next: null, + prev: null, + debugListId: this.debugListId + }; + this.tail = { + kind: OpKind.ListEnd, + next: null, + prev: null, + debugListId: this.debugListId + }; + // Link `head` and `tail` together at the start (list is empty). + this.head.next = this.tail; + this.tail.prev = this.head; + } + /** + * Push a new operation to the tail of the list. + */ + push(op) { + if (Array.isArray(op)) { + for (const o of op) { + this.push(o); + } + return; + } + OpList.assertIsNotEnd(op); + OpList.assertIsUnowned(op); + op.debugListId = this.debugListId; + // The old "previous" node (which might be the head, if the list is empty). + const oldLast = this.tail.prev; + // Insert `op` following the old last node. + op.prev = oldLast; + oldLast.next = op; + // Connect `op` with the list tail. + op.next = this.tail; + this.tail.prev = op; + } + /** + * Prepend one or more nodes to the start of the list. + */ + prepend(ops) { + if (ops.length === 0) { + return; + } + for (const op of ops) { + OpList.assertIsNotEnd(op); + OpList.assertIsUnowned(op); + op.debugListId = this.debugListId; + } + const first = this.head.next; + let prev = this.head; + for (const op of ops) { + prev.next = op; + op.prev = prev; + prev = op; + } + prev.next = first; + first.prev = prev; + } + /** + * `OpList` is iterable via the iteration protocol. + * + * It's safe to mutate the part of the list that has already been returned by the iterator, up to + * and including the last operation returned. Mutations beyond that point _may_ be safe, but may + * also corrupt the iteration position and should be avoided. + */ + *[Symbol.iterator]() { + let current = this.head.next; + while (current !== this.tail) { + // Guards against corruption of the iterator state by mutations to the tail of the list during + // iteration. + OpList.assertIsOwned(current, this.debugListId); + const next = current.next; + yield current; + current = next; + } + } + *reversed() { + let current = this.tail.prev; + while (current !== this.head) { + OpList.assertIsOwned(current, this.debugListId); + const prev = current.prev; + yield current; + current = prev; + } + } + /** + * Replace `oldOp` with `newOp` in the list. + */ + static replace(oldOp, newOp) { + OpList.assertIsNotEnd(oldOp); + OpList.assertIsNotEnd(newOp); + OpList.assertIsOwned(oldOp); + OpList.assertIsUnowned(newOp); + newOp.debugListId = oldOp.debugListId; + if (oldOp.prev !== null) { + oldOp.prev.next = newOp; + newOp.prev = oldOp.prev; + } + if (oldOp.next !== null) { + oldOp.next.prev = newOp; + newOp.next = oldOp.next; + } + oldOp.debugListId = null; + oldOp.prev = null; + oldOp.next = null; + } + /** + * Replace `oldOp` with some number of new operations in the list (which may include `oldOp`). + */ + static replaceWithMany(oldOp, newOps) { + if (newOps.length === 0) { + // Replacing with an empty list -> pure removal. + OpList.remove(oldOp); + return; + } + OpList.assertIsNotEnd(oldOp); + OpList.assertIsOwned(oldOp); + const listId = oldOp.debugListId; + oldOp.debugListId = null; + for (const newOp of newOps) { + OpList.assertIsNotEnd(newOp); + // `newOp` might be `oldOp`, but at this point it's been marked as unowned. + OpList.assertIsUnowned(newOp); + } + // It should be safe to reuse `oldOp` in the `newOps` list - maybe you want to sandwich an + // operation between two new ops. + const { + prev: oldPrev, + next: oldNext + } = oldOp; + oldOp.prev = null; + oldOp.next = null; + let prev = oldPrev; + for (const newOp of newOps) { + this.assertIsUnowned(newOp); + newOp.debugListId = listId; + prev.next = newOp; + newOp.prev = prev; + // This _should_ be the case, but set it just in case. + newOp.next = null; + prev = newOp; + } + // At the end of iteration, `prev` holds the last node in the list. + const first = newOps[0]; + const last = prev; + // Replace `oldOp` with the chain `first` -> `last`. + if (oldPrev !== null) { + oldPrev.next = first; + first.prev = oldPrev; + } + if (oldNext !== null) { + oldNext.prev = last; + last.next = oldNext; + } + } + /** + * Remove the given node from the list which contains it. + */ + static remove(op) { + OpList.assertIsNotEnd(op); + OpList.assertIsOwned(op); + op.prev.next = op.next; + op.next.prev = op.prev; + // Break any link between the node and this list to safeguard against its usage in future + // operations. + op.debugListId = null; + op.prev = null; + op.next = null; + } + /** + * Insert `op` before `target`. + */ + static insertBefore(op, target) { + if (Array.isArray(op)) { + for (const o of op) { + this.insertBefore(o, target); + } + return; + } + OpList.assertIsOwned(target); + if (target.prev === null) { + throw new Error(`AssertionError: illegal operation on list start`); + } + OpList.assertIsNotEnd(op); + OpList.assertIsUnowned(op); + op.debugListId = target.debugListId; + // Just in case. + op.prev = null; + target.prev.next = op; + op.prev = target.prev; + op.next = target; + target.prev = op; + } + /** + * Insert `op` after `target`. + */ + static insertAfter(op, target) { + OpList.assertIsOwned(target); + if (target.next === null) { + throw new Error(`AssertionError: illegal operation on list end`); + } + OpList.assertIsNotEnd(op); + OpList.assertIsUnowned(op); + op.debugListId = target.debugListId; + target.next.prev = op; + op.next = target.next; + op.prev = target; + target.next = op; + } + /** + * Asserts that `op` does not currently belong to a list. + */ + static assertIsUnowned(op) { + if (op.debugListId !== null) { + throw new Error(`AssertionError: illegal operation on owned node: ${OpKind[op.kind]}`); + } + } + /** + * Asserts that `op` currently belongs to a list. If `byList` is passed, `op` is asserted to + * specifically belong to that list. + */ + static assertIsOwned(op, byList) { + if (op.debugListId === null) { + throw new Error(`AssertionError: illegal operation on unowned node: ${OpKind[op.kind]}`); + } else if (byList !== undefined && op.debugListId !== byList) { + throw new Error(`AssertionError: node belongs to the wrong list (expected ${byList}, actual ${op.debugListId})`); + } + } + /** + * Asserts that `op` is not a special `ListEnd` node. + */ + static assertIsNotEnd(op) { + if (op.kind === OpKind.ListEnd) { + throw new Error(`AssertionError: illegal operation on list head or tail`); + } + } +} +class SlotHandle { + constructor() { + this.slot = null; + } +} + +/** + * The set of OpKinds that represent the creation of an element or container + */ +const elementContainerOpKinds = new Set([OpKind.Element, OpKind.ElementStart, OpKind.Container, OpKind.ContainerStart, OpKind.Template, OpKind.RepeaterCreate]); +/** + * Checks whether the given operation represents the creation of an element or container. + */ +function isElementOrContainerOp(op) { + return elementContainerOpKinds.has(op.kind); +} +/** + * Create an `ElementStartOp`. + */ +function createElementStartOp(tag, xref, namespace, i18nPlaceholder, startSourceSpan, wholeSourceSpan) { + return { + kind: OpKind.ElementStart, + xref, + tag, + handle: new SlotHandle(), + attributes: null, + localRefs: [], + nonBindable: false, + namespace, + i18nPlaceholder, + startSourceSpan, + wholeSourceSpan, + ...TRAIT_CONSUMES_SLOT, + ...NEW_OP + }; +} +/** + * Create a `TemplateOp`. + */ +function createTemplateOp(xref, templateKind, tag, functionNameSuffix, namespace, i18nPlaceholder, startSourceSpan, wholeSourceSpan) { + return { + kind: OpKind.Template, + xref, + templateKind, + attributes: null, + tag, + handle: new SlotHandle(), + functionNameSuffix, + decls: null, + vars: null, + localRefs: [], + nonBindable: false, + namespace, + i18nPlaceholder, + startSourceSpan, + wholeSourceSpan, + ...TRAIT_CONSUMES_SLOT, + ...NEW_OP + }; +} +function createRepeaterCreateOp(primaryView, emptyView, tag, track, varNames, emptyTag, i18nPlaceholder, emptyI18nPlaceholder, startSourceSpan, wholeSourceSpan) { + return { + kind: OpKind.RepeaterCreate, + attributes: null, + xref: primaryView, + handle: new SlotHandle(), + emptyView, + track, + trackByFn: null, + tag, + emptyTag, + emptyAttributes: null, + functionNameSuffix: 'For', + namespace: Namespace.HTML, + nonBindable: false, + localRefs: [], + decls: null, + vars: null, + varNames, + usesComponentInstance: false, + i18nPlaceholder, + emptyI18nPlaceholder, + startSourceSpan, + wholeSourceSpan, + ...TRAIT_CONSUMES_SLOT, + ...NEW_OP, + ...TRAIT_CONSUMES_VARS, + numSlotsUsed: emptyView === null ? 2 : 3 + }; +} +/** + * Create an `ElementEndOp`. + */ +function createElementEndOp(xref, sourceSpan) { + return { + kind: OpKind.ElementEnd, + xref, + sourceSpan, + ...NEW_OP + }; +} +function createDisableBindingsOp(xref) { + return { + kind: OpKind.DisableBindings, + xref, + ...NEW_OP + }; +} +function createEnableBindingsOp(xref) { + return { + kind: OpKind.EnableBindings, + xref, + ...NEW_OP + }; +} +/** + * Create a `TextOp`. + */ +function createTextOp(xref, initialValue, icuPlaceholder, sourceSpan) { + return { + kind: OpKind.Text, + xref, + handle: new SlotHandle(), + initialValue, + icuPlaceholder, + sourceSpan, + ...TRAIT_CONSUMES_SLOT, + ...NEW_OP + }; +} +/** + * Create a `ListenerOp`. Host bindings reuse all the listener logic. + */ +function createListenerOp(target, targetSlot, name, tag, handlerOps, animationPhase, eventTarget, hostListener, sourceSpan) { + const handlerList = new OpList(); + handlerList.push(handlerOps); + return { + kind: OpKind.Listener, + target, + targetSlot, + tag, + hostListener, + name, + handlerOps: handlerList, + handlerFnName: null, + consumesDollarEvent: false, + isAnimationListener: animationPhase !== null, + animationPhase, + eventTarget, + sourceSpan, + ...NEW_OP + }; +} +/** + * Create a `TwoWayListenerOp`. + */ +function createTwoWayListenerOp(target, targetSlot, name, tag, handlerOps, sourceSpan) { + const handlerList = new OpList(); + handlerList.push(handlerOps); + return { + kind: OpKind.TwoWayListener, + target, + targetSlot, + tag, + name, + handlerOps: handlerList, + handlerFnName: null, + sourceSpan, + ...NEW_OP + }; +} +function createPipeOp(xref, slot, name) { + return { + kind: OpKind.Pipe, + xref, + handle: slot, + name, + ...NEW_OP, + ...TRAIT_CONSUMES_SLOT + }; +} +function createNamespaceOp(namespace) { + return { + kind: OpKind.Namespace, + active: namespace, + ...NEW_OP + }; +} +function createProjectionDefOp(def) { + return { + kind: OpKind.ProjectionDef, + def, + ...NEW_OP + }; +} +function createProjectionOp(xref, selector, i18nPlaceholder, fallbackView, sourceSpan) { + return { + kind: OpKind.Projection, + xref, + handle: new SlotHandle(), + selector, + i18nPlaceholder, + fallbackView, + projectionSlotIndex: 0, + attributes: null, + localRefs: [], + sourceSpan, + ...NEW_OP, + ...TRAIT_CONSUMES_SLOT, + numSlotsUsed: fallbackView === null ? 1 : 2 + }; +} +/** + * Create an `ExtractedAttributeOp`. + */ +function createExtractedAttributeOp(target, bindingKind, namespace, name, expression, i18nContext, i18nMessage, securityContext) { + return { + kind: OpKind.ExtractedAttribute, + target, + bindingKind, + namespace, + name, + expression, + i18nContext, + i18nMessage, + securityContext, + trustedValueFn: null, + ...NEW_OP + }; +} +function createDeferOp(xref, main, mainSlot, ownResolverFn, resolverFn, sourceSpan) { + return { + kind: OpKind.Defer, + xref, + handle: new SlotHandle(), + mainView: main, + mainSlot, + loadingView: null, + loadingSlot: null, + loadingConfig: null, + loadingMinimumTime: null, + loadingAfterTime: null, + placeholderView: null, + placeholderSlot: null, + placeholderConfig: null, + placeholderMinimumTime: null, + errorView: null, + errorSlot: null, + ownResolverFn, + resolverFn, + sourceSpan, + ...NEW_OP, + ...TRAIT_CONSUMES_SLOT, + numSlotsUsed: 2 + }; +} +function createDeferOnOp(defer, trigger, prefetch, sourceSpan) { + return { + kind: OpKind.DeferOn, + defer, + trigger, + prefetch, + sourceSpan, + ...NEW_OP + }; +} +/** + * Creates a `DeclareLetOp`. + */ +function createDeclareLetOp(xref, declaredName, sourceSpan) { + return { + kind: OpKind.DeclareLet, + xref, + declaredName, + sourceSpan, + handle: new SlotHandle(), + ...TRAIT_CONSUMES_SLOT, + ...NEW_OP + }; +} +/** + * Create an `ExtractedMessageOp`. + */ +function createI18nMessageOp(xref, i18nContext, i18nBlock, message, messagePlaceholder, params, postprocessingParams, needsPostprocessing) { + return { + kind: OpKind.I18nMessage, + xref, + i18nContext, + i18nBlock, + message, + messagePlaceholder, + params, + postprocessingParams, + needsPostprocessing, + subMessages: [], + ...NEW_OP + }; +} +/** + * Create an `I18nStartOp`. + */ +function createI18nStartOp(xref, message, root, sourceSpan) { + return { + kind: OpKind.I18nStart, + xref, + handle: new SlotHandle(), + root: root ?? xref, + message, + messageIndex: null, + subTemplateIndex: null, + context: null, + sourceSpan, + ...NEW_OP, + ...TRAIT_CONSUMES_SLOT + }; +} +/** + * Create an `I18nEndOp`. + */ +function createI18nEndOp(xref, sourceSpan) { + return { + kind: OpKind.I18nEnd, + xref, + sourceSpan, + ...NEW_OP + }; +} +/** + * Creates an ICU start op. + */ +function createIcuStartOp(xref, message, messagePlaceholder, sourceSpan) { + return { + kind: OpKind.IcuStart, + xref, + message, + messagePlaceholder, + context: null, + sourceSpan, + ...NEW_OP + }; +} +/** + * Creates an ICU end op. + */ +function createIcuEndOp(xref) { + return { + kind: OpKind.IcuEnd, + xref, + ...NEW_OP + }; +} +/** + * Creates an ICU placeholder op. + */ +function createIcuPlaceholderOp(xref, name, strings) { + return { + kind: OpKind.IcuPlaceholder, + xref, + name, + strings, + expressionPlaceholders: [], + ...NEW_OP + }; +} +function createI18nContextOp(contextKind, xref, i18nBlock, message, sourceSpan) { + if (i18nBlock === null && contextKind !== I18nContextKind.Attr) { + throw new Error('AssertionError: i18nBlock must be provided for non-attribute contexts.'); + } + return { + kind: OpKind.I18nContext, + contextKind, + xref, + i18nBlock, + message, + sourceSpan, + params: new Map(), + postprocessingParams: new Map(), + ...NEW_OP + }; +} +function createI18nAttributesOp(xref, handle, target) { + return { + kind: OpKind.I18nAttributes, + xref, + handle, + target, + i18nAttributesConfig: null, + ...NEW_OP, + ...TRAIT_CONSUMES_SLOT + }; +} +function createHostPropertyOp(name, expression, isAnimationTrigger, i18nContext, securityContext, sourceSpan) { + return { + kind: OpKind.HostProperty, + name, + expression, + isAnimationTrigger, + i18nContext, + securityContext, + sanitizer: null, + sourceSpan, + ...TRAIT_CONSUMES_VARS, + ...NEW_OP + }; +} + +/** + * When referenced in the template's context parameters, this indicates a reference to the entire + * context object, rather than a specific parameter. + */ +const CTX_REF = 'CTX_REF_MARKER'; +var CompilationJobKind; +(function (CompilationJobKind) { + CompilationJobKind[CompilationJobKind["Tmpl"] = 0] = "Tmpl"; + CompilationJobKind[CompilationJobKind["Host"] = 1] = "Host"; + CompilationJobKind[CompilationJobKind["Both"] = 2] = "Both"; +})(CompilationJobKind || (CompilationJobKind = {})); +/** + * An entire ongoing compilation, which will result in one or more template functions when complete. + * Contains one or more corresponding compilation units. + */ +class CompilationJob { + constructor(componentName, pool, compatibility) { + this.componentName = componentName; + this.pool = pool; + this.compatibility = compatibility; + this.kind = CompilationJobKind.Both; + /** + * Tracks the next `ir.XrefId` which can be assigned as template structures are ingested. + */ + this.nextXrefId = 0; + } + /** + * Generate a new unique `ir.XrefId` in this job. + */ + allocateXrefId() { + return this.nextXrefId++; + } +} +/** + * Compilation-in-progress of a whole component's template, including the main template and any + * embedded views or host bindings. + */ +class ComponentCompilationJob extends CompilationJob { + constructor(componentName, pool, compatibility, relativeContextFilePath, i18nUseExternalIds, deferMeta, allDeferrableDepsFn) { + super(componentName, pool, compatibility); + this.relativeContextFilePath = relativeContextFilePath; + this.i18nUseExternalIds = i18nUseExternalIds; + this.deferMeta = deferMeta; + this.allDeferrableDepsFn = allDeferrableDepsFn; + this.kind = CompilationJobKind.Tmpl; + this.fnSuffix = 'Template'; + this.views = new Map(); + /** + * Causes ngContentSelectors to be emitted, for content projection slots in the view. Possibly a + * reference into the constant pool. + */ + this.contentSelectors = null; + /** + * Constant expressions used by operations within this component's compilation. + * + * This will eventually become the `consts` array in the component definition. + */ + this.consts = []; + /** + * Initialization statements needed to set up the consts. + */ + this.constsInitializers = []; + this.root = new ViewCompilationUnit(this, this.allocateXrefId(), null); + this.views.set(this.root.xref, this.root); + } + /** + * Add a `ViewCompilation` for a new embedded view to this compilation. + */ + allocateView(parent) { + const view = new ViewCompilationUnit(this, this.allocateXrefId(), parent); + this.views.set(view.xref, view); + return view; + } + get units() { + return this.views.values(); + } + /** + * Add a constant `o.Expression` to the compilation and return its index in the `consts` array. + */ + addConst(newConst, initializers) { + for (let idx = 0; idx < this.consts.length; idx++) { + if (this.consts[idx].isEquivalent(newConst)) { + return idx; + } + } + const idx = this.consts.length; + this.consts.push(newConst); + if (initializers) { + this.constsInitializers.push(...initializers); + } + return idx; + } +} +/** + * A compilation unit is compiled into a template function. Some example units are views and host + * bindings. + */ +class CompilationUnit { + constructor(xref) { + this.xref = xref; + /** + * List of creation operations for this view. + * + * Creation operations may internally contain other operations, including update operations. + */ + this.create = new OpList(); + /** + * List of update operations for this view. + */ + this.update = new OpList(); + /** + * Name of the function which will be generated for this unit. + * + * May be `null` if not yet determined. + */ + this.fnName = null; + /** + * Number of variable slots used within this view, or `null` if variables have not yet been + * counted. + */ + this.vars = null; + } + /** + * Iterate over all `ir.Op`s within this view. + * + * Some operations may have child operations, which this iterator will visit. + */ + *ops() { + for (const op of this.create) { + yield op; + if (op.kind === OpKind.Listener || op.kind === OpKind.TwoWayListener) { + for (const listenerOp of op.handlerOps) { + yield listenerOp; + } + } + } + for (const op of this.update) { + yield op; + } + } +} +/** + * Compilation-in-progress of an individual view within a template. + */ +class ViewCompilationUnit extends CompilationUnit { + constructor(job, xref, parent) { + super(xref); + this.job = job; + this.parent = parent; + /** + * Map of declared variables available within this view to the property on the context object + * which they alias. + */ + this.contextVariables = new Map(); + /** + * Set of aliases available within this view. An alias is a variable whose provided expression is + * inlined at every location it is used. It may also depend on context variables, by name. + */ + this.aliases = new Set(); + /** + * Number of declaration slots used within this view, or `null` if slots have not yet been + * allocated. + */ + this.decls = null; + } +} +/** + * Compilation-in-progress of a host binding, which contains a single unit for that host binding. + */ +class HostBindingCompilationJob extends CompilationJob { + constructor(componentName, pool, compatibility) { + super(componentName, pool, compatibility); + this.kind = CompilationJobKind.Host; + this.fnSuffix = 'HostBindings'; + this.root = new HostBindingCompilationUnit(this); + } + get units() { + return [this.root]; + } +} +class HostBindingCompilationUnit extends CompilationUnit { + constructor(job) { + super(0); + this.job = job; + /** + * Much like an element can have attributes, so can a host binding function. + */ + this.attributes = null; + } +} + +/** + * Find any function calls to `$any`, excluding `this.$any`, and delete them, since they have no + * runtime effects. + */ +function deleteAnyCasts(job) { + for (const unit of job.units) { + for (const op of unit.ops()) { + transformExpressionsInOp(op, removeAnys, VisitorContextFlag.None); + } + } +} +function removeAnys(e) { + if (e instanceof InvokeFunctionExpr && e.fn instanceof LexicalReadExpr && e.fn.name === '$any') { + if (e.args.length !== 1) { + throw new Error('The $any builtin function expects exactly one argument.'); + } + return e.args[0]; + } + return e; +} + +/** + * Adds apply operations after i18n expressions. + */ +function applyI18nExpressions(job) { + const i18nContexts = new Map(); + for (const unit of job.units) { + for (const op of unit.create) { + if (op.kind === OpKind.I18nContext) { + i18nContexts.set(op.xref, op); + } + } + } + for (const unit of job.units) { + for (const op of unit.update) { + // Only add apply after expressions that are not followed by more expressions. + if (op.kind === OpKind.I18nExpression && needsApplication(i18nContexts, op)) { + // TODO: what should be the source span for the apply op? + OpList.insertAfter(createI18nApplyOp(op.i18nOwner, op.handle, null), op); + } + } + } +} +/** + * Checks whether the given expression op needs to be followed with an apply op. + */ +function needsApplication(i18nContexts, op) { + // If the next op is not another expression, we need to apply. + if (op.next?.kind !== OpKind.I18nExpression) { + return true; + } + const context = i18nContexts.get(op.context); + const nextContext = i18nContexts.get(op.next.context); + if (context === undefined) { + throw new Error("AssertionError: expected an I18nContextOp to exist for the I18nExpressionOp's context"); + } + if (nextContext === undefined) { + throw new Error("AssertionError: expected an I18nContextOp to exist for the next I18nExpressionOp's context"); + } + // If the next op is an expression targeting a different i18n block (or different element, in the + // case of i18n attributes), we need to apply. + // First, handle the case of i18n blocks. + if (context.i18nBlock !== null) { + // This is a block context. Compare the blocks. + if (context.i18nBlock !== nextContext.i18nBlock) { + return true; + } + return false; + } + // Second, handle the case of i18n attributes. + if (op.i18nOwner !== op.next.i18nOwner) { + return true; + } + return false; +} + +/** + * Updates i18n expression ops to target the last slot in their owning i18n block, and moves them + * after the last update instruction that depends on that slot. + */ +function assignI18nSlotDependencies(job) { + for (const unit of job.units) { + // The first update op. + let updateOp = unit.update.head; + // I18n expressions currently being moved during the iteration. + let i18nExpressionsInProgress = []; + // Non-null while we are iterating through an i18nStart/i18nEnd pair + let state = null; + for (const createOp of unit.create) { + if (createOp.kind === OpKind.I18nStart) { + state = { + blockXref: createOp.xref, + lastSlotConsumer: createOp.xref + }; + } else if (createOp.kind === OpKind.I18nEnd) { + for (const op of i18nExpressionsInProgress) { + op.target = state.lastSlotConsumer; + OpList.insertBefore(op, updateOp); + } + i18nExpressionsInProgress.length = 0; + state = null; + } + if (hasConsumesSlotTrait(createOp)) { + if (state !== null) { + state.lastSlotConsumer = createOp.xref; + } + while (true) { + if (updateOp.next === null) { + break; + } + if (state !== null && updateOp.kind === OpKind.I18nExpression && updateOp.usage === I18nExpressionFor.I18nText && updateOp.i18nOwner === state.blockXref) { + const opToRemove = updateOp; + updateOp = updateOp.next; + OpList.remove(opToRemove); + i18nExpressionsInProgress.push(opToRemove); + continue; + } + if (hasDependsOnSlotContextTrait(updateOp) && updateOp.target !== createOp.xref) { + break; + } + updateOp = updateOp.next; + } + } + } + } +} + +/** + * Gets a map of all elements in the given view by their xref id. + */ +function createOpXrefMap(unit) { + const map = new Map(); + for (const op of unit.create) { + if (!hasConsumesSlotTrait(op)) { + continue; + } + map.set(op.xref, op); + // TODO(dylhunn): `@for` loops with `@empty` blocks need to be special-cased here, + // because the slot consumer trait currently only supports one slot per consumer and we + // need two. This should be revisited when making the refactors mentioned in: + // https://github.com/angular/angular/pull/53620#discussion_r1430918822 + if (op.kind === OpKind.RepeaterCreate && op.emptyView !== null) { + map.set(op.emptyView, op); + } + } + return map; +} + +/** + * Find all extractable attribute and binding ops, and create ExtractedAttributeOps for them. + * In cases where no instruction needs to be generated for the attribute or binding, it is removed. + */ +function extractAttributes(job) { + for (const unit of job.units) { + const elements = createOpXrefMap(unit); + for (const op of unit.ops()) { + switch (op.kind) { + case OpKind.Attribute: + extractAttributeOp(unit, op, elements); + break; + case OpKind.Property: + if (!op.isAnimationTrigger) { + let bindingKind; + if (op.i18nMessage !== null && op.templateKind === null) { + // If the binding has an i18n context, it is an i18n attribute, and should have that + // kind in the consts array. + bindingKind = BindingKind.I18n; + } else if (op.isStructuralTemplateAttribute) { + bindingKind = BindingKind.Template; + } else { + bindingKind = BindingKind.Property; + } + OpList.insertBefore( + // Deliberately null i18nMessage value + createExtractedAttributeOp(op.target, bindingKind, null, op.name, /* expression */null, /* i18nContext */null, /* i18nMessage */null, op.securityContext), lookupElement$2(elements, op.target)); + } + break; + case OpKind.TwoWayProperty: + OpList.insertBefore(createExtractedAttributeOp(op.target, BindingKind.TwoWayProperty, null, op.name, /* expression */null, /* i18nContext */null, /* i18nMessage */null, op.securityContext), lookupElement$2(elements, op.target)); + break; + case OpKind.StyleProp: + case OpKind.ClassProp: + // TODO: Can style or class bindings be i18n attributes? + // The old compiler treated empty style bindings as regular bindings for the purpose of + // directive matching. That behavior is incorrect, but we emulate it in compatibility + // mode. + if (unit.job.compatibility === CompatibilityMode.TemplateDefinitionBuilder && op.expression instanceof EmptyExpr) { + OpList.insertBefore(createExtractedAttributeOp(op.target, BindingKind.Property, null, op.name, /* expression */null, /* i18nContext */null, /* i18nMessage */null, SecurityContext.STYLE), lookupElement$2(elements, op.target)); + } + break; + case OpKind.Listener: + if (!op.isAnimationListener) { + const extractedAttributeOp = createExtractedAttributeOp(op.target, BindingKind.Property, null, op.name, /* expression */null, /* i18nContext */null, /* i18nMessage */null, SecurityContext.NONE); + if (job.kind === CompilationJobKind.Host) { + if (job.compatibility) { + // TemplateDefinitionBuilder does not extract listener bindings to the const array + // (which is honestly pretty inconsistent). + break; + } + // This attribute will apply to the enclosing host binding compilation unit, so order + // doesn't matter. + unit.create.push(extractedAttributeOp); + } else { + OpList.insertBefore(extractedAttributeOp, lookupElement$2(elements, op.target)); + } + } + break; + case OpKind.TwoWayListener: + // Two-way listeners aren't supported in host bindings. + if (job.kind !== CompilationJobKind.Host) { + const extractedAttributeOp = createExtractedAttributeOp(op.target, BindingKind.Property, null, op.name, /* expression */null, /* i18nContext */null, /* i18nMessage */null, SecurityContext.NONE); + OpList.insertBefore(extractedAttributeOp, lookupElement$2(elements, op.target)); + } + break; + } + } + } +} +/** + * Looks up an element in the given map by xref ID. + */ +function lookupElement$2(elements, xref) { + const el = elements.get(xref); + if (el === undefined) { + throw new Error('All attributes should have an element-like target.'); + } + return el; +} +/** + * Extracts an attribute binding. + */ +function extractAttributeOp(unit, op, elements) { + if (op.expression instanceof Interpolation) { + return; + } + let extractable = op.isTextAttribute || op.expression.isConstant(); + if (unit.job.compatibility === CompatibilityMode.TemplateDefinitionBuilder) { + // TemplateDefinitionBuilder only extracts text attributes. It does not extract attriibute + // bindings, even if they are constants. + extractable &&= op.isTextAttribute; + } + if (extractable) { + const extractedAttributeOp = createExtractedAttributeOp(op.target, op.isStructuralTemplateAttribute ? BindingKind.Template : BindingKind.Attribute, op.namespace, op.name, op.expression, op.i18nContext, op.i18nMessage, op.securityContext); + if (unit.job.kind === CompilationJobKind.Host) { + // This attribute will apply to the enclosing host binding compilation unit, so order doesn't + // matter. + unit.create.push(extractedAttributeOp); + } else { + const ownerOp = lookupElement$2(elements, op.target); + OpList.insertBefore(extractedAttributeOp, ownerOp); + } + OpList.remove(op); + } +} + +/** + * Looks up an element in the given map by xref ID. + */ +function lookupElement$1(elements, xref) { + const el = elements.get(xref); + if (el === undefined) { + throw new Error('All attributes should have an element-like target.'); + } + return el; +} +function specializeBindings(job) { + const elements = new Map(); + for (const unit of job.units) { + for (const op of unit.create) { + if (!isElementOrContainerOp(op)) { + continue; + } + elements.set(op.xref, op); + } + } + for (const unit of job.units) { + for (const op of unit.ops()) { + if (op.kind !== OpKind.Binding) { + continue; + } + switch (op.bindingKind) { + case BindingKind.Attribute: + if (op.name === 'ngNonBindable') { + OpList.remove(op); + const target = lookupElement$1(elements, op.target); + target.nonBindable = true; + } else { + const [namespace, name] = splitNsName(op.name); + OpList.replace(op, createAttributeOp(op.target, namespace, name, op.expression, op.securityContext, op.isTextAttribute, op.isStructuralTemplateAttribute, op.templateKind, op.i18nMessage, op.sourceSpan)); + } + break; + case BindingKind.Property: + case BindingKind.Animation: + if (job.kind === CompilationJobKind.Host) { + OpList.replace(op, createHostPropertyOp(op.name, op.expression, op.bindingKind === BindingKind.Animation, op.i18nContext, op.securityContext, op.sourceSpan)); + } else { + OpList.replace(op, createPropertyOp(op.target, op.name, op.expression, op.bindingKind === BindingKind.Animation, op.securityContext, op.isStructuralTemplateAttribute, op.templateKind, op.i18nContext, op.i18nMessage, op.sourceSpan)); + } + break; + case BindingKind.TwoWayProperty: + if (!(op.expression instanceof Expression)) { + // We shouldn't be able to hit this code path since interpolations in two-way bindings + // result in a parser error. We assert here so that downstream we can assume that + // the value is always an expression. + throw new Error(`Expected value of two-way property binding "${op.name}" to be an expression`); + } + OpList.replace(op, createTwoWayPropertyOp(op.target, op.name, op.expression, op.securityContext, op.isStructuralTemplateAttribute, op.templateKind, op.i18nContext, op.i18nMessage, op.sourceSpan)); + break; + case BindingKind.I18n: + case BindingKind.ClassName: + case BindingKind.StyleProperty: + throw new Error(`Unhandled binding of kind ${BindingKind[op.bindingKind]}`); + } + } + } +} +const CHAINABLE = new Set([Identifiers.attribute, Identifiers.classProp, Identifiers.element, Identifiers.elementContainer, Identifiers.elementContainerEnd, Identifiers.elementContainerStart, Identifiers.elementEnd, Identifiers.elementStart, Identifiers.hostProperty, Identifiers.i18nExp, Identifiers.listener, Identifiers.listener, Identifiers.property, Identifiers.styleProp, Identifiers.stylePropInterpolate1, Identifiers.stylePropInterpolate2, Identifiers.stylePropInterpolate3, Identifiers.stylePropInterpolate4, Identifiers.stylePropInterpolate5, Identifiers.stylePropInterpolate6, Identifiers.stylePropInterpolate7, Identifiers.stylePropInterpolate8, Identifiers.stylePropInterpolateV, Identifiers.syntheticHostListener, Identifiers.syntheticHostProperty, Identifiers.templateCreate, Identifiers.twoWayProperty, Identifiers.twoWayListener, Identifiers.declareLet]); +/** + * Chaining results in repeated call expressions, causing a deep AST of receiver expressions. To prevent running out of + * stack depth the maximum number of chained instructions is limited to this threshold, which has been selected + * arbitrarily. + */ +const MAX_CHAIN_LENGTH = 256; +/** + * Post-process a reified view compilation and convert sequential calls to chainable instructions + * into chain calls. + * + * For example, two `elementStart` operations in sequence: + * + * ```typescript + * elementStart(0, 'div'); + * elementStart(1, 'span'); + * ``` + * + * Can be called as a chain instead: + * + * ```typescript + * elementStart(0, 'div')(1, 'span'); + * ``` + */ +function chain(job) { + for (const unit of job.units) { + chainOperationsInList(unit.create); + chainOperationsInList(unit.update); + } +} +function chainOperationsInList(opList) { + let chain = null; + for (const op of opList) { + if (op.kind !== OpKind.Statement || !(op.statement instanceof ExpressionStatement)) { + // This type of statement isn't chainable. + chain = null; + continue; + } + if (!(op.statement.expr instanceof InvokeFunctionExpr) || !(op.statement.expr.fn instanceof ExternalExpr)) { + // This is a statement, but not an instruction-type call, so not chainable. + chain = null; + continue; + } + const instruction = op.statement.expr.fn.value; + if (!CHAINABLE.has(instruction)) { + // This instruction isn't chainable. + chain = null; + continue; + } + // This instruction can be chained. It can either be added on to the previous chain (if + // compatible) or it can be the start of a new chain. + if (chain !== null && chain.instruction === instruction && chain.length < MAX_CHAIN_LENGTH) { + // This instruction can be added onto the previous chain. + const expression = chain.expression.callFn(op.statement.expr.args, op.statement.expr.sourceSpan, op.statement.expr.pure); + chain.expression = expression; + chain.op.statement = expression.toStmt(); + chain.length++; + OpList.remove(op); + } else { + // Leave this instruction alone for now, but consider it the start of a new chain. + chain = { + op, + instruction, + expression: op.statement.expr, + length: 1 + }; + } + } +} + +/** + * Attribute interpolations of the form `[attr.foo]="{{foo}}""` should be "collapsed" into a plain + * attribute instruction, instead of an `attributeInterpolate` instruction. + * + * (We cannot do this for singleton property interpolations, because `propertyInterpolate` + * stringifies its expression.) + * + * The reification step is also capable of performing this transformation, but doing it early in the + * pipeline allows other phases to accurately know what instruction will be emitted. + */ +function collapseSingletonInterpolations(job) { + for (const unit of job.units) { + for (const op of unit.update) { + const eligibleOpKind = op.kind === OpKind.Attribute; + if (eligibleOpKind && op.expression instanceof Interpolation && op.expression.strings.length === 2 && op.expression.strings.every(s => s === '')) { + op.expression = op.expression.expressions[0]; + } + } + } +} + +/** + * Collapse the various conditions of conditional ops (if, switch) into a single test expression. + */ +function generateConditionalExpressions(job) { + for (const unit of job.units) { + for (const op of unit.ops()) { + if (op.kind !== OpKind.Conditional) { + continue; + } + let test; + // Any case with a `null` condition is `default`. If one exists, default to it instead. + const defaultCase = op.conditions.findIndex(cond => cond.expr === null); + if (defaultCase >= 0) { + const slot = op.conditions.splice(defaultCase, 1)[0].targetSlot; + test = new SlotLiteralExpr(slot); + } else { + // By default, a switch evaluates to `-1`, causing no template to be displayed. + test = literal(-1); + } + // Switch expressions assign their main test to a temporary, to avoid re-executing it. + let tmp = op.test == null ? null : new AssignTemporaryExpr(op.test, job.allocateXrefId()); + // For each remaining condition, test whether the temporary satifies the check. (If no temp is + // present, just check each expression directly.) + for (let i = op.conditions.length - 1; i >= 0; i--) { + let conditionalCase = op.conditions[i]; + if (conditionalCase.expr === null) { + continue; + } + if (tmp !== null) { + const useTmp = i === 0 ? tmp : new ReadTemporaryExpr(tmp.xref); + conditionalCase.expr = new BinaryOperatorExpr(BinaryOperator.Identical, useTmp, conditionalCase.expr); + } else if (conditionalCase.alias !== null) { + const caseExpressionTemporaryXref = job.allocateXrefId(); + conditionalCase.expr = new AssignTemporaryExpr(conditionalCase.expr, caseExpressionTemporaryXref); + op.contextValue = new ReadTemporaryExpr(caseExpressionTemporaryXref); + } + test = new ConditionalExpr(conditionalCase.expr, new SlotLiteralExpr(conditionalCase.targetSlot), test); + } + // Save the resulting aggregate Joost-expression. + op.processed = test; + // Clear the original conditions array, since we no longer need it, and don't want it to + // affect subsequent phases (e.g. pipe creation). + op.conditions = []; + } + } +} +const BINARY_OPERATORS = new Map([['&&', BinaryOperator.And], ['>', BinaryOperator.Bigger], ['>=', BinaryOperator.BiggerEquals], ['|', BinaryOperator.BitwiseOr], ['&', BinaryOperator.BitwiseAnd], ['/', BinaryOperator.Divide], ['==', BinaryOperator.Equals], ['===', BinaryOperator.Identical], ['<', BinaryOperator.Lower], ['<=', BinaryOperator.LowerEquals], ['-', BinaryOperator.Minus], ['%', BinaryOperator.Modulo], ['*', BinaryOperator.Multiply], ['!=', BinaryOperator.NotEquals], ['!==', BinaryOperator.NotIdentical], ['??', BinaryOperator.NullishCoalesce], ['||', BinaryOperator.Or], ['+', BinaryOperator.Plus]]); +function namespaceForKey(namespacePrefixKey) { + const NAMESPACES = new Map([['svg', Namespace.SVG], ['math', Namespace.Math]]); + if (namespacePrefixKey === null) { + return Namespace.HTML; + } + return NAMESPACES.get(namespacePrefixKey) ?? Namespace.HTML; +} +function keyForNamespace(namespace) { + const NAMESPACES = new Map([['svg', Namespace.SVG], ['math', Namespace.Math]]); + for (const [k, n] of NAMESPACES.entries()) { + if (n === namespace) { + return k; + } + } + return null; // No namespace prefix for HTML +} +function prefixWithNamespace(strippedTag, namespace) { + if (namespace === Namespace.HTML) { + return strippedTag; + } + return `:${keyForNamespace(namespace)}:${strippedTag}`; +} +function literalOrArrayLiteral(value) { + if (Array.isArray(value)) { + return literalArr(value.map(literalOrArrayLiteral)); + } + return literal(value); +} + +/** + * Converts the semantic attributes of element-like operations (elements, templates) into constant + * array expressions, and lifts them into the overall component `consts`. + */ +function collectElementConsts(job) { + // Collect all extracted attributes. + const allElementAttributes = new Map(); + for (const unit of job.units) { + for (const op of unit.create) { + if (op.kind === OpKind.ExtractedAttribute) { + const attributes = allElementAttributes.get(op.target) || new ElementAttributes(job.compatibility); + allElementAttributes.set(op.target, attributes); + attributes.add(op.bindingKind, op.name, op.expression, op.namespace, op.trustedValueFn); + OpList.remove(op); + } + } + } + // Serialize the extracted attributes into the const array. + if (job instanceof ComponentCompilationJob) { + for (const unit of job.units) { + for (const op of unit.create) { + // TODO: Simplify and combine these cases. + if (op.kind == OpKind.Projection) { + const attributes = allElementAttributes.get(op.xref); + if (attributes !== undefined) { + const attrArray = serializeAttributes(attributes); + if (attrArray.entries.length > 0) { + op.attributes = attrArray; + } + } + } else if (isElementOrContainerOp(op)) { + op.attributes = getConstIndex(job, allElementAttributes, op.xref); + // TODO(dylhunn): `@for` loops with `@empty` blocks need to be special-cased here, + // because the slot consumer trait currently only supports one slot per consumer and we + // need two. This should be revisited when making the refactors mentioned in: + // https://github.com/angular/angular/pull/53620#discussion_r1430918822 + if (op.kind === OpKind.RepeaterCreate && op.emptyView !== null) { + op.emptyAttributes = getConstIndex(job, allElementAttributes, op.emptyView); + } + } + } + } + } else if (job instanceof HostBindingCompilationJob) { + // TODO: If the host binding case further diverges, we may want to split it into its own + // phase. + for (const [xref, attributes] of allElementAttributes.entries()) { + if (xref !== job.root.xref) { + throw new Error(`An attribute would be const collected into the host binding's template function, but is not associated with the root xref.`); + } + const attrArray = serializeAttributes(attributes); + if (attrArray.entries.length > 0) { + job.root.attributes = attrArray; + } + } + } +} +function getConstIndex(job, allElementAttributes, xref) { + const attributes = allElementAttributes.get(xref); + if (attributes !== undefined) { + const attrArray = serializeAttributes(attributes); + if (attrArray.entries.length > 0) { + return job.addConst(attrArray); + } + } + return null; +} +/** + * Shared instance of an empty array to avoid unnecessary array allocations. + */ +const FLYWEIGHT_ARRAY = Object.freeze([]); +/** + * Container for all of the various kinds of attributes which are applied on an element. + */ +class ElementAttributes { + get attributes() { + return this.byKind.get(BindingKind.Attribute) ?? FLYWEIGHT_ARRAY; + } + get classes() { + return this.byKind.get(BindingKind.ClassName) ?? FLYWEIGHT_ARRAY; + } + get styles() { + return this.byKind.get(BindingKind.StyleProperty) ?? FLYWEIGHT_ARRAY; + } + get bindings() { + return this.propertyBindings ?? FLYWEIGHT_ARRAY; + } + get template() { + return this.byKind.get(BindingKind.Template) ?? FLYWEIGHT_ARRAY; + } + get i18n() { + return this.byKind.get(BindingKind.I18n) ?? FLYWEIGHT_ARRAY; + } + constructor(compatibility) { + this.compatibility = compatibility; + this.known = new Map(); + this.byKind = new Map(); + this.propertyBindings = null; + this.projectAs = null; + } + isKnown(kind, name) { + const nameToValue = this.known.get(kind) ?? new Set(); + this.known.set(kind, nameToValue); + if (nameToValue.has(name)) { + return true; + } + nameToValue.add(name); + return false; + } + add(kind, name, value, namespace, trustedValueFn) { + // TemplateDefinitionBuilder puts duplicate attribute, class, and style values into the consts + // array. This seems inefficient, we can probably keep just the first one or the last value + // (whichever actually gets applied when multiple values are listed for the same attribute). + const allowDuplicates = this.compatibility === CompatibilityMode.TemplateDefinitionBuilder && (kind === BindingKind.Attribute || kind === BindingKind.ClassName || kind === BindingKind.StyleProperty); + if (!allowDuplicates && this.isKnown(kind, name)) { + return; + } + // TODO: Can this be its own phase + if (name === 'ngProjectAs') { + if (value === null || !(value instanceof LiteralExpr) || value.value == null || typeof value.value?.toString() !== 'string') { + throw Error('ngProjectAs must have a string literal value'); + } + this.projectAs = value.value.toString(); + // TODO: TemplateDefinitionBuilder allows `ngProjectAs` to also be assigned as a literal + // attribute. Is this sane? + } + const array = this.arrayFor(kind); + array.push(...getAttributeNameLiterals(namespace, name)); + if (kind === BindingKind.Attribute || kind === BindingKind.StyleProperty) { + if (value === null) { + throw Error('Attribute, i18n attribute, & style element attributes must have a value'); + } + if (trustedValueFn !== null) { + if (!isStringLiteral(value)) { + throw Error('AssertionError: extracted attribute value should be string literal'); + } + array.push(taggedTemplate(trustedValueFn, new TemplateLiteral([new TemplateLiteralElement(value.value)], []), undefined, value.sourceSpan)); + } else { + array.push(value); + } + } + } + arrayFor(kind) { + if (kind === BindingKind.Property || kind === BindingKind.TwoWayProperty) { + this.propertyBindings ??= []; + return this.propertyBindings; + } else { + if (!this.byKind.has(kind)) { + this.byKind.set(kind, []); + } + return this.byKind.get(kind); + } + } +} +/** + * Gets an array of literal expressions representing the attribute's namespaced name. + */ +function getAttributeNameLiterals(namespace, name) { + const nameLiteral = literal(name); + if (namespace) { + return [literal(0 /* core.AttributeMarker.NamespaceURI */), literal(namespace), nameLiteral]; + } + return [nameLiteral]; +} +/** + * Serializes an ElementAttributes object into an array expression. + */ +function serializeAttributes({ + attributes, + bindings, + classes, + i18n, + projectAs, + styles, + template +}) { + const attrArray = [...attributes]; + if (projectAs !== null) { + // Parse the attribute value into a CssSelectorList. Note that we only take the + // first selector, because we don't support multiple selectors in ngProjectAs. + const parsedR3Selector = parseSelectorToR3Selector(projectAs)[0]; + attrArray.push(literal(5 /* core.AttributeMarker.ProjectAs */), literalOrArrayLiteral(parsedR3Selector)); + } + if (classes.length > 0) { + attrArray.push(literal(1 /* core.AttributeMarker.Classes */), ...classes); + } + if (styles.length > 0) { + attrArray.push(literal(2 /* core.AttributeMarker.Styles */), ...styles); + } + if (bindings.length > 0) { + attrArray.push(literal(3 /* core.AttributeMarker.Bindings */), ...bindings); + } + if (template.length > 0) { + attrArray.push(literal(4 /* core.AttributeMarker.Template */), ...template); + } + if (i18n.length > 0) { + attrArray.push(literal(6 /* core.AttributeMarker.I18n */), ...i18n); + } + return literalArr(attrArray); +} + +/** + * Some binding instructions in the update block may actually correspond to i18n bindings. In that + * case, they should be replaced with i18nExp instructions for the dynamic portions. + */ +function convertI18nBindings(job) { + const i18nAttributesByElem = new Map(); + for (const unit of job.units) { + for (const op of unit.create) { + if (op.kind === OpKind.I18nAttributes) { + i18nAttributesByElem.set(op.target, op); + } + } + for (const op of unit.update) { + switch (op.kind) { + case OpKind.Property: + case OpKind.Attribute: + if (op.i18nContext === null) { + continue; + } + if (!(op.expression instanceof Interpolation)) { + continue; + } + const i18nAttributesForElem = i18nAttributesByElem.get(op.target); + if (i18nAttributesForElem === undefined) { + throw new Error('AssertionError: An i18n attribute binding instruction requires the owning element to have an I18nAttributes create instruction'); + } + if (i18nAttributesForElem.target !== op.target) { + throw new Error('AssertionError: Expected i18nAttributes target element to match binding target element'); + } + const ops = []; + for (let i = 0; i < op.expression.expressions.length; i++) { + const expr = op.expression.expressions[i]; + if (op.expression.i18nPlaceholders.length !== op.expression.expressions.length) { + throw new Error(`AssertionError: An i18n attribute binding instruction requires the same number of expressions and placeholders, but found ${op.expression.i18nPlaceholders.length} placeholders and ${op.expression.expressions.length} expressions`); + } + ops.push(createI18nExpressionOp(op.i18nContext, i18nAttributesForElem.target, i18nAttributesForElem.xref, i18nAttributesForElem.handle, expr, null, op.expression.i18nPlaceholders[i], I18nParamResolutionTime.Creation, I18nExpressionFor.I18nAttribute, op.name, op.sourceSpan)); + } + OpList.replaceWithMany(op, ops); + break; + } + } + } +} + +/** + * Resolve the dependency function of a deferred block. + */ +function resolveDeferDepsFns(job) { + for (const unit of job.units) { + for (const op of unit.create) { + if (op.kind === OpKind.Defer) { + if (op.resolverFn !== null) { + continue; + } + if (op.ownResolverFn !== null) { + if (op.handle.slot === null) { + throw new Error('AssertionError: slot must be assigned before extracting defer deps functions'); + } + const fullPathName = unit.fnName?.replace('_Template', ''); + op.resolverFn = job.pool.getSharedFunctionReference(op.ownResolverFn, `${fullPathName}_Defer_${op.handle.slot}_DepsFn`, /* Don't use unique names for TDB compatibility */false); + } + } + } + } +} + +/** + * Create one helper context op per i18n block (including generate descending blocks). + * + * Also, if an ICU exists inside an i18n block that also contains other localizable content (such as + * string), create an additional helper context op for the ICU. + * + * These context ops are later used for generating i18n messages. (Although we generate at least one + * context op per nested view, we will collect them up the tree later, to generate a top-level + * message.) + */ +function createI18nContexts(job) { + // Create i18n context ops for i18n attrs. + const attrContextByMessage = new Map(); + for (const unit of job.units) { + for (const op of unit.ops()) { + switch (op.kind) { + case OpKind.Binding: + case OpKind.Property: + case OpKind.Attribute: + case OpKind.ExtractedAttribute: + if (op.i18nMessage === null) { + continue; + } + if (!attrContextByMessage.has(op.i18nMessage)) { + const i18nContext = createI18nContextOp(I18nContextKind.Attr, job.allocateXrefId(), null, op.i18nMessage, null); + unit.create.push(i18nContext); + attrContextByMessage.set(op.i18nMessage, i18nContext.xref); + } + op.i18nContext = attrContextByMessage.get(op.i18nMessage); + break; + } + } + } + // Create i18n context ops for root i18n blocks. + const blockContextByI18nBlock = new Map(); + for (const unit of job.units) { + for (const op of unit.create) { + switch (op.kind) { + case OpKind.I18nStart: + if (op.xref === op.root) { + const contextOp = createI18nContextOp(I18nContextKind.RootI18n, job.allocateXrefId(), op.xref, op.message, null); + unit.create.push(contextOp); + op.context = contextOp.xref; + blockContextByI18nBlock.set(op.xref, contextOp); + } + break; + } + } + } + // Assign i18n contexts for child i18n blocks. These don't need their own conext, instead they + // should inherit from their root i18n block. + for (const unit of job.units) { + for (const op of unit.create) { + if (op.kind === OpKind.I18nStart && op.xref !== op.root) { + const rootContext = blockContextByI18nBlock.get(op.root); + if (rootContext === undefined) { + throw Error('AssertionError: Root i18n block i18n context should have been created.'); + } + op.context = rootContext.xref; + blockContextByI18nBlock.set(op.xref, rootContext); + } + } + } + // Create or assign i18n contexts for ICUs. + let currentI18nOp = null; + for (const unit of job.units) { + for (const op of unit.create) { + switch (op.kind) { + case OpKind.I18nStart: + currentI18nOp = op; + break; + case OpKind.I18nEnd: + currentI18nOp = null; + break; + case OpKind.IcuStart: + if (currentI18nOp === null) { + throw Error('AssertionError: Unexpected ICU outside of an i18n block.'); + } + if (op.message.id !== currentI18nOp.message.id) { + // This ICU is a sub-message inside its parent i18n block message. We need to give it + // its own context. + const contextOp = createI18nContextOp(I18nContextKind.Icu, job.allocateXrefId(), currentI18nOp.root, op.message, null); + unit.create.push(contextOp); + op.context = contextOp.xref; + } else { + // This ICU is the only translatable content in its parent i18n block. We need to + // convert the parent's context into an ICU context. + op.context = currentI18nOp.context; + blockContextByI18nBlock.get(currentI18nOp.xref).contextKind = I18nContextKind.Icu; + } + break; + } + } + } +} + +/** + * Deduplicate text bindings, e.g.
+ */ +function deduplicateTextBindings(job) { + const seen = new Map(); + for (const unit of job.units) { + for (const op of unit.update.reversed()) { + if (op.kind === OpKind.Binding && op.isTextAttribute) { + const seenForElement = seen.get(op.target) || new Set(); + if (seenForElement.has(op.name)) { + if (job.compatibility === CompatibilityMode.TemplateDefinitionBuilder) { + // For most duplicated attributes, TemplateDefinitionBuilder lists all of the values in + // the consts array. However, for style and class attributes it only keeps the last one. + // We replicate that behavior here since it has actual consequences for apps with + // duplicate class or style attrs. + if (op.name === 'style' || op.name === 'class') { + OpList.remove(op); + } + } else { + // TODO: Determine the correct behavior. It would probably make sense to merge multiple + // style and class attributes. Alternatively we could just throw an error, as HTML + // doesn't permit duplicate attributes. + } + } + seenForElement.add(op.name); + seen.set(op.target, seenForElement); + } + } + } +} + +/** + * Defer instructions take a configuration array, which should be collected into the component + * consts. This phase finds the config options, and creates the corresponding const array. + */ +function configureDeferInstructions(job) { + for (const unit of job.units) { + for (const op of unit.create) { + if (op.kind !== OpKind.Defer) { + continue; + } + if (op.placeholderMinimumTime !== null) { + op.placeholderConfig = new ConstCollectedExpr(literalOrArrayLiteral([op.placeholderMinimumTime])); + } + if (op.loadingMinimumTime !== null || op.loadingAfterTime !== null) { + op.loadingConfig = new ConstCollectedExpr(literalOrArrayLiteral([op.loadingMinimumTime, op.loadingAfterTime])); + } + } + } +} + +/** + * Some `defer` conditions can reference other elements in the template, using their local reference + * names. However, the semantics are quite different from the normal local reference system: in + * particular, we need to look at local reference names in enclosing views. This phase resolves + * all such references to actual xrefs. + */ +function resolveDeferTargetNames(job) { + const scopes = new Map(); + function getScopeForView(view) { + if (scopes.has(view.xref)) { + return scopes.get(view.xref); + } + const scope = new Scope$1(); + for (const op of view.create) { + // add everything that can be referenced. + if (!isElementOrContainerOp(op) || op.localRefs === null) { + continue; + } + if (!Array.isArray(op.localRefs)) { + throw new Error('LocalRefs were already processed, but were needed to resolve defer targets.'); + } + for (const ref of op.localRefs) { + if (ref.target !== '') { + continue; + } + scope.targets.set(ref.name, { + xref: op.xref, + slot: op.handle + }); + } + } + scopes.set(view.xref, scope); + return scope; + } + function resolveTrigger(deferOwnerView, op, placeholderView) { + switch (op.trigger.kind) { + case DeferTriggerKind.Idle: + case DeferTriggerKind.Immediate: + case DeferTriggerKind.Timer: + return; + case DeferTriggerKind.Hover: + case DeferTriggerKind.Interaction: + case DeferTriggerKind.Viewport: + if (op.trigger.targetName === null) { + // A `null` target name indicates we should default to the first element in the + // placeholder block. + if (placeholderView === null) { + throw new Error('defer on trigger with no target name must have a placeholder block'); + } + const placeholder = job.views.get(placeholderView); + if (placeholder == undefined) { + throw new Error('AssertionError: could not find placeholder view for defer on trigger'); + } + for (const placeholderOp of placeholder.create) { + if (hasConsumesSlotTrait(placeholderOp) && (isElementOrContainerOp(placeholderOp) || placeholderOp.kind === OpKind.Projection)) { + op.trigger.targetXref = placeholderOp.xref; + op.trigger.targetView = placeholderView; + op.trigger.targetSlotViewSteps = -1; + op.trigger.targetSlot = placeholderOp.handle; + return; + } + } + return; + } + let view = placeholderView !== null ? job.views.get(placeholderView) : deferOwnerView; + let step = placeholderView !== null ? -1 : 0; + while (view !== null) { + const scope = getScopeForView(view); + if (scope.targets.has(op.trigger.targetName)) { + const { + xref, + slot + } = scope.targets.get(op.trigger.targetName); + op.trigger.targetXref = xref; + op.trigger.targetView = view.xref; + op.trigger.targetSlotViewSteps = step; + op.trigger.targetSlot = slot; + return; + } + view = view.parent !== null ? job.views.get(view.parent) : null; + step++; + } + break; + default: + throw new Error(`Trigger kind ${op.trigger.kind} not handled`); + } + } + // Find the defer ops, and assign the data about their targets. + for (const unit of job.units) { + const defers = new Map(); + for (const op of unit.create) { + switch (op.kind) { + case OpKind.Defer: + defers.set(op.xref, op); + break; + case OpKind.DeferOn: + const deferOp = defers.get(op.defer); + resolveTrigger(unit, op, deferOp.placeholderView); + break; + } + } + } +} +class Scope$1 { + constructor() { + this.targets = new Map(); + } +} +const REPLACEMENTS = new Map([[OpKind.ElementEnd, [OpKind.ElementStart, OpKind.Element]], [OpKind.ContainerEnd, [OpKind.ContainerStart, OpKind.Container]], [OpKind.I18nEnd, [OpKind.I18nStart, OpKind.I18n]]]); +/** + * Op kinds that should not prevent merging of start/end ops. + */ +const IGNORED_OP_KINDS = new Set([OpKind.Pipe]); +/** + * Replace sequences of mergable instructions (e.g. `ElementStart` and `ElementEnd`) with a + * consolidated instruction (e.g. `Element`). + */ +function collapseEmptyInstructions(job) { + for (const unit of job.units) { + for (const op of unit.create) { + // Find end ops that may be able to be merged. + const opReplacements = REPLACEMENTS.get(op.kind); + if (opReplacements === undefined) { + continue; + } + const [startKind, mergedKind] = opReplacements; + // Locate the previous (non-ignored) op. + let prevOp = op.prev; + while (prevOp !== null && IGNORED_OP_KINDS.has(prevOp.kind)) { + prevOp = prevOp.prev; + } + // If the previous op is the corresponding start op, we can megre. + if (prevOp !== null && prevOp.kind === startKind) { + // Transmute the start instruction to the merged version. This is safe as they're designed + // to be identical apart from the `kind`. + prevOp.kind = mergedKind; + // Remove the end instruction. + OpList.remove(op); + } + } + } +} + +/** + * Safe read expressions such as `a?.b` have different semantics in Angular templates as + * compared to JavaScript. In particular, they default to `null` instead of `undefined`. This phase + * finds all unresolved safe read expressions, and converts them into the appropriate output AST + * reads, guarded by null checks. We generate temporaries as needed, to avoid re-evaluating the same + * sub-expression multiple times. + */ +function expandSafeReads(job) { + for (const unit of job.units) { + for (const op of unit.ops()) { + transformExpressionsInOp(op, e => safeTransform(e, { + job + }), VisitorContextFlag.None); + transformExpressionsInOp(op, ternaryTransform, VisitorContextFlag.None); + } + } +} +// A lookup set of all the expression kinds that require a temporary variable to be generated. +const requiresTemporary = [InvokeFunctionExpr, LiteralArrayExpr, LiteralMapExpr, SafeInvokeFunctionExpr, PipeBindingExpr].map(e => e.constructor.name); +function needsTemporaryInSafeAccess(e) { + // TODO: We probably want to use an expression visitor to recursively visit all descendents. + // However, that would potentially do a lot of extra work (because it cannot short circuit), so we + // implement the logic ourselves for now. + if (e instanceof UnaryOperatorExpr) { + return needsTemporaryInSafeAccess(e.expr); + } else if (e instanceof BinaryOperatorExpr) { + return needsTemporaryInSafeAccess(e.lhs) || needsTemporaryInSafeAccess(e.rhs); + } else if (e instanceof ConditionalExpr) { + if (e.falseCase && needsTemporaryInSafeAccess(e.falseCase)) return true; + return needsTemporaryInSafeAccess(e.condition) || needsTemporaryInSafeAccess(e.trueCase); + } else if (e instanceof NotExpr) { + return needsTemporaryInSafeAccess(e.condition); + } else if (e instanceof AssignTemporaryExpr) { + return needsTemporaryInSafeAccess(e.expr); + } else if (e instanceof ReadPropExpr) { + return needsTemporaryInSafeAccess(e.receiver); + } else if (e instanceof ReadKeyExpr) { + return needsTemporaryInSafeAccess(e.receiver) || needsTemporaryInSafeAccess(e.index); + } + // TODO: Switch to a method which is exhaustive of newly added expression subtypes. + return e instanceof InvokeFunctionExpr || e instanceof LiteralArrayExpr || e instanceof LiteralMapExpr || e instanceof SafeInvokeFunctionExpr || e instanceof PipeBindingExpr; +} +function temporariesIn(e) { + const temporaries = new Set(); + // TODO: Although it's not currently supported by the transform helper, we should be able to + // short-circuit exploring the tree to do less work. In particular, we don't have to penetrate + // into the subexpressions of temporary assignments. + transformExpressionsInExpression(e, e => { + if (e instanceof AssignTemporaryExpr) { + temporaries.add(e.xref); + } + return e; + }, VisitorContextFlag.None); + return temporaries; +} +function eliminateTemporaryAssignments(e, tmps, ctx) { + // TODO: We can be more efficient than the transform helper here. We don't need to visit any + // descendents of temporary assignments. + transformExpressionsInExpression(e, e => { + if (e instanceof AssignTemporaryExpr && tmps.has(e.xref)) { + const read = new ReadTemporaryExpr(e.xref); + // `TemplateDefinitionBuilder` has the (accidental?) behavior of generating assignments of + // temporary variables to themselves. This happens because some subexpression that the + // temporary refers to, possibly through nested temporaries, has a function call. We copy that + // behavior here. + return ctx.job.compatibility === CompatibilityMode.TemplateDefinitionBuilder ? new AssignTemporaryExpr(read, read.xref) : read; + } + return e; + }, VisitorContextFlag.None); + return e; +} +/** + * Creates a safe ternary guarded by the input expression, and with a body generated by the provided + * callback on the input expression. Generates a temporary variable assignment if needed, and + * deduplicates nested temporary assignments if needed. + */ +function safeTernaryWithTemporary(guard, body, ctx) { + let result; + if (needsTemporaryInSafeAccess(guard)) { + const xref = ctx.job.allocateXrefId(); + result = [new AssignTemporaryExpr(guard, xref), new ReadTemporaryExpr(xref)]; + } else { + result = [guard, guard.clone()]; + // Consider an expression like `a?.[b?.c()]?.d`. The `b?.c()` will be transformed first, + // introducing a temporary assignment into the key. Then, as part of expanding the `?.d`. That + // assignment will be duplicated into both the guard and expression sides. We de-duplicate it, + // by transforming it from an assignment into a read on the expression side. + eliminateTemporaryAssignments(result[1], temporariesIn(result[0]), ctx); + } + return new SafeTernaryExpr(result[0], body(result[1])); +} +function isSafeAccessExpression(e) { + return e instanceof SafePropertyReadExpr || e instanceof SafeKeyedReadExpr || e instanceof SafeInvokeFunctionExpr; +} +function isUnsafeAccessExpression(e) { + return e instanceof ReadPropExpr || e instanceof ReadKeyExpr || e instanceof InvokeFunctionExpr; +} +function isAccessExpression(e) { + return isSafeAccessExpression(e) || isUnsafeAccessExpression(e); +} +function deepestSafeTernary(e) { + if (isAccessExpression(e) && e.receiver instanceof SafeTernaryExpr) { + let st = e.receiver; + while (st.expr instanceof SafeTernaryExpr) { + st = st.expr; + } + return st; + } + return null; +} +// TODO: When strict compatibility with TemplateDefinitionBuilder is not required, we can use `&&` +// instead to save some code size. +function safeTransform(e, ctx) { + if (!isAccessExpression(e)) { + return e; + } + const dst = deepestSafeTernary(e); + if (dst) { + if (e instanceof InvokeFunctionExpr) { + dst.expr = dst.expr.callFn(e.args); + return e.receiver; + } + if (e instanceof ReadPropExpr) { + dst.expr = dst.expr.prop(e.name); + return e.receiver; + } + if (e instanceof ReadKeyExpr) { + dst.expr = dst.expr.key(e.index); + return e.receiver; + } + if (e instanceof SafeInvokeFunctionExpr) { + dst.expr = safeTernaryWithTemporary(dst.expr, r => r.callFn(e.args), ctx); + return e.receiver; + } + if (e instanceof SafePropertyReadExpr) { + dst.expr = safeTernaryWithTemporary(dst.expr, r => r.prop(e.name), ctx); + return e.receiver; + } + if (e instanceof SafeKeyedReadExpr) { + dst.expr = safeTernaryWithTemporary(dst.expr, r => r.key(e.index), ctx); + return e.receiver; + } + } else { + if (e instanceof SafeInvokeFunctionExpr) { + return safeTernaryWithTemporary(e.receiver, r => r.callFn(e.args), ctx); + } + if (e instanceof SafePropertyReadExpr) { + return safeTernaryWithTemporary(e.receiver, r => r.prop(e.name), ctx); + } + if (e instanceof SafeKeyedReadExpr) { + return safeTernaryWithTemporary(e.receiver, r => r.key(e.index), ctx); + } + } + return e; +} +function ternaryTransform(e) { + if (!(e instanceof SafeTernaryExpr)) { + return e; + } + return new ConditionalExpr(new BinaryOperatorExpr(BinaryOperator.Equals, e.guard, NULL_EXPR), NULL_EXPR, e.expr); +} + +/** + * The escape sequence used indicate message param values. + */ +const ESCAPE$1 = '\uFFFD'; +/** + * Marker used to indicate an element tag. + */ +const ELEMENT_MARKER = '#'; +/** + * Marker used to indicate a template tag. + */ +const TEMPLATE_MARKER = '*'; +/** + * Marker used to indicate closing of an element or template tag. + */ +const TAG_CLOSE_MARKER = '/'; +/** + * Marker used to indicate the sub-template context. + */ +const CONTEXT_MARKER = ':'; +/** + * Marker used to indicate the start of a list of values. + */ +const LIST_START_MARKER = '['; +/** + * Marker used to indicate the end of a list of values. + */ +const LIST_END_MARKER = ']'; +/** + * Delimiter used to separate multiple values in a list. + */ +const LIST_DELIMITER = '|'; +/** + * Formats the param maps on extracted message ops into a maps of `Expression` objects that can be + * used in the final output. + */ +function extractI18nMessages(job) { + // Create an i18n message for each context. + // TODO: Merge the context op with the message op since they're 1:1 anyways. + const i18nMessagesByContext = new Map(); + const i18nBlocks = new Map(); + const i18nContexts = new Map(); + for (const unit of job.units) { + for (const op of unit.create) { + switch (op.kind) { + case OpKind.I18nContext: + const i18nMessageOp = createI18nMessage(job, op); + unit.create.push(i18nMessageOp); + i18nMessagesByContext.set(op.xref, i18nMessageOp); + i18nContexts.set(op.xref, op); + break; + case OpKind.I18nStart: + i18nBlocks.set(op.xref, op); + break; + } + } + } + // Associate sub-messages for ICUs with their root message. At this point we can also remove the + // ICU start/end ops, as they are no longer needed. + let currentIcu = null; + for (const unit of job.units) { + for (const op of unit.create) { + switch (op.kind) { + case OpKind.IcuStart: + currentIcu = op; + OpList.remove(op); + // Skip any contexts not associated with an ICU. + const icuContext = i18nContexts.get(op.context); + if (icuContext.contextKind !== I18nContextKind.Icu) { + continue; + } + // Skip ICUs that share a context with their i18n message. These represent root-level + // ICUs, not sub-messages. + const i18nBlock = i18nBlocks.get(icuContext.i18nBlock); + if (i18nBlock.context === icuContext.xref) { + continue; + } + // Find the root message and push this ICUs message as a sub-message. + const rootI18nBlock = i18nBlocks.get(i18nBlock.root); + const rootMessage = i18nMessagesByContext.get(rootI18nBlock.context); + if (rootMessage === undefined) { + throw Error('AssertionError: ICU sub-message should belong to a root message.'); + } + const subMessage = i18nMessagesByContext.get(icuContext.xref); + subMessage.messagePlaceholder = op.messagePlaceholder; + rootMessage.subMessages.push(subMessage.xref); + break; + case OpKind.IcuEnd: + currentIcu = null; + OpList.remove(op); + break; + case OpKind.IcuPlaceholder: + // Add ICU placeholders to the message, then remove the ICU placeholder ops. + if (currentIcu === null || currentIcu.context == null) { + throw Error('AssertionError: Unexpected ICU placeholder outside of i18n context'); + } + const msg = i18nMessagesByContext.get(currentIcu.context); + msg.postprocessingParams.set(op.name, literal(formatIcuPlaceholder(op))); + OpList.remove(op); + break; + } + } + } +} +/** + * Create an i18n message op from an i18n context op. + */ +function createI18nMessage(job, context, messagePlaceholder) { + let formattedParams = formatParams(context.params); + const formattedPostprocessingParams = formatParams(context.postprocessingParams); + let needsPostprocessing = [...context.params.values()].some(v => v.length > 1); + return createI18nMessageOp(job.allocateXrefId(), context.xref, context.i18nBlock, context.message, messagePlaceholder ?? null, formattedParams, formattedPostprocessingParams, needsPostprocessing); +} +/** + * Formats an ICU placeholder into a single string with expression placeholders. + */ +function formatIcuPlaceholder(op) { + if (op.strings.length !== op.expressionPlaceholders.length + 1) { + throw Error(`AssertionError: Invalid ICU placeholder with ${op.strings.length} strings and ${op.expressionPlaceholders.length} expressions`); + } + const values = op.expressionPlaceholders.map(formatValue); + return op.strings.flatMap((str, i) => [str, values[i] || '']).join(''); +} +/** + * Formats a map of `I18nParamValue[]` values into a map of `Expression` values. + */ +function formatParams(params) { + const formattedParams = new Map(); + for (const [placeholder, placeholderValues] of params) { + const serializedValues = formatParamValues(placeholderValues); + if (serializedValues !== null) { + formattedParams.set(placeholder, literal(serializedValues)); + } + } + return formattedParams; +} +/** + * Formats an `I18nParamValue[]` into a string (or null for empty array). + */ +function formatParamValues(values) { + if (values.length === 0) { + return null; + } + const serializedValues = values.map(value => formatValue(value)); + return serializedValues.length === 1 ? serializedValues[0] : `${LIST_START_MARKER}${serializedValues.join(LIST_DELIMITER)}${LIST_END_MARKER}`; +} +/** + * Formats a single `I18nParamValue` into a string + */ +function formatValue(value) { + // Element tags with a structural directive use a special form that concatenates the element and + // template values. + if (value.flags & I18nParamValueFlags.ElementTag && value.flags & I18nParamValueFlags.TemplateTag) { + if (typeof value.value !== 'object') { + throw Error('AssertionError: Expected i18n param value to have an element and template slot'); + } + const elementValue = formatValue({ + ...value, + value: value.value.element, + flags: value.flags & ~I18nParamValueFlags.TemplateTag + }); + const templateValue = formatValue({ + ...value, + value: value.value.template, + flags: value.flags & ~I18nParamValueFlags.ElementTag + }); + // TODO(mmalerba): This is likely a bug in TemplateDefinitionBuilder, we should not need to + // record the template value twice. For now I'm re-implementing the behavior here to keep the + // output consistent with TemplateDefinitionBuilder. + if (value.flags & I18nParamValueFlags.OpenTag && value.flags & I18nParamValueFlags.CloseTag) { + return `${templateValue}${elementValue}${templateValue}`; + } + // To match the TemplateDefinitionBuilder output, flip the order depending on whether the + // values represent a closing or opening tag (or both). + // TODO(mmalerba): Figure out if this makes a difference in terms of either functionality, + // or the resulting message ID. If not, we can remove the special-casing in the future. + return value.flags & I18nParamValueFlags.CloseTag ? `${elementValue}${templateValue}` : `${templateValue}${elementValue}`; + } + // Self-closing tags use a special form that concatenates the start and close tag values. + if (value.flags & I18nParamValueFlags.OpenTag && value.flags & I18nParamValueFlags.CloseTag) { + return `${formatValue({ + ...value, + flags: value.flags & ~I18nParamValueFlags.CloseTag + })}${formatValue({ + ...value, + flags: value.flags & ~I18nParamValueFlags.OpenTag + })}`; + } + // If there are no special flags, just return the raw value. + if (value.flags === I18nParamValueFlags.None) { + return `${value.value}`; + } + // Encode the remaining flags as part of the value. + let tagMarker = ''; + let closeMarker = ''; + if (value.flags & I18nParamValueFlags.ElementTag) { + tagMarker = ELEMENT_MARKER; + } else if (value.flags & I18nParamValueFlags.TemplateTag) { + tagMarker = TEMPLATE_MARKER; + } + if (tagMarker !== '') { + closeMarker = value.flags & I18nParamValueFlags.CloseTag ? TAG_CLOSE_MARKER : ''; + } + const context = value.subTemplateIndex === null ? '' : `${CONTEXT_MARKER}${value.subTemplateIndex}`; + return `${ESCAPE$1}${closeMarker}${tagMarker}${value.value}${context}${ESCAPE$1}`; +} + +/** + * Generate `ir.AdvanceOp`s in between `ir.UpdateOp`s that ensure the runtime's implicit slot + * context will be advanced correctly. + */ +function generateAdvance(job) { + for (const unit of job.units) { + // First build a map of all of the declarations in the view that have assigned slots. + const slotMap = new Map(); + for (const op of unit.create) { + if (!hasConsumesSlotTrait(op)) { + continue; + } else if (op.handle.slot === null) { + throw new Error(`AssertionError: expected slots to have been allocated before generating advance() calls`); + } + slotMap.set(op.xref, op.handle.slot); + } + // Next, step through the update operations and generate `ir.AdvanceOp`s as required to ensure + // the runtime's implicit slot counter will be set to the correct slot before executing each + // update operation which depends on it. + // + // To do that, we track what the runtime's slot counter will be through the update operations. + let slotContext = 0; + for (const op of unit.update) { + let consumer = null; + if (hasDependsOnSlotContextTrait(op)) { + consumer = op; + } else { + visitExpressionsInOp(op, expr => { + if (consumer === null && hasDependsOnSlotContextTrait(expr)) { + consumer = expr; + } + }); + } + if (consumer === null) { + continue; + } + if (!slotMap.has(consumer.target)) { + // We expect ops that _do_ depend on the slot counter to point at declarations that exist in + // the `slotMap`. + throw new Error(`AssertionError: reference to unknown slot for target ${consumer.target}`); + } + const slot = slotMap.get(consumer.target); + // Does the slot counter need to be adjusted? + if (slotContext !== slot) { + // If so, generate an `ir.AdvanceOp` to advance the counter. + const delta = slot - slotContext; + if (delta < 0) { + throw new Error(`AssertionError: slot counter should never need to move backwards`); + } + OpList.insertBefore(createAdvanceOp(delta, consumer.sourceSpan), op); + slotContext = slot; + } + } + } +} + +/** + * Locate projection slots, populate the each component's `ngContentSelectors` literal field, + * populate `project` arguments, and generate the required `projectionDef` instruction for the job's + * root view. + */ +function generateProjectionDefs(job) { + // TODO: Why does TemplateDefinitionBuilder force a shared constant? + const share = job.compatibility === CompatibilityMode.TemplateDefinitionBuilder; + // Collect all selectors from this component, and its nested views. Also, assign each projection a + // unique ascending projection slot index. + const selectors = []; + let projectionSlotIndex = 0; + for (const unit of job.units) { + for (const op of unit.create) { + if (op.kind === OpKind.Projection) { + selectors.push(op.selector); + op.projectionSlotIndex = projectionSlotIndex++; + } + } + } + if (selectors.length > 0) { + // Create the projectionDef array. If we only found a single wildcard selector, then we use the + // default behavior with no arguments instead. + let defExpr = null; + if (selectors.length > 1 || selectors[0] !== '*') { + const def = selectors.map(s => s === '*' ? s : parseSelectorToR3Selector(s)); + defExpr = job.pool.getConstLiteral(literalOrArrayLiteral(def), share); + } + // Create the ngContentSelectors constant. + job.contentSelectors = job.pool.getConstLiteral(literalOrArrayLiteral(selectors), share); + // The projection def instruction goes at the beginning of the root view, before any + // `projection` instructions. + job.root.create.prepend([createProjectionDefOp(defExpr)]); + } +} + +/** + * Generate a preamble sequence for each view creation block and listener function which declares + * any variables that be referenced in other operations in the block. + * + * Variables generated include: + * * a saved view context to be used to restore the current view in event listeners. + * * the context of the restored view within event listener handlers. + * * context variables from the current view as well as all parent views (including the root + * context if needed). + * * local references from elements within the current view and any lexical parents. + * + * Variables are generated here unconditionally, and may optimized away in future operations if it + * turns out their values (and any side effects) are unused. + */ +function generateVariables(job) { + recursivelyProcessView(job.root, /* there is no parent scope for the root view */null); +} +/** + * Process the given `ViewCompilation` and generate preambles for it and any listeners that it + * declares. + * + * @param `parentScope` a scope extracted from the parent view which captures any variables which + * should be inherited by this view. `null` if the current view is the root view. + */ +function recursivelyProcessView(view, parentScope) { + // Extract a `Scope` from this view. + const scope = getScopeForView(view, parentScope); + for (const op of view.create) { + switch (op.kind) { + case OpKind.Template: + // Descend into child embedded views. + recursivelyProcessView(view.job.views.get(op.xref), scope); + break; + case OpKind.Projection: + if (op.fallbackView !== null) { + recursivelyProcessView(view.job.views.get(op.fallbackView), scope); + } + break; + case OpKind.RepeaterCreate: + // Descend into child embedded views. + recursivelyProcessView(view.job.views.get(op.xref), scope); + if (op.emptyView) { + recursivelyProcessView(view.job.views.get(op.emptyView), scope); + } + break; + case OpKind.Listener: + case OpKind.TwoWayListener: + // Prepend variables to listener handler functions. + op.handlerOps.prepend(generateVariablesInScopeForView(view, scope, true)); + break; + } + } + view.update.prepend(generateVariablesInScopeForView(view, scope, false)); +} +/** + * Process a view and generate a `Scope` representing the variables available for reference within + * that view. + */ +function getScopeForView(view, parent) { + const scope = { + view: view.xref, + viewContextVariable: { + kind: SemanticVariableKind.Context, + name: null, + view: view.xref + }, + contextVariables: new Map(), + aliases: view.aliases, + references: [], + letDeclarations: [], + parent + }; + for (const identifier of view.contextVariables.keys()) { + scope.contextVariables.set(identifier, { + kind: SemanticVariableKind.Identifier, + name: null, + identifier, + local: false + }); + } + for (const op of view.create) { + switch (op.kind) { + case OpKind.ElementStart: + case OpKind.Template: + if (!Array.isArray(op.localRefs)) { + throw new Error(`AssertionError: expected localRefs to be an array`); + } + // Record available local references from this element. + for (let offset = 0; offset < op.localRefs.length; offset++) { + scope.references.push({ + name: op.localRefs[offset].name, + targetId: op.xref, + targetSlot: op.handle, + offset, + variable: { + kind: SemanticVariableKind.Identifier, + name: null, + identifier: op.localRefs[offset].name, + local: false + } + }); + } + break; + case OpKind.DeclareLet: + scope.letDeclarations.push({ + targetId: op.xref, + targetSlot: op.handle, + variable: { + kind: SemanticVariableKind.Identifier, + name: null, + identifier: op.declaredName, + local: false + } + }); + break; + } + } + return scope; +} +/** + * Generate declarations for all variables that are in scope for a given view. + * + * This is a recursive process, as views inherit variables available from their parent view, which + * itself may have inherited variables, etc. + */ +function generateVariablesInScopeForView(view, scope, isListener) { + const newOps = []; + if (scope.view !== view.xref) { + // Before generating variables for a parent view, we need to switch to the context of the parent + // view with a `nextContext` expression. This context switching operation itself declares a + // variable, because the context of the view may be referenced directly. + newOps.push(createVariableOp(view.job.allocateXrefId(), scope.viewContextVariable, new NextContextExpr(), VariableFlags.None)); + } + // Add variables for all context variables available in this scope's view. + const scopeView = view.job.views.get(scope.view); + for (const [name, value] of scopeView.contextVariables) { + const context = new ContextExpr(scope.view); + // We either read the context, or, if the variable is CTX_REF, use the context directly. + const variable = value === CTX_REF ? context : new ReadPropExpr(context, value); + // Add the variable declaration. + newOps.push(createVariableOp(view.job.allocateXrefId(), scope.contextVariables.get(name), variable, VariableFlags.None)); + } + for (const alias of scopeView.aliases) { + newOps.push(createVariableOp(view.job.allocateXrefId(), alias, alias.expression.clone(), VariableFlags.AlwaysInline)); + } + // Add variables for all local references declared for elements in this scope. + for (const ref of scope.references) { + newOps.push(createVariableOp(view.job.allocateXrefId(), ref.variable, new ReferenceExpr(ref.targetId, ref.targetSlot, ref.offset), VariableFlags.None)); + } + if (scope.view !== view.xref || isListener) { + for (const decl of scope.letDeclarations) { + newOps.push(createVariableOp(view.job.allocateXrefId(), decl.variable, new ContextLetReferenceExpr(decl.targetId, decl.targetSlot), VariableFlags.None)); + } + } + if (scope.parent !== null) { + // Recursively add variables from the parent scope. + newOps.push(...generateVariablesInScopeForView(view, scope.parent, false)); + } + return newOps; +} + +/** + * `ir.ConstCollectedExpr` may be present in any IR expression. This means that expression needs to + * be lifted into the component const array, and replaced with a reference to the const array at its + * + * usage site. This phase walks the IR and performs this transformation. + */ +function collectConstExpressions(job) { + for (const unit of job.units) { + for (const op of unit.ops()) { + transformExpressionsInOp(op, expr => { + if (!(expr instanceof ConstCollectedExpr)) { + return expr; + } + return literal(job.addConst(expr.expr)); + }, VisitorContextFlag.None); + } + } +} +const STYLE_DOT = 'style.'; +const CLASS_DOT = 'class.'; +const STYLE_BANG = 'style!'; +const CLASS_BANG = 'class!'; +const BANG_IMPORTANT = '!important'; +/** + * Host bindings are compiled using a different parser entrypoint, and are parsed quite differently + * as a result. Therefore, we need to do some extra parsing for host style properties, as compared + * to non-host style properties. + * TODO: Unify host bindings and non-host bindings in the parser. + */ +function parseHostStyleProperties(job) { + for (const op of job.root.update) { + if (!(op.kind === OpKind.Binding && op.bindingKind === BindingKind.Property)) { + continue; + } + if (op.name.endsWith(BANG_IMPORTANT)) { + // Delete any `!important` suffixes from the binding name. + op.name = op.name.substring(0, op.name.length - BANG_IMPORTANT.length); + } + if (op.name.startsWith(STYLE_DOT)) { + op.bindingKind = BindingKind.StyleProperty; + op.name = op.name.substring(STYLE_DOT.length); + if (!isCssCustomProperty(op.name)) { + op.name = hyphenate$1(op.name); + } + const { + property, + suffix + } = parseProperty(op.name); + op.name = property; + op.unit = suffix; + } else if (op.name.startsWith(STYLE_BANG)) { + op.bindingKind = BindingKind.StyleProperty; + op.name = 'style'; + } else if (op.name.startsWith(CLASS_DOT)) { + op.bindingKind = BindingKind.ClassName; + op.name = parseProperty(op.name.substring(CLASS_DOT.length)).property; + } else if (op.name.startsWith(CLASS_BANG)) { + op.bindingKind = BindingKind.ClassName; + op.name = parseProperty(op.name.substring(CLASS_BANG.length)).property; + } + } +} +/** + * Checks whether property name is a custom CSS property. + * See: https://www.w3.org/TR/css-variables-1 + */ +function isCssCustomProperty(name) { + return name.startsWith('--'); +} +function hyphenate$1(value) { + return value.replace(/[a-z][A-Z]/g, v => { + return v.charAt(0) + '-' + v.charAt(1); + }).toLowerCase(); +} +function parseProperty(name) { + const overrideIndex = name.indexOf('!important'); + if (overrideIndex !== -1) { + name = overrideIndex > 0 ? name.substring(0, overrideIndex) : ''; + } + let suffix = null; + let property = name; + const unitIndex = name.lastIndexOf('.'); + if (unitIndex > 0) { + suffix = name.slice(unitIndex + 1); + property = name.substring(0, unitIndex); + } + return { + property, + suffix + }; +} +function mapEntry(key, value) { + return { + key, + value, + quoted: false + }; +} +function mapLiteral(obj, quoted = false) { + return literalMap(Object.keys(obj).map(key => ({ + key, + quoted, + value: obj[key] + }))); +} +class IcuSerializerVisitor { + visitText(text) { + return text.value; + } + visitContainer(container) { + return container.children.map(child => child.visit(this)).join(''); + } + visitIcu(icu) { + const strCases = Object.keys(icu.cases).map(k => `${k} {${icu.cases[k].visit(this)}}`); + const result = `{${icu.expressionPlaceholder}, ${icu.type}, ${strCases.join(' ')}}`; + return result; + } + visitTagPlaceholder(ph) { + return ph.isVoid ? this.formatPh(ph.startName) : `${this.formatPh(ph.startName)}${ph.children.map(child => child.visit(this)).join('')}${this.formatPh(ph.closeName)}`; + } + visitPlaceholder(ph) { + return this.formatPh(ph.name); + } + visitBlockPlaceholder(ph) { + return `${this.formatPh(ph.startName)}${ph.children.map(child => child.visit(this)).join('')}${this.formatPh(ph.closeName)}`; + } + visitIcuPlaceholder(ph, context) { + return this.formatPh(ph.name); + } + formatPh(value) { + return `{${formatI18nPlaceholderName(value, /* useCamelCase */false)}}`; + } +} +const serializer = new IcuSerializerVisitor(); +function serializeIcuNode(icu) { + return icu.visit(serializer); +} +class NodeWithI18n { + constructor(sourceSpan, i18n) { + this.sourceSpan = sourceSpan; + this.i18n = i18n; + } +} +class Text extends NodeWithI18n { + constructor(value, sourceSpan, tokens, i18n) { + super(sourceSpan, i18n); + this.value = value; + this.tokens = tokens; + } + visit(visitor, context) { + return visitor.visitText(this, context); + } +} +class Expansion extends NodeWithI18n { + constructor(switchValue, type, cases, sourceSpan, switchValueSourceSpan, i18n) { + super(sourceSpan, i18n); + this.switchValue = switchValue; + this.type = type; + this.cases = cases; + this.switchValueSourceSpan = switchValueSourceSpan; + } + visit(visitor, context) { + return visitor.visitExpansion(this, context); + } +} +class ExpansionCase { + constructor(value, expression, sourceSpan, valueSourceSpan, expSourceSpan) { + this.value = value; + this.expression = expression; + this.sourceSpan = sourceSpan; + this.valueSourceSpan = valueSourceSpan; + this.expSourceSpan = expSourceSpan; + } + visit(visitor, context) { + return visitor.visitExpansionCase(this, context); + } +} +class Attribute extends NodeWithI18n { + constructor(name, value, sourceSpan, keySpan, valueSpan, valueTokens, i18n) { + super(sourceSpan, i18n); + this.name = name; + this.value = value; + this.keySpan = keySpan; + this.valueSpan = valueSpan; + this.valueTokens = valueTokens; + } + visit(visitor, context) { + return visitor.visitAttribute(this, context); + } +} +class Element extends NodeWithI18n { + constructor(name, attrs, children, sourceSpan, startSourceSpan, endSourceSpan = null, i18n) { + super(sourceSpan, i18n); + this.name = name; + this.attrs = attrs; + this.children = children; + this.startSourceSpan = startSourceSpan; + this.endSourceSpan = endSourceSpan; + } + visit(visitor, context) { + return visitor.visitElement(this, context); + } +} +class Comment { + constructor(value, sourceSpan) { + this.value = value; + this.sourceSpan = sourceSpan; + } + visit(visitor, context) { + return visitor.visitComment(this, context); + } +} +class Block extends NodeWithI18n { + constructor(name, parameters, children, sourceSpan, nameSpan, startSourceSpan, endSourceSpan = null, i18n) { + super(sourceSpan, i18n); + this.name = name; + this.parameters = parameters; + this.children = children; + this.nameSpan = nameSpan; + this.startSourceSpan = startSourceSpan; + this.endSourceSpan = endSourceSpan; + } + visit(visitor, context) { + return visitor.visitBlock(this, context); + } +} +class BlockParameter { + constructor(expression, sourceSpan) { + this.expression = expression; + this.sourceSpan = sourceSpan; + } + visit(visitor, context) { + return visitor.visitBlockParameter(this, context); + } +} +class LetDeclaration { + constructor(name, value, sourceSpan, nameSpan, valueSpan) { + this.name = name; + this.value = value; + this.sourceSpan = sourceSpan; + this.nameSpan = nameSpan; + this.valueSpan = valueSpan; + } + visit(visitor, context) { + return visitor.visitLetDeclaration(this, context); + } +} +function visitAll(visitor, nodes, context = null) { + const result = []; + const visit = visitor.visit ? ast => visitor.visit(ast, context) || ast.visit(visitor, context) : ast => ast.visit(visitor, context); + nodes.forEach(ast => { + const astResult = visit(ast); + if (astResult) { + result.push(astResult); + } + }); + return result; +} +class RecursiveVisitor { + constructor() {} + visitElement(ast, context) { + this.visitChildren(context, visit => { + visit(ast.attrs); + visit(ast.children); + }); + } + visitAttribute(ast, context) {} + visitText(ast, context) {} + visitComment(ast, context) {} + visitExpansion(ast, context) { + return this.visitChildren(context, visit => { + visit(ast.cases); + }); + } + visitExpansionCase(ast, context) {} + visitBlock(block, context) { + this.visitChildren(context, visit => { + visit(block.parameters); + visit(block.children); + }); + } + visitBlockParameter(ast, context) {} + visitLetDeclaration(decl, context) {} + visitChildren(context, cb) { + let results = []; + let t = this; + function visit(children) { + if (children) results.push(visitAll(t, children, context)); + } + cb(visit); + return Array.prototype.concat.apply([], results); + } +} + +// Mapping between all HTML entity names and their unicode representation. +// Generated from https://html.spec.whatwg.org/multipage/entities.json by stripping +// the `&` and `;` from the keys and removing the duplicates. +// see https://www.w3.org/TR/html51/syntax.html#named-character-references +const NAMED_ENTITIES = { + 'AElig': '\u00C6', + 'AMP': '\u0026', + 'amp': '\u0026', + 'Aacute': '\u00C1', + 'Abreve': '\u0102', + 'Acirc': '\u00C2', + 'Acy': '\u0410', + 'Afr': '\uD835\uDD04', + 'Agrave': '\u00C0', + 'Alpha': '\u0391', + 'Amacr': '\u0100', + 'And': '\u2A53', + 'Aogon': '\u0104', + 'Aopf': '\uD835\uDD38', + 'ApplyFunction': '\u2061', + 'af': '\u2061', + 'Aring': '\u00C5', + 'angst': '\u00C5', + 'Ascr': '\uD835\uDC9C', + 'Assign': '\u2254', + 'colone': '\u2254', + 'coloneq': '\u2254', + 'Atilde': '\u00C3', + 'Auml': '\u00C4', + 'Backslash': '\u2216', + 'setminus': '\u2216', + 'setmn': '\u2216', + 'smallsetminus': '\u2216', + 'ssetmn': '\u2216', + 'Barv': '\u2AE7', + 'Barwed': '\u2306', + 'doublebarwedge': '\u2306', + 'Bcy': '\u0411', + 'Because': '\u2235', + 'becaus': '\u2235', + 'because': '\u2235', + 'Bernoullis': '\u212C', + 'Bscr': '\u212C', + 'bernou': '\u212C', + 'Beta': '\u0392', + 'Bfr': '\uD835\uDD05', + 'Bopf': '\uD835\uDD39', + 'Breve': '\u02D8', + 'breve': '\u02D8', + 'Bumpeq': '\u224E', + 'HumpDownHump': '\u224E', + 'bump': '\u224E', + 'CHcy': '\u0427', + 'COPY': '\u00A9', + 'copy': '\u00A9', + 'Cacute': '\u0106', + 'Cap': '\u22D2', + 'CapitalDifferentialD': '\u2145', + 'DD': '\u2145', + 'Cayleys': '\u212D', + 'Cfr': '\u212D', + 'Ccaron': '\u010C', + 'Ccedil': '\u00C7', + 'Ccirc': '\u0108', + 'Cconint': '\u2230', + 'Cdot': '\u010A', + 'Cedilla': '\u00B8', + 'cedil': '\u00B8', + 'CenterDot': '\u00B7', + 'centerdot': '\u00B7', + 'middot': '\u00B7', + 'Chi': '\u03A7', + 'CircleDot': '\u2299', + 'odot': '\u2299', + 'CircleMinus': '\u2296', + 'ominus': '\u2296', + 'CirclePlus': '\u2295', + 'oplus': '\u2295', + 'CircleTimes': '\u2297', + 'otimes': '\u2297', + 'ClockwiseContourIntegral': '\u2232', + 'cwconint': '\u2232', + 'CloseCurlyDoubleQuote': '\u201D', + 'rdquo': '\u201D', + 'rdquor': '\u201D', + 'CloseCurlyQuote': '\u2019', + 'rsquo': '\u2019', + 'rsquor': '\u2019', + 'Colon': '\u2237', + 'Proportion': '\u2237', + 'Colone': '\u2A74', + 'Congruent': '\u2261', + 'equiv': '\u2261', + 'Conint': '\u222F', + 'DoubleContourIntegral': '\u222F', + 'ContourIntegral': '\u222E', + 'conint': '\u222E', + 'oint': '\u222E', + 'Copf': '\u2102', + 'complexes': '\u2102', + 'Coproduct': '\u2210', + 'coprod': '\u2210', + 'CounterClockwiseContourIntegral': '\u2233', + 'awconint': '\u2233', + 'Cross': '\u2A2F', + 'Cscr': '\uD835\uDC9E', + 'Cup': '\u22D3', + 'CupCap': '\u224D', + 'asympeq': '\u224D', + 'DDotrahd': '\u2911', + 'DJcy': '\u0402', + 'DScy': '\u0405', + 'DZcy': '\u040F', + 'Dagger': '\u2021', + 'ddagger': '\u2021', + 'Darr': '\u21A1', + 'Dashv': '\u2AE4', + 'DoubleLeftTee': '\u2AE4', + 'Dcaron': '\u010E', + 'Dcy': '\u0414', + 'Del': '\u2207', + 'nabla': '\u2207', + 'Delta': '\u0394', + 'Dfr': '\uD835\uDD07', + 'DiacriticalAcute': '\u00B4', + 'acute': '\u00B4', + 'DiacriticalDot': '\u02D9', + 'dot': '\u02D9', + 'DiacriticalDoubleAcute': '\u02DD', + 'dblac': '\u02DD', + 'DiacriticalGrave': '\u0060', + 'grave': '\u0060', + 'DiacriticalTilde': '\u02DC', + 'tilde': '\u02DC', + 'Diamond': '\u22C4', + 'diam': '\u22C4', + 'diamond': '\u22C4', + 'DifferentialD': '\u2146', + 'dd': '\u2146', + 'Dopf': '\uD835\uDD3B', + 'Dot': '\u00A8', + 'DoubleDot': '\u00A8', + 'die': '\u00A8', + 'uml': '\u00A8', + 'DotDot': '\u20DC', + 'DotEqual': '\u2250', + 'doteq': '\u2250', + 'esdot': '\u2250', + 'DoubleDownArrow': '\u21D3', + 'Downarrow': '\u21D3', + 'dArr': '\u21D3', + 'DoubleLeftArrow': '\u21D0', + 'Leftarrow': '\u21D0', + 'lArr': '\u21D0', + 'DoubleLeftRightArrow': '\u21D4', + 'Leftrightarrow': '\u21D4', + 'hArr': '\u21D4', + 'iff': '\u21D4', + 'DoubleLongLeftArrow': '\u27F8', + 'Longleftarrow': '\u27F8', + 'xlArr': '\u27F8', + 'DoubleLongLeftRightArrow': '\u27FA', + 'Longleftrightarrow': '\u27FA', + 'xhArr': '\u27FA', + 'DoubleLongRightArrow': '\u27F9', + 'Longrightarrow': '\u27F9', + 'xrArr': '\u27F9', + 'DoubleRightArrow': '\u21D2', + 'Implies': '\u21D2', + 'Rightarrow': '\u21D2', + 'rArr': '\u21D2', + 'DoubleRightTee': '\u22A8', + 'vDash': '\u22A8', + 'DoubleUpArrow': '\u21D1', + 'Uparrow': '\u21D1', + 'uArr': '\u21D1', + 'DoubleUpDownArrow': '\u21D5', + 'Updownarrow': '\u21D5', + 'vArr': '\u21D5', + 'DoubleVerticalBar': '\u2225', + 'par': '\u2225', + 'parallel': '\u2225', + 'shortparallel': '\u2225', + 'spar': '\u2225', + 'DownArrow': '\u2193', + 'ShortDownArrow': '\u2193', + 'darr': '\u2193', + 'downarrow': '\u2193', + 'DownArrowBar': '\u2913', + 'DownArrowUpArrow': '\u21F5', + 'duarr': '\u21F5', + 'DownBreve': '\u0311', + 'DownLeftRightVector': '\u2950', + 'DownLeftTeeVector': '\u295E', + 'DownLeftVector': '\u21BD', + 'leftharpoondown': '\u21BD', + 'lhard': '\u21BD', + 'DownLeftVectorBar': '\u2956', + 'DownRightTeeVector': '\u295F', + 'DownRightVector': '\u21C1', + 'rhard': '\u21C1', + 'rightharpoondown': '\u21C1', + 'DownRightVectorBar': '\u2957', + 'DownTee': '\u22A4', + 'top': '\u22A4', + 'DownTeeArrow': '\u21A7', + 'mapstodown': '\u21A7', + 'Dscr': '\uD835\uDC9F', + 'Dstrok': '\u0110', + 'ENG': '\u014A', + 'ETH': '\u00D0', + 'Eacute': '\u00C9', + 'Ecaron': '\u011A', + 'Ecirc': '\u00CA', + 'Ecy': '\u042D', + 'Edot': '\u0116', + 'Efr': '\uD835\uDD08', + 'Egrave': '\u00C8', + 'Element': '\u2208', + 'in': '\u2208', + 'isin': '\u2208', + 'isinv': '\u2208', + 'Emacr': '\u0112', + 'EmptySmallSquare': '\u25FB', + 'EmptyVerySmallSquare': '\u25AB', + 'Eogon': '\u0118', + 'Eopf': '\uD835\uDD3C', + 'Epsilon': '\u0395', + 'Equal': '\u2A75', + 'EqualTilde': '\u2242', + 'eqsim': '\u2242', + 'esim': '\u2242', + 'Equilibrium': '\u21CC', + 'rightleftharpoons': '\u21CC', + 'rlhar': '\u21CC', + 'Escr': '\u2130', + 'expectation': '\u2130', + 'Esim': '\u2A73', + 'Eta': '\u0397', + 'Euml': '\u00CB', + 'Exists': '\u2203', + 'exist': '\u2203', + 'ExponentialE': '\u2147', + 'ee': '\u2147', + 'exponentiale': '\u2147', + 'Fcy': '\u0424', + 'Ffr': '\uD835\uDD09', + 'FilledSmallSquare': '\u25FC', + 'FilledVerySmallSquare': '\u25AA', + 'blacksquare': '\u25AA', + 'squarf': '\u25AA', + 'squf': '\u25AA', + 'Fopf': '\uD835\uDD3D', + 'ForAll': '\u2200', + 'forall': '\u2200', + 'Fouriertrf': '\u2131', + 'Fscr': '\u2131', + 'GJcy': '\u0403', + 'GT': '\u003E', + 'gt': '\u003E', + 'Gamma': '\u0393', + 'Gammad': '\u03DC', + 'Gbreve': '\u011E', + 'Gcedil': '\u0122', + 'Gcirc': '\u011C', + 'Gcy': '\u0413', + 'Gdot': '\u0120', + 'Gfr': '\uD835\uDD0A', + 'Gg': '\u22D9', + 'ggg': '\u22D9', + 'Gopf': '\uD835\uDD3E', + 'GreaterEqual': '\u2265', + 'ge': '\u2265', + 'geq': '\u2265', + 'GreaterEqualLess': '\u22DB', + 'gel': '\u22DB', + 'gtreqless': '\u22DB', + 'GreaterFullEqual': '\u2267', + 'gE': '\u2267', + 'geqq': '\u2267', + 'GreaterGreater': '\u2AA2', + 'GreaterLess': '\u2277', + 'gl': '\u2277', + 'gtrless': '\u2277', + 'GreaterSlantEqual': '\u2A7E', + 'geqslant': '\u2A7E', + 'ges': '\u2A7E', + 'GreaterTilde': '\u2273', + 'gsim': '\u2273', + 'gtrsim': '\u2273', + 'Gscr': '\uD835\uDCA2', + 'Gt': '\u226B', + 'NestedGreaterGreater': '\u226B', + 'gg': '\u226B', + 'HARDcy': '\u042A', + 'Hacek': '\u02C7', + 'caron': '\u02C7', + 'Hat': '\u005E', + 'Hcirc': '\u0124', + 'Hfr': '\u210C', + 'Poincareplane': '\u210C', + 'HilbertSpace': '\u210B', + 'Hscr': '\u210B', + 'hamilt': '\u210B', + 'Hopf': '\u210D', + 'quaternions': '\u210D', + 'HorizontalLine': '\u2500', + 'boxh': '\u2500', + 'Hstrok': '\u0126', + 'HumpEqual': '\u224F', + 'bumpe': '\u224F', + 'bumpeq': '\u224F', + 'IEcy': '\u0415', + 'IJlig': '\u0132', + 'IOcy': '\u0401', + 'Iacute': '\u00CD', + 'Icirc': '\u00CE', + 'Icy': '\u0418', + 'Idot': '\u0130', + 'Ifr': '\u2111', + 'Im': '\u2111', + 'image': '\u2111', + 'imagpart': '\u2111', + 'Igrave': '\u00CC', + 'Imacr': '\u012A', + 'ImaginaryI': '\u2148', + 'ii': '\u2148', + 'Int': '\u222C', + 'Integral': '\u222B', + 'int': '\u222B', + 'Intersection': '\u22C2', + 'bigcap': '\u22C2', + 'xcap': '\u22C2', + 'InvisibleComma': '\u2063', + 'ic': '\u2063', + 'InvisibleTimes': '\u2062', + 'it': '\u2062', + 'Iogon': '\u012E', + 'Iopf': '\uD835\uDD40', + 'Iota': '\u0399', + 'Iscr': '\u2110', + 'imagline': '\u2110', + 'Itilde': '\u0128', + 'Iukcy': '\u0406', + 'Iuml': '\u00CF', + 'Jcirc': '\u0134', + 'Jcy': '\u0419', + 'Jfr': '\uD835\uDD0D', + 'Jopf': '\uD835\uDD41', + 'Jscr': '\uD835\uDCA5', + 'Jsercy': '\u0408', + 'Jukcy': '\u0404', + 'KHcy': '\u0425', + 'KJcy': '\u040C', + 'Kappa': '\u039A', + 'Kcedil': '\u0136', + 'Kcy': '\u041A', + 'Kfr': '\uD835\uDD0E', + 'Kopf': '\uD835\uDD42', + 'Kscr': '\uD835\uDCA6', + 'LJcy': '\u0409', + 'LT': '\u003C', + 'lt': '\u003C', + 'Lacute': '\u0139', + 'Lambda': '\u039B', + 'Lang': '\u27EA', + 'Laplacetrf': '\u2112', + 'Lscr': '\u2112', + 'lagran': '\u2112', + 'Larr': '\u219E', + 'twoheadleftarrow': '\u219E', + 'Lcaron': '\u013D', + 'Lcedil': '\u013B', + 'Lcy': '\u041B', + 'LeftAngleBracket': '\u27E8', + 'lang': '\u27E8', + 'langle': '\u27E8', + 'LeftArrow': '\u2190', + 'ShortLeftArrow': '\u2190', + 'larr': '\u2190', + 'leftarrow': '\u2190', + 'slarr': '\u2190', + 'LeftArrowBar': '\u21E4', + 'larrb': '\u21E4', + 'LeftArrowRightArrow': '\u21C6', + 'leftrightarrows': '\u21C6', + 'lrarr': '\u21C6', + 'LeftCeiling': '\u2308', + 'lceil': '\u2308', + 'LeftDoubleBracket': '\u27E6', + 'lobrk': '\u27E6', + 'LeftDownTeeVector': '\u2961', + 'LeftDownVector': '\u21C3', + 'dharl': '\u21C3', + 'downharpoonleft': '\u21C3', + 'LeftDownVectorBar': '\u2959', + 'LeftFloor': '\u230A', + 'lfloor': '\u230A', + 'LeftRightArrow': '\u2194', + 'harr': '\u2194', + 'leftrightarrow': '\u2194', + 'LeftRightVector': '\u294E', + 'LeftTee': '\u22A3', + 'dashv': '\u22A3', + 'LeftTeeArrow': '\u21A4', + 'mapstoleft': '\u21A4', + 'LeftTeeVector': '\u295A', + 'LeftTriangle': '\u22B2', + 'vartriangleleft': '\u22B2', + 'vltri': '\u22B2', + 'LeftTriangleBar': '\u29CF', + 'LeftTriangleEqual': '\u22B4', + 'ltrie': '\u22B4', + 'trianglelefteq': '\u22B4', + 'LeftUpDownVector': '\u2951', + 'LeftUpTeeVector': '\u2960', + 'LeftUpVector': '\u21BF', + 'uharl': '\u21BF', + 'upharpoonleft': '\u21BF', + 'LeftUpVectorBar': '\u2958', + 'LeftVector': '\u21BC', + 'leftharpoonup': '\u21BC', + 'lharu': '\u21BC', + 'LeftVectorBar': '\u2952', + 'LessEqualGreater': '\u22DA', + 'leg': '\u22DA', + 'lesseqgtr': '\u22DA', + 'LessFullEqual': '\u2266', + 'lE': '\u2266', + 'leqq': '\u2266', + 'LessGreater': '\u2276', + 'lessgtr': '\u2276', + 'lg': '\u2276', + 'LessLess': '\u2AA1', + 'LessSlantEqual': '\u2A7D', + 'leqslant': '\u2A7D', + 'les': '\u2A7D', + 'LessTilde': '\u2272', + 'lesssim': '\u2272', + 'lsim': '\u2272', + 'Lfr': '\uD835\uDD0F', + 'Ll': '\u22D8', + 'Lleftarrow': '\u21DA', + 'lAarr': '\u21DA', + 'Lmidot': '\u013F', + 'LongLeftArrow': '\u27F5', + 'longleftarrow': '\u27F5', + 'xlarr': '\u27F5', + 'LongLeftRightArrow': '\u27F7', + 'longleftrightarrow': '\u27F7', + 'xharr': '\u27F7', + 'LongRightArrow': '\u27F6', + 'longrightarrow': '\u27F6', + 'xrarr': '\u27F6', + 'Lopf': '\uD835\uDD43', + 'LowerLeftArrow': '\u2199', + 'swarr': '\u2199', + 'swarrow': '\u2199', + 'LowerRightArrow': '\u2198', + 'searr': '\u2198', + 'searrow': '\u2198', + 'Lsh': '\u21B0', + 'lsh': '\u21B0', + 'Lstrok': '\u0141', + 'Lt': '\u226A', + 'NestedLessLess': '\u226A', + 'll': '\u226A', + 'Map': '\u2905', + 'Mcy': '\u041C', + 'MediumSpace': '\u205F', + 'Mellintrf': '\u2133', + 'Mscr': '\u2133', + 'phmmat': '\u2133', + 'Mfr': '\uD835\uDD10', + 'MinusPlus': '\u2213', + 'mnplus': '\u2213', + 'mp': '\u2213', + 'Mopf': '\uD835\uDD44', + 'Mu': '\u039C', + 'NJcy': '\u040A', + 'Nacute': '\u0143', + 'Ncaron': '\u0147', + 'Ncedil': '\u0145', + 'Ncy': '\u041D', + 'NegativeMediumSpace': '\u200B', + 'NegativeThickSpace': '\u200B', + 'NegativeThinSpace': '\u200B', + 'NegativeVeryThinSpace': '\u200B', + 'ZeroWidthSpace': '\u200B', + 'NewLine': '\u000A', + 'Nfr': '\uD835\uDD11', + 'NoBreak': '\u2060', + 'NonBreakingSpace': '\u00A0', + 'nbsp': '\u00A0', + 'Nopf': '\u2115', + 'naturals': '\u2115', + 'Not': '\u2AEC', + 'NotCongruent': '\u2262', + 'nequiv': '\u2262', + 'NotCupCap': '\u226D', + 'NotDoubleVerticalBar': '\u2226', + 'npar': '\u2226', + 'nparallel': '\u2226', + 'nshortparallel': '\u2226', + 'nspar': '\u2226', + 'NotElement': '\u2209', + 'notin': '\u2209', + 'notinva': '\u2209', + 'NotEqual': '\u2260', + 'ne': '\u2260', + 'NotEqualTilde': '\u2242\u0338', + 'nesim': '\u2242\u0338', + 'NotExists': '\u2204', + 'nexist': '\u2204', + 'nexists': '\u2204', + 'NotGreater': '\u226F', + 'ngt': '\u226F', + 'ngtr': '\u226F', + 'NotGreaterEqual': '\u2271', + 'nge': '\u2271', + 'ngeq': '\u2271', + 'NotGreaterFullEqual': '\u2267\u0338', + 'ngE': '\u2267\u0338', + 'ngeqq': '\u2267\u0338', + 'NotGreaterGreater': '\u226B\u0338', + 'nGtv': '\u226B\u0338', + 'NotGreaterLess': '\u2279', + 'ntgl': '\u2279', + 'NotGreaterSlantEqual': '\u2A7E\u0338', + 'ngeqslant': '\u2A7E\u0338', + 'nges': '\u2A7E\u0338', + 'NotGreaterTilde': '\u2275', + 'ngsim': '\u2275', + 'NotHumpDownHump': '\u224E\u0338', + 'nbump': '\u224E\u0338', + 'NotHumpEqual': '\u224F\u0338', + 'nbumpe': '\u224F\u0338', + 'NotLeftTriangle': '\u22EA', + 'nltri': '\u22EA', + 'ntriangleleft': '\u22EA', + 'NotLeftTriangleBar': '\u29CF\u0338', + 'NotLeftTriangleEqual': '\u22EC', + 'nltrie': '\u22EC', + 'ntrianglelefteq': '\u22EC', + 'NotLess': '\u226E', + 'nless': '\u226E', + 'nlt': '\u226E', + 'NotLessEqual': '\u2270', + 'nle': '\u2270', + 'nleq': '\u2270', + 'NotLessGreater': '\u2278', + 'ntlg': '\u2278', + 'NotLessLess': '\u226A\u0338', + 'nLtv': '\u226A\u0338', + 'NotLessSlantEqual': '\u2A7D\u0338', + 'nleqslant': '\u2A7D\u0338', + 'nles': '\u2A7D\u0338', + 'NotLessTilde': '\u2274', + 'nlsim': '\u2274', + 'NotNestedGreaterGreater': '\u2AA2\u0338', + 'NotNestedLessLess': '\u2AA1\u0338', + 'NotPrecedes': '\u2280', + 'npr': '\u2280', + 'nprec': '\u2280', + 'NotPrecedesEqual': '\u2AAF\u0338', + 'npre': '\u2AAF\u0338', + 'npreceq': '\u2AAF\u0338', + 'NotPrecedesSlantEqual': '\u22E0', + 'nprcue': '\u22E0', + 'NotReverseElement': '\u220C', + 'notni': '\u220C', + 'notniva': '\u220C', + 'NotRightTriangle': '\u22EB', + 'nrtri': '\u22EB', + 'ntriangleright': '\u22EB', + 'NotRightTriangleBar': '\u29D0\u0338', + 'NotRightTriangleEqual': '\u22ED', + 'nrtrie': '\u22ED', + 'ntrianglerighteq': '\u22ED', + 'NotSquareSubset': '\u228F\u0338', + 'NotSquareSubsetEqual': '\u22E2', + 'nsqsube': '\u22E2', + 'NotSquareSuperset': '\u2290\u0338', + 'NotSquareSupersetEqual': '\u22E3', + 'nsqsupe': '\u22E3', + 'NotSubset': '\u2282\u20D2', + 'nsubset': '\u2282\u20D2', + 'vnsub': '\u2282\u20D2', + 'NotSubsetEqual': '\u2288', + 'nsube': '\u2288', + 'nsubseteq': '\u2288', + 'NotSucceeds': '\u2281', + 'nsc': '\u2281', + 'nsucc': '\u2281', + 'NotSucceedsEqual': '\u2AB0\u0338', + 'nsce': '\u2AB0\u0338', + 'nsucceq': '\u2AB0\u0338', + 'NotSucceedsSlantEqual': '\u22E1', + 'nsccue': '\u22E1', + 'NotSucceedsTilde': '\u227F\u0338', + 'NotSuperset': '\u2283\u20D2', + 'nsupset': '\u2283\u20D2', + 'vnsup': '\u2283\u20D2', + 'NotSupersetEqual': '\u2289', + 'nsupe': '\u2289', + 'nsupseteq': '\u2289', + 'NotTilde': '\u2241', + 'nsim': '\u2241', + 'NotTildeEqual': '\u2244', + 'nsime': '\u2244', + 'nsimeq': '\u2244', + 'NotTildeFullEqual': '\u2247', + 'ncong': '\u2247', + 'NotTildeTilde': '\u2249', + 'nap': '\u2249', + 'napprox': '\u2249', + 'NotVerticalBar': '\u2224', + 'nmid': '\u2224', + 'nshortmid': '\u2224', + 'nsmid': '\u2224', + 'Nscr': '\uD835\uDCA9', + 'Ntilde': '\u00D1', + 'Nu': '\u039D', + 'OElig': '\u0152', + 'Oacute': '\u00D3', + 'Ocirc': '\u00D4', + 'Ocy': '\u041E', + 'Odblac': '\u0150', + 'Ofr': '\uD835\uDD12', + 'Ograve': '\u00D2', + 'Omacr': '\u014C', + 'Omega': '\u03A9', + 'ohm': '\u03A9', + 'Omicron': '\u039F', + 'Oopf': '\uD835\uDD46', + 'OpenCurlyDoubleQuote': '\u201C', + 'ldquo': '\u201C', + 'OpenCurlyQuote': '\u2018', + 'lsquo': '\u2018', + 'Or': '\u2A54', + 'Oscr': '\uD835\uDCAA', + 'Oslash': '\u00D8', + 'Otilde': '\u00D5', + 'Otimes': '\u2A37', + 'Ouml': '\u00D6', + 'OverBar': '\u203E', + 'oline': '\u203E', + 'OverBrace': '\u23DE', + 'OverBracket': '\u23B4', + 'tbrk': '\u23B4', + 'OverParenthesis': '\u23DC', + 'PartialD': '\u2202', + 'part': '\u2202', + 'Pcy': '\u041F', + 'Pfr': '\uD835\uDD13', + 'Phi': '\u03A6', + 'Pi': '\u03A0', + 'PlusMinus': '\u00B1', + 'plusmn': '\u00B1', + 'pm': '\u00B1', + 'Popf': '\u2119', + 'primes': '\u2119', + 'Pr': '\u2ABB', + 'Precedes': '\u227A', + 'pr': '\u227A', + 'prec': '\u227A', + 'PrecedesEqual': '\u2AAF', + 'pre': '\u2AAF', + 'preceq': '\u2AAF', + 'PrecedesSlantEqual': '\u227C', + 'prcue': '\u227C', + 'preccurlyeq': '\u227C', + 'PrecedesTilde': '\u227E', + 'precsim': '\u227E', + 'prsim': '\u227E', + 'Prime': '\u2033', + 'Product': '\u220F', + 'prod': '\u220F', + 'Proportional': '\u221D', + 'prop': '\u221D', + 'propto': '\u221D', + 'varpropto': '\u221D', + 'vprop': '\u221D', + 'Pscr': '\uD835\uDCAB', + 'Psi': '\u03A8', + 'QUOT': '\u0022', + 'quot': '\u0022', + 'Qfr': '\uD835\uDD14', + 'Qopf': '\u211A', + 'rationals': '\u211A', + 'Qscr': '\uD835\uDCAC', + 'RBarr': '\u2910', + 'drbkarow': '\u2910', + 'REG': '\u00AE', + 'circledR': '\u00AE', + 'reg': '\u00AE', + 'Racute': '\u0154', + 'Rang': '\u27EB', + 'Rarr': '\u21A0', + 'twoheadrightarrow': '\u21A0', + 'Rarrtl': '\u2916', + 'Rcaron': '\u0158', + 'Rcedil': '\u0156', + 'Rcy': '\u0420', + 'Re': '\u211C', + 'Rfr': '\u211C', + 'real': '\u211C', + 'realpart': '\u211C', + 'ReverseElement': '\u220B', + 'SuchThat': '\u220B', + 'ni': '\u220B', + 'niv': '\u220B', + 'ReverseEquilibrium': '\u21CB', + 'leftrightharpoons': '\u21CB', + 'lrhar': '\u21CB', + 'ReverseUpEquilibrium': '\u296F', + 'duhar': '\u296F', + 'Rho': '\u03A1', + 'RightAngleBracket': '\u27E9', + 'rang': '\u27E9', + 'rangle': '\u27E9', + 'RightArrow': '\u2192', + 'ShortRightArrow': '\u2192', + 'rarr': '\u2192', + 'rightarrow': '\u2192', + 'srarr': '\u2192', + 'RightArrowBar': '\u21E5', + 'rarrb': '\u21E5', + 'RightArrowLeftArrow': '\u21C4', + 'rightleftarrows': '\u21C4', + 'rlarr': '\u21C4', + 'RightCeiling': '\u2309', + 'rceil': '\u2309', + 'RightDoubleBracket': '\u27E7', + 'robrk': '\u27E7', + 'RightDownTeeVector': '\u295D', + 'RightDownVector': '\u21C2', + 'dharr': '\u21C2', + 'downharpoonright': '\u21C2', + 'RightDownVectorBar': '\u2955', + 'RightFloor': '\u230B', + 'rfloor': '\u230B', + 'RightTee': '\u22A2', + 'vdash': '\u22A2', + 'RightTeeArrow': '\u21A6', + 'map': '\u21A6', + 'mapsto': '\u21A6', + 'RightTeeVector': '\u295B', + 'RightTriangle': '\u22B3', + 'vartriangleright': '\u22B3', + 'vrtri': '\u22B3', + 'RightTriangleBar': '\u29D0', + 'RightTriangleEqual': '\u22B5', + 'rtrie': '\u22B5', + 'trianglerighteq': '\u22B5', + 'RightUpDownVector': '\u294F', + 'RightUpTeeVector': '\u295C', + 'RightUpVector': '\u21BE', + 'uharr': '\u21BE', + 'upharpoonright': '\u21BE', + 'RightUpVectorBar': '\u2954', + 'RightVector': '\u21C0', + 'rharu': '\u21C0', + 'rightharpoonup': '\u21C0', + 'RightVectorBar': '\u2953', + 'Ropf': '\u211D', + 'reals': '\u211D', + 'RoundImplies': '\u2970', + 'Rrightarrow': '\u21DB', + 'rAarr': '\u21DB', + 'Rscr': '\u211B', + 'realine': '\u211B', + 'Rsh': '\u21B1', + 'rsh': '\u21B1', + 'RuleDelayed': '\u29F4', + 'SHCHcy': '\u0429', + 'SHcy': '\u0428', + 'SOFTcy': '\u042C', + 'Sacute': '\u015A', + 'Sc': '\u2ABC', + 'Scaron': '\u0160', + 'Scedil': '\u015E', + 'Scirc': '\u015C', + 'Scy': '\u0421', + 'Sfr': '\uD835\uDD16', + 'ShortUpArrow': '\u2191', + 'UpArrow': '\u2191', + 'uarr': '\u2191', + 'uparrow': '\u2191', + 'Sigma': '\u03A3', + 'SmallCircle': '\u2218', + 'compfn': '\u2218', + 'Sopf': '\uD835\uDD4A', + 'Sqrt': '\u221A', + 'radic': '\u221A', + 'Square': '\u25A1', + 'squ': '\u25A1', + 'square': '\u25A1', + 'SquareIntersection': '\u2293', + 'sqcap': '\u2293', + 'SquareSubset': '\u228F', + 'sqsub': '\u228F', + 'sqsubset': '\u228F', + 'SquareSubsetEqual': '\u2291', + 'sqsube': '\u2291', + 'sqsubseteq': '\u2291', + 'SquareSuperset': '\u2290', + 'sqsup': '\u2290', + 'sqsupset': '\u2290', + 'SquareSupersetEqual': '\u2292', + 'sqsupe': '\u2292', + 'sqsupseteq': '\u2292', + 'SquareUnion': '\u2294', + 'sqcup': '\u2294', + 'Sscr': '\uD835\uDCAE', + 'Star': '\u22C6', + 'sstarf': '\u22C6', + 'Sub': '\u22D0', + 'Subset': '\u22D0', + 'SubsetEqual': '\u2286', + 'sube': '\u2286', + 'subseteq': '\u2286', + 'Succeeds': '\u227B', + 'sc': '\u227B', + 'succ': '\u227B', + 'SucceedsEqual': '\u2AB0', + 'sce': '\u2AB0', + 'succeq': '\u2AB0', + 'SucceedsSlantEqual': '\u227D', + 'sccue': '\u227D', + 'succcurlyeq': '\u227D', + 'SucceedsTilde': '\u227F', + 'scsim': '\u227F', + 'succsim': '\u227F', + 'Sum': '\u2211', + 'sum': '\u2211', + 'Sup': '\u22D1', + 'Supset': '\u22D1', + 'Superset': '\u2283', + 'sup': '\u2283', + 'supset': '\u2283', + 'SupersetEqual': '\u2287', + 'supe': '\u2287', + 'supseteq': '\u2287', + 'THORN': '\u00DE', + 'TRADE': '\u2122', + 'trade': '\u2122', + 'TSHcy': '\u040B', + 'TScy': '\u0426', + 'Tab': '\u0009', + 'Tau': '\u03A4', + 'Tcaron': '\u0164', + 'Tcedil': '\u0162', + 'Tcy': '\u0422', + 'Tfr': '\uD835\uDD17', + 'Therefore': '\u2234', + 'there4': '\u2234', + 'therefore': '\u2234', + 'Theta': '\u0398', + 'ThickSpace': '\u205F\u200A', + 'ThinSpace': '\u2009', + 'thinsp': '\u2009', + 'Tilde': '\u223C', + 'sim': '\u223C', + 'thicksim': '\u223C', + 'thksim': '\u223C', + 'TildeEqual': '\u2243', + 'sime': '\u2243', + 'simeq': '\u2243', + 'TildeFullEqual': '\u2245', + 'cong': '\u2245', + 'TildeTilde': '\u2248', + 'ap': '\u2248', + 'approx': '\u2248', + 'asymp': '\u2248', + 'thickapprox': '\u2248', + 'thkap': '\u2248', + 'Topf': '\uD835\uDD4B', + 'TripleDot': '\u20DB', + 'tdot': '\u20DB', + 'Tscr': '\uD835\uDCAF', + 'Tstrok': '\u0166', + 'Uacute': '\u00DA', + 'Uarr': '\u219F', + 'Uarrocir': '\u2949', + 'Ubrcy': '\u040E', + 'Ubreve': '\u016C', + 'Ucirc': '\u00DB', + 'Ucy': '\u0423', + 'Udblac': '\u0170', + 'Ufr': '\uD835\uDD18', + 'Ugrave': '\u00D9', + 'Umacr': '\u016A', + 'UnderBar': '\u005F', + 'lowbar': '\u005F', + 'UnderBrace': '\u23DF', + 'UnderBracket': '\u23B5', + 'bbrk': '\u23B5', + 'UnderParenthesis': '\u23DD', + 'Union': '\u22C3', + 'bigcup': '\u22C3', + 'xcup': '\u22C3', + 'UnionPlus': '\u228E', + 'uplus': '\u228E', + 'Uogon': '\u0172', + 'Uopf': '\uD835\uDD4C', + 'UpArrowBar': '\u2912', + 'UpArrowDownArrow': '\u21C5', + 'udarr': '\u21C5', + 'UpDownArrow': '\u2195', + 'updownarrow': '\u2195', + 'varr': '\u2195', + 'UpEquilibrium': '\u296E', + 'udhar': '\u296E', + 'UpTee': '\u22A5', + 'bot': '\u22A5', + 'bottom': '\u22A5', + 'perp': '\u22A5', + 'UpTeeArrow': '\u21A5', + 'mapstoup': '\u21A5', + 'UpperLeftArrow': '\u2196', + 'nwarr': '\u2196', + 'nwarrow': '\u2196', + 'UpperRightArrow': '\u2197', + 'nearr': '\u2197', + 'nearrow': '\u2197', + 'Upsi': '\u03D2', + 'upsih': '\u03D2', + 'Upsilon': '\u03A5', + 'Uring': '\u016E', + 'Uscr': '\uD835\uDCB0', + 'Utilde': '\u0168', + 'Uuml': '\u00DC', + 'VDash': '\u22AB', + 'Vbar': '\u2AEB', + 'Vcy': '\u0412', + 'Vdash': '\u22A9', + 'Vdashl': '\u2AE6', + 'Vee': '\u22C1', + 'bigvee': '\u22C1', + 'xvee': '\u22C1', + 'Verbar': '\u2016', + 'Vert': '\u2016', + 'VerticalBar': '\u2223', + 'mid': '\u2223', + 'shortmid': '\u2223', + 'smid': '\u2223', + 'VerticalLine': '\u007C', + 'verbar': '\u007C', + 'vert': '\u007C', + 'VerticalSeparator': '\u2758', + 'VerticalTilde': '\u2240', + 'wr': '\u2240', + 'wreath': '\u2240', + 'VeryThinSpace': '\u200A', + 'hairsp': '\u200A', + 'Vfr': '\uD835\uDD19', + 'Vopf': '\uD835\uDD4D', + 'Vscr': '\uD835\uDCB1', + 'Vvdash': '\u22AA', + 'Wcirc': '\u0174', + 'Wedge': '\u22C0', + 'bigwedge': '\u22C0', + 'xwedge': '\u22C0', + 'Wfr': '\uD835\uDD1A', + 'Wopf': '\uD835\uDD4E', + 'Wscr': '\uD835\uDCB2', + 'Xfr': '\uD835\uDD1B', + 'Xi': '\u039E', + 'Xopf': '\uD835\uDD4F', + 'Xscr': '\uD835\uDCB3', + 'YAcy': '\u042F', + 'YIcy': '\u0407', + 'YUcy': '\u042E', + 'Yacute': '\u00DD', + 'Ycirc': '\u0176', + 'Ycy': '\u042B', + 'Yfr': '\uD835\uDD1C', + 'Yopf': '\uD835\uDD50', + 'Yscr': '\uD835\uDCB4', + 'Yuml': '\u0178', + 'ZHcy': '\u0416', + 'Zacute': '\u0179', + 'Zcaron': '\u017D', + 'Zcy': '\u0417', + 'Zdot': '\u017B', + 'Zeta': '\u0396', + 'Zfr': '\u2128', + 'zeetrf': '\u2128', + 'Zopf': '\u2124', + 'integers': '\u2124', + 'Zscr': '\uD835\uDCB5', + 'aacute': '\u00E1', + 'abreve': '\u0103', + 'ac': '\u223E', + 'mstpos': '\u223E', + 'acE': '\u223E\u0333', + 'acd': '\u223F', + 'acirc': '\u00E2', + 'acy': '\u0430', + 'aelig': '\u00E6', + 'afr': '\uD835\uDD1E', + 'agrave': '\u00E0', + 'alefsym': '\u2135', + 'aleph': '\u2135', + 'alpha': '\u03B1', + 'amacr': '\u0101', + 'amalg': '\u2A3F', + 'and': '\u2227', + 'wedge': '\u2227', + 'andand': '\u2A55', + 'andd': '\u2A5C', + 'andslope': '\u2A58', + 'andv': '\u2A5A', + 'ang': '\u2220', + 'angle': '\u2220', + 'ange': '\u29A4', + 'angmsd': '\u2221', + 'measuredangle': '\u2221', + 'angmsdaa': '\u29A8', + 'angmsdab': '\u29A9', + 'angmsdac': '\u29AA', + 'angmsdad': '\u29AB', + 'angmsdae': '\u29AC', + 'angmsdaf': '\u29AD', + 'angmsdag': '\u29AE', + 'angmsdah': '\u29AF', + 'angrt': '\u221F', + 'angrtvb': '\u22BE', + 'angrtvbd': '\u299D', + 'angsph': '\u2222', + 'angzarr': '\u237C', + 'aogon': '\u0105', + 'aopf': '\uD835\uDD52', + 'apE': '\u2A70', + 'apacir': '\u2A6F', + 'ape': '\u224A', + 'approxeq': '\u224A', + 'apid': '\u224B', + 'apos': '\u0027', + 'aring': '\u00E5', + 'ascr': '\uD835\uDCB6', + 'ast': '\u002A', + 'midast': '\u002A', + 'atilde': '\u00E3', + 'auml': '\u00E4', + 'awint': '\u2A11', + 'bNot': '\u2AED', + 'backcong': '\u224C', + 'bcong': '\u224C', + 'backepsilon': '\u03F6', + 'bepsi': '\u03F6', + 'backprime': '\u2035', + 'bprime': '\u2035', + 'backsim': '\u223D', + 'bsim': '\u223D', + 'backsimeq': '\u22CD', + 'bsime': '\u22CD', + 'barvee': '\u22BD', + 'barwed': '\u2305', + 'barwedge': '\u2305', + 'bbrktbrk': '\u23B6', + 'bcy': '\u0431', + 'bdquo': '\u201E', + 'ldquor': '\u201E', + 'bemptyv': '\u29B0', + 'beta': '\u03B2', + 'beth': '\u2136', + 'between': '\u226C', + 'twixt': '\u226C', + 'bfr': '\uD835\uDD1F', + 'bigcirc': '\u25EF', + 'xcirc': '\u25EF', + 'bigodot': '\u2A00', + 'xodot': '\u2A00', + 'bigoplus': '\u2A01', + 'xoplus': '\u2A01', + 'bigotimes': '\u2A02', + 'xotime': '\u2A02', + 'bigsqcup': '\u2A06', + 'xsqcup': '\u2A06', + 'bigstar': '\u2605', + 'starf': '\u2605', + 'bigtriangledown': '\u25BD', + 'xdtri': '\u25BD', + 'bigtriangleup': '\u25B3', + 'xutri': '\u25B3', + 'biguplus': '\u2A04', + 'xuplus': '\u2A04', + 'bkarow': '\u290D', + 'rbarr': '\u290D', + 'blacklozenge': '\u29EB', + 'lozf': '\u29EB', + 'blacktriangle': '\u25B4', + 'utrif': '\u25B4', + 'blacktriangledown': '\u25BE', + 'dtrif': '\u25BE', + 'blacktriangleleft': '\u25C2', + 'ltrif': '\u25C2', + 'blacktriangleright': '\u25B8', + 'rtrif': '\u25B8', + 'blank': '\u2423', + 'blk12': '\u2592', + 'blk14': '\u2591', + 'blk34': '\u2593', + 'block': '\u2588', + 'bne': '\u003D\u20E5', + 'bnequiv': '\u2261\u20E5', + 'bnot': '\u2310', + 'bopf': '\uD835\uDD53', + 'bowtie': '\u22C8', + 'boxDL': '\u2557', + 'boxDR': '\u2554', + 'boxDl': '\u2556', + 'boxDr': '\u2553', + 'boxH': '\u2550', + 'boxHD': '\u2566', + 'boxHU': '\u2569', + 'boxHd': '\u2564', + 'boxHu': '\u2567', + 'boxUL': '\u255D', + 'boxUR': '\u255A', + 'boxUl': '\u255C', + 'boxUr': '\u2559', + 'boxV': '\u2551', + 'boxVH': '\u256C', + 'boxVL': '\u2563', + 'boxVR': '\u2560', + 'boxVh': '\u256B', + 'boxVl': '\u2562', + 'boxVr': '\u255F', + 'boxbox': '\u29C9', + 'boxdL': '\u2555', + 'boxdR': '\u2552', + 'boxdl': '\u2510', + 'boxdr': '\u250C', + 'boxhD': '\u2565', + 'boxhU': '\u2568', + 'boxhd': '\u252C', + 'boxhu': '\u2534', + 'boxminus': '\u229F', + 'minusb': '\u229F', + 'boxplus': '\u229E', + 'plusb': '\u229E', + 'boxtimes': '\u22A0', + 'timesb': '\u22A0', + 'boxuL': '\u255B', + 'boxuR': '\u2558', + 'boxul': '\u2518', + 'boxur': '\u2514', + 'boxv': '\u2502', + 'boxvH': '\u256A', + 'boxvL': '\u2561', + 'boxvR': '\u255E', + 'boxvh': '\u253C', + 'boxvl': '\u2524', + 'boxvr': '\u251C', + 'brvbar': '\u00A6', + 'bscr': '\uD835\uDCB7', + 'bsemi': '\u204F', + 'bsol': '\u005C', + 'bsolb': '\u29C5', + 'bsolhsub': '\u27C8', + 'bull': '\u2022', + 'bullet': '\u2022', + 'bumpE': '\u2AAE', + 'cacute': '\u0107', + 'cap': '\u2229', + 'capand': '\u2A44', + 'capbrcup': '\u2A49', + 'capcap': '\u2A4B', + 'capcup': '\u2A47', + 'capdot': '\u2A40', + 'caps': '\u2229\uFE00', + 'caret': '\u2041', + 'ccaps': '\u2A4D', + 'ccaron': '\u010D', + 'ccedil': '\u00E7', + 'ccirc': '\u0109', + 'ccups': '\u2A4C', + 'ccupssm': '\u2A50', + 'cdot': '\u010B', + 'cemptyv': '\u29B2', + 'cent': '\u00A2', + 'cfr': '\uD835\uDD20', + 'chcy': '\u0447', + 'check': '\u2713', + 'checkmark': '\u2713', + 'chi': '\u03C7', + 'cir': '\u25CB', + 'cirE': '\u29C3', + 'circ': '\u02C6', + 'circeq': '\u2257', + 'cire': '\u2257', + 'circlearrowleft': '\u21BA', + 'olarr': '\u21BA', + 'circlearrowright': '\u21BB', + 'orarr': '\u21BB', + 'circledS': '\u24C8', + 'oS': '\u24C8', + 'circledast': '\u229B', + 'oast': '\u229B', + 'circledcirc': '\u229A', + 'ocir': '\u229A', + 'circleddash': '\u229D', + 'odash': '\u229D', + 'cirfnint': '\u2A10', + 'cirmid': '\u2AEF', + 'cirscir': '\u29C2', + 'clubs': '\u2663', + 'clubsuit': '\u2663', + 'colon': '\u003A', + 'comma': '\u002C', + 'commat': '\u0040', + 'comp': '\u2201', + 'complement': '\u2201', + 'congdot': '\u2A6D', + 'copf': '\uD835\uDD54', + 'copysr': '\u2117', + 'crarr': '\u21B5', + 'cross': '\u2717', + 'cscr': '\uD835\uDCB8', + 'csub': '\u2ACF', + 'csube': '\u2AD1', + 'csup': '\u2AD0', + 'csupe': '\u2AD2', + 'ctdot': '\u22EF', + 'cudarrl': '\u2938', + 'cudarrr': '\u2935', + 'cuepr': '\u22DE', + 'curlyeqprec': '\u22DE', + 'cuesc': '\u22DF', + 'curlyeqsucc': '\u22DF', + 'cularr': '\u21B6', + 'curvearrowleft': '\u21B6', + 'cularrp': '\u293D', + 'cup': '\u222A', + 'cupbrcap': '\u2A48', + 'cupcap': '\u2A46', + 'cupcup': '\u2A4A', + 'cupdot': '\u228D', + 'cupor': '\u2A45', + 'cups': '\u222A\uFE00', + 'curarr': '\u21B7', + 'curvearrowright': '\u21B7', + 'curarrm': '\u293C', + 'curlyvee': '\u22CE', + 'cuvee': '\u22CE', + 'curlywedge': '\u22CF', + 'cuwed': '\u22CF', + 'curren': '\u00A4', + 'cwint': '\u2231', + 'cylcty': '\u232D', + 'dHar': '\u2965', + 'dagger': '\u2020', + 'daleth': '\u2138', + 'dash': '\u2010', + 'hyphen': '\u2010', + 'dbkarow': '\u290F', + 'rBarr': '\u290F', + 'dcaron': '\u010F', + 'dcy': '\u0434', + 'ddarr': '\u21CA', + 'downdownarrows': '\u21CA', + 'ddotseq': '\u2A77', + 'eDDot': '\u2A77', + 'deg': '\u00B0', + 'delta': '\u03B4', + 'demptyv': '\u29B1', + 'dfisht': '\u297F', + 'dfr': '\uD835\uDD21', + 'diamondsuit': '\u2666', + 'diams': '\u2666', + 'digamma': '\u03DD', + 'gammad': '\u03DD', + 'disin': '\u22F2', + 'div': '\u00F7', + 'divide': '\u00F7', + 'divideontimes': '\u22C7', + 'divonx': '\u22C7', + 'djcy': '\u0452', + 'dlcorn': '\u231E', + 'llcorner': '\u231E', + 'dlcrop': '\u230D', + 'dollar': '\u0024', + 'dopf': '\uD835\uDD55', + 'doteqdot': '\u2251', + 'eDot': '\u2251', + 'dotminus': '\u2238', + 'minusd': '\u2238', + 'dotplus': '\u2214', + 'plusdo': '\u2214', + 'dotsquare': '\u22A1', + 'sdotb': '\u22A1', + 'drcorn': '\u231F', + 'lrcorner': '\u231F', + 'drcrop': '\u230C', + 'dscr': '\uD835\uDCB9', + 'dscy': '\u0455', + 'dsol': '\u29F6', + 'dstrok': '\u0111', + 'dtdot': '\u22F1', + 'dtri': '\u25BF', + 'triangledown': '\u25BF', + 'dwangle': '\u29A6', + 'dzcy': '\u045F', + 'dzigrarr': '\u27FF', + 'eacute': '\u00E9', + 'easter': '\u2A6E', + 'ecaron': '\u011B', + 'ecir': '\u2256', + 'eqcirc': '\u2256', + 'ecirc': '\u00EA', + 'ecolon': '\u2255', + 'eqcolon': '\u2255', + 'ecy': '\u044D', + 'edot': '\u0117', + 'efDot': '\u2252', + 'fallingdotseq': '\u2252', + 'efr': '\uD835\uDD22', + 'eg': '\u2A9A', + 'egrave': '\u00E8', + 'egs': '\u2A96', + 'eqslantgtr': '\u2A96', + 'egsdot': '\u2A98', + 'el': '\u2A99', + 'elinters': '\u23E7', + 'ell': '\u2113', + 'els': '\u2A95', + 'eqslantless': '\u2A95', + 'elsdot': '\u2A97', + 'emacr': '\u0113', + 'empty': '\u2205', + 'emptyset': '\u2205', + 'emptyv': '\u2205', + 'varnothing': '\u2205', + 'emsp13': '\u2004', + 'emsp14': '\u2005', + 'emsp': '\u2003', + 'eng': '\u014B', + 'ensp': '\u2002', + 'eogon': '\u0119', + 'eopf': '\uD835\uDD56', + 'epar': '\u22D5', + 'eparsl': '\u29E3', + 'eplus': '\u2A71', + 'epsi': '\u03B5', + 'epsilon': '\u03B5', + 'epsiv': '\u03F5', + 'straightepsilon': '\u03F5', + 'varepsilon': '\u03F5', + 'equals': '\u003D', + 'equest': '\u225F', + 'questeq': '\u225F', + 'equivDD': '\u2A78', + 'eqvparsl': '\u29E5', + 'erDot': '\u2253', + 'risingdotseq': '\u2253', + 'erarr': '\u2971', + 'escr': '\u212F', + 'eta': '\u03B7', + 'eth': '\u00F0', + 'euml': '\u00EB', + 'euro': '\u20AC', + 'excl': '\u0021', + 'fcy': '\u0444', + 'female': '\u2640', + 'ffilig': '\uFB03', + 'fflig': '\uFB00', + 'ffllig': '\uFB04', + 'ffr': '\uD835\uDD23', + 'filig': '\uFB01', + 'fjlig': '\u0066\u006A', + 'flat': '\u266D', + 'fllig': '\uFB02', + 'fltns': '\u25B1', + 'fnof': '\u0192', + 'fopf': '\uD835\uDD57', + 'fork': '\u22D4', + 'pitchfork': '\u22D4', + 'forkv': '\u2AD9', + 'fpartint': '\u2A0D', + 'frac12': '\u00BD', + 'half': '\u00BD', + 'frac13': '\u2153', + 'frac14': '\u00BC', + 'frac15': '\u2155', + 'frac16': '\u2159', + 'frac18': '\u215B', + 'frac23': '\u2154', + 'frac25': '\u2156', + 'frac34': '\u00BE', + 'frac35': '\u2157', + 'frac38': '\u215C', + 'frac45': '\u2158', + 'frac56': '\u215A', + 'frac58': '\u215D', + 'frac78': '\u215E', + 'frasl': '\u2044', + 'frown': '\u2322', + 'sfrown': '\u2322', + 'fscr': '\uD835\uDCBB', + 'gEl': '\u2A8C', + 'gtreqqless': '\u2A8C', + 'gacute': '\u01F5', + 'gamma': '\u03B3', + 'gap': '\u2A86', + 'gtrapprox': '\u2A86', + 'gbreve': '\u011F', + 'gcirc': '\u011D', + 'gcy': '\u0433', + 'gdot': '\u0121', + 'gescc': '\u2AA9', + 'gesdot': '\u2A80', + 'gesdoto': '\u2A82', + 'gesdotol': '\u2A84', + 'gesl': '\u22DB\uFE00', + 'gesles': '\u2A94', + 'gfr': '\uD835\uDD24', + 'gimel': '\u2137', + 'gjcy': '\u0453', + 'glE': '\u2A92', + 'gla': '\u2AA5', + 'glj': '\u2AA4', + 'gnE': '\u2269', + 'gneqq': '\u2269', + 'gnap': '\u2A8A', + 'gnapprox': '\u2A8A', + 'gne': '\u2A88', + 'gneq': '\u2A88', + 'gnsim': '\u22E7', + 'gopf': '\uD835\uDD58', + 'gscr': '\u210A', + 'gsime': '\u2A8E', + 'gsiml': '\u2A90', + 'gtcc': '\u2AA7', + 'gtcir': '\u2A7A', + 'gtdot': '\u22D7', + 'gtrdot': '\u22D7', + 'gtlPar': '\u2995', + 'gtquest': '\u2A7C', + 'gtrarr': '\u2978', + 'gvertneqq': '\u2269\uFE00', + 'gvnE': '\u2269\uFE00', + 'hardcy': '\u044A', + 'harrcir': '\u2948', + 'harrw': '\u21AD', + 'leftrightsquigarrow': '\u21AD', + 'hbar': '\u210F', + 'hslash': '\u210F', + 'planck': '\u210F', + 'plankv': '\u210F', + 'hcirc': '\u0125', + 'hearts': '\u2665', + 'heartsuit': '\u2665', + 'hellip': '\u2026', + 'mldr': '\u2026', + 'hercon': '\u22B9', + 'hfr': '\uD835\uDD25', + 'hksearow': '\u2925', + 'searhk': '\u2925', + 'hkswarow': '\u2926', + 'swarhk': '\u2926', + 'hoarr': '\u21FF', + 'homtht': '\u223B', + 'hookleftarrow': '\u21A9', + 'larrhk': '\u21A9', + 'hookrightarrow': '\u21AA', + 'rarrhk': '\u21AA', + 'hopf': '\uD835\uDD59', + 'horbar': '\u2015', + 'hscr': '\uD835\uDCBD', + 'hstrok': '\u0127', + 'hybull': '\u2043', + 'iacute': '\u00ED', + 'icirc': '\u00EE', + 'icy': '\u0438', + 'iecy': '\u0435', + 'iexcl': '\u00A1', + 'ifr': '\uD835\uDD26', + 'igrave': '\u00EC', + 'iiiint': '\u2A0C', + 'qint': '\u2A0C', + 'iiint': '\u222D', + 'tint': '\u222D', + 'iinfin': '\u29DC', + 'iiota': '\u2129', + 'ijlig': '\u0133', + 'imacr': '\u012B', + 'imath': '\u0131', + 'inodot': '\u0131', + 'imof': '\u22B7', + 'imped': '\u01B5', + 'incare': '\u2105', + 'infin': '\u221E', + 'infintie': '\u29DD', + 'intcal': '\u22BA', + 'intercal': '\u22BA', + 'intlarhk': '\u2A17', + 'intprod': '\u2A3C', + 'iprod': '\u2A3C', + 'iocy': '\u0451', + 'iogon': '\u012F', + 'iopf': '\uD835\uDD5A', + 'iota': '\u03B9', + 'iquest': '\u00BF', + 'iscr': '\uD835\uDCBE', + 'isinE': '\u22F9', + 'isindot': '\u22F5', + 'isins': '\u22F4', + 'isinsv': '\u22F3', + 'itilde': '\u0129', + 'iukcy': '\u0456', + 'iuml': '\u00EF', + 'jcirc': '\u0135', + 'jcy': '\u0439', + 'jfr': '\uD835\uDD27', + 'jmath': '\u0237', + 'jopf': '\uD835\uDD5B', + 'jscr': '\uD835\uDCBF', + 'jsercy': '\u0458', + 'jukcy': '\u0454', + 'kappa': '\u03BA', + 'kappav': '\u03F0', + 'varkappa': '\u03F0', + 'kcedil': '\u0137', + 'kcy': '\u043A', + 'kfr': '\uD835\uDD28', + 'kgreen': '\u0138', + 'khcy': '\u0445', + 'kjcy': '\u045C', + 'kopf': '\uD835\uDD5C', + 'kscr': '\uD835\uDCC0', + 'lAtail': '\u291B', + 'lBarr': '\u290E', + 'lEg': '\u2A8B', + 'lesseqqgtr': '\u2A8B', + 'lHar': '\u2962', + 'lacute': '\u013A', + 'laemptyv': '\u29B4', + 'lambda': '\u03BB', + 'langd': '\u2991', + 'lap': '\u2A85', + 'lessapprox': '\u2A85', + 'laquo': '\u00AB', + 'larrbfs': '\u291F', + 'larrfs': '\u291D', + 'larrlp': '\u21AB', + 'looparrowleft': '\u21AB', + 'larrpl': '\u2939', + 'larrsim': '\u2973', + 'larrtl': '\u21A2', + 'leftarrowtail': '\u21A2', + 'lat': '\u2AAB', + 'latail': '\u2919', + 'late': '\u2AAD', + 'lates': '\u2AAD\uFE00', + 'lbarr': '\u290C', + 'lbbrk': '\u2772', + 'lbrace': '\u007B', + 'lcub': '\u007B', + 'lbrack': '\u005B', + 'lsqb': '\u005B', + 'lbrke': '\u298B', + 'lbrksld': '\u298F', + 'lbrkslu': '\u298D', + 'lcaron': '\u013E', + 'lcedil': '\u013C', + 'lcy': '\u043B', + 'ldca': '\u2936', + 'ldrdhar': '\u2967', + 'ldrushar': '\u294B', + 'ldsh': '\u21B2', + 'le': '\u2264', + 'leq': '\u2264', + 'leftleftarrows': '\u21C7', + 'llarr': '\u21C7', + 'leftthreetimes': '\u22CB', + 'lthree': '\u22CB', + 'lescc': '\u2AA8', + 'lesdot': '\u2A7F', + 'lesdoto': '\u2A81', + 'lesdotor': '\u2A83', + 'lesg': '\u22DA\uFE00', + 'lesges': '\u2A93', + 'lessdot': '\u22D6', + 'ltdot': '\u22D6', + 'lfisht': '\u297C', + 'lfr': '\uD835\uDD29', + 'lgE': '\u2A91', + 'lharul': '\u296A', + 'lhblk': '\u2584', + 'ljcy': '\u0459', + 'llhard': '\u296B', + 'lltri': '\u25FA', + 'lmidot': '\u0140', + 'lmoust': '\u23B0', + 'lmoustache': '\u23B0', + 'lnE': '\u2268', + 'lneqq': '\u2268', + 'lnap': '\u2A89', + 'lnapprox': '\u2A89', + 'lne': '\u2A87', + 'lneq': '\u2A87', + 'lnsim': '\u22E6', + 'loang': '\u27EC', + 'loarr': '\u21FD', + 'longmapsto': '\u27FC', + 'xmap': '\u27FC', + 'looparrowright': '\u21AC', + 'rarrlp': '\u21AC', + 'lopar': '\u2985', + 'lopf': '\uD835\uDD5D', + 'loplus': '\u2A2D', + 'lotimes': '\u2A34', + 'lowast': '\u2217', + 'loz': '\u25CA', + 'lozenge': '\u25CA', + 'lpar': '\u0028', + 'lparlt': '\u2993', + 'lrhard': '\u296D', + 'lrm': '\u200E', + 'lrtri': '\u22BF', + 'lsaquo': '\u2039', + 'lscr': '\uD835\uDCC1', + 'lsime': '\u2A8D', + 'lsimg': '\u2A8F', + 'lsquor': '\u201A', + 'sbquo': '\u201A', + 'lstrok': '\u0142', + 'ltcc': '\u2AA6', + 'ltcir': '\u2A79', + 'ltimes': '\u22C9', + 'ltlarr': '\u2976', + 'ltquest': '\u2A7B', + 'ltrPar': '\u2996', + 'ltri': '\u25C3', + 'triangleleft': '\u25C3', + 'lurdshar': '\u294A', + 'luruhar': '\u2966', + 'lvertneqq': '\u2268\uFE00', + 'lvnE': '\u2268\uFE00', + 'mDDot': '\u223A', + 'macr': '\u00AF', + 'strns': '\u00AF', + 'male': '\u2642', + 'malt': '\u2720', + 'maltese': '\u2720', + 'marker': '\u25AE', + 'mcomma': '\u2A29', + 'mcy': '\u043C', + 'mdash': '\u2014', + 'mfr': '\uD835\uDD2A', + 'mho': '\u2127', + 'micro': '\u00B5', + 'midcir': '\u2AF0', + 'minus': '\u2212', + 'minusdu': '\u2A2A', + 'mlcp': '\u2ADB', + 'models': '\u22A7', + 'mopf': '\uD835\uDD5E', + 'mscr': '\uD835\uDCC2', + 'mu': '\u03BC', + 'multimap': '\u22B8', + 'mumap': '\u22B8', + 'nGg': '\u22D9\u0338', + 'nGt': '\u226B\u20D2', + 'nLeftarrow': '\u21CD', + 'nlArr': '\u21CD', + 'nLeftrightarrow': '\u21CE', + 'nhArr': '\u21CE', + 'nLl': '\u22D8\u0338', + 'nLt': '\u226A\u20D2', + 'nRightarrow': '\u21CF', + 'nrArr': '\u21CF', + 'nVDash': '\u22AF', + 'nVdash': '\u22AE', + 'nacute': '\u0144', + 'nang': '\u2220\u20D2', + 'napE': '\u2A70\u0338', + 'napid': '\u224B\u0338', + 'napos': '\u0149', + 'natur': '\u266E', + 'natural': '\u266E', + 'ncap': '\u2A43', + 'ncaron': '\u0148', + 'ncedil': '\u0146', + 'ncongdot': '\u2A6D\u0338', + 'ncup': '\u2A42', + 'ncy': '\u043D', + 'ndash': '\u2013', + 'neArr': '\u21D7', + 'nearhk': '\u2924', + 'nedot': '\u2250\u0338', + 'nesear': '\u2928', + 'toea': '\u2928', + 'nfr': '\uD835\uDD2B', + 'nharr': '\u21AE', + 'nleftrightarrow': '\u21AE', + 'nhpar': '\u2AF2', + 'nis': '\u22FC', + 'nisd': '\u22FA', + 'njcy': '\u045A', + 'nlE': '\u2266\u0338', + 'nleqq': '\u2266\u0338', + 'nlarr': '\u219A', + 'nleftarrow': '\u219A', + 'nldr': '\u2025', + 'nopf': '\uD835\uDD5F', + 'not': '\u00AC', + 'notinE': '\u22F9\u0338', + 'notindot': '\u22F5\u0338', + 'notinvb': '\u22F7', + 'notinvc': '\u22F6', + 'notnivb': '\u22FE', + 'notnivc': '\u22FD', + 'nparsl': '\u2AFD\u20E5', + 'npart': '\u2202\u0338', + 'npolint': '\u2A14', + 'nrarr': '\u219B', + 'nrightarrow': '\u219B', + 'nrarrc': '\u2933\u0338', + 'nrarrw': '\u219D\u0338', + 'nscr': '\uD835\uDCC3', + 'nsub': '\u2284', + 'nsubE': '\u2AC5\u0338', + 'nsubseteqq': '\u2AC5\u0338', + 'nsup': '\u2285', + 'nsupE': '\u2AC6\u0338', + 'nsupseteqq': '\u2AC6\u0338', + 'ntilde': '\u00F1', + 'nu': '\u03BD', + 'num': '\u0023', + 'numero': '\u2116', + 'numsp': '\u2007', + 'nvDash': '\u22AD', + 'nvHarr': '\u2904', + 'nvap': '\u224D\u20D2', + 'nvdash': '\u22AC', + 'nvge': '\u2265\u20D2', + 'nvgt': '\u003E\u20D2', + 'nvinfin': '\u29DE', + 'nvlArr': '\u2902', + 'nvle': '\u2264\u20D2', + 'nvlt': '\u003C\u20D2', + 'nvltrie': '\u22B4\u20D2', + 'nvrArr': '\u2903', + 'nvrtrie': '\u22B5\u20D2', + 'nvsim': '\u223C\u20D2', + 'nwArr': '\u21D6', + 'nwarhk': '\u2923', + 'nwnear': '\u2927', + 'oacute': '\u00F3', + 'ocirc': '\u00F4', + 'ocy': '\u043E', + 'odblac': '\u0151', + 'odiv': '\u2A38', + 'odsold': '\u29BC', + 'oelig': '\u0153', + 'ofcir': '\u29BF', + 'ofr': '\uD835\uDD2C', + 'ogon': '\u02DB', + 'ograve': '\u00F2', + 'ogt': '\u29C1', + 'ohbar': '\u29B5', + 'olcir': '\u29BE', + 'olcross': '\u29BB', + 'olt': '\u29C0', + 'omacr': '\u014D', + 'omega': '\u03C9', + 'omicron': '\u03BF', + 'omid': '\u29B6', + 'oopf': '\uD835\uDD60', + 'opar': '\u29B7', + 'operp': '\u29B9', + 'or': '\u2228', + 'vee': '\u2228', + 'ord': '\u2A5D', + 'order': '\u2134', + 'orderof': '\u2134', + 'oscr': '\u2134', + 'ordf': '\u00AA', + 'ordm': '\u00BA', + 'origof': '\u22B6', + 'oror': '\u2A56', + 'orslope': '\u2A57', + 'orv': '\u2A5B', + 'oslash': '\u00F8', + 'osol': '\u2298', + 'otilde': '\u00F5', + 'otimesas': '\u2A36', + 'ouml': '\u00F6', + 'ovbar': '\u233D', + 'para': '\u00B6', + 'parsim': '\u2AF3', + 'parsl': '\u2AFD', + 'pcy': '\u043F', + 'percnt': '\u0025', + 'period': '\u002E', + 'permil': '\u2030', + 'pertenk': '\u2031', + 'pfr': '\uD835\uDD2D', + 'phi': '\u03C6', + 'phiv': '\u03D5', + 'straightphi': '\u03D5', + 'varphi': '\u03D5', + 'phone': '\u260E', + 'pi': '\u03C0', + 'piv': '\u03D6', + 'varpi': '\u03D6', + 'planckh': '\u210E', + 'plus': '\u002B', + 'plusacir': '\u2A23', + 'pluscir': '\u2A22', + 'plusdu': '\u2A25', + 'pluse': '\u2A72', + 'plussim': '\u2A26', + 'plustwo': '\u2A27', + 'pointint': '\u2A15', + 'popf': '\uD835\uDD61', + 'pound': '\u00A3', + 'prE': '\u2AB3', + 'prap': '\u2AB7', + 'precapprox': '\u2AB7', + 'precnapprox': '\u2AB9', + 'prnap': '\u2AB9', + 'precneqq': '\u2AB5', + 'prnE': '\u2AB5', + 'precnsim': '\u22E8', + 'prnsim': '\u22E8', + 'prime': '\u2032', + 'profalar': '\u232E', + 'profline': '\u2312', + 'profsurf': '\u2313', + 'prurel': '\u22B0', + 'pscr': '\uD835\uDCC5', + 'psi': '\u03C8', + 'puncsp': '\u2008', + 'qfr': '\uD835\uDD2E', + 'qopf': '\uD835\uDD62', + 'qprime': '\u2057', + 'qscr': '\uD835\uDCC6', + 'quatint': '\u2A16', + 'quest': '\u003F', + 'rAtail': '\u291C', + 'rHar': '\u2964', + 'race': '\u223D\u0331', + 'racute': '\u0155', + 'raemptyv': '\u29B3', + 'rangd': '\u2992', + 'range': '\u29A5', + 'raquo': '\u00BB', + 'rarrap': '\u2975', + 'rarrbfs': '\u2920', + 'rarrc': '\u2933', + 'rarrfs': '\u291E', + 'rarrpl': '\u2945', + 'rarrsim': '\u2974', + 'rarrtl': '\u21A3', + 'rightarrowtail': '\u21A3', + 'rarrw': '\u219D', + 'rightsquigarrow': '\u219D', + 'ratail': '\u291A', + 'ratio': '\u2236', + 'rbbrk': '\u2773', + 'rbrace': '\u007D', + 'rcub': '\u007D', + 'rbrack': '\u005D', + 'rsqb': '\u005D', + 'rbrke': '\u298C', + 'rbrksld': '\u298E', + 'rbrkslu': '\u2990', + 'rcaron': '\u0159', + 'rcedil': '\u0157', + 'rcy': '\u0440', + 'rdca': '\u2937', + 'rdldhar': '\u2969', + 'rdsh': '\u21B3', + 'rect': '\u25AD', + 'rfisht': '\u297D', + 'rfr': '\uD835\uDD2F', + 'rharul': '\u296C', + 'rho': '\u03C1', + 'rhov': '\u03F1', + 'varrho': '\u03F1', + 'rightrightarrows': '\u21C9', + 'rrarr': '\u21C9', + 'rightthreetimes': '\u22CC', + 'rthree': '\u22CC', + 'ring': '\u02DA', + 'rlm': '\u200F', + 'rmoust': '\u23B1', + 'rmoustache': '\u23B1', + 'rnmid': '\u2AEE', + 'roang': '\u27ED', + 'roarr': '\u21FE', + 'ropar': '\u2986', + 'ropf': '\uD835\uDD63', + 'roplus': '\u2A2E', + 'rotimes': '\u2A35', + 'rpar': '\u0029', + 'rpargt': '\u2994', + 'rppolint': '\u2A12', + 'rsaquo': '\u203A', + 'rscr': '\uD835\uDCC7', + 'rtimes': '\u22CA', + 'rtri': '\u25B9', + 'triangleright': '\u25B9', + 'rtriltri': '\u29CE', + 'ruluhar': '\u2968', + 'rx': '\u211E', + 'sacute': '\u015B', + 'scE': '\u2AB4', + 'scap': '\u2AB8', + 'succapprox': '\u2AB8', + 'scaron': '\u0161', + 'scedil': '\u015F', + 'scirc': '\u015D', + 'scnE': '\u2AB6', + 'succneqq': '\u2AB6', + 'scnap': '\u2ABA', + 'succnapprox': '\u2ABA', + 'scnsim': '\u22E9', + 'succnsim': '\u22E9', + 'scpolint': '\u2A13', + 'scy': '\u0441', + 'sdot': '\u22C5', + 'sdote': '\u2A66', + 'seArr': '\u21D8', + 'sect': '\u00A7', + 'semi': '\u003B', + 'seswar': '\u2929', + 'tosa': '\u2929', + 'sext': '\u2736', + 'sfr': '\uD835\uDD30', + 'sharp': '\u266F', + 'shchcy': '\u0449', + 'shcy': '\u0448', + 'shy': '\u00AD', + 'sigma': '\u03C3', + 'sigmaf': '\u03C2', + 'sigmav': '\u03C2', + 'varsigma': '\u03C2', + 'simdot': '\u2A6A', + 'simg': '\u2A9E', + 'simgE': '\u2AA0', + 'siml': '\u2A9D', + 'simlE': '\u2A9F', + 'simne': '\u2246', + 'simplus': '\u2A24', + 'simrarr': '\u2972', + 'smashp': '\u2A33', + 'smeparsl': '\u29E4', + 'smile': '\u2323', + 'ssmile': '\u2323', + 'smt': '\u2AAA', + 'smte': '\u2AAC', + 'smtes': '\u2AAC\uFE00', + 'softcy': '\u044C', + 'sol': '\u002F', + 'solb': '\u29C4', + 'solbar': '\u233F', + 'sopf': '\uD835\uDD64', + 'spades': '\u2660', + 'spadesuit': '\u2660', + 'sqcaps': '\u2293\uFE00', + 'sqcups': '\u2294\uFE00', + 'sscr': '\uD835\uDCC8', + 'star': '\u2606', + 'sub': '\u2282', + 'subset': '\u2282', + 'subE': '\u2AC5', + 'subseteqq': '\u2AC5', + 'subdot': '\u2ABD', + 'subedot': '\u2AC3', + 'submult': '\u2AC1', + 'subnE': '\u2ACB', + 'subsetneqq': '\u2ACB', + 'subne': '\u228A', + 'subsetneq': '\u228A', + 'subplus': '\u2ABF', + 'subrarr': '\u2979', + 'subsim': '\u2AC7', + 'subsub': '\u2AD5', + 'subsup': '\u2AD3', + 'sung': '\u266A', + 'sup1': '\u00B9', + 'sup2': '\u00B2', + 'sup3': '\u00B3', + 'supE': '\u2AC6', + 'supseteqq': '\u2AC6', + 'supdot': '\u2ABE', + 'supdsub': '\u2AD8', + 'supedot': '\u2AC4', + 'suphsol': '\u27C9', + 'suphsub': '\u2AD7', + 'suplarr': '\u297B', + 'supmult': '\u2AC2', + 'supnE': '\u2ACC', + 'supsetneqq': '\u2ACC', + 'supne': '\u228B', + 'supsetneq': '\u228B', + 'supplus': '\u2AC0', + 'supsim': '\u2AC8', + 'supsub': '\u2AD4', + 'supsup': '\u2AD6', + 'swArr': '\u21D9', + 'swnwar': '\u292A', + 'szlig': '\u00DF', + 'target': '\u2316', + 'tau': '\u03C4', + 'tcaron': '\u0165', + 'tcedil': '\u0163', + 'tcy': '\u0442', + 'telrec': '\u2315', + 'tfr': '\uD835\uDD31', + 'theta': '\u03B8', + 'thetasym': '\u03D1', + 'thetav': '\u03D1', + 'vartheta': '\u03D1', + 'thorn': '\u00FE', + 'times': '\u00D7', + 'timesbar': '\u2A31', + 'timesd': '\u2A30', + 'topbot': '\u2336', + 'topcir': '\u2AF1', + 'topf': '\uD835\uDD65', + 'topfork': '\u2ADA', + 'tprime': '\u2034', + 'triangle': '\u25B5', + 'utri': '\u25B5', + 'triangleq': '\u225C', + 'trie': '\u225C', + 'tridot': '\u25EC', + 'triminus': '\u2A3A', + 'triplus': '\u2A39', + 'trisb': '\u29CD', + 'tritime': '\u2A3B', + 'trpezium': '\u23E2', + 'tscr': '\uD835\uDCC9', + 'tscy': '\u0446', + 'tshcy': '\u045B', + 'tstrok': '\u0167', + 'uHar': '\u2963', + 'uacute': '\u00FA', + 'ubrcy': '\u045E', + 'ubreve': '\u016D', + 'ucirc': '\u00FB', + 'ucy': '\u0443', + 'udblac': '\u0171', + 'ufisht': '\u297E', + 'ufr': '\uD835\uDD32', + 'ugrave': '\u00F9', + 'uhblk': '\u2580', + 'ulcorn': '\u231C', + 'ulcorner': '\u231C', + 'ulcrop': '\u230F', + 'ultri': '\u25F8', + 'umacr': '\u016B', + 'uogon': '\u0173', + 'uopf': '\uD835\uDD66', + 'upsi': '\u03C5', + 'upsilon': '\u03C5', + 'upuparrows': '\u21C8', + 'uuarr': '\u21C8', + 'urcorn': '\u231D', + 'urcorner': '\u231D', + 'urcrop': '\u230E', + 'uring': '\u016F', + 'urtri': '\u25F9', + 'uscr': '\uD835\uDCCA', + 'utdot': '\u22F0', + 'utilde': '\u0169', + 'uuml': '\u00FC', + 'uwangle': '\u29A7', + 'vBar': '\u2AE8', + 'vBarv': '\u2AE9', + 'vangrt': '\u299C', + 'varsubsetneq': '\u228A\uFE00', + 'vsubne': '\u228A\uFE00', + 'varsubsetneqq': '\u2ACB\uFE00', + 'vsubnE': '\u2ACB\uFE00', + 'varsupsetneq': '\u228B\uFE00', + 'vsupne': '\u228B\uFE00', + 'varsupsetneqq': '\u2ACC\uFE00', + 'vsupnE': '\u2ACC\uFE00', + 'vcy': '\u0432', + 'veebar': '\u22BB', + 'veeeq': '\u225A', + 'vellip': '\u22EE', + 'vfr': '\uD835\uDD33', + 'vopf': '\uD835\uDD67', + 'vscr': '\uD835\uDCCB', + 'vzigzag': '\u299A', + 'wcirc': '\u0175', + 'wedbar': '\u2A5F', + 'wedgeq': '\u2259', + 'weierp': '\u2118', + 'wp': '\u2118', + 'wfr': '\uD835\uDD34', + 'wopf': '\uD835\uDD68', + 'wscr': '\uD835\uDCCC', + 'xfr': '\uD835\uDD35', + 'xi': '\u03BE', + 'xnis': '\u22FB', + 'xopf': '\uD835\uDD69', + 'xscr': '\uD835\uDCCD', + 'yacute': '\u00FD', + 'yacy': '\u044F', + 'ycirc': '\u0177', + 'ycy': '\u044B', + 'yen': '\u00A5', + 'yfr': '\uD835\uDD36', + 'yicy': '\u0457', + 'yopf': '\uD835\uDD6A', + 'yscr': '\uD835\uDCCE', + 'yucy': '\u044E', + 'yuml': '\u00FF', + 'zacute': '\u017A', + 'zcaron': '\u017E', + 'zcy': '\u0437', + 'zdot': '\u017C', + 'zeta': '\u03B6', + 'zfr': '\uD835\uDD37', + 'zhcy': '\u0436', + 'zigrarr': '\u21DD', + 'zopf': '\uD835\uDD6B', + 'zscr': '\uD835\uDCCF', + 'zwj': '\u200D', + 'zwnj': '\u200C' +}; +// The &ngsp; pseudo-entity is denoting a space. +// 0xE500 is a PUA (Private Use Areas) unicode character +// This is inspired by the Angular Dart implementation. +const NGSP_UNICODE = '\uE500'; +NAMED_ENTITIES['ngsp'] = NGSP_UNICODE; +class TokenError extends ParseError { + constructor(errorMsg, tokenType, span) { + super(span, errorMsg); + this.tokenType = tokenType; + } +} +class TokenizeResult { + constructor(tokens, errors, nonNormalizedIcuExpressions) { + this.tokens = tokens; + this.errors = errors; + this.nonNormalizedIcuExpressions = nonNormalizedIcuExpressions; + } +} +function tokenize(source, url, getTagDefinition, options = {}) { + const tokenizer = new _Tokenizer(new ParseSourceFile(source, url), getTagDefinition, options); + tokenizer.tokenize(); + return new TokenizeResult(mergeTextTokens(tokenizer.tokens), tokenizer.errors, tokenizer.nonNormalizedIcuExpressions); +} +const _CR_OR_CRLF_REGEXP = /\r\n?/g; +function _unexpectedCharacterErrorMsg(charCode) { + const char = charCode === $EOF ? 'EOF' : String.fromCharCode(charCode); + return `Unexpected character "${char}"`; +} +function _unknownEntityErrorMsg(entitySrc) { + return `Unknown entity "${entitySrc}" - use the "&#;" or "&#x;" syntax`; +} +function _unparsableEntityErrorMsg(type, entityStr) { + return `Unable to parse entity "${entityStr}" - ${type} character reference entities must end with ";"`; +} +var CharacterReferenceType; +(function (CharacterReferenceType) { + CharacterReferenceType["HEX"] = "hexadecimal"; + CharacterReferenceType["DEC"] = "decimal"; +})(CharacterReferenceType || (CharacterReferenceType = {})); +class _ControlFlowError { + constructor(error) { + this.error = error; + } +} +// See https://www.w3.org/TR/html51/syntax.html#writing-html-documents +class _Tokenizer { + /** + * @param _file The html source file being tokenized. + * @param _getTagDefinition A function that will retrieve a tag definition for a given tag name. + * @param options Configuration of the tokenization. + */ + constructor(_file, _getTagDefinition, options) { + this._getTagDefinition = _getTagDefinition; + this._currentTokenStart = null; + this._currentTokenType = null; + this._expansionCaseStack = []; + this._inInterpolation = false; + this.tokens = []; + this.errors = []; + this.nonNormalizedIcuExpressions = []; + this._tokenizeIcu = options.tokenizeExpansionForms || false; + this._interpolationConfig = options.interpolationConfig || DEFAULT_INTERPOLATION_CONFIG; + this._leadingTriviaCodePoints = options.leadingTriviaChars && options.leadingTriviaChars.map(c => c.codePointAt(0) || 0); + const range = options.range || { + endPos: _file.content.length, + startPos: 0, + startLine: 0, + startCol: 0 + }; + this._cursor = options.escapedString ? new EscapedCharacterCursor(_file, range) : new PlainCharacterCursor(_file, range); + this._preserveLineEndings = options.preserveLineEndings || false; + this._i18nNormalizeLineEndingsInICUs = options.i18nNormalizeLineEndingsInICUs || false; + this._tokenizeBlocks = options.tokenizeBlocks ?? true; + this._tokenizeLet = options.tokenizeLet ?? true; + try { + this._cursor.init(); + } catch (e) { + this.handleError(e); + } + } + _processCarriageReturns(content) { + if (this._preserveLineEndings) { + return content; + } + // https://www.w3.org/TR/html51/syntax.html#preprocessing-the-input-stream + // In order to keep the original position in the source, we can not + // pre-process it. + // Instead CRs are processed right before instantiating the tokens. + return content.replace(_CR_OR_CRLF_REGEXP, '\n'); + } + tokenize() { + while (this._cursor.peek() !== $EOF) { + const start = this._cursor.clone(); + try { + if (this._attemptCharCode($LT)) { + if (this._attemptCharCode($BANG)) { + if (this._attemptCharCode($LBRACKET)) { + this._consumeCdata(start); + } else if (this._attemptCharCode($MINUS)) { + this._consumeComment(start); + } else { + this._consumeDocType(start); + } + } else if (this._attemptCharCode($SLASH)) { + this._consumeTagClose(start); + } else { + this._consumeTagOpen(start); + } + } else if (this._tokenizeLet && + // Use `peek` instead of `attempCharCode` since we + // don't want to advance in case it's not `@let`. + this._cursor.peek() === $AT && !this._inInterpolation && this._attemptStr('@let')) { + this._consumeLetDeclaration(start); + } else if (this._tokenizeBlocks && this._attemptCharCode($AT)) { + this._consumeBlockStart(start); + } else if (this._tokenizeBlocks && !this._inInterpolation && !this._isInExpansionCase() && !this._isInExpansionForm() && this._attemptCharCode($RBRACE)) { + this._consumeBlockEnd(start); + } else if (!(this._tokenizeIcu && this._tokenizeExpansionForm())) { + // In (possibly interpolated) text the end of the text is given by `isTextEnd()`, while + // the premature end of an interpolation is given by the start of a new HTML element. + this._consumeWithInterpolation(5 /* TokenType.TEXT */, 8 /* TokenType.INTERPOLATION */, () => this._isTextEnd(), () => this._isTagStart()); + } + } catch (e) { + this.handleError(e); + } + } + this._beginToken(33 /* TokenType.EOF */); + this._endToken([]); + } + _getBlockName() { + // This allows us to capture up something like `@else if`, but not `@ if`. + let spacesInNameAllowed = false; + const nameCursor = this._cursor.clone(); + this._attemptCharCodeUntilFn(code => { + if (isWhitespace(code)) { + return !spacesInNameAllowed; + } + if (isBlockNameChar(code)) { + spacesInNameAllowed = true; + return false; + } + return true; + }); + return this._cursor.getChars(nameCursor).trim(); + } + _consumeBlockStart(start) { + this._beginToken(24 /* TokenType.BLOCK_OPEN_START */, start); + const startToken = this._endToken([this._getBlockName()]); + if (this._cursor.peek() === $LPAREN) { + // Advance past the opening paren. + this._cursor.advance(); + // Capture the parameters. + this._consumeBlockParameters(); + // Allow spaces before the closing paren. + this._attemptCharCodeUntilFn(isNotWhitespace); + if (this._attemptCharCode($RPAREN)) { + // Allow spaces after the paren. + this._attemptCharCodeUntilFn(isNotWhitespace); + } else { + startToken.type = 28 /* TokenType.INCOMPLETE_BLOCK_OPEN */; + return; + } + } + if (this._attemptCharCode($LBRACE)) { + this._beginToken(25 /* TokenType.BLOCK_OPEN_END */); + this._endToken([]); + } else { + startToken.type = 28 /* TokenType.INCOMPLETE_BLOCK_OPEN */; + } + } + _consumeBlockEnd(start) { + this._beginToken(26 /* TokenType.BLOCK_CLOSE */, start); + this._endToken([]); + } + _consumeBlockParameters() { + // Trim the whitespace until the first parameter. + this._attemptCharCodeUntilFn(isBlockParameterChar); + while (this._cursor.peek() !== $RPAREN && this._cursor.peek() !== $EOF) { + this._beginToken(27 /* TokenType.BLOCK_PARAMETER */); + const start = this._cursor.clone(); + let inQuote = null; + let openParens = 0; + // Consume the parameter until the next semicolon or brace. + // Note that we skip over semicolons/braces inside of strings. + while (this._cursor.peek() !== $SEMICOLON && this._cursor.peek() !== $EOF || inQuote !== null) { + const char = this._cursor.peek(); + // Skip to the next character if it was escaped. + if (char === $BACKSLASH) { + this._cursor.advance(); + } else if (char === inQuote) { + inQuote = null; + } else if (inQuote === null && isQuote(char)) { + inQuote = char; + } else if (char === $LPAREN && inQuote === null) { + openParens++; + } else if (char === $RPAREN && inQuote === null) { + if (openParens === 0) { + break; + } else if (openParens > 0) { + openParens--; + } + } + this._cursor.advance(); + } + this._endToken([this._cursor.getChars(start)]); + // Skip to the next parameter. + this._attemptCharCodeUntilFn(isBlockParameterChar); + } + } + _consumeLetDeclaration(start) { + this._beginToken(29 /* TokenType.LET_START */, start); + // Require at least one white space after the `@let`. + if (isWhitespace(this._cursor.peek())) { + this._attemptCharCodeUntilFn(isNotWhitespace); + } else { + const token = this._endToken([this._cursor.getChars(start)]); + token.type = 32 /* TokenType.INCOMPLETE_LET */; + return; + } + const startToken = this._endToken([this._getLetDeclarationName()]); + // Skip over white space before the equals character. + this._attemptCharCodeUntilFn(isNotWhitespace); + // Expect an equals sign. + if (!this._attemptCharCode($EQ)) { + startToken.type = 32 /* TokenType.INCOMPLETE_LET */; + return; + } + // Skip spaces after the equals. + this._attemptCharCodeUntilFn(code => isNotWhitespace(code) && !isNewLine(code)); + this._consumeLetDeclarationValue(); + // Terminate the `@let` with a semicolon. + const endChar = this._cursor.peek(); + if (endChar === $SEMICOLON) { + this._beginToken(31 /* TokenType.LET_END */); + this._endToken([]); + this._cursor.advance(); + } else { + startToken.type = 32 /* TokenType.INCOMPLETE_LET */; + startToken.sourceSpan = this._cursor.getSpan(start); + } + } + _getLetDeclarationName() { + const nameCursor = this._cursor.clone(); + let allowDigit = false; + this._attemptCharCodeUntilFn(code => { + if (isAsciiLetter(code) || code === $$ || code === $_ || + // `@let` names can't start with a digit, but digits are valid anywhere else in the name. + allowDigit && isDigit(code)) { + allowDigit = true; + return false; + } + return true; + }); + return this._cursor.getChars(nameCursor).trim(); + } + _consumeLetDeclarationValue() { + const start = this._cursor.clone(); + this._beginToken(30 /* TokenType.LET_VALUE */, start); + while (this._cursor.peek() !== $EOF) { + const char = this._cursor.peek(); + // `@let` declarations terminate with a semicolon. + if (char === $SEMICOLON) { + break; + } + // If we hit a quote, skip over its content since we don't care what's inside. + if (isQuote(char)) { + this._cursor.advance(); + this._attemptCharCodeUntilFn(inner => { + if (inner === $BACKSLASH) { + this._cursor.advance(); + return false; + } + return inner === char; + }); + } + this._cursor.advance(); + } + this._endToken([this._cursor.getChars(start)]); + } + /** + * @returns whether an ICU token has been created + * @internal + */ + _tokenizeExpansionForm() { + if (this.isExpansionFormStart()) { + this._consumeExpansionFormStart(); + return true; + } + if (isExpansionCaseStart(this._cursor.peek()) && this._isInExpansionForm()) { + this._consumeExpansionCaseStart(); + return true; + } + if (this._cursor.peek() === $RBRACE) { + if (this._isInExpansionCase()) { + this._consumeExpansionCaseEnd(); + return true; + } + if (this._isInExpansionForm()) { + this._consumeExpansionFormEnd(); + return true; + } + } + return false; + } + _beginToken(type, start = this._cursor.clone()) { + this._currentTokenStart = start; + this._currentTokenType = type; + } + _endToken(parts, end) { + if (this._currentTokenStart === null) { + throw new TokenError('Programming error - attempted to end a token when there was no start to the token', this._currentTokenType, this._cursor.getSpan(end)); + } + if (this._currentTokenType === null) { + throw new TokenError('Programming error - attempted to end a token which has no token type', null, this._cursor.getSpan(this._currentTokenStart)); + } + const token = { + type: this._currentTokenType, + parts, + sourceSpan: (end ?? this._cursor).getSpan(this._currentTokenStart, this._leadingTriviaCodePoints) + }; + this.tokens.push(token); + this._currentTokenStart = null; + this._currentTokenType = null; + return token; + } + _createError(msg, span) { + if (this._isInExpansionForm()) { + msg += ` (Do you have an unescaped "{" in your template? Use "{{ '{' }}") to escape it.)`; + } + const error = new TokenError(msg, this._currentTokenType, span); + this._currentTokenStart = null; + this._currentTokenType = null; + return new _ControlFlowError(error); + } + handleError(e) { + if (e instanceof CursorError) { + e = this._createError(e.msg, this._cursor.getSpan(e.cursor)); + } + if (e instanceof _ControlFlowError) { + this.errors.push(e.error); + } else { + throw e; + } + } + _attemptCharCode(charCode) { + if (this._cursor.peek() === charCode) { + this._cursor.advance(); + return true; + } + return false; + } + _attemptCharCodeCaseInsensitive(charCode) { + if (compareCharCodeCaseInsensitive(this._cursor.peek(), charCode)) { + this._cursor.advance(); + return true; + } + return false; + } + _requireCharCode(charCode) { + const location = this._cursor.clone(); + if (!this._attemptCharCode(charCode)) { + throw this._createError(_unexpectedCharacterErrorMsg(this._cursor.peek()), this._cursor.getSpan(location)); + } + } + _attemptStr(chars) { + const len = chars.length; + if (this._cursor.charsLeft() < len) { + return false; + } + const initialPosition = this._cursor.clone(); + for (let i = 0; i < len; i++) { + if (!this._attemptCharCode(chars.charCodeAt(i))) { + // If attempting to parse the string fails, we want to reset the parser + // to where it was before the attempt + this._cursor = initialPosition; + return false; + } + } + return true; + } + _attemptStrCaseInsensitive(chars) { + for (let i = 0; i < chars.length; i++) { + if (!this._attemptCharCodeCaseInsensitive(chars.charCodeAt(i))) { + return false; + } + } + return true; + } + _requireStr(chars) { + const location = this._cursor.clone(); + if (!this._attemptStr(chars)) { + throw this._createError(_unexpectedCharacterErrorMsg(this._cursor.peek()), this._cursor.getSpan(location)); + } + } + _attemptCharCodeUntilFn(predicate) { + while (!predicate(this._cursor.peek())) { + this._cursor.advance(); + } + } + _requireCharCodeUntilFn(predicate, len) { + const start = this._cursor.clone(); + this._attemptCharCodeUntilFn(predicate); + if (this._cursor.diff(start) < len) { + throw this._createError(_unexpectedCharacterErrorMsg(this._cursor.peek()), this._cursor.getSpan(start)); + } + } + _attemptUntilChar(char) { + while (this._cursor.peek() !== char) { + this._cursor.advance(); + } + } + _readChar() { + // Don't rely upon reading directly from `_input` as the actual char value + // may have been generated from an escape sequence. + const char = String.fromCodePoint(this._cursor.peek()); + this._cursor.advance(); + return char; + } + _consumeEntity(textTokenType) { + this._beginToken(9 /* TokenType.ENCODED_ENTITY */); + const start = this._cursor.clone(); + this._cursor.advance(); + if (this._attemptCharCode($HASH)) { + const isHex = this._attemptCharCode($x) || this._attemptCharCode($X); + const codeStart = this._cursor.clone(); + this._attemptCharCodeUntilFn(isDigitEntityEnd); + if (this._cursor.peek() != $SEMICOLON) { + // Advance cursor to include the peeked character in the string provided to the error + // message. + this._cursor.advance(); + const entityType = isHex ? CharacterReferenceType.HEX : CharacterReferenceType.DEC; + throw this._createError(_unparsableEntityErrorMsg(entityType, this._cursor.getChars(start)), this._cursor.getSpan()); + } + const strNum = this._cursor.getChars(codeStart); + this._cursor.advance(); + try { + const charCode = parseInt(strNum, isHex ? 16 : 10); + this._endToken([String.fromCharCode(charCode), this._cursor.getChars(start)]); + } catch { + throw this._createError(_unknownEntityErrorMsg(this._cursor.getChars(start)), this._cursor.getSpan()); + } + } else { + const nameStart = this._cursor.clone(); + this._attemptCharCodeUntilFn(isNamedEntityEnd); + if (this._cursor.peek() != $SEMICOLON) { + // No semicolon was found so abort the encoded entity token that was in progress, and treat + // this as a text token + this._beginToken(textTokenType, start); + this._cursor = nameStart; + this._endToken(['&']); + } else { + const name = this._cursor.getChars(nameStart); + this._cursor.advance(); + const char = NAMED_ENTITIES[name]; + if (!char) { + throw this._createError(_unknownEntityErrorMsg(name), this._cursor.getSpan(start)); + } + this._endToken([char, `&${name};`]); + } + } + } + _consumeRawText(consumeEntities, endMarkerPredicate) { + this._beginToken(consumeEntities ? 6 /* TokenType.ESCAPABLE_RAW_TEXT */ : 7 /* TokenType.RAW_TEXT */); + const parts = []; + while (true) { + const tagCloseStart = this._cursor.clone(); + const foundEndMarker = endMarkerPredicate(); + this._cursor = tagCloseStart; + if (foundEndMarker) { + break; + } + if (consumeEntities && this._cursor.peek() === $AMPERSAND) { + this._endToken([this._processCarriageReturns(parts.join(''))]); + parts.length = 0; + this._consumeEntity(6 /* TokenType.ESCAPABLE_RAW_TEXT */); + this._beginToken(6 /* TokenType.ESCAPABLE_RAW_TEXT */); + } else { + parts.push(this._readChar()); + } + } + this._endToken([this._processCarriageReturns(parts.join(''))]); + } + _consumeComment(start) { + this._beginToken(10 /* TokenType.COMMENT_START */, start); + this._requireCharCode($MINUS); + this._endToken([]); + this._consumeRawText(false, () => this._attemptStr('-->')); + this._beginToken(11 /* TokenType.COMMENT_END */); + this._requireStr('-->'); + this._endToken([]); + } + _consumeCdata(start) { + this._beginToken(12 /* TokenType.CDATA_START */, start); + this._requireStr('CDATA['); + this._endToken([]); + this._consumeRawText(false, () => this._attemptStr(']]>')); + this._beginToken(13 /* TokenType.CDATA_END */); + this._requireStr(']]>'); + this._endToken([]); + } + _consumeDocType(start) { + this._beginToken(18 /* TokenType.DOC_TYPE */, start); + const contentStart = this._cursor.clone(); + this._attemptUntilChar($GT); + const content = this._cursor.getChars(contentStart); + this._cursor.advance(); + this._endToken([content]); + } + _consumePrefixAndName() { + const nameOrPrefixStart = this._cursor.clone(); + let prefix = ''; + while (this._cursor.peek() !== $COLON && !isPrefixEnd(this._cursor.peek())) { + this._cursor.advance(); + } + let nameStart; + if (this._cursor.peek() === $COLON) { + prefix = this._cursor.getChars(nameOrPrefixStart); + this._cursor.advance(); + nameStart = this._cursor.clone(); + } else { + nameStart = nameOrPrefixStart; + } + this._requireCharCodeUntilFn(isNameEnd, prefix === '' ? 0 : 1); + const name = this._cursor.getChars(nameStart); + return [prefix, name]; + } + _consumeTagOpen(start) { + let tagName; + let prefix; + let openTagToken; + try { + if (!isAsciiLetter(this._cursor.peek())) { + throw this._createError(_unexpectedCharacterErrorMsg(this._cursor.peek()), this._cursor.getSpan(start)); + } + openTagToken = this._consumeTagOpenStart(start); + prefix = openTagToken.parts[0]; + tagName = openTagToken.parts[1]; + this._attemptCharCodeUntilFn(isNotWhitespace); + while (this._cursor.peek() !== $SLASH && this._cursor.peek() !== $GT && this._cursor.peek() !== $LT && this._cursor.peek() !== $EOF) { + this._consumeAttributeName(); + this._attemptCharCodeUntilFn(isNotWhitespace); + if (this._attemptCharCode($EQ)) { + this._attemptCharCodeUntilFn(isNotWhitespace); + this._consumeAttributeValue(); + } + this._attemptCharCodeUntilFn(isNotWhitespace); + } + this._consumeTagOpenEnd(); + } catch (e) { + if (e instanceof _ControlFlowError) { + if (openTagToken) { + // We errored before we could close the opening tag, so it is incomplete. + openTagToken.type = 4 /* TokenType.INCOMPLETE_TAG_OPEN */; + } else { + // When the start tag is invalid, assume we want a "<" as text. + // Back to back text tokens are merged at the end. + this._beginToken(5 /* TokenType.TEXT */, start); + this._endToken(['<']); + } + return; + } + throw e; + } + const contentTokenType = this._getTagDefinition(tagName).getContentType(prefix); + if (contentTokenType === TagContentType.RAW_TEXT) { + this._consumeRawTextWithTagClose(prefix, tagName, false); + } else if (contentTokenType === TagContentType.ESCAPABLE_RAW_TEXT) { + this._consumeRawTextWithTagClose(prefix, tagName, true); + } + } + _consumeRawTextWithTagClose(prefix, tagName, consumeEntities) { + this._consumeRawText(consumeEntities, () => { + if (!this._attemptCharCode($LT)) return false; + if (!this._attemptCharCode($SLASH)) return false; + this._attemptCharCodeUntilFn(isNotWhitespace); + if (!this._attemptStrCaseInsensitive(tagName)) return false; + this._attemptCharCodeUntilFn(isNotWhitespace); + return this._attemptCharCode($GT); + }); + this._beginToken(3 /* TokenType.TAG_CLOSE */); + this._requireCharCodeUntilFn(code => code === $GT, 3); + this._cursor.advance(); // Consume the `>` + this._endToken([prefix, tagName]); + } + _consumeTagOpenStart(start) { + this._beginToken(0 /* TokenType.TAG_OPEN_START */, start); + const parts = this._consumePrefixAndName(); + return this._endToken(parts); + } + _consumeAttributeName() { + const attrNameStart = this._cursor.peek(); + if (attrNameStart === $SQ || attrNameStart === $DQ) { + throw this._createError(_unexpectedCharacterErrorMsg(attrNameStart), this._cursor.getSpan()); + } + this._beginToken(14 /* TokenType.ATTR_NAME */); + const prefixAndName = this._consumePrefixAndName(); + this._endToken(prefixAndName); + } + _consumeAttributeValue() { + if (this._cursor.peek() === $SQ || this._cursor.peek() === $DQ) { + const quoteChar = this._cursor.peek(); + this._consumeQuote(quoteChar); + // In an attribute then end of the attribute value and the premature end to an interpolation + // are both triggered by the `quoteChar`. + const endPredicate = () => this._cursor.peek() === quoteChar; + this._consumeWithInterpolation(16 /* TokenType.ATTR_VALUE_TEXT */, 17 /* TokenType.ATTR_VALUE_INTERPOLATION */, endPredicate, endPredicate); + this._consumeQuote(quoteChar); + } else { + const endPredicate = () => isNameEnd(this._cursor.peek()); + this._consumeWithInterpolation(16 /* TokenType.ATTR_VALUE_TEXT */, 17 /* TokenType.ATTR_VALUE_INTERPOLATION */, endPredicate, endPredicate); + } + } + _consumeQuote(quoteChar) { + this._beginToken(15 /* TokenType.ATTR_QUOTE */); + this._requireCharCode(quoteChar); + this._endToken([String.fromCodePoint(quoteChar)]); + } + _consumeTagOpenEnd() { + const tokenType = this._attemptCharCode($SLASH) ? 2 /* TokenType.TAG_OPEN_END_VOID */ : 1 /* TokenType.TAG_OPEN_END */; + this._beginToken(tokenType); + this._requireCharCode($GT); + this._endToken([]); + } + _consumeTagClose(start) { + this._beginToken(3 /* TokenType.TAG_CLOSE */, start); + this._attemptCharCodeUntilFn(isNotWhitespace); + const prefixAndName = this._consumePrefixAndName(); + this._attemptCharCodeUntilFn(isNotWhitespace); + this._requireCharCode($GT); + this._endToken(prefixAndName); + } + _consumeExpansionFormStart() { + this._beginToken(19 /* TokenType.EXPANSION_FORM_START */); + this._requireCharCode($LBRACE); + this._endToken([]); + this._expansionCaseStack.push(19 /* TokenType.EXPANSION_FORM_START */); + this._beginToken(7 /* TokenType.RAW_TEXT */); + const condition = this._readUntil($COMMA); + const normalizedCondition = this._processCarriageReturns(condition); + if (this._i18nNormalizeLineEndingsInICUs) { + // We explicitly want to normalize line endings for this text. + this._endToken([normalizedCondition]); + } else { + // We are not normalizing line endings. + const conditionToken = this._endToken([condition]); + if (normalizedCondition !== condition) { + this.nonNormalizedIcuExpressions.push(conditionToken); + } + } + this._requireCharCode($COMMA); + this._attemptCharCodeUntilFn(isNotWhitespace); + this._beginToken(7 /* TokenType.RAW_TEXT */); + const type = this._readUntil($COMMA); + this._endToken([type]); + this._requireCharCode($COMMA); + this._attemptCharCodeUntilFn(isNotWhitespace); + } + _consumeExpansionCaseStart() { + this._beginToken(20 /* TokenType.EXPANSION_CASE_VALUE */); + const value = this._readUntil($LBRACE).trim(); + this._endToken([value]); + this._attemptCharCodeUntilFn(isNotWhitespace); + this._beginToken(21 /* TokenType.EXPANSION_CASE_EXP_START */); + this._requireCharCode($LBRACE); + this._endToken([]); + this._attemptCharCodeUntilFn(isNotWhitespace); + this._expansionCaseStack.push(21 /* TokenType.EXPANSION_CASE_EXP_START */); + } + _consumeExpansionCaseEnd() { + this._beginToken(22 /* TokenType.EXPANSION_CASE_EXP_END */); + this._requireCharCode($RBRACE); + this._endToken([]); + this._attemptCharCodeUntilFn(isNotWhitespace); + this._expansionCaseStack.pop(); + } + _consumeExpansionFormEnd() { + this._beginToken(23 /* TokenType.EXPANSION_FORM_END */); + this._requireCharCode($RBRACE); + this._endToken([]); + this._expansionCaseStack.pop(); + } + /** + * Consume a string that may contain interpolation expressions. + * + * The first token consumed will be of `tokenType` and then there will be alternating + * `interpolationTokenType` and `tokenType` tokens until the `endPredicate()` returns true. + * + * If an interpolation token ends prematurely it will have no end marker in its `parts` array. + * + * @param textTokenType the kind of tokens to interleave around interpolation tokens. + * @param interpolationTokenType the kind of tokens that contain interpolation. + * @param endPredicate a function that should return true when we should stop consuming. + * @param endInterpolation a function that should return true if there is a premature end to an + * interpolation expression - i.e. before we get to the normal interpolation closing marker. + */ + _consumeWithInterpolation(textTokenType, interpolationTokenType, endPredicate, endInterpolation) { + this._beginToken(textTokenType); + const parts = []; + while (!endPredicate()) { + const current = this._cursor.clone(); + if (this._interpolationConfig && this._attemptStr(this._interpolationConfig.start)) { + this._endToken([this._processCarriageReturns(parts.join(''))], current); + parts.length = 0; + this._consumeInterpolation(interpolationTokenType, current, endInterpolation); + this._beginToken(textTokenType); + } else if (this._cursor.peek() === $AMPERSAND) { + this._endToken([this._processCarriageReturns(parts.join(''))]); + parts.length = 0; + this._consumeEntity(textTokenType); + this._beginToken(textTokenType); + } else { + parts.push(this._readChar()); + } + } + // It is possible that an interpolation was started but not ended inside this text token. + // Make sure that we reset the state of the lexer correctly. + this._inInterpolation = false; + this._endToken([this._processCarriageReturns(parts.join(''))]); + } + /** + * Consume a block of text that has been interpreted as an Angular interpolation. + * + * @param interpolationTokenType the type of the interpolation token to generate. + * @param interpolationStart a cursor that points to the start of this interpolation. + * @param prematureEndPredicate a function that should return true if the next characters indicate + * an end to the interpolation before its normal closing marker. + */ + _consumeInterpolation(interpolationTokenType, interpolationStart, prematureEndPredicate) { + const parts = []; + this._beginToken(interpolationTokenType, interpolationStart); + parts.push(this._interpolationConfig.start); + // Find the end of the interpolation, ignoring content inside quotes. + const expressionStart = this._cursor.clone(); + let inQuote = null; + let inComment = false; + while (this._cursor.peek() !== $EOF && (prematureEndPredicate === null || !prematureEndPredicate())) { + const current = this._cursor.clone(); + if (this._isTagStart()) { + // We are starting what looks like an HTML element in the middle of this interpolation. + // Reset the cursor to before the `<` character and end the interpolation token. + // (This is actually wrong but here for backward compatibility). + this._cursor = current; + parts.push(this._getProcessedChars(expressionStart, current)); + this._endToken(parts); + return; + } + if (inQuote === null) { + if (this._attemptStr(this._interpolationConfig.end)) { + // We are not in a string, and we hit the end interpolation marker + parts.push(this._getProcessedChars(expressionStart, current)); + parts.push(this._interpolationConfig.end); + this._endToken(parts); + return; + } else if (this._attemptStr('//')) { + // Once we are in a comment we ignore any quotes + inComment = true; + } + } + const char = this._cursor.peek(); + this._cursor.advance(); + if (char === $BACKSLASH) { + // Skip the next character because it was escaped. + this._cursor.advance(); + } else if (char === inQuote) { + // Exiting the current quoted string + inQuote = null; + } else if (!inComment && inQuote === null && isQuote(char)) { + // Entering a new quoted string + inQuote = char; + } + } + // We hit EOF without finding a closing interpolation marker + parts.push(this._getProcessedChars(expressionStart, this._cursor)); + this._endToken(parts); + } + _getProcessedChars(start, end) { + return this._processCarriageReturns(end.getChars(start)); + } + _isTextEnd() { + if (this._isTagStart() || this._cursor.peek() === $EOF) { + return true; + } + if (this._tokenizeIcu && !this._inInterpolation) { + if (this.isExpansionFormStart()) { + // start of an expansion form + return true; + } + if (this._cursor.peek() === $RBRACE && this._isInExpansionCase()) { + // end of and expansion case + return true; + } + } + if (this._tokenizeBlocks && !this._inInterpolation && !this._isInExpansion() && (this._cursor.peek() === $AT || this._cursor.peek() === $RBRACE)) { + return true; + } + return false; + } + /** + * Returns true if the current cursor is pointing to the start of a tag + * (opening/closing/comments/cdata/etc). + */ + _isTagStart() { + if (this._cursor.peek() === $LT) { + // We assume that `<` followed by whitespace is not the start of an HTML element. + const tmp = this._cursor.clone(); + tmp.advance(); + // If the next character is alphabetic, ! nor / then it is a tag start + const code = tmp.peek(); + if ($a <= code && code <= $z || $A <= code && code <= $Z || code === $SLASH || code === $BANG) { + return true; + } + } + return false; + } + _readUntil(char) { + const start = this._cursor.clone(); + this._attemptUntilChar(char); + return this._cursor.getChars(start); + } + _isInExpansion() { + return this._isInExpansionCase() || this._isInExpansionForm(); + } + _isInExpansionCase() { + return this._expansionCaseStack.length > 0 && this._expansionCaseStack[this._expansionCaseStack.length - 1] === 21 /* TokenType.EXPANSION_CASE_EXP_START */; + } + _isInExpansionForm() { + return this._expansionCaseStack.length > 0 && this._expansionCaseStack[this._expansionCaseStack.length - 1] === 19 /* TokenType.EXPANSION_FORM_START */; + } + isExpansionFormStart() { + if (this._cursor.peek() !== $LBRACE) { + return false; + } + if (this._interpolationConfig) { + const start = this._cursor.clone(); + const isInterpolation = this._attemptStr(this._interpolationConfig.start); + this._cursor = start; + return !isInterpolation; + } + return true; + } +} +function isNotWhitespace(code) { + return !isWhitespace(code) || code === $EOF; +} +function isNameEnd(code) { + return isWhitespace(code) || code === $GT || code === $LT || code === $SLASH || code === $SQ || code === $DQ || code === $EQ || code === $EOF; +} +function isPrefixEnd(code) { + return (code < $a || $z < code) && (code < $A || $Z < code) && (code < $0 || code > $9); +} +function isDigitEntityEnd(code) { + return code === $SEMICOLON || code === $EOF || !isAsciiHexDigit(code); +} +function isNamedEntityEnd(code) { + return code === $SEMICOLON || code === $EOF || !isAsciiLetter(code); +} +function isExpansionCaseStart(peek) { + return peek !== $RBRACE; +} +function compareCharCodeCaseInsensitive(code1, code2) { + return toUpperCaseCharCode(code1) === toUpperCaseCharCode(code2); +} +function toUpperCaseCharCode(code) { + return code >= $a && code <= $z ? code - $a + $A : code; +} +function isBlockNameChar(code) { + return isAsciiLetter(code) || isDigit(code) || code === $_; +} +function isBlockParameterChar(code) { + return code !== $SEMICOLON && isNotWhitespace(code); +} +function mergeTextTokens(srcTokens) { + const dstTokens = []; + let lastDstToken = undefined; + for (let i = 0; i < srcTokens.length; i++) { + const token = srcTokens[i]; + if (lastDstToken && lastDstToken.type === 5 /* TokenType.TEXT */ && token.type === 5 /* TokenType.TEXT */ || lastDstToken && lastDstToken.type === 16 /* TokenType.ATTR_VALUE_TEXT */ && token.type === 16 /* TokenType.ATTR_VALUE_TEXT */) { + lastDstToken.parts[0] += token.parts[0]; + lastDstToken.sourceSpan.end = token.sourceSpan.end; + } else { + lastDstToken = token; + dstTokens.push(lastDstToken); + } + } + return dstTokens; +} +class PlainCharacterCursor { + constructor(fileOrCursor, range) { + if (fileOrCursor instanceof PlainCharacterCursor) { + this.file = fileOrCursor.file; + this.input = fileOrCursor.input; + this.end = fileOrCursor.end; + const state = fileOrCursor.state; + // Note: avoid using `{...fileOrCursor.state}` here as that has a severe performance penalty. + // In ES5 bundles the object spread operator is translated into the `__assign` helper, which + // is not optimized by VMs as efficiently as a raw object literal. Since this constructor is + // called in tight loops, this difference matters. + this.state = { + peek: state.peek, + offset: state.offset, + line: state.line, + column: state.column + }; + } else { + if (!range) { + throw new Error('Programming error: the range argument must be provided with a file argument.'); + } + this.file = fileOrCursor; + this.input = fileOrCursor.content; + this.end = range.endPos; + this.state = { + peek: -1, + offset: range.startPos, + line: range.startLine, + column: range.startCol + }; + } + } + clone() { + return new PlainCharacterCursor(this); + } + peek() { + return this.state.peek; + } + charsLeft() { + return this.end - this.state.offset; + } + diff(other) { + return this.state.offset - other.state.offset; + } + advance() { + this.advanceState(this.state); + } + init() { + this.updatePeek(this.state); + } + getSpan(start, leadingTriviaCodePoints) { + start = start || this; + let fullStart = start; + if (leadingTriviaCodePoints) { + while (this.diff(start) > 0 && leadingTriviaCodePoints.indexOf(start.peek()) !== -1) { + if (fullStart === start) { + start = start.clone(); + } + start.advance(); + } + } + const startLocation = this.locationFromCursor(start); + const endLocation = this.locationFromCursor(this); + const fullStartLocation = fullStart !== start ? this.locationFromCursor(fullStart) : startLocation; + return new ParseSourceSpan(startLocation, endLocation, fullStartLocation); + } + getChars(start) { + return this.input.substring(start.state.offset, this.state.offset); + } + charAt(pos) { + return this.input.charCodeAt(pos); + } + advanceState(state) { + if (state.offset >= this.end) { + this.state = state; + throw new CursorError('Unexpected character "EOF"', this); + } + const currentChar = this.charAt(state.offset); + if (currentChar === $LF) { + state.line++; + state.column = 0; + } else if (!isNewLine(currentChar)) { + state.column++; + } + state.offset++; + this.updatePeek(state); + } + updatePeek(state) { + state.peek = state.offset >= this.end ? $EOF : this.charAt(state.offset); + } + locationFromCursor(cursor) { + return new ParseLocation(cursor.file, cursor.state.offset, cursor.state.line, cursor.state.column); + } +} +class EscapedCharacterCursor extends PlainCharacterCursor { + constructor(fileOrCursor, range) { + if (fileOrCursor instanceof EscapedCharacterCursor) { + super(fileOrCursor); + this.internalState = { + ...fileOrCursor.internalState + }; + } else { + super(fileOrCursor, range); + this.internalState = this.state; + } + } + advance() { + this.state = this.internalState; + super.advance(); + this.processEscapeSequence(); + } + init() { + super.init(); + this.processEscapeSequence(); + } + clone() { + return new EscapedCharacterCursor(this); + } + getChars(start) { + const cursor = start.clone(); + let chars = ''; + while (cursor.internalState.offset < this.internalState.offset) { + chars += String.fromCodePoint(cursor.peek()); + cursor.advance(); + } + return chars; + } + /** + * Process the escape sequence that starts at the current position in the text. + * + * This method is called to ensure that `peek` has the unescaped value of escape sequences. + */ + processEscapeSequence() { + const peek = () => this.internalState.peek; + if (peek() === $BACKSLASH) { + // We have hit an escape sequence so we need the internal state to become independent + // of the external state. + this.internalState = { + ...this.state + }; + // Move past the backslash + this.advanceState(this.internalState); + // First check for standard control char sequences + if (peek() === $n) { + this.state.peek = $LF; + } else if (peek() === $r) { + this.state.peek = $CR; + } else if (peek() === $v) { + this.state.peek = $VTAB; + } else if (peek() === $t) { + this.state.peek = $TAB; + } else if (peek() === $b) { + this.state.peek = $BSPACE; + } else if (peek() === $f) { + this.state.peek = $FF; + } + // Now consider more complex sequences + else if (peek() === $u) { + // Unicode code-point sequence + this.advanceState(this.internalState); // advance past the `u` char + if (peek() === $LBRACE) { + // Variable length Unicode, e.g. `\x{123}` + this.advanceState(this.internalState); // advance past the `{` char + // Advance past the variable number of hex digits until we hit a `}` char + const digitStart = this.clone(); + let length = 0; + while (peek() !== $RBRACE) { + this.advanceState(this.internalState); + length++; + } + this.state.peek = this.decodeHexDigits(digitStart, length); + } else { + // Fixed length Unicode, e.g. `\u1234` + const digitStart = this.clone(); + this.advanceState(this.internalState); + this.advanceState(this.internalState); + this.advanceState(this.internalState); + this.state.peek = this.decodeHexDigits(digitStart, 4); + } + } else if (peek() === $x) { + // Hex char code, e.g. `\x2F` + this.advanceState(this.internalState); // advance past the `x` char + const digitStart = this.clone(); + this.advanceState(this.internalState); + this.state.peek = this.decodeHexDigits(digitStart, 2); + } else if (isOctalDigit(peek())) { + // Octal char code, e.g. `\012`, + let octal = ''; + let length = 0; + let previous = this.clone(); + while (isOctalDigit(peek()) && length < 3) { + previous = this.clone(); + octal += String.fromCodePoint(peek()); + this.advanceState(this.internalState); + length++; + } + this.state.peek = parseInt(octal, 8); + // Backup one char + this.internalState = previous.internalState; + } else if (isNewLine(this.internalState.peek)) { + // Line continuation `\` followed by a new line + this.advanceState(this.internalState); // advance over the newline + this.state = this.internalState; + } else { + // If none of the `if` blocks were executed then we just have an escaped normal character. + // In that case we just, effectively, skip the backslash from the character. + this.state.peek = this.internalState.peek; + } + } + } + decodeHexDigits(start, length) { + const hex = this.input.slice(start.internalState.offset, start.internalState.offset + length); + const charCode = parseInt(hex, 16); + if (!isNaN(charCode)) { + return charCode; + } else { + start.state = start.internalState; + throw new CursorError('Invalid hexadecimal escape sequence', start); + } + } +} +class CursorError { + constructor(msg, cursor) { + this.msg = msg; + this.cursor = cursor; + } +} +class TreeError extends ParseError { + static create(elementName, span, msg) { + return new TreeError(elementName, span, msg); + } + constructor(elementName, span, msg) { + super(span, msg); + this.elementName = elementName; + } +} +class ParseTreeResult { + constructor(rootNodes, errors) { + this.rootNodes = rootNodes; + this.errors = errors; + } +} +class Parser$1 { + constructor(getTagDefinition) { + this.getTagDefinition = getTagDefinition; + } + parse(source, url, options) { + const tokenizeResult = tokenize(source, url, this.getTagDefinition, options); + const parser = new _TreeBuilder(tokenizeResult.tokens, this.getTagDefinition); + parser.build(); + return new ParseTreeResult(parser.rootNodes, tokenizeResult.errors.concat(parser.errors)); + } +} +class _TreeBuilder { + constructor(tokens, getTagDefinition) { + this.tokens = tokens; + this.getTagDefinition = getTagDefinition; + this._index = -1; + this._containerStack = []; + this.rootNodes = []; + this.errors = []; + this._advance(); + } + build() { + while (this._peek.type !== 33 /* TokenType.EOF */) { + if (this._peek.type === 0 /* TokenType.TAG_OPEN_START */ || this._peek.type === 4 /* TokenType.INCOMPLETE_TAG_OPEN */) { + this._consumeStartTag(this._advance()); + } else if (this._peek.type === 3 /* TokenType.TAG_CLOSE */) { + this._consumeEndTag(this._advance()); + } else if (this._peek.type === 12 /* TokenType.CDATA_START */) { + this._closeVoidElement(); + this._consumeCdata(this._advance()); + } else if (this._peek.type === 10 /* TokenType.COMMENT_START */) { + this._closeVoidElement(); + this._consumeComment(this._advance()); + } else if (this._peek.type === 5 /* TokenType.TEXT */ || this._peek.type === 7 /* TokenType.RAW_TEXT */ || this._peek.type === 6 /* TokenType.ESCAPABLE_RAW_TEXT */) { + this._closeVoidElement(); + this._consumeText(this._advance()); + } else if (this._peek.type === 19 /* TokenType.EXPANSION_FORM_START */) { + this._consumeExpansion(this._advance()); + } else if (this._peek.type === 24 /* TokenType.BLOCK_OPEN_START */) { + this._closeVoidElement(); + this._consumeBlockOpen(this._advance()); + } else if (this._peek.type === 26 /* TokenType.BLOCK_CLOSE */) { + this._closeVoidElement(); + this._consumeBlockClose(this._advance()); + } else if (this._peek.type === 28 /* TokenType.INCOMPLETE_BLOCK_OPEN */) { + this._closeVoidElement(); + this._consumeIncompleteBlock(this._advance()); + } else if (this._peek.type === 29 /* TokenType.LET_START */) { + this._closeVoidElement(); + this._consumeLet(this._advance()); + } else if (this._peek.type === 32 /* TokenType.INCOMPLETE_LET */) { + this._closeVoidElement(); + this._consumeIncompleteLet(this._advance()); + } else { + // Skip all other tokens... + this._advance(); + } + } + for (const leftoverContainer of this._containerStack) { + // Unlike HTML elements, blocks aren't closed implicitly by the end of the file. + if (leftoverContainer instanceof Block) { + this.errors.push(TreeError.create(leftoverContainer.name, leftoverContainer.sourceSpan, `Unclosed block "${leftoverContainer.name}"`)); + } + } + } + _advance() { + const prev = this._peek; + if (this._index < this.tokens.length - 1) { + // Note: there is always an EOF token at the end + this._index++; + } + this._peek = this.tokens[this._index]; + return prev; + } + _advanceIf(type) { + if (this._peek.type === type) { + return this._advance(); + } + return null; + } + _consumeCdata(_startToken) { + this._consumeText(this._advance()); + this._advanceIf(13 /* TokenType.CDATA_END */); + } + _consumeComment(token) { + const text = this._advanceIf(7 /* TokenType.RAW_TEXT */); + const endToken = this._advanceIf(11 /* TokenType.COMMENT_END */); + const value = text != null ? text.parts[0].trim() : null; + const sourceSpan = endToken == null ? token.sourceSpan : new ParseSourceSpan(token.sourceSpan.start, endToken.sourceSpan.end, token.sourceSpan.fullStart); + this._addToParent(new Comment(value, sourceSpan)); + } + _consumeExpansion(token) { + const switchValue = this._advance(); + const type = this._advance(); + const cases = []; + // read = + while (this._peek.type === 20 /* TokenType.EXPANSION_CASE_VALUE */) { + const expCase = this._parseExpansionCase(); + if (!expCase) return; // error + cases.push(expCase); + } + // read the final } + if (this._peek.type !== 23 /* TokenType.EXPANSION_FORM_END */) { + this.errors.push(TreeError.create(null, this._peek.sourceSpan, `Invalid ICU message. Missing '}'.`)); + return; + } + const sourceSpan = new ParseSourceSpan(token.sourceSpan.start, this._peek.sourceSpan.end, token.sourceSpan.fullStart); + this._addToParent(new Expansion(switchValue.parts[0], type.parts[0], cases, sourceSpan, switchValue.sourceSpan)); + this._advance(); + } + _parseExpansionCase() { + const value = this._advance(); + // read { + if (this._peek.type !== 21 /* TokenType.EXPANSION_CASE_EXP_START */) { + this.errors.push(TreeError.create(null, this._peek.sourceSpan, `Invalid ICU message. Missing '{'.`)); + return null; + } + // read until } + const start = this._advance(); + const exp = this._collectExpansionExpTokens(start); + if (!exp) return null; + const end = this._advance(); + exp.push({ + type: 33 /* TokenType.EOF */, + parts: [], + sourceSpan: end.sourceSpan + }); + // parse everything in between { and } + const expansionCaseParser = new _TreeBuilder(exp, this.getTagDefinition); + expansionCaseParser.build(); + if (expansionCaseParser.errors.length > 0) { + this.errors = this.errors.concat(expansionCaseParser.errors); + return null; + } + const sourceSpan = new ParseSourceSpan(value.sourceSpan.start, end.sourceSpan.end, value.sourceSpan.fullStart); + const expSourceSpan = new ParseSourceSpan(start.sourceSpan.start, end.sourceSpan.end, start.sourceSpan.fullStart); + return new ExpansionCase(value.parts[0], expansionCaseParser.rootNodes, sourceSpan, value.sourceSpan, expSourceSpan); + } + _collectExpansionExpTokens(start) { + const exp = []; + const expansionFormStack = [21 /* TokenType.EXPANSION_CASE_EXP_START */]; + while (true) { + if (this._peek.type === 19 /* TokenType.EXPANSION_FORM_START */ || this._peek.type === 21 /* TokenType.EXPANSION_CASE_EXP_START */) { + expansionFormStack.push(this._peek.type); + } + if (this._peek.type === 22 /* TokenType.EXPANSION_CASE_EXP_END */) { + if (lastOnStack(expansionFormStack, 21 /* TokenType.EXPANSION_CASE_EXP_START */)) { + expansionFormStack.pop(); + if (expansionFormStack.length === 0) return exp; + } else { + this.errors.push(TreeError.create(null, start.sourceSpan, `Invalid ICU message. Missing '}'.`)); + return null; + } + } + if (this._peek.type === 23 /* TokenType.EXPANSION_FORM_END */) { + if (lastOnStack(expansionFormStack, 19 /* TokenType.EXPANSION_FORM_START */)) { + expansionFormStack.pop(); + } else { + this.errors.push(TreeError.create(null, start.sourceSpan, `Invalid ICU message. Missing '}'.`)); + return null; + } + } + if (this._peek.type === 33 /* TokenType.EOF */) { + this.errors.push(TreeError.create(null, start.sourceSpan, `Invalid ICU message. Missing '}'.`)); + return null; + } + exp.push(this._advance()); + } + } + _consumeText(token) { + const tokens = [token]; + const startSpan = token.sourceSpan; + let text = token.parts[0]; + if (text.length > 0 && text[0] === '\n') { + const parent = this._getContainer(); + if (parent != null && parent.children.length === 0 && this.getTagDefinition(parent.name).ignoreFirstLf) { + text = text.substring(1); + tokens[0] = { + type: token.type, + sourceSpan: token.sourceSpan, + parts: [text] + }; + } + } + while (this._peek.type === 8 /* TokenType.INTERPOLATION */ || this._peek.type === 5 /* TokenType.TEXT */ || this._peek.type === 9 /* TokenType.ENCODED_ENTITY */) { + token = this._advance(); + tokens.push(token); + if (token.type === 8 /* TokenType.INTERPOLATION */) { + // For backward compatibility we decode HTML entities that appear in interpolation + // expressions. This is arguably a bug, but it could be a considerable breaking change to + // fix it. It should be addressed in a larger project to refactor the entire parser/lexer + // chain after View Engine has been removed. + text += token.parts.join('').replace(/&([^;]+);/g, decodeEntity); + } else if (token.type === 9 /* TokenType.ENCODED_ENTITY */) { + text += token.parts[0]; + } else { + text += token.parts.join(''); + } + } + if (text.length > 0) { + const endSpan = token.sourceSpan; + this._addToParent(new Text(text, new ParseSourceSpan(startSpan.start, endSpan.end, startSpan.fullStart, startSpan.details), tokens)); + } + } + _closeVoidElement() { + const el = this._getContainer(); + if (el instanceof Element && this.getTagDefinition(el.name).isVoid) { + this._containerStack.pop(); + } + } + _consumeStartTag(startTagToken) { + const [prefix, name] = startTagToken.parts; + const attrs = []; + while (this._peek.type === 14 /* TokenType.ATTR_NAME */) { + attrs.push(this._consumeAttr(this._advance())); + } + const fullName = this._getElementFullName(prefix, name, this._getClosestParentElement()); + let selfClosing = false; + // Note: There could have been a tokenizer error + // so that we don't get a token for the end tag... + if (this._peek.type === 2 /* TokenType.TAG_OPEN_END_VOID */) { + this._advance(); + selfClosing = true; + const tagDef = this.getTagDefinition(fullName); + if (!(tagDef.canSelfClose || getNsPrefix(fullName) !== null || tagDef.isVoid)) { + this.errors.push(TreeError.create(fullName, startTagToken.sourceSpan, `Only void, custom and foreign elements can be self closed "${startTagToken.parts[1]}"`)); + } + } else if (this._peek.type === 1 /* TokenType.TAG_OPEN_END */) { + this._advance(); + selfClosing = false; + } + const end = this._peek.sourceSpan.fullStart; + const span = new ParseSourceSpan(startTagToken.sourceSpan.start, end, startTagToken.sourceSpan.fullStart); + // Create a separate `startSpan` because `span` will be modified when there is an `end` span. + const startSpan = new ParseSourceSpan(startTagToken.sourceSpan.start, end, startTagToken.sourceSpan.fullStart); + const el = new Element(fullName, attrs, [], span, startSpan, undefined); + const parentEl = this._getContainer(); + this._pushContainer(el, parentEl instanceof Element && this.getTagDefinition(parentEl.name).isClosedByChild(el.name)); + if (selfClosing) { + // Elements that are self-closed have their `endSourceSpan` set to the full span, as the + // element start tag also represents the end tag. + this._popContainer(fullName, Element, span); + } else if (startTagToken.type === 4 /* TokenType.INCOMPLETE_TAG_OPEN */) { + // We already know the opening tag is not complete, so it is unlikely it has a corresponding + // close tag. Let's optimistically parse it as a full element and emit an error. + this._popContainer(fullName, Element, null); + this.errors.push(TreeError.create(fullName, span, `Opening tag "${fullName}" not terminated.`)); + } + } + _pushContainer(node, isClosedByChild) { + if (isClosedByChild) { + this._containerStack.pop(); + } + this._addToParent(node); + this._containerStack.push(node); + } + _consumeEndTag(endTagToken) { + const fullName = this._getElementFullName(endTagToken.parts[0], endTagToken.parts[1], this._getClosestParentElement()); + if (this.getTagDefinition(fullName).isVoid) { + this.errors.push(TreeError.create(fullName, endTagToken.sourceSpan, `Void elements do not have end tags "${endTagToken.parts[1]}"`)); + } else if (!this._popContainer(fullName, Element, endTagToken.sourceSpan)) { + const errMsg = `Unexpected closing tag "${fullName}". It may happen when the tag has already been closed by another tag. For more info see https://www.w3.org/TR/html5/syntax.html#closing-elements-that-have-implied-end-tags`; + this.errors.push(TreeError.create(fullName, endTagToken.sourceSpan, errMsg)); + } + } + /** + * Closes the nearest element with the tag name `fullName` in the parse tree. + * `endSourceSpan` is the span of the closing tag, or null if the element does + * not have a closing tag (for example, this happens when an incomplete + * opening tag is recovered). + */ + _popContainer(expectedName, expectedType, endSourceSpan) { + let unexpectedCloseTagDetected = false; + for (let stackIndex = this._containerStack.length - 1; stackIndex >= 0; stackIndex--) { + const node = this._containerStack[stackIndex]; + if ((node.name === expectedName || expectedName === null) && node instanceof expectedType) { + // Record the parse span with the element that is being closed. Any elements that are + // removed from the element stack at this point are closed implicitly, so they won't get + // an end source span (as there is no explicit closing element). + node.endSourceSpan = endSourceSpan; + node.sourceSpan.end = endSourceSpan !== null ? endSourceSpan.end : node.sourceSpan.end; + this._containerStack.splice(stackIndex, this._containerStack.length - stackIndex); + return !unexpectedCloseTagDetected; + } + // Blocks and most elements are not self closing. + if (node instanceof Block || node instanceof Element && !this.getTagDefinition(node.name).closedByParent) { + // Note that we encountered an unexpected close tag but continue processing the element + // stack so we can assign an `endSourceSpan` if there is a corresponding start tag for this + // end tag in the stack. + unexpectedCloseTagDetected = true; + } + } + return false; + } + _consumeAttr(attrName) { + const fullName = mergeNsAndName(attrName.parts[0], attrName.parts[1]); + let attrEnd = attrName.sourceSpan.end; + // Consume any quote + if (this._peek.type === 15 /* TokenType.ATTR_QUOTE */) { + this._advance(); + } + // Consume the attribute value + let value = ''; + const valueTokens = []; + let valueStartSpan = undefined; + let valueEnd = undefined; + // NOTE: We need to use a new variable `nextTokenType` here to hide the actual type of + // `_peek.type` from TS. Otherwise TS will narrow the type of `_peek.type` preventing it from + // being able to consider `ATTR_VALUE_INTERPOLATION` as an option. This is because TS is not + // able to see that `_advance()` will actually mutate `_peek`. + const nextTokenType = this._peek.type; + if (nextTokenType === 16 /* TokenType.ATTR_VALUE_TEXT */) { + valueStartSpan = this._peek.sourceSpan; + valueEnd = this._peek.sourceSpan.end; + while (this._peek.type === 16 /* TokenType.ATTR_VALUE_TEXT */ || this._peek.type === 17 /* TokenType.ATTR_VALUE_INTERPOLATION */ || this._peek.type === 9 /* TokenType.ENCODED_ENTITY */) { + const valueToken = this._advance(); + valueTokens.push(valueToken); + if (valueToken.type === 17 /* TokenType.ATTR_VALUE_INTERPOLATION */) { + // For backward compatibility we decode HTML entities that appear in interpolation + // expressions. This is arguably a bug, but it could be a considerable breaking change to + // fix it. It should be addressed in a larger project to refactor the entire parser/lexer + // chain after View Engine has been removed. + value += valueToken.parts.join('').replace(/&([^;]+);/g, decodeEntity); + } else if (valueToken.type === 9 /* TokenType.ENCODED_ENTITY */) { + value += valueToken.parts[0]; + } else { + value += valueToken.parts.join(''); + } + valueEnd = attrEnd = valueToken.sourceSpan.end; + } + } + // Consume any quote + if (this._peek.type === 15 /* TokenType.ATTR_QUOTE */) { + const quoteToken = this._advance(); + attrEnd = quoteToken.sourceSpan.end; + } + const valueSpan = valueStartSpan && valueEnd && new ParseSourceSpan(valueStartSpan.start, valueEnd, valueStartSpan.fullStart); + return new Attribute(fullName, value, new ParseSourceSpan(attrName.sourceSpan.start, attrEnd, attrName.sourceSpan.fullStart), attrName.sourceSpan, valueSpan, valueTokens.length > 0 ? valueTokens : undefined, undefined); + } + _consumeBlockOpen(token) { + const parameters = []; + while (this._peek.type === 27 /* TokenType.BLOCK_PARAMETER */) { + const paramToken = this._advance(); + parameters.push(new BlockParameter(paramToken.parts[0], paramToken.sourceSpan)); + } + if (this._peek.type === 25 /* TokenType.BLOCK_OPEN_END */) { + this._advance(); + } + const end = this._peek.sourceSpan.fullStart; + const span = new ParseSourceSpan(token.sourceSpan.start, end, token.sourceSpan.fullStart); + // Create a separate `startSpan` because `span` will be modified when there is an `end` span. + const startSpan = new ParseSourceSpan(token.sourceSpan.start, end, token.sourceSpan.fullStart); + const block = new Block(token.parts[0], parameters, [], span, token.sourceSpan, startSpan); + this._pushContainer(block, false); + } + _consumeBlockClose(token) { + if (!this._popContainer(null, Block, token.sourceSpan)) { + this.errors.push(TreeError.create(null, token.sourceSpan, `Unexpected closing block. The block may have been closed earlier. ` + `If you meant to write the } character, you should use the "}" ` + `HTML entity instead.`)); + } + } + _consumeIncompleteBlock(token) { + const parameters = []; + while (this._peek.type === 27 /* TokenType.BLOCK_PARAMETER */) { + const paramToken = this._advance(); + parameters.push(new BlockParameter(paramToken.parts[0], paramToken.sourceSpan)); + } + const end = this._peek.sourceSpan.fullStart; + const span = new ParseSourceSpan(token.sourceSpan.start, end, token.sourceSpan.fullStart); + // Create a separate `startSpan` because `span` will be modified when there is an `end` span. + const startSpan = new ParseSourceSpan(token.sourceSpan.start, end, token.sourceSpan.fullStart); + const block = new Block(token.parts[0], parameters, [], span, token.sourceSpan, startSpan); + this._pushContainer(block, false); + // Incomplete blocks don't have children so we close them immediately and report an error. + this._popContainer(null, Block, null); + this.errors.push(TreeError.create(token.parts[0], span, `Incomplete block "${token.parts[0]}". If you meant to write the @ character, ` + `you should use the "@" HTML entity instead.`)); + } + _consumeLet(startToken) { + const name = startToken.parts[0]; + let valueToken; + let endToken; + if (this._peek.type !== 30 /* TokenType.LET_VALUE */) { + this.errors.push(TreeError.create(startToken.parts[0], startToken.sourceSpan, `Invalid @let declaration "${name}". Declaration must have a value.`)); + return; + } else { + valueToken = this._advance(); + } + // Type cast is necessary here since TS narrowed the type of `peek` above. + if (this._peek.type !== 31 /* TokenType.LET_END */) { + this.errors.push(TreeError.create(startToken.parts[0], startToken.sourceSpan, `Unterminated @let declaration "${name}". Declaration must be terminated with a semicolon.`)); + return; + } else { + endToken = this._advance(); + } + const end = endToken.sourceSpan.fullStart; + const span = new ParseSourceSpan(startToken.sourceSpan.start, end, startToken.sourceSpan.fullStart); + // The start token usually captures the `@let`. Construct a name span by + // offsetting the start by the length of any text before the name. + const startOffset = startToken.sourceSpan.toString().lastIndexOf(name); + const nameStart = startToken.sourceSpan.start.moveBy(startOffset); + const nameSpan = new ParseSourceSpan(nameStart, startToken.sourceSpan.end); + const node = new LetDeclaration(name, valueToken.parts[0], span, nameSpan, valueToken.sourceSpan); + this._addToParent(node); + } + _consumeIncompleteLet(token) { + // Incomplete `@let` declaration may end up with an empty name. + const name = token.parts[0] ?? ''; + const nameString = name ? ` "${name}"` : ''; + // If there's at least a name, we can salvage an AST node that can be used for completions. + if (name.length > 0) { + const startOffset = token.sourceSpan.toString().lastIndexOf(name); + const nameStart = token.sourceSpan.start.moveBy(startOffset); + const nameSpan = new ParseSourceSpan(nameStart, token.sourceSpan.end); + const valueSpan = new ParseSourceSpan(token.sourceSpan.start, token.sourceSpan.start.moveBy(0)); + const node = new LetDeclaration(name, '', token.sourceSpan, nameSpan, valueSpan); + this._addToParent(node); + } + this.errors.push(TreeError.create(token.parts[0], token.sourceSpan, `Incomplete @let declaration${nameString}. ` + `@let declarations must be written as \`@let = ;\``)); + } + _getContainer() { + return this._containerStack.length > 0 ? this._containerStack[this._containerStack.length - 1] : null; + } + _getClosestParentElement() { + for (let i = this._containerStack.length - 1; i > -1; i--) { + if (this._containerStack[i] instanceof Element) { + return this._containerStack[i]; + } + } + return null; + } + _addToParent(node) { + const parent = this._getContainer(); + if (parent === null) { + this.rootNodes.push(node); + } else { + parent.children.push(node); + } + } + _getElementFullName(prefix, localName, parentElement) { + if (prefix === '') { + prefix = this.getTagDefinition(localName).implicitNamespacePrefix || ''; + if (prefix === '' && parentElement != null) { + const parentTagName = splitNsName(parentElement.name)[1]; + const parentTagDefinition = this.getTagDefinition(parentTagName); + if (!parentTagDefinition.preventNamespaceInheritance) { + prefix = getNsPrefix(parentElement.name); + } + } + } + return mergeNsAndName(prefix, localName); + } +} +function lastOnStack(stack, element) { + return stack.length > 0 && stack[stack.length - 1] === element; +} +/** + * Decode the `entity` string, which we believe is the contents of an HTML entity. + * + * If the string is not actually a valid/known entity then just return the original `match` string. + */ +function decodeEntity(match, entity) { + if (NAMED_ENTITIES[entity] !== undefined) { + return NAMED_ENTITIES[entity] || match; + } + if (/^#x[a-f0-9]+$/i.test(entity)) { + return String.fromCodePoint(parseInt(entity.slice(2), 16)); + } + if (/^#\d+$/.test(entity)) { + return String.fromCodePoint(parseInt(entity.slice(1), 10)); + } + return match; +} +const PRESERVE_WS_ATTR_NAME = 'ngPreserveWhitespaces'; +const SKIP_WS_TRIM_TAGS = new Set(['pre', 'template', 'textarea', 'script', 'style']); +// Equivalent to \s with \u00a0 (non-breaking space) excluded. +// Based on https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RegExp +const WS_CHARS = ' \f\n\r\t\v\u1680\u180e\u2000-\u200a\u2028\u2029\u202f\u205f\u3000\ufeff'; +const NO_WS_REGEXP = new RegExp(`[^${WS_CHARS}]`); +const WS_REPLACE_REGEXP = new RegExp(`[${WS_CHARS}]{2,}`, 'g'); +function hasPreserveWhitespacesAttr(attrs) { + return attrs.some(attr => attr.name === PRESERVE_WS_ATTR_NAME); +} +/** + * &ngsp; is a placeholder for non-removable space + * &ngsp; is converted to the 0xE500 PUA (Private Use Areas) unicode character + * and later on replaced by a space. + */ +function replaceNgsp(value) { + // lexer is replacing the &ngsp; pseudo-entity with NGSP_UNICODE + return value.replace(new RegExp(NGSP_UNICODE, 'g'), ' '); +} +/** + * This visitor can walk HTML parse tree and remove / trim text nodes using the following rules: + * - consider spaces, tabs and new lines as whitespace characters; + * - drop text nodes consisting of whitespace characters only; + * - for all other text nodes replace consecutive whitespace characters with one space; + * - convert &ngsp; pseudo-entity to a single space; + * + * Removal and trimming of whitespaces have positive performance impact (less code to generate + * while compiling templates, faster view creation). At the same time it can be "destructive" + * in some cases (whitespaces can influence layout). Because of the potential of breaking layout + * this visitor is not activated by default in Angular 5 and people need to explicitly opt-in for + * whitespace removal. The default option for whitespace removal will be revisited in Angular 6 + * and might be changed to "on" by default. + * + * If `originalNodeMap` is provided, the transformed nodes will be mapped back to their original + * inputs. Any output nodes not in the map were not transformed. This supports correlating and + * porting information between the trimmed nodes and original nodes (such as `i18n` properties) + * such that trimming whitespace does not does not drop required information from the node. + */ +class WhitespaceVisitor { + constructor(preserveSignificantWhitespace, originalNodeMap, requireContext = true) { + this.preserveSignificantWhitespace = preserveSignificantWhitespace; + this.originalNodeMap = originalNodeMap; + this.requireContext = requireContext; + // How many ICU expansions which are currently being visited. ICUs can be nested, so this + // tracks the current depth of nesting. If this depth is greater than 0, then this visitor is + // currently processing content inside an ICU expansion. + this.icuExpansionDepth = 0; + } + visitElement(element, context) { + if (SKIP_WS_TRIM_TAGS.has(element.name) || hasPreserveWhitespacesAttr(element.attrs)) { + // don't descent into elements where we need to preserve whitespaces + // but still visit all attributes to eliminate one used as a market to preserve WS + const newElement = new Element(element.name, visitAllWithSiblings(this, element.attrs), element.children, element.sourceSpan, element.startSourceSpan, element.endSourceSpan, element.i18n); + this.originalNodeMap?.set(newElement, element); + return newElement; + } + const newElement = new Element(element.name, element.attrs, visitAllWithSiblings(this, element.children), element.sourceSpan, element.startSourceSpan, element.endSourceSpan, element.i18n); + this.originalNodeMap?.set(newElement, element); + return newElement; + } + visitAttribute(attribute, context) { + return attribute.name !== PRESERVE_WS_ATTR_NAME ? attribute : null; + } + visitText(text, context) { + const isNotBlank = text.value.match(NO_WS_REGEXP); + const hasExpansionSibling = context && (context.prev instanceof Expansion || context.next instanceof Expansion); + // Do not trim whitespace within ICU expansions when preserving significant whitespace. + // Historically, ICU whitespace was never trimmed and this is really a bug. However fixing it + // would change message IDs which we can't easily do. Instead we only trim ICU whitespace within + // ICU expansions when not preserving significant whitespace, which is the new behavior where it + // most matters. + const inIcuExpansion = this.icuExpansionDepth > 0; + if (inIcuExpansion && this.preserveSignificantWhitespace) return text; + if (isNotBlank || hasExpansionSibling) { + // Process the whitespace in the tokens of this Text node + const tokens = text.tokens.map(token => token.type === 5 /* TokenType.TEXT */ ? createWhitespaceProcessedTextToken(token) : token); + // Fully trim message when significant whitespace is not preserved. + if (!this.preserveSignificantWhitespace && tokens.length > 0) { + // The first token should only call `.trimStart()` and the last token + // should only call `.trimEnd()`, but there might be only one token which + // needs to call both. + const firstToken = tokens[0]; + tokens.splice(0, 1, trimLeadingWhitespace(firstToken, context)); + const lastToken = tokens[tokens.length - 1]; // Could be the same as the first token. + tokens.splice(tokens.length - 1, 1, trimTrailingWhitespace(lastToken, context)); + } + // Process the whitespace of the value of this Text node. Also trim the leading/trailing + // whitespace when we don't need to preserve significant whitespace. + const processed = processWhitespace(text.value); + const value = this.preserveSignificantWhitespace ? processed : trimLeadingAndTrailingWhitespace(processed, context); + const result = new Text(value, text.sourceSpan, tokens, text.i18n); + this.originalNodeMap?.set(result, text); + return result; + } + return null; + } + visitComment(comment, context) { + return comment; + } + visitExpansion(expansion, context) { + this.icuExpansionDepth++; + let newExpansion; + try { + newExpansion = new Expansion(expansion.switchValue, expansion.type, visitAllWithSiblings(this, expansion.cases), expansion.sourceSpan, expansion.switchValueSourceSpan, expansion.i18n); + } finally { + this.icuExpansionDepth--; + } + this.originalNodeMap?.set(newExpansion, expansion); + return newExpansion; + } + visitExpansionCase(expansionCase, context) { + const newExpansionCase = new ExpansionCase(expansionCase.value, visitAllWithSiblings(this, expansionCase.expression), expansionCase.sourceSpan, expansionCase.valueSourceSpan, expansionCase.expSourceSpan); + this.originalNodeMap?.set(newExpansionCase, expansionCase); + return newExpansionCase; + } + visitBlock(block, context) { + const newBlock = new Block(block.name, block.parameters, visitAllWithSiblings(this, block.children), block.sourceSpan, block.nameSpan, block.startSourceSpan, block.endSourceSpan); + this.originalNodeMap?.set(newBlock, block); + return newBlock; + } + visitBlockParameter(parameter, context) { + return parameter; + } + visitLetDeclaration(decl, context) { + return decl; + } + visit(_node, context) { + // `visitAllWithSiblings` provides context necessary for ICU messages to be handled correctly. + // Prefer that over calling `html.visitAll` directly on this visitor. + if (this.requireContext && !context) { + throw new Error(`WhitespaceVisitor requires context. Visit via \`visitAllWithSiblings\` to get this context.`); + } + return false; + } +} +function trimLeadingWhitespace(token, context) { + if (token.type !== 5 /* TokenType.TEXT */) return token; + const isFirstTokenInTag = !context?.prev; + if (!isFirstTokenInTag) return token; + return transformTextToken(token, text => text.trimStart()); +} +function trimTrailingWhitespace(token, context) { + if (token.type !== 5 /* TokenType.TEXT */) return token; + const isLastTokenInTag = !context?.next; + if (!isLastTokenInTag) return token; + return transformTextToken(token, text => text.trimEnd()); +} +function trimLeadingAndTrailingWhitespace(text, context) { + const isFirstTokenInTag = !context?.prev; + const isLastTokenInTag = !context?.next; + const maybeTrimmedStart = isFirstTokenInTag ? text.trimStart() : text; + const maybeTrimmed = isLastTokenInTag ? maybeTrimmedStart.trimEnd() : maybeTrimmedStart; + return maybeTrimmed; +} +function createWhitespaceProcessedTextToken({ + type, + parts, + sourceSpan +}) { + return { + type, + parts: [processWhitespace(parts[0])], + sourceSpan + }; +} +function transformTextToken({ + type, + parts, + sourceSpan +}, transform) { + // `TextToken` only ever has one part as defined in its type, so we just transform the first element. + return { + type, + parts: [transform(parts[0])], + sourceSpan + }; +} +function processWhitespace(text) { + return replaceNgsp(text).replace(WS_REPLACE_REGEXP, ' '); +} +function removeWhitespaces(htmlAstWithErrors, preserveSignificantWhitespace) { + return new ParseTreeResult(visitAllWithSiblings(new WhitespaceVisitor(preserveSignificantWhitespace), htmlAstWithErrors.rootNodes), htmlAstWithErrors.errors); +} +function visitAllWithSiblings(visitor, nodes) { + const result = []; + nodes.forEach((ast, i) => { + const context = { + prev: nodes[i - 1], + next: nodes[i + 1] + }; + const astResult = ast.visit(visitor, context); + if (astResult) { + result.push(astResult); + } + }); + return result; +} +var TokenType; +(function (TokenType) { + TokenType[TokenType["Character"] = 0] = "Character"; + TokenType[TokenType["Identifier"] = 1] = "Identifier"; + TokenType[TokenType["PrivateIdentifier"] = 2] = "PrivateIdentifier"; + TokenType[TokenType["Keyword"] = 3] = "Keyword"; + TokenType[TokenType["String"] = 4] = "String"; + TokenType[TokenType["Operator"] = 5] = "Operator"; + TokenType[TokenType["Number"] = 6] = "Number"; + TokenType[TokenType["Error"] = 7] = "Error"; +})(TokenType || (TokenType = {})); +const KEYWORDS = ['var', 'let', 'as', 'null', 'undefined', 'true', 'false', 'if', 'else', 'this']; +class Lexer { + tokenize(text) { + const scanner = new _Scanner(text); + const tokens = []; + let token = scanner.scanToken(); + while (token != null) { + tokens.push(token); + token = scanner.scanToken(); + } + return tokens; + } +} +class Token { + constructor(index, end, type, numValue, strValue) { + this.index = index; + this.end = end; + this.type = type; + this.numValue = numValue; + this.strValue = strValue; + } + isCharacter(code) { + return this.type == TokenType.Character && this.numValue == code; + } + isNumber() { + return this.type == TokenType.Number; + } + isString() { + return this.type == TokenType.String; + } + isOperator(operator) { + return this.type == TokenType.Operator && this.strValue == operator; + } + isIdentifier() { + return this.type == TokenType.Identifier; + } + isPrivateIdentifier() { + return this.type == TokenType.PrivateIdentifier; + } + isKeyword() { + return this.type == TokenType.Keyword; + } + isKeywordLet() { + return this.type == TokenType.Keyword && this.strValue == 'let'; + } + isKeywordAs() { + return this.type == TokenType.Keyword && this.strValue == 'as'; + } + isKeywordNull() { + return this.type == TokenType.Keyword && this.strValue == 'null'; + } + isKeywordUndefined() { + return this.type == TokenType.Keyword && this.strValue == 'undefined'; + } + isKeywordTrue() { + return this.type == TokenType.Keyword && this.strValue == 'true'; + } + isKeywordFalse() { + return this.type == TokenType.Keyword && this.strValue == 'false'; + } + isKeywordThis() { + return this.type == TokenType.Keyword && this.strValue == 'this'; + } + isError() { + return this.type == TokenType.Error; + } + toNumber() { + return this.type == TokenType.Number ? this.numValue : -1; + } + toString() { + switch (this.type) { + case TokenType.Character: + case TokenType.Identifier: + case TokenType.Keyword: + case TokenType.Operator: + case TokenType.PrivateIdentifier: + case TokenType.String: + case TokenType.Error: + return this.strValue; + case TokenType.Number: + return this.numValue.toString(); + default: + return null; + } + } +} +function newCharacterToken(index, end, code) { + return new Token(index, end, TokenType.Character, code, String.fromCharCode(code)); +} +function newIdentifierToken(index, end, text) { + return new Token(index, end, TokenType.Identifier, 0, text); +} +function newPrivateIdentifierToken(index, end, text) { + return new Token(index, end, TokenType.PrivateIdentifier, 0, text); +} +function newKeywordToken(index, end, text) { + return new Token(index, end, TokenType.Keyword, 0, text); +} +function newOperatorToken(index, end, text) { + return new Token(index, end, TokenType.Operator, 0, text); +} +function newStringToken(index, end, text) { + return new Token(index, end, TokenType.String, 0, text); +} +function newNumberToken(index, end, n) { + return new Token(index, end, TokenType.Number, n, ''); +} +function newErrorToken(index, end, message) { + return new Token(index, end, TokenType.Error, 0, message); +} +const EOF = new Token(-1, -1, TokenType.Character, 0, ''); +class _Scanner { + constructor(input) { + this.input = input; + this.peek = 0; + this.index = -1; + this.length = input.length; + this.advance(); + } + advance() { + this.peek = ++this.index >= this.length ? $EOF : this.input.charCodeAt(this.index); + } + scanToken() { + const input = this.input, + length = this.length; + let peek = this.peek, + index = this.index; + // Skip whitespace. + while (peek <= $SPACE) { + if (++index >= length) { + peek = $EOF; + break; + } else { + peek = input.charCodeAt(index); + } + } + this.peek = peek; + this.index = index; + if (index >= length) { + return null; + } + // Handle identifiers and numbers. + if (isIdentifierStart(peek)) return this.scanIdentifier(); + if (isDigit(peek)) return this.scanNumber(index); + const start = index; + switch (peek) { + case $PERIOD: + this.advance(); + return isDigit(this.peek) ? this.scanNumber(start) : newCharacterToken(start, this.index, $PERIOD); + case $LPAREN: + case $RPAREN: + case $LBRACE: + case $RBRACE: + case $LBRACKET: + case $RBRACKET: + case $COMMA: + case $COLON: + case $SEMICOLON: + return this.scanCharacter(start, peek); + case $SQ: + case $DQ: + return this.scanString(); + case $HASH: + return this.scanPrivateIdentifier(); + case $PLUS: + case $MINUS: + case $STAR: + case $SLASH: + case $PERCENT: + case $CARET: + return this.scanOperator(start, String.fromCharCode(peek)); + case $QUESTION: + return this.scanQuestion(start); + case $LT: + case $GT: + return this.scanComplexOperator(start, String.fromCharCode(peek), $EQ, '='); + case $BANG: + case $EQ: + return this.scanComplexOperator(start, String.fromCharCode(peek), $EQ, '=', $EQ, '='); + case $AMPERSAND: + return this.scanComplexOperator(start, '&', $AMPERSAND, '&'); + case $BAR: + return this.scanComplexOperator(start, '|', $BAR, '|'); + case $NBSP: + while (isWhitespace(this.peek)) this.advance(); + return this.scanToken(); + } + this.advance(); + return this.error(`Unexpected character [${String.fromCharCode(peek)}]`, 0); + } + scanCharacter(start, code) { + this.advance(); + return newCharacterToken(start, this.index, code); + } + scanOperator(start, str) { + this.advance(); + return newOperatorToken(start, this.index, str); + } + /** + * Tokenize a 2/3 char long operator + * + * @param start start index in the expression + * @param one first symbol (always part of the operator) + * @param twoCode code point for the second symbol + * @param two second symbol (part of the operator when the second code point matches) + * @param threeCode code point for the third symbol + * @param three third symbol (part of the operator when provided and matches source expression) + */ + scanComplexOperator(start, one, twoCode, two, threeCode, three) { + this.advance(); + let str = one; + if (this.peek == twoCode) { + this.advance(); + str += two; + } + if (threeCode != null && this.peek == threeCode) { + this.advance(); + str += three; + } + return newOperatorToken(start, this.index, str); + } + scanIdentifier() { + const start = this.index; + this.advance(); + while (isIdentifierPart(this.peek)) this.advance(); + const str = this.input.substring(start, this.index); + return KEYWORDS.indexOf(str) > -1 ? newKeywordToken(start, this.index, str) : newIdentifierToken(start, this.index, str); + } + /** Scans an ECMAScript private identifier. */ + scanPrivateIdentifier() { + const start = this.index; + this.advance(); + if (!isIdentifierStart(this.peek)) { + return this.error('Invalid character [#]', -1); + } + while (isIdentifierPart(this.peek)) this.advance(); + const identifierName = this.input.substring(start, this.index); + return newPrivateIdentifierToken(start, this.index, identifierName); + } + scanNumber(start) { + let simple = this.index === start; + let hasSeparators = false; + this.advance(); // Skip initial digit. + while (true) { + if (isDigit(this.peek)) { + // Do nothing. + } else if (this.peek === $_) { + // Separators are only valid when they're surrounded by digits. E.g. `1_0_1` is + // valid while `_101` and `101_` are not. The separator can't be next to the decimal + // point or another separator either. Note that it's unlikely that we'll hit a case where + // the underscore is at the start, because that's a valid identifier and it will be picked + // up earlier in the parsing. We validate for it anyway just in case. + if (!isDigit(this.input.charCodeAt(this.index - 1)) || !isDigit(this.input.charCodeAt(this.index + 1))) { + return this.error('Invalid numeric separator', 0); + } + hasSeparators = true; + } else if (this.peek === $PERIOD) { + simple = false; + } else if (isExponentStart(this.peek)) { + this.advance(); + if (isExponentSign(this.peek)) this.advance(); + if (!isDigit(this.peek)) return this.error('Invalid exponent', -1); + simple = false; + } else { + break; + } + this.advance(); + } + let str = this.input.substring(start, this.index); + if (hasSeparators) { + str = str.replace(/_/g, ''); + } + const value = simple ? parseIntAutoRadix(str) : parseFloat(str); + return newNumberToken(start, this.index, value); + } + scanString() { + const start = this.index; + const quote = this.peek; + this.advance(); // Skip initial quote. + let buffer = ''; + let marker = this.index; + const input = this.input; + while (this.peek != quote) { + if (this.peek == $BACKSLASH) { + buffer += input.substring(marker, this.index); + let unescapedCode; + this.advance(); // mutates this.peek + // @ts-expect-error see microsoft/TypeScript#9998 + if (this.peek == $u) { + // 4 character hex code for unicode character. + const hex = input.substring(this.index + 1, this.index + 5); + if (/^[0-9a-f]+$/i.test(hex)) { + unescapedCode = parseInt(hex, 16); + } else { + return this.error(`Invalid unicode escape [\\u${hex}]`, 0); + } + for (let i = 0; i < 5; i++) { + this.advance(); + } + } else { + unescapedCode = unescape(this.peek); + this.advance(); + } + buffer += String.fromCharCode(unescapedCode); + marker = this.index; + } else if (this.peek == $EOF) { + return this.error('Unterminated quote', 0); + } else { + this.advance(); + } + } + const last = input.substring(marker, this.index); + this.advance(); // Skip terminating quote. + return newStringToken(start, this.index, buffer + last); + } + scanQuestion(start) { + this.advance(); + let str = '?'; + // Either `a ?? b` or 'a?.b'. + if (this.peek === $QUESTION || this.peek === $PERIOD) { + str += this.peek === $PERIOD ? '.' : '?'; + this.advance(); + } + return newOperatorToken(start, this.index, str); + } + error(message, offset) { + const position = this.index + offset; + return newErrorToken(position, this.index, `Lexer Error: ${message} at column ${position} in expression [${this.input}]`); + } +} +function isIdentifierStart(code) { + return $a <= code && code <= $z || $A <= code && code <= $Z || code == $_ || code == $$; +} +function isIdentifier(input) { + if (input.length == 0) return false; + const scanner = new _Scanner(input); + if (!isIdentifierStart(scanner.peek)) return false; + scanner.advance(); + while (scanner.peek !== $EOF) { + if (!isIdentifierPart(scanner.peek)) return false; + scanner.advance(); + } + return true; +} +function isIdentifierPart(code) { + return isAsciiLetter(code) || isDigit(code) || code == $_ || code == $$; +} +function isExponentStart(code) { + return code == $e || code == $E; +} +function isExponentSign(code) { + return code == $MINUS || code == $PLUS; +} +function unescape(code) { + switch (code) { + case $n: + return $LF; + case $f: + return $FF; + case $r: + return $CR; + case $t: + return $TAB; + case $v: + return $VTAB; + default: + return code; + } +} +function parseIntAutoRadix(text) { + const result = parseInt(text); + if (isNaN(result)) { + throw new Error('Invalid integer literal when parsing ' + text); + } + return result; +} +class SplitInterpolation { + constructor(strings, expressions, offsets) { + this.strings = strings; + this.expressions = expressions; + this.offsets = offsets; + } +} +class TemplateBindingParseResult { + constructor(templateBindings, warnings, errors) { + this.templateBindings = templateBindings; + this.warnings = warnings; + this.errors = errors; + } +} +class Parser { + constructor(_lexer) { + this._lexer = _lexer; + this.errors = []; + } + parseAction(input, location, absoluteOffset, interpolationConfig = DEFAULT_INTERPOLATION_CONFIG) { + this._checkNoInterpolation(input, location, interpolationConfig); + const sourceToLex = this._stripComments(input); + const tokens = this._lexer.tokenize(sourceToLex); + const ast = new _ParseAST(input, location, absoluteOffset, tokens, 1 /* ParseFlags.Action */, this.errors, 0).parseChain(); + return new ASTWithSource(ast, input, location, absoluteOffset, this.errors); + } + parseBinding(input, location, absoluteOffset, interpolationConfig = DEFAULT_INTERPOLATION_CONFIG) { + const ast = this._parseBindingAst(input, location, absoluteOffset, interpolationConfig); + return new ASTWithSource(ast, input, location, absoluteOffset, this.errors); + } + checkSimpleExpression(ast) { + const checker = new SimpleExpressionChecker(); + ast.visit(checker); + return checker.errors; + } + // Host bindings parsed here + parseSimpleBinding(input, location, absoluteOffset, interpolationConfig = DEFAULT_INTERPOLATION_CONFIG) { + const ast = this._parseBindingAst(input, location, absoluteOffset, interpolationConfig); + const errors = this.checkSimpleExpression(ast); + if (errors.length > 0) { + this._reportError(`Host binding expression cannot contain ${errors.join(' ')}`, input, location); + } + return new ASTWithSource(ast, input, location, absoluteOffset, this.errors); + } + _reportError(message, input, errLocation, ctxLocation) { + this.errors.push(new ParserError(message, input, errLocation, ctxLocation)); + } + _parseBindingAst(input, location, absoluteOffset, interpolationConfig) { + this._checkNoInterpolation(input, location, interpolationConfig); + const sourceToLex = this._stripComments(input); + const tokens = this._lexer.tokenize(sourceToLex); + return new _ParseAST(input, location, absoluteOffset, tokens, 0 /* ParseFlags.None */, this.errors, 0).parseChain(); + } + /** + * Parse microsyntax template expression and return a list of bindings or + * parsing errors in case the given expression is invalid. + * + * For example, + * ``` + *
+ * ^ ^ absoluteValueOffset for `templateValue` + * absoluteKeyOffset for `templateKey` + * ``` + * contains three bindings: + * 1. ngFor -> null + * 2. item -> NgForOfContext.$implicit + * 3. ngForOf -> items + * + * This is apparent from the de-sugared template: + * ``` + * + * ``` + * + * @param templateKey name of directive, without the * prefix. For example: ngIf, ngFor + * @param templateValue RHS of the microsyntax attribute + * @param templateUrl template filename if it's external, component filename if it's inline + * @param absoluteKeyOffset start of the `templateKey` + * @param absoluteValueOffset start of the `templateValue` + */ + parseTemplateBindings(templateKey, templateValue, templateUrl, absoluteKeyOffset, absoluteValueOffset) { + const tokens = this._lexer.tokenize(templateValue); + const parser = new _ParseAST(templateValue, templateUrl, absoluteValueOffset, tokens, 0 /* ParseFlags.None */, this.errors, 0 /* relative offset */); + return parser.parseTemplateBindings({ + source: templateKey, + span: new AbsoluteSourceSpan(absoluteKeyOffset, absoluteKeyOffset + templateKey.length) + }); + } + parseInterpolation(input, location, absoluteOffset, interpolatedTokens, interpolationConfig = DEFAULT_INTERPOLATION_CONFIG) { + const { + strings, + expressions, + offsets + } = this.splitInterpolation(input, location, interpolatedTokens, interpolationConfig); + if (expressions.length === 0) return null; + const expressionNodes = []; + for (let i = 0; i < expressions.length; ++i) { + const expressionText = expressions[i].text; + const sourceToLex = this._stripComments(expressionText); + const tokens = this._lexer.tokenize(sourceToLex); + const ast = new _ParseAST(input, location, absoluteOffset, tokens, 0 /* ParseFlags.None */, this.errors, offsets[i]).parseChain(); + expressionNodes.push(ast); + } + return this.createInterpolationAst(strings.map(s => s.text), expressionNodes, input, location, absoluteOffset); + } + /** + * Similar to `parseInterpolation`, but treats the provided string as a single expression + * element that would normally appear within the interpolation prefix and suffix (`{{` and `}}`). + * This is used for parsing the switch expression in ICUs. + */ + parseInterpolationExpression(expression, location, absoluteOffset) { + const sourceToLex = this._stripComments(expression); + const tokens = this._lexer.tokenize(sourceToLex); + const ast = new _ParseAST(expression, location, absoluteOffset, tokens, 0 /* ParseFlags.None */, this.errors, 0).parseChain(); + const strings = ['', '']; // The prefix and suffix strings are both empty + return this.createInterpolationAst(strings, [ast], expression, location, absoluteOffset); + } + createInterpolationAst(strings, expressions, input, location, absoluteOffset) { + const span = new ParseSpan(0, input.length); + const interpolation = new Interpolation$1(span, span.toAbsolute(absoluteOffset), strings, expressions); + return new ASTWithSource(interpolation, input, location, absoluteOffset, this.errors); + } + /** + * Splits a string of text into "raw" text segments and expressions present in interpolations in + * the string. + * Returns `null` if there are no interpolations, otherwise a + * `SplitInterpolation` with splits that look like + * ... + */ + splitInterpolation(input, location, interpolatedTokens, interpolationConfig = DEFAULT_INTERPOLATION_CONFIG) { + const strings = []; + const expressions = []; + const offsets = []; + const inputToTemplateIndexMap = interpolatedTokens ? getIndexMapForOriginalTemplate(interpolatedTokens) : null; + let i = 0; + let atInterpolation = false; + let extendLastString = false; + let { + start: interpStart, + end: interpEnd + } = interpolationConfig; + while (i < input.length) { + if (!atInterpolation) { + // parse until starting {{ + const start = i; + i = input.indexOf(interpStart, i); + if (i === -1) { + i = input.length; + } + const text = input.substring(start, i); + strings.push({ + text, + start, + end: i + }); + atInterpolation = true; + } else { + // parse from starting {{ to ending }} while ignoring content inside quotes. + const fullStart = i; + const exprStart = fullStart + interpStart.length; + const exprEnd = this._getInterpolationEndIndex(input, interpEnd, exprStart); + if (exprEnd === -1) { + // Could not find the end of the interpolation; do not parse an expression. + // Instead we should extend the content on the last raw string. + atInterpolation = false; + extendLastString = true; + break; + } + const fullEnd = exprEnd + interpEnd.length; + const text = input.substring(exprStart, exprEnd); + if (text.trim().length === 0) { + this._reportError('Blank expressions are not allowed in interpolated strings', input, `at column ${i} in`, location); + } + expressions.push({ + text, + start: fullStart, + end: fullEnd + }); + const startInOriginalTemplate = inputToTemplateIndexMap?.get(fullStart) ?? fullStart; + const offset = startInOriginalTemplate + interpStart.length; + offsets.push(offset); + i = fullEnd; + atInterpolation = false; + } + } + if (!atInterpolation) { + // If we are now at a text section, add the remaining content as a raw string. + if (extendLastString) { + const piece = strings[strings.length - 1]; + piece.text += input.substring(i); + piece.end = input.length; + } else { + strings.push({ + text: input.substring(i), + start: i, + end: input.length + }); + } + } + return new SplitInterpolation(strings, expressions, offsets); + } + wrapLiteralPrimitive(input, location, absoluteOffset) { + const span = new ParseSpan(0, input == null ? 0 : input.length); + return new ASTWithSource(new LiteralPrimitive(span, span.toAbsolute(absoluteOffset), input), input, location, absoluteOffset, this.errors); + } + _stripComments(input) { + const i = this._commentStart(input); + return i != null ? input.substring(0, i) : input; + } + _commentStart(input) { + let outerQuote = null; + for (let i = 0; i < input.length - 1; i++) { + const char = input.charCodeAt(i); + const nextChar = input.charCodeAt(i + 1); + if (char === $SLASH && nextChar == $SLASH && outerQuote == null) return i; + if (outerQuote === char) { + outerQuote = null; + } else if (outerQuote == null && isQuote(char)) { + outerQuote = char; + } + } + return null; + } + _checkNoInterpolation(input, location, { + start, + end + }) { + let startIndex = -1; + let endIndex = -1; + for (const charIndex of this._forEachUnquotedChar(input, 0)) { + if (startIndex === -1) { + if (input.startsWith(start)) { + startIndex = charIndex; + } + } else { + endIndex = this._getInterpolationEndIndex(input, end, charIndex); + if (endIndex > -1) { + break; + } + } + } + if (startIndex > -1 && endIndex > -1) { + this._reportError(`Got interpolation (${start}${end}) where expression was expected`, input, `at column ${startIndex} in`, location); + } + } + /** + * Finds the index of the end of an interpolation expression + * while ignoring comments and quoted content. + */ + _getInterpolationEndIndex(input, expressionEnd, start) { + for (const charIndex of this._forEachUnquotedChar(input, start)) { + if (input.startsWith(expressionEnd, charIndex)) { + return charIndex; + } + // Nothing else in the expression matters after we've + // hit a comment so look directly for the end token. + if (input.startsWith('//', charIndex)) { + return input.indexOf(expressionEnd, charIndex); + } + } + return -1; + } + /** + * Generator used to iterate over the character indexes of a string that are outside of quotes. + * @param input String to loop through. + * @param start Index within the string at which to start. + */ + *_forEachUnquotedChar(input, start) { + let currentQuote = null; + let escapeCount = 0; + for (let i = start; i < input.length; i++) { + const char = input[i]; + // Skip the characters inside quotes. Note that we only care about the outer-most + // quotes matching up and we need to account for escape characters. + if (isQuote(input.charCodeAt(i)) && (currentQuote === null || currentQuote === char) && escapeCount % 2 === 0) { + currentQuote = currentQuote === null ? char : null; + } else if (currentQuote === null) { + yield i; + } + escapeCount = char === '\\' ? escapeCount + 1 : 0; + } + } +} +/** Describes a stateful context an expression parser is in. */ +var ParseContextFlags; +(function (ParseContextFlags) { + ParseContextFlags[ParseContextFlags["None"] = 0] = "None"; + /** + * A Writable context is one in which a value may be written to an lvalue. + * For example, after we see a property access, we may expect a write to the + * property via the "=" operator. + * prop + * ^ possible "=" after + */ + ParseContextFlags[ParseContextFlags["Writable"] = 1] = "Writable"; +})(ParseContextFlags || (ParseContextFlags = {})); +class _ParseAST { + constructor(input, location, absoluteOffset, tokens, parseFlags, errors, offset) { + this.input = input; + this.location = location; + this.absoluteOffset = absoluteOffset; + this.tokens = tokens; + this.parseFlags = parseFlags; + this.errors = errors; + this.offset = offset; + this.rparensExpected = 0; + this.rbracketsExpected = 0; + this.rbracesExpected = 0; + this.context = ParseContextFlags.None; + // Cache of expression start and input indeces to the absolute source span they map to, used to + // prevent creating superfluous source spans in `sourceSpan`. + // A serial of the expression start and input index is used for mapping because both are stateful + // and may change for subsequent expressions visited by the parser. + this.sourceSpanCache = new Map(); + this.index = 0; + } + peek(offset) { + const i = this.index + offset; + return i < this.tokens.length ? this.tokens[i] : EOF; + } + get next() { + return this.peek(0); + } + /** Whether all the parser input has been processed. */ + get atEOF() { + return this.index >= this.tokens.length; + } + /** + * Index of the next token to be processed, or the end of the last token if all have been + * processed. + */ + get inputIndex() { + return this.atEOF ? this.currentEndIndex : this.next.index + this.offset; + } + /** + * End index of the last processed token, or the start of the first token if none have been + * processed. + */ + get currentEndIndex() { + if (this.index > 0) { + const curToken = this.peek(-1); + return curToken.end + this.offset; + } + // No tokens have been processed yet; return the next token's start or the length of the input + // if there is no token. + if (this.tokens.length === 0) { + return this.input.length + this.offset; + } + return this.next.index + this.offset; + } + /** + * Returns the absolute offset of the start of the current token. + */ + get currentAbsoluteOffset() { + return this.absoluteOffset + this.inputIndex; + } + /** + * Retrieve a `ParseSpan` from `start` to the current position (or to `artificialEndIndex` if + * provided). + * + * @param start Position from which the `ParseSpan` will start. + * @param artificialEndIndex Optional ending index to be used if provided (and if greater than the + * natural ending index) + */ + span(start, artificialEndIndex) { + let endIndex = this.currentEndIndex; + if (artificialEndIndex !== undefined && artificialEndIndex > this.currentEndIndex) { + endIndex = artificialEndIndex; + } + // In some unusual parsing scenarios (like when certain tokens are missing and an `EmptyExpr` is + // being created), the current token may already be advanced beyond the `currentEndIndex`. This + // appears to be a deep-seated parser bug. + // + // As a workaround for now, swap the start and end indices to ensure a valid `ParseSpan`. + // TODO(alxhub): fix the bug upstream in the parser state, and remove this workaround. + if (start > endIndex) { + const tmp = endIndex; + endIndex = start; + start = tmp; + } + return new ParseSpan(start, endIndex); + } + sourceSpan(start, artificialEndIndex) { + const serial = `${start}@${this.inputIndex}:${artificialEndIndex}`; + if (!this.sourceSpanCache.has(serial)) { + this.sourceSpanCache.set(serial, this.span(start, artificialEndIndex).toAbsolute(this.absoluteOffset)); + } + return this.sourceSpanCache.get(serial); + } + advance() { + this.index++; + } + /** + * Executes a callback in the provided context. + */ + withContext(context, cb) { + this.context |= context; + const ret = cb(); + this.context ^= context; + return ret; + } + consumeOptionalCharacter(code) { + if (this.next.isCharacter(code)) { + this.advance(); + return true; + } else { + return false; + } + } + peekKeywordLet() { + return this.next.isKeywordLet(); + } + peekKeywordAs() { + return this.next.isKeywordAs(); + } + /** + * Consumes an expected character, otherwise emits an error about the missing expected character + * and skips over the token stream until reaching a recoverable point. + * + * See `this.error` and `this.skip` for more details. + */ + expectCharacter(code) { + if (this.consumeOptionalCharacter(code)) return; + this.error(`Missing expected ${String.fromCharCode(code)}`); + } + consumeOptionalOperator(op) { + if (this.next.isOperator(op)) { + this.advance(); + return true; + } else { + return false; + } + } + expectOperator(operator) { + if (this.consumeOptionalOperator(operator)) return; + this.error(`Missing expected operator ${operator}`); + } + prettyPrintToken(tok) { + return tok === EOF ? 'end of input' : `token ${tok}`; + } + expectIdentifierOrKeyword() { + const n = this.next; + if (!n.isIdentifier() && !n.isKeyword()) { + if (n.isPrivateIdentifier()) { + this._reportErrorForPrivateIdentifier(n, 'expected identifier or keyword'); + } else { + this.error(`Unexpected ${this.prettyPrintToken(n)}, expected identifier or keyword`); + } + return null; + } + this.advance(); + return n.toString(); + } + expectIdentifierOrKeywordOrString() { + const n = this.next; + if (!n.isIdentifier() && !n.isKeyword() && !n.isString()) { + if (n.isPrivateIdentifier()) { + this._reportErrorForPrivateIdentifier(n, 'expected identifier, keyword or string'); + } else { + this.error(`Unexpected ${this.prettyPrintToken(n)}, expected identifier, keyword, or string`); + } + return ''; + } + this.advance(); + return n.toString(); + } + parseChain() { + const exprs = []; + const start = this.inputIndex; + while (this.index < this.tokens.length) { + const expr = this.parsePipe(); + exprs.push(expr); + if (this.consumeOptionalCharacter($SEMICOLON)) { + if (!(this.parseFlags & 1 /* ParseFlags.Action */)) { + this.error('Binding expression cannot contain chained expression'); + } + while (this.consumeOptionalCharacter($SEMICOLON)) {} // read all semicolons + } else if (this.index < this.tokens.length) { + const errorIndex = this.index; + this.error(`Unexpected token '${this.next}'`); + // The `error` call above will skip ahead to the next recovery point in an attempt to + // recover part of the expression, but that might be the token we started from which will + // lead to an infinite loop. If that's the case, break the loop assuming that we can't + // parse further. + if (this.index === errorIndex) { + break; + } + } + } + if (exprs.length === 0) { + // We have no expressions so create an empty expression that spans the entire input length + const artificialStart = this.offset; + const artificialEnd = this.offset + this.input.length; + return new EmptyExpr$1(this.span(artificialStart, artificialEnd), this.sourceSpan(artificialStart, artificialEnd)); + } + if (exprs.length == 1) return exprs[0]; + return new Chain(this.span(start), this.sourceSpan(start), exprs); + } + parsePipe() { + const start = this.inputIndex; + let result = this.parseExpression(); + if (this.consumeOptionalOperator('|')) { + if (this.parseFlags & 1 /* ParseFlags.Action */) { + this.error(`Cannot have a pipe in an action expression`); + } + do { + const nameStart = this.inputIndex; + let nameId = this.expectIdentifierOrKeyword(); + let nameSpan; + let fullSpanEnd = undefined; + if (nameId !== null) { + nameSpan = this.sourceSpan(nameStart); + } else { + // No valid identifier was found, so we'll assume an empty pipe name (''). + nameId = ''; + // However, there may have been whitespace present between the pipe character and the next + // token in the sequence (or the end of input). We want to track this whitespace so that + // the `BindingPipe` we produce covers not just the pipe character, but any trailing + // whitespace beyond it. Another way of thinking about this is that the zero-length name + // is assumed to be at the end of any whitespace beyond the pipe character. + // + // Therefore, we push the end of the `ParseSpan` for this pipe all the way up to the + // beginning of the next token, or until the end of input if the next token is EOF. + fullSpanEnd = this.next.index !== -1 ? this.next.index : this.input.length + this.offset; + // The `nameSpan` for an empty pipe name is zero-length at the end of any whitespace + // beyond the pipe character. + nameSpan = new ParseSpan(fullSpanEnd, fullSpanEnd).toAbsolute(this.absoluteOffset); + } + const args = []; + while (this.consumeOptionalCharacter($COLON)) { + args.push(this.parseExpression()); + // If there are additional expressions beyond the name, then the artificial end for the + // name is no longer relevant. + } + result = new BindingPipe(this.span(start), this.sourceSpan(start, fullSpanEnd), result, nameId, args, nameSpan); + } while (this.consumeOptionalOperator('|')); + } + return result; + } + parseExpression() { + return this.parseConditional(); + } + parseConditional() { + const start = this.inputIndex; + const result = this.parseLogicalOr(); + if (this.consumeOptionalOperator('?')) { + const yes = this.parsePipe(); + let no; + if (!this.consumeOptionalCharacter($COLON)) { + const end = this.inputIndex; + const expression = this.input.substring(start, end); + this.error(`Conditional expression ${expression} requires all 3 expressions`); + no = new EmptyExpr$1(this.span(start), this.sourceSpan(start)); + } else { + no = this.parsePipe(); + } + return new Conditional(this.span(start), this.sourceSpan(start), result, yes, no); + } else { + return result; + } + } + parseLogicalOr() { + // '||' + const start = this.inputIndex; + let result = this.parseLogicalAnd(); + while (this.consumeOptionalOperator('||')) { + const right = this.parseLogicalAnd(); + result = new Binary(this.span(start), this.sourceSpan(start), '||', result, right); + } + return result; + } + parseLogicalAnd() { + // '&&' + const start = this.inputIndex; + let result = this.parseNullishCoalescing(); + while (this.consumeOptionalOperator('&&')) { + const right = this.parseNullishCoalescing(); + result = new Binary(this.span(start), this.sourceSpan(start), '&&', result, right); + } + return result; + } + parseNullishCoalescing() { + // '??' + const start = this.inputIndex; + let result = this.parseEquality(); + while (this.consumeOptionalOperator('??')) { + const right = this.parseEquality(); + result = new Binary(this.span(start), this.sourceSpan(start), '??', result, right); + } + return result; + } + parseEquality() { + // '==','!=','===','!==' + const start = this.inputIndex; + let result = this.parseRelational(); + while (this.next.type == TokenType.Operator) { + const operator = this.next.strValue; + switch (operator) { + case '==': + case '===': + case '!=': + case '!==': + this.advance(); + const right = this.parseRelational(); + result = new Binary(this.span(start), this.sourceSpan(start), operator, result, right); + continue; + } + break; + } + return result; + } + parseRelational() { + // '<', '>', '<=', '>=' + const start = this.inputIndex; + let result = this.parseAdditive(); + while (this.next.type == TokenType.Operator) { + const operator = this.next.strValue; + switch (operator) { + case '<': + case '>': + case '<=': + case '>=': + this.advance(); + const right = this.parseAdditive(); + result = new Binary(this.span(start), this.sourceSpan(start), operator, result, right); + continue; + } + break; + } + return result; + } + parseAdditive() { + // '+', '-' + const start = this.inputIndex; + let result = this.parseMultiplicative(); + while (this.next.type == TokenType.Operator) { + const operator = this.next.strValue; + switch (operator) { + case '+': + case '-': + this.advance(); + let right = this.parseMultiplicative(); + result = new Binary(this.span(start), this.sourceSpan(start), operator, result, right); + continue; + } + break; + } + return result; + } + parseMultiplicative() { + // '*', '%', '/' + const start = this.inputIndex; + let result = this.parsePrefix(); + while (this.next.type == TokenType.Operator) { + const operator = this.next.strValue; + switch (operator) { + case '*': + case '%': + case '/': + this.advance(); + let right = this.parsePrefix(); + result = new Binary(this.span(start), this.sourceSpan(start), operator, result, right); + continue; + } + break; + } + return result; + } + parsePrefix() { + if (this.next.type == TokenType.Operator) { + const start = this.inputIndex; + const operator = this.next.strValue; + let result; + switch (operator) { + case '+': + this.advance(); + result = this.parsePrefix(); + return Unary.createPlus(this.span(start), this.sourceSpan(start), result); + case '-': + this.advance(); + result = this.parsePrefix(); + return Unary.createMinus(this.span(start), this.sourceSpan(start), result); + case '!': + this.advance(); + result = this.parsePrefix(); + return new PrefixNot(this.span(start), this.sourceSpan(start), result); + } + } + return this.parseCallChain(); + } + parseCallChain() { + const start = this.inputIndex; + let result = this.parsePrimary(); + while (true) { + if (this.consumeOptionalCharacter($PERIOD)) { + result = this.parseAccessMember(result, start, false); + } else if (this.consumeOptionalOperator('?.')) { + if (this.consumeOptionalCharacter($LPAREN)) { + result = this.parseCall(result, start, true); + } else { + result = this.consumeOptionalCharacter($LBRACKET) ? this.parseKeyedReadOrWrite(result, start, true) : this.parseAccessMember(result, start, true); + } + } else if (this.consumeOptionalCharacter($LBRACKET)) { + result = this.parseKeyedReadOrWrite(result, start, false); + } else if (this.consumeOptionalCharacter($LPAREN)) { + result = this.parseCall(result, start, false); + } else if (this.consumeOptionalOperator('!')) { + result = new NonNullAssert(this.span(start), this.sourceSpan(start), result); + } else { + return result; + } + } + } + parsePrimary() { + const start = this.inputIndex; + if (this.consumeOptionalCharacter($LPAREN)) { + this.rparensExpected++; + const result = this.parsePipe(); + this.rparensExpected--; + this.expectCharacter($RPAREN); + return result; + } else if (this.next.isKeywordNull()) { + this.advance(); + return new LiteralPrimitive(this.span(start), this.sourceSpan(start), null); + } else if (this.next.isKeywordUndefined()) { + this.advance(); + return new LiteralPrimitive(this.span(start), this.sourceSpan(start), void 0); + } else if (this.next.isKeywordTrue()) { + this.advance(); + return new LiteralPrimitive(this.span(start), this.sourceSpan(start), true); + } else if (this.next.isKeywordFalse()) { + this.advance(); + return new LiteralPrimitive(this.span(start), this.sourceSpan(start), false); + } else if (this.next.isKeywordThis()) { + this.advance(); + return new ThisReceiver(this.span(start), this.sourceSpan(start)); + } else if (this.consumeOptionalCharacter($LBRACKET)) { + this.rbracketsExpected++; + const elements = this.parseExpressionList($RBRACKET); + this.rbracketsExpected--; + this.expectCharacter($RBRACKET); + return new LiteralArray(this.span(start), this.sourceSpan(start), elements); + } else if (this.next.isCharacter($LBRACE)) { + return this.parseLiteralMap(); + } else if (this.next.isIdentifier()) { + return this.parseAccessMember(new ImplicitReceiver(this.span(start), this.sourceSpan(start)), start, false); + } else if (this.next.isNumber()) { + const value = this.next.toNumber(); + this.advance(); + return new LiteralPrimitive(this.span(start), this.sourceSpan(start), value); + } else if (this.next.isString()) { + const literalValue = this.next.toString(); + this.advance(); + return new LiteralPrimitive(this.span(start), this.sourceSpan(start), literalValue); + } else if (this.next.isPrivateIdentifier()) { + this._reportErrorForPrivateIdentifier(this.next, null); + return new EmptyExpr$1(this.span(start), this.sourceSpan(start)); + } else if (this.index >= this.tokens.length) { + this.error(`Unexpected end of expression: ${this.input}`); + return new EmptyExpr$1(this.span(start), this.sourceSpan(start)); + } else { + this.error(`Unexpected token ${this.next}`); + return new EmptyExpr$1(this.span(start), this.sourceSpan(start)); + } + } + parseExpressionList(terminator) { + const result = []; + do { + if (!this.next.isCharacter(terminator)) { + result.push(this.parsePipe()); + } else { + break; + } + } while (this.consumeOptionalCharacter($COMMA)); + return result; + } + parseLiteralMap() { + const keys = []; + const values = []; + const start = this.inputIndex; + this.expectCharacter($LBRACE); + if (!this.consumeOptionalCharacter($RBRACE)) { + this.rbracesExpected++; + do { + const keyStart = this.inputIndex; + const quoted = this.next.isString(); + const key = this.expectIdentifierOrKeywordOrString(); + const literalMapKey = { + key, + quoted + }; + keys.push(literalMapKey); + // Properties with quoted keys can't use the shorthand syntax. + if (quoted) { + this.expectCharacter($COLON); + values.push(this.parsePipe()); + } else if (this.consumeOptionalCharacter($COLON)) { + values.push(this.parsePipe()); + } else { + literalMapKey.isShorthandInitialized = true; + const span = this.span(keyStart); + const sourceSpan = this.sourceSpan(keyStart); + values.push(new PropertyRead(span, sourceSpan, sourceSpan, new ImplicitReceiver(span, sourceSpan), key)); + } + } while (this.consumeOptionalCharacter($COMMA) && !this.next.isCharacter($RBRACE)); + this.rbracesExpected--; + this.expectCharacter($RBRACE); + } + return new LiteralMap(this.span(start), this.sourceSpan(start), keys, values); + } + parseAccessMember(readReceiver, start, isSafe) { + const nameStart = this.inputIndex; + const id = this.withContext(ParseContextFlags.Writable, () => { + const id = this.expectIdentifierOrKeyword() ?? ''; + if (id.length === 0) { + this.error(`Expected identifier for property access`, readReceiver.span.end); + } + return id; + }); + const nameSpan = this.sourceSpan(nameStart); + let receiver; + if (isSafe) { + if (this.consumeOptionalOperator('=')) { + this.error("The '?.' operator cannot be used in the assignment"); + receiver = new EmptyExpr$1(this.span(start), this.sourceSpan(start)); + } else { + receiver = new SafePropertyRead(this.span(start), this.sourceSpan(start), nameSpan, readReceiver, id); + } + } else { + if (this.consumeOptionalOperator('=')) { + if (!(this.parseFlags & 1 /* ParseFlags.Action */)) { + this.error('Bindings cannot contain assignments'); + return new EmptyExpr$1(this.span(start), this.sourceSpan(start)); + } + const value = this.parseConditional(); + receiver = new PropertyWrite(this.span(start), this.sourceSpan(start), nameSpan, readReceiver, id, value); + } else { + receiver = new PropertyRead(this.span(start), this.sourceSpan(start), nameSpan, readReceiver, id); + } + } + return receiver; + } + parseCall(receiver, start, isSafe) { + const argumentStart = this.inputIndex; + this.rparensExpected++; + const args = this.parseCallArguments(); + const argumentSpan = this.span(argumentStart, this.inputIndex).toAbsolute(this.absoluteOffset); + this.expectCharacter($RPAREN); + this.rparensExpected--; + const span = this.span(start); + const sourceSpan = this.sourceSpan(start); + return isSafe ? new SafeCall(span, sourceSpan, receiver, args, argumentSpan) : new Call(span, sourceSpan, receiver, args, argumentSpan); + } + parseCallArguments() { + if (this.next.isCharacter($RPAREN)) return []; + const positionals = []; + do { + positionals.push(this.parsePipe()); + } while (this.consumeOptionalCharacter($COMMA)); + return positionals; + } + /** + * Parses an identifier, a keyword, a string with an optional `-` in between, + * and returns the string along with its absolute source span. + */ + expectTemplateBindingKey() { + let result = ''; + let operatorFound = false; + const start = this.currentAbsoluteOffset; + do { + result += this.expectIdentifierOrKeywordOrString(); + operatorFound = this.consumeOptionalOperator('-'); + if (operatorFound) { + result += '-'; + } + } while (operatorFound); + return { + source: result, + span: new AbsoluteSourceSpan(start, start + result.length) + }; + } + /** + * Parse microsyntax template expression and return a list of bindings or + * parsing errors in case the given expression is invalid. + * + * For example, + * ``` + *
+ * ``` + * contains five bindings: + * 1. ngFor -> null + * 2. item -> NgForOfContext.$implicit + * 3. ngForOf -> items + * 4. i -> NgForOfContext.index + * 5. ngForTrackBy -> func + * + * For a full description of the microsyntax grammar, see + * https://gist.github.com/mhevery/d3530294cff2e4a1b3fe15ff75d08855 + * + * @param templateKey name of the microsyntax directive, like ngIf, ngFor, + * without the *, along with its absolute span. + */ + parseTemplateBindings(templateKey) { + const bindings = []; + // The first binding is for the template key itself + // In *ngFor="let item of items", key = "ngFor", value = null + // In *ngIf="cond | pipe", key = "ngIf", value = "cond | pipe" + bindings.push(...this.parseDirectiveKeywordBindings(templateKey)); + while (this.index < this.tokens.length) { + // If it starts with 'let', then this must be variable declaration + const letBinding = this.parseLetBinding(); + if (letBinding) { + bindings.push(letBinding); + } else { + // Two possible cases here, either `value "as" key` or + // "directive-keyword expression". We don't know which case, but both + // "value" and "directive-keyword" are template binding key, so consume + // the key first. + const key = this.expectTemplateBindingKey(); + // Peek at the next token, if it is "as" then this must be variable + // declaration. + const binding = this.parseAsBinding(key); + if (binding) { + bindings.push(binding); + } else { + // Otherwise the key must be a directive keyword, like "of". Transform + // the key to actual key. Eg. of -> ngForOf, trackBy -> ngForTrackBy + key.source = templateKey.source + key.source.charAt(0).toUpperCase() + key.source.substring(1); + bindings.push(...this.parseDirectiveKeywordBindings(key)); + } + } + this.consumeStatementTerminator(); + } + return new TemplateBindingParseResult(bindings, [] /* warnings */, this.errors); + } + parseKeyedReadOrWrite(receiver, start, isSafe) { + return this.withContext(ParseContextFlags.Writable, () => { + this.rbracketsExpected++; + const key = this.parsePipe(); + if (key instanceof EmptyExpr$1) { + this.error(`Key access cannot be empty`); + } + this.rbracketsExpected--; + this.expectCharacter($RBRACKET); + if (this.consumeOptionalOperator('=')) { + if (isSafe) { + this.error("The '?.' operator cannot be used in the assignment"); + } else { + const value = this.parseConditional(); + return new KeyedWrite(this.span(start), this.sourceSpan(start), receiver, key, value); + } + } else { + return isSafe ? new SafeKeyedRead(this.span(start), this.sourceSpan(start), receiver, key) : new KeyedRead(this.span(start), this.sourceSpan(start), receiver, key); + } + return new EmptyExpr$1(this.span(start), this.sourceSpan(start)); + }); + } + /** + * Parse a directive keyword, followed by a mandatory expression. + * For example, "of items", "trackBy: func". + * The bindings are: ngForOf -> items, ngForTrackBy -> func + * There could be an optional "as" binding that follows the expression. + * For example, + * ``` + * *ngFor="let item of items | slice:0:1 as collection". + * ^^ ^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^ + * keyword bound target optional 'as' binding + * ``` + * + * @param key binding key, for example, ngFor, ngIf, ngForOf, along with its + * absolute span. + */ + parseDirectiveKeywordBindings(key) { + const bindings = []; + this.consumeOptionalCharacter($COLON); // trackBy: trackByFunction + const value = this.getDirectiveBoundTarget(); + let spanEnd = this.currentAbsoluteOffset; + // The binding could optionally be followed by "as". For example, + // *ngIf="cond | pipe as x". In this case, the key in the "as" binding + // is "x" and the value is the template key itself ("ngIf"). Note that the + // 'key' in the current context now becomes the "value" in the next binding. + const asBinding = this.parseAsBinding(key); + if (!asBinding) { + this.consumeStatementTerminator(); + spanEnd = this.currentAbsoluteOffset; + } + const sourceSpan = new AbsoluteSourceSpan(key.span.start, spanEnd); + bindings.push(new ExpressionBinding(sourceSpan, key, value)); + if (asBinding) { + bindings.push(asBinding); + } + return bindings; + } + /** + * Return the expression AST for the bound target of a directive keyword + * binding. For example, + * ``` + * *ngIf="condition | pipe" + * ^^^^^^^^^^^^^^^^ bound target for "ngIf" + * *ngFor="let item of items" + * ^^^^^ bound target for "ngForOf" + * ``` + */ + getDirectiveBoundTarget() { + if (this.next === EOF || this.peekKeywordAs() || this.peekKeywordLet()) { + return null; + } + const ast = this.parsePipe(); // example: "condition | async" + const { + start, + end + } = ast.span; + const value = this.input.substring(start, end); + return new ASTWithSource(ast, value, this.location, this.absoluteOffset + start, this.errors); + } + /** + * Return the binding for a variable declared using `as`. Note that the order + * of the key-value pair in this declaration is reversed. For example, + * ``` + * *ngFor="let item of items; index as i" + * ^^^^^ ^ + * value key + * ``` + * + * @param value name of the value in the declaration, "ngIf" in the example + * above, along with its absolute span. + */ + parseAsBinding(value) { + if (!this.peekKeywordAs()) { + return null; + } + this.advance(); // consume the 'as' keyword + const key = this.expectTemplateBindingKey(); + this.consumeStatementTerminator(); + const sourceSpan = new AbsoluteSourceSpan(value.span.start, this.currentAbsoluteOffset); + return new VariableBinding(sourceSpan, key, value); + } + /** + * Return the binding for a variable declared using `let`. For example, + * ``` + * *ngFor="let item of items; let i=index;" + * ^^^^^^^^ ^^^^^^^^^^^ + * ``` + * In the first binding, `item` is bound to `NgForOfContext.$implicit`. + * In the second binding, `i` is bound to `NgForOfContext.index`. + */ + parseLetBinding() { + if (!this.peekKeywordLet()) { + return null; + } + const spanStart = this.currentAbsoluteOffset; + this.advance(); // consume the 'let' keyword + const key = this.expectTemplateBindingKey(); + let value = null; + if (this.consumeOptionalOperator('=')) { + value = this.expectTemplateBindingKey(); + } + this.consumeStatementTerminator(); + const sourceSpan = new AbsoluteSourceSpan(spanStart, this.currentAbsoluteOffset); + return new VariableBinding(sourceSpan, key, value); + } + /** + * Consume the optional statement terminator: semicolon or comma. + */ + consumeStatementTerminator() { + this.consumeOptionalCharacter($SEMICOLON) || this.consumeOptionalCharacter($COMMA); + } + /** + * Records an error and skips over the token stream until reaching a recoverable point. See + * `this.skip` for more details on token skipping. + */ + error(message, index = null) { + this.errors.push(new ParserError(message, this.input, this.locationText(index), this.location)); + this.skip(); + } + locationText(index = null) { + if (index == null) index = this.index; + return index < this.tokens.length ? `at column ${this.tokens[index].index + 1} in` : `at the end of the expression`; + } + /** + * Records an error for an unexpected private identifier being discovered. + * @param token Token representing a private identifier. + * @param extraMessage Optional additional message being appended to the error. + */ + _reportErrorForPrivateIdentifier(token, extraMessage) { + let errorMessage = `Private identifiers are not supported. Unexpected private identifier: ${token}`; + if (extraMessage !== null) { + errorMessage += `, ${extraMessage}`; + } + this.error(errorMessage); + } + /** + * Error recovery should skip tokens until it encounters a recovery point. + * + * The following are treated as unconditional recovery points: + * - end of input + * - ';' (parseChain() is always the root production, and it expects a ';') + * - '|' (since pipes may be chained and each pipe expression may be treated independently) + * + * The following are conditional recovery points: + * - ')', '}', ']' if one of calling productions is expecting one of these symbols + * - This allows skip() to recover from errors such as '(a.) + 1' allowing more of the AST to + * be retained (it doesn't skip any tokens as the ')' is retained because of the '(' begins + * an '(' ')' production). + * The recovery points of grouping symbols must be conditional as they must be skipped if + * none of the calling productions are not expecting the closing token else we will never + * make progress in the case of an extraneous group closing symbol (such as a stray ')'). + * That is, we skip a closing symbol if we are not in a grouping production. + * - '=' in a `Writable` context + * - In this context, we are able to recover after seeing the `=` operator, which + * signals the presence of an independent rvalue expression following the `=` operator. + * + * If a production expects one of these token it increments the corresponding nesting count, + * and then decrements it just prior to checking if the token is in the input. + */ + skip() { + let n = this.next; + while (this.index < this.tokens.length && !n.isCharacter($SEMICOLON) && !n.isOperator('|') && (this.rparensExpected <= 0 || !n.isCharacter($RPAREN)) && (this.rbracesExpected <= 0 || !n.isCharacter($RBRACE)) && (this.rbracketsExpected <= 0 || !n.isCharacter($RBRACKET)) && (!(this.context & ParseContextFlags.Writable) || !n.isOperator('='))) { + if (this.next.isError()) { + this.errors.push(new ParserError(this.next.toString(), this.input, this.locationText(), this.location)); + } + this.advance(); + n = this.next; + } + } +} +class SimpleExpressionChecker extends RecursiveAstVisitor { + constructor() { + super(...arguments); + this.errors = []; + } + visitPipe() { + this.errors.push('pipes'); + } +} +/** + * Computes the real offset in the original template for indexes in an interpolation. + * + * Because templates can have encoded HTML entities and the input passed to the parser at this stage + * of the compiler is the _decoded_ value, we need to compute the real offset using the original + * encoded values in the interpolated tokens. Note that this is only a special case handling for + * `MlParserTokenType.ENCODED_ENTITY` token types. All other interpolated tokens are expected to + * have parts which exactly match the input string for parsing the interpolation. + * + * @param interpolatedTokens The tokens for the interpolated value. + * + * @returns A map of index locations in the decoded template to indexes in the original template + */ +function getIndexMapForOriginalTemplate(interpolatedTokens) { + let offsetMap = new Map(); + let consumedInOriginalTemplate = 0; + let consumedInInput = 0; + let tokenIndex = 0; + while (tokenIndex < interpolatedTokens.length) { + const currentToken = interpolatedTokens[tokenIndex]; + if (currentToken.type === 9 /* MlParserTokenType.ENCODED_ENTITY */) { + const [decoded, encoded] = currentToken.parts; + consumedInOriginalTemplate += encoded.length; + consumedInInput += decoded.length; + } else { + const lengthOfParts = currentToken.parts.reduce((sum, current) => sum + current.length, 0); + consumedInInput += lengthOfParts; + consumedInOriginalTemplate += lengthOfParts; + } + offsetMap.set(consumedInInput, consumedInOriginalTemplate); + tokenIndex++; + } + return offsetMap; +} + +// ================================================================================================= +// ================================================================================================= +// =========== S T O P - S T O P - S T O P - S T O P - S T O P - S T O P =========== +// ================================================================================================= +// ================================================================================================= +// +// DO NOT EDIT THIS LIST OF SECURITY SENSITIVE PROPERTIES WITHOUT A SECURITY REVIEW! +// Reach out to mprobst for details. +// +// ================================================================================================= +/** Map from tagName|propertyName to SecurityContext. Properties applying to all tags use '*'. */ +let _SECURITY_SCHEMA; +function SECURITY_SCHEMA() { + if (!_SECURITY_SCHEMA) { + _SECURITY_SCHEMA = {}; + // Case is insignificant below, all element and attribute names are lower-cased for lookup. + registerContext(SecurityContext.HTML, ['iframe|srcdoc', '*|innerHTML', '*|outerHTML']); + registerContext(SecurityContext.STYLE, ['*|style']); + // NB: no SCRIPT contexts here, they are never allowed due to the parser stripping them. + registerContext(SecurityContext.URL, ['*|formAction', 'area|href', 'area|ping', 'audio|src', 'a|href', 'a|ping', 'blockquote|cite', 'body|background', 'del|cite', 'form|action', 'img|src', 'input|src', 'ins|cite', 'q|cite', 'source|src', 'track|src', 'video|poster', 'video|src']); + registerContext(SecurityContext.RESOURCE_URL, ['applet|code', 'applet|codebase', 'base|href', 'embed|src', 'frame|src', 'head|profile', 'html|manifest', 'iframe|src', 'link|href', 'media|src', 'object|codebase', 'object|data', 'script|src']); + } + return _SECURITY_SCHEMA; +} +function registerContext(ctx, specs) { + for (const spec of specs) _SECURITY_SCHEMA[spec.toLowerCase()] = ctx; +} +/** + * The set of security-sensitive attributes of an `