@descope/web-components-ui 1.32.0 → 1.34.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (321) hide show
  1. package/dist/cjs/index.cjs.js +481 -364
  2. package/dist/cjs/index.cjs.js.map +1 -1
  3. package/dist/index.esm.js +524 -438
  4. package/dist/index.esm.js.map +1 -1
  5. package/dist/umd/1408.js +382 -0
  6. package/dist/umd/1408.js.LICENSE.txt +17 -0
  7. package/dist/umd/1408.js.map +1 -0
  8. package/dist/umd/{9243.js → 1519.js} +7 -6
  9. package/dist/umd/1519.js.map +1 -0
  10. package/dist/umd/189.js +109 -276
  11. package/dist/umd/189.js.LICENSE.txt +12 -0
  12. package/dist/umd/189.js.map +1 -0
  13. package/dist/umd/{7979.js → 1899.js} +11 -10
  14. package/dist/umd/1899.js.map +1 -0
  15. package/dist/umd/{1172.js → 1995.js} +10 -9
  16. package/dist/umd/1995.js.map +1 -0
  17. package/dist/umd/2540.js +2 -1
  18. package/dist/umd/2540.js.map +1 -0
  19. package/dist/umd/2672.js +2 -0
  20. package/dist/umd/2672.js.map +1 -0
  21. package/dist/umd/2739.js +2 -0
  22. package/dist/umd/2739.js.map +1 -0
  23. package/dist/umd/{2570.js → 2894.js} +6 -5
  24. package/dist/umd/2894.js.map +1 -0
  25. package/dist/umd/{404.js → 3620.js} +9 -8
  26. package/dist/umd/3620.js.map +1 -0
  27. package/dist/umd/{4455.js → 384.js} +8 -7
  28. package/dist/umd/384.js.map +1 -0
  29. package/dist/umd/4467.js +3 -0
  30. package/dist/umd/4467.js.map +1 -0
  31. package/dist/umd/{4127.js → 4518.js} +11 -10
  32. package/dist/umd/4518.js.map +1 -0
  33. package/dist/umd/{1902.js → 4550.js} +7 -6
  34. package/dist/umd/4550.js.map +1 -0
  35. package/dist/umd/{4554.js → 4623.js} +7 -6
  36. package/dist/umd/4623.js.map +1 -0
  37. package/dist/umd/{742.js → 4914.js} +3 -2
  38. package/dist/umd/4914.js.map +1 -0
  39. package/dist/umd/{9478.js → 513.js} +6 -5
  40. package/dist/umd/513.js.map +1 -0
  41. package/dist/umd/{201.js → 5260.js} +6 -5
  42. package/dist/umd/5260.js.map +1 -0
  43. package/dist/umd/5414.js +2 -1
  44. package/dist/umd/5414.js.map +1 -0
  45. package/dist/umd/5648.js +110 -0
  46. package/dist/umd/5648.js.map +1 -0
  47. package/dist/umd/5780.js +2 -0
  48. package/dist/umd/5780.js.map +1 -0
  49. package/dist/umd/{5563.js → 6227.js} +6 -5
  50. package/dist/umd/6227.js.map +1 -0
  51. package/dist/umd/6424.js +149 -0
  52. package/dist/umd/6424.js.map +1 -0
  53. package/dist/umd/{7097.js → 6649.js} +6 -5
  54. package/dist/umd/6649.js.map +1 -0
  55. package/dist/umd/676.js +3 -0
  56. package/dist/umd/676.js.map +1 -0
  57. package/dist/umd/{1738.js → 7092.js} +2 -1
  58. package/dist/umd/7092.js.map +1 -0
  59. package/dist/umd/{3638.js → 7182.js} +3 -2
  60. package/dist/umd/7182.js.map +1 -0
  61. package/dist/umd/{507.js → 7291.js} +6 -5
  62. package/dist/umd/7291.js.map +1 -0
  63. package/dist/umd/{4187.js → 7565.js} +3 -2
  64. package/dist/umd/7565.js.map +1 -0
  65. package/dist/umd/{3191.js → 7620.js} +11 -7
  66. package/dist/umd/7620.js.map +1 -0
  67. package/dist/umd/{6050.js → 7774.js} +10 -9
  68. package/dist/umd/7774.js.map +1 -0
  69. package/dist/umd/{2666.js → 7939.js} +5 -4
  70. package/dist/umd/7939.js.map +1 -0
  71. package/dist/umd/{4114.js → 8618.js} +5 -4
  72. package/dist/umd/8618.js.map +1 -0
  73. package/dist/umd/8961.js +2 -0
  74. package/dist/umd/8961.js.map +1 -0
  75. package/dist/umd/{4574.js → 8983.js} +6 -5
  76. package/dist/umd/8983.js.map +1 -0
  77. package/dist/umd/9030.js +265 -307
  78. package/dist/umd/9030.js.LICENSE.txt +0 -6
  79. package/dist/umd/9030.js.map +1 -0
  80. package/dist/umd/9365.js +2 -0
  81. package/dist/umd/9365.js.map +1 -0
  82. package/dist/umd/{4218.js → 9380.js} +5 -4
  83. package/dist/umd/9380.js.map +1 -0
  84. package/dist/umd/9871.js +276 -0
  85. package/dist/umd/9871.js.map +1 -0
  86. package/dist/umd/9970.js +833 -0
  87. package/dist/umd/9970.js.map +1 -0
  88. package/dist/umd/DescopeDev.js +2 -1
  89. package/dist/umd/DescopeDev.js.map +1 -0
  90. package/dist/umd/boolean-fields-descope-boolean-field-internal-index-js.js +2 -1
  91. package/dist/umd/boolean-fields-descope-boolean-field-internal-index-js.js.map +1 -0
  92. package/dist/umd/boolean-fields-descope-checkbox-index-js.js +2 -1
  93. package/dist/umd/boolean-fields-descope-checkbox-index-js.js.map +1 -0
  94. package/dist/umd/boolean-fields-descope-switch-toggle-index-js.js +2 -1
  95. package/dist/umd/boolean-fields-descope-switch-toggle-index-js.js.map +1 -0
  96. package/dist/umd/button-selection-group-fields-descope-button-multi-selection-group-index-js.js +2 -1
  97. package/dist/umd/button-selection-group-fields-descope-button-multi-selection-group-index-js.js.map +1 -0
  98. package/dist/umd/button-selection-group-fields-descope-button-multi-selection-group-internal-index-js.js +2 -1
  99. package/dist/umd/button-selection-group-fields-descope-button-multi-selection-group-internal-index-js.js.map +1 -0
  100. package/dist/umd/button-selection-group-fields-descope-button-selection-group-index-js.js +2 -1
  101. package/dist/umd/button-selection-group-fields-descope-button-selection-group-index-js.js.map +1 -0
  102. package/dist/umd/button-selection-group-fields-descope-button-selection-group-internal-index-js.js +2 -1
  103. package/dist/umd/button-selection-group-fields-descope-button-selection-group-internal-index-js.js.map +1 -0
  104. package/dist/umd/button-selection-group-fields-descope-button-selection-group-item-index-js.js +2 -1
  105. package/dist/umd/button-selection-group-fields-descope-button-selection-group-item-index-js.js.map +1 -0
  106. package/dist/umd/descope-address-field.js +2 -1
  107. package/dist/umd/descope-address-field.js.map +1 -0
  108. package/dist/umd/descope-alert-index-js.js +2 -1
  109. package/dist/umd/descope-alert-index-js.js.map +1 -0
  110. package/dist/umd/descope-apps-list-index-js.js +2 -1
  111. package/dist/umd/descope-apps-list-index-js.js.map +1 -0
  112. package/dist/umd/descope-autocomplete-field.js +2 -1
  113. package/dist/umd/descope-autocomplete-field.js.map +1 -0
  114. package/dist/umd/descope-avatar.js +2 -1
  115. package/dist/umd/descope-avatar.js.map +1 -0
  116. package/dist/umd/descope-badge-index-js.js +2 -1
  117. package/dist/umd/descope-badge-index-js.js.map +1 -0
  118. package/dist/umd/descope-button-index-js.js +5 -4
  119. package/dist/umd/descope-button-index-js.js.map +1 -0
  120. package/dist/umd/descope-code-snippet-index-js.js +2 -1
  121. package/dist/umd/descope-code-snippet-index-js.js.map +1 -0
  122. package/dist/umd/descope-combo-box.js +7 -6
  123. package/dist/umd/descope-combo-box.js.map +1 -0
  124. package/dist/umd/descope-container-index-js.js +2 -1
  125. package/dist/umd/descope-container-index-js.js.map +1 -0
  126. package/dist/umd/descope-date-field-descope-calendar-index-js.js +2 -1
  127. package/dist/umd/descope-date-field-descope-calendar-index-js.js.map +1 -0
  128. package/dist/umd/descope-date-field-index-js.js +2 -1
  129. package/dist/umd/descope-date-field-index-js.js.map +1 -0
  130. package/dist/umd/descope-divider-index-js.js +2 -1
  131. package/dist/umd/descope-divider-index-js.js.map +1 -0
  132. package/dist/umd/descope-email-field-index-js.js +5 -4
  133. package/dist/umd/descope-email-field-index-js.js.map +1 -0
  134. package/dist/umd/descope-enriched-text-index-js.js +2 -1
  135. package/dist/umd/descope-enriched-text-index-js.js.map +1 -0
  136. package/dist/umd/descope-grid-descope-grid-custom-column-index-js.js +5 -4
  137. package/dist/umd/descope-grid-descope-grid-custom-column-index-js.js.map +1 -0
  138. package/dist/umd/descope-grid-descope-grid-item-details-column-index-js.js +6 -5
  139. package/dist/umd/descope-grid-descope-grid-item-details-column-index-js.js.map +1 -0
  140. package/dist/umd/descope-grid-descope-grid-selection-column-index-js.js +2 -1
  141. package/dist/umd/descope-grid-descope-grid-selection-column-index-js.js.map +1 -0
  142. package/dist/umd/descope-grid-descope-grid-text-column-index-js.js +5 -4
  143. package/dist/umd/descope-grid-descope-grid-text-column-index-js.js.map +1 -0
  144. package/dist/umd/descope-grid-index-js.js +2 -1
  145. package/dist/umd/descope-grid-index-js.js.map +1 -0
  146. package/dist/umd/descope-hybrid-field-index-js.js +4 -3
  147. package/dist/umd/descope-hybrid-field-index-js.js.map +1 -0
  148. package/dist/umd/descope-icon-index-js.js +2 -1
  149. package/dist/umd/descope-icon-index-js.js.map +1 -0
  150. package/dist/umd/descope-image-index-js.js +2 -1
  151. package/dist/umd/descope-image-index-js.js.map +1 -0
  152. package/dist/umd/descope-link-index-js.js +2 -1
  153. package/dist/umd/descope-link-index-js.js.map +1 -0
  154. package/dist/umd/descope-list-index-js.js +2 -1
  155. package/dist/umd/descope-list-index-js.js.map +1 -0
  156. package/dist/umd/descope-loader-linear-index-js.js +2 -1
  157. package/dist/umd/descope-loader-linear-index-js.js.map +1 -0
  158. package/dist/umd/descope-loader-radial-index-js.js +2 -1
  159. package/dist/umd/descope-loader-radial-index-js.js.map +1 -0
  160. package/dist/umd/descope-logo-index-js.js +2 -1
  161. package/dist/umd/descope-logo-index-js.js.map +1 -0
  162. package/dist/umd/descope-modal-index-js.js +2 -1
  163. package/dist/umd/descope-modal-index-js.js.map +1 -0
  164. package/dist/umd/descope-multi-select-combo-box-index-js.js +2 -1
  165. package/dist/umd/descope-multi-select-combo-box-index-js.js.map +1 -0
  166. package/dist/umd/descope-new-password-descope-new-password-internal-index-js.js +2 -1
  167. package/dist/umd/descope-new-password-descope-new-password-internal-index-js.js.map +1 -0
  168. package/dist/umd/descope-new-password-index-js.js +2 -1
  169. package/dist/umd/descope-new-password-index-js.js.map +1 -0
  170. package/dist/umd/descope-notification-descope-notification-card-index-js.js +2 -1
  171. package/dist/umd/descope-notification-descope-notification-card-index-js.js.map +1 -0
  172. package/dist/umd/descope-notification-index-js.js +2 -1
  173. package/dist/umd/descope-notification-index-js.js.map +1 -0
  174. package/dist/umd/descope-notp-image-index-js.js +2 -1
  175. package/dist/umd/descope-notp-image-index-js.js.map +1 -0
  176. package/dist/umd/descope-number-field-index-js.js +2 -1
  177. package/dist/umd/descope-number-field-index-js.js.map +1 -0
  178. package/dist/umd/descope-passcode-descope-passcode-internal-index-js.js +2 -1
  179. package/dist/umd/descope-passcode-descope-passcode-internal-index-js.js.map +1 -0
  180. package/dist/umd/descope-passcode-index-js.js +3 -2
  181. package/dist/umd/descope-passcode-index-js.js.map +1 -0
  182. package/dist/umd/descope-password-index-js.js +2 -1
  183. package/dist/umd/descope-password-index-js.js.map +1 -0
  184. package/dist/umd/descope-policy-validation-index-js.js +2 -1
  185. package/dist/umd/descope-policy-validation-index-js.js.map +1 -0
  186. package/dist/umd/descope-radio-group-index-js.js +2 -1
  187. package/dist/umd/descope-radio-group-index-js.js.map +1 -0
  188. package/dist/umd/descope-recaptcha-index-js.js +2 -1
  189. package/dist/umd/descope-recaptcha-index-js.js.map +1 -0
  190. package/dist/umd/descope-scopes-list-index-js.js +2 -1
  191. package/dist/umd/descope-scopes-list-index-js.js.map +1 -0
  192. package/dist/umd/descope-security-questions-setup-index-js.js +2 -1
  193. package/dist/umd/descope-security-questions-setup-index-js.js.map +1 -0
  194. package/dist/umd/descope-security-questions-verify-index-js.js +3 -2
  195. package/dist/umd/descope-security-questions-verify-index-js.js.map +1 -0
  196. package/dist/umd/descope-text-area-index-js.js +2 -1
  197. package/dist/umd/descope-text-area-index-js.js.map +1 -0
  198. package/dist/umd/descope-text-field-index-js.js +3 -2
  199. package/dist/umd/descope-text-field-index-js.js.map +1 -0
  200. package/dist/umd/descope-text.js +2 -1
  201. package/dist/umd/descope-text.js.map +1 -0
  202. package/dist/umd/descope-third-party-app-logo-index-js.js +2 -1
  203. package/dist/umd/descope-third-party-app-logo-index-js.js.map +1 -0
  204. package/dist/umd/descope-totp-image-index-js.js +2 -1
  205. package/dist/umd/descope-totp-image-index-js.js.map +1 -0
  206. package/dist/umd/descope-upload-file-index-js.js +2 -1
  207. package/dist/umd/descope-upload-file-index-js.js.map +1 -0
  208. package/dist/umd/descope-user-attribute-index-js.js +2 -1
  209. package/dist/umd/descope-user-attribute-index-js.js.map +1 -0
  210. package/dist/umd/descope-user-auth-method-index-js.js +2 -1
  211. package/dist/umd/descope-user-auth-method-index-js.js.map +1 -0
  212. package/dist/umd/fonts/font-1364590020.woff +0 -0
  213. package/dist/umd/fonts/font-1949233557.woff +0 -0
  214. package/dist/umd/index.js +2 -1
  215. package/dist/umd/index.js.map +1 -0
  216. package/dist/umd/mapping-fields-descope-mappings-field-descope-mapping-item-index-js.js +2 -1
  217. package/dist/umd/mapping-fields-descope-mappings-field-descope-mapping-item-index-js.js.map +1 -0
  218. package/dist/umd/mapping-fields-descope-mappings-field-descope-mappings-field-internal-index-js.js +2 -1
  219. package/dist/umd/mapping-fields-descope-mappings-field-descope-mappings-field-internal-index-js.js.map +1 -0
  220. package/dist/umd/mapping-fields-descope-mappings-field-index-js.js +2 -1
  221. package/dist/umd/mapping-fields-descope-mappings-field-index-js.js.map +1 -0
  222. package/dist/umd/mapping-fields-descope-saml-group-mappings-descope-saml-group-mappings-internal-index-js.js +2 -1
  223. package/dist/umd/mapping-fields-descope-saml-group-mappings-descope-saml-group-mappings-internal-index-js.js.map +1 -0
  224. package/dist/umd/mapping-fields-descope-saml-group-mappings-index-js.js +2 -1
  225. package/dist/umd/mapping-fields-descope-saml-group-mappings-index-js.js.map +1 -0
  226. package/dist/umd/phone-fields-descope-phone-field-descope-phone-field-internal-index-js.js +2 -1
  227. package/dist/umd/phone-fields-descope-phone-field-descope-phone-field-internal-index-js.js.map +1 -0
  228. package/dist/umd/phone-fields-descope-phone-field-index-js.js +2 -1
  229. package/dist/umd/phone-fields-descope-phone-field-index-js.js.map +1 -0
  230. package/dist/umd/phone-fields-descope-phone-input-box-field-descope-phone-input-box-internal-index-js.js +3 -2
  231. package/dist/umd/phone-fields-descope-phone-input-box-field-descope-phone-input-box-internal-index-js.js.map +1 -0
  232. package/dist/umd/phone-fields-descope-phone-input-box-field-index-js.js +8 -7
  233. package/dist/umd/phone-fields-descope-phone-input-box-field-index-js.js.map +1 -0
  234. package/package.json +10 -8
  235. package/src/baseClasses/createCssVarImageClass.js +10 -5
  236. package/src/components/button-selection-group-fields/baseButtonSelectionGroup.js +7 -0
  237. package/src/components/button-selection-group-fields/createBaseButtonSelectionGroupInternalClass.js +1 -8
  238. package/src/components/button-selection-group-fields/descope-button-selection-group-item/ButtonSelectionGroupItemClass.js +11 -6
  239. package/src/components/descope-alert/AlertClass.js +16 -12
  240. package/src/components/descope-badge/BadgeClass.js +11 -6
  241. package/src/components/descope-code-snippet/CodeSnippetClass.js +9 -4
  242. package/src/components/descope-container/ContainerClass.js +9 -4
  243. package/src/components/descope-date-field/DateFieldClass.js +22 -17
  244. package/src/components/descope-date-field/descope-calendar/CalendarClass.js +28 -18
  245. package/src/components/descope-date-field/descope-calendar/helpers.js +1 -2
  246. package/src/components/descope-divider/DividerClass.js +14 -9
  247. package/src/components/descope-enriched-text/EnrichedTextClass.js +9 -4
  248. package/src/components/descope-grid/GridClass.js +1 -1
  249. package/src/components/descope-hybrid-field/HybridFieldClass.js +15 -10
  250. package/src/components/descope-icon/IconClass.js +9 -4
  251. package/src/components/descope-image/ImageClass.js +10 -5
  252. package/src/components/descope-link/LinkClass.js +14 -9
  253. package/src/components/descope-list/ListClass.js +15 -13
  254. package/src/components/descope-list/ListItemClass.js +16 -14
  255. package/src/components/descope-loader-linear/LoaderLinearClass.js +10 -5
  256. package/src/components/descope-loader-radial/LoaderRadialClass.js +10 -5
  257. package/src/components/descope-modal/ModalClass.js +16 -4
  258. package/src/components/descope-new-password/NewPasswordClass.js +1 -1
  259. package/src/components/descope-new-password/descope-new-password-internal/NewPasswordInternal.js +8 -6
  260. package/src/components/descope-passcode/PasscodeClass.js +28 -1
  261. package/src/components/descope-passcode/descope-passcode-internal/PasscodeInternal.js +26 -23
  262. package/src/components/descope-passcode/descope-passcode-internal/helpers.js +3 -22
  263. package/src/components/descope-policy-validation/PolicyValidationClass.js +8 -3
  264. package/src/components/descope-recaptcha/RecaptchaClass.js +13 -8
  265. package/src/components/descope-scopes-list/ScopesListClass.js +9 -5
  266. package/src/components/descope-security-questions-setup/SecurityQuestionsSetupClass.js +9 -5
  267. package/src/components/descope-security-questions-verify/SecurityQuestionsVerifyClass.js +9 -5
  268. package/src/components/descope-text-field/TextFieldClass.js +1 -1
  269. package/src/components/descope-third-party-app-logo/ThirdPartyAppLogoClass.js +20 -16
  270. package/src/components/descope-upload-file/UploadFileClass.js +20 -15
  271. package/src/components/descope-user-attribute/UserAttributeClass.js +25 -22
  272. package/src/components/descope-user-auth-method/UserAuthMethodClass.js +25 -22
  273. package/src/components/mapping-fields/descope-mappings-field/descope-mapping-item/MappingItem.js +15 -9
  274. package/src/components/phone-fields/descope-phone-field/PhoneFieldClass.js +1 -0
  275. package/src/components/phone-fields/descope-phone-field/helpers.js +0 -1
  276. package/src/mixins/createProxy.js +3 -1
  277. package/src/mixins/createStyleMixin/index.js +9 -22
  278. package/src/mixins/draggableMixin.js +3 -2
  279. package/dist/umd/1402.js +0 -1
  280. package/dist/umd/1484.js +0 -148
  281. package/dist/umd/3110.js +0 -275
  282. package/dist/umd/3437.js +0 -2
  283. package/dist/umd/4619.js +0 -1
  284. package/dist/umd/4902.js +0 -170
  285. package/dist/umd/4902.js.LICENSE.txt +0 -23
  286. package/dist/umd/5096.js +0 -109
  287. package/dist/umd/5318.js +0 -1
  288. package/dist/umd/5459.js +0 -1
  289. package/dist/umd/7150.js +0 -2
  290. package/dist/umd/731.js +0 -832
  291. package/dist/umd/8823.js +0 -1
  292. /package/dist/umd/{9243.js.LICENSE.txt → 1519.js.LICENSE.txt} +0 -0
  293. /package/dist/umd/{1902.js.LICENSE.txt → 1899.js.LICENSE.txt} +0 -0
  294. /package/dist/umd/{1172.js.LICENSE.txt → 1995.js.LICENSE.txt} +0 -0
  295. /package/dist/umd/{2570.js.LICENSE.txt → 2894.js.LICENSE.txt} +0 -0
  296. /package/dist/umd/{1484.js.LICENSE.txt → 3620.js.LICENSE.txt} +0 -0
  297. /package/dist/umd/{2666.js.LICENSE.txt → 384.js.LICENSE.txt} +0 -0
  298. /package/dist/umd/{3437.js.LICENSE.txt → 4467.js.LICENSE.txt} +0 -0
  299. /package/dist/umd/{404.js.LICENSE.txt → 4518.js.LICENSE.txt} +0 -0
  300. /package/dist/umd/{4455.js.LICENSE.txt → 4550.js.LICENSE.txt} +0 -0
  301. /package/dist/umd/{4554.js.LICENSE.txt → 4623.js.LICENSE.txt} +0 -0
  302. /package/dist/umd/{742.js.LICENSE.txt → 4914.js.LICENSE.txt} +0 -0
  303. /package/dist/umd/{507.js.LICENSE.txt → 513.js.LICENSE.txt} +0 -0
  304. /package/dist/umd/{201.js.LICENSE.txt → 5260.js.LICENSE.txt} +0 -0
  305. /package/dist/umd/{5096.js.LICENSE.txt → 5648.js.LICENSE.txt} +0 -0
  306. /package/dist/umd/{5563.js.LICENSE.txt → 6227.js.LICENSE.txt} +0 -0
  307. /package/dist/umd/{4127.js.LICENSE.txt → 6424.js.LICENSE.txt} +0 -0
  308. /package/dist/umd/{7097.js.LICENSE.txt → 6649.js.LICENSE.txt} +0 -0
  309. /package/dist/umd/{7150.js.LICENSE.txt → 676.js.LICENSE.txt} +0 -0
  310. /package/dist/umd/{3638.js.LICENSE.txt → 7182.js.LICENSE.txt} +0 -0
  311. /package/dist/umd/{7979.js.LICENSE.txt → 7291.js.LICENSE.txt} +0 -0
  312. /package/dist/umd/{4187.js.LICENSE.txt → 7565.js.LICENSE.txt} +0 -0
  313. /package/dist/umd/{3191.js.LICENSE.txt → 7620.js.LICENSE.txt} +0 -0
  314. /package/dist/umd/{6050.js.LICENSE.txt → 7774.js.LICENSE.txt} +0 -0
  315. /package/dist/umd/{9478.js.LICENSE.txt → 7939.js.LICENSE.txt} +0 -0
  316. /package/dist/umd/{4114.js.LICENSE.txt → 8618.js.LICENSE.txt} +0 -0
  317. /package/dist/umd/{4574.js.LICENSE.txt → 8983.js.LICENSE.txt} +0 -0
  318. /package/dist/umd/{4218.js.LICENSE.txt → 9380.js.LICENSE.txt} +0 -0
  319. /package/dist/umd/{3110.js.LICENSE.txt → 9871.js.LICENSE.txt} +0 -0
  320. /package/dist/umd/{731.js.LICENSE.txt → 9970.js.LICENSE.txt} +0 -0
  321. /package/dist/umd/{bcdfe87ae253c2cf789c9a737f8d8c22.woff → fonts/font-38673212.woff} +0 -0
@@ -0,0 +1 @@
1
+ {"version":3,"file":"6227.js","mappings":";oIAmBAA,OAAOC,0BAA4B,SAASC,EAAMC,GAChD,OAAOD,CACT,6CCAA,MAAME,EAASJ,OAAOK,cAClBA,aAAaC,aAAa,uBAAwB,CAACC,WAAaC,GAAMA,IAO1E,MAAMC,EAKJ,WAAAC,CAAYC,EAASC,GACnBC,EAAoCF,EAASC,GAC7C,MAAME,EAASF,EAAOG,QAClB,CAACC,EAAKC,EAAGC,IAAQF,EAAMG,EAAaF,GAAKN,EAAQO,EAAM,IAAIP,EAAQ,IAEvES,KAAKC,MAAQP,EAAOQ,UACtB,CAKA,QAAAA,GACE,OAAOF,KAAKC,KACd,EAOF,SAASF,EAAaE,GACpB,GAAIA,aAAiBZ,EACnB,OAAoC,EAAQY,MAE5C,MAAM,IAAIE,MACN,+DAA+DF,IAGvE,CAyDO,MAAMG,EAAO,SAAcb,KAAYC,GAC5CC,EAAoCF,EAASC,GAC7C,MAAMa,EACmCC,SAASC,cAAc,YAChE,IAAIN,EAAQT,EAAOG,QACf,CAACC,EAAKC,EAAGC,IAAQF,EAxDvB,SAAmBK,GACjB,GAAIA,aAAiBO,oBAOnB,OAA2C,EAAQC,UAC9C,GAAIR,aAAiBZ,EAC1B,OAAOU,EAAaE,GAEpB,MAAM,IAAIE,MACN,yDAAyDF,IAEjE,CAyC6BS,CAAUb,GAAKN,EAAQO,EAAM,IAAIP,EAAQ,IAKpE,OAJIP,IACFiB,EAAQjB,EAAOG,WAAWc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,2BAA2B,CAACC,WAAW,IAAI,MAAM,EAAE1J,WAAW2J,0BAA0B,IAAI,CAACD,WAAW,KAA0D1J,WAAW4J,qBAAqB,IAAInzB,KAAK","sources":["webpack://@descope/web-components-ui/../../../node_modules/@polymer/polymer/lib/utils/boot.js","webpack://@descope/web-components-ui/../../../node_modules/@polymer/polymer/lib/utils/html-tag.js","webpack://@descope/web-components-ui/../../../node_modules/@polymer/polymer/lib/utils/mixin.js","webpack://@descope/web-components-ui/../../../node_modules/@polymer/polymer/lib/utils/resolve-url.js","webpack://@descope/web-components-ui/../../../node_modules/@polymer/polymer/lib/utils/settings.js","webpack://@descope/web-components-ui/../../../node_modules/@polymer/polymer/lib/elements/dom-module.js","webpack://@descope/web-components-ui/../../../node_modules/@polymer/polymer/lib/utils/style-gather.js","webpack://@descope/web-components-ui/../../../node_modules/@polymer/polymer/lib/utils/wrap.js","webpack://@descope/web-components-ui/../../../node_modules/@polymer/polymer/lib/utils/path.js","webpack://@descope/web-components-ui/../../../node_modules/@polymer/polymer/lib/utils/case-map.js","webpack://@descope/web-components-ui/../../../node_modules/@polymer/polymer/lib/utils/async.js","webpack://@descope/web-components-ui/../../../node_modules/@polymer/polymer/lib/mixins/properties-changed.js","webpack://@descope/web-components-ui/../../../node_modules/@polymer/polymer/lib/mixins/property-accessors.js","webpack://@descope/web-components-ui/../../../node_modules/@polymer/polymer/lib/mixins/template-stamp.js","webpack://@descope/web-components-ui/../../../node_modules/@polymer/polymer/lib/mixins/property-effects.js","webpack://@descope/web-components-ui/../../../node_modules/@polymer/polymer/lib/utils/telemetry.js","webpack://@descope/web-components-ui/../../../node_modules/@polymer/polymer/lib/mixins/properties-mixin.js","webpack://@descope/web-components-ui/../../../node_modules/@polymer/polymer/lib/mixins/element-mixin.js","webpack://@descope/web-components-ui/../../../node_modules/@polymer/polymer/polymer-element.js","webpack://@descope/web-components-ui/../../../node_modules/@vaadin/component-base/src/async.js","webpack://@descope/web-components-ui/../../../node_modules/@vaadin/component-base/src/debounce.js","webpack://@descope/web-components-ui/../../../node_modules/@vaadin/component-base/src/define.js","webpack://@descope/web-components-ui/../../../node_modules/@vaadin/component-base/src/dir-mixin.js","webpack://@descope/web-components-ui/../../../node_modules/@vaadin/vaadin-lumo-styles/color.js","webpack://@descope/web-components-ui/../../../node_modules/@vaadin/vaadin-themable-mixin/register-styles.js","webpack://@descope/web-components-ui/../../../node_modules/@vaadin/vaadin-lumo-styles/global.js","webpack://@descope/web-components-ui/../../../node_modules/@vaadin/vaadin-lumo-styles/spacing.js","webpack://@descope/web-components-ui/../../../node_modules/@vaadin/vaadin-lumo-styles/style.js","webpack://@descope/web-components-ui/../../../node_modules/@vaadin/vaadin-lumo-styles/version.js","webpack://@descope/web-components-ui/../../../node_modules/@vaadin/vaadin-themable-mixin/vaadin-themable-mixin.js","webpack://@descope/web-components-ui/../../../node_modules/@vaadin/vaadin-themable-mixin/vaadin-theme-property-mixin.js","webpack://@descope/web-components-ui/../../../node_modules/lit-html/lit-html.js","webpack://@descope/web-components-ui/../../../node_modules/@lit/reactive-element/css-tag.js","webpack://@descope/web-components-ui/../../../node_modules/@lit/reactive-element/reactive-element.js","webpack://@descope/web-components-ui/../../../node_modules/lit-element/lit-element.js"],"sourcesContent":["/**\n@license\nCopyright (c) 2017 The Polymer Project Authors. All rights reserved.\nThis code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt\nThe complete set of authors may be found at http://polymer.github.io/AUTHORS.txt\nThe complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt\nCode distributed by Google as part of the polymer project is also\nsubject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt\n*/\n\n/* eslint-disable no-unused-vars */\n/**\n * When using Closure Compiler, JSCompiler_renameProperty(property, object) is replaced by the munged name for object[property]\n * We cannot alias this function, so we have to use a small shim that has the same behavior when not compiling.\n *\n * @param {?} prop Property name\n * @param {*} obj Reference object\n * @return {string} Potentially renamed property name\n */\nwindow.JSCompiler_renameProperty = function(prop, obj) {\n return prop;\n};\n/* eslint-enable */\n\nexport {};\n","/**\n@license\nCopyright (c) 2017 The Polymer Project Authors. All rights reserved.\nThis code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt\nThe complete set of authors may be found at http://polymer.github.io/AUTHORS.txt\nThe complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt\nCode distributed by Google as part of the polymer project is also\nsubject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt\n*/\nimport './boot.js';\n\n/**\n * Our TrustedTypePolicy for HTML which is declared using the Polymer html\n * template tag function.\n *\n * That HTML is a developer-authored constant, and is parsed with innerHTML\n * before any untrusted expressions have been mixed in. Therefor it is\n * considered safe by construction.\n *\n * @type {!TrustedTypePolicy|undefined}\n */\nconst policy = window.trustedTypes &&\n trustedTypes.createPolicy('polymer-html-literal', {createHTML: (s) => s});\n\n/**\n * Class representing a static string value which can be used to filter\n * strings by asseting that they have been created via this class. The\n * `value` property returns the string passed to the constructor.\n */\nclass LiteralString {\n /**\n * @param {!ITemplateArray} strings Constant parts of tagged template literal\n * @param {!Array<*>} values Variable parts of tagged template literal\n */\n constructor(strings, values) {\n assertValidTemplateStringParameters(strings, values);\n const string = values.reduce(\n (acc, v, idx) => acc + literalValue(v) + strings[idx + 1], strings[0]);\n /** @type {string} */\n this.value = string.toString();\n }\n /**\n * @return {string} LiteralString string value\n * @override\n */\n toString() {\n return this.value;\n }\n}\n\n/**\n * @param {*} value Object to stringify into HTML\n * @return {string} HTML stringified form of `obj`\n */\nfunction literalValue(value) {\n if (value instanceof LiteralString) {\n return /** @type {!LiteralString} */(value).value;\n } else {\n throw new Error(\n `non-literal value passed to Polymer's htmlLiteral function: ${value}`\n );\n }\n}\n\n/**\n * @param {*} value Object to stringify into HTML\n * @return {string} HTML stringified form of `obj`\n */\nfunction htmlValue(value) {\n if (value instanceof HTMLTemplateElement) {\n // This might be an mXSS risk – mainly in the case where this template\n // contains untrusted content that was believed to be sanitized.\n // However we can't just use the XMLSerializer here because it misencodes\n // `>` characters inside style tags.\n // For an example of an actual case that hit this encoding issue,\n // see b/198592167\n return /** @type {!HTMLTemplateElement } */(value).innerHTML;\n } else if (value instanceof LiteralString) {\n return literalValue(value);\n } else {\n throw new Error(\n `non-template value passed to Polymer's html function: ${value}`);\n }\n}\n\n/**\n * A template literal tag that creates an HTML <template> element from the\n * contents of the string.\n *\n * This allows you to write a Polymer Template in JavaScript.\n *\n * Templates can be composed by interpolating `HTMLTemplateElement`s in\n * expressions in the JavaScript template literal. The nested template's\n * `innerHTML` is included in the containing template. The only other\n * values allowed in expressions are those returned from `htmlLiteral`\n * which ensures only literal values from JS source ever reach the HTML, to\n * guard against XSS risks.\n *\n * All other values are disallowed in expressions to help prevent XSS\n * attacks; however, `htmlLiteral` can be used to compose static\n * string values into templates. This is useful to compose strings into\n * places that do not accept html, like the css text of a `style`\n * element.\n *\n * Example:\n *\n * static get template() {\n * return html`\n * <style>:host{ content:\"...\" }</style>\n * <div class=\"shadowed\">${this.partialTemplate}</div>\n * ${super.template}\n * `;\n * }\n * static get partialTemplate() { return html`<span>Partial!</span>`; }\n *\n * @param {!ITemplateArray} strings Constant parts of tagged template literal\n * @param {...*} values Variable parts of tagged template literal\n * @return {!HTMLTemplateElement} Constructed HTMLTemplateElement\n */\nexport const html = function html(strings, ...values) {\n assertValidTemplateStringParameters(strings, values);\n const template =\n /** @type {!HTMLTemplateElement} */ (document.createElement('template'));\n let value = values.reduce(\n (acc, v, idx) => acc + htmlValue(v) + strings[idx + 1], strings[0]);\n if (policy) {\n value = policy.createHTML(value);\n }\n template.innerHTML = value;\n return template;\n};\n\n/**\n * @param {!ITemplateArray} strings Constant parts of tagged template literal\n * @param {!Array<*>} values Array of values from quasis\n */\nconst assertValidTemplateStringParameters = (strings, values) => {\n // Note: if/when https://github.com/tc39/proposal-array-is-template-object\n // is standardized, use that instead when available, as it can perform an\n // unforgable check (though of course, the function itself can be forged).\n if (!Array.isArray(strings) || !Array.isArray(strings.raw) ||\n (values.length !== strings.length - 1)) {\n // This is either caused by a browser bug, a compiler bug, or someone\n // calling the html template tag function as a regular function.\n //\n throw new TypeError('Invalid call to the html template tag');\n }\n};\n\n/**\n * An html literal tag that can be used with `html` to compose.\n * a literal string.\n *\n * Example:\n *\n * static get template() {\n * return html`\n * <style>\n * :host { display: block; }\n * ${this.styleTemplate()}\n * </style>\n * <div class=\"shadowed\">${staticValue}</div>\n * ${super.template}\n * `;\n * }\n * static get styleTemplate() {\n * return htmlLiteral`.shadowed { background: gray; }`;\n * }\n *\n * @param {!ITemplateArray} strings Constant parts of tagged template literal\n * @param {...*} values Variable parts of tagged template literal\n * @return {!LiteralString} Constructed literal string\n */\nexport const htmlLiteral = function(strings, ...values) {\n return new LiteralString(strings, values);\n};\n","/**\n@license\nCopyright (c) 2017 The Polymer Project Authors. All rights reserved.\nThis code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt\nThe complete set of authors may be found at http://polymer.github.io/AUTHORS.txt\nThe complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt\nCode distributed by Google as part of the polymer project is also\nsubject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt\n*/\nimport './boot.js';\n\n// unique global id for deduping mixins.\nlet dedupeId = 0;\n\n/**\n * @constructor\n * @extends {Function}\n * @private\n */\nfunction MixinFunction(){}\n/** @type {(WeakMap | undefined)} */\nMixinFunction.prototype.__mixinApplications;\n/** @type {(Object | undefined)} */\nMixinFunction.prototype.__mixinSet;\n\n/* eslint-disable valid-jsdoc */\n/**\n * Wraps an ES6 class expression mixin such that the mixin is only applied\n * if it has not already been applied its base argument. Also memoizes mixin\n * applications.\n *\n * @template T\n * @param {T} mixin ES6 class expression mixin to wrap\n * @return {T}\n * @suppress {invalidCasts}\n */\nexport const dedupingMixin = function(mixin) {\n let mixinApplications = /** @type {!MixinFunction} */(mixin).__mixinApplications;\n if (!mixinApplications) {\n mixinApplications = new WeakMap();\n /** @type {!MixinFunction} */(mixin).__mixinApplications = mixinApplications;\n }\n // maintain a unique id for each mixin\n let mixinDedupeId = dedupeId++;\n function dedupingMixin(base) {\n let baseSet = /** @type {!MixinFunction} */(base).__mixinSet;\n if (baseSet && baseSet[mixinDedupeId]) {\n return base;\n }\n let map = mixinApplications;\n let extended = map.get(base);\n if (!extended) {\n extended = /** @type {!Function} */(mixin)(base);\n map.set(base, extended);\n // copy inherited mixin set from the extended class, or the base class\n // NOTE: we avoid use of Set here because some browser (IE11)\n // cannot extend a base Set via the constructor.\n let mixinSet = Object.create(/** @type {!MixinFunction} */(extended).__mixinSet || baseSet || null);\n mixinSet[mixinDedupeId] = true;\n /** @type {!MixinFunction} */(extended).__mixinSet = mixinSet;\n }\n return extended;\n }\n\n return dedupingMixin;\n};\n/* eslint-enable valid-jsdoc */\n","/**\n@license\nCopyright (c) 2017 The Polymer Project Authors. All rights reserved.\nThis code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt\nThe complete set of authors may be found at http://polymer.github.io/AUTHORS.txt\nThe complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt\nCode distributed by Google as part of the polymer project is also\nsubject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt\n*/\nimport './boot.js';\n\nlet CSS_URL_RX = /(url\\()([^)]*)(\\))/g;\nlet ABS_URL = /(^\\/[^\\/])|(^#)|(^[\\w-\\d]*:)/;\nlet workingURL;\nlet resolveDoc;\n/**\n * Resolves the given URL against the provided `baseUri'.\n *\n * Note that this function performs no resolution for URLs that start\n * with `/` (absolute URLs) or `#` (hash identifiers). For general purpose\n * URL resolution, use `window.URL`.\n *\n * @param {string} url Input URL to resolve\n * @param {?string=} baseURI Base URI to resolve the URL against\n * @return {string} resolved URL\n */\nexport function resolveUrl(url, baseURI) {\n if (url && ABS_URL.test(url)) {\n return url;\n }\n if (url === '//') {\n return url;\n }\n // Lazy feature detection.\n if (workingURL === undefined) {\n workingURL = false;\n try {\n const u = new URL('b', 'http://a');\n u.pathname = 'c%20d';\n workingURL = (u.href === 'http://a/c%20d');\n } catch (e) {\n // silently fail\n }\n }\n if (!baseURI) {\n baseURI = document.baseURI || window.location.href;\n }\n if (workingURL) {\n try {\n return (new URL(url, baseURI)).href;\n } catch (e) {\n // Bad url or baseURI structure. Do not attempt to resolve.\n return url;\n }\n }\n // Fallback to creating an anchor into a disconnected document.\n if (!resolveDoc) {\n resolveDoc = document.implementation.createHTMLDocument('temp');\n resolveDoc.base = resolveDoc.createElement('base');\n resolveDoc.head.appendChild(resolveDoc.base);\n resolveDoc.anchor = resolveDoc.createElement('a');\n resolveDoc.body.appendChild(resolveDoc.anchor);\n }\n resolveDoc.base.href = baseURI;\n resolveDoc.anchor.href = url;\n return resolveDoc.anchor.href || url;\n\n}\n\n/**\n * Resolves any relative URL's in the given CSS text against the provided\n * `ownerDocument`'s `baseURI`.\n *\n * @param {string} cssText CSS text to process\n * @param {string} baseURI Base URI to resolve the URL against\n * @return {string} Processed CSS text with resolved URL's\n */\nexport function resolveCss(cssText, baseURI) {\n return cssText.replace(CSS_URL_RX, function(m, pre, url, post) {\n return pre + '\\'' +\n resolveUrl(url.replace(/[\"']/g, ''), baseURI) +\n '\\'' + post;\n });\n}\n\n/**\n * Returns a path from a given `url`. The path includes the trailing\n * `/` from the url.\n *\n * @param {string} url Input URL to transform\n * @return {string} resolved path\n */\nexport function pathFromUrl(url) {\n return url.substring(0, url.lastIndexOf('/') + 1);\n}\n","/**\n@license\nCopyright (c) 2017 The Polymer Project Authors. All rights reserved.\nThis code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt\nThe complete set of authors may be found at http://polymer.github.io/AUTHORS.txt\nThe complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt\nCode distributed by Google as part of the polymer project is also\nsubject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt\n*/\nimport './boot.js';\nimport { pathFromUrl } from './resolve-url.js';\nexport const useShadow = !(window.ShadyDOM) || !(window.ShadyDOM.inUse);\nexport const useNativeCSSProperties = Boolean(!window.ShadyCSS || window.ShadyCSS.nativeCss);\nexport const useNativeCustomElements = !(window.customElements.polyfillWrapFlushCallback);\nexport const supportsAdoptingStyleSheets = useShadow &&\n ('adoptedStyleSheets' in Document.prototype) &&\n ('replaceSync' in CSSStyleSheet.prototype) &&\n // Since spec may change, feature detect exact API we need\n (() => {\n try {\n const sheet = new CSSStyleSheet();\n sheet.replaceSync('');\n const host = document.createElement('div');\n host.attachShadow({mode: 'open'});\n host.shadowRoot.adoptedStyleSheets = [sheet];\n return (host.shadowRoot.adoptedStyleSheets[0] === sheet);\n } catch(e) {\n return false;\n }\n })();\n\n/**\n * Globally settable property that is automatically assigned to\n * `ElementMixin` instances, useful for binding in templates to\n * make URL's relative to an application's root. Defaults to the main\n * document URL, but can be overridden by users. It may be useful to set\n * `rootPath` to provide a stable application mount path when\n * using client side routing.\n */\nexport let rootPath = window.Polymer && window.Polymer.rootPath ||\n pathFromUrl(document.baseURI || window.location.href);\n\n/**\n * Sets the global rootPath property used by `ElementMixin` and\n * available via `rootPath`.\n *\n * @param {string} path The new root path\n * @return {void}\n */\nexport const setRootPath = function(path) {\n rootPath = path;\n};\n\n/**\n * A global callback used to sanitize any value before inserting it into the DOM.\n * The callback signature is:\n *\n * function sanitizeDOMValue(value, name, type, node) { ... }\n *\n * Where:\n *\n * `value` is the value to sanitize.\n * `name` is the name of an attribute or property (for example, href).\n * `type` indicates where the value is being inserted: one of property, attribute, or text.\n * `node` is the node where the value is being inserted.\n *\n * @type {(function(*,string,string,?Node):*)|undefined}\n */\nexport let sanitizeDOMValue =\n window.Polymer && window.Polymer.sanitizeDOMValue || undefined;\n\n/**\n * Sets the global sanitizeDOMValue available via this module's exported\n * `sanitizeDOMValue` variable.\n *\n * @param {(function(*,string,string,?Node):*)|undefined} newSanitizeDOMValue the global sanitizeDOMValue callback\n * @return {void}\n */\nexport const setSanitizeDOMValue = function(newSanitizeDOMValue) {\n sanitizeDOMValue = newSanitizeDOMValue;\n};\n\n/**\n * Gets sanitizeDOMValue, for environments that don't well support `export let`.\n *\n * @return {(function(*,string,string,?Node):*)|undefined} sanitizeDOMValue\n */\nexport const getSanitizeDOMValue = function() {\n return sanitizeDOMValue;\n};\n\n/**\n * Globally settable property to make Polymer Gestures use passive TouchEvent listeners when recognizing gestures.\n * When set to `true`, gestures made from touch will not be able to prevent scrolling, allowing for smoother\n * scrolling performance.\n * Defaults to `false` for backwards compatibility.\n */\nexport let passiveTouchGestures =\n window.Polymer && window.Polymer.setPassiveTouchGestures || false;\n\n/**\n * Sets `passiveTouchGestures` globally for all elements using Polymer Gestures.\n *\n * @param {boolean} usePassive enable or disable passive touch gestures globally\n * @return {void}\n */\nexport const setPassiveTouchGestures = function(usePassive) {\n passiveTouchGestures = usePassive;\n};\n\n/**\n * Setting to ensure Polymer template evaluation only occurs based on tempates\n * defined in trusted script. When true, `<dom-module>` re-registration is\n * disallowed, `<dom-bind>` is disabled, and `<dom-if>`/`<dom-repeat>`\n * templates will only evaluate in the context of a trusted element template.\n */\nexport let strictTemplatePolicy =\n window.Polymer && window.Polymer.strictTemplatePolicy || false;\n\n/**\n * Sets `strictTemplatePolicy` globally for all elements\n *\n * @param {boolean} useStrictPolicy enable or disable strict template policy\n * globally\n * @return {void}\n */\nexport const setStrictTemplatePolicy = function(useStrictPolicy) {\n strictTemplatePolicy = useStrictPolicy;\n};\n\n/**\n * Setting to enable dom-module lookup from Polymer.Element. By default,\n * templates must be defined in script using the `static get template()`\n * getter and the `html` tag function. To enable legacy loading of templates\n * via dom-module, set this flag to true.\n */\nexport let allowTemplateFromDomModule =\n window.Polymer && window.Polymer.allowTemplateFromDomModule || false;\n\n/**\n * Sets `lookupTemplateFromDomModule` globally for all elements\n *\n * @param {boolean} allowDomModule enable or disable template lookup\n * globally\n * @return {void}\n */\nexport const setAllowTemplateFromDomModule = function(allowDomModule) {\n allowTemplateFromDomModule = allowDomModule;\n};\n\n/**\n * Setting to skip processing style includes and re-writing urls in css styles.\n * Normally \"included\" styles are pulled into the element and all urls in styles\n * are re-written to be relative to the containing script url.\n * If no includes or relative urls are used in styles, these steps can be\n * skipped as an optimization.\n */\nexport let legacyOptimizations =\n window.Polymer && window.Polymer.legacyOptimizations || false;\n\n/**\n * Sets `legacyOptimizations` globally for all elements to enable optimizations\n * when only legacy based elements are used.\n *\n * @param {boolean} useLegacyOptimizations enable or disable legacy optimizations\n * includes and url rewriting\n * @return {void}\n */\nexport const setLegacyOptimizations = function(useLegacyOptimizations) {\n legacyOptimizations = useLegacyOptimizations;\n};\n\n/**\n * Setting to add warnings useful when migrating from Polymer 1.x to 2.x.\n */\nexport let legacyWarnings =\n window.Polymer && window.Polymer.legacyWarnings || false;\n\n/**\n * Sets `legacyWarnings` globally for all elements to migration warnings.\n *\n * @param {boolean} useLegacyWarnings enable or disable warnings\n * @return {void}\n */\nexport const setLegacyWarnings = function(useLegacyWarnings) {\n legacyWarnings = useLegacyWarnings;\n};\n\n/**\n * Setting to perform initial rendering synchronously when running under ShadyDOM.\n * This matches the behavior of Polymer 1.\n */\nexport let syncInitialRender =\n window.Polymer && window.Polymer.syncInitialRender || false;\n\n/**\n * Sets `syncInitialRender` globally for all elements to enable synchronous\n * initial rendering.\n *\n * @param {boolean} useSyncInitialRender enable or disable synchronous initial\n * rendering globally.\n * @return {void}\n */\nexport const setSyncInitialRender = function(useSyncInitialRender) {\n syncInitialRender = useSyncInitialRender;\n};\n\n/**\n * Setting to retain the legacy Polymer 1 behavior for multi-property\n * observers around undefined values. Observers and computed property methods\n * are not called until no argument is undefined.\n */\nexport let legacyUndefined =\n window.Polymer && window.Polymer.legacyUndefined || false;\n\n/**\n * Sets `legacyUndefined` globally for all elements to enable legacy\n * multi-property behavior for undefined values.\n *\n * @param {boolean} useLegacyUndefined enable or disable legacy\n * multi-property behavior for undefined.\n * @return {void}\n */\nexport const setLegacyUndefined = function(useLegacyUndefined) {\n legacyUndefined = useLegacyUndefined;\n};\n\n/**\n * Setting to ensure computed properties are computed in order to ensure\n * re-computation never occurs in a given turn.\n */\nexport let orderedComputed =\n window.Polymer && window.Polymer.orderedComputed || false;\n\n/**\n * Sets `orderedComputed` globally for all elements to enable ordered computed\n * property computation.\n *\n * @param {boolean} useOrderedComputed enable or disable ordered computed effects\n * @return {void}\n */\nexport const setOrderedComputed = function(useOrderedComputed) {\n orderedComputed = useOrderedComputed;\n};\n\n/**\n * Setting to cancel synthetic click events fired by older mobile browsers. Modern browsers\n * no longer fire synthetic click events, and the cancellation behavior can interfere\n * when programmatically clicking on elements.\n */\nexport let cancelSyntheticClickEvents = true;\n\n/**\n * Sets `setCancelSyntheticEvents` globally for all elements to cancel synthetic click events.\n *\n * @param {boolean} useCancelSyntheticClickEvents enable or disable cancelling synthetic\n * events\n * @return {void}\n */\nexport const setCancelSyntheticClickEvents = function(useCancelSyntheticClickEvents) {\n cancelSyntheticClickEvents = useCancelSyntheticClickEvents;\n};\n\n/**\n * Setting to remove nested templates inside `dom-if` and `dom-repeat` as\n * part of element template parsing. This is a performance optimization that\n * eliminates most of the tax of needing two elements due to the loss of\n * type-extended templates as a result of the V1 specification changes.\n */\nexport let removeNestedTemplates =\n window.Polymer && window.Polymer.removeNestedTemplates || false;\n\n/**\n * Sets `removeNestedTemplates` globally, to eliminate nested templates\n * inside `dom-if` and `dom-repeat` as part of template parsing.\n *\n * @param {boolean} useRemoveNestedTemplates enable or disable removing nested\n * templates during parsing\n * @return {void}\n */\nexport const setRemoveNestedTemplates = function(useRemoveNestedTemplates) {\n removeNestedTemplates = useRemoveNestedTemplates;\n};\n\n/**\n * Setting to place `dom-if` elements in a performance-optimized mode that takes\n * advantage of lighter-weight host runtime template stamping to eliminate the\n * need for an intermediate Templatizer `TemplateInstance` to mange the nodes\n * stamped by `dom-if`. Under this setting, any Templatizer-provided API's\n * such as `modelForElement` will not be available for nodes stamped by\n * `dom-if`.\n */\nexport let fastDomIf = window.Polymer && window.Polymer.fastDomIf || false;\n\n/**\n * Sets `fastDomIf` globally, to put `dom-if` in a performance-optimized mode.\n *\n * @param {boolean} useFastDomIf enable or disable `dom-if` fast-mode\n * @return {void}\n */\nexport const setFastDomIf = function(useFastDomIf) {\n fastDomIf = useFastDomIf;\n};\n\n/**\n * Setting to disable `dom-change` and `rendered-item-count` events from\n * `dom-if` and `dom-repeat`. Users can opt back into `dom-change` events by\n * setting the `notify-dom-change` attribute (`notifyDomChange: true` property)\n * to `dom-if`/`don-repeat` instances.\n */\nexport let suppressTemplateNotifications =\n window.Polymer && window.Polymer.suppressTemplateNotifications || false;\n\n/**\n * Sets `suppressTemplateNotifications` globally, to disable `dom-change` and\n * `rendered-item-count` events from `dom-if` and `dom-repeat`.\n *\n * @param {boolean} suppress enable or disable `suppressTemplateNotifications`\n * @return {void}\n */\nexport const setSuppressTemplateNotifications = function(suppress) {\n suppressTemplateNotifications = suppress;\n};\n\n/**\n * Setting to disable use of dynamic attributes. This is an optimization\n * to avoid setting `observedAttributes`. Instead attributes are read\n * once at create time and set/removeAttribute are patched.\n */\nexport let legacyNoObservedAttributes =\n window.Polymer && window.Polymer.legacyNoObservedAttributes || false;\n\n/**\n * Sets `legacyNoObservedAttributes` globally, to disable `observedAttributes`.\n *\n * @param {boolean} noObservedAttributes enable or disable `legacyNoObservedAttributes`\n * @return {void}\n */\nexport const setLegacyNoObservedAttributes = function(noObservedAttributes) {\n legacyNoObservedAttributes = noObservedAttributes;\n};\n\n/**\n * Setting to enable use of `adoptedStyleSheets` for sharing style sheets\n * between component instances' shadow roots, if the app uses built Shady CSS\n * styles.\n */\nexport let useAdoptedStyleSheetsWithBuiltCSS =\n window.Polymer && window.Polymer.useAdoptedStyleSheetsWithBuiltCSS || false;\n\n/**\n * Sets `useAdoptedStyleSheetsWithBuiltCSS` globally.\n *\n * @param {boolean} value enable or disable `useAdoptedStyleSheetsWithBuiltCSS`\n * @return {void}\n */\nexport const setUseAdoptedStyleSheetsWithBuiltCSS = function(value) {\n useAdoptedStyleSheetsWithBuiltCSS = value;\n};\n","/**\n@license\nCopyright (c) 2017 The Polymer Project Authors. All rights reserved.\nThis code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt\nThe complete set of authors may be found at http://polymer.github.io/AUTHORS.txt\nThe complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt\nCode distributed by Google as part of the polymer project is also\nsubject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt\n*/\nimport '../utils/boot.js';\n\nimport { resolveUrl, pathFromUrl } from '../utils/resolve-url.js';\nimport { strictTemplatePolicy } from '../utils/settings.js';\n\nlet modules = {};\nlet lcModules = {};\n/**\n * Sets a dom-module into the global registry by id.\n *\n * @param {string} id dom-module id\n * @param {DomModule} module dom-module instance\n * @return {void}\n */\nfunction setModule(id, module) {\n // store id separate from lowercased id so that\n // in all cases mixedCase id will stored distinctly\n // and lowercase version is a fallback\n modules[id] = lcModules[id.toLowerCase()] = module;\n}\n/**\n * Retrieves a dom-module from the global registry by id.\n *\n * @param {string} id dom-module id\n * @return {DomModule!} dom-module instance\n */\nfunction findModule(id) {\n return modules[id] || lcModules[id.toLowerCase()];\n}\n\nfunction styleOutsideTemplateCheck(inst) {\n if (inst.querySelector('style')) {\n console.warn('dom-module %s has style outside template', inst.id);\n }\n}\n\n/**\n * The `dom-module` element registers the dom it contains to the name given\n * by the module's id attribute. It provides a unified database of dom\n * accessible via its static `import` API.\n *\n * A key use case of `dom-module` is for providing custom element `<template>`s\n * via HTML imports that are parsed by the native HTML parser, that can be\n * relocated during a bundling pass and still looked up by `id`.\n *\n * Example:\n *\n * <dom-module id=\"foo\">\n * <img src=\"stuff.png\">\n * </dom-module>\n *\n * Then in code in some other location that cannot access the dom-module above\n *\n * let img = customElements.get('dom-module').import('foo', 'img');\n *\n * @customElement\n * @extends HTMLElement\n * @summary Custom element that provides a registry of relocatable DOM content\n * by `id` that is agnostic to bundling.\n * @unrestricted\n */\nexport class DomModule extends HTMLElement {\n\n /** @override */\n static get observedAttributes() { return ['id']; }\n\n /**\n * Retrieves the element specified by the css `selector` in the module\n * registered by `id`. For example, this.import('foo', 'img');\n * @param {string} id The id of the dom-module in which to search.\n * @param {string=} selector The css selector by which to find the element.\n * @return {Element} Returns the element which matches `selector` in the\n * module registered at the specified `id`.\n *\n * @export\n * @nocollapse Referred to indirectly in style-gather.js\n */\n static import(id, selector) {\n if (id) {\n let m = findModule(id);\n if (m && selector) {\n return m.querySelector(selector);\n }\n return m;\n }\n return null;\n }\n\n /* eslint-disable no-unused-vars */\n /**\n * @param {string} name Name of attribute.\n * @param {?string} old Old value of attribute.\n * @param {?string} value Current value of attribute.\n * @param {?string} namespace Attribute namespace.\n * @return {void}\n * @override\n */\n attributeChangedCallback(name, old, value, namespace) {\n if (old !== value) {\n this.register();\n }\n }\n /* eslint-enable no-unused-args */\n\n /**\n * The absolute URL of the original location of this `dom-module`.\n *\n * This value will differ from this element's `ownerDocument` in the\n * following ways:\n * - Takes into account any `assetpath` attribute added during bundling\n * to indicate the original location relative to the bundled location\n * - Uses the HTMLImports polyfill's `importForElement` API to ensure\n * the path is relative to the import document's location since\n * `ownerDocument` is not currently polyfilled\n */\n get assetpath() {\n // Don't override existing assetpath.\n if (!this.__assetpath) {\n // note: assetpath set via an attribute must be relative to this\n // element's location; accommodate polyfilled HTMLImports\n const owner = window.HTMLImports && HTMLImports.importForElement ?\n HTMLImports.importForElement(this) || document : this.ownerDocument;\n const url = resolveUrl(\n this.getAttribute('assetpath') || '', owner.baseURI);\n this.__assetpath = pathFromUrl(url);\n }\n return this.__assetpath;\n }\n\n /**\n * Registers the dom-module at a given id. This method should only be called\n * when a dom-module is imperatively created. For\n * example, `document.createElement('dom-module').register('foo')`.\n * @param {string=} id The id at which to register the dom-module.\n * @return {void}\n */\n register(id) {\n id = id || this.id;\n if (id) {\n // Under strictTemplatePolicy, reject and null out any re-registered\n // dom-module since it is ambiguous whether first-in or last-in is trusted\n if (strictTemplatePolicy && findModule(id) !== undefined) {\n setModule(id, null);\n throw new Error(`strictTemplatePolicy: dom-module ${id} re-registered`);\n }\n this.id = id;\n setModule(id, this);\n styleOutsideTemplateCheck(this);\n }\n }\n}\n\nDomModule.prototype['modules'] = modules;\n\ncustomElements.define('dom-module', DomModule);\n","/**\n@license\nCopyright (c) 2017 The Polymer Project Authors. All rights reserved.\nThis code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt\nThe complete set of authors may be found at http://polymer.github.io/AUTHORS.txt\nThe complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt\nCode distributed by Google as part of the polymer project is also\nsubject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt\n*/\n\n/**\n * Module with utilities for collection CSS text from `<templates>`, external\n * stylesheets, and `dom-module`s.\n *\n * @summary Module with utilities for collection CSS text from various sources.\n */\n\nimport { DomModule } from '../elements/dom-module.js';\nimport { resolveCss } from './resolve-url.js';\n\nconst MODULE_STYLE_LINK_SELECTOR = 'link[rel=import][type~=css]';\nconst INCLUDE_ATTR = 'include';\nconst SHADY_UNSCOPED_ATTR = 'shady-unscoped';\n\n/**\n * @param {string} moduleId .\n * @return {?DomModule} .\n */\nfunction importModule(moduleId) {\n return /** @type {?DomModule} */(DomModule.import(moduleId));\n}\n\nfunction styleForImport(importDoc) {\n // NOTE: polyfill affordance.\n // under the HTMLImports polyfill, there will be no 'body',\n // but the import pseudo-doc can be used directly.\n let container = importDoc.body ? importDoc.body : importDoc;\n const importCss = resolveCss(container.textContent,\n importDoc.baseURI);\n const style = document.createElement('style');\n style.textContent = importCss;\n return style;\n}\n\n/** @typedef {{assetpath: string}} */\nlet templateWithAssetPath; // eslint-disable-line no-unused-vars\n\n\n/**\n * Returns a list of <style> elements in a space-separated list of `dom-module`s.\n *\n * @function\n * @param {string} moduleIds List of dom-module id's within which to\n * search for css.\n * @return {!Array<!HTMLStyleElement>} Array of contained <style> elements\n */\nexport function stylesFromModules(moduleIds) {\n const modules = moduleIds.trim().split(/\\s+/);\n const styles = [];\n for (let i=0; i < modules.length; i++) {\n styles.push(...stylesFromModule(modules[i]));\n }\n return styles;\n}\n\n/**\n * Returns a list of <style> elements in a given `dom-module`.\n * Styles in a `dom-module` can come either from `<style>`s within the\n * first `<template>`, or else from one or more\n * `<link rel=\"import\" type=\"css\">` links outside the template.\n *\n * @param {string} moduleId dom-module id to gather styles from\n * @return {!Array<!HTMLStyleElement>} Array of contained styles.\n */\nexport function stylesFromModule(moduleId) {\n const m = importModule(moduleId);\n\n if (!m) {\n console.warn('Could not find style data in module named', moduleId);\n return [];\n }\n\n if (m._styles === undefined) {\n const styles = [];\n // module imports: <link rel=\"import\" type=\"css\">\n styles.push(..._stylesFromModuleImports(m));\n // include css from the first template in the module\n const template = /** @type {?HTMLTemplateElement} */(\n m.querySelector('template'));\n if (template) {\n styles.push(...stylesFromTemplate(template,\n /** @type {templateWithAssetPath} */(m).assetpath));\n }\n\n m._styles = styles;\n }\n\n return m._styles;\n}\n\n/**\n * Returns the `<style>` elements within a given template.\n *\n * @param {!HTMLTemplateElement} template Template to gather styles from\n * @param {string=} baseURI baseURI for style content\n * @return {!Array<!HTMLStyleElement>} Array of styles\n */\nexport function stylesFromTemplate(template, baseURI) {\n if (!template._styles) {\n const styles = [];\n // if element is a template, get content from its .content\n const e$ = template.content.querySelectorAll('style');\n for (let i=0; i < e$.length; i++) {\n let e = e$[i];\n // support style sharing by allowing styles to \"include\"\n // other dom-modules that contain styling\n let include = e.getAttribute(INCLUDE_ATTR);\n if (include) {\n styles.push(...stylesFromModules(include).filter(function(item, index, self) {\n return self.indexOf(item) === index;\n }));\n }\n if (baseURI) {\n e.textContent =\n resolveCss(e.textContent, /** @type {string} */ (baseURI));\n }\n styles.push(e);\n }\n template._styles = styles;\n }\n return template._styles;\n}\n\n/**\n * Returns a list of <style> elements from stylesheets loaded via `<link rel=\"import\" type=\"css\">` links within the specified `dom-module`.\n *\n * @param {string} moduleId Id of `dom-module` to gather CSS from\n * @return {!Array<!HTMLStyleElement>} Array of contained styles.\n */\nexport function stylesFromModuleImports(moduleId) {\n let m = importModule(moduleId);\n return m ? _stylesFromModuleImports(m) : [];\n}\n\n/**\n * @param {!HTMLElement} module dom-module element that could contain `<link rel=\"import\" type=\"css\">` styles\n * @return {!Array<!HTMLStyleElement>} Array of contained styles\n */\nfunction _stylesFromModuleImports(module) {\n const styles = [];\n const p$ = module.querySelectorAll(MODULE_STYLE_LINK_SELECTOR);\n for (let i=0; i < p$.length; i++) {\n let p = p$[i];\n if (p.import) {\n const importDoc = p.import;\n const unscoped = p.hasAttribute(SHADY_UNSCOPED_ATTR);\n if (unscoped && !importDoc._unscopedStyle) {\n const style = styleForImport(importDoc);\n style.setAttribute(SHADY_UNSCOPED_ATTR, '');\n importDoc._unscopedStyle = style;\n } else if (!importDoc._style) {\n importDoc._style = styleForImport(importDoc);\n }\n styles.push(unscoped ? importDoc._unscopedStyle : importDoc._style);\n }\n }\n return styles;\n}\n\n/**\n *\n * Returns CSS text of styles in a space-separated list of `dom-module`s.\n * Note: This method is deprecated, use `stylesFromModules` instead.\n *\n * @deprecated\n * @param {string} moduleIds List of dom-module id's within which to\n * search for css.\n * @return {string} Concatenated CSS content from specified `dom-module`s\n */\nexport function cssFromModules(moduleIds) {\n let modules = moduleIds.trim().split(/\\s+/);\n let cssText = '';\n for (let i=0; i < modules.length; i++) {\n cssText += cssFromModule(modules[i]);\n }\n return cssText;\n}\n\n/**\n * Returns CSS text of styles in a given `dom-module`. CSS in a `dom-module`\n * can come either from `<style>`s within the first `<template>`, or else\n * from one or more `<link rel=\"import\" type=\"css\">` links outside the\n * template.\n *\n * Any `<styles>` processed are removed from their original location.\n * Note: This method is deprecated, use `styleFromModule` instead.\n *\n * @deprecated\n * @param {string} moduleId dom-module id to gather styles from\n * @return {string} Concatenated CSS content from specified `dom-module`\n */\nexport function cssFromModule(moduleId) {\n let m = importModule(moduleId);\n if (m && m._cssText === undefined) {\n // module imports: <link rel=\"import\" type=\"css\">\n let cssText = _cssFromModuleImports(m);\n // include css from the first template in the module\n let t = /** @type {?HTMLTemplateElement} */(m.querySelector('template'));\n if (t) {\n cssText += cssFromTemplate(t,\n /** @type {templateWithAssetPath} */(m).assetpath);\n }\n m._cssText = cssText || null;\n }\n if (!m) {\n console.warn('Could not find style data in module named', moduleId);\n }\n return m && m._cssText || '';\n}\n\n/**\n * Returns CSS text of `<styles>` within a given template.\n *\n * Any `<styles>` processed are removed from their original location.\n * Note: This method is deprecated, use `styleFromTemplate` instead.\n *\n * @deprecated\n * @param {!HTMLTemplateElement} template Template to gather styles from\n * @param {string} baseURI Base URI to resolve the URL against\n * @return {string} Concatenated CSS content from specified template\n */\nexport function cssFromTemplate(template, baseURI) {\n let cssText = '';\n const e$ = stylesFromTemplate(template, baseURI);\n // if element is a template, get content from its .content\n for (let i=0; i < e$.length; i++) {\n let e = e$[i];\n if (e.parentNode) {\n e.parentNode.removeChild(e);\n }\n cssText += e.textContent;\n }\n return cssText;\n}\n\n/**\n * Returns CSS text from stylesheets loaded via `<link rel=\"import\" type=\"css\">`\n * links within the specified `dom-module`.\n *\n * Note: This method is deprecated, use `stylesFromModuleImports` instead.\n *\n * @deprecated\n *\n * @param {string} moduleId Id of `dom-module` to gather CSS from\n * @return {string} Concatenated CSS content from links in specified `dom-module`\n */\nexport function cssFromModuleImports(moduleId) {\n let m = importModule(moduleId);\n return m ? _cssFromModuleImports(m) : '';\n}\n\n/**\n * @deprecated\n * @param {!HTMLElement} module dom-module element that could contain `<link rel=\"import\" type=\"css\">` styles\n * @return {string} Concatenated CSS content from links in the dom-module\n */\nfunction _cssFromModuleImports(module) {\n let cssText = '';\n let styles = _stylesFromModuleImports(module);\n for (let i=0; i < styles.length; i++) {\n cssText += styles[i].textContent;\n }\n return cssText;\n}\n","/**\n@license\nCopyright (c) 2017 The Polymer Project Authors. All rights reserved.\nThis code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt\nThe complete set of authors may be found at http://polymer.github.io/AUTHORS.txt\nThe complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt\nCode distributed by Google as part of the polymer project is also\nsubject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt\n*/\n\n/* eslint-disable valid-jsdoc */\n/**\n * Node wrapper to ensure ShadowDOM safe operation regardless of polyfill\n * presence or mode. Note that with the introduction of `ShadyDOM.noPatch`,\n * a node wrapper must be used to access ShadowDOM API.\n * This is similar to using `Polymer.dom` but relies exclusively\n * on the presence of the ShadyDOM polyfill rather than requiring the loading\n * of legacy (Polymer.dom) API.\n * @type {function(Node):Node}\n */\nexport const wrap = (window['ShadyDOM'] && window['ShadyDOM']['noPatch'] && window['ShadyDOM']['wrap']) ?\n window['ShadyDOM']['wrap'] :\n (window['ShadyDOM'] ? (n) => ShadyDOM['patch'](n) : (n) => n);\n\n","/**\n@license\nCopyright (c) 2017 The Polymer Project Authors. All rights reserved.\nThis code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt\nThe complete set of authors may be found at http://polymer.github.io/AUTHORS.txt\nThe complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt\nCode distributed by Google as part of the polymer project is also\nsubject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt\n*/\nimport './boot.js';\n\n/**\n * Module with utilities for manipulating structured data path strings.\n *\n * @summary Module with utilities for manipulating structured data path strings.\n */\n\n/**\n * Returns true if the given string is a structured data path (has dots).\n *\n * Example:\n *\n * ```\n * isPath('foo.bar.baz') // true\n * isPath('foo') // false\n * ```\n *\n * @param {string} path Path string\n * @return {boolean} True if the string contained one or more dots\n */\nexport function isPath(path) {\n return path.indexOf('.') >= 0;\n}\n\n/**\n * Returns the root property name for the given path.\n *\n * Example:\n *\n * ```\n * root('foo.bar.baz') // 'foo'\n * root('foo') // 'foo'\n * ```\n *\n * @param {string} path Path string\n * @return {string} Root property name\n */\nexport function root(path) {\n let dotIndex = path.indexOf('.');\n if (dotIndex === -1) {\n return path;\n }\n return path.slice(0, dotIndex);\n}\n\n/**\n * Given `base` is `foo.bar`, `foo` is an ancestor, `foo.bar` is not\n * Returns true if the given path is an ancestor of the base path.\n *\n * Example:\n *\n * ```\n * isAncestor('foo.bar', 'foo') // true\n * isAncestor('foo.bar', 'foo.bar') // false\n * isAncestor('foo.bar', 'foo.bar.baz') // false\n * ```\n *\n * @param {string} base Path string to test against.\n * @param {string} path Path string to test.\n * @return {boolean} True if `path` is an ancestor of `base`.\n */\nexport function isAncestor(base, path) {\n // base.startsWith(path + '.');\n return base.indexOf(path + '.') === 0;\n}\n\n/**\n * Given `base` is `foo.bar`, `foo.bar.baz` is an descendant\n *\n * Example:\n *\n * ```\n * isDescendant('foo.bar', 'foo.bar.baz') // true\n * isDescendant('foo.bar', 'foo.bar') // false\n * isDescendant('foo.bar', 'foo') // false\n * ```\n *\n * @param {string} base Path string to test against.\n * @param {string} path Path string to test.\n * @return {boolean} True if `path` is a descendant of `base`.\n */\nexport function isDescendant(base, path) {\n // path.startsWith(base + '.');\n return path.indexOf(base + '.') === 0;\n}\n\n/**\n * Replaces a previous base path with a new base path, preserving the\n * remainder of the path.\n *\n * User must ensure `path` has a prefix of `base`.\n *\n * Example:\n *\n * ```\n * translate('foo.bar', 'zot', 'foo.bar.baz') // 'zot.baz'\n * ```\n *\n * @param {string} base Current base string to remove\n * @param {string} newBase New base string to replace with\n * @param {string} path Path to translate\n * @return {string} Translated string\n */\nexport function translate(base, newBase, path) {\n return newBase + path.slice(base.length);\n}\n\n/**\n * @param {string} base Path string to test against\n * @param {string} path Path string to test\n * @return {boolean} True if `path` is equal to `base`\n */\nexport function matches(base, path) {\n return (base === path) ||\n isAncestor(base, path) ||\n isDescendant(base, path);\n}\n\n/**\n * Converts array-based paths to flattened path. String-based paths\n * are returned as-is.\n *\n * Example:\n *\n * ```\n * normalize(['foo.bar', 0, 'baz']) // 'foo.bar.0.baz'\n * normalize('foo.bar.0.baz') // 'foo.bar.0.baz'\n * ```\n *\n * @param {string | !Array<string|number>} path Input path\n * @return {string} Flattened path\n */\nexport function normalize(path) {\n if (Array.isArray(path)) {\n let parts = [];\n for (let i=0; i<path.length; i++) {\n let args = path[i].toString().split('.');\n for (let j=0; j<args.length; j++) {\n parts.push(args[j]);\n }\n }\n return parts.join('.');\n } else {\n return path;\n }\n}\n\n/**\n * Splits a path into an array of property names. Accepts either arrays\n * of path parts or strings.\n *\n * Example:\n *\n * ```\n * split(['foo.bar', 0, 'baz']) // ['foo', 'bar', '0', 'baz']\n * split('foo.bar.0.baz') // ['foo', 'bar', '0', 'baz']\n * ```\n *\n * @param {string | !Array<string|number>} path Input path\n * @return {!Array<string>} Array of path parts\n * @suppress {checkTypes}\n */\nexport function split(path) {\n if (Array.isArray(path)) {\n return normalize(path).split('.');\n }\n return path.toString().split('.');\n}\n\n/**\n * Reads a value from a path. If any sub-property in the path is `undefined`,\n * this method returns `undefined` (will never throw.\n *\n * @param {Object} root Object from which to dereference path from\n * @param {string | !Array<string|number>} path Path to read\n * @param {Object=} info If an object is provided to `info`, the normalized\n * (flattened) path will be set to `info.path`.\n * @return {*} Value at path, or `undefined` if the path could not be\n * fully dereferenced.\n */\nexport function get(root, path, info) {\n let prop = root;\n let parts = split(path);\n // Loop over path parts[0..n-1] and dereference\n for (let i=0; i<parts.length; i++) {\n if (!prop) {\n return;\n }\n let part = parts[i];\n prop = prop[part];\n }\n if (info) {\n info.path = parts.join('.');\n }\n return prop;\n}\n\n/**\n * Sets a value to a path. If any sub-property in the path is `undefined`,\n * this method will no-op.\n *\n * @param {Object} root Object from which to dereference path from\n * @param {string | !Array<string|number>} path Path to set\n * @param {*} value Value to set to path\n * @return {string | undefined} The normalized version of the input path\n */\nexport function set(root, path, value) {\n let prop = root;\n let parts = split(path);\n let last = parts[parts.length-1];\n if (parts.length > 1) {\n // Loop over path parts[0..n-2] and dereference\n for (let i=0; i<parts.length-1; i++) {\n let part = parts[i];\n prop = prop[part];\n if (!prop) {\n return;\n }\n }\n // Set value to object at end of path\n prop[last] = value;\n } else {\n // Simple property set\n prop[path] = value;\n }\n return parts.join('.');\n}\n\n/**\n * Returns true if the given string is a structured data path (has dots).\n *\n * This function is deprecated. Use `isPath` instead.\n *\n * Example:\n *\n * ```\n * isDeep('foo.bar.baz') // true\n * isDeep('foo') // false\n * ```\n *\n * @deprecated\n * @param {string} path Path string\n * @return {boolean} True if the string contained one or more dots\n */\nexport const isDeep = isPath;\n","/**\n@license\nCopyright (c) 2017 The Polymer Project Authors. All rights reserved.\nThis code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt\nThe complete set of authors may be found at http://polymer.github.io/AUTHORS.txt\nThe complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt\nCode distributed by Google as part of the polymer project is also\nsubject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt\n*/\nimport './boot.js';\n\nconst caseMap = {};\nconst DASH_TO_CAMEL = /-[a-z]/g;\nconst CAMEL_TO_DASH = /([A-Z])/g;\n\n/**\n * @fileoverview Module with utilities for converting between \"dash-case\" and\n * \"camelCase\" identifiers.\n */\n\n/**\n * Converts \"dash-case\" identifier (e.g. `foo-bar-baz`) to \"camelCase\"\n * (e.g. `fooBarBaz`).\n *\n * @param {string} dash Dash-case identifier\n * @return {string} Camel-case representation of the identifier\n */\nexport function dashToCamelCase(dash) {\n return caseMap[dash] || (\n caseMap[dash] = dash.indexOf('-') < 0 ? dash : dash.replace(DASH_TO_CAMEL,\n (m) => m[1].toUpperCase()\n )\n );\n}\n\n/**\n * Converts \"camelCase\" identifier (e.g. `fooBarBaz`) to \"dash-case\"\n * (e.g. `foo-bar-baz`).\n *\n * @param {string} camel Camel-case identifier\n * @return {string} Dash-case representation of the identifier\n */\nexport function camelToDashCase(camel) {\n return caseMap[camel] || (\n caseMap[camel] = camel.replace(CAMEL_TO_DASH, '-$1').toLowerCase()\n );\n}\n","/**\n@license\nCopyright (c) 2017 The Polymer Project Authors. All rights reserved.\nThis code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt\nThe complete set of authors may be found at http://polymer.github.io/AUTHORS.txt\nThe complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt\nCode distributed by Google as part of the polymer project is also\nsubject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt\n*/\n\n/**\n * @fileoverview\n *\n * This module provides a number of strategies for enqueuing asynchronous\n * tasks. Each sub-module provides a standard `run(fn)` interface that returns a\n * handle, and a `cancel(handle)` interface for canceling async tasks before\n * they run.\n *\n * @summary Module that provides a number of strategies for enqueuing\n * asynchronous tasks.\n */\n\nimport './boot.js';\n\n// Microtask implemented using Mutation Observer\nlet microtaskCurrHandle = 0;\nlet microtaskLastHandle = 0;\nlet microtaskCallbacks = [];\nlet microtaskNodeContent = 0;\nlet microtaskScheduled = false;\nlet microtaskNode = document.createTextNode('');\nnew window.MutationObserver(microtaskFlush).observe(microtaskNode, {characterData: true});\n\nfunction microtaskFlush() {\n microtaskScheduled = false;\n const len = microtaskCallbacks.length;\n for (let i = 0; i < len; i++) {\n let cb = microtaskCallbacks[i];\n if (cb) {\n try {\n cb();\n } catch (e) {\n setTimeout(() => { throw e; });\n }\n }\n }\n microtaskCallbacks.splice(0, len);\n microtaskLastHandle += len;\n}\n\n/**\n * Async interface wrapper around `setTimeout`.\n *\n * @namespace\n * @summary Async interface wrapper around `setTimeout`.\n */\nconst timeOut = {\n /**\n * Returns a sub-module with the async interface providing the provided\n * delay.\n *\n * @memberof timeOut\n * @param {number=} delay Time to wait before calling callbacks in ms\n * @return {!AsyncInterface} An async timeout interface\n */\n after(delay) {\n return {\n run(fn) { return window.setTimeout(fn, delay); },\n cancel(handle) {\n window.clearTimeout(handle);\n }\n };\n },\n /**\n * Enqueues a function called in the next task.\n *\n * @memberof timeOut\n * @param {!Function} fn Callback to run\n * @param {number=} delay Delay in milliseconds\n * @return {number} Handle used for canceling task\n */\n run(fn, delay) {\n return window.setTimeout(fn, delay);\n },\n /**\n * Cancels a previously enqueued `timeOut` callback.\n *\n * @memberof timeOut\n * @param {number} handle Handle returned from `run` of callback to cancel\n * @return {void}\n */\n cancel(handle) {\n window.clearTimeout(handle);\n }\n};\nexport {timeOut};\n\n/**\n * Async interface wrapper around `requestAnimationFrame`.\n *\n * @namespace\n * @summary Async interface wrapper around `requestAnimationFrame`.\n */\nconst animationFrame = {\n /**\n * Enqueues a function called at `requestAnimationFrame` timing.\n *\n * @memberof animationFrame\n * @param {function(number):void} fn Callback to run\n * @return {number} Handle used for canceling task\n */\n run(fn) {\n return window.requestAnimationFrame(fn);\n },\n /**\n * Cancels a previously enqueued `animationFrame` callback.\n *\n * @memberof animationFrame\n * @param {number} handle Handle returned from `run` of callback to cancel\n * @return {void}\n */\n cancel(handle) {\n window.cancelAnimationFrame(handle);\n }\n};\nexport {animationFrame};\n\n/**\n * Async interface wrapper around `requestIdleCallback`. Falls back to\n * `setTimeout` on browsers that do not support `requestIdleCallback`.\n *\n * @namespace\n * @summary Async interface wrapper around `requestIdleCallback`.\n */\nconst idlePeriod = {\n /**\n * Enqueues a function called at `requestIdleCallback` timing.\n *\n * @memberof idlePeriod\n * @param {function(!IdleDeadline):void} fn Callback to run\n * @return {number} Handle used for canceling task\n */\n run(fn) {\n return window.requestIdleCallback ?\n window.requestIdleCallback(fn) :\n window.setTimeout(fn, 16);\n },\n /**\n * Cancels a previously enqueued `idlePeriod` callback.\n *\n * @memberof idlePeriod\n * @param {number} handle Handle returned from `run` of callback to cancel\n * @return {void}\n */\n cancel(handle) {\n window.cancelIdleCallback ?\n window.cancelIdleCallback(handle) :\n window.clearTimeout(handle);\n }\n};\nexport {idlePeriod};\n\n/**\n * Async interface for enqueuing callbacks that run at microtask timing.\n *\n * Note that microtask timing is achieved via a single `MutationObserver`,\n * and thus callbacks enqueued with this API will all run in a single\n * batch, and not interleaved with other microtasks such as promises.\n * Promises are avoided as an implementation choice for the time being\n * due to Safari bugs that cause Promises to lack microtask guarantees.\n *\n * @namespace\n * @summary Async interface for enqueuing callbacks that run at microtask\n * timing.\n */\nconst microTask = {\n\n /**\n * Enqueues a function called at microtask timing.\n *\n * @memberof microTask\n * @param {!Function=} callback Callback to run\n * @return {number} Handle used for canceling task\n */\n run(callback) {\n if (!microtaskScheduled) {\n microtaskScheduled = true;\n microtaskNode.textContent = microtaskNodeContent++;\n }\n microtaskCallbacks.push(callback);\n return microtaskCurrHandle++;\n },\n\n /**\n * Cancels a previously enqueued `microTask` callback.\n *\n * @memberof microTask\n * @param {number} handle Handle returned from `run` of callback to cancel\n * @return {void}\n */\n cancel(handle) {\n const idx = handle - microtaskLastHandle;\n if (idx >= 0) {\n if (!microtaskCallbacks[idx]) {\n throw new Error('invalid async handle: ' + handle);\n }\n microtaskCallbacks[idx] = null;\n }\n }\n\n};\nexport {microTask};\n","/**\n@license\nCopyright (c) 2017 The Polymer Project Authors. All rights reserved.\nThis code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt\nThe complete set of authors may be found at http://polymer.github.io/AUTHORS.txt\nThe complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt\nCode distributed by Google as part of the polymer project is also\nsubject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt\n*/\nimport '../utils/boot.js';\n\nimport { dedupingMixin } from '../utils/mixin.js';\nimport { microTask } from '../utils/async.js';\nimport { wrap } from '../utils/wrap.js';\n\n/** @const {!AsyncInterface} */\nconst microtask = microTask;\n\n/**\n * Element class mixin that provides basic meta-programming for creating one\n * or more property accessors (getter/setter pair) that enqueue an async\n * (batched) `_propertiesChanged` callback.\n *\n * For basic usage of this mixin, call `MyClass.createProperties(props)`\n * once at class definition time to create property accessors for properties\n * named in props, implement `_propertiesChanged` to react as desired to\n * property changes, and implement `static get observedAttributes()` and\n * include lowercase versions of any property names that should be set from\n * attributes. Last, call `this._enableProperties()` in the element's\n * `connectedCallback` to enable the accessors.\n *\n * @mixinFunction\n * @polymer\n * @summary Element class mixin for reacting to property changes from\n * generated property accessors.\n * @template T\n * @param {function(new:T)} superClass Class to apply mixin to.\n * @return {function(new:T)} superClass with mixin applied.\n */\nexport const PropertiesChanged = dedupingMixin(\n /**\n * @template T\n * @param {function(new:T)} superClass Class to apply mixin to.\n * @return {function(new:T)} superClass with mixin applied.\n */\n (superClass) => {\n\n /**\n * @polymer\n * @mixinClass\n * @implements {Polymer_PropertiesChanged}\n * @unrestricted\n */\n class PropertiesChanged extends superClass {\n\n /**\n * Creates property accessors for the given property names.\n * @param {!Object} props Object whose keys are names of accessors.\n * @return {void}\n * @protected\n * @nocollapse\n */\n static createProperties(props) {\n const proto = this.prototype;\n for (let prop in props) {\n // don't stomp an existing accessor\n if (!(prop in proto)) {\n proto._createPropertyAccessor(prop);\n }\n }\n }\n\n /**\n * Returns an attribute name that corresponds to the given property.\n * The attribute name is the lowercased property name. Override to\n * customize this mapping.\n * @param {string} property Property to convert\n * @return {string} Attribute name corresponding to the given property.\n *\n * @protected\n * @nocollapse\n */\n static attributeNameForProperty(property) {\n return property.toLowerCase();\n }\n\n /**\n * Override point to provide a type to which to deserialize a value to\n * a given property.\n * @param {string} name Name of property\n *\n * @protected\n * @nocollapse\n */\n static typeForProperty(name) { } //eslint-disable-line no-unused-vars\n\n /**\n * Creates a setter/getter pair for the named property with its own\n * local storage. The getter returns the value in the local storage,\n * and the setter calls `_setProperty`, which updates the local storage\n * for the property and enqueues a `_propertiesChanged` callback.\n *\n * This method may be called on a prototype or an instance. Calling\n * this method may overwrite a property value that already exists on\n * the prototype/instance by creating the accessor.\n *\n * @param {string} property Name of the property\n * @param {boolean=} readOnly When true, no setter is created; the\n * protected `_setProperty` function must be used to set the property\n * @return {void}\n * @protected\n * @override\n */\n _createPropertyAccessor(property, readOnly) {\n this._addPropertyToAttributeMap(property);\n if (!this.hasOwnProperty(JSCompiler_renameProperty('__dataHasAccessor', this))) {\n this.__dataHasAccessor = Object.assign({}, this.__dataHasAccessor);\n }\n if (!this.__dataHasAccessor[property]) {\n this.__dataHasAccessor[property] = true;\n this._definePropertyAccessor(property, readOnly);\n }\n }\n\n /**\n * Adds the given `property` to a map matching attribute names\n * to property names, using `attributeNameForProperty`. This map is\n * used when deserializing attribute values to properties.\n *\n * @param {string} property Name of the property\n * @override\n */\n _addPropertyToAttributeMap(property) {\n if (!this.hasOwnProperty(JSCompiler_renameProperty('__dataAttributes', this))) {\n this.__dataAttributes = Object.assign({}, this.__dataAttributes);\n }\n // This check is technically not correct; it's an optimization that\n // assumes that if a _property_ name is already in the map (note this is\n // an attr->property map), the property mapped directly to the attribute\n // and it has already been mapped. This would fail if\n // `attributeNameForProperty` were overridden such that this was not the\n // case.\n let attr = this.__dataAttributes[property];\n if (!attr) {\n attr = this.constructor.attributeNameForProperty(property);\n this.__dataAttributes[attr] = property;\n }\n return attr;\n }\n\n /**\n * Defines a property accessor for the given property.\n * @param {string} property Name of the property\n * @param {boolean=} readOnly When true, no setter is created\n * @return {void}\n * @override\n */\n _definePropertyAccessor(property, readOnly) {\n Object.defineProperty(this, property, {\n /* eslint-disable valid-jsdoc */\n /** @this {PropertiesChanged} */\n get() {\n // Inline for perf instead of using `_getProperty`\n return this.__data[property];\n },\n /** @this {PropertiesChanged} */\n set: readOnly ? function () {} : function (value) {\n // Inline for perf instead of using `_setProperty`\n if (this._setPendingProperty(property, value, true)) {\n this._invalidateProperties();\n }\n }\n /* eslint-enable */\n });\n }\n\n constructor() {\n super();\n /** @type {boolean} */\n this.__dataEnabled = false;\n this.__dataReady = false;\n this.__dataInvalid = false;\n this.__data = {};\n this.__dataPending = null;\n this.__dataOld = null;\n this.__dataInstanceProps = null;\n /** @type {number} */\n // NOTE: used to track re-entrant calls to `_flushProperties`\n this.__dataCounter = 0;\n this.__serializing = false;\n this._initializeProperties();\n }\n\n /**\n * Lifecycle callback called when properties are enabled via\n * `_enableProperties`.\n *\n * Users may override this function to implement behavior that is\n * dependent on the element having its property data initialized, e.g.\n * from defaults (initialized from `constructor`, `_initializeProperties`),\n * `attributeChangedCallback`, or values propagated from host e.g. via\n * bindings. `super.ready()` must be called to ensure the data system\n * becomes enabled.\n *\n * @return {void}\n * @public\n * @override\n */\n ready() {\n this.__dataReady = true;\n this._flushProperties();\n }\n\n /**\n * Initializes the local storage for property accessors.\n *\n * Provided as an override point for performing any setup work prior\n * to initializing the property accessor system.\n *\n * @return {void}\n * @protected\n * @override\n */\n _initializeProperties() {\n // Capture instance properties; these will be set into accessors\n // during first flush. Don't set them here, since we want\n // these to overwrite defaults/constructor assignments\n for (let p in this.__dataHasAccessor) {\n if (this.hasOwnProperty(p)) {\n this.__dataInstanceProps = this.__dataInstanceProps || {};\n this.__dataInstanceProps[p] = this[p];\n delete this[p];\n }\n }\n }\n\n /**\n * Called at ready time with bag of instance properties that overwrote\n * accessors when the element upgraded.\n *\n * The default implementation sets these properties back into the\n * setter at ready time. This method is provided as an override\n * point for customizing or providing more efficient initialization.\n *\n * @param {Object} props Bag of property values that were overwritten\n * when creating property accessors.\n * @return {void}\n * @protected\n * @override\n */\n _initializeInstanceProperties(props) {\n Object.assign(this, props);\n }\n\n /**\n * Updates the local storage for a property (via `_setPendingProperty`)\n * and enqueues a `_proeprtiesChanged` callback.\n *\n * @param {string} property Name of the property\n * @param {*} value Value to set\n * @return {void}\n * @protected\n * @override\n */\n _setProperty(property, value) {\n if (this._setPendingProperty(property, value)) {\n this._invalidateProperties();\n }\n }\n\n /**\n * Returns the value for the given property.\n * @param {string} property Name of property\n * @return {*} Value for the given property\n * @protected\n * @override\n */\n _getProperty(property) {\n return this.__data[property];\n }\n\n /* eslint-disable no-unused-vars */\n /**\n * Updates the local storage for a property, records the previous value,\n * and adds it to the set of \"pending changes\" that will be passed to the\n * `_propertiesChanged` callback. This method does not enqueue the\n * `_propertiesChanged` callback.\n *\n * @param {string} property Name of the property\n * @param {*} value Value to set\n * @param {boolean=} ext Not used here; affordance for closure\n * @return {boolean} Returns true if the property changed\n * @protected\n * @override\n */\n _setPendingProperty(property, value, ext) {\n let old = this.__data[property];\n let changed = this._shouldPropertyChange(property, value, old);\n if (changed) {\n if (!this.__dataPending) {\n this.__dataPending = {};\n this.__dataOld = {};\n }\n // Ensure old is captured from the last turn\n if (this.__dataOld && !(property in this.__dataOld)) {\n this.__dataOld[property] = old;\n }\n this.__data[property] = value;\n this.__dataPending[property] = value;\n }\n return changed;\n }\n /* eslint-enable */\n\n /**\n * @param {string} property Name of the property\n * @return {boolean} Returns true if the property is pending.\n */\n _isPropertyPending(property) {\n return !!(this.__dataPending && this.__dataPending.hasOwnProperty(property));\n }\n\n /**\n * Marks the properties as invalid, and enqueues an async\n * `_propertiesChanged` callback.\n *\n * @return {void}\n * @protected\n * @override\n */\n _invalidateProperties() {\n if (!this.__dataInvalid && this.__dataReady) {\n this.__dataInvalid = true;\n microtask.run(() => {\n if (this.__dataInvalid) {\n this.__dataInvalid = false;\n this._flushProperties();\n }\n });\n }\n }\n\n /**\n * Call to enable property accessor processing. Before this method is\n * called accessor values will be set but side effects are\n * queued. When called, any pending side effects occur immediately.\n * For elements, generally `connectedCallback` is a normal spot to do so.\n * It is safe to call this method multiple times as it only turns on\n * property accessors once.\n *\n * @return {void}\n * @protected\n * @override\n */\n _enableProperties() {\n if (!this.__dataEnabled) {\n this.__dataEnabled = true;\n if (this.__dataInstanceProps) {\n this._initializeInstanceProperties(this.__dataInstanceProps);\n this.__dataInstanceProps = null;\n }\n this.ready();\n }\n }\n\n /**\n * Calls the `_propertiesChanged` callback with the current set of\n * pending changes (and old values recorded when pending changes were\n * set), and resets the pending set of changes. Generally, this method\n * should not be called in user code.\n *\n * @return {void}\n * @protected\n * @override\n */\n _flushProperties() {\n this.__dataCounter++;\n const props = this.__data;\n const changedProps = this.__dataPending;\n const old = this.__dataOld;\n if (this._shouldPropertiesChange(props, changedProps, old)) {\n this.__dataPending = null;\n this.__dataOld = null;\n this._propertiesChanged(props, changedProps, old);\n }\n this.__dataCounter--;\n }\n\n /**\n * Called in `_flushProperties` to determine if `_propertiesChanged`\n * should be called. The default implementation returns true if\n * properties are pending. Override to customize when\n * `_propertiesChanged` is called.\n * @param {!Object} currentProps Bag of all current accessor values\n * @param {?Object} changedProps Bag of properties changed since the last\n * call to `_propertiesChanged`\n * @param {?Object} oldProps Bag of previous values for each property\n * in `changedProps`\n * @return {boolean} true if changedProps is truthy\n * @override\n */\n _shouldPropertiesChange(currentProps, changedProps, oldProps) { // eslint-disable-line no-unused-vars\n return Boolean(changedProps);\n }\n\n /**\n * Callback called when any properties with accessors created via\n * `_createPropertyAccessor` have been set.\n *\n * @param {!Object} currentProps Bag of all current accessor values\n * @param {?Object} changedProps Bag of properties changed since the last\n * call to `_propertiesChanged`\n * @param {?Object} oldProps Bag of previous values for each property\n * in `changedProps`\n * @return {void}\n * @protected\n * @override\n */\n _propertiesChanged(currentProps, changedProps, oldProps) { // eslint-disable-line no-unused-vars\n }\n\n /**\n * Method called to determine whether a property value should be\n * considered as a change and cause the `_propertiesChanged` callback\n * to be enqueued.\n *\n * The default implementation returns `true` if a strict equality\n * check fails. The method always returns false for `NaN`.\n *\n * Override this method to e.g. provide stricter checking for\n * Objects/Arrays when using immutable patterns.\n *\n * @param {string} property Property name\n * @param {*} value New property value\n * @param {*} old Previous property value\n * @return {boolean} Whether the property should be considered a change\n * and enqueue a `_proeprtiesChanged` callback\n * @protected\n * @override\n */\n _shouldPropertyChange(property, value, old) {\n return (\n // Strict equality check\n (old !== value &&\n // This ensures (old==NaN, value==NaN) always returns false\n (old === old || value === value))\n );\n }\n\n /**\n * Implements native Custom Elements `attributeChangedCallback` to\n * set an attribute value to a property via `_attributeToProperty`.\n *\n * @param {string} name Name of attribute that changed\n * @param {?string} old Old attribute value\n * @param {?string} value New attribute value\n * @param {?string} namespace Attribute namespace.\n * @return {void}\n * @suppress {missingProperties} Super may or may not implement the callback\n * @override\n */\n attributeChangedCallback(name, old, value, namespace) {\n if (old !== value) {\n this._attributeToProperty(name, value);\n }\n if (super.attributeChangedCallback) {\n super.attributeChangedCallback(name, old, value, namespace);\n }\n }\n\n /**\n * Deserializes an attribute to its associated property.\n *\n * This method calls the `_deserializeValue` method to convert the string to\n * a typed value.\n *\n * @param {string} attribute Name of attribute to deserialize.\n * @param {?string} value of the attribute.\n * @param {*=} type type to deserialize to, defaults to the value\n * returned from `typeForProperty`\n * @return {void}\n * @override\n */\n _attributeToProperty(attribute, value, type) {\n if (!this.__serializing) {\n const map = this.__dataAttributes;\n const property = map && map[attribute] || attribute;\n this[property] = this._deserializeValue(value, type ||\n this.constructor.typeForProperty(property));\n }\n }\n\n /**\n * Serializes a property to its associated attribute.\n *\n * @suppress {invalidCasts} Closure can't figure out `this` is an element.\n *\n * @param {string} property Property name to reflect.\n * @param {string=} attribute Attribute name to reflect to.\n * @param {*=} value Property value to refect.\n * @return {void}\n * @override\n */\n _propertyToAttribute(property, attribute, value) {\n this.__serializing = true;\n value = (arguments.length < 3) ? this[property] : value;\n this._valueToNodeAttribute(/** @type {!HTMLElement} */(this), value,\n attribute || this.constructor.attributeNameForProperty(property));\n this.__serializing = false;\n }\n\n /**\n * Sets a typed value to an HTML attribute on a node.\n *\n * This method calls the `_serializeValue` method to convert the typed\n * value to a string. If the `_serializeValue` method returns `undefined`,\n * the attribute will be removed (this is the default for boolean\n * type `false`).\n *\n * @param {Element} node Element to set attribute to.\n * @param {*} value Value to serialize.\n * @param {string} attribute Attribute name to serialize to.\n * @return {void}\n * @override\n */\n _valueToNodeAttribute(node, value, attribute) {\n const str = this._serializeValue(value);\n if (attribute === 'class' || attribute === 'name' || attribute === 'slot') {\n node = /** @type {?Element} */(wrap(node));\n }\n if (str === undefined) {\n node.removeAttribute(attribute);\n } else {\n node.setAttribute(\n attribute,\n // Closure's type for `setAttribute`'s second parameter incorrectly\n // excludes `TrustedScript`.\n (str === '' && window.trustedTypes) ?\n /** @type {?} */ (window.trustedTypes.emptyScript) :\n str);\n }\n }\n\n /**\n * Converts a typed JavaScript value to a string.\n *\n * This method is called when setting JS property values to\n * HTML attributes. Users may override this method to provide\n * serialization for custom types.\n *\n * @param {*} value Property value to serialize.\n * @return {string | undefined} String serialized from the provided\n * property value.\n * @override\n */\n _serializeValue(value) {\n switch (typeof value) {\n case 'boolean':\n return value ? '' : undefined;\n default:\n return value != null ? value.toString() : undefined;\n }\n }\n\n /**\n * Converts a string to a typed JavaScript value.\n *\n * This method is called when reading HTML attribute values to\n * JS properties. Users may override this method to provide\n * deserialization for custom `type`s. Types for `Boolean`, `String`,\n * and `Number` convert attributes to the expected types.\n *\n * @param {?string} value Value to deserialize.\n * @param {*=} type Type to deserialize the string to.\n * @return {*} Typed value deserialized from the provided string.\n * @override\n */\n _deserializeValue(value, type) {\n switch (type) {\n case Boolean:\n return (value !== null);\n case Number:\n return Number(value);\n default:\n return value;\n }\n }\n\n }\n\n return PropertiesChanged;\n});\n","/**\n@license\nCopyright (c) 2017 The Polymer Project Authors. All rights reserved.\nThis code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt\nThe complete set of authors may be found at http://polymer.github.io/AUTHORS.txt\nThe complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt\nCode distributed by Google as part of the polymer project is also\nsubject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt\n*/\nimport '../utils/boot.js';\n\nimport { dedupingMixin } from '../utils/mixin.js';\nimport { camelToDashCase, dashToCamelCase } from '../utils/case-map.js';\nimport { PropertiesChanged } from './properties-changed.js';\n\n// Save map of native properties; this forms a blacklist or properties\n// that won't have their values \"saved\" by `saveAccessorValue`, since\n// reading from an HTMLElement accessor from the context of a prototype throws\nconst nativeProperties = {};\nlet proto = HTMLElement.prototype;\nwhile (proto) {\n let props = Object.getOwnPropertyNames(proto);\n for (let i=0; i<props.length; i++) {\n nativeProperties[props[i]] = true;\n }\n proto = Object.getPrototypeOf(proto);\n}\n\nconst isTrustedType = (() => {\n if (!window.trustedTypes) {\n return () => false;\n }\n return (val) => trustedTypes.isHTML(val) ||\n trustedTypes.isScript(val) || trustedTypes.isScriptURL(val);\n})();\n\n/**\n * Used to save the value of a property that will be overridden with\n * an accessor. If the `model` is a prototype, the values will be saved\n * in `__dataProto`, and it's up to the user (or downstream mixin) to\n * decide how/when to set these values back into the accessors.\n * If `model` is already an instance (it has a `__data` property), then\n * the value will be set as a pending property, meaning the user should\n * call `_invalidateProperties` or `_flushProperties` to take effect\n *\n * @param {Object} model Prototype or instance\n * @param {string} property Name of property\n * @return {void}\n * @private\n */\nfunction saveAccessorValue(model, property) {\n // Don't read/store value for any native properties since they could throw\n if (!nativeProperties[property]) {\n let value = model[property];\n if (value !== undefined) {\n if (model.__data) {\n // Adding accessor to instance; update the property\n // It is the user's responsibility to call _flushProperties\n model._setPendingProperty(property, value);\n } else {\n // Adding accessor to proto; save proto's value for instance-time use\n if (!model.__dataProto) {\n model.__dataProto = {};\n } else if (!model.hasOwnProperty(JSCompiler_renameProperty('__dataProto', model))) {\n model.__dataProto = Object.create(model.__dataProto);\n }\n model.__dataProto[property] = value;\n }\n }\n }\n}\n\n/**\n * Element class mixin that provides basic meta-programming for creating one\n * or more property accessors (getter/setter pair) that enqueue an async\n * (batched) `_propertiesChanged` callback.\n *\n * For basic usage of this mixin:\n *\n * - Declare attributes to observe via the standard `static get\n * observedAttributes()`. Use `dash-case` attribute names to represent\n * `camelCase` property names.\n * - Implement the `_propertiesChanged` callback on the class.\n * - Call `MyClass.createPropertiesForAttributes()` **once** on the class to\n * generate property accessors for each observed attribute. This must be\n * called before the first instance is created, for example, by calling it\n * before calling `customElements.define`. It can also be called lazily from\n * the element's `constructor`, as long as it's guarded so that the call is\n * only made once, when the first instance is created.\n * - Call `this._enableProperties()` in the element's `connectedCallback` to\n * enable the accessors.\n *\n * Any `observedAttributes` will automatically be\n * deserialized via `attributeChangedCallback` and set to the associated\n * property using `dash-case`-to-`camelCase` convention.\n *\n * @mixinFunction\n * @polymer\n * @appliesMixin PropertiesChanged\n * @summary Element class mixin for reacting to property changes from\n * generated property accessors.\n * @template T\n * @param {function(new:T)} superClass Class to apply mixin to.\n * @return {function(new:T)} superClass with mixin applied.\n */\nexport const PropertyAccessors = dedupingMixin(superClass => {\n\n /**\n * @constructor\n * @implements {Polymer_PropertiesChanged}\n * @unrestricted\n * @private\n */\n const base = PropertiesChanged(superClass);\n\n /**\n * @polymer\n * @mixinClass\n * @implements {Polymer_PropertyAccessors}\n * @extends {base}\n * @unrestricted\n */\n class PropertyAccessors extends base {\n\n /**\n * Generates property accessors for all attributes in the standard\n * static `observedAttributes` array.\n *\n * Attribute names are mapped to property names using the `dash-case` to\n * `camelCase` convention\n *\n * @return {void}\n * @nocollapse\n */\n static createPropertiesForAttributes() {\n let a$ = /** @type {?} */ (this).observedAttributes;\n for (let i=0; i < a$.length; i++) {\n this.prototype._createPropertyAccessor(dashToCamelCase(a$[i]));\n }\n }\n\n /**\n * Returns an attribute name that corresponds to the given property.\n * By default, converts camel to dash case, e.g. `fooBar` to `foo-bar`.\n * @param {string} property Property to convert\n * @return {string} Attribute name corresponding to the given property.\n *\n * @protected\n * @nocollapse\n */\n static attributeNameForProperty(property) {\n return camelToDashCase(property);\n }\n\n /**\n * Overrides PropertiesChanged implementation to initialize values for\n * accessors created for values that already existed on the element\n * prototype.\n *\n * @return {void}\n * @protected\n * @override\n */\n _initializeProperties() {\n if (this.__dataProto) {\n this._initializeProtoProperties(this.__dataProto);\n this.__dataProto = null;\n }\n super._initializeProperties();\n }\n\n /**\n * Called at instance time with bag of properties that were overwritten\n * by accessors on the prototype when accessors were created.\n *\n * The default implementation sets these properties back into the\n * setter at instance time. This method is provided as an override\n * point for customizing or providing more efficient initialization.\n *\n * @param {Object} props Bag of property values that were overwritten\n * when creating property accessors.\n * @return {void}\n * @protected\n * @override\n */\n _initializeProtoProperties(props) {\n for (let p in props) {\n this._setProperty(p, props[p]);\n }\n }\n\n /**\n * Ensures the element has the given attribute. If it does not,\n * assigns the given value to the attribute.\n *\n * @suppress {invalidCasts} Closure can't figure out `this` is infact an\n * element\n *\n * @param {string} attribute Name of attribute to ensure is set.\n * @param {string} value of the attribute.\n * @return {void}\n * @override\n */\n _ensureAttribute(attribute, value) {\n const el = /** @type {!HTMLElement} */(this);\n if (!el.hasAttribute(attribute)) {\n this._valueToNodeAttribute(el, value, attribute);\n }\n }\n\n /**\n * Overrides PropertiesChanged implemention to serialize objects as JSON.\n *\n * @param {*} value Property value to serialize.\n * @return {string | undefined} String serialized from the provided property\n * value.\n * @override\n */\n _serializeValue(value) {\n /* eslint-disable no-fallthrough */\n switch (typeof value) {\n case 'object':\n if (value instanceof Date) {\n return value.toString();\n } else if (value) {\n if (isTrustedType(value)) {\n /**\n * Here `value` isn't actually a string, but it should be\n * passed into APIs that normally expect a string, like\n * elem.setAttribute.\n */\n return /** @type {?} */ (value);\n }\n try {\n return JSON.stringify(value);\n } catch(x) {\n return '';\n }\n }\n\n default:\n return super._serializeValue(value);\n }\n }\n\n /**\n * Converts a string to a typed JavaScript value.\n *\n * This method is called by Polymer when reading HTML attribute values to\n * JS properties. Users may override this method on Polymer element\n * prototypes to provide deserialization for custom `type`s. Note,\n * the `type` argument is the value of the `type` field provided in the\n * `properties` configuration object for a given property, and is\n * by convention the constructor for the type to deserialize.\n *\n *\n * @param {?string} value Attribute value to deserialize.\n * @param {*=} type Type to deserialize the string to.\n * @return {*} Typed value deserialized from the provided string.\n * @override\n */\n _deserializeValue(value, type) {\n /**\n * @type {*}\n */\n let outValue;\n switch (type) {\n case Object:\n try {\n outValue = JSON.parse(/** @type {string} */(value));\n } catch(x) {\n // allow non-JSON literals like Strings and Numbers\n outValue = value;\n }\n break;\n case Array:\n try {\n outValue = JSON.parse(/** @type {string} */(value));\n } catch(x) {\n outValue = null;\n console.warn(`Polymer::Attributes: couldn't decode Array as JSON: ${value}`);\n }\n break;\n case Date:\n outValue = isNaN(value) ? String(value) : Number(value);\n outValue = new Date(outValue);\n break;\n default:\n outValue = super._deserializeValue(value, type);\n break;\n }\n return outValue;\n }\n /* eslint-enable no-fallthrough */\n\n /**\n * Overrides PropertiesChanged implementation to save existing prototype\n * property value so that it can be reset.\n * @param {string} property Name of the property\n * @param {boolean=} readOnly When true, no setter is created\n *\n * When calling on a prototype, any overwritten values are saved in\n * `__dataProto`, and it is up to the subclasser to decide how/when\n * to set those properties back into the accessor. When calling on an\n * instance, the overwritten value is set via `_setPendingProperty`,\n * and the user should call `_invalidateProperties` or `_flushProperties`\n * for the values to take effect.\n * @protected\n * @return {void}\n * @override\n */\n _definePropertyAccessor(property, readOnly) {\n saveAccessorValue(this, property);\n super._definePropertyAccessor(property, readOnly);\n }\n\n /**\n * Returns true if this library created an accessor for the given property.\n *\n * @param {string} property Property name\n * @return {boolean} True if an accessor was created\n * @override\n */\n _hasAccessor(property) {\n return this.__dataHasAccessor && this.__dataHasAccessor[property];\n }\n\n /**\n * Returns true if the specified property has a pending change.\n *\n * @param {string} prop Property name\n * @return {boolean} True if property has a pending change\n * @protected\n * @override\n */\n _isPropertyPending(prop) {\n return Boolean(this.__dataPending && (prop in this.__dataPending));\n }\n\n }\n\n return PropertyAccessors;\n\n});\n","/**\n@license\nCopyright (c) 2017 The Polymer Project Authors. All rights reserved.\nThis code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt\nThe complete set of authors may be found at http://polymer.github.io/AUTHORS.txt\nThe complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt\nCode distributed by Google as part of the polymer project is also\nsubject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt\n*/\nimport '../utils/boot.js';\n\nimport { dedupingMixin } from '../utils/mixin.js';\n\n// 1.x backwards-compatible auto-wrapper for template type extensions\n// This is a clear layering violation and gives favored-nation status to\n// dom-if and dom-repeat templates. This is a conceit we're choosing to keep\n// a.) to ease 1.x backwards-compatibility due to loss of `is`, and\n// b.) to maintain if/repeat capability in parser-constrained elements\n// (e.g. table, select) in lieu of native CE type extensions without\n// massive new invention in this space (e.g. directive system)\nconst templateExtensions = {\n 'dom-if': true,\n 'dom-repeat': true\n};\n\nlet placeholderBugDetect = false;\nlet placeholderBug = false;\n\nfunction hasPlaceholderBug() {\n if (!placeholderBugDetect) {\n placeholderBugDetect = true;\n const t = document.createElement('textarea');\n t.placeholder = 'a';\n placeholderBug = t.placeholder === t.textContent;\n }\n return placeholderBug;\n}\n\n/**\n * Some browsers have a bug with textarea, where placeholder text is copied as\n * a textnode child of the textarea.\n *\n * If the placeholder is a binding, this can break template stamping in two\n * ways.\n *\n * One issue is that when the `placeholder` attribute is removed when the\n * binding is processed, the textnode child of the textarea is deleted, and the\n * template info tries to bind into that node.\n *\n * With `legacyOptimizations` in use, when the template is stamped and the\n * `textarea.textContent` binding is processed, no corresponding node is found\n * because it was removed during parsing. An exception is generated when this\n * binding is updated.\n *\n * With `legacyOptimizations` not in use, the template is cloned before\n * processing and this changes the above behavior. The cloned template also has\n * a value property set to the placeholder and textContent. This prevents the\n * removal of the textContent when the placeholder attribute is removed.\n * Therefore the exception does not occur. However, there is an extra\n * unnecessary binding.\n *\n * @param {!Node} node Check node for placeholder bug\n * @return {void}\n */\nfunction fixPlaceholder(node) {\n if (hasPlaceholderBug() && node.localName === 'textarea' && node.placeholder\n && node.placeholder === node.textContent) {\n node.textContent = null;\n }\n}\n\n/**\n * Copies an attribute from one element to another, converting the value to a\n * `TrustedScript` if it is named like a Polymer template event listener.\n *\n * @param {!Element} dest The element to set the attribute on\n * @param {!Element} src The element to read the attribute from\n * @param {string} name The name of the attribute\n */\nconst copyAttributeWithTemplateEventPolicy = (() => {\n /**\n * This `TrustedTypePolicy` is used to work around a Chrome bug in the Trusted\n * Types API where any attribute that starts with `on` may only be set to a\n * `TrustedScript` value, even if that attribute would not cause an event\n * listener to be created. (See https://crbug.com/993268 for details.)\n *\n * Polymer's template system allows `<dom-if>` and `<dom-repeat>` to be\n * written using the `<template is=\"...\">` syntax, even if there is no UA\n * support for custom element extensions of built-in elements. In doing so, it\n * copies attributes from the original `<template>` to a newly created\n * `<dom-if>` or `<dom-repeat>`, which can trigger the bug mentioned above if\n * any of those attributes uses Polymer's `on-` syntax for event listeners.\n * (Note, the value of these `on-` listeners is not evaluated as script: it is\n * the name of a member function of a component that will be used as the event\n * listener.)\n *\n * @type {!TrustedTypePolicy|undefined}\n */\n const polymerTemplateEventAttributePolicy = window.trustedTypes &&\n window.trustedTypes.createPolicy(\n 'polymer-template-event-attribute-policy', {\n createScript: x => x,\n });\n\n return (dest, src, name) => {\n const value = src.getAttribute(name);\n\n if (polymerTemplateEventAttributePolicy && name.startsWith('on-')) {\n dest.setAttribute(\n name, polymerTemplateEventAttributePolicy.createScript(value, name));\n return;\n }\n\n dest.setAttribute(name, value);\n };\n})();\n\nfunction wrapTemplateExtension(node) {\n let is = node.getAttribute('is');\n if (is && templateExtensions[is]) {\n let t = node;\n t.removeAttribute('is');\n node = t.ownerDocument.createElement(is);\n t.parentNode.replaceChild(node, t);\n node.appendChild(t);\n while(t.attributes.length) {\n const {name} = t.attributes[0];\n copyAttributeWithTemplateEventPolicy(node, t, name);\n t.removeAttribute(name);\n }\n }\n return node;\n}\n\nfunction findTemplateNode(root, nodeInfo) {\n // recursively ascend tree until we hit root\n let parent = nodeInfo.parentInfo && findTemplateNode(root, nodeInfo.parentInfo);\n // unwind the stack, returning the indexed node at each level\n if (parent) {\n // note: marginally faster than indexing via childNodes\n // (http://jsperf.com/childnodes-lookup)\n for (let n=parent.firstChild, i=0; n; n=n.nextSibling) {\n if (nodeInfo.parentIndex === i++) {\n return n;\n }\n }\n } else {\n return root;\n }\n}\n\n// construct `$` map (from id annotations)\nfunction applyIdToMap(inst, map, node, nodeInfo) {\n if (nodeInfo.id) {\n map[nodeInfo.id] = node;\n }\n}\n\n// install event listeners (from event annotations)\nfunction applyEventListener(inst, node, nodeInfo) {\n if (nodeInfo.events && nodeInfo.events.length) {\n for (let j=0, e$=nodeInfo.events, e; (j<e$.length) && (e=e$[j]); j++) {\n inst._addMethodEventListenerToNode(node, e.name, e.value, inst);\n }\n }\n}\n\n// push configuration references at configure time\nfunction applyTemplateInfo(inst, node, nodeInfo, parentTemplateInfo) {\n if (nodeInfo.templateInfo) {\n // Give the node an instance of this templateInfo and set its parent\n node._templateInfo = nodeInfo.templateInfo;\n node._parentTemplateInfo = parentTemplateInfo;\n }\n}\n\nfunction createNodeEventHandler(context, eventName, methodName) {\n // Instances can optionally have a _methodHost which allows redirecting where\n // to find methods. Currently used by `templatize`.\n context = context._methodHost || context;\n let handler = function(e) {\n if (context[methodName]) {\n context[methodName](e, e.detail);\n } else {\n console.warn('listener method `' + methodName + '` not defined');\n }\n };\n return handler;\n}\n\n/**\n * Element mixin that provides basic template parsing and stamping, including\n * the following template-related features for stamped templates:\n *\n * - Declarative event listeners (`on-eventname=\"listener\"`)\n * - Map of node id's to stamped node instances (`this.$.id`)\n * - Nested template content caching/removal and re-installation (performance\n * optimization)\n *\n * @mixinFunction\n * @polymer\n * @summary Element class mixin that provides basic template parsing and stamping\n */\nexport const TemplateStamp = dedupingMixin(\n /**\n * @template T\n * @param {function(new:T)} superClass Class to apply mixin to.\n * @return {function(new:T)} superClass with mixin applied.\n */\n (superClass) => {\n\n /**\n * @polymer\n * @mixinClass\n * @implements {Polymer_TemplateStamp}\n */\n class TemplateStamp extends superClass {\n\n /**\n * Scans a template to produce template metadata.\n *\n * Template-specific metadata are stored in the object returned, and node-\n * specific metadata are stored in objects in its flattened `nodeInfoList`\n * array. Only nodes in the template that were parsed as nodes of\n * interest contain an object in `nodeInfoList`. Each `nodeInfo` object\n * contains an `index` (`childNodes` index in parent) and optionally\n * `parent`, which points to node info of its parent (including its index).\n *\n * The template metadata object returned from this method has the following\n * structure (many fields optional):\n *\n * ```js\n * {\n * // Flattened list of node metadata (for nodes that generated metadata)\n * nodeInfoList: [\n * {\n * // `id` attribute for any nodes with id's for generating `$` map\n * id: {string},\n * // `on-event=\"handler\"` metadata\n * events: [\n * {\n * name: {string}, // event name\n * value: {string}, // handler method name\n * }, ...\n * ],\n * // Notes when the template contained a `<slot>` for shady DOM\n * // optimization purposes\n * hasInsertionPoint: {boolean},\n * // For nested `<template>`` nodes, nested template metadata\n * templateInfo: {object}, // nested template metadata\n * // Metadata to allow efficient retrieval of instanced node\n * // corresponding to this metadata\n * parentInfo: {number}, // reference to parent nodeInfo>\n * parentIndex: {number}, // index in parent's `childNodes` collection\n * infoIndex: {number}, // index of this `nodeInfo` in `templateInfo.nodeInfoList`\n * },\n * ...\n * ],\n * // When true, the template had the `strip-whitespace` attribute\n * // or was nested in a template with that setting\n * stripWhitespace: {boolean},\n * // For nested templates, nested template content is moved into\n * // a document fragment stored here; this is an optimization to\n * // avoid the cost of nested template cloning\n * content: {DocumentFragment}\n * }\n * ```\n *\n * This method kicks off a recursive treewalk as follows:\n *\n * ```\n * _parseTemplate <---------------------+\n * _parseTemplateContent |\n * _parseTemplateNode <------------|--+\n * _parseTemplateNestedTemplate --+ |\n * _parseTemplateChildNodes ---------+\n * _parseTemplateNodeAttributes\n * _parseTemplateNodeAttribute\n *\n * ```\n *\n * These methods may be overridden to add custom metadata about templates\n * to either `templateInfo` or `nodeInfo`.\n *\n * Note that this method may be destructive to the template, in that\n * e.g. event annotations may be removed after being noted in the\n * template metadata.\n *\n * @param {!HTMLTemplateElement} template Template to parse\n * @param {TemplateInfo=} outerTemplateInfo Template metadata from the outer\n * template, for parsing nested templates\n * @return {!TemplateInfo} Parsed template metadata\n * @nocollapse\n */\n static _parseTemplate(template, outerTemplateInfo) {\n // since a template may be re-used, memo-ize metadata\n if (!template._templateInfo) {\n // TODO(rictic): fix typing\n let /** ? */ templateInfo = template._templateInfo = {};\n templateInfo.nodeInfoList = [];\n templateInfo.nestedTemplate = Boolean(outerTemplateInfo);\n templateInfo.stripWhiteSpace =\n (outerTemplateInfo && outerTemplateInfo.stripWhiteSpace) ||\n (template.hasAttribute && template.hasAttribute('strip-whitespace'));\n // TODO(rictic): fix typing\n this._parseTemplateContent(\n template, templateInfo, /** @type {?} */ ({parent: null}));\n }\n return template._templateInfo;\n }\n\n /**\n * See docs for _parseTemplateNode.\n *\n * @param {!HTMLTemplateElement} template .\n * @param {!TemplateInfo} templateInfo .\n * @param {!NodeInfo} nodeInfo .\n * @return {boolean} .\n * @nocollapse\n */\n static _parseTemplateContent(template, templateInfo, nodeInfo) {\n return this._parseTemplateNode(template.content, templateInfo, nodeInfo);\n }\n\n /**\n * Parses template node and adds template and node metadata based on\n * the current node, and its `childNodes` and `attributes`.\n *\n * This method may be overridden to add custom node or template specific\n * metadata based on this node.\n *\n * @param {Node} node Node to parse\n * @param {!TemplateInfo} templateInfo Template metadata for current template\n * @param {!NodeInfo} nodeInfo Node metadata for current template.\n * @return {boolean} `true` if the visited node added node-specific\n * metadata to `nodeInfo`\n * @nocollapse\n */\n static _parseTemplateNode(node, templateInfo, nodeInfo) {\n let noted = false;\n let element = /** @type {!HTMLTemplateElement} */ (node);\n if (element.localName == 'template' && !element.hasAttribute('preserve-content')) {\n noted = this._parseTemplateNestedTemplate(element, templateInfo, nodeInfo) || noted;\n } else if (element.localName === 'slot') {\n // For ShadyDom optimization, indicating there is an insertion point\n templateInfo.hasInsertionPoint = true;\n }\n fixPlaceholder(element);\n if (element.firstChild) {\n this._parseTemplateChildNodes(element, templateInfo, nodeInfo);\n }\n if (element.hasAttributes && element.hasAttributes()) {\n noted = this._parseTemplateNodeAttributes(element, templateInfo, nodeInfo) || noted;\n }\n // Checking `nodeInfo.noted` allows a child node of this node (who gets\n // access to `parentInfo`) to cause the parent to be noted, which\n // otherwise has no return path via `_parseTemplateChildNodes` (used by\n // some optimizations)\n return noted || nodeInfo.noted;\n }\n\n /**\n * Parses template child nodes for the given root node.\n *\n * This method also wraps whitelisted legacy template extensions\n * (`is=\"dom-if\"` and `is=\"dom-repeat\"`) with their equivalent element\n * wrappers, collapses text nodes, and strips whitespace from the template\n * if the `templateInfo.stripWhitespace` setting was provided.\n *\n * @param {Node} root Root node whose `childNodes` will be parsed\n * @param {!TemplateInfo} templateInfo Template metadata for current template\n * @param {!NodeInfo} nodeInfo Node metadata for current template.\n * @return {void}\n */\n static _parseTemplateChildNodes(root, templateInfo, nodeInfo) {\n if (root.localName === 'script' || root.localName === 'style') {\n return;\n }\n for (let node=root.firstChild, parentIndex=0, next; node; node=next) {\n // Wrap templates\n if (node.localName == 'template') {\n node = wrapTemplateExtension(node);\n }\n // collapse adjacent textNodes: fixes an IE issue that can cause\n // text nodes to be inexplicably split =(\n // note that root.normalize() should work but does not so we do this\n // manually.\n next = node.nextSibling;\n if (node.nodeType === Node.TEXT_NODE) {\n let /** Node */ n = next;\n while (n && (n.nodeType === Node.TEXT_NODE)) {\n node.textContent += n.textContent;\n next = n.nextSibling;\n root.removeChild(n);\n n = next;\n }\n // optionally strip whitespace\n if (templateInfo.stripWhiteSpace && !node.textContent.trim()) {\n root.removeChild(node);\n continue;\n }\n }\n let childInfo =\n /** @type {!NodeInfo} */ ({parentIndex, parentInfo: nodeInfo});\n if (this._parseTemplateNode(node, templateInfo, childInfo)) {\n childInfo.infoIndex = templateInfo.nodeInfoList.push(childInfo) - 1;\n }\n // Increment if not removed\n if (node.parentNode) {\n parentIndex++;\n }\n }\n }\n\n /**\n * Parses template content for the given nested `<template>`.\n *\n * Nested template info is stored as `templateInfo` in the current node's\n * `nodeInfo`. `template.content` is removed and stored in `templateInfo`.\n * It will then be the responsibility of the host to set it back to the\n * template and for users stamping nested templates to use the\n * `_contentForTemplate` method to retrieve the content for this template\n * (an optimization to avoid the cost of cloning nested template content).\n *\n * @param {HTMLTemplateElement} node Node to parse (a <template>)\n * @param {TemplateInfo} outerTemplateInfo Template metadata for current template\n * that includes the template `node`\n * @param {!NodeInfo} nodeInfo Node metadata for current template.\n * @return {boolean} `true` if the visited node added node-specific\n * metadata to `nodeInfo`\n * @nocollapse\n */\n static _parseTemplateNestedTemplate(node, outerTemplateInfo, nodeInfo) {\n // TODO(rictic): the type of node should be non-null\n let element = /** @type {!HTMLTemplateElement} */ (node);\n let templateInfo = this._parseTemplate(element, outerTemplateInfo);\n let content = templateInfo.content =\n element.content.ownerDocument.createDocumentFragment();\n content.appendChild(element.content);\n nodeInfo.templateInfo = templateInfo;\n return true;\n }\n\n /**\n * Parses template node attributes and adds node metadata to `nodeInfo`\n * for nodes of interest.\n *\n * @param {Element} node Node to parse\n * @param {!TemplateInfo} templateInfo Template metadata for current\n * template\n * @param {!NodeInfo} nodeInfo Node metadata for current template.\n * @return {boolean} `true` if the visited node added node-specific\n * metadata to `nodeInfo`\n * @nocollapse\n */\n static _parseTemplateNodeAttributes(node, templateInfo, nodeInfo) {\n // Make copy of original attribute list, since the order may change\n // as attributes are added and removed\n let noted = false;\n let attrs = Array.from(node.attributes);\n for (let i=attrs.length-1, a; (a=attrs[i]); i--) {\n noted = this._parseTemplateNodeAttribute(node, templateInfo, nodeInfo, a.name, a.value) || noted;\n }\n return noted;\n }\n\n /**\n * Parses a single template node attribute and adds node metadata to\n * `nodeInfo` for attributes of interest.\n *\n * This implementation adds metadata for `on-event=\"handler\"` attributes\n * and `id` attributes.\n *\n * @param {Element} node Node to parse\n * @param {!TemplateInfo} templateInfo Template metadata for current template\n * @param {!NodeInfo} nodeInfo Node metadata for current template.\n * @param {string} name Attribute name\n * @param {string} value Attribute value\n * @return {boolean} `true` if the visited node added node-specific\n * metadata to `nodeInfo`\n * @nocollapse\n */\n static _parseTemplateNodeAttribute(node, templateInfo, nodeInfo, name, value) {\n // events (on-*)\n if (name.slice(0, 3) === 'on-') {\n node.removeAttribute(name);\n nodeInfo.events = nodeInfo.events || [];\n nodeInfo.events.push({\n name: name.slice(3),\n value\n });\n return true;\n }\n // static id\n else if (name === 'id') {\n nodeInfo.id = value;\n return true;\n }\n return false;\n }\n\n /**\n * Returns the `content` document fragment for a given template.\n *\n * For nested templates, Polymer performs an optimization to cache nested\n * template content to avoid the cost of cloning deeply nested templates.\n * This method retrieves the cached content for a given template.\n *\n * @param {HTMLTemplateElement} template Template to retrieve `content` for\n * @return {DocumentFragment} Content fragment\n * @nocollapse\n */\n static _contentForTemplate(template) {\n let templateInfo = /** @type {HTMLTemplateElementWithInfo} */ (template)._templateInfo;\n return (templateInfo && templateInfo.content) || template.content;\n }\n\n /**\n * Clones the provided template content and returns a document fragment\n * containing the cloned dom.\n *\n * The template is parsed (once and memoized) using this library's\n * template parsing features, and provides the following value-added\n * features:\n * * Adds declarative event listeners for `on-event=\"handler\"` attributes\n * * Generates an \"id map\" for all nodes with id's under `$` on returned\n * document fragment\n * * Passes template info including `content` back to templates as\n * `_templateInfo` (a performance optimization to avoid deep template\n * cloning)\n *\n * Note that the memoized template parsing process is destructive to the\n * template: attributes for bindings and declarative event listeners are\n * removed after being noted in notes, and any nested `<template>.content`\n * is removed and stored in notes as well.\n *\n * @param {!HTMLTemplateElement} template Template to stamp\n * @param {TemplateInfo=} templateInfo Optional template info associated\n * with the template to be stamped; if omitted the template will be\n * automatically parsed.\n * @return {!StampedTemplate} Cloned template content\n * @override\n */\n _stampTemplate(template, templateInfo) {\n // Polyfill support: bootstrap the template if it has not already been\n if (template && !template.content &&\n window.HTMLTemplateElement && HTMLTemplateElement.decorate) {\n HTMLTemplateElement.decorate(template);\n }\n // Accepting the `templateInfo` via an argument allows for creating\n // instances of the `templateInfo` by the caller, useful for adding\n // instance-time information to the prototypical data\n templateInfo = templateInfo || this.constructor._parseTemplate(template);\n let nodeInfo = templateInfo.nodeInfoList;\n let content = templateInfo.content || template.content;\n let dom = /** @type {DocumentFragment} */ (document.importNode(content, true));\n // NOTE: ShadyDom optimization indicating there is an insertion point\n dom.__noInsertionPoint = !templateInfo.hasInsertionPoint;\n let nodes = dom.nodeList = new Array(nodeInfo.length);\n dom.$ = {};\n for (let i=0, l=nodeInfo.length, info; (i<l) && (info=nodeInfo[i]); i++) {\n let node = nodes[i] = findTemplateNode(dom, info);\n applyIdToMap(this, dom.$, node, info);\n applyTemplateInfo(this, node, info, templateInfo);\n applyEventListener(this, node, info);\n }\n dom = /** @type {!StampedTemplate} */(dom); // eslint-disable-line no-self-assign\n return dom;\n }\n\n /**\n * Adds an event listener by method name for the event provided.\n *\n * This method generates a handler function that looks up the method\n * name at handling time.\n *\n * @param {!EventTarget} node Node to add listener on\n * @param {string} eventName Name of event\n * @param {string} methodName Name of method\n * @param {*=} context Context the method will be called on (defaults\n * to `node`)\n * @return {Function} Generated handler function\n * @override\n */\n _addMethodEventListenerToNode(node, eventName, methodName, context) {\n context = context || node;\n let handler = createNodeEventHandler(context, eventName, methodName);\n this._addEventListenerToNode(node, eventName, handler);\n return handler;\n }\n\n /**\n * Override point for adding custom or simulated event handling.\n *\n * @param {!EventTarget} node Node to add event listener to\n * @param {string} eventName Name of event\n * @param {function(!Event):void} handler Listener function to add\n * @return {void}\n * @override\n */\n _addEventListenerToNode(node, eventName, handler) {\n node.addEventListener(eventName, handler);\n }\n\n /**\n * Override point for adding custom or simulated event handling.\n *\n * @param {!EventTarget} node Node to remove event listener from\n * @param {string} eventName Name of event\n * @param {function(!Event):void} handler Listener function to remove\n * @return {void}\n * @override\n */\n _removeEventListenerFromNode(node, eventName, handler) {\n node.removeEventListener(eventName, handler);\n }\n\n }\n\n return TemplateStamp;\n\n});\n","/**\n * @fileoverview\n * @suppress {checkPrototypalTypes}\n * @license Copyright (c) 2017 The Polymer Project Authors. All rights reserved.\n * This code may only be used under the BSD style license found at\n * http://polymer.github.io/LICENSE.txt The complete set of authors may be found\n * at http://polymer.github.io/AUTHORS.txt The complete set of contributors may\n * be found at http://polymer.github.io/CONTRIBUTORS.txt Code distributed by\n * Google as part of the polymer project is also subject to an additional IP\n * rights grant found at http://polymer.github.io/PATENTS.txt\n */\n\nimport '../utils/boot.js';\nimport { wrap } from '../utils/wrap.js';\nimport { dedupingMixin } from '../utils/mixin.js';\nimport { root, isAncestor, isDescendant, get, translate, isPath, set, normalize } from '../utils/path.js';\n/* for notify, reflect */\nimport { camelToDashCase, dashToCamelCase } from '../utils/case-map.js';\nimport { PropertyAccessors } from './property-accessors.js';\n/* for annotated effects */\nimport { TemplateStamp } from './template-stamp.js';\nimport { sanitizeDOMValue, legacyUndefined, orderedComputed, removeNestedTemplates, fastDomIf } from '../utils/settings.js';\n\n// Monotonically increasing unique ID used for de-duping effects triggered\n// from multiple properties in the same turn\nlet dedupeId = 0;\n\nconst NOOP = [];\n\n/**\n * Property effect types; effects are stored on the prototype using these keys\n * @enum {string}\n */\nconst TYPES = {\n COMPUTE: '__computeEffects',\n REFLECT: '__reflectEffects',\n NOTIFY: '__notifyEffects',\n PROPAGATE: '__propagateEffects',\n OBSERVE: '__observeEffects',\n READ_ONLY: '__readOnly'\n};\n\nconst COMPUTE_INFO = '__computeInfo';\n\n/** @const {!RegExp} */\nconst capitalAttributeRegex = /[A-Z]/;\n\n/**\n * @typedef {{\n * name: (string | undefined),\n * structured: (boolean | undefined),\n * wildcard: (boolean | undefined)\n * }}\n */\nlet DataTrigger; //eslint-disable-line no-unused-vars\n\n/**\n * @typedef {{\n * info: ?,\n * trigger: (!DataTrigger | undefined),\n * fn: (!Function | undefined)\n * }}\n */\nlet DataEffect; //eslint-disable-line no-unused-vars\n\n/**\n * Ensures that the model has an own-property map of effects for the given type.\n * The model may be a prototype or an instance.\n *\n * Property effects are stored as arrays of effects by property in a map,\n * by named type on the model. e.g.\n *\n * __computeEffects: {\n * foo: [ ... ],\n * bar: [ ... ]\n * }\n *\n * If the model does not yet have an effect map for the type, one is created\n * and returned. If it does, but it is not an own property (i.e. the\n * prototype had effects), the the map is deeply cloned and the copy is\n * set on the model and returned, ready for new effects to be added.\n *\n * @param {Object} model Prototype or instance\n * @param {string} type Property effect type\n * @param {boolean=} cloneArrays Clone any arrays assigned to the map when\n * extending a superclass map onto this subclass\n * @return {Object} The own-property map of effects for the given type\n * @private\n */\nfunction ensureOwnEffectMap(model, type, cloneArrays) {\n let effects = model[type];\n if (!effects) {\n effects = model[type] = {};\n } else if (!model.hasOwnProperty(type)) {\n effects = model[type] = Object.create(model[type]);\n if (cloneArrays) {\n for (let p in effects) {\n let protoFx = effects[p];\n // Perf optimization over Array.slice\n let instFx = effects[p] = Array(protoFx.length);\n for (let i=0; i<protoFx.length; i++) {\n instFx[i] = protoFx[i];\n }\n }\n }\n }\n return effects;\n}\n\n// -- effects ----------------------------------------------\n\n/**\n * Runs all effects of a given type for the given set of property changes\n * on an instance.\n *\n * @param {!Polymer_PropertyEffects} inst The instance with effects to run\n * @param {?Object} effects Object map of property-to-Array of effects\n * @param {?Object} props Bag of current property changes\n * @param {?Object=} oldProps Bag of previous values for changed properties\n * @param {boolean=} hasPaths True with `props` contains one or more paths\n * @param {*=} extraArgs Additional metadata to pass to effect function\n * @return {boolean} True if an effect ran for this property\n * @private\n */\nfunction runEffects(inst, effects, props, oldProps, hasPaths, extraArgs) {\n if (effects) {\n let ran = false;\n const id = dedupeId++;\n for (let prop in props) {\n // Inline `runEffectsForProperty` for perf.\n let rootProperty = hasPaths ? root(prop) : prop;\n let fxs = effects[rootProperty];\n if (fxs) {\n for (let i=0, l=fxs.length, fx; (i<l) && (fx=fxs[i]); i++) {\n if ((!fx.info || fx.info.lastRun !== id) &&\n (!hasPaths || pathMatchesTrigger(prop, fx.trigger))) {\n if (fx.info) {\n fx.info.lastRun = id;\n }\n fx.fn(inst, prop, props, oldProps, fx.info, hasPaths, extraArgs);\n ran = true;\n }\n }\n }\n }\n return ran;\n }\n return false;\n}\n\n/**\n * Runs a list of effects for a given property.\n *\n * @param {!Polymer_PropertyEffects} inst The instance with effects to run\n * @param {!Object} effects Object map of property-to-Array of effects\n * @param {number} dedupeId Counter used for de-duping effects\n * @param {string} prop Name of changed property\n * @param {*} props Changed properties\n * @param {*} oldProps Old properties\n * @param {boolean=} hasPaths True with `props` contains one or more paths\n * @param {*=} extraArgs Additional metadata to pass to effect function\n * @return {boolean} True if an effect ran for this property\n * @private\n */\nfunction runEffectsForProperty(inst, effects, dedupeId, prop, props, oldProps, hasPaths, extraArgs) {\n let ran = false;\n let rootProperty = hasPaths ? root(prop) : prop;\n let fxs = effects[rootProperty];\n if (fxs) {\n for (let i=0, l=fxs.length, fx; (i<l) && (fx=fxs[i]); i++) {\n if ((!fx.info || fx.info.lastRun !== dedupeId) &&\n (!hasPaths || pathMatchesTrigger(prop, fx.trigger))) {\n if (fx.info) {\n fx.info.lastRun = dedupeId;\n }\n fx.fn(inst, prop, props, oldProps, fx.info, hasPaths, extraArgs);\n ran = true;\n }\n }\n }\n return ran;\n}\n\n/**\n * Determines whether a property/path that has changed matches the trigger\n * criteria for an effect. A trigger is a descriptor with the following\n * structure, which matches the descriptors returned from `parseArg`.\n * e.g. for `foo.bar.*`:\n * ```\n * trigger: {\n * name: 'a.b',\n * structured: true,\n * wildcard: true\n * }\n * ```\n * If no trigger is given, the path is deemed to match.\n *\n * @param {string} path Path or property that changed\n * @param {?DataTrigger} trigger Descriptor\n * @return {boolean} Whether the path matched the trigger\n */\nfunction pathMatchesTrigger(path, trigger) {\n if (trigger) {\n let triggerPath = /** @type {string} */ (trigger.name);\n return (triggerPath == path) ||\n !!(trigger.structured && isAncestor(triggerPath, path)) ||\n !!(trigger.wildcard && isDescendant(triggerPath, path));\n } else {\n return true;\n }\n}\n\n/**\n * Implements the \"observer\" effect.\n *\n * Calls the method with `info.methodName` on the instance, passing the\n * new and old values.\n *\n * @param {!Polymer_PropertyEffects} inst The instance the effect will be run on\n * @param {string} property Name of property\n * @param {Object} props Bag of current property changes\n * @param {Object} oldProps Bag of previous values for changed properties\n * @param {?} info Effect metadata\n * @return {void}\n * @private\n */\nfunction runObserverEffect(inst, property, props, oldProps, info) {\n let fn = typeof info.method === \"string\" ? inst[info.method] : info.method;\n let changedProp = info.property;\n if (fn) {\n fn.call(inst, inst.__data[changedProp], oldProps[changedProp]);\n } else if (!info.dynamicFn) {\n console.warn('observer method `' + info.method + '` not defined');\n }\n}\n\n/**\n * Runs \"notify\" effects for a set of changed properties.\n *\n * This method differs from the generic `runEffects` method in that it\n * will dispatch path notification events in the case that the property\n * changed was a path and the root property for that path didn't have a\n * \"notify\" effect. This is to maintain 1.0 behavior that did not require\n * `notify: true` to ensure object sub-property notifications were\n * sent.\n *\n * @param {!Polymer_PropertyEffects} inst The instance with effects to run\n * @param {Object} notifyProps Bag of properties to notify\n * @param {Object} props Bag of current property changes\n * @param {Object} oldProps Bag of previous values for changed properties\n * @param {boolean} hasPaths True with `props` contains one or more paths\n * @return {void}\n * @private\n */\nfunction runNotifyEffects(inst, notifyProps, props, oldProps, hasPaths) {\n // Notify\n let fxs = inst[TYPES.NOTIFY];\n let notified;\n let id = dedupeId++;\n // Try normal notify effects; if none, fall back to try path notification\n for (let prop in notifyProps) {\n if (notifyProps[prop]) {\n if (fxs && runEffectsForProperty(inst, fxs, id, prop, props, oldProps, hasPaths)) {\n notified = true;\n } else if (hasPaths && notifyPath(inst, prop, props)) {\n notified = true;\n }\n }\n }\n // Flush host if we actually notified and host was batching\n // And the host has already initialized clients; this prevents\n // an issue with a host observing data changes before clients are ready.\n let host;\n if (notified && (host = inst.__dataHost) && host._invalidateProperties) {\n host._invalidateProperties();\n }\n}\n\n/**\n * Dispatches {property}-changed events with path information in the detail\n * object to indicate a sub-path of the property was changed.\n *\n * @param {!Polymer_PropertyEffects} inst The element from which to fire the\n * event\n * @param {string} path The path that was changed\n * @param {Object} props Bag of current property changes\n * @return {boolean} Returns true if the path was notified\n * @private\n */\nfunction notifyPath(inst, path, props) {\n let rootProperty = root(path);\n if (rootProperty !== path) {\n let eventName = camelToDashCase(rootProperty) + '-changed';\n dispatchNotifyEvent(inst, eventName, props[path], path);\n return true;\n }\n return false;\n}\n\n/**\n * Dispatches {property}-changed events to indicate a property (or path)\n * changed.\n *\n * @param {!Polymer_PropertyEffects} inst The element from which to fire the\n * event\n * @param {string} eventName The name of the event to send\n * ('{property}-changed')\n * @param {*} value The value of the changed property\n * @param {string | null | undefined} path If a sub-path of this property\n * changed, the path that changed (optional).\n * @return {void}\n * @private\n * @suppress {invalidCasts}\n */\nfunction dispatchNotifyEvent(inst, eventName, value, path) {\n let detail = {\n value: value,\n queueProperty: true\n };\n if (path) {\n detail.path = path;\n }\n // As a performance optimization, we could elide the wrap here since notifying\n // events are non-bubbling and shouldn't need retargeting. However, a very\n // small number of internal tests failed in obscure ways, which may indicate\n // user code relied on timing differences resulting from ShadyDOM flushing\n // as a result of the wrapped `dispatchEvent`.\n wrap(/** @type {!HTMLElement} */(inst)).dispatchEvent(new CustomEvent(eventName, { detail }));\n}\n\n/**\n * Implements the \"notify\" effect.\n *\n * Dispatches a non-bubbling event named `info.eventName` on the instance\n * with a detail object containing the new `value`.\n *\n * @param {!Polymer_PropertyEffects} inst The instance the effect will be run on\n * @param {string} property Name of property\n * @param {Object} props Bag of current property changes\n * @param {Object} oldProps Bag of previous values for changed properties\n * @param {?} info Effect metadata\n * @param {boolean} hasPaths True with `props` contains one or more paths\n * @return {void}\n * @private\n */\nfunction runNotifyEffect(inst, property, props, oldProps, info, hasPaths) {\n let rootProperty = hasPaths ? root(property) : property;\n let path = rootProperty != property ? property : null;\n let value = path ? get(inst, path) : inst.__data[property];\n if (path && value === undefined) {\n value = props[property]; // specifically for .splices\n }\n dispatchNotifyEvent(inst, info.eventName, value, path);\n}\n\n/**\n * Handler function for 2-way notification events. Receives context\n * information captured in the `addNotifyListener` closure from the\n * `__notifyListeners` metadata.\n *\n * Sets the value of the notified property to the host property or path. If\n * the event contained path information, translate that path to the host\n * scope's name for that path first.\n *\n * @param {CustomEvent} event Notification event (e.g. '<property>-changed')\n * @param {!Polymer_PropertyEffects} inst Host element instance handling the\n * notification event\n * @param {string} fromProp Child element property that was bound\n * @param {string} toPath Host property/path that was bound\n * @param {boolean} negate Whether the binding was negated\n * @return {void}\n * @private\n */\nfunction handleNotification(event, inst, fromProp, toPath, negate) {\n let value;\n let detail = /** @type {Object} */(event.detail);\n let fromPath = detail && detail.path;\n if (fromPath) {\n toPath = translate(fromProp, toPath, fromPath);\n value = detail && detail.value;\n } else {\n value = event.currentTarget[fromProp];\n }\n value = negate ? !value : value;\n if (!inst[TYPES.READ_ONLY] || !inst[TYPES.READ_ONLY][toPath]) {\n if (inst._setPendingPropertyOrPath(toPath, value, true, Boolean(fromPath))\n && (!detail || !detail.queueProperty)) {\n inst._invalidateProperties();\n }\n }\n}\n\n/**\n * Implements the \"reflect\" effect.\n *\n * Sets the attribute named `info.attrName` to the given property value.\n *\n * @param {!Polymer_PropertyEffects} inst The instance the effect will be run on\n * @param {string} property Name of property\n * @param {Object} props Bag of current property changes\n * @param {Object} oldProps Bag of previous values for changed properties\n * @param {?} info Effect metadata\n * @return {void}\n * @private\n */\nfunction runReflectEffect(inst, property, props, oldProps, info) {\n let value = inst.__data[property];\n if (sanitizeDOMValue) {\n value = sanitizeDOMValue(value, info.attrName, 'attribute', /** @type {Node} */(inst));\n }\n inst._propertyToAttribute(property, info.attrName, value);\n}\n\n/**\n * Runs \"computed\" effects for a set of changed properties.\n *\n * This method differs from the generic `runEffects` method in that it\n * continues to run computed effects based on the output of each pass until\n * there are no more newly computed properties. This ensures that all\n * properties that will be computed by the initial set of changes are\n * computed before other effects (binding propagation, observers, and notify)\n * run.\n *\n * @param {!Polymer_PropertyEffects} inst The instance the effect will be run on\n * @param {?Object} changedProps Bag of changed properties\n * @param {?Object} oldProps Bag of previous values for changed properties\n * @param {boolean} hasPaths True with `props` contains one or more paths\n * @return {void}\n * @private\n */\nfunction runComputedEffects(inst, changedProps, oldProps, hasPaths) {\n let computeEffects = inst[TYPES.COMPUTE];\n if (computeEffects) {\n if (orderedComputed) {\n // Runs computed effects in efficient order by keeping a topologically-\n // sorted queue of compute effects to run, and inserting subsequently\n // invalidated effects as they are run\n dedupeId++;\n const order = getComputedOrder(inst);\n const queue = [];\n for (let p in changedProps) {\n enqueueEffectsFor(p, computeEffects, queue, order, hasPaths);\n }\n let info;\n while ((info = queue.shift())) {\n if (runComputedEffect(inst, '', changedProps, oldProps, info)) {\n enqueueEffectsFor(info.methodInfo, computeEffects, queue, order, hasPaths);\n }\n }\n Object.assign(/** @type {!Object} */ (oldProps), inst.__dataOld);\n Object.assign(/** @type {!Object} */ (changedProps), inst.__dataPending);\n inst.__dataPending = null;\n } else {\n // Original Polymer 2.x computed effects order, which continues running\n // effects until no further computed properties have been invalidated\n let inputProps = changedProps;\n while (runEffects(inst, computeEffects, inputProps, oldProps, hasPaths)) {\n Object.assign(/** @type {!Object} */ (oldProps), inst.__dataOld);\n Object.assign(/** @type {!Object} */ (changedProps), inst.__dataPending);\n inputProps = inst.__dataPending;\n inst.__dataPending = null;\n }\n }\n }\n}\n\n/**\n * Inserts a computed effect into a queue, given the specified order. Performs\n * the insert using a binary search.\n *\n * Used by `orderedComputed: true` computed property algorithm.\n *\n * @param {Object} info Property effects metadata\n * @param {Array<Object>} queue Ordered queue of effects\n * @param {Map<string,number>} order Map of computed property name->topological\n * sort order\n */\nconst insertEffect = (info, queue, order) => {\n let start = 0;\n let end = queue.length - 1;\n let idx = -1;\n while (start <= end) {\n const mid = (start + end) >> 1;\n // Note `methodInfo` is where the computed property name is stored in\n // the effect metadata\n const cmp = order.get(queue[mid].methodInfo) - order.get(info.methodInfo);\n if (cmp < 0) {\n start = mid + 1;\n } else if (cmp > 0) {\n end = mid - 1;\n } else {\n idx = mid;\n break;\n }\n }\n if (idx < 0) {\n idx = end + 1;\n }\n queue.splice(idx, 0, info);\n};\n\n/**\n * Inserts all downstream computed effects invalidated by the specified property\n * into the topologically-sorted queue of effects to be run.\n *\n * Used by `orderedComputed: true` computed property algorithm.\n *\n * @param {string} prop Property name\n * @param {Object} computeEffects Computed effects for this element\n * @param {Array<Object>} queue Topologically-sorted queue of computed effects\n * to be run\n * @param {Map<string,number>} order Map of computed property name->topological\n * sort order\n * @param {boolean} hasPaths True with `changedProps` contains one or more paths\n */\nconst enqueueEffectsFor = (prop, computeEffects, queue, order, hasPaths) => {\n const rootProperty = hasPaths ? root(prop) : prop;\n const fxs = computeEffects[rootProperty];\n if (fxs) {\n for (let i=0; i<fxs.length; i++) {\n const fx = fxs[i];\n if ((fx.info.lastRun !== dedupeId) &&\n (!hasPaths || pathMatchesTrigger(prop, fx.trigger))) {\n fx.info.lastRun = dedupeId;\n insertEffect(fx.info, queue, order);\n }\n }\n }\n};\n\n/**\n * Generates and retrieves a memoized map of computed property name to its\n * topologically-sorted order.\n *\n * The map is generated by first assigning a \"dependency count\" to each property\n * (defined as number properties it depends on, including its method for\n * \"dynamic functions\"). Any properties that have no dependencies are added to\n * the `ready` queue, which are properties whose order can be added to the final\n * order map. Properties are popped off the `ready` queue one by one and a.) added as\n * the next property in the order map, and b.) each property that it is a\n * dependency for has its dep count decremented (and if that property's dep\n * count goes to zero, it is added to the `ready` queue), until all properties\n * have been visited and ordered.\n *\n * Used by `orderedComputed: true` computed property algorithm.\n *\n * @param {!Polymer_PropertyEffects} inst The instance to retrieve the computed\n * effect order for.\n * @return {Map<string,number>} Map of computed property name->topological sort\n * order\n */\nfunction getComputedOrder(inst) {\n let ordered = inst.constructor.__orderedComputedDeps;\n if (!ordered) {\n ordered = new Map();\n const effects = inst[TYPES.COMPUTE];\n let {counts, ready, total} = dependencyCounts(inst);\n let curr;\n while ((curr = ready.shift())) {\n ordered.set(curr, ordered.size);\n const computedByCurr = effects[curr];\n if (computedByCurr) {\n computedByCurr.forEach(fx => {\n // Note `methodInfo` is where the computed property name is stored\n const computedProp = fx.info.methodInfo;\n --total;\n if (--counts[computedProp] === 0) {\n ready.push(computedProp);\n }\n });\n }\n }\n if (total !== 0) {\n const el = /** @type {HTMLElement} */ (inst);\n console.warn(`Computed graph for ${el.localName} incomplete; circular?`);\n }\n inst.constructor.__orderedComputedDeps = ordered;\n }\n return ordered;\n}\n\n/**\n * Generates a map of property-to-dependency count (`counts`, where \"dependency\n * count\" is the number of dependencies a given property has assuming it is a\n * computed property, otherwise 0). It also returns a pre-populated list of\n * `ready` properties that have no dependencies and a `total` count, which is\n * used for error-checking the graph.\n *\n * Used by `orderedComputed: true` computed property algorithm.\n *\n * @param {!Polymer_PropertyEffects} inst The instance to generate dependency\n * counts for.\n * @return {!Object} Object containing `counts` map (property-to-dependency\n * count) and pre-populated `ready` array of properties that had zero\n * dependencies.\n */\nfunction dependencyCounts(inst) {\n const infoForComputed = inst[COMPUTE_INFO];\n const counts = {};\n const computedDeps = inst[TYPES.COMPUTE];\n const ready = [];\n let total = 0;\n // Count dependencies for each computed property\n for (let p in infoForComputed) {\n const info = infoForComputed[p];\n // Be sure to add the method name itself in case of \"dynamic functions\"\n total += counts[p] =\n info.args.filter(a => !a.literal).length + (info.dynamicFn ? 1 : 0);\n }\n // Build list of ready properties (that aren't themselves computed)\n for (let p in computedDeps) {\n if (!infoForComputed[p]) {\n ready.push(p);\n }\n }\n return {counts, ready, total};\n}\n\n/**\n * Implements the \"computed property\" effect by running the method with the\n * values of the arguments specified in the `info` object and setting the\n * return value to the computed property specified.\n *\n * @param {!Polymer_PropertyEffects} inst The instance the effect will be run on\n * @param {string} property Name of property\n * @param {?Object} changedProps Bag of current property changes\n * @param {?Object} oldProps Bag of previous values for changed properties\n * @param {?} info Effect metadata\n * @return {boolean} True when the property being computed changed\n * @private\n */\nfunction runComputedEffect(inst, property, changedProps, oldProps, info) {\n // Dirty check dependencies and run if any invalid\n let result = runMethodEffect(inst, property, changedProps, oldProps, info);\n // Abort if method returns a no-op result\n if (result === NOOP) {\n return false;\n }\n let computedProp = info.methodInfo;\n if (inst.__dataHasAccessor && inst.__dataHasAccessor[computedProp]) {\n return inst._setPendingProperty(computedProp, result, true);\n } else {\n inst[computedProp] = result;\n return false;\n }\n}\n\n/**\n * Computes path changes based on path links set up using the `linkPaths`\n * API.\n *\n * @param {!Polymer_PropertyEffects} inst The instance whose props are changing\n * @param {string} path Path that has changed\n * @param {*} value Value of changed path\n * @return {void}\n * @private\n */\nfunction computeLinkedPaths(inst, path, value) {\n let links = inst.__dataLinkedPaths;\n if (links) {\n let link;\n for (let a in links) {\n let b = links[a];\n if (isDescendant(a, path)) {\n link = translate(a, b, path);\n inst._setPendingPropertyOrPath(link, value, true, true);\n } else if (isDescendant(b, path)) {\n link = translate(b, a, path);\n inst._setPendingPropertyOrPath(link, value, true, true);\n }\n }\n }\n}\n\n// -- bindings ----------------------------------------------\n\n/**\n * Adds binding metadata to the current `nodeInfo`, and binding effects\n * for all part dependencies to `templateInfo`.\n *\n * @param {Function} constructor Class that `_parseTemplate` is currently\n * running on\n * @param {TemplateInfo} templateInfo Template metadata for current template\n * @param {NodeInfo} nodeInfo Node metadata for current template node\n * @param {string} kind Binding kind, either 'property', 'attribute', or 'text'\n * @param {string} target Target property name\n * @param {!Array<!BindingPart>} parts Array of binding part metadata\n * @param {string=} literal Literal text surrounding binding parts (specified\n * only for 'property' bindings, since these must be initialized as part\n * of boot-up)\n * @return {void}\n * @private\n */\nfunction addBinding(constructor, templateInfo, nodeInfo, kind, target, parts, literal) {\n // Create binding metadata and add to nodeInfo\n nodeInfo.bindings = nodeInfo.bindings || [];\n let /** Binding */ binding = { kind, target, parts, literal, isCompound: (parts.length !== 1) };\n nodeInfo.bindings.push(binding);\n // Add listener info to binding metadata\n if (shouldAddListener(binding)) {\n let {event, negate} = binding.parts[0];\n binding.listenerEvent = event || (camelToDashCase(target) + '-changed');\n binding.listenerNegate = negate;\n }\n // Add \"propagate\" property effects to templateInfo\n let index = templateInfo.nodeInfoList.length;\n for (let i=0; i<binding.parts.length; i++) {\n let part = binding.parts[i];\n part.compoundIndex = i;\n addEffectForBindingPart(constructor, templateInfo, binding, part, index);\n }\n}\n\n/**\n * Adds property effects to the given `templateInfo` for the given binding\n * part.\n *\n * @param {Function} constructor Class that `_parseTemplate` is currently\n * running on\n * @param {TemplateInfo} templateInfo Template metadata for current template\n * @param {!Binding} binding Binding metadata\n * @param {!BindingPart} part Binding part metadata\n * @param {number} index Index into `nodeInfoList` for this node\n * @return {void}\n */\nfunction addEffectForBindingPart(constructor, templateInfo, binding, part, index) {\n if (!part.literal) {\n if (binding.kind === 'attribute' && binding.target[0] === '-') {\n console.warn('Cannot set attribute ' + binding.target +\n ' because \"-\" is not a valid attribute starting character');\n } else {\n let dependencies = part.dependencies;\n let info = { index, binding, part, evaluator: constructor };\n for (let j=0; j<dependencies.length; j++) {\n let trigger = dependencies[j];\n if (typeof trigger == 'string') {\n trigger = parseArg(trigger);\n trigger.wildcard = true;\n }\n constructor._addTemplatePropertyEffect(templateInfo, trigger.rootProperty, {\n fn: runBindingEffect,\n info, trigger\n });\n }\n }\n }\n}\n\n/**\n * Implements the \"binding\" (property/path binding) effect.\n *\n * Note that binding syntax is overridable via `_parseBindings` and\n * `_evaluateBinding`. This method will call `_evaluateBinding` for any\n * non-literal parts returned from `_parseBindings`. However,\n * there is no support for _path_ bindings via custom binding parts,\n * as this is specific to Polymer's path binding syntax.\n *\n * @param {!Polymer_PropertyEffects} inst The instance the effect will be run on\n * @param {string} path Name of property\n * @param {Object} props Bag of current property changes\n * @param {Object} oldProps Bag of previous values for changed properties\n * @param {?} info Effect metadata\n * @param {boolean} hasPaths True with `props` contains one or more paths\n * @param {Array} nodeList List of nodes associated with `nodeInfoList` template\n * metadata\n * @return {void}\n * @private\n */\nfunction runBindingEffect(inst, path, props, oldProps, info, hasPaths, nodeList) {\n let node = nodeList[info.index];\n let binding = info.binding;\n let part = info.part;\n // Subpath notification: transform path and set to client\n // e.g.: foo=\"{{obj.sub}}\", path: 'obj.sub.prop', set 'foo.prop'=obj.sub.prop\n if (hasPaths && part.source && (path.length > part.source.length) &&\n (binding.kind == 'property') && !binding.isCompound &&\n node.__isPropertyEffectsClient &&\n node.__dataHasAccessor && node.__dataHasAccessor[binding.target]) {\n let value = props[path];\n path = translate(part.source, binding.target, path);\n if (node._setPendingPropertyOrPath(path, value, false, true)) {\n inst._enqueueClient(node);\n }\n } else {\n let value = info.evaluator._evaluateBinding(inst, part, path, props, oldProps, hasPaths);\n // Propagate value to child\n // Abort if value is a no-op result\n if (value !== NOOP) {\n applyBindingValue(inst, node, binding, part, value);\n }\n }\n}\n\n/**\n * Sets the value for an \"binding\" (binding) effect to a node,\n * either as a property or attribute.\n *\n * @param {!Polymer_PropertyEffects} inst The instance owning the binding effect\n * @param {Node} node Target node for binding\n * @param {!Binding} binding Binding metadata\n * @param {!BindingPart} part Binding part metadata\n * @param {*} value Value to set\n * @return {void}\n * @private\n */\nfunction applyBindingValue(inst, node, binding, part, value) {\n value = computeBindingValue(node, value, binding, part);\n if (sanitizeDOMValue) {\n value = sanitizeDOMValue(value, binding.target, binding.kind, node);\n }\n if (binding.kind == 'attribute') {\n // Attribute binding\n inst._valueToNodeAttribute(/** @type {Element} */(node), value, binding.target);\n } else {\n // Property binding\n let prop = binding.target;\n if (node.__isPropertyEffectsClient &&\n node.__dataHasAccessor && node.__dataHasAccessor[prop]) {\n if (!node[TYPES.READ_ONLY] || !node[TYPES.READ_ONLY][prop]) {\n if (node._setPendingProperty(prop, value)) {\n inst._enqueueClient(node);\n }\n }\n } else {\n // In legacy no-batching mode, bindings applied before dataReady are\n // equivalent to the \"apply config\" phase, which only set managed props\n inst._setUnmanagedPropertyToNode(node, prop, value);\n }\n }\n}\n\n/**\n * Transforms an \"binding\" effect value based on compound & negation\n * effect metadata, as well as handling for special-case properties\n *\n * @param {Node} node Node the value will be set to\n * @param {*} value Value to set\n * @param {!Binding} binding Binding metadata\n * @param {!BindingPart} part Binding part metadata\n * @return {*} Transformed value to set\n * @private\n */\nfunction computeBindingValue(node, value, binding, part) {\n if (binding.isCompound) {\n let storage = node.__dataCompoundStorage[binding.target];\n storage[part.compoundIndex] = value;\n value = storage.join('');\n }\n if (binding.kind !== 'attribute') {\n // Some browsers serialize `undefined` to `\"undefined\"`\n if (binding.target === 'textContent' ||\n (binding.target === 'value' &&\n (node.localName === 'input' || node.localName === 'textarea'))) {\n value = value == undefined ? '' : value;\n }\n }\n return value;\n}\n\n/**\n * Returns true if a binding's metadata meets all the requirements to allow\n * 2-way binding, and therefore a `<property>-changed` event listener should be\n * added:\n * - used curly braces\n * - is a property (not attribute) binding\n * - is not a textContent binding\n * - is not compound\n *\n * @param {!Binding} binding Binding metadata\n * @return {boolean} True if 2-way listener should be added\n * @private\n */\nfunction shouldAddListener(binding) {\n return Boolean(binding.target) &&\n binding.kind != 'attribute' &&\n binding.kind != 'text' &&\n !binding.isCompound &&\n binding.parts[0].mode === '{';\n}\n\n/**\n * Setup compound binding storage structures, notify listeners, and dataHost\n * references onto the bound nodeList.\n *\n * @param {!Polymer_PropertyEffects} inst Instance that bas been previously\n * bound\n * @param {TemplateInfo} templateInfo Template metadata\n * @return {void}\n * @private\n */\nfunction setupBindings(inst, templateInfo) {\n // Setup compound storage, dataHost, and notify listeners\n let {nodeList, nodeInfoList} = templateInfo;\n if (nodeInfoList.length) {\n for (let i=0; i < nodeInfoList.length; i++) {\n let info = nodeInfoList[i];\n let node = nodeList[i];\n let bindings = info.bindings;\n if (bindings) {\n for (let i=0; i<bindings.length; i++) {\n let binding = bindings[i];\n setupCompoundStorage(node, binding);\n addNotifyListener(node, inst, binding);\n }\n }\n // This ensures all bound elements have a host set, regardless\n // of whether they upgrade synchronous to creation\n node.__dataHost = inst;\n }\n }\n}\n\n/**\n * Initializes `__dataCompoundStorage` local storage on a bound node with\n * initial literal data for compound bindings, and sets the joined\n * literal parts to the bound property.\n *\n * When changes to compound parts occur, they are first set into the compound\n * storage array for that property, and then the array is joined to result in\n * the final value set to the property/attribute.\n *\n * @param {Node} node Bound node to initialize\n * @param {Binding} binding Binding metadata\n * @return {void}\n * @private\n */\nfunction setupCompoundStorage(node, binding) {\n if (binding.isCompound) {\n // Create compound storage map\n let storage = node.__dataCompoundStorage ||\n (node.__dataCompoundStorage = {});\n let parts = binding.parts;\n // Copy literals from parts into storage for this binding\n let literals = new Array(parts.length);\n for (let j=0; j<parts.length; j++) {\n literals[j] = parts[j].literal;\n }\n let target = binding.target;\n storage[target] = literals;\n // Configure properties with their literal parts\n if (binding.literal && binding.kind == 'property') {\n // Note, className needs style scoping so this needs wrapping.\n // We may also want to consider doing this for `textContent` and\n // `innerHTML`.\n if (target === 'className') {\n node = wrap(node);\n }\n node[target] = binding.literal;\n }\n }\n}\n\n/**\n * Adds a 2-way binding notification event listener to the node specified\n *\n * @param {Object} node Child element to add listener to\n * @param {!Polymer_PropertyEffects} inst Host element instance to handle\n * notification event\n * @param {Binding} binding Binding metadata\n * @return {void}\n * @private\n */\nfunction addNotifyListener(node, inst, binding) {\n if (binding.listenerEvent) {\n let part = binding.parts[0];\n node.addEventListener(binding.listenerEvent, function(e) {\n handleNotification(e, inst, binding.target, part.source, part.negate);\n });\n }\n}\n\n// -- for method-based effects (complexObserver & computed) --------------\n\n/**\n * Adds property effects for each argument in the method signature (and\n * optionally, for the method name if `dynamic` is true) that calls the\n * provided effect function.\n *\n * @param {Element | Object} model Prototype or instance\n * @param {!MethodSignature} sig Method signature metadata\n * @param {string} type Type of property effect to add\n * @param {Function} effectFn Function to run when arguments change\n * @param {*=} methodInfo Effect-specific information to be included in\n * method effect metadata\n * @param {boolean|Object=} dynamicFn Boolean or object map indicating whether\n * method names should be included as a dependency to the effect. Note,\n * defaults to true if the signature is static (sig.static is true).\n * @return {!Object} Effect metadata for this method effect\n * @private\n */\nfunction createMethodEffect(model, sig, type, effectFn, methodInfo, dynamicFn) {\n dynamicFn = sig.static || (dynamicFn &&\n (typeof dynamicFn !== 'object' || dynamicFn[sig.methodName]));\n let info = {\n methodName: sig.methodName,\n args: sig.args,\n methodInfo,\n dynamicFn\n };\n for (let i=0, arg; (i<sig.args.length) && (arg=sig.args[i]); i++) {\n if (!arg.literal) {\n model._addPropertyEffect(arg.rootProperty, type, {\n fn: effectFn, info: info, trigger: arg\n });\n }\n }\n if (dynamicFn) {\n model._addPropertyEffect(sig.methodName, type, {\n fn: effectFn, info: info\n });\n }\n return info;\n}\n\n/**\n * Calls a method with arguments marshaled from properties on the instance\n * based on the method signature contained in the effect metadata.\n *\n * Multi-property observers, computed properties, and inline computing\n * functions call this function to invoke the method, then use the return\n * value accordingly.\n *\n * @param {!Polymer_PropertyEffects} inst The instance the effect will be run on\n * @param {string} property Name of property\n * @param {Object} props Bag of current property changes\n * @param {Object} oldProps Bag of previous values for changed properties\n * @param {?} info Effect metadata\n * @return {*} Returns the return value from the method invocation\n * @private\n */\nfunction runMethodEffect(inst, property, props, oldProps, info) {\n // Instances can optionally have a _methodHost which allows redirecting where\n // to find methods. Currently used by `templatize`.\n let context = inst._methodHost || inst;\n let fn = context[info.methodName];\n if (fn) {\n let args = inst._marshalArgs(info.args, property, props);\n return args === NOOP ? NOOP : fn.apply(context, args);\n } else if (!info.dynamicFn) {\n console.warn('method `' + info.methodName + '` not defined');\n }\n}\n\nconst emptyArray = [];\n\n// Regular expressions used for binding\nconst IDENT = '(?:' + '[a-zA-Z_$][\\\\w.:$\\\\-*]*' + ')';\nconst NUMBER = '(?:' + '[-+]?[0-9]*\\\\.?[0-9]+(?:[eE][-+]?[0-9]+)?' + ')';\nconst SQUOTE_STRING = '(?:' + '\\'(?:[^\\'\\\\\\\\]|\\\\\\\\.)*\\'' + ')';\nconst DQUOTE_STRING = '(?:' + '\"(?:[^\"\\\\\\\\]|\\\\\\\\.)*\"' + ')';\nconst STRING = '(?:' + SQUOTE_STRING + '|' + DQUOTE_STRING + ')';\nconst ARGUMENT = '(?:(' + IDENT + '|' + NUMBER + '|' + STRING + ')\\\\s*' + ')';\nconst ARGUMENTS = '(?:' + ARGUMENT + '(?:,\\\\s*' + ARGUMENT + ')*' + ')';\nconst ARGUMENT_LIST = '(?:' + '\\\\(\\\\s*' +\n '(?:' + ARGUMENTS + '?' + ')' +\n '\\\\)\\\\s*' + ')';\nconst BINDING = '(' + IDENT + '\\\\s*' + ARGUMENT_LIST + '?' + ')'; // Group 3\nconst OPEN_BRACKET = '(\\\\[\\\\[|{{)' + '\\\\s*';\nconst CLOSE_BRACKET = '(?:]]|}})';\nconst NEGATE = '(?:(!)\\\\s*)?'; // Group 2\nconst EXPRESSION = OPEN_BRACKET + NEGATE + BINDING + CLOSE_BRACKET;\nconst bindingRegex = new RegExp(EXPRESSION, \"g\");\n\n/**\n * Create a string from binding parts of all the literal parts\n *\n * @param {!Array<BindingPart>} parts All parts to stringify\n * @return {string} String made from the literal parts\n */\nfunction literalFromParts(parts) {\n let s = '';\n for (let i=0; i<parts.length; i++) {\n let literal = parts[i].literal;\n s += literal || '';\n }\n return s;\n}\n\n/**\n * Parses an expression string for a method signature, and returns a metadata\n * describing the method in terms of `methodName`, `static` (whether all the\n * arguments are literals), and an array of `args`\n *\n * @param {string} expression The expression to parse\n * @return {?MethodSignature} The method metadata object if a method expression was\n * found, otherwise `undefined`\n * @private\n */\nfunction parseMethod(expression) {\n // tries to match valid javascript property names\n let m = expression.match(/([^\\s]+?)\\(([\\s\\S]*)\\)/);\n if (m) {\n let methodName = m[1];\n let sig = { methodName, static: true, args: emptyArray };\n if (m[2].trim()) {\n // replace escaped commas with comma entity, split on un-escaped commas\n let args = m[2].replace(/\\\\,/g, '&comma;').split(',');\n return parseArgs(args, sig);\n } else {\n return sig;\n }\n }\n return null;\n}\n\n/**\n * Parses an array of arguments and sets the `args` property of the supplied\n * signature metadata object. Sets the `static` property to false if any\n * argument is a non-literal.\n *\n * @param {!Array<string>} argList Array of argument names\n * @param {!MethodSignature} sig Method signature metadata object\n * @return {!MethodSignature} The updated signature metadata object\n * @private\n */\nfunction parseArgs(argList, sig) {\n sig.args = argList.map(function(rawArg) {\n let arg = parseArg(rawArg);\n if (!arg.literal) {\n sig.static = false;\n }\n return arg;\n }, this);\n return sig;\n}\n\n/**\n * Parses an individual argument, and returns an argument metadata object\n * with the following fields:\n *\n * {\n * value: 'prop', // property/path or literal value\n * literal: false, // whether argument is a literal\n * structured: false, // whether the property is a path\n * rootProperty: 'prop', // the root property of the path\n * wildcard: false // whether the argument was a wildcard '.*' path\n * }\n *\n * @param {string} rawArg The string value of the argument\n * @return {!MethodArg} Argument metadata object\n * @private\n */\nfunction parseArg(rawArg) {\n // clean up whitespace\n let arg = rawArg.trim()\n // replace comma entity with comma\n .replace(/&comma;/g, ',')\n // repair extra escape sequences; note only commas strictly need\n // escaping, but we allow any other char to be escaped since its\n // likely users will do this\n .replace(/\\\\(.)/g, '$1')\n ;\n // basic argument descriptor\n let a = {\n name: arg,\n value: '',\n literal: false\n };\n // detect literal value (must be String or Number)\n let fc = arg[0];\n if (fc === '-') {\n fc = arg[1];\n }\n if (fc >= '0' && fc <= '9') {\n fc = '#';\n }\n switch(fc) {\n case \"'\":\n case '\"':\n a.value = arg.slice(1, -1);\n a.literal = true;\n break;\n case '#':\n a.value = Number(arg);\n a.literal = true;\n break;\n }\n // if not literal, look for structured path\n if (!a.literal) {\n a.rootProperty = root(arg);\n // detect structured path (has dots)\n a.structured = isPath(arg);\n if (a.structured) {\n a.wildcard = (arg.slice(-2) == '.*');\n if (a.wildcard) {\n a.name = arg.slice(0, -2);\n }\n }\n }\n return a;\n}\n\nfunction getArgValue(data, props, path) {\n let value = get(data, path);\n // when data is not stored e.g. `splices`, get the value from changedProps\n // TODO(kschaaf): Note, this can cause a rare issue where the wildcard\n // info.value could pull a stale value out of changedProps during a reentrant\n // change that sets the value back to undefined.\n // https://github.com/Polymer/polymer/issues/5479\n if (value === undefined) {\n value = props[path];\n }\n return value;\n}\n\n// data api\n\n/**\n * Sends array splice notifications (`.splices` and `.length`)\n *\n * Note: this implementation only accepts normalized paths\n *\n * @param {!Polymer_PropertyEffects} inst Instance to send notifications to\n * @param {Array} array The array the mutations occurred on\n * @param {string} path The path to the array that was mutated\n * @param {Array} splices Array of splice records\n * @return {void}\n * @private\n */\nfunction notifySplices(inst, array, path, splices) {\n const splicesData = { indexSplices: splices };\n // Legacy behavior stored splices in `__data__` so it was *not* ephemeral.\n // To match this behavior, we store splices directly on the array.\n if (legacyUndefined && !inst._overrideLegacyUndefined) {\n array.splices = splicesData;\n }\n inst.notifyPath(path + '.splices', splicesData);\n inst.notifyPath(path + '.length', array.length);\n // Clear splice data only when it's stored on the array.\n if (legacyUndefined && !inst._overrideLegacyUndefined) {\n splicesData.indexSplices = [];\n }\n}\n\n/**\n * Creates a splice record and sends an array splice notification for\n * the described mutation\n *\n * Note: this implementation only accepts normalized paths\n *\n * @param {!Polymer_PropertyEffects} inst Instance to send notifications to\n * @param {Array} array The array the mutations occurred on\n * @param {string} path The path to the array that was mutated\n * @param {number} index Index at which the array mutation occurred\n * @param {number} addedCount Number of added items\n * @param {Array} removed Array of removed items\n * @return {void}\n * @private\n */\nfunction notifySplice(inst, array, path, index, addedCount, removed) {\n notifySplices(inst, array, path, [{\n index: index,\n addedCount: addedCount,\n removed: removed,\n object: array,\n type: 'splice'\n }]);\n}\n\n/**\n * Returns an upper-cased version of the string.\n *\n * @param {string} name String to uppercase\n * @return {string} Uppercased string\n * @private\n */\nfunction upper(name) {\n return name[0].toUpperCase() + name.substring(1);\n}\n\n/**\n * Element class mixin that provides meta-programming for Polymer's template\n * binding and data observation (collectively, \"property effects\") system.\n *\n * This mixin uses provides the following key static methods for adding\n * property effects to an element class:\n * - `addPropertyEffect`\n * - `createPropertyObserver`\n * - `createMethodObserver`\n * - `createNotifyingProperty`\n * - `createReadOnlyProperty`\n * - `createReflectedProperty`\n * - `createComputedProperty`\n * - `bindTemplate`\n *\n * Each method creates one or more property accessors, along with metadata\n * used by this mixin's implementation of `_propertiesChanged` to perform\n * the property effects.\n *\n * Underscored versions of the above methods also exist on the element\n * prototype for adding property effects on instances at runtime.\n *\n * Note that this mixin overrides several `PropertyAccessors` methods, in\n * many cases to maintain guarantees provided by the Polymer 1.x features;\n * notably it changes property accessors to be synchronous by default\n * whereas the default when using `PropertyAccessors` standalone is to be\n * async by default.\n *\n * @mixinFunction\n * @polymer\n * @appliesMixin TemplateStamp\n * @appliesMixin PropertyAccessors\n * @summary Element class mixin that provides meta-programming for Polymer's\n * template binding and data observation system.\n */\nexport const PropertyEffects = dedupingMixin(superClass => {\n\n /**\n * @constructor\n * @implements {Polymer_PropertyAccessors}\n * @implements {Polymer_TemplateStamp}\n * @unrestricted\n * @private\n */\n const propertyEffectsBase = TemplateStamp(PropertyAccessors(superClass));\n\n /**\n * @polymer\n * @mixinClass\n * @implements {Polymer_PropertyEffects}\n * @extends {propertyEffectsBase}\n * @unrestricted\n */\n class PropertyEffects extends propertyEffectsBase {\n\n constructor() {\n super();\n /** @type {boolean} */\n // Used to identify users of this mixin, ala instanceof\n this.__isPropertyEffectsClient = true;\n /** @type {boolean} */\n this.__dataClientsReady;\n /** @type {Array} */\n this.__dataPendingClients;\n /** @type {Object} */\n this.__dataToNotify;\n /** @type {Object} */\n this.__dataLinkedPaths;\n /** @type {boolean} */\n this.__dataHasPaths;\n /** @type {Object} */\n this.__dataCompoundStorage;\n /** @type {Polymer_PropertyEffects} */\n this.__dataHost;\n /** @type {!Object} */\n this.__dataTemp;\n /** @type {boolean} */\n this.__dataClientsInitialized;\n /** @type {!Object} */\n this.__data;\n /** @type {!Object|null} */\n this.__dataPending;\n /** @type {!Object} */\n this.__dataOld;\n /** @type {Object} */\n this.__computeEffects;\n /** @type {Object} */\n this.__computeInfo;\n /** @type {Object} */\n this.__reflectEffects;\n /** @type {Object} */\n this.__notifyEffects;\n /** @type {Object} */\n this.__propagateEffects;\n /** @type {Object} */\n this.__observeEffects;\n /** @type {Object} */\n this.__readOnly;\n /** @type {!TemplateInfo} */\n this.__templateInfo;\n /** @type {boolean} */\n this._overrideLegacyUndefined;\n }\n\n get PROPERTY_EFFECT_TYPES() {\n return TYPES;\n }\n\n /**\n * @override\n * @return {void}\n */\n _initializeProperties() {\n super._initializeProperties();\n this._registerHost();\n this.__dataClientsReady = false;\n this.__dataPendingClients = null;\n this.__dataToNotify = null;\n this.__dataLinkedPaths = null;\n this.__dataHasPaths = false;\n // May be set on instance prior to upgrade\n this.__dataCompoundStorage = this.__dataCompoundStorage || null;\n this.__dataHost = this.__dataHost || null;\n this.__dataTemp = {};\n this.__dataClientsInitialized = false;\n }\n\n _registerHost() {\n if (hostStack.length) {\n let host = hostStack[hostStack.length-1];\n host._enqueueClient(this);\n // This ensures even non-bound elements have a host set, as\n // long as they upgrade synchronously\n this.__dataHost = host;\n }\n }\n\n /**\n * Overrides `PropertyAccessors` implementation to provide a\n * more efficient implementation of initializing properties from\n * the prototype on the instance.\n *\n * @override\n * @param {Object} props Properties to initialize on the prototype\n * @return {void}\n */\n _initializeProtoProperties(props) {\n this.__data = Object.create(props);\n this.__dataPending = Object.create(props);\n this.__dataOld = {};\n }\n\n /**\n * Overrides `PropertyAccessors` implementation to avoid setting\n * `_setProperty`'s `shouldNotify: true`.\n *\n * @override\n * @param {Object} props Properties to initialize on the instance\n * @return {void}\n */\n _initializeInstanceProperties(props) {\n let readOnly = this[TYPES.READ_ONLY];\n for (let prop in props) {\n if (!readOnly || !readOnly[prop]) {\n this.__dataPending = this.__dataPending || {};\n this.__dataOld = this.__dataOld || {};\n this.__data[prop] = this.__dataPending[prop] = props[prop];\n }\n }\n }\n\n // Prototype setup ----------------------------------------\n\n /**\n * Equivalent to static `addPropertyEffect` API but can be called on\n * an instance to add effects at runtime. See that method for\n * full API docs.\n *\n * @override\n * @param {string} property Property that should trigger the effect\n * @param {string} type Effect type, from this.PROPERTY_EFFECT_TYPES\n * @param {Object=} effect Effect metadata object\n * @return {void}\n * @protected\n */\n _addPropertyEffect(property, type, effect) {\n this._createPropertyAccessor(property, type == TYPES.READ_ONLY);\n // effects are accumulated into arrays per property based on type\n let effects = ensureOwnEffectMap(this, type, true)[property];\n if (!effects) {\n effects = this[type][property] = [];\n }\n effects.push(effect);\n }\n\n /**\n * Removes the given property effect.\n *\n * @override\n * @param {string} property Property the effect was associated with\n * @param {string} type Effect type, from this.PROPERTY_EFFECT_TYPES\n * @param {Object=} effect Effect metadata object to remove\n * @return {void}\n */\n _removePropertyEffect(property, type, effect) {\n let effects = ensureOwnEffectMap(this, type, true)[property];\n let idx = effects.indexOf(effect);\n if (idx >= 0) {\n effects.splice(idx, 1);\n }\n }\n\n /**\n * Returns whether the current prototype/instance has a property effect\n * of a certain type.\n *\n * @override\n * @param {string} property Property name\n * @param {string=} type Effect type, from this.PROPERTY_EFFECT_TYPES\n * @return {boolean} True if the prototype/instance has an effect of this\n * type\n * @protected\n */\n _hasPropertyEffect(property, type) {\n let effects = this[type];\n return Boolean(effects && effects[property]);\n }\n\n /**\n * Returns whether the current prototype/instance has a \"read only\"\n * accessor for the given property.\n *\n * @override\n * @param {string} property Property name\n * @return {boolean} True if the prototype/instance has an effect of this\n * type\n * @protected\n */\n _hasReadOnlyEffect(property) {\n return this._hasPropertyEffect(property, TYPES.READ_ONLY);\n }\n\n /**\n * Returns whether the current prototype/instance has a \"notify\"\n * property effect for the given property.\n *\n * @override\n * @param {string} property Property name\n * @return {boolean} True if the prototype/instance has an effect of this\n * type\n * @protected\n */\n _hasNotifyEffect(property) {\n return this._hasPropertyEffect(property, TYPES.NOTIFY);\n }\n\n /**\n * Returns whether the current prototype/instance has a \"reflect to\n * attribute\" property effect for the given property.\n *\n * @override\n * @param {string} property Property name\n * @return {boolean} True if the prototype/instance has an effect of this\n * type\n * @protected\n */\n _hasReflectEffect(property) {\n return this._hasPropertyEffect(property, TYPES.REFLECT);\n }\n\n /**\n * Returns whether the current prototype/instance has a \"computed\"\n * property effect for the given property.\n *\n * @override\n * @param {string} property Property name\n * @return {boolean} True if the prototype/instance has an effect of this\n * type\n * @protected\n */\n _hasComputedEffect(property) {\n return this._hasPropertyEffect(property, TYPES.COMPUTE);\n }\n\n // Runtime ----------------------------------------\n\n /**\n * Sets a pending property or path. If the root property of the path in\n * question had no accessor, the path is set, otherwise it is enqueued\n * via `_setPendingProperty`.\n *\n * This function isolates relatively expensive functionality necessary\n * for the public API (`set`, `setProperties`, `notifyPath`, and property\n * change listeners via {{...}} bindings), such that it is only done\n * when paths enter the system, and not at every propagation step. It\n * also sets a `__dataHasPaths` flag on the instance which is used to\n * fast-path slower path-matching code in the property effects host paths.\n *\n * `path` can be a path string or array of path parts as accepted by the\n * public API.\n *\n * @override\n * @param {string | !Array<number|string>} path Path to set\n * @param {*} value Value to set\n * @param {boolean=} shouldNotify Set to true if this change should\n * cause a property notification event dispatch\n * @param {boolean=} isPathNotification If the path being set is a path\n * notification of an already changed value, as opposed to a request\n * to set and notify the change. In the latter `false` case, a dirty\n * check is performed and then the value is set to the path before\n * enqueuing the pending property change.\n * @return {boolean} Returns true if the property/path was enqueued in\n * the pending changes bag.\n * @protected\n */\n _setPendingPropertyOrPath(path, value, shouldNotify, isPathNotification) {\n if (isPathNotification ||\n root(Array.isArray(path) ? path[0] : path) !== path) {\n // Dirty check changes being set to a path against the actual object,\n // since this is the entry point for paths into the system; from here\n // the only dirty checks are against the `__dataTemp` cache to prevent\n // duplicate work in the same turn only. Note, if this was a notification\n // of a change already set to a path (isPathNotification: true),\n // we always let the change through and skip the `set` since it was\n // already dirty checked at the point of entry and the underlying\n // object has already been updated\n if (!isPathNotification) {\n let old = get(this, path);\n path = /** @type {string} */ (set(this, path, value));\n // Use property-accessor's simpler dirty check\n if (!path || !super._shouldPropertyChange(path, value, old)) {\n return false;\n }\n }\n this.__dataHasPaths = true;\n if (this._setPendingProperty(/**@type{string}*/(path), value, shouldNotify)) {\n computeLinkedPaths(this, /**@type{string}*/ (path), value);\n return true;\n }\n } else {\n if (this.__dataHasAccessor && this.__dataHasAccessor[path]) {\n return this._setPendingProperty(/**@type{string}*/(path), value, shouldNotify);\n } else {\n this[path] = value;\n }\n }\n return false;\n }\n\n /**\n * Applies a value to a non-Polymer element/node's property.\n *\n * The implementation makes a best-effort at binding interop:\n * Some native element properties have side-effects when\n * re-setting the same value (e.g. setting `<input>.value` resets the\n * cursor position), so we do a dirty-check before setting the value.\n * However, for better interop with non-Polymer custom elements that\n * accept objects, we explicitly re-set object changes coming from the\n * Polymer world (which may include deep object changes without the\n * top reference changing), erring on the side of providing more\n * information.\n *\n * Users may override this method to provide alternate approaches.\n *\n * @override\n * @param {!Node} node The node to set a property on\n * @param {string} prop The property to set\n * @param {*} value The value to set\n * @return {void}\n * @protected\n */\n _setUnmanagedPropertyToNode(node, prop, value) {\n // It is a judgment call that resetting primitives is\n // \"bad\" and resettings objects is also \"good\"; alternatively we could\n // implement a whitelist of tag & property values that should never\n // be reset (e.g. <input>.value && <select>.value)\n if (value !== node[prop] || typeof value == 'object') {\n // Note, className needs style scoping so this needs wrapping.\n if (prop === 'className') {\n node = /** @type {!Node} */(wrap(node));\n }\n node[prop] = value;\n }\n }\n\n /**\n * Overrides the `PropertiesChanged` implementation to introduce special\n * dirty check logic depending on the property & value being set:\n *\n * 1. Any value set to a path (e.g. 'obj.prop': 42 or 'obj.prop': {...})\n * Stored in `__dataTemp`, dirty checked against `__dataTemp`\n * 2. Object set to simple property (e.g. 'prop': {...})\n * Stored in `__dataTemp` and `__data`, dirty checked against\n * `__dataTemp` by default implementation of `_shouldPropertyChange`\n * 3. Primitive value set to simple property (e.g. 'prop': 42)\n * Stored in `__data`, dirty checked against `__data`\n *\n * The dirty-check is important to prevent cycles due to two-way\n * notification, but paths and objects are only dirty checked against any\n * previous value set during this turn via a \"temporary cache\" that is\n * cleared when the last `_propertiesChanged` exits. This is so:\n * a. any cached array paths (e.g. 'array.3.prop') may be invalidated\n * due to array mutations like shift/unshift/splice; this is fine\n * since path changes are dirty-checked at user entry points like `set`\n * b. dirty-checking for objects only lasts one turn to allow the user\n * to mutate the object in-place and re-set it with the same identity\n * and have all sub-properties re-propagated in a subsequent turn.\n *\n * The temp cache is not necessarily sufficient to prevent invalid array\n * paths, since a splice can happen during the same turn (with pathological\n * user code); we could introduce a \"fixup\" for temporarily cached array\n * paths if needed: https://github.com/Polymer/polymer/issues/4227\n *\n * @override\n * @param {string} property Name of the property\n * @param {*} value Value to set\n * @param {boolean=} shouldNotify True if property should fire notification\n * event (applies only for `notify: true` properties)\n * @return {boolean} Returns true if the property changed\n */\n _setPendingProperty(property, value, shouldNotify) {\n let propIsPath = this.__dataHasPaths && isPath(property);\n let prevProps = propIsPath ? this.__dataTemp : this.__data;\n if (this._shouldPropertyChange(property, value, prevProps[property])) {\n if (!this.__dataPending) {\n this.__dataPending = {};\n this.__dataOld = {};\n }\n // Ensure old is captured from the last turn\n if (!(property in this.__dataOld)) {\n this.__dataOld[property] = this.__data[property];\n }\n // Paths are stored in temporary cache (cleared at end of turn),\n // which is used for dirty-checking, all others stored in __data\n if (propIsPath) {\n this.__dataTemp[property] = value;\n } else {\n this.__data[property] = value;\n }\n // All changes go into pending property bag, passed to _propertiesChanged\n this.__dataPending[property] = value;\n // Track properties that should notify separately\n if (propIsPath || (this[TYPES.NOTIFY] && this[TYPES.NOTIFY][property])) {\n this.__dataToNotify = this.__dataToNotify || {};\n this.__dataToNotify[property] = shouldNotify;\n }\n return true;\n }\n return false;\n }\n\n /**\n * Overrides base implementation to ensure all accessors set `shouldNotify`\n * to true, for per-property notification tracking.\n *\n * @override\n * @param {string} property Name of the property\n * @param {*} value Value to set\n * @return {void}\n */\n _setProperty(property, value) {\n if (this._setPendingProperty(property, value, true)) {\n this._invalidateProperties();\n }\n }\n\n /**\n * Overrides `PropertyAccessor`'s default async queuing of\n * `_propertiesChanged`: if `__dataReady` is false (has not yet been\n * manually flushed), the function no-ops; otherwise flushes\n * `_propertiesChanged` synchronously.\n *\n * @override\n * @return {void}\n */\n _invalidateProperties() {\n if (this.__dataReady) {\n this._flushProperties();\n }\n }\n\n /**\n * Enqueues the given client on a list of pending clients, whose\n * pending property changes can later be flushed via a call to\n * `_flushClients`.\n *\n * @override\n * @param {Object} client PropertyEffects client to enqueue\n * @return {void}\n * @protected\n */\n _enqueueClient(client) {\n this.__dataPendingClients = this.__dataPendingClients || [];\n if (client !== this) {\n this.__dataPendingClients.push(client);\n }\n }\n\n /**\n * Flushes any clients previously enqueued via `_enqueueClient`, causing\n * their `_flushProperties` method to run.\n *\n * @override\n * @return {void}\n * @protected\n */\n _flushClients() {\n if (!this.__dataClientsReady) {\n this.__dataClientsReady = true;\n this._readyClients();\n // Override point where accessors are turned on; importantly,\n // this is after clients have fully readied, providing a guarantee\n // that any property effects occur only after all clients are ready.\n this.__dataReady = true;\n } else {\n this.__enableOrFlushClients();\n }\n }\n\n // NOTE: We ensure clients either enable or flush as appropriate. This\n // handles two corner cases:\n // (1) clients flush properly when connected/enabled before the host\n // enables; e.g.\n // (a) Templatize stamps with no properties and does not flush and\n // (b) the instance is inserted into dom and\n // (c) then the instance flushes.\n // (2) clients enable properly when not connected/enabled when the host\n // flushes; e.g.\n // (a) a template is runtime stamped and not yet connected/enabled\n // (b) a host sets a property, causing stamped dom to flush\n // (c) the stamped dom enables.\n __enableOrFlushClients() {\n let clients = this.__dataPendingClients;\n if (clients) {\n this.__dataPendingClients = null;\n for (let i=0; i < clients.length; i++) {\n let client = clients[i];\n if (!client.__dataEnabled) {\n client._enableProperties();\n } else if (client.__dataPending) {\n client._flushProperties();\n }\n }\n }\n }\n\n /**\n * Perform any initial setup on client dom. Called before the first\n * `_flushProperties` call on client dom and before any element\n * observers are called.\n *\n * @override\n * @return {void}\n * @protected\n */\n _readyClients() {\n this.__enableOrFlushClients();\n }\n\n /**\n * Sets a bag of property changes to this instance, and\n * synchronously processes all effects of the properties as a batch.\n *\n * Property names must be simple properties, not paths. Batched\n * path propagation is not supported.\n *\n * @override\n * @param {Object} props Bag of one or more key-value pairs whose key is\n * a property and value is the new value to set for that property.\n * @param {boolean=} setReadOnly When true, any private values set in\n * `props` will be set. By default, `setProperties` will not set\n * `readOnly: true` root properties.\n * @return {void}\n * @public\n */\n setProperties(props, setReadOnly) {\n for (let path in props) {\n if (setReadOnly || !this[TYPES.READ_ONLY] || !this[TYPES.READ_ONLY][path]) {\n //TODO(kschaaf): explicitly disallow paths in setProperty?\n // wildcard observers currently only pass the first changed path\n // in the `info` object, and you could do some odd things batching\n // paths, e.g. {'foo.bar': {...}, 'foo': null}\n this._setPendingPropertyOrPath(path, props[path], true);\n }\n }\n this._invalidateProperties();\n }\n\n /**\n * Overrides `PropertyAccessors` so that property accessor\n * side effects are not enabled until after client dom is fully ready.\n * Also calls `_flushClients` callback to ensure client dom is enabled\n * that was not enabled as a result of flushing properties.\n *\n * @override\n * @return {void}\n */\n ready() {\n // It is important that `super.ready()` is not called here as it\n // immediately turns on accessors. Instead, we wait until `readyClients`\n // to enable accessors to provide a guarantee that clients are ready\n // before processing any accessors side effects.\n this._flushProperties();\n // If no data was pending, `_flushProperties` will not `flushClients`\n // so ensure this is done.\n if (!this.__dataClientsReady) {\n this._flushClients();\n }\n // Before ready, client notifications do not trigger _flushProperties.\n // Therefore a flush is necessary here if data has been set.\n if (this.__dataPending) {\n this._flushProperties();\n }\n }\n\n /**\n * Implements `PropertyAccessors`'s properties changed callback.\n *\n * Runs each class of effects for the batch of changed properties in\n * a specific order (compute, propagate, reflect, observe, notify).\n *\n * @override\n * @param {!Object} currentProps Bag of all current accessor values\n * @param {?Object} changedProps Bag of properties changed since the last\n * call to `_propertiesChanged`\n * @param {?Object} oldProps Bag of previous values for each property\n * in `changedProps`\n * @return {void}\n */\n _propertiesChanged(currentProps, changedProps, oldProps) {\n // ----------------------------\n // let c = Object.getOwnPropertyNames(changedProps || {});\n // window.debug && console.group(this.localName + '#' + this.id + ': ' + c);\n // if (window.debug) { debugger; }\n // ----------------------------\n let hasPaths = this.__dataHasPaths;\n this.__dataHasPaths = false;\n let notifyProps;\n // Compute properties\n runComputedEffects(this, changedProps, oldProps, hasPaths);\n // Clear notify properties prior to possible reentry (propagate, observe),\n // but after computing effects have a chance to add to them\n notifyProps = this.__dataToNotify;\n this.__dataToNotify = null;\n // Propagate properties to clients\n this._propagatePropertyChanges(changedProps, oldProps, hasPaths);\n // Flush clients\n this._flushClients();\n // Reflect properties\n runEffects(this, this[TYPES.REFLECT], changedProps, oldProps, hasPaths);\n // Observe properties\n runEffects(this, this[TYPES.OBSERVE], changedProps, oldProps, hasPaths);\n // Notify properties to host\n if (notifyProps) {\n runNotifyEffects(this, notifyProps, changedProps, oldProps, hasPaths);\n }\n // Clear temporary cache at end of turn\n if (this.__dataCounter == 1) {\n this.__dataTemp = {};\n }\n // ----------------------------\n // window.debug && console.groupEnd(this.localName + '#' + this.id + ': ' + c);\n // ----------------------------\n }\n\n /**\n * Called to propagate any property changes to stamped template nodes\n * managed by this element.\n *\n * @override\n * @param {Object} changedProps Bag of changed properties\n * @param {Object} oldProps Bag of previous values for changed properties\n * @param {boolean} hasPaths True with `props` contains one or more paths\n * @return {void}\n * @protected\n */\n _propagatePropertyChanges(changedProps, oldProps, hasPaths) {\n if (this[TYPES.PROPAGATE]) {\n runEffects(this, this[TYPES.PROPAGATE], changedProps, oldProps, hasPaths);\n }\n if (this.__templateInfo) {\n this._runEffectsForTemplate(this.__templateInfo, changedProps, oldProps, hasPaths);\n }\n }\n\n _runEffectsForTemplate(templateInfo, changedProps, oldProps, hasPaths) {\n const baseRunEffects = (changedProps, hasPaths) => {\n runEffects(this, templateInfo.propertyEffects, changedProps, oldProps,\n hasPaths, templateInfo.nodeList);\n for (let info=templateInfo.firstChild; info; info=info.nextSibling) {\n this._runEffectsForTemplate(info, changedProps, oldProps, hasPaths);\n }\n };\n if (templateInfo.runEffects) {\n templateInfo.runEffects(baseRunEffects, changedProps, hasPaths);\n } else {\n baseRunEffects(changedProps, hasPaths);\n }\n }\n\n /**\n * Aliases one data path as another, such that path notifications from one\n * are routed to the other.\n *\n * @override\n * @param {string | !Array<string|number>} to Target path to link.\n * @param {string | !Array<string|number>} from Source path to link.\n * @return {void}\n * @public\n */\n linkPaths(to, from) {\n to = normalize(to);\n from = normalize(from);\n this.__dataLinkedPaths = this.__dataLinkedPaths || {};\n this.__dataLinkedPaths[to] = from;\n }\n\n /**\n * Removes a data path alias previously established with `_linkPaths`.\n *\n * Note, the path to unlink should be the target (`to`) used when\n * linking the paths.\n *\n * @override\n * @param {string | !Array<string|number>} path Target path to unlink.\n * @return {void}\n * @public\n */\n unlinkPaths(path) {\n path = normalize(path);\n if (this.__dataLinkedPaths) {\n delete this.__dataLinkedPaths[path];\n }\n }\n\n /**\n * Notify that an array has changed.\n *\n * Example:\n *\n * this.items = [ {name: 'Jim'}, {name: 'Todd'}, {name: 'Bill'} ];\n * ...\n * this.items.splice(1, 1, {name: 'Sam'});\n * this.items.push({name: 'Bob'});\n * this.notifySplices('items', [\n * { index: 1, removed: [{name: 'Todd'}], addedCount: 1,\n * object: this.items, type: 'splice' },\n * { index: 3, removed: [], addedCount: 1,\n * object: this.items, type: 'splice'}\n * ]);\n *\n * @param {string} path Path that should be notified.\n * @param {Array} splices Array of splice records indicating ordered\n * changes that occurred to the array. Each record should have the\n * following fields:\n * * index: index at which the change occurred\n * * removed: array of items that were removed from this index\n * * addedCount: number of new items added at this index\n * * object: a reference to the array in question\n * * type: the string literal 'splice'\n *\n * Note that splice records _must_ be normalized such that they are\n * reported in index order (raw results from `Object.observe` are not\n * ordered and must be normalized/merged before notifying).\n *\n * @override\n * @return {void}\n * @public\n */\n notifySplices(path, splices) {\n let info = {path: ''};\n let array = /** @type {Array} */(get(this, path, info));\n notifySplices(this, array, info.path, splices);\n }\n\n /**\n * Convenience method for reading a value from a path.\n *\n * Note, if any part in the path is undefined, this method returns\n * `undefined` (this method does not throw when dereferencing undefined\n * paths).\n *\n * @override\n * @param {(string|!Array<(string|number)>)} path Path to the value\n * to read. The path may be specified as a string (e.g. `foo.bar.baz`)\n * or an array of path parts (e.g. `['foo.bar', 'baz']`). Note that\n * bracketed expressions are not supported; string-based path parts\n * *must* be separated by dots. Note that when dereferencing array\n * indices, the index may be used as a dotted part directly\n * (e.g. `users.12.name` or `['users', 12, 'name']`).\n * @param {Object=} root Root object from which the path is evaluated.\n * @return {*} Value at the path, or `undefined` if any part of the path\n * is undefined.\n * @public\n */\n get(path, root) {\n return get(root || this, path);\n }\n\n /**\n * Convenience method for setting a value to a path and notifying any\n * elements bound to the same path.\n *\n * Note, if any part in the path except for the last is undefined,\n * this method does nothing (this method does not throw when\n * dereferencing undefined paths).\n *\n * @override\n * @param {(string|!Array<(string|number)>)} path Path to the value\n * to write. The path may be specified as a string (e.g. `'foo.bar.baz'`)\n * or an array of path parts (e.g. `['foo.bar', 'baz']`). Note that\n * bracketed expressions are not supported; string-based path parts\n * *must* be separated by dots. Note that when dereferencing array\n * indices, the index may be used as a dotted part directly\n * (e.g. `'users.12.name'` or `['users', 12, 'name']`).\n * @param {*} value Value to set at the specified path.\n * @param {Object=} root Root object from which the path is evaluated.\n * When specified, no notification will occur.\n * @return {void}\n * @public\n */\n set(path, value, root) {\n if (root) {\n set(root, path, value);\n } else {\n if (!this[TYPES.READ_ONLY] || !this[TYPES.READ_ONLY][/** @type {string} */(path)]) {\n if (this._setPendingPropertyOrPath(path, value, true)) {\n this._invalidateProperties();\n }\n }\n }\n }\n\n /**\n * Adds items onto the end of the array at the path specified.\n *\n * The arguments after `path` and return value match that of\n * `Array.prototype.push`.\n *\n * This method notifies other paths to the same array that a\n * splice occurred to the array.\n *\n * @override\n * @param {string | !Array<string|number>} path Path to array.\n * @param {...*} items Items to push onto array\n * @return {number} New length of the array.\n * @public\n */\n push(path, ...items) {\n let info = {path: ''};\n let array = /** @type {Array}*/(get(this, path, info));\n let len = array.length;\n let ret = array.push(...items);\n if (items.length) {\n notifySplice(this, array, info.path, len, items.length, []);\n }\n return ret;\n }\n\n /**\n * Removes an item from the end of array at the path specified.\n *\n * The arguments after `path` and return value match that of\n * `Array.prototype.pop`.\n *\n * This method notifies other paths to the same array that a\n * splice occurred to the array.\n *\n * @override\n * @param {string | !Array<string|number>} path Path to array.\n * @return {*} Item that was removed.\n * @public\n */\n pop(path) {\n let info = {path: ''};\n let array = /** @type {Array} */(get(this, path, info));\n let hadLength = Boolean(array.length);\n let ret = array.pop();\n if (hadLength) {\n notifySplice(this, array, info.path, array.length, 0, [ret]);\n }\n return ret;\n }\n\n /**\n * Starting from the start index specified, removes 0 or more items\n * from the array and inserts 0 or more new items in their place.\n *\n * The arguments after `path` and return value match that of\n * `Array.prototype.splice`.\n *\n * This method notifies other paths to the same array that a\n * splice occurred to the array.\n *\n * @override\n * @param {string | !Array<string|number>} path Path to array.\n * @param {number} start Index from which to start removing/inserting.\n * @param {number=} deleteCount Number of items to remove.\n * @param {...*} items Items to insert into array.\n * @return {!Array} Array of removed items.\n * @public\n */\n splice(path, start, deleteCount, ...items) {\n let info = {path : ''};\n let array = /** @type {Array} */(get(this, path, info));\n // Normalize fancy native splice handling of crazy start values\n if (start < 0) {\n start = array.length - Math.floor(-start);\n } else if (start) {\n start = Math.floor(start);\n }\n // array.splice does different things based on the number of arguments\n // you pass in. Therefore, array.splice(0) and array.splice(0, undefined)\n // do different things. In the former, the whole array is cleared. In the\n // latter, no items are removed.\n // This means that we need to detect whether 1. one of the arguments\n // is actually passed in and then 2. determine how many arguments\n // we should pass on to the native array.splice\n //\n let ret;\n // Omit any additional arguments if they were not passed in\n if (arguments.length === 2) {\n ret = array.splice(start);\n // Either start was undefined and the others were defined, but in this\n // case we can safely pass on all arguments\n //\n // Note: this includes the case where none of the arguments were passed in,\n // e.g. this.splice('array'). However, if both start and deleteCount\n // are undefined, array.splice will not modify the array (as expected)\n } else {\n ret = array.splice(start, deleteCount, ...items);\n }\n // At the end, check whether any items were passed in (e.g. insertions)\n // or if the return array contains items (e.g. deletions).\n // Only notify if items were added or deleted.\n if (items.length || ret.length) {\n notifySplice(this, array, info.path, start, items.length, ret);\n }\n return ret;\n }\n\n /**\n * Removes an item from the beginning of array at the path specified.\n *\n * The arguments after `path` and return value match that of\n * `Array.prototype.pop`.\n *\n * This method notifies other paths to the same array that a\n * splice occurred to the array.\n *\n * @override\n * @param {string | !Array<string|number>} path Path to array.\n * @return {*} Item that was removed.\n * @public\n */\n shift(path) {\n let info = {path: ''};\n let array = /** @type {Array} */(get(this, path, info));\n let hadLength = Boolean(array.length);\n let ret = array.shift();\n if (hadLength) {\n notifySplice(this, array, info.path, 0, 0, [ret]);\n }\n return ret;\n }\n\n /**\n * Adds items onto the beginning of the array at the path specified.\n *\n * The arguments after `path` and return value match that of\n * `Array.prototype.push`.\n *\n * This method notifies other paths to the same array that a\n * splice occurred to the array.\n *\n * @override\n * @param {string | !Array<string|number>} path Path to array.\n * @param {...*} items Items to insert info array\n * @return {number} New length of the array.\n * @public\n */\n unshift(path, ...items) {\n let info = {path: ''};\n let array = /** @type {Array} */(get(this, path, info));\n let ret = array.unshift(...items);\n if (items.length) {\n notifySplice(this, array, info.path, 0, items.length, []);\n }\n return ret;\n }\n\n /**\n * Notify that a path has changed.\n *\n * Example:\n *\n * this.item.user.name = 'Bob';\n * this.notifyPath('item.user.name');\n *\n * @override\n * @param {string} path Path that should be notified.\n * @param {*=} value Value at the path (optional).\n * @return {void}\n * @public\n */\n notifyPath(path, value) {\n /** @type {string} */\n let propPath;\n if (arguments.length == 1) {\n // Get value if not supplied\n let info = {path: ''};\n value = get(this, path, info);\n propPath = info.path;\n } else if (Array.isArray(path)) {\n // Normalize path if needed\n propPath = normalize(path);\n } else {\n propPath = /** @type{string} */(path);\n }\n if (this._setPendingPropertyOrPath(propPath, value, true, true)) {\n this._invalidateProperties();\n }\n }\n\n /**\n * Equivalent to static `createReadOnlyProperty` API but can be called on\n * an instance to add effects at runtime. See that method for\n * full API docs.\n *\n * @override\n * @param {string} property Property name\n * @param {boolean=} protectedSetter Creates a custom protected setter\n * when `true`.\n * @return {void}\n * @protected\n */\n _createReadOnlyProperty(property, protectedSetter) {\n this._addPropertyEffect(property, TYPES.READ_ONLY);\n if (protectedSetter) {\n this['_set' + upper(property)] = /** @this {PropertyEffects} */function(value) {\n this._setProperty(property, value);\n };\n }\n }\n\n /**\n * Equivalent to static `createPropertyObserver` API but can be called on\n * an instance to add effects at runtime. See that method for\n * full API docs.\n *\n * @override\n * @param {string} property Property name\n * @param {string|function(*,*)} method Function or name of observer method\n * to call\n * @param {boolean=} dynamicFn Whether the method name should be included as\n * a dependency to the effect.\n * @return {void}\n * @protected\n */\n _createPropertyObserver(property, method, dynamicFn) {\n let info = { property, method, dynamicFn: Boolean(dynamicFn) };\n this._addPropertyEffect(property, TYPES.OBSERVE, {\n fn: runObserverEffect, info, trigger: {name: property}\n });\n if (dynamicFn) {\n this._addPropertyEffect(/** @type {string} */(method), TYPES.OBSERVE, {\n fn: runObserverEffect, info, trigger: {name: method}\n });\n }\n }\n\n /**\n * Equivalent to static `createMethodObserver` API but can be called on\n * an instance to add effects at runtime. See that method for\n * full API docs.\n *\n * @override\n * @param {string} expression Method expression\n * @param {boolean|Object=} dynamicFn Boolean or object map indicating\n * whether method names should be included as a dependency to the effect.\n * @return {void}\n * @protected\n */\n _createMethodObserver(expression, dynamicFn) {\n let sig = parseMethod(expression);\n if (!sig) {\n throw new Error(\"Malformed observer expression '\" + expression + \"'\");\n }\n createMethodEffect(this, sig, TYPES.OBSERVE, runMethodEffect, null, dynamicFn);\n }\n\n /**\n * Equivalent to static `createNotifyingProperty` API but can be called on\n * an instance to add effects at runtime. See that method for\n * full API docs.\n *\n * @override\n * @param {string} property Property name\n * @return {void}\n * @protected\n */\n _createNotifyingProperty(property) {\n this._addPropertyEffect(property, TYPES.NOTIFY, {\n fn: runNotifyEffect,\n info: {\n eventName: camelToDashCase(property) + '-changed',\n property: property\n }\n });\n }\n\n /**\n * Equivalent to static `createReflectedProperty` API but can be called on\n * an instance to add effects at runtime. See that method for\n * full API docs.\n *\n * @override\n * @param {string} property Property name\n * @return {void}\n * @protected\n * @suppress {missingProperties} go/missingfnprops\n */\n _createReflectedProperty(property) {\n let attr = this.constructor.attributeNameForProperty(property);\n if (attr[0] === '-') {\n console.warn('Property ' + property + ' cannot be reflected to attribute ' +\n attr + ' because \"-\" is not a valid starting attribute name. Use a lowercase first letter for the property instead.');\n } else {\n this._addPropertyEffect(property, TYPES.REFLECT, {\n fn: runReflectEffect,\n info: {\n attrName: attr\n }\n });\n }\n }\n\n /**\n * Equivalent to static `createComputedProperty` API but can be called on\n * an instance to add effects at runtime. See that method for\n * full API docs.\n *\n * @override\n * @param {string} property Name of computed property to set\n * @param {string} expression Method expression\n * @param {boolean|Object=} dynamicFn Boolean or object map indicating\n * whether method names should be included as a dependency to the effect.\n * @return {void}\n * @protected\n */\n _createComputedProperty(property, expression, dynamicFn) {\n let sig = parseMethod(expression);\n if (!sig) {\n throw new Error(\"Malformed computed expression '\" + expression + \"'\");\n }\n const info = createMethodEffect(this, sig, TYPES.COMPUTE, runComputedEffect, property, dynamicFn);\n // Effects are normally stored as map of dependency->effect, but for\n // ordered computation, we also need tree of computedProp->dependencies\n ensureOwnEffectMap(this, COMPUTE_INFO)[property] = info;\n }\n\n /**\n * Gather the argument values for a method specified in the provided array\n * of argument metadata.\n *\n * The `path` and `value` arguments are used to fill in wildcard descriptor\n * when the method is being called as a result of a path notification.\n *\n * @param {!Array<!MethodArg>} args Array of argument metadata\n * @param {string} path Property/path name that triggered the method effect\n * @param {Object} props Bag of current property changes\n * @return {!Array<*>} Array of argument values\n * @private\n */\n _marshalArgs(args, path, props) {\n const data = this.__data;\n const values = [];\n for (let i=0, l=args.length; i<l; i++) {\n let {name, structured, wildcard, value, literal} = args[i];\n if (!literal) {\n if (wildcard) {\n const matches = isDescendant(name, path);\n const pathValue = getArgValue(data, props, matches ? path : name);\n value = {\n path: matches ? path : name,\n value: pathValue,\n base: matches ? get(data, name) : pathValue\n };\n } else {\n value = structured ? getArgValue(data, props, name) : data[name];\n }\n }\n // When the `legacyUndefined` flag is enabled, pass a no-op value\n // so that the observer, computed property, or compound binding is aborted.\n if (legacyUndefined && !this._overrideLegacyUndefined && value === undefined && args.length > 1) {\n return NOOP;\n }\n values[i] = value;\n }\n return values;\n }\n\n // -- static class methods ------------\n\n /**\n * Ensures an accessor exists for the specified property, and adds\n * to a list of \"property effects\" that will run when the accessor for\n * the specified property is set. Effects are grouped by \"type\", which\n * roughly corresponds to a phase in effect processing. The effect\n * metadata should be in the following form:\n *\n * {\n * fn: effectFunction, // Reference to function to call to perform effect\n * info: { ... } // Effect metadata passed to function\n * trigger: { // Optional triggering metadata; if not provided\n * name: string // the property is treated as a wildcard\n * structured: boolean\n * wildcard: boolean\n * }\n * }\n *\n * Effects are called from `_propertiesChanged` in the following order by\n * type:\n *\n * 1. COMPUTE\n * 2. PROPAGATE\n * 3. REFLECT\n * 4. OBSERVE\n * 5. NOTIFY\n *\n * Effect functions are called with the following signature:\n *\n * effectFunction(inst, path, props, oldProps, info, hasPaths)\n *\n * @param {string} property Property that should trigger the effect\n * @param {string} type Effect type, from this.PROPERTY_EFFECT_TYPES\n * @param {Object=} effect Effect metadata object\n * @return {void}\n * @protected\n * @nocollapse\n */\n static addPropertyEffect(property, type, effect) {\n this.prototype._addPropertyEffect(property, type, effect);\n }\n\n /**\n * Creates a single-property observer for the given property.\n *\n * @param {string} property Property name\n * @param {string|function(*,*)} method Function or name of observer method to call\n * @param {boolean=} dynamicFn Whether the method name should be included as\n * a dependency to the effect.\n * @return {void}\n * @protected\n * @nocollapse\n */\n static createPropertyObserver(property, method, dynamicFn) {\n this.prototype._createPropertyObserver(property, method, dynamicFn);\n }\n\n /**\n * Creates a multi-property \"method observer\" based on the provided\n * expression, which should be a string in the form of a normal JavaScript\n * function signature: `'methodName(arg1, [..., argn])'`. Each argument\n * should correspond to a property or path in the context of this\n * prototype (or instance), or may be a literal string or number.\n *\n * @param {string} expression Method expression\n * @param {boolean|Object=} dynamicFn Boolean or object map indicating\n * @return {void}\n * whether method names should be included as a dependency to the effect.\n * @protected\n * @nocollapse\n */\n static createMethodObserver(expression, dynamicFn) {\n this.prototype._createMethodObserver(expression, dynamicFn);\n }\n\n /**\n * Causes the setter for the given property to dispatch `<property>-changed`\n * events to notify of changes to the property.\n *\n * @param {string} property Property name\n * @return {void}\n * @protected\n * @nocollapse\n */\n static createNotifyingProperty(property) {\n this.prototype._createNotifyingProperty(property);\n }\n\n /**\n * Creates a read-only accessor for the given property.\n *\n * To set the property, use the protected `_setProperty` API.\n * To create a custom protected setter (e.g. `_setMyProp()` for\n * property `myProp`), pass `true` for `protectedSetter`.\n *\n * Note, if the property will have other property effects, this method\n * should be called first, before adding other effects.\n *\n * @param {string} property Property name\n * @param {boolean=} protectedSetter Creates a custom protected setter\n * when `true`.\n * @return {void}\n * @protected\n * @nocollapse\n */\n static createReadOnlyProperty(property, protectedSetter) {\n this.prototype._createReadOnlyProperty(property, protectedSetter);\n }\n\n /**\n * Causes the setter for the given property to reflect the property value\n * to a (dash-cased) attribute of the same name.\n *\n * @param {string} property Property name\n * @return {void}\n * @protected\n * @nocollapse\n */\n static createReflectedProperty(property) {\n this.prototype._createReflectedProperty(property);\n }\n\n /**\n * Creates a computed property whose value is set to the result of the\n * method described by the given `expression` each time one or more\n * arguments to the method changes. The expression should be a string\n * in the form of a normal JavaScript function signature:\n * `'methodName(arg1, [..., argn])'`\n *\n * @param {string} property Name of computed property to set\n * @param {string} expression Method expression\n * @param {boolean|Object=} dynamicFn Boolean or object map indicating whether\n * method names should be included as a dependency to the effect.\n * @return {void}\n * @protected\n * @nocollapse\n */\n static createComputedProperty(property, expression, dynamicFn) {\n this.prototype._createComputedProperty(property, expression, dynamicFn);\n }\n\n /**\n * Parses the provided template to ensure binding effects are created\n * for them, and then ensures property accessors are created for any\n * dependent properties in the template. Binding effects for bound\n * templates are stored in a linked list on the instance so that\n * templates can be efficiently stamped and unstamped.\n *\n * @param {!HTMLTemplateElement} template Template containing binding\n * bindings\n * @return {!TemplateInfo} Template metadata object\n * @protected\n * @nocollapse\n */\n static bindTemplate(template) {\n return this.prototype._bindTemplate(template);\n }\n\n // -- binding ----------------------------------------------\n\n /*\n * Overview of binding flow:\n *\n * During finalization (`instanceBinding==false`, `wasPreBound==false`):\n * `_bindTemplate(t, false)` called directly during finalization - parses\n * the template (for the first time), and then assigns that _prototypical_\n * template info to `__preboundTemplateInfo` _on the prototype_; note in\n * this case `wasPreBound` is false; this is the first time we're binding\n * it, thus we create accessors.\n *\n * During first stamping (`instanceBinding==true`, `wasPreBound==true`):\n * `_stampTemplate` calls `_bindTemplate(t, true)`: the `templateInfo`\n * returned matches the prebound one, and so this is `wasPreBound == true`\n * state; thus we _skip_ creating accessors, but _do_ create an instance\n * of the template info to serve as the start of our linked list (needs to\n * be an instance, not the prototypical one, so that we can add `nodeList`\n * to it to contain the `nodeInfo`-ordered list of instance nodes for\n * bindings, and so we can chain runtime-stamped template infos off of\n * it). At this point, the call to `_stampTemplate` calls\n * `applyTemplateInfo` for each nested `<template>` found during parsing\n * to hand prototypical `_templateInfo` to them; we also pass the _parent_\n * `templateInfo` to the `<template>` so that we have the instance-time\n * parent to link the `templateInfo` under in the case it was\n * runtime-stamped.\n *\n * During subsequent runtime stamping (`instanceBinding==true`,\n * `wasPreBound==false`): `_stampTemplate` calls `_bindTemplate(t, true)`\n * - here `templateInfo` is guaranteed to _not_ match the prebound one,\n * because it was either a different template altogether, or even if it\n * was the same template, the step above created a instance of the info;\n * in this case `wasPreBound == false`, so we _do_ create accessors, _and_\n * link a instance into the linked list.\n */\n\n /**\n * Equivalent to static `bindTemplate` API but can be called on an instance\n * to add effects at runtime. See that method for full API docs.\n *\n * This method may be called on the prototype (for prototypical template\n * binding, to avoid creating accessors every instance) once per prototype,\n * and will be called with `runtimeBinding: true` by `_stampTemplate` to\n * create and link an instance of the template metadata associated with a\n * particular stamping.\n *\n * @override\n * @param {!HTMLTemplateElement} template Template containing binding\n * bindings\n * @param {boolean=} instanceBinding When false (default), performs\n * \"prototypical\" binding of the template and overwrites any previously\n * bound template for the class. When true (as passed from\n * `_stampTemplate`), the template info is instanced and linked into the\n * list of bound templates.\n * @return {!TemplateInfo} Template metadata object; for `runtimeBinding`,\n * this is an instance of the prototypical template info\n * @protected\n * @suppress {missingProperties} go/missingfnprops\n */\n _bindTemplate(template, instanceBinding) {\n let templateInfo = this.constructor._parseTemplate(template);\n let wasPreBound = this.__preBoundTemplateInfo == templateInfo;\n // Optimization: since this is called twice for proto-bound templates,\n // don't attempt to recreate accessors if this template was pre-bound\n if (!wasPreBound) {\n for (let prop in templateInfo.propertyEffects) {\n this._createPropertyAccessor(prop);\n }\n }\n if (instanceBinding) {\n // For instance-time binding, create instance of template metadata\n // and link into tree of templates if necessary\n templateInfo = /** @type {!TemplateInfo} */(Object.create(templateInfo));\n templateInfo.wasPreBound = wasPreBound;\n if (!this.__templateInfo) {\n // Set the info to the root of the tree\n this.__templateInfo = templateInfo;\n } else {\n // Append this template info onto the end of its parent template's\n // list, which will determine the tree structure via which property\n // effects are run; if this template was not nested in another\n // template, use the root template (the first stamped one) as the\n // parent. Note, `parent` is the `templateInfo` instance for this\n // template's parent (containing) template, which was set up in\n // `applyTemplateInfo`. While a given template's `parent` is set\n // apriori, it is only added to the parent's child list at the point\n // that it is being bound, since a template may or may not ever be\n // stamped, and may be stamped more than once (in which case instances\n // of the template info will be in the tree under its parent more than\n // once).\n const parent = template._parentTemplateInfo || this.__templateInfo;\n const previous = parent.lastChild;\n templateInfo.parent = parent;\n parent.lastChild = templateInfo;\n templateInfo.previousSibling = previous;\n if (previous) {\n previous.nextSibling = templateInfo;\n } else {\n parent.firstChild = templateInfo;\n }\n }\n } else {\n this.__preBoundTemplateInfo = templateInfo;\n }\n return templateInfo;\n }\n\n /**\n * Adds a property effect to the given template metadata, which is run\n * at the \"propagate\" stage of `_propertiesChanged` when the template\n * has been bound to the element via `_bindTemplate`.\n *\n * The `effect` object should match the format in `_addPropertyEffect`.\n *\n * @param {Object} templateInfo Template metadata to add effect to\n * @param {string} prop Property that should trigger the effect\n * @param {Object=} effect Effect metadata object\n * @return {void}\n * @protected\n * @nocollapse\n */\n static _addTemplatePropertyEffect(templateInfo, prop, effect) {\n let hostProps = templateInfo.hostProps = templateInfo.hostProps || {};\n hostProps[prop] = true;\n let effects = templateInfo.propertyEffects = templateInfo.propertyEffects || {};\n let propEffects = effects[prop] = effects[prop] || [];\n propEffects.push(effect);\n }\n\n /**\n * Stamps the provided template and performs instance-time setup for\n * Polymer template features, including data bindings, declarative event\n * listeners, and the `this.$` map of `id`'s to nodes. A document fragment\n * is returned containing the stamped DOM, ready for insertion into the\n * DOM.\n *\n * This method may be called more than once; however note that due to\n * `shadycss` polyfill limitations, only styles from templates prepared\n * using `ShadyCSS.prepareTemplate` will be correctly polyfilled (scoped\n * to the shadow root and support CSS custom properties), and note that\n * `ShadyCSS.prepareTemplate` may only be called once per element. As such,\n * any styles required by in runtime-stamped templates must be included\n * in the main element template.\n *\n * @param {!HTMLTemplateElement} template Template to stamp\n * @param {TemplateInfo=} templateInfo Optional bound template info associated\n * with the template to be stamped; if omitted the template will be\n * automatically bound.\n * @return {!StampedTemplate} Cloned template content\n * @override\n * @protected\n */\n _stampTemplate(template, templateInfo) {\n templateInfo = templateInfo || /** @type {!TemplateInfo} */(this._bindTemplate(template, true));\n // Ensures that created dom is `_enqueueClient`'d to this element so\n // that it can be flushed on next call to `_flushProperties`\n hostStack.push(this);\n let dom = super._stampTemplate(template, templateInfo);\n hostStack.pop();\n // Add template-instance-specific data to instanced templateInfo\n templateInfo.nodeList = dom.nodeList;\n // Capture child nodes to allow unstamping of non-prototypical templates\n if (!templateInfo.wasPreBound) {\n let nodes = templateInfo.childNodes = [];\n for (let n=dom.firstChild; n; n=n.nextSibling) {\n nodes.push(n);\n }\n }\n dom.templateInfo = templateInfo;\n // Setup compound storage, 2-way listeners, and dataHost for bindings\n setupBindings(this, templateInfo);\n // Flush properties into template nodes; the check on `__dataClientsReady`\n // ensures we don't needlessly run effects for an element's initial\n // prototypical template stamping since they will happen as a part of the\n // first call to `_propertiesChanged`. This flag is set to true\n // after running the initial propagate effects, and immediately before\n // flushing clients. Since downstream clients could cause stamping on\n // this host (e.g. a fastDomIf `dom-if` being forced to render\n // synchronously), this flag ensures effects for runtime-stamped templates\n // are run at this point during the initial element boot-up.\n if (this.__dataClientsReady) {\n this._runEffectsForTemplate(templateInfo, this.__data, null, false);\n this._flushClients();\n }\n return dom;\n }\n\n /**\n * Removes and unbinds the nodes previously contained in the provided\n * DocumentFragment returned from `_stampTemplate`.\n *\n * @override\n * @param {!StampedTemplate} dom DocumentFragment previously returned\n * from `_stampTemplate` associated with the nodes to be removed\n * @return {void}\n * @protected\n */\n _removeBoundDom(dom) {\n // Unlink template info; Note that while the child is unlinked from its\n // parent list, a template's `parent` reference is never removed, since\n // this is is determined by the tree structure and applied at\n // `applyTemplateInfo` time.\n const templateInfo = dom.templateInfo;\n const {previousSibling, nextSibling, parent} = templateInfo;\n if (previousSibling) {\n previousSibling.nextSibling = nextSibling;\n } else if (parent) {\n parent.firstChild = nextSibling;\n }\n if (nextSibling) {\n nextSibling.previousSibling = previousSibling;\n } else if (parent) {\n parent.lastChild = previousSibling;\n }\n templateInfo.nextSibling = templateInfo.previousSibling = null;\n // Remove stamped nodes\n let nodes = templateInfo.childNodes;\n for (let i=0; i<nodes.length; i++) {\n let node = nodes[i];\n wrap(wrap(node).parentNode).removeChild(node);\n }\n }\n\n /**\n * Overrides default `TemplateStamp` implementation to add support for\n * parsing bindings from `TextNode`'s' `textContent`. A `bindings`\n * array is added to `nodeInfo` and populated with binding metadata\n * with information capturing the binding target, and a `parts` array\n * with one or more metadata objects capturing the source(s) of the\n * binding.\n *\n * @param {Node} node Node to parse\n * @param {TemplateInfo} templateInfo Template metadata for current template\n * @param {NodeInfo} nodeInfo Node metadata for current template node\n * @return {boolean} `true` if the visited node added node-specific\n * metadata to `nodeInfo`\n * @protected\n * @suppress {missingProperties} Interfaces in closure do not inherit statics, but classes do\n * @nocollapse\n */\n static _parseTemplateNode(node, templateInfo, nodeInfo) {\n // TODO(https://github.com/google/closure-compiler/issues/3240):\n // Change back to just super.methodCall()\n let noted = propertyEffectsBase._parseTemplateNode.call(\n this, node, templateInfo, nodeInfo);\n if (node.nodeType === Node.TEXT_NODE) {\n let parts = this._parseBindings(node.textContent, templateInfo);\n if (parts) {\n // Initialize the textContent with any literal parts\n // NOTE: default to a space here so the textNode remains; some browsers\n // (IE) omit an empty textNode following cloneNode/importNode.\n node.textContent = literalFromParts(parts) || ' ';\n addBinding(this, templateInfo, nodeInfo, 'text', 'textContent', parts);\n noted = true;\n }\n }\n return noted;\n }\n\n /**\n * Overrides default `TemplateStamp` implementation to add support for\n * parsing bindings from attributes. A `bindings`\n * array is added to `nodeInfo` and populated with binding metadata\n * with information capturing the binding target, and a `parts` array\n * with one or more metadata objects capturing the source(s) of the\n * binding.\n *\n * @param {Element} node Node to parse\n * @param {TemplateInfo} templateInfo Template metadata for current template\n * @param {NodeInfo} nodeInfo Node metadata for current template node\n * @param {string} name Attribute name\n * @param {string} value Attribute value\n * @return {boolean} `true` if the visited node added node-specific\n * metadata to `nodeInfo`\n * @protected\n * @suppress {missingProperties} Interfaces in closure do not inherit statics, but classes do\n * @nocollapse\n */\n static _parseTemplateNodeAttribute(node, templateInfo, nodeInfo, name, value) {\n let parts = this._parseBindings(value, templateInfo);\n if (parts) {\n // Attribute or property\n let origName = name;\n let kind = 'property';\n // The only way we see a capital letter here is if the attr has\n // a capital letter in it per spec. In this case, to make sure\n // this binding works, we go ahead and make the binding to the attribute.\n if (capitalAttributeRegex.test(name)) {\n kind = 'attribute';\n } else if (name[name.length-1] == '$') {\n name = name.slice(0, -1);\n kind = 'attribute';\n }\n // Initialize attribute bindings with any literal parts\n let literal = literalFromParts(parts);\n if (literal && kind == 'attribute') {\n // Ensure a ShadyCSS template scoped style is not removed\n // when a class$ binding's initial literal value is set.\n if (name == 'class' && node.hasAttribute('class')) {\n literal += ' ' + node.getAttribute(name);\n }\n node.setAttribute(name, literal);\n }\n // support disable-upgrade\n if (kind == 'attribute' && origName == 'disable-upgrade$') {\n node.setAttribute(name, '');\n }\n // Clear attribute before removing, since IE won't allow removing\n // `value` attribute if it previously had a value (can't\n // unconditionally set '' before removing since attributes with `$`\n // can't be set using setAttribute)\n if (node.localName === 'input' && origName === 'value') {\n node.setAttribute(origName, '');\n }\n // Remove annotation\n node.removeAttribute(origName);\n // Case hackery: attributes are lower-case, but bind targets\n // (properties) are case sensitive. Gambit is to map dash-case to\n // camel-case: `foo-bar` becomes `fooBar`.\n // Attribute bindings are excepted.\n if (kind === 'property') {\n name = dashToCamelCase(name);\n }\n addBinding(this, templateInfo, nodeInfo, kind, name, parts, literal);\n return true;\n } else {\n // TODO(https://github.com/google/closure-compiler/issues/3240):\n // Change back to just super.methodCall()\n return propertyEffectsBase._parseTemplateNodeAttribute.call(\n this, node, templateInfo, nodeInfo, name, value);\n }\n }\n\n /**\n * Overrides default `TemplateStamp` implementation to add support for\n * binding the properties that a nested template depends on to the template\n * as `_host_<property>`.\n *\n * @param {Node} node Node to parse\n * @param {TemplateInfo} templateInfo Template metadata for current template\n * @param {NodeInfo} nodeInfo Node metadata for current template node\n * @return {boolean} `true` if the visited node added node-specific\n * metadata to `nodeInfo`\n * @protected\n * @suppress {missingProperties} Interfaces in closure do not inherit statics, but classes do\n * @nocollapse\n */\n static _parseTemplateNestedTemplate(node, templateInfo, nodeInfo) {\n // TODO(https://github.com/google/closure-compiler/issues/3240):\n // Change back to just super.methodCall()\n let noted = propertyEffectsBase._parseTemplateNestedTemplate.call(\n this, node, templateInfo, nodeInfo);\n const parent = node.parentNode;\n const nestedTemplateInfo = nodeInfo.templateInfo;\n const isDomIf = parent.localName === 'dom-if';\n const isDomRepeat = parent.localName === 'dom-repeat';\n // Remove nested template and redirect its host bindings & templateInfo\n // onto the parent (dom-if/repeat element)'s nodeInfo\n if (removeNestedTemplates && (isDomIf || isDomRepeat)) {\n parent.removeChild(node);\n // Use the parent's nodeInfo (for the dom-if/repeat) to record the\n // templateInfo, and use that for any host property bindings below\n nodeInfo = nodeInfo.parentInfo;\n nodeInfo.templateInfo = nestedTemplateInfo;\n // Ensure the parent dom-if/repeat is noted since it now may have host\n // bindings; it may not have been if it did not have its own bindings\n nodeInfo.noted = true;\n noted = false;\n }\n // Merge host props into outer template and add bindings\n let hostProps = nestedTemplateInfo.hostProps;\n if (fastDomIf && isDomIf) {\n // `fastDomIf` mode uses runtime-template stamping to add accessors/\n // effects to properties used in its template; as such we don't need to\n // tax the host element with `_host_` bindings for the `dom-if`.\n // However, in the event it is nested in a `dom-repeat`, it is still\n // important that its host properties are added to the\n // TemplateInstance's `hostProps` so that they are forwarded to the\n // TemplateInstance.\n if (hostProps) {\n templateInfo.hostProps =\n Object.assign(templateInfo.hostProps || {}, hostProps);\n // Ensure the dom-if is noted so that it has a __dataHost, since\n // `fastDomIf` uses the host for runtime template stamping; note this\n // was already ensured above in the `removeNestedTemplates` case\n if (!removeNestedTemplates) {\n nodeInfo.parentInfo.noted = true;\n }\n }\n } else {\n let mode = '{';\n for (let source in hostProps) {\n let parts = [{ mode, source, dependencies: [source], hostProp: true }];\n addBinding(this, templateInfo, nodeInfo, 'property', '_host_' + source, parts);\n }\n }\n return noted;\n }\n\n /**\n * Called to parse text in a template (either attribute values or\n * textContent) into binding metadata.\n *\n * Any overrides of this method should return an array of binding part\n * metadata representing one or more bindings found in the provided text\n * and any \"literal\" text in between. Any non-literal parts will be passed\n * to `_evaluateBinding` when any dependencies change. The only required\n * fields of each \"part\" in the returned array are as follows:\n *\n * - `dependencies` - Array containing trigger metadata for each property\n * that should trigger the binding to update\n * - `literal` - String containing text if the part represents a literal;\n * in this case no `dependencies` are needed\n *\n * Additional metadata for use by `_evaluateBinding` may be provided in\n * each part object as needed.\n *\n * The default implementation handles the following types of bindings\n * (one or more may be intermixed with literal strings):\n * - Property binding: `[[prop]]`\n * - Path binding: `[[object.prop]]`\n * - Negated property or path bindings: `[[!prop]]` or `[[!object.prop]]`\n * - Two-way property or path bindings (supports negation):\n * `{{prop}}`, `{{object.prop}}`, `{{!prop}}` or `{{!object.prop}}`\n * - Inline computed method (supports negation):\n * `[[compute(a, 'literal', b)]]`, `[[!compute(a, 'literal', b)]]`\n *\n * The default implementation uses a regular expression for best\n * performance. However, the regular expression uses a white-list of\n * allowed characters in a data-binding, which causes problems for\n * data-bindings that do use characters not in this white-list.\n *\n * Instead of updating the white-list with all allowed characters,\n * there is a StrictBindingParser (see lib/mixins/strict-binding-parser)\n * that uses a state machine instead. This state machine is able to handle\n * all characters. However, it is slightly less performant, therefore we\n * extracted it into a separate optional mixin.\n *\n * @param {string} text Text to parse from attribute or textContent\n * @param {Object} templateInfo Current template metadata\n * @return {Array<!BindingPart>} Array of binding part metadata\n * @protected\n * @nocollapse\n */\n static _parseBindings(text, templateInfo) {\n let parts = [];\n let lastIndex = 0;\n let m;\n // Example: \"literal1{{prop}}literal2[[!compute(foo,bar)]]final\"\n // Regex matches:\n // Iteration 1: Iteration 2:\n // m[1]: '{{' '[['\n // m[2]: '' '!'\n // m[3]: 'prop' 'compute(foo,bar)'\n while ((m = bindingRegex.exec(text)) !== null) {\n // Add literal part\n if (m.index > lastIndex) {\n parts.push({literal: text.slice(lastIndex, m.index)});\n }\n // Add binding part\n let mode = m[1][0];\n let negate = Boolean(m[2]);\n let source = m[3].trim();\n let customEvent = false, notifyEvent = '', colon = -1;\n if (mode == '{' && (colon = source.indexOf('::')) > 0) {\n notifyEvent = source.substring(colon + 2);\n source = source.substring(0, colon);\n customEvent = true;\n }\n let signature = parseMethod(source);\n let dependencies = [];\n if (signature) {\n // Inline computed function\n let {args, methodName} = signature;\n for (let i=0; i<args.length; i++) {\n let arg = args[i];\n if (!arg.literal) {\n dependencies.push(arg);\n }\n }\n let dynamicFns = templateInfo.dynamicFns;\n if (dynamicFns && dynamicFns[methodName] || signature.static) {\n dependencies.push(methodName);\n signature.dynamicFn = true;\n }\n } else {\n // Property or path\n dependencies.push(source);\n }\n parts.push({\n source, mode, negate, customEvent, signature, dependencies,\n event: notifyEvent\n });\n lastIndex = bindingRegex.lastIndex;\n }\n // Add a final literal part\n if (lastIndex && lastIndex < text.length) {\n let literal = text.substring(lastIndex);\n if (literal) {\n parts.push({\n literal: literal\n });\n }\n }\n if (parts.length) {\n return parts;\n } else {\n return null;\n }\n }\n\n /**\n * Called to evaluate a previously parsed binding part based on a set of\n * one or more changed dependencies.\n *\n * @param {!Polymer_PropertyEffects} inst Element that should be used as\n * scope for binding dependencies\n * @param {BindingPart} part Binding part metadata\n * @param {string} path Property/path that triggered this effect\n * @param {Object} props Bag of current property changes\n * @param {Object} oldProps Bag of previous values for changed properties\n * @param {boolean} hasPaths True with `props` contains one or more paths\n * @return {*} Value the binding part evaluated to\n * @protected\n * @nocollapse\n */\n static _evaluateBinding(inst, part, path, props, oldProps, hasPaths) {\n let value;\n if (part.signature) {\n value = runMethodEffect(inst, path, props, oldProps, part.signature);\n } else if (path != part.source) {\n value = get(inst, part.source);\n } else {\n if (hasPaths && isPath(path)) {\n value = get(inst, path);\n } else {\n value = inst.__data[path];\n }\n }\n if (part.negate) {\n value = !value;\n }\n return value;\n }\n\n }\n\n return PropertyEffects;\n});\n\n/**\n * Stack for enqueuing client dom created by a host element.\n *\n * By default elements are flushed via `_flushProperties` when\n * `connectedCallback` is called. Elements attach their client dom to\n * themselves at `ready` time which results from this first flush.\n * This provides an ordering guarantee that the client dom an element\n * creates is flushed before the element itself (i.e. client `ready`\n * fires before host `ready`).\n *\n * However, if `_flushProperties` is called *before* an element is connected,\n * as for example `Templatize` does, this ordering guarantee cannot be\n * satisfied because no elements are connected. (Note: Bound elements that\n * receive data do become enqueued clients and are properly ordered but\n * unbound elements are not.)\n *\n * To maintain the desired \"client before host\" ordering guarantee for this\n * case we rely on the \"host stack. Client nodes registers themselves with\n * the creating host element when created. This ensures that all client dom\n * is readied in the proper order, maintaining the desired guarantee.\n *\n * @private\n */\nconst hostStack = [];\n","/**\n@license\nCopyright (c) 2017 The Polymer Project Authors. All rights reserved.\nThis code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt\nThe complete set of authors may be found at http://polymer.github.io/AUTHORS.txt\nThe complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt\nCode distributed by Google as part of the polymer project is also\nsubject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt\n*/\n\n/**\n * Total number of Polymer element instances created.\n * @type {number}\n */\nexport let instanceCount = 0;\n\nexport function incrementInstanceCount() {\n instanceCount++;\n}\n\n/**\n * Array of Polymer element classes that have been finalized.\n * @type {!Array<!PolymerElementConstructor>}\n */\nexport const registrations = [];\n\n/**\n * @param {!PolymerElementConstructor} prototype Element prototype to log\n * @private\n */\nfunction _regLog(prototype) {\n console.log('[' + /** @type {?} */(prototype).is + ']: registered');\n}\n\n/**\n * Registers a class prototype for telemetry purposes.\n * @param {!PolymerElementConstructor} prototype Element prototype to register\n * @protected\n */\nexport function register(prototype) {\n registrations.push(prototype);\n}\n\n/**\n * Logs all elements registered with an `is` to the console.\n * @public\n */\nexport function dumpRegistrations() {\n registrations.forEach(_regLog);\n}","/**\n@license\nCopyright (c) 2017 The Polymer Project Authors. All rights reserved.\nThis code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt\nThe complete set of authors may be found at http://polymer.github.io/AUTHORS.txt\nThe complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt\nCode distributed by Google as part of the polymer project is also\nsubject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt\n*/\nimport '../utils/boot.js';\n\nimport { dedupingMixin } from '../utils/mixin.js';\nimport { register, incrementInstanceCount } from '../utils/telemetry.js';\nimport { PropertiesChanged } from './properties-changed.js';\n\n/**\n * Creates a copy of `props` with each property normalized such that\n * upgraded it is an object with at least a type property { type: Type}.\n *\n * @param {!Object} props Properties to normalize\n * @return {!Object} Copy of input `props` with normalized properties that\n * are in the form {type: Type}\n * @private\n */\nfunction normalizeProperties(props) {\n const output = {};\n for (let p in props) {\n const o = props[p];\n output[p] = (typeof o === 'function') ? {type: o} : o;\n }\n return output;\n}\n\n/**\n * Mixin that provides a minimal starting point to using the PropertiesChanged\n * mixin by providing a mechanism to declare properties in a static\n * getter (e.g. static get properties() { return { foo: String } }). Changes\n * are reported via the `_propertiesChanged` method.\n *\n * This mixin provides no specific support for rendering. Users are expected\n * to create a ShadowRoot and put content into it and update it in whatever\n * way makes sense. This can be done in reaction to properties changing by\n * implementing `_propertiesChanged`.\n *\n * @mixinFunction\n * @polymer\n * @appliesMixin PropertiesChanged\n * @summary Mixin that provides a minimal starting point for using\n * the PropertiesChanged mixin by providing a declarative `properties` object.\n * @template T\n * @param {function(new:T)} superClass Class to apply mixin to.\n * @return {function(new:T)} superClass with mixin applied.\n */\nexport const PropertiesMixin = dedupingMixin(superClass => {\n\n /**\n * @constructor\n * @implements {Polymer_PropertiesChanged}\n * @private\n */\n const base = PropertiesChanged(superClass);\n\n /**\n * Returns the super class constructor for the given class, if it is an\n * instance of the PropertiesMixin.\n *\n * @param {!PropertiesMixinConstructor} constructor PropertiesMixin constructor\n * @return {?PropertiesMixinConstructor} Super class constructor\n */\n function superPropertiesClass(constructor) {\n const superCtor = Object.getPrototypeOf(constructor);\n\n // Note, the `PropertiesMixin` class below only refers to the class\n // generated by this call to the mixin; the instanceof test only works\n // because the mixin is deduped and guaranteed only to apply once, hence\n // all constructors in a proto chain will see the same `PropertiesMixin`\n return (superCtor.prototype instanceof PropertiesMixin) ?\n /** @type {!PropertiesMixinConstructor} */ (superCtor) : null;\n }\n\n /**\n * Returns a memoized version of the `properties` object for the\n * given class. Properties not in object format are converted to at\n * least {type}.\n *\n * @param {PropertiesMixinConstructor} constructor PropertiesMixin constructor\n * @return {Object} Memoized properties object\n */\n function ownProperties(constructor) {\n if (!constructor.hasOwnProperty(JSCompiler_renameProperty('__ownProperties', constructor))) {\n let props = null;\n\n if (constructor.hasOwnProperty(JSCompiler_renameProperty('properties', constructor))) {\n const properties = constructor.properties;\n\n if (properties) {\n props = normalizeProperties(properties);\n }\n }\n\n constructor.__ownProperties = props;\n }\n return constructor.__ownProperties;\n }\n\n /**\n * @polymer\n * @mixinClass\n * @extends {base}\n * @implements {Polymer_PropertiesMixin}\n * @unrestricted\n */\n class PropertiesMixin extends base {\n\n /**\n * Implements standard custom elements getter to observes the attributes\n * listed in `properties`.\n * @suppress {missingProperties} Interfaces in closure do not inherit statics, but classes do\n * @nocollapse\n */\n static get observedAttributes() {\n if (!this.hasOwnProperty(JSCompiler_renameProperty('__observedAttributes', this))) {\n register(this.prototype);\n const props = this._properties;\n this.__observedAttributes = props ? Object.keys(props).map(p => this.prototype._addPropertyToAttributeMap(p)) : [];\n }\n return this.__observedAttributes;\n }\n\n /**\n * Finalizes an element definition, including ensuring any super classes\n * are also finalized. This includes ensuring property\n * accessors exist on the element prototype. This method calls\n * `_finalizeClass` to finalize each constructor in the prototype chain.\n * @return {void}\n * @nocollapse\n */\n static finalize() {\n if (!this.hasOwnProperty(JSCompiler_renameProperty('__finalized', this))) {\n const superCtor = superPropertiesClass(/** @type {!PropertiesMixinConstructor} */(this));\n if (superCtor) {\n superCtor.finalize();\n }\n this.__finalized = true;\n this._finalizeClass();\n }\n }\n\n /**\n * Finalize an element class. This includes ensuring property\n * accessors exist on the element prototype. This method is called by\n * `finalize` and finalizes the class constructor.\n *\n * @protected\n * @nocollapse\n */\n static _finalizeClass() {\n const props = ownProperties(/** @type {!PropertiesMixinConstructor} */(this));\n if (props) {\n /** @type {?} */ (this).createProperties(props);\n }\n }\n\n /**\n * Returns a memoized version of all properties, including those inherited\n * from super classes. Properties not in object format are converted to\n * at least {type}.\n *\n * @return {Object} Object containing properties for this class\n * @protected\n * @nocollapse\n */\n static get _properties() {\n if (!this.hasOwnProperty(\n JSCompiler_renameProperty('__properties', this))) {\n const superCtor = superPropertiesClass(/** @type {!PropertiesMixinConstructor} */(this));\n this.__properties = Object.assign({},\n superCtor && superCtor._properties,\n ownProperties(/** @type {PropertiesMixinConstructor} */(this)));\n }\n return this.__properties;\n }\n\n /**\n * Overrides `PropertiesChanged` method to return type specified in the\n * static `properties` object for the given property.\n * @param {string} name Name of property\n * @return {*} Type to which to deserialize attribute\n *\n * @protected\n * @nocollapse\n */\n static typeForProperty(name) {\n const info = this._properties[name];\n return info && info.type;\n }\n\n /**\n * Overrides `PropertiesChanged` method and adds a call to\n * `finalize` which lazily configures the element's property accessors.\n * @override\n * @return {void}\n */\n _initializeProperties() {\n incrementInstanceCount();\n this.constructor.finalize();\n super._initializeProperties();\n }\n\n /**\n * Called when the element is added to a document.\n * Calls `_enableProperties` to turn on property system from\n * `PropertiesChanged`.\n * @suppress {missingProperties} Super may or may not implement the callback\n * @return {void}\n * @override\n */\n connectedCallback() {\n if (super.connectedCallback) {\n super.connectedCallback();\n }\n this._enableProperties();\n }\n\n /**\n * Called when the element is removed from a document\n * @suppress {missingProperties} Super may or may not implement the callback\n * @return {void}\n * @override\n */\n disconnectedCallback() {\n if (super.disconnectedCallback) {\n super.disconnectedCallback();\n }\n }\n\n }\n\n return PropertiesMixin;\n\n});\n","/**\n * @fileoverview\n * @suppress {checkPrototypalTypes}\n * @license Copyright (c) 2017 The Polymer Project Authors. All rights reserved.\n * This code may only be used under the BSD style license found at\n * http://polymer.github.io/LICENSE.txt The complete set of authors may be found\n * at http://polymer.github.io/AUTHORS.txt The complete set of contributors may\n * be found at http://polymer.github.io/CONTRIBUTORS.txt Code distributed by\n * Google as part of the polymer project is also subject to an additional IP\n * rights grant found at http://polymer.github.io/PATENTS.txt\n */\nimport '../utils/boot.js';\n\nimport { rootPath, strictTemplatePolicy, allowTemplateFromDomModule, legacyOptimizations, legacyWarnings, syncInitialRender, supportsAdoptingStyleSheets, useAdoptedStyleSheetsWithBuiltCSS } from '../utils/settings.js';\nimport { dedupingMixin } from '../utils/mixin.js';\nimport { stylesFromTemplate, stylesFromModuleImports } from '../utils/style-gather.js';\nimport { pathFromUrl, resolveCss, resolveUrl } from '../utils/resolve-url.js';\nimport { DomModule } from '../elements/dom-module.js';\nimport { PropertyEffects } from './property-effects.js';\nimport { PropertiesMixin } from './properties-mixin.js';\nimport { wrap } from '../utils/wrap.js';\n\n/**\n * Current Polymer version in Semver notation.\n * @type {string} Semver notation of the current version of Polymer.\n */\nexport const version = '3.5.2';\n\nexport const builtCSS = window.ShadyCSS && window.ShadyCSS['cssBuild'];\n\n/**\n * Element class mixin that provides the core API for Polymer's meta-programming\n * features including template stamping, data-binding, attribute deserialization,\n * and property change observation.\n *\n * Subclassers may provide the following static getters to return metadata\n * used to configure Polymer's features for the class:\n *\n * - `static get is()`: When the template is provided via a `dom-module`,\n * users should return the `dom-module` id from a static `is` getter. If\n * no template is needed or the template is provided directly via the\n * `template` getter, there is no need to define `is` for the element.\n *\n * - `static get template()`: Users may provide the template directly (as\n * opposed to via `dom-module`) by implementing a static `template` getter.\n * The getter must return an `HTMLTemplateElement`.\n *\n * - `static get properties()`: Should return an object describing\n * property-related metadata used by Polymer features (key: property name\n * value: object containing property metadata). Valid keys in per-property\n * metadata include:\n * - `type` (String|Number|Object|Array|...): Used by\n * `attributeChangedCallback` to determine how string-based attributes\n * are deserialized to JavaScript property values.\n * - `notify` (boolean): Causes a change in the property to fire a\n * non-bubbling event called `<property>-changed`. Elements that have\n * enabled two-way binding to the property use this event to observe changes.\n * - `readOnly` (boolean): Creates a getter for the property, but no setter.\n * To set a read-only property, use the private setter method\n * `_setProperty(property, value)`.\n * - `observer` (string): Observer method name that will be called when\n * the property changes. The arguments of the method are\n * `(value, previousValue)`.\n * - `computed` (string): String describing method and dependent properties\n * for computing the value of this property (e.g. `'computeFoo(bar, zot)'`).\n * Computed properties are read-only by default and can only be changed\n * via the return value of the computing method.\n *\n * - `static get observers()`: Array of strings describing multi-property\n * observer methods and their dependent properties (e.g.\n * `'observeABC(a, b, c)'`).\n *\n * The base class provides default implementations for the following standard\n * custom element lifecycle callbacks; users may override these, but should\n * call the super method to ensure\n * - `constructor`: Run when the element is created or upgraded\n * - `connectedCallback`: Run each time the element is connected to the\n * document\n * - `disconnectedCallback`: Run each time the element is disconnected from\n * the document\n * - `attributeChangedCallback`: Run each time an attribute in\n * `observedAttributes` is set or removed (note: this element's default\n * `observedAttributes` implementation will automatically return an array\n * of dash-cased attributes based on `properties`)\n *\n * @mixinFunction\n * @polymer\n * @appliesMixin PropertyEffects\n * @appliesMixin PropertiesMixin\n * @property rootPath {string} Set to the value of `rootPath`,\n * which defaults to the main document path\n * @property importPath {string} Set to the value of the class's static\n * `importPath` property, which defaults to the path of this element's\n * `dom-module` (when `is` is used), but can be overridden for other\n * import strategies.\n * @summary Element class mixin that provides the core API for Polymer's\n * meta-programming features.\n * @template T\n * @param {function(new:T)} superClass Class to apply mixin to.\n * @return {function(new:T)} superClass with mixin applied.\n */\nexport const ElementMixin = dedupingMixin(base => {\n /**\n * @constructor\n * @implements {Polymer_PropertyEffects}\n * @implements {Polymer_PropertiesMixin}\n * @extends {HTMLElement}\n * @private\n */\n const polymerElementBase = PropertiesMixin(PropertyEffects(base));\n\n /**\n * Returns a list of properties with default values.\n * This list is created as an optimization since it is a subset of\n * the list returned from `_properties`.\n * This list is used in `_initializeProperties` to set property defaults.\n *\n * @param {PolymerElementConstructor} constructor Element class\n * @return {PolymerElementProperties} Flattened properties for this class\n * that have default values\n * @private\n */\n function propertyDefaults(constructor) {\n if (!constructor.hasOwnProperty(\n JSCompiler_renameProperty('__propertyDefaults', constructor))) {\n constructor.__propertyDefaults = null;\n let props = constructor._properties;\n for (let p in props) {\n let info = props[p];\n if ('value' in info) {\n constructor.__propertyDefaults = constructor.__propertyDefaults || {};\n constructor.__propertyDefaults[p] = info;\n }\n }\n }\n return constructor.__propertyDefaults;\n }\n\n /**\n * Returns a memoized version of the `observers` array.\n * @param {PolymerElementConstructor} constructor Element class\n * @return {Array} Array containing own observers for the given class\n * @protected\n */\n function ownObservers(constructor) {\n if (!constructor.hasOwnProperty(\n JSCompiler_renameProperty('__ownObservers', constructor))) {\n constructor.__ownObservers =\n constructor.hasOwnProperty(\n JSCompiler_renameProperty('observers', constructor)) ?\n /** @type {PolymerElementConstructor} */ (constructor).observers :\n null;\n }\n return constructor.__ownObservers;\n }\n\n /**\n * Creates effects for a property.\n *\n * Note, once a property has been set to\n * `readOnly`, `computed`, `reflectToAttribute`, or `notify`\n * these values may not be changed. For example, a subclass cannot\n * alter these settings. However, additional `observers` may be added\n * by subclasses.\n *\n * The info object should contain property metadata as follows:\n *\n * * `type`: {function} type to which an attribute matching the property\n * is deserialized. Note the property is camel-cased from a dash-cased\n * attribute. For example, 'foo-bar' attribute is deserialized to a\n * property named 'fooBar'.\n *\n * * `readOnly`: {boolean} creates a readOnly property and\n * makes a private setter for the private of the form '_setFoo' for a\n * property 'foo',\n *\n * * `computed`: {string} creates a computed property. A computed property\n * is also automatically set to `readOnly: true`. The value is calculated\n * by running a method and arguments parsed from the given string. For\n * example 'compute(foo)' will compute a given property when the\n * 'foo' property changes by executing the 'compute' method. This method\n * must return the computed value.\n *\n * * `reflectToAttribute`: {boolean} If true, the property value is reflected\n * to an attribute of the same name. Note, the attribute is dash-cased\n * so a property named 'fooBar' is reflected as 'foo-bar'.\n *\n * * `notify`: {boolean} sends a non-bubbling notification event when\n * the property changes. For example, a property named 'foo' sends an\n * event named 'foo-changed' with `event.detail` set to the value of\n * the property.\n *\n * * observer: {string} name of a method that runs when the property\n * changes. The arguments of the method are (value, previousValue).\n *\n * Note: Users may want control over modifying property\n * effects via subclassing. For example, a user might want to make a\n * reflectToAttribute property not do so in a subclass. We've chosen to\n * disable this because it leads to additional complication.\n * For example, a readOnly effect generates a special setter. If a subclass\n * disables the effect, the setter would fail unexpectedly.\n * Based on feedback, we may want to try to make effects more malleable\n * and/or provide an advanced api for manipulating them.\n *\n * @param {!PolymerElement} proto Element class prototype to add accessors\n * and effects to\n * @param {string} name Name of the property.\n * @param {Object} info Info object from which to create property effects.\n * Supported keys:\n * @param {Object} allProps Flattened map of all properties defined in this\n * element (including inherited properties)\n * @return {void}\n * @private\n */\n function createPropertyFromConfig(proto, name, info, allProps) {\n // computed forces readOnly...\n if (info.computed) {\n info.readOnly = true;\n }\n // Note, since all computed properties are readOnly, this prevents\n // adding additional computed property effects (which leads to a confusing\n // setup where multiple triggers for setting a property)\n // While we do have `hasComputedEffect` this is set on the property's\n // dependencies rather than itself.\n if (info.computed) {\n if (proto._hasReadOnlyEffect(name)) {\n console.warn(`Cannot redefine computed property '${name}'.`);\n } else {\n proto._createComputedProperty(name, info.computed, allProps);\n }\n }\n if (info.readOnly && !proto._hasReadOnlyEffect(name)) {\n proto._createReadOnlyProperty(name, !info.computed);\n } else if (info.readOnly === false && proto._hasReadOnlyEffect(name)) {\n console.warn(`Cannot make readOnly property '${name}' non-readOnly.`);\n }\n if (info.reflectToAttribute && !proto._hasReflectEffect(name)) {\n proto._createReflectedProperty(name);\n } else if (info.reflectToAttribute === false && proto._hasReflectEffect(name)) {\n console.warn(`Cannot make reflected property '${name}' non-reflected.`);\n }\n if (info.notify && !proto._hasNotifyEffect(name)) {\n proto._createNotifyingProperty(name);\n } else if (info.notify === false && proto._hasNotifyEffect(name)) {\n console.warn(`Cannot make notify property '${name}' non-notify.`);\n }\n // always add observer\n if (info.observer) {\n proto._createPropertyObserver(name, info.observer, allProps[info.observer]);\n }\n // always create the mapping from attribute back to property for deserialization.\n proto._addPropertyToAttributeMap(name);\n }\n\n /**\n * Process all style elements in the element template. Styles with the\n * `include` attribute are processed such that any styles in\n * the associated \"style modules\" are included in the element template.\n * @param {PolymerElementConstructor} klass Element class\n * @param {!HTMLTemplateElement} template Template to process\n * @param {string} is Name of element\n * @param {string} baseURI Base URI for element\n * @private\n */\n function processElementStyles(klass, template, is, baseURI) {\n if (!builtCSS) {\n const templateStyles = template.content.querySelectorAll('style');\n const stylesWithImports = stylesFromTemplate(template);\n // insert styles from <link rel=\"import\" type=\"css\"> at the top of the template\n const linkedStyles = stylesFromModuleImports(is);\n const firstTemplateChild = template.content.firstElementChild;\n for (let idx = 0; idx < linkedStyles.length; idx++) {\n let s = linkedStyles[idx];\n s.textContent = klass._processStyleText(s.textContent, baseURI);\n template.content.insertBefore(s, firstTemplateChild);\n }\n // keep track of the last \"concrete\" style in the template we have encountered\n let templateStyleIndex = 0;\n // ensure all gathered styles are actually in this template.\n for (let i = 0; i < stylesWithImports.length; i++) {\n let s = stylesWithImports[i];\n let templateStyle = templateStyles[templateStyleIndex];\n // if the style is not in this template, it's been \"included\" and\n // we put a clone of it in the template before the style that included it\n if (templateStyle !== s) {\n s = s.cloneNode(true);\n templateStyle.parentNode.insertBefore(s, templateStyle);\n } else {\n templateStyleIndex++;\n }\n s.textContent = klass._processStyleText(s.textContent, baseURI);\n }\n }\n if (window.ShadyCSS) {\n window.ShadyCSS.prepareTemplate(template, is);\n }\n // Support for `adoptedStylesheets` relies on using native Shadow DOM\n // and built CSS. Built CSS is required because runtime transformation of\n // `@apply` is not supported. This is because ShadyCSS relies on being able\n // to update a `style` element in the element template and this is\n // removed when using `adoptedStyleSheets`.\n // Note, it would be more efficient to allow style includes to become\n // separate stylesheets; however, because of `@apply` these are\n // potentially not shareable and sharing the ones that could be shared\n // would require some coordination. To keep it simple, all the includes\n // and styles are collapsed into a single shareable stylesheet.\n if (useAdoptedStyleSheetsWithBuiltCSS && builtCSS &&\n supportsAdoptingStyleSheets) {\n // Remove styles in template and make a shareable stylesheet\n const styles = template.content.querySelectorAll('style');\n if (styles) {\n let css = '';\n Array.from(styles).forEach(s => {\n css += s.textContent;\n s.parentNode.removeChild(s);\n });\n klass._styleSheet = new CSSStyleSheet();\n klass._styleSheet.replaceSync(css);\n }\n }\n }\n\n /**\n * Look up template from dom-module for element\n *\n * @param {string} is Element name to look up\n * @return {?HTMLTemplateElement|undefined} Template found in dom module, or\n * undefined if not found\n * @protected\n */\n function getTemplateFromDomModule(is) {\n let template = null;\n // Under strictTemplatePolicy in 3.x+, dom-module lookup is only allowed\n // when opted-in via allowTemplateFromDomModule\n if (is && (!strictTemplatePolicy || allowTemplateFromDomModule)) {\n template = /** @type {?HTMLTemplateElement} */ (\n DomModule.import(is, 'template'));\n // Under strictTemplatePolicy, require any element with an `is`\n // specified to have a dom-module\n if (strictTemplatePolicy && !template) {\n throw new Error(`strictTemplatePolicy: expecting dom-module or null template for ${is}`);\n }\n }\n return template;\n }\n\n /**\n * @polymer\n * @mixinClass\n * @unrestricted\n * @implements {Polymer_ElementMixin}\n * @extends {polymerElementBase}\n */\n class PolymerElement extends polymerElementBase {\n\n /**\n * Current Polymer version in Semver notation.\n * @type {string} Semver notation of the current version of Polymer.\n * @nocollapse\n */\n static get polymerElementVersion() {\n return version;\n }\n\n /**\n * Override of PropertiesMixin _finalizeClass to create observers and\n * find the template.\n * @return {void}\n * @protected\n * @suppress {missingProperties} Interfaces in closure do not inherit statics, but classes do\n * @nocollapse\n */\n static _finalizeClass() {\n // TODO(https://github.com/google/closure-compiler/issues/3240):\n // Change back to just super.methodCall()\n polymerElementBase._finalizeClass.call(this);\n const observers = ownObservers(this);\n if (observers) {\n this.createObservers(observers, this._properties);\n }\n this._prepareTemplate();\n }\n\n /** @nocollapse */\n static _prepareTemplate() {\n // note: create \"working\" template that is finalized at instance time\n let template = /** @type {PolymerElementConstructor} */ (this).template;\n if (template) {\n if (typeof template === 'string') {\n console.error('template getter must return HTMLTemplateElement');\n template = null;\n } else if (!legacyOptimizations) {\n template = template.cloneNode(true);\n }\n }\n\n /** @override */\n this.prototype._template = template;\n }\n\n /**\n * Override of PropertiesChanged createProperties to create accessors\n * and property effects for all of the properties.\n * @param {!Object} props .\n * @return {void}\n * @protected\n * @nocollapse\n */\n static createProperties(props) {\n for (let p in props) {\n createPropertyFromConfig(\n /** @type {?} */ (this.prototype), p, props[p], props);\n }\n }\n\n /**\n * Creates observers for the given `observers` array.\n * Leverages `PropertyEffects` to create observers.\n * @param {Object} observers Array of observer descriptors for\n * this class\n * @param {Object} dynamicFns Object containing keys for any properties\n * that are functions and should trigger the effect when the function\n * reference is changed\n * @return {void}\n * @protected\n * @nocollapse\n */\n static createObservers(observers, dynamicFns) {\n const proto = this.prototype;\n for (let i=0; i < observers.length; i++) {\n proto._createMethodObserver(observers[i], dynamicFns);\n }\n }\n\n /**\n * Returns the template that will be stamped into this element's shadow root.\n *\n * If a `static get is()` getter is defined, the default implementation will\n * return the first `<template>` in a `dom-module` whose `id` matches this\n * element's `is` (note that a `_template` property on the class prototype\n * takes precedence over the `dom-module` template, to maintain legacy\n * element semantics; a subclass will subsequently fall back to its super\n * class template if neither a `prototype._template` or a `dom-module` for\n * the class's `is` was found).\n *\n * Users may override this getter to return an arbitrary template\n * (in which case the `is` getter is unnecessary). The template returned\n * must be an `HTMLTemplateElement`.\n *\n * Note that when subclassing, if the super class overrode the default\n * implementation and the subclass would like to provide an alternate\n * template via a `dom-module`, it should override this getter and\n * return `DomModule.import(this.is, 'template')`.\n *\n * If a subclass would like to modify the super class template, it should\n * clone it rather than modify it in place. If the getter does expensive\n * work such as cloning/modifying a template, it should memoize the\n * template for maximum performance:\n *\n * let memoizedTemplate;\n * class MySubClass extends MySuperClass {\n * static get template() {\n * if (!memoizedTemplate) {\n * memoizedTemplate = super.template.cloneNode(true);\n * let subContent = document.createElement('div');\n * subContent.textContent = 'This came from MySubClass';\n * memoizedTemplate.content.appendChild(subContent);\n * }\n * return memoizedTemplate;\n * }\n * }\n *\n * @return {!HTMLTemplateElement|string} Template to be stamped\n * @nocollapse\n */\n static get template() {\n // Explanation of template-related properties:\n // - constructor.template (this getter): the template for the class.\n // This can come from the prototype (for legacy elements), from a\n // dom-module, or from the super class's template (or can be overridden\n // altogether by the user)\n // - constructor._template: memoized version of constructor.template\n // - prototype._template: working template for the element, which will be\n // parsed and modified in place. It is a cloned version of\n // constructor.template, saved in _finalizeClass(). Note that before\n // this getter is called, for legacy elements this could be from a\n // _template field on the info object passed to Polymer(), a behavior,\n // or set in registered(); once the static getter runs, a clone of it\n // will overwrite it on the prototype as the working template.\n if (!this.hasOwnProperty(JSCompiler_renameProperty('_template', this))) {\n let protoTemplate = this.prototype.hasOwnProperty(\n JSCompiler_renameProperty('_template', this.prototype)) ?\n this.prototype._template : undefined;\n // Accept a function for the legacy Polymer({_template:...}) field for\n // lazy parsing\n if (typeof protoTemplate === 'function') {\n protoTemplate = protoTemplate();\n }\n this._template =\n // If user has put template on prototype (e.g. in legacy via registered\n // callback or info object), prefer that first. Note that `null` is\n // used as a sentinel to indicate \"no template\" and can be used to\n // override a super template, whereas `undefined` is used as a\n // sentinel to mean \"fall-back to default template lookup\" via\n // dom-module and/or super.template.\n protoTemplate !== undefined ? protoTemplate :\n // Look in dom-module associated with this element's is\n ((this.hasOwnProperty(JSCompiler_renameProperty('is', this)) &&\n (getTemplateFromDomModule(/** @type {PolymerElementConstructor}*/ (this).is))) ||\n // Next look for superclass template (call the super impl this\n // way so that `this` points to the superclass)\n Object.getPrototypeOf(/** @type {PolymerElementConstructor}*/ (this).prototype).constructor.template);\n }\n return this._template;\n }\n\n /**\n * Set the template.\n *\n * @param {!HTMLTemplateElement|string} value Template to set.\n * @nocollapse\n */\n static set template(value) {\n this._template = value;\n }\n\n /**\n * Path matching the url from which the element was imported.\n *\n * This path is used to resolve url's in template style cssText.\n * The `importPath` property is also set on element instances and can be\n * used to create bindings relative to the import path.\n *\n * For elements defined in ES modules, users should implement\n * `static get importMeta() { return import.meta; }`, and the default\n * implementation of `importPath` will return `import.meta.url`'s path.\n * For elements defined in HTML imports, this getter will return the path\n * to the document containing a `dom-module` element matching this\n * element's static `is` property.\n *\n * Note, this path should contain a trailing `/`.\n *\n * @return {string} The import path for this element class\n * @suppress {missingProperties}\n * @nocollapse\n */\n static get importPath() {\n if (!this.hasOwnProperty(JSCompiler_renameProperty('_importPath', this))) {\n const meta = this.importMeta;\n if (meta) {\n this._importPath = pathFromUrl(meta.url);\n } else {\n const module = DomModule.import(/** @type {PolymerElementConstructor} */ (this).is);\n this._importPath = (module && module.assetpath) ||\n Object.getPrototypeOf(/** @type {PolymerElementConstructor}*/ (this).prototype).constructor.importPath;\n }\n }\n return this._importPath;\n }\n\n constructor() {\n super();\n /** @type {HTMLTemplateElement} */\n this._template;\n /** @type {string} */\n this._importPath;\n /** @type {string} */\n this.rootPath;\n /** @type {string} */\n this.importPath;\n /** @type {StampedTemplate | HTMLElement | ShadowRoot} */\n this.root;\n /** @type {!Object<string, !Element>} */\n this.$;\n }\n\n /**\n * Overrides the default `PropertyAccessors` to ensure class\n * metaprogramming related to property accessors and effects has\n * completed (calls `finalize`).\n *\n * It also initializes any property defaults provided via `value` in\n * `properties` metadata.\n *\n * @return {void}\n * @override\n * @suppress {invalidCasts,missingProperties} go/missingfnprops\n */\n _initializeProperties() {\n this.constructor.finalize();\n // note: finalize template when we have access to `localName` to\n // avoid dependence on `is` for polyfilling styling.\n this.constructor._finalizeTemplate(/** @type {!HTMLElement} */(this).localName);\n super._initializeProperties();\n // set path defaults\n this.rootPath = rootPath;\n this.importPath = this.constructor.importPath;\n // apply property defaults...\n let p$ = propertyDefaults(this.constructor);\n if (!p$) {\n return;\n }\n for (let p in p$) {\n let info = p$[p];\n if (this._canApplyPropertyDefault(p)) {\n let value = typeof info.value == 'function' ?\n info.value.call(this) :\n info.value;\n // Set via `_setProperty` if there is an accessor, to enable\n // initializing readOnly property defaults\n if (this._hasAccessor(p)) {\n this._setPendingProperty(p, value, true);\n } else {\n this[p] = value;\n }\n }\n }\n }\n\n /**\n * Determines if a property dfeault can be applied. For example, this\n * prevents a default from being applied when a property that has no\n * accessor is overridden by its host before upgrade (e.g. via a binding).\n * @override\n * @param {string} property Name of the property\n * @return {boolean} Returns true if the property default can be applied.\n */\n _canApplyPropertyDefault(property) {\n return !this.hasOwnProperty(property);\n }\n\n /**\n * Gather style text for a style element in the template.\n *\n * @param {string} cssText Text containing styling to process\n * @param {string} baseURI Base URI to rebase CSS paths against\n * @return {string} The processed CSS text\n * @protected\n * @nocollapse\n */\n static _processStyleText(cssText, baseURI) {\n return resolveCss(cssText, baseURI);\n }\n\n /**\n * Configures an element `proto` to function with a given `template`.\n * The element name `is` and extends `ext` must be specified for ShadyCSS\n * style scoping.\n *\n * @param {string} is Tag name (or type extension name) for this element\n * @return {void}\n * @protected\n * @nocollapse\n */\n static _finalizeTemplate(is) {\n /** @const {HTMLTemplateElement} */\n const template = this.prototype._template;\n if (template && !template.__polymerFinalized) {\n template.__polymerFinalized = true;\n const importPath = this.importPath;\n const baseURI = importPath ? resolveUrl(importPath) : '';\n // e.g. support `include=\"module-name\"`, and ShadyCSS\n processElementStyles(this, template, is, baseURI);\n this.prototype._bindTemplate(template);\n }\n }\n\n /**\n * Provides a default implementation of the standard Custom Elements\n * `connectedCallback`.\n *\n * The default implementation enables the property effects system and\n * flushes any pending properties, and updates shimmed CSS properties\n * when using the ShadyCSS scoping/custom properties polyfill.\n *\n * @override\n * @suppress {missingProperties, invalidCasts} Super may or may not\n * implement the callback\n * @return {void}\n */\n connectedCallback() {\n if (window.ShadyCSS && this._template) {\n window.ShadyCSS.styleElement(/** @type {!HTMLElement} */(this));\n }\n super.connectedCallback();\n }\n\n /**\n * Stamps the element template.\n *\n * @return {void}\n * @override\n */\n ready() {\n if (this._template) {\n this.root = this._stampTemplate(this._template);\n this.$ = this.root.$;\n }\n super.ready();\n }\n\n /**\n * Implements `PropertyEffects`'s `_readyClients` call. Attaches\n * element dom by calling `_attachDom` with the dom stamped from the\n * element's template via `_stampTemplate`. Note that this allows\n * client dom to be attached to the element prior to any observers\n * running.\n *\n * @return {void}\n * @override\n */\n _readyClients() {\n if (this._template) {\n this.root = this._attachDom(/** @type {StampedTemplate} */(this.root));\n }\n // The super._readyClients here sets the clients initialized flag.\n // We must wait to do this until after client dom is created/attached\n // so that this flag can be checked to prevent notifications fired\n // during this process from being handled before clients are ready.\n super._readyClients();\n }\n\n\n /**\n * Attaches an element's stamped dom to itself. By default,\n * this method creates a `shadowRoot` and adds the dom to it.\n * However, this method may be overridden to allow an element\n * to put its dom in another location.\n *\n * @override\n * @throws {Error}\n * @suppress {missingReturn}\n * @param {StampedTemplate} dom to attach to the element.\n * @return {ShadowRoot} node to which the dom has been attached.\n */\n _attachDom(dom) {\n const n = wrap(this);\n if (n.attachShadow) {\n if (dom) {\n if (!n.shadowRoot) {\n n.attachShadow({mode: 'open', shadyUpgradeFragment: dom});\n if(window.DESCOPE_NONCE){\n dom?.querySelectorAll('style').forEach(style => {\n style.setAttribute('nonce', window.DESCOPE_NONCE);\n });\n }\n n.shadowRoot.appendChild(dom);\n // When `adoptedStyleSheets` is supported a stylesheet is made\n // available on the element constructor.\n if (this.constructor._styleSheet) {\n n.shadowRoot.adoptedStyleSheets = [this.constructor._styleSheet];\n }\n }\n if (syncInitialRender && window.ShadyDOM) {\n window.ShadyDOM.flushInitial(n.shadowRoot);\n }\n return n.shadowRoot;\n }\n return null;\n } else {\n throw new Error('ShadowDOM not available. ' +\n // TODO(sorvell): move to compile-time conditional when supported\n 'PolymerElement can create dom as children instead of in ' +\n 'ShadowDOM by setting `this.root = this;\\` before \\`ready\\`.');\n }\n }\n\n /**\n * When using the ShadyCSS scoping and custom property shim, causes all\n * shimmed styles in this element (and its subtree) to be updated\n * based on current custom property values.\n *\n * The optional parameter overrides inline custom property styles with an\n * object of properties where the keys are CSS properties, and the values\n * are strings.\n *\n * Example: `this.updateStyles({'--color': 'blue'})`\n *\n * These properties are retained unless a value of `null` is set.\n *\n * Note: This function does not support updating CSS mixins.\n * You can not dynamically change the value of an `@apply`.\n *\n * @override\n * @param {Object=} properties Bag of custom property key/values to\n * apply to this element.\n * @return {void}\n * @suppress {invalidCasts}\n */\n updateStyles(properties) {\n if (window.ShadyCSS) {\n window.ShadyCSS.styleSubtree(/** @type {!HTMLElement} */(this), properties);\n }\n }\n\n /**\n * Rewrites a given URL relative to a base URL. The base URL defaults to\n * the original location of the document containing the `dom-module` for\n * this element. This method will return the same URL before and after\n * bundling.\n *\n * Note that this function performs no resolution for URLs that start\n * with `/` (absolute URLs) or `#` (hash identifiers). For general purpose\n * URL resolution, use `window.URL`.\n *\n * @override\n * @param {string} url URL to resolve.\n * @param {string=} base Optional base URL to resolve against, defaults\n * to the element's `importPath`\n * @return {string} Rewritten URL relative to base\n */\n resolveUrl(url, base) {\n if (!base && this.importPath) {\n base = resolveUrl(this.importPath);\n }\n return resolveUrl(url, base);\n }\n\n /**\n * Overrides `PropertyEffects` to add map of dynamic functions on\n * template info, for consumption by `PropertyEffects` template binding\n * code. This map determines which method templates should have accessors\n * created for them.\n *\n * @param {!HTMLTemplateElement} template Template\n * @param {!TemplateInfo} templateInfo Template metadata for current template\n * @param {!NodeInfo} nodeInfo Node metadata for current template.\n * @return {boolean} .\n * @suppress {missingProperties} Interfaces in closure do not inherit statics, but classes do\n * @nocollapse\n */\n static _parseTemplateContent(template, templateInfo, nodeInfo) {\n templateInfo.dynamicFns = templateInfo.dynamicFns || this._properties;\n // TODO(https://github.com/google/closure-compiler/issues/3240):\n // Change back to just super.methodCall()\n return polymerElementBase._parseTemplateContent.call(\n this, template, templateInfo, nodeInfo);\n }\n\n /**\n * Overrides `PropertyEffects` to warn on use of undeclared properties in\n * template.\n *\n * @param {Object} templateInfo Template metadata to add effect to\n * @param {string} prop Property that should trigger the effect\n * @param {Object=} effect Effect metadata object\n * @return {void}\n * @protected\n * @suppress {missingProperties} Interfaces in closure do not inherit statics, but classes do\n * @nocollapse\n */\n static _addTemplatePropertyEffect(templateInfo, prop, effect) {\n // Warn if properties are used in template without being declared.\n // Properties must be listed in `properties` to be included in\n // `observedAttributes` since CE V1 reads that at registration time, and\n // since we want to keep template parsing lazy, we can't automatically\n // add undeclared properties used in templates to `observedAttributes`.\n // The warning is only enabled in `legacyOptimizations` mode, since\n // we don't want to spam existing users who might have adopted the\n // shorthand when attribute deserialization is not important.\n if (legacyWarnings && !(prop in this._properties) &&\n // Methods used in templates with no dependencies (or only literal\n // dependencies) become accessors with template effects; ignore these\n !(effect.info.part.signature && effect.info.part.signature.static) &&\n // Warnings for bindings added to nested templates are handled by\n // templatizer so ignore both the host-to-template bindings\n // (`hostProp`) and TemplateInstance-to-child bindings\n // (`nestedTemplate`)\n !effect.info.part.hostProp && !templateInfo.nestedTemplate) {\n console.warn(`Property '${prop}' used in template but not declared in 'properties'; ` +\n `attribute will not be observed.`);\n }\n // TODO(https://github.com/google/closure-compiler/issues/3240):\n // Change back to just super.methodCall()\n return polymerElementBase._addTemplatePropertyEffect.call(\n this, templateInfo, prop, effect);\n }\n\n }\n\n return PolymerElement;\n});\n\n/**\n * When using the ShadyCSS scoping and custom property shim, causes all\n * shimmed `styles` (via `custom-style`) in the document (and its subtree)\n * to be updated based on current custom property values.\n *\n * The optional parameter overrides inline custom property styles with an\n * object of properties where the keys are CSS properties, and the values\n * are strings.\n *\n * Example: `updateStyles({'--color': 'blue'})`\n *\n * These properties are retained unless a value of `null` is set.\n *\n * @param {Object=} props Bag of custom property key/values to\n * apply to the document.\n * @return {void}\n */\nexport const updateStyles = function(props) {\n if (window.ShadyCSS) {\n window.ShadyCSS.styleDocument(props);\n }\n};\n","/**\n@license\nCopyright (c) 2017 The Polymer Project Authors. All rights reserved.\nThis code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt\nThe complete set of authors may be found at http://polymer.github.io/AUTHORS.txt\nThe complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt\nCode distributed by Google as part of the polymer project is also\nsubject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt\n*/\n\nimport { ElementMixin, version } from './lib/mixins/element-mixin.js';\nexport { html } from './lib/utils/html-tag.js';\n\nexport { version };\n\n/**\n * Base class that provides the core API for Polymer's meta-programming\n * features including template stamping, data-binding, attribute deserialization,\n * and property change observation.\n *\n * @customElement\n * @polymer\n * @constructor\n * @implements {Polymer_ElementMixin}\n * @extends HTMLElement\n * @appliesMixin ElementMixin\n * @summary Custom element base class that provides the core API for Polymer's\n * key meta-programming features including template stamping, data-binding,\n * attribute deserialization, and property change observation\n */\nexport const PolymerElement = ElementMixin(HTMLElement);\n","/**\n * @license\n * Copyright (c) 2017 The Polymer Project Authors. All rights reserved.\n * This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt\n * The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt\n * The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt\n * Code distributed by Google as part of the polymer project is also\n * subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt\n */\n\n/**\n * @fileoverview\n *\n * This module provides a number of strategies for enqueuing asynchronous\n * tasks. Each sub-module provides a standard `run(fn)` interface that returns a\n * handle, and a `cancel(handle)` interface for canceling async tasks before\n * they run.\n *\n * @summary Module that provides a number of strategies for enqueuing\n * asynchronous tasks.\n */\n\nlet microtaskCurrHandle = 0;\nlet microtaskLastHandle = 0;\nconst microtaskCallbacks = [];\nlet microtaskScheduled = false;\n\nfunction microtaskFlush() {\n microtaskScheduled = false;\n const len = microtaskCallbacks.length;\n for (let i = 0; i < len; i++) {\n const cb = microtaskCallbacks[i];\n if (cb) {\n try {\n cb();\n } catch (e) {\n setTimeout(() => {\n throw e;\n });\n }\n }\n }\n microtaskCallbacks.splice(0, len);\n microtaskLastHandle += len;\n}\n\n/**\n * Async interface wrapper around `setTimeout`.\n *\n * @namespace\n * @summary Async interface wrapper around `setTimeout`.\n */\nconst timeOut = {\n /**\n * Returns a sub-module with the async interface providing the provided\n * delay.\n *\n * @memberof timeOut\n * @param {number=} delay Time to wait before calling callbacks in ms\n * @return {!AsyncInterface} An async timeout interface\n */\n after(delay) {\n return {\n run(fn) {\n return window.setTimeout(fn, delay);\n },\n cancel(handle) {\n window.clearTimeout(handle);\n },\n };\n },\n /**\n * Enqueues a function called in the next task.\n *\n * @memberof timeOut\n * @param {!Function} fn Callback to run\n * @param {number=} delay Delay in milliseconds\n * @return {number} Handle used for canceling task\n */\n run(fn, delay) {\n return window.setTimeout(fn, delay);\n },\n /**\n * Cancels a previously enqueued `timeOut` callback.\n *\n * @memberof timeOut\n * @param {number} handle Handle returned from `run` of callback to cancel\n * @return {void}\n */\n cancel(handle) {\n window.clearTimeout(handle);\n },\n};\nexport { timeOut };\n\n/**\n * Async interface wrapper around `requestAnimationFrame`.\n *\n * @namespace\n * @summary Async interface wrapper around `requestAnimationFrame`.\n */\nconst animationFrame = {\n /**\n * Enqueues a function called at `requestAnimationFrame` timing.\n *\n * @memberof animationFrame\n * @param {function(number):void} fn Callback to run\n * @return {number} Handle used for canceling task\n */\n run(fn) {\n return window.requestAnimationFrame(fn);\n },\n /**\n * Cancels a previously enqueued `animationFrame` callback.\n *\n * @memberof animationFrame\n * @param {number} handle Handle returned from `run` of callback to cancel\n * @return {void}\n */\n cancel(handle) {\n window.cancelAnimationFrame(handle);\n },\n};\nexport { animationFrame };\n\n/**\n * Async interface wrapper around `requestIdleCallback`. Falls back to\n * `setTimeout` on browsers that do not support `requestIdleCallback`.\n *\n * @namespace\n * @summary Async interface wrapper around `requestIdleCallback`.\n */\nconst idlePeriod = {\n /**\n * Enqueues a function called at `requestIdleCallback` timing.\n *\n * @memberof idlePeriod\n * @param {function(!IdleDeadline):void} fn Callback to run\n * @return {number} Handle used for canceling task\n */\n run(fn) {\n return window.requestIdleCallback ? window.requestIdleCallback(fn) : window.setTimeout(fn, 16);\n },\n /**\n * Cancels a previously enqueued `idlePeriod` callback.\n *\n * @memberof idlePeriod\n * @param {number} handle Handle returned from `run` of callback to cancel\n * @return {void}\n */\n cancel(handle) {\n if (window.cancelIdleCallback) {\n window.cancelIdleCallback(handle);\n } else {\n window.clearTimeout(handle);\n }\n },\n};\nexport { idlePeriod };\n\n/**\n * Async interface for enqueuing callbacks that run at microtask timing.\n *\n * @namespace\n * @summary Async interface for enqueuing callbacks that run at microtask\n * timing.\n */\nconst microTask = {\n /**\n * Enqueues a function called at microtask timing.\n *\n * @memberof microTask\n * @param {!Function=} callback Callback to run\n * @return {number} Handle used for canceling task\n */\n run(callback) {\n if (!microtaskScheduled) {\n microtaskScheduled = true;\n queueMicrotask(() => microtaskFlush());\n }\n microtaskCallbacks.push(callback);\n const result = microtaskCurrHandle;\n microtaskCurrHandle += 1;\n return result;\n },\n\n /**\n * Cancels a previously enqueued `microTask` callback.\n *\n * @memberof microTask\n * @param {number} handle Handle returned from `run` of callback to cancel\n * @return {void}\n */\n cancel(handle) {\n const idx = handle - microtaskLastHandle;\n if (idx >= 0) {\n if (!microtaskCallbacks[idx]) {\n throw new Error(`invalid async handle: ${handle}`);\n }\n microtaskCallbacks[idx] = null;\n }\n },\n};\nexport { microTask };\n","/**\n@license\nCopyright (c) 2017 The Polymer Project Authors. All rights reserved.\nThis code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt\nThe complete set of authors may be found at http://polymer.github.io/AUTHORS.txt\nThe complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt\nCode distributed by Google as part of the polymer project is also\nsubject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt\n*/\n\nconst debouncerQueue = new Set();\n\n/**\n * @summary Collapse multiple callbacks into one invocation after a timer.\n */\nexport class Debouncer {\n /**\n * Creates a debouncer if no debouncer is passed as a parameter\n * or it cancels an active debouncer otherwise. The following\n * example shows how a debouncer can be called multiple times within a\n * microtask and \"debounced\" such that the provided callback function is\n * called once. Add this method to a custom element:\n *\n * ```js\n * import {microTask} from '@vaadin/component-base/src/async.js';\n * import {Debouncer} from '@vaadin/component-base/src/debounce.js';\n * // ...\n *\n * _debounceWork() {\n * this._debounceJob = Debouncer.debounce(this._debounceJob,\n * microTask, () => this._doWork());\n * }\n * ```\n *\n * If the `_debounceWork` method is called multiple times within the same\n * microtask, the `_doWork` function will be called only once at the next\n * microtask checkpoint.\n *\n * Note: In testing it is often convenient to avoid asynchrony. To accomplish\n * this with a debouncer, you can use `enqueueDebouncer` and\n * `flush`. For example, extend the above example by adding\n * `enqueueDebouncer(this._debounceJob)` at the end of the\n * `_debounceWork` method. Then in a test, call `flush` to ensure\n * the debouncer has completed.\n *\n * @param {Debouncer?} debouncer Debouncer object.\n * @param {!AsyncInterface} asyncModule Object with Async interface\n * @param {function()} callback Callback to run.\n * @return {!Debouncer} Returns a debouncer object.\n */\n static debounce(debouncer, asyncModule, callback) {\n if (debouncer instanceof Debouncer) {\n // Cancel the async callback, but leave in debouncerQueue if it was\n // enqueued, to maintain 1.x flush order\n debouncer._cancelAsync();\n } else {\n debouncer = new Debouncer();\n }\n debouncer.setConfig(asyncModule, callback);\n return debouncer;\n }\n\n constructor() {\n this._asyncModule = null;\n this._callback = null;\n this._timer = null;\n }\n\n /**\n * Sets the scheduler; that is, a module with the Async interface,\n * a callback and optional arguments to be passed to the run function\n * from the async module.\n *\n * @param {!AsyncInterface} asyncModule Object with Async interface.\n * @param {function()} callback Callback to run.\n * @return {void}\n */\n setConfig(asyncModule, callback) {\n this._asyncModule = asyncModule;\n this._callback = callback;\n this._timer = this._asyncModule.run(() => {\n this._timer = null;\n debouncerQueue.delete(this);\n this._callback();\n });\n }\n\n /**\n * Cancels an active debouncer and returns a reference to itself.\n *\n * @return {void}\n */\n cancel() {\n if (this.isActive()) {\n this._cancelAsync();\n // Canceling a debouncer removes its spot from the flush queue,\n // so if a debouncer is manually canceled and re-debounced, it\n // will reset its flush order (this is a very minor difference from 1.x)\n // Re-debouncing via the `debounce` API retains the 1.x FIFO flush order\n debouncerQueue.delete(this);\n }\n }\n\n /**\n * Cancels a debouncer's async callback.\n *\n * @return {void}\n */\n _cancelAsync() {\n if (this.isActive()) {\n this._asyncModule.cancel(/** @type {number} */ (this._timer));\n this._timer = null;\n }\n }\n\n /**\n * Flushes an active debouncer and returns a reference to itself.\n *\n * @return {void}\n */\n flush() {\n if (this.isActive()) {\n this.cancel();\n this._callback();\n }\n }\n\n /**\n * Returns true if the debouncer is active.\n *\n * @return {boolean} True if active.\n */\n isActive() {\n return this._timer != null;\n }\n}\n\n/**\n * Adds a `Debouncer` to a list of globally flushable tasks.\n *\n * @param {!Debouncer} debouncer Debouncer to enqueue\n * @return {void}\n */\nexport function enqueueDebouncer(debouncer) {\n debouncerQueue.add(debouncer);\n}\n\n/**\n * Flushes any enqueued debouncers\n *\n * @return {boolean} Returns whether any debouncers were flushed\n */\nexport function flushDebouncers() {\n const didFlush = Boolean(debouncerQueue.size);\n // If new debouncers are added while flushing, Set.forEach will ensure\n // newly added ones are also flushed\n debouncerQueue.forEach((debouncer) => {\n try {\n debouncer.flush();\n } catch (e) {\n setTimeout(() => {\n throw e;\n });\n }\n });\n return didFlush;\n}\n\nexport const flush = () => {\n let debouncers;\n do {\n debouncers = flushDebouncers();\n } while (debouncers);\n};\n","/**\n * @license\n * Copyright (c) 2021 - 2023 Vaadin Ltd.\n * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/\n */\n\nexport function defineCustomElement(CustomElement) {\n const defined = customElements.get(CustomElement.is);\n if (!defined) {\n Object.defineProperty(CustomElement, 'version', {\n get() {\n return '24.3.22';\n },\n });\n\n customElements.define(CustomElement.is, CustomElement);\n } else {\n const definedVersion = defined.version;\n if (definedVersion && CustomElement.version && definedVersion === CustomElement.version) {\n // Just loading the same thing again\n console.warn(`The component ${CustomElement.is} has been loaded twice`);\n } else {\n console.error(\n `Tried to define ${CustomElement.is} version ${CustomElement.version} when version ${defined.version} is already in use. Something will probably break.`,\n );\n }\n }\n}\n","/**\n * @license\n * Copyright (c) 2021 - 2023 Vaadin Ltd.\n * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/\n */\n\n/**\n * Array of Vaadin custom element classes that have been subscribed to the dir changes.\n */\nconst directionSubscribers = [];\n\nfunction alignDirs(element, documentDir, elementDir = element.getAttribute('dir')) {\n if (documentDir) {\n element.setAttribute('dir', documentDir);\n } else if (elementDir != null) {\n element.removeAttribute('dir');\n }\n}\n\nfunction getDocumentDir() {\n return document.documentElement.getAttribute('dir');\n}\n\nfunction directionUpdater() {\n const documentDir = getDocumentDir();\n directionSubscribers.forEach((element) => {\n alignDirs(element, documentDir);\n });\n}\n\nconst directionObserver = new MutationObserver(directionUpdater);\ndirectionObserver.observe(document.documentElement, { attributes: true, attributeFilter: ['dir'] });\n\n/**\n * A mixin to handle `dir` attribute based on the one set on the `<html>` element.\n *\n * @polymerMixin\n */\nexport const DirMixin = (superClass) =>\n class VaadinDirMixin extends superClass {\n static get properties() {\n return {\n /**\n * @protected\n */\n dir: {\n type: String,\n value: '',\n reflectToAttribute: true,\n converter: {\n fromAttribute: (attr) => {\n return !attr ? '' : attr;\n },\n toAttribute: (prop) => {\n return prop === '' ? null : prop;\n },\n },\n },\n };\n }\n\n /**\n * @return {boolean}\n * @protected\n */\n get __isRTL() {\n return this.getAttribute('dir') === 'rtl';\n }\n\n /** @protected */\n connectedCallback() {\n super.connectedCallback();\n\n if (!this.hasAttribute('dir') || this.__restoreSubscription) {\n this.__subscribe();\n alignDirs(this, getDocumentDir(), null);\n }\n }\n\n /** @protected */\n attributeChangedCallback(name, oldValue, newValue) {\n super.attributeChangedCallback(name, oldValue, newValue);\n if (name !== 'dir') {\n return;\n }\n\n const documentDir = getDocumentDir();\n\n // New value equals to the document direction and the element is not subscribed to the changes\n const newValueEqlDocDir = newValue === documentDir && directionSubscribers.indexOf(this) === -1;\n // Value was emptied and the element is not subscribed to the changes\n const newValueEmptied = !newValue && oldValue && directionSubscribers.indexOf(this) === -1;\n // New value is different and the old equals to document direction and the element is not subscribed to the changes\n const newDiffValue = newValue !== documentDir && oldValue === documentDir;\n\n if (newValueEqlDocDir || newValueEmptied) {\n this.__subscribe();\n alignDirs(this, documentDir, newValue);\n } else if (newDiffValue) {\n this.__unsubscribe();\n }\n }\n\n /** @protected */\n disconnectedCallback() {\n super.disconnectedCallback();\n this.__restoreSubscription = directionSubscribers.includes(this);\n this.__unsubscribe();\n }\n\n /** @protected */\n _valueToNodeAttribute(node, value, attribute) {\n // Override default Polymer attribute reflection to match native behavior of HTMLElement.dir property\n // If the property contains an empty string then it should not create an empty attribute\n if (attribute === 'dir' && value === '' && !node.hasAttribute('dir')) {\n return;\n }\n super._valueToNodeAttribute(node, value, attribute);\n }\n\n /** @protected */\n _attributeToProperty(attribute, value, type) {\n // Override default Polymer attribute reflection to match native behavior of HTMLElement.dir property\n // If the attribute is removed, then the dir property should contain an empty string instead of null\n if (attribute === 'dir' && !value) {\n this.dir = '';\n } else {\n super._attributeToProperty(attribute, value, type);\n }\n }\n\n /** @private */\n __subscribe() {\n if (!directionSubscribers.includes(this)) {\n directionSubscribers.push(this);\n }\n }\n\n /** @private */\n __unsubscribe() {\n if (directionSubscribers.includes(this)) {\n directionSubscribers.splice(directionSubscribers.indexOf(this), 1);\n }\n }\n };\n","/**\n * @license\n * Copyright (c) 2017 - 2023 Vaadin Ltd.\n * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/\n */\nimport './version.js';\nimport { css, registerStyles } from '@vaadin/vaadin-themable-mixin/vaadin-themable-mixin.js';\nimport { addLumoGlobalStyles } from './global.js';\n\nconst colorBase = css`\n :host {\n /* Base (background) */\n --lumo-base-color: #fff;\n\n /* Tint */\n --lumo-tint-5pct: hsla(0, 0%, 100%, 0.3);\n --lumo-tint-10pct: hsla(0, 0%, 100%, 0.37);\n --lumo-tint-20pct: hsla(0, 0%, 100%, 0.44);\n --lumo-tint-30pct: hsla(0, 0%, 100%, 0.5);\n --lumo-tint-40pct: hsla(0, 0%, 100%, 0.57);\n --lumo-tint-50pct: hsla(0, 0%, 100%, 0.64);\n --lumo-tint-60pct: hsla(0, 0%, 100%, 0.7);\n --lumo-tint-70pct: hsla(0, 0%, 100%, 0.77);\n --lumo-tint-80pct: hsla(0, 0%, 100%, 0.84);\n --lumo-tint-90pct: hsla(0, 0%, 100%, 0.9);\n --lumo-tint: #fff;\n\n /* Shade */\n --lumo-shade-5pct: hsla(214, 61%, 25%, 0.05);\n --lumo-shade-10pct: hsla(214, 57%, 24%, 0.1);\n --lumo-shade-20pct: hsla(214, 53%, 23%, 0.16);\n --lumo-shade-30pct: hsla(214, 50%, 22%, 0.26);\n --lumo-shade-40pct: hsla(214, 47%, 21%, 0.38);\n --lumo-shade-50pct: hsla(214, 45%, 20%, 0.52);\n --lumo-shade-60pct: hsla(214, 43%, 19%, 0.6);\n --lumo-shade-70pct: hsla(214, 42%, 18%, 0.69);\n --lumo-shade-80pct: hsla(214, 41%, 17%, 0.83);\n --lumo-shade-90pct: hsla(214, 40%, 16%, 0.94);\n --lumo-shade: hsl(214, 35%, 15%);\n\n /* Contrast */\n --lumo-contrast-5pct: var(--lumo-shade-5pct);\n --lumo-contrast-10pct: var(--lumo-shade-10pct);\n --lumo-contrast-20pct: var(--lumo-shade-20pct);\n --lumo-contrast-30pct: var(--lumo-shade-30pct);\n --lumo-contrast-40pct: var(--lumo-shade-40pct);\n --lumo-contrast-50pct: var(--lumo-shade-50pct);\n --lumo-contrast-60pct: var(--lumo-shade-60pct);\n --lumo-contrast-70pct: var(--lumo-shade-70pct);\n --lumo-contrast-80pct: var(--lumo-shade-80pct);\n --lumo-contrast-90pct: var(--lumo-shade-90pct);\n --lumo-contrast: var(--lumo-shade);\n\n /* Text */\n --lumo-header-text-color: var(--lumo-contrast);\n --lumo-body-text-color: var(--lumo-contrast-90pct);\n --lumo-secondary-text-color: var(--lumo-contrast-70pct);\n --lumo-tertiary-text-color: var(--lumo-contrast-50pct);\n --lumo-disabled-text-color: var(--lumo-contrast-30pct);\n\n /* Primary */\n --lumo-primary-color: hsl(214, 100%, 48%);\n --lumo-primary-color-50pct: hsla(214, 100%, 49%, 0.76);\n --lumo-primary-color-10pct: hsla(214, 100%, 60%, 0.13);\n --lumo-primary-text-color: hsl(214, 100%, 43%);\n --lumo-primary-contrast-color: #fff;\n\n /* Error */\n --lumo-error-color: hsl(3, 85%, 48%);\n --lumo-error-color-50pct: hsla(3, 85%, 49%, 0.5);\n --lumo-error-color-10pct: hsla(3, 85%, 49%, 0.1);\n --lumo-error-text-color: hsl(3, 89%, 42%);\n --lumo-error-contrast-color: #fff;\n\n /* Success */\n --lumo-success-color: hsl(145, 72%, 30%);\n --lumo-success-color-50pct: hsla(145, 72%, 31%, 0.5);\n --lumo-success-color-10pct: hsla(145, 72%, 31%, 0.1);\n --lumo-success-text-color: hsl(145, 85%, 25%);\n --lumo-success-contrast-color: #fff;\n\n /* Warning */\n --lumo-warning-color: hsl(48, 100%, 50%);\n --lumo-warning-color-10pct: hsla(48, 100%, 50%, 0.25);\n --lumo-warning-text-color: hsl(32, 100%, 30%);\n --lumo-warning-contrast-color: var(--lumo-shade-90pct);\n }\n\n /* forced-colors mode adjustments */\n @media (forced-colors: active) {\n html {\n --lumo-disabled-text-color: GrayText;\n }\n }\n`;\n\naddLumoGlobalStyles('color-props', colorBase);\n\nconst color = css`\n [theme~='dark'] {\n /* Base (background) */\n --lumo-base-color: hsl(214, 35%, 21%);\n\n /* Tint */\n --lumo-tint-5pct: hsla(214, 65%, 85%, 0.06);\n --lumo-tint-10pct: hsla(214, 60%, 80%, 0.14);\n --lumo-tint-20pct: hsla(214, 64%, 82%, 0.23);\n --lumo-tint-30pct: hsla(214, 69%, 84%, 0.32);\n --lumo-tint-40pct: hsla(214, 73%, 86%, 0.41);\n --lumo-tint-50pct: hsla(214, 78%, 88%, 0.5);\n --lumo-tint-60pct: hsla(214, 82%, 90%, 0.58);\n --lumo-tint-70pct: hsla(214, 87%, 92%, 0.69);\n --lumo-tint-80pct: hsla(214, 91%, 94%, 0.8);\n --lumo-tint-90pct: hsla(214, 96%, 96%, 0.9);\n --lumo-tint: hsl(214, 100%, 98%);\n\n /* Shade */\n --lumo-shade-5pct: hsla(214, 0%, 0%, 0.07);\n --lumo-shade-10pct: hsla(214, 4%, 2%, 0.15);\n --lumo-shade-20pct: hsla(214, 8%, 4%, 0.23);\n --lumo-shade-30pct: hsla(214, 12%, 6%, 0.32);\n --lumo-shade-40pct: hsla(214, 16%, 8%, 0.41);\n --lumo-shade-50pct: hsla(214, 20%, 10%, 0.5);\n --lumo-shade-60pct: hsla(214, 24%, 12%, 0.6);\n --lumo-shade-70pct: hsla(214, 28%, 13%, 0.7);\n --lumo-shade-80pct: hsla(214, 32%, 13%, 0.8);\n --lumo-shade-90pct: hsla(214, 33%, 13%, 0.9);\n --lumo-shade: hsl(214, 33%, 13%);\n\n /* Contrast */\n --lumo-contrast-5pct: var(--lumo-tint-5pct);\n --lumo-contrast-10pct: var(--lumo-tint-10pct);\n --lumo-contrast-20pct: var(--lumo-tint-20pct);\n --lumo-contrast-30pct: var(--lumo-tint-30pct);\n --lumo-contrast-40pct: var(--lumo-tint-40pct);\n --lumo-contrast-50pct: var(--lumo-tint-50pct);\n --lumo-contrast-60pct: var(--lumo-tint-60pct);\n --lumo-contrast-70pct: var(--lumo-tint-70pct);\n --lumo-contrast-80pct: var(--lumo-tint-80pct);\n --lumo-contrast-90pct: var(--lumo-tint-90pct);\n --lumo-contrast: var(--lumo-tint);\n\n /* Text */\n --lumo-header-text-color: var(--lumo-contrast);\n --lumo-body-text-color: var(--lumo-contrast-90pct);\n --lumo-secondary-text-color: var(--lumo-contrast-70pct);\n --lumo-tertiary-text-color: var(--lumo-contrast-50pct);\n --lumo-disabled-text-color: var(--lumo-contrast-30pct);\n\n /* Primary */\n --lumo-primary-color: hsl(214, 90%, 48%);\n --lumo-primary-color-50pct: hsla(214, 90%, 70%, 0.69);\n --lumo-primary-color-10pct: hsla(214, 90%, 55%, 0.13);\n --lumo-primary-text-color: hsl(214, 90%, 77%);\n --lumo-primary-contrast-color: #fff;\n\n /* Error */\n --lumo-error-color: hsl(3, 79%, 49%);\n --lumo-error-color-50pct: hsla(3, 75%, 62%, 0.5);\n --lumo-error-color-10pct: hsla(3, 75%, 62%, 0.14);\n --lumo-error-text-color: hsl(3, 100%, 80%);\n\n /* Success */\n --lumo-success-color: hsl(145, 72%, 30%);\n --lumo-success-color-50pct: hsla(145, 92%, 51%, 0.5);\n --lumo-success-color-10pct: hsla(145, 92%, 51%, 0.1);\n --lumo-success-text-color: hsl(145, 85%, 46%);\n\n /* Warning */\n --lumo-warning-color: hsl(43, 100%, 48%);\n --lumo-warning-color-10pct: hsla(40, 100%, 50%, 0.2);\n --lumo-warning-text-color: hsl(45, 100%, 60%);\n --lumo-warning-contrast-color: var(--lumo-shade-90pct);\n }\n\n html {\n color: var(--lumo-body-text-color);\n background-color: var(--lumo-base-color);\n color-scheme: light;\n }\n\n [theme~='dark'] {\n color: var(--lumo-body-text-color);\n background-color: var(--lumo-base-color);\n color-scheme: dark;\n }\n\n h1,\n h2,\n h3,\n h4,\n h5,\n h6 {\n color: var(--lumo-header-text-color);\n }\n\n a:where(:any-link) {\n color: var(--lumo-primary-text-color);\n }\n\n a:not(:any-link) {\n color: var(--lumo-disabled-text-color);\n }\n\n blockquote {\n color: var(--lumo-secondary-text-color);\n }\n\n code,\n pre {\n background-color: var(--lumo-contrast-10pct);\n border-radius: var(--lumo-border-radius-m);\n }\n`;\n\nregisterStyles('', color, { moduleId: 'lumo-color' });\n\nexport { colorBase, color };\n","/**\n * @license\n * Copyright (c) 2017 - 2023 Vaadin Ltd.\n * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/\n */\nexport { registerStyles, css, unsafeCSS } from './vaadin-themable-mixin.js';\n\n/**\n * This is for use internally by Lumo and Material styles.\n *\n * @param {string} id the id to set on the created element, only for informational purposes\n * @param {CSSResultGroup[]} styles the styles to add\n */\nexport const addGlobalThemeStyles = (id, ...styles) => {\n const styleTag = document.createElement('style');\n if(window.DESCOPE_NONCE){\n styleTag.setAttribute('nonce', window.DESCOPE_NONCE);\n }\n styleTag.id = id;\n styleTag.textContent = styles\n .map((style) => style.toString())\n .join('\\n')\n .replace(':host', 'html');\n\n document.head.insertAdjacentElement('afterbegin', styleTag);\n};\n","import { addGlobalThemeStyles } from '@vaadin/vaadin-themable-mixin/register-styles.js';\n\nexport const addLumoGlobalStyles = (id, ...styles) => {\n addGlobalThemeStyles(`lumo-${id}`, styles);\n};\n","/**\n * @license\n * Copyright (c) 2017 - 2023 Vaadin Ltd.\n * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/\n */\nimport './version.js';\nimport { css } from '@vaadin/vaadin-themable-mixin/vaadin-themable-mixin.js';\nimport { addLumoGlobalStyles } from './global.js';\n\nconst spacing = css`\n :host {\n /* Square */\n --lumo-space-xs: 0.25rem;\n --lumo-space-s: 0.5rem;\n --lumo-space-m: 1rem;\n --lumo-space-l: 1.5rem;\n --lumo-space-xl: 2.5rem;\n\n /* Wide */\n --lumo-space-wide-xs: calc(var(--lumo-space-xs) / 2) var(--lumo-space-xs);\n --lumo-space-wide-s: calc(var(--lumo-space-s) / 2) var(--lumo-space-s);\n --lumo-space-wide-m: calc(var(--lumo-space-m) / 2) var(--lumo-space-m);\n --lumo-space-wide-l: calc(var(--lumo-space-l) / 2) var(--lumo-space-l);\n --lumo-space-wide-xl: calc(var(--lumo-space-xl) / 2) var(--lumo-space-xl);\n\n /* Tall */\n --lumo-space-tall-xs: var(--lumo-space-xs) calc(var(--lumo-space-xs) / 2);\n --lumo-space-tall-s: var(--lumo-space-s) calc(var(--lumo-space-s) / 2);\n --lumo-space-tall-m: var(--lumo-space-m) calc(var(--lumo-space-m) / 2);\n --lumo-space-tall-l: var(--lumo-space-l) calc(var(--lumo-space-l) / 2);\n --lumo-space-tall-xl: var(--lumo-space-xl) calc(var(--lumo-space-xl) / 2);\n }\n`;\n\naddLumoGlobalStyles('spacing-props', spacing);\n\nexport { spacing };\n","/**\n * @license\n * Copyright (c) 2017 - 2023 Vaadin Ltd.\n * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/\n */\nimport './version.js';\nimport { css } from '@vaadin/vaadin-themable-mixin/vaadin-themable-mixin.js';\nimport { addLumoGlobalStyles } from './global.js';\n\nconst style = css`\n :host {\n /* Border radius */\n --lumo-border-radius-s: 0.25em; /* Checkbox, badge, date-picker year indicator, etc */\n --lumo-border-radius-m: var(--lumo-border-radius, 0.25em); /* Button, text field, menu overlay, etc */\n --lumo-border-radius-l: 0.5em; /* Dialog, notification, etc */\n\n /* Shadow */\n --lumo-box-shadow-xs: 0 1px 4px -1px var(--lumo-shade-50pct);\n --lumo-box-shadow-s: 0 2px 4px -1px var(--lumo-shade-20pct), 0 3px 12px -1px var(--lumo-shade-30pct);\n --lumo-box-shadow-m: 0 2px 6px -1px var(--lumo-shade-20pct), 0 8px 24px -4px var(--lumo-shade-40pct);\n --lumo-box-shadow-l: 0 3px 18px -2px var(--lumo-shade-20pct), 0 12px 48px -6px var(--lumo-shade-40pct);\n --lumo-box-shadow-xl: 0 4px 24px -3px var(--lumo-shade-20pct), 0 18px 64px -8px var(--lumo-shade-40pct);\n\n /* Clickable element cursor */\n --lumo-clickable-cursor: default;\n }\n`;\n\n/**\n * Default values for component-specific custom properties.\n */\nconst globals = css`\n html {\n /* Button */\n --vaadin-button-background: var(--lumo-contrast-5pct);\n --vaadin-button-border: none;\n --vaadin-button-border-radius: var(--lumo-border-radius-m);\n --vaadin-button-font-size: var(--lumo-font-size-m);\n --vaadin-button-font-weight: 500;\n --vaadin-button-height: var(--lumo-size-m);\n --vaadin-button-margin: var(--lumo-space-xs) 0;\n --vaadin-button-min-width: calc(var(--vaadin-button-height) * 2);\n --vaadin-button-padding: 0 calc(var(--vaadin-button-height) / 3 + var(--lumo-border-radius-m) / 2);\n --vaadin-button-text-color: var(--lumo-primary-text-color);\n --vaadin-button-primary-background: var(--lumo-primary-color);\n --vaadin-button-primary-border: none;\n --vaadin-button-primary-font-weight: 600;\n --vaadin-button-primary-text-color: var(--lumo-primary-contrast-color);\n --vaadin-button-tertiary-background: transparent !important;\n --vaadin-button-tertiary-text-color: var(--lumo-primary-text-color);\n --vaadin-button-tertiary-font-weight: 500;\n --vaadin-button-tertiary-padding: 0 calc(var(--vaadin-button-height) / 6);\n /* Checkbox */\n --vaadin-checkbox-background: var(--lumo-contrast-20pct);\n --vaadin-checkbox-background-hover: var(--lumo-contrast-30pct);\n --vaadin-checkbox-border-radius: var(--lumo-border-radius-s);\n --vaadin-checkbox-checkmark-char: var(--lumo-icons-checkmark);\n --vaadin-checkbox-checkmark-char-indeterminate: '';\n --vaadin-checkbox-checkmark-color: var(--lumo-primary-contrast-color);\n --vaadin-checkbox-checkmark-size: calc(var(--vaadin-checkbox-size) + 2px);\n --vaadin-checkbox-label-color: var(--lumo-body-text-color);\n --vaadin-checkbox-label-font-size: var(--lumo-font-size-m);\n --vaadin-checkbox-label-padding: var(--lumo-space-xs) var(--lumo-space-s) var(--lumo-space-xs) var(--lumo-space-xs);\n --vaadin-checkbox-size: calc(var(--lumo-size-m) / 2);\n /* Radio button */\n --vaadin-radio-button-background: var(--lumo-contrast-20pct);\n --vaadin-radio-button-background-hover: var(--lumo-contrast-30pct);\n --vaadin-radio-button-dot-color: var(--lumo-primary-contrast-color);\n --vaadin-radio-button-dot-size: 3px;\n --vaadin-radio-button-label-color: var(--lumo-body-text-color);\n --vaadin-radio-button-label-font-size: var(--lumo-font-size-m);\n --vaadin-radio-button-label-padding: var(--lumo-space-xs) var(--lumo-space-s) var(--lumo-space-xs)\n var(--lumo-space-xs);\n --vaadin-radio-button-size: calc(var(--lumo-size-m) / 2);\n --vaadin-selection-color: var(--lumo-primary-color);\n --vaadin-selection-color-text: var(--lumo-primary-text-color);\n --vaadin-input-field-border-radius: var(--lumo-border-radius-m);\n --vaadin-focus-ring-color: var(--lumo-primary-color-50pct);\n --vaadin-focus-ring-width: 2px;\n /* Label */\n --vaadin-input-field-label-color: var(--lumo-secondary-text-color);\n --vaadin-input-field-focused-label-color: var(--lumo-primary-text-color);\n --vaadin-input-field-hovered-label-color: var(--lumo-body-text-color);\n --vaadin-input-field-label-font-size: var(--lumo-font-size-s);\n --vaadin-input-field-label-font-weight: 500;\n /* Helper */\n --vaadin-input-field-helper-color: var(--lumo-secondary-text-color);\n --vaadin-input-field-helper-font-size: var(--lumo-font-size-xs);\n --vaadin-input-field-helper-font-weight: 400;\n --vaadin-input-field-helper-spacing: 0.4em;\n /* Error message */\n --vaadin-input-field-error-color: var(--lumo-error-text-color);\n --vaadin-input-field-error-font-size: var(--lumo-font-size-xs);\n --vaadin-input-field-error-font-weight: 400;\n /* Input field */\n --vaadin-input-field-background: var(--lumo-contrast-10pct);\n --vaadin-input-field-icon-color: var(--lumo-contrast-60pct);\n --vaadin-input-field-icon-size: var(--lumo-icon-size-m);\n --vaadin-input-field-invalid-background: var(--lumo-error-color-10pct);\n --vaadin-input-field-invalid-hover-highlight: var(--lumo-error-color-50pct);\n --vaadin-input-field-height: var(--lumo-size-m);\n --vaadin-input-field-hover-highlight: var(--lumo-contrast-50pct);\n --vaadin-input-field-placeholder-color: var(--lumo-secondary-text-color);\n --vaadin-input-field-readonly-border: 1px dashed var(--lumo-contrast-30pct);\n --vaadin-input-field-value-color: var(--lumo-body-text-color);\n --vaadin-input-field-value-font-size: var(--lumo-font-size-m);\n --vaadin-input-field-value-font-weight: 400;\n }\n`;\n\naddLumoGlobalStyles('style-props', style);\n\nexport { globals, style };\n","/**\n * @license\n * Copyright (c) 2017 - 2023 Vaadin Ltd.\n * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/\n */\nimport { defineCustomElement } from '@vaadin/component-base/src/define.js';\n\n/**\n * Dummy custom element used for collecting\n * development time usage statistics.\n *\n * @private\n */\nclass Lumo extends HTMLElement {\n static get is() {\n return 'vaadin-lumo-styles';\n }\n}\n\ndefineCustomElement(Lumo);\n\nexport { Lumo };\n","/**\n * @license\n * Copyright (c) 2017 - 2023 Vaadin Ltd.\n * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/\n */\nimport { css, CSSResult, unsafeCSS } from 'lit';\nimport { ThemePropertyMixin } from './vaadin-theme-property-mixin.js';\n\nexport { css, unsafeCSS };\n\n/**\n * @typedef {Object} Theme\n * @property {string} themeFor\n * @property {CSSResult[]} styles\n * @property {string | string[]} [include]\n * @property {string} [moduleId]\n *\n * @typedef {CSSResult[] | CSSResult} CSSResultGroup\n */\n\n/**\n * @type {Theme[]}\n */\nconst themeRegistry = [];\n\n/**\n * Check if the custom element type has themes applied.\n * @param {Function} elementClass\n * @returns {boolean}\n */\nfunction classHasThemes(elementClass) {\n return elementClass && Object.prototype.hasOwnProperty.call(elementClass, '__themes');\n}\n\n/**\n * Check if the custom element type has themes applied.\n * @param {string} tagName\n * @returns {boolean}\n */\nfunction hasThemes(tagName) {\n return classHasThemes(customElements.get(tagName));\n}\n\n/**\n * Flattens the styles into a single array of styles.\n * @param {CSSResultGroup} styles\n * @param {CSSResult[]} result\n * @returns {CSSResult[]}\n */\nfunction flattenStyles(styles = []) {\n return [styles].flat(Infinity).filter((style) => {\n if (style instanceof CSSResult) {\n return true;\n }\n console.warn('An item in styles is not of type CSSResult. Use `unsafeCSS` or `css`.');\n return false;\n });\n}\n\n/**\n * Registers CSS styles for a component type. Make sure to register the styles before\n * the first instance of a component of the type is attached to DOM.\n *\n * @param {string} themeFor The local/tag name of the component type to register the styles for\n * @param {CSSResultGroup} styles The CSS style rules to be registered for the component type\n * matching themeFor and included in the local scope of each component instance\n * @param {{moduleId?: string, include?: string | string[]}} options Additional options\n * @return {void}\n */\nexport function registerStyles(themeFor, styles, options = {}) {\n if (themeFor) {\n if (hasThemes(themeFor)) {\n console.warn(`The custom element definition for \"${themeFor}\"\n was finalized before a style module was registered.\n Make sure to add component specific style modules before\n importing the corresponding custom element.`);\n }\n }\n\n styles = flattenStyles(styles);\n\n if (window.Vaadin && window.Vaadin.styleModules) {\n window.Vaadin.styleModules.registerStyles(themeFor, styles, options);\n } else {\n themeRegistry.push({\n themeFor,\n styles,\n include: options.include,\n moduleId: options.moduleId,\n });\n }\n}\n\n/**\n * Returns all registered themes. By default the themeRegistry is returned as is.\n * In case the style-modules adapter is imported, the themes are obtained from there instead\n * @returns {Theme[]}\n */\nfunction getAllThemes() {\n if (window.Vaadin && window.Vaadin.styleModules) {\n return window.Vaadin.styleModules.getAllThemes();\n }\n return themeRegistry;\n}\n\n/**\n * Returns true if the themeFor string matches the tag name\n * @param {string} themeFor\n * @param {string} tagName\n * @returns {boolean}\n */\nfunction matchesThemeFor(themeFor, tagName) {\n return (themeFor || '').split(' ').some((themeForToken) => {\n return new RegExp(`^${themeForToken.split('*').join('.*')}$`, 'u').test(tagName);\n });\n}\n\n/**\n * Maps the moduleName to an include priority number which is used for\n * determining the order in which styles are applied.\n * @param {string} moduleName\n * @returns {number}\n */\nfunction getIncludePriority(moduleName = '') {\n let includePriority = 0;\n if (moduleName.startsWith('lumo-') || moduleName.startsWith('material-')) {\n includePriority = 1;\n } else if (moduleName.startsWith('vaadin-')) {\n includePriority = 2;\n }\n return includePriority;\n}\n\n/**\n * Gets an array of CSSResults matching the include property of the theme.\n * @param {Theme} theme\n * @returns {CSSResult[]}\n */\nfunction getIncludedStyles(theme) {\n const includedStyles = [];\n if (theme.include) {\n [].concat(theme.include).forEach((includeModuleId) => {\n const includedTheme = getAllThemes().find((s) => s.moduleId === includeModuleId);\n if (includedTheme) {\n includedStyles.push(...getIncludedStyles(includedTheme), ...includedTheme.styles);\n } else {\n console.warn(`Included moduleId ${includeModuleId} not found in style registry`);\n }\n }, theme.styles);\n }\n return includedStyles;\n}\n\n/**\n * Includes the styles to the template.\n * @param {CSSResult[]} styles\n * @param {HTMLTemplateElement} template\n */\nfunction addStylesToTemplate(styles, template) {\n const styleEl = document.createElement('style');\n if(window.DESCOPE_NONCE){\n styleEl.setAttribute('nonce', window.DESCOPE_NONCE);\n }\n styleEl.innerHTML = styles.map((style) => style.cssText).join('\\n');\n template.content.appendChild(styleEl);\n}\n\n/**\n * Returns an array of themes that should be used for styling a component matching\n * the tag name. The array is sorted by the include order.\n * @param {string} tagName\n * @returns {Theme[]}\n */\nfunction getThemes(tagName) {\n const defaultModuleName = `${tagName}-default-theme`;\n\n const themes = getAllThemes()\n // Filter by matching themeFor properties\n .filter((theme) => theme.moduleId !== defaultModuleName && matchesThemeFor(theme.themeFor, tagName))\n .map((theme) => ({\n ...theme,\n // Prepend styles from included themes\n styles: [...getIncludedStyles(theme), ...theme.styles],\n // Map moduleId to includePriority\n includePriority: getIncludePriority(theme.moduleId),\n }))\n // Sort by includePriority\n .sort((themeA, themeB) => themeB.includePriority - themeA.includePriority);\n\n if (themes.length > 0) {\n return themes;\n }\n // No theme modules found, return the default module if it exists\n return getAllThemes().filter((theme) => theme.moduleId === defaultModuleName);\n}\n\n/**\n * @polymerMixin\n * @mixes ThemePropertyMixin\n */\nexport const ThemableMixin = (superClass) =>\n class VaadinThemableMixin extends ThemePropertyMixin(superClass) {\n /**\n * Covers PolymerElement based component styling\n * @protected\n */\n static finalize() {\n super.finalize();\n\n // Make sure not to run the logic intended for PolymerElement when LitElement is used.\n if (this.elementStyles) {\n return;\n }\n\n const template = this.prototype._template;\n if (!template || classHasThemes(this)) {\n return;\n }\n\n addStylesToTemplate(this.getStylesForThis(), template);\n }\n\n /**\n * Covers LitElement based component styling\n *\n * @protected\n */\n static finalizeStyles(styles) {\n // The \"styles\" object originates from the \"static get styles()\" function of\n // a LitElement based component. The theme styles are added after it\n // so that they can override the component styles.\n const themeStyles = this.getStylesForThis();\n return styles ? [...super.finalizeStyles(styles), ...themeStyles] : themeStyles;\n }\n\n /**\n * Get styles for the component type\n *\n * @private\n */\n static getStylesForThis() {\n const parent = Object.getPrototypeOf(this.prototype);\n const inheritedThemes = (parent ? parent.constructor.__themes : []) || [];\n this.__themes = [...inheritedThemes, ...getThemes(this.is)];\n const themeStyles = this.__themes.flatMap((theme) => theme.styles);\n // Remove duplicates\n return themeStyles.filter((style, index) => index === themeStyles.lastIndexOf(style));\n }\n };\n\nexport { themeRegistry as __themeRegistry };\n","/**\n * @license\n * Copyright (c) 2017 - 2023 Vaadin Ltd.\n * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/\n */\n/**\n * @polymerMixin\n */\nexport const ThemePropertyMixin = (superClass) =>\n class VaadinThemePropertyMixin extends superClass {\n static get properties() {\n return {\n /**\n * Helper property with theme attribute value facilitating propagation\n * in shadow DOM.\n *\n * Enables the component implementation to propagate the `theme`\n * attribute value to the sub-components in Shadow DOM by binding\n * the sub-component's \"theme\" attribute to the `theme` property of\n * the host.\n *\n * **NOTE:** Extending the mixin only provides the property for binding,\n * and does not make the propagation alone.\n *\n * See [Styling Components: Sub-components](https://vaadin.com/docs/latest/styling/styling-components/#sub-components).\n * page for more information.\n *\n * @protected\n */\n _theme: {\n type: String,\n readOnly: true,\n },\n };\n }\n\n static get observedAttributes() {\n return [...super.observedAttributes, 'theme'];\n }\n\n /** @protected */\n attributeChangedCallback(name, oldValue, newValue) {\n super.attributeChangedCallback(name, oldValue, newValue);\n\n if (name === 'theme') {\n this._set_theme(newValue);\n }\n }\n };\n","/**\n * @license\n * Copyright 2017 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */\nconst t=globalThis,i=t.trustedTypes,s=i?i.createPolicy(\"lit-html\",{createHTML:t=>t}):void 0,e=\"$lit$\",h=`lit$${Math.random().toFixed(9).slice(2)}$`,o=\"?\"+h,n=`<${o}>`,r=document,l=()=>r.createComment(\"\"),c=t=>null===t||\"object\"!=typeof t&&\"function\"!=typeof t,a=Array.isArray,u=t=>a(t)||\"function\"==typeof t?.[Symbol.iterator],d=\"[ \\t\\n\\f\\r]\",f=/<(?:(!--|\\/[^a-zA-Z])|(\\/?[a-zA-Z][^>\\s]*)|(\\/?$))/g,v=/-->/g,_=/>/g,m=RegExp(`>|${d}(?:([^\\\\s\"'>=/]+)(${d}*=${d}*(?:[^ \\t\\n\\f\\r\"'\\`<>=]|(\"|')|))|$)`,\"g\"),p=/'/g,g=/\"/g,$=/^(?:script|style|textarea|title)$/i,y=t=>(i,...s)=>({_$litType$:t,strings:i,values:s}),x=y(1),b=y(2),w=y(3),T=Symbol.for(\"lit-noChange\"),E=Symbol.for(\"lit-nothing\"),A=new WeakMap,C=r.createTreeWalker(r,129);function P(t,i){if(!a(t)||!t.hasOwnProperty(\"raw\"))throw Error(\"invalid template strings array\");return void 0!==s?s.createHTML(i):i}const V=(t,i)=>{const s=t.length-1,o=[];let r,l=2===i?\"<svg>\":3===i?\"<math>\":\"\",c=f;for(let i=0;i<s;i++){const s=t[i];let a,u,d=-1,y=0;for(;y<s.length&&(c.lastIndex=y,u=c.exec(s),null!==u);)y=c.lastIndex,c===f?\"!--\"===u[1]?c=v:void 0!==u[1]?c=_:void 0!==u[2]?($.test(u[2])&&(r=RegExp(\"</\"+u[2],\"g\")),c=m):void 0!==u[3]&&(c=m):c===m?\">\"===u[0]?(c=r??f,d=-1):void 0===u[1]?d=-2:(d=c.lastIndex-u[2].length,a=u[1],c=void 0===u[3]?m:'\"'===u[3]?g:p):c===g||c===p?c=m:c===v||c===_?c=f:(c=m,r=void 0);const x=c===m&&t[i+1].startsWith(\"/>\")?\" \":\"\";l+=c===f?s+n:d>=0?(o.push(a),s.slice(0,d)+e+s.slice(d)+h+x):s+h+(-2===d?i:x)}return[P(t,l+(t[s]||\"<?>\")+(2===i?\"</svg>\":3===i?\"</math>\":\"\")),o]};class N{constructor({strings:t,_$litType$:s},n){let r;this.parts=[];let c=0,a=0;const u=t.length-1,d=this.parts,[f,v]=V(t,s);if(this.el=N.createElement(f,n),C.currentNode=this.el.content,2===s||3===s){const t=this.el.content.firstChild;t.replaceWith(...t.childNodes)}for(;null!==(r=C.nextNode())&&d.length<u;){if(1===r.nodeType){if(r.hasAttributes())for(const t of r.getAttributeNames())if(t.endsWith(e)){const i=v[a++],s=r.getAttribute(t).split(h),e=/([.?@])?(.*)/.exec(i);d.push({type:1,index:c,name:e[2],strings:s,ctor:\".\"===e[1]?H:\"?\"===e[1]?I:\"@\"===e[1]?L:k}),r.removeAttribute(t)}else t.startsWith(h)&&(d.push({type:6,index:c}),r.removeAttribute(t));if($.test(r.tagName)){const t=r.textContent.split(h),s=t.length-1;if(s>0){r.textContent=i?i.emptyScript:\"\";for(let i=0;i<s;i++)r.append(t[i],l()),C.nextNode(),d.push({type:2,index:++c});r.append(t[s],l())}}}else if(8===r.nodeType)if(r.data===o)d.push({type:2,index:c});else{let t=-1;for(;-1!==(t=r.data.indexOf(h,t+1));)d.push({type:7,index:c}),t+=h.length-1}c++}}static createElement(t,i){const s=r.createElement(\"template\");return s.innerHTML=t,s}}function S(t,i,s=t,e){if(i===T)return i;let h=void 0!==e?s._$Co?.[e]:s._$Cl;const o=c(i)?void 0:i._$litDirective$;return h?.constructor!==o&&(h?._$AO?.(!1),void 0===o?h=void 0:(h=new o(t),h._$AT(t,s,e)),void 0!==e?(s._$Co??=[])[e]=h:s._$Cl=h),void 0!==h&&(i=S(t,h._$AS(t,i.values),h,e)),i}class M{constructor(t,i){this._$AV=[],this._$AN=void 0,this._$AD=t,this._$AM=i}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(t){const{el:{content:i},parts:s}=this._$AD,e=(t?.creationScope??r).importNode(i,!0);C.currentNode=e;let h=C.nextNode(),o=0,n=0,l=s[0];for(;void 0!==l;){if(o===l.index){let i;2===l.type?i=new R(h,h.nextSibling,this,t):1===l.type?i=new l.ctor(h,l.name,l.strings,this,t):6===l.type&&(i=new z(h,this,t)),this._$AV.push(i),l=s[++n]}o!==l?.index&&(h=C.nextNode(),o++)}return C.currentNode=r,e}p(t){let i=0;for(const s of this._$AV)void 0!==s&&(void 0!==s.strings?(s._$AI(t,s,i),i+=s.strings.length-2):s._$AI(t[i])),i++}}class R{get _$AU(){return this._$AM?._$AU??this._$Cv}constructor(t,i,s,e){this.type=2,this._$AH=E,this._$AN=void 0,this._$AA=t,this._$AB=i,this._$AM=s,this.options=e,this._$Cv=e?.isConnected??!0}get parentNode(){let t=this._$AA.parentNode;const i=this._$AM;return void 0!==i&&11===t?.nodeType&&(t=i.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,i=this){t=S(this,t,i),c(t)?t===E||null==t||\"\"===t?(this._$AH!==E&&this._$AR(),this._$AH=E):t!==this._$AH&&t!==T&&this._(t):void 0!==t._$litType$?this.$(t):void 0!==t.nodeType?this.T(t):u(t)?this.k(t):this._(t)}O(t){return this._$AA.parentNode.insertBefore(t,this._$AB)}T(t){this._$AH!==t&&(this._$AR(),this._$AH=this.O(t))}_(t){this._$AH!==E&&c(this._$AH)?this._$AA.nextSibling.data=t:this.T(r.createTextNode(t)),this._$AH=t}$(t){const{values:i,_$litType$:s}=t,e=\"number\"==typeof s?this._$AC(t):(void 0===s.el&&(s.el=N.createElement(P(s.h,s.h[0]),this.options)),s);if(this._$AH?._$AD===e)this._$AH.p(i);else{const t=new M(e,this),s=t.u(this.options);t.p(i),this.T(s),this._$AH=t}}_$AC(t){let i=A.get(t.strings);return void 0===i&&A.set(t.strings,i=new N(t)),i}k(t){a(this._$AH)||(this._$AH=[],this._$AR());const i=this._$AH;let s,e=0;for(const h of t)e===i.length?i.push(s=new R(this.O(l()),this.O(l()),this,this.options)):s=i[e],s._$AI(h),e++;e<i.length&&(this._$AR(s&&s._$AB.nextSibling,e),i.length=e)}_$AR(t=this._$AA.nextSibling,i){for(this._$AP?.(!1,!0,i);t&&t!==this._$AB;){const i=t.nextSibling;t.remove(),t=i}}setConnected(t){void 0===this._$AM&&(this._$Cv=t,this._$AP?.(t))}}class k{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(t,i,s,e,h){this.type=1,this._$AH=E,this._$AN=void 0,this.element=t,this.name=i,this._$AM=e,this.options=h,s.length>2||\"\"!==s[0]||\"\"!==s[1]?(this._$AH=Array(s.length-1).fill(new String),this.strings=s):this._$AH=E}_$AI(t,i=this,s,e){const h=this.strings;let o=!1;if(void 0===h)t=S(this,t,i,0),o=!c(t)||t!==this._$AH&&t!==T,o&&(this._$AH=t);else{const e=t;let n,r;for(t=h[0],n=0;n<h.length-1;n++)r=S(this,e[s+n],i,n),r===T&&(r=this._$AH[n]),o||=!c(r)||r!==this._$AH[n],r===E?t=E:t!==E&&(t+=(r??\"\")+h[n+1]),this._$AH[n]=r}o&&!e&&this.j(t)}j(t){t===E?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,t??\"\")}}class H extends k{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===E?void 0:t}}class I extends k{constructor(){super(...arguments),this.type=4}j(t){this.element.toggleAttribute(this.name,!!t&&t!==E)}}class L extends k{constructor(t,i,s,e,h){super(t,i,s,e,h),this.type=5}_$AI(t,i=this){if((t=S(this,t,i,0)??E)===T)return;const s=this._$AH,e=t===E&&s!==E||t.capture!==s.capture||t.once!==s.once||t.passive!==s.passive,h=t!==E&&(s===E||e);e&&this.element.removeEventListener(this.name,this,s),h&&this.element.addEventListener(this.name,this,t),this._$AH=t}handleEvent(t){\"function\"==typeof this._$AH?this._$AH.call(this.options?.host??this.element,t):this._$AH.handleEvent(t)}}class z{constructor(t,i,s){this.element=t,this.type=6,this._$AN=void 0,this._$AM=i,this.options=s}get _$AU(){return this._$AM._$AU}_$AI(t){S(this,t)}}const Z={M:e,P:h,A:o,C:1,L:V,R:M,D:u,V:S,I:R,H:k,N:I,U:L,B:H,F:z},j=t.litHtmlPolyfillSupport;j?.(N,R),(t.litHtmlVersions??=[]).push(\"3.2.1\");const B=(t,i,s)=>{const e=s?.renderBefore??i;let h=e._$litPart$;if(void 0===h){const t=s?.renderBefore??null;e._$litPart$=h=new R(i.insertBefore(l(),t),t,void 0,s??{})}return h._$AI(t),h};export{Z as _$LH,x as html,w as mathml,T as noChange,E as nothing,B as render,b as svg};\n//# sourceMappingURL=lit-html.js.map\n","/**\n * @license\n * Copyright 2019 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */\nconst t=globalThis,e=t.ShadowRoot&&(void 0===t.ShadyCSS||t.ShadyCSS.nativeShadow)&&\"adoptedStyleSheets\"in Document.prototype&&\"replace\"in CSSStyleSheet.prototype,s=Symbol(),o=new WeakMap;class n{constructor(t,e,o){if(this._$cssResult$=!0,o!==s)throw Error(\"CSSResult is not constructable. Use `unsafeCSS` or `css` instead.\");this.cssText=t,this.t=e}get styleSheet(){let t=this.o;const s=this.t;if(e&&void 0===t){const e=void 0!==s&&1===s.length;e&&(t=o.get(s)),void 0===t&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),e&&o.set(s,t))}return t}toString(){return this.cssText}}const r=t=>new n(\"string\"==typeof t?t:t+\"\",void 0,s),i=(t,...e)=>{const o=1===t.length?t[0]:e.reduce(((e,s,o)=>e+(t=>{if(!0===t._$cssResult$)return t.cssText;if(\"number\"==typeof t)return t;throw Error(\"Value passed to 'css' function must be a 'css' function result: \"+t+\". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.\")})(s)+t[o+1]),t[0]);return new n(o,t,s)},S=(s,o)=>{if(e)s.adoptedStyleSheets=o.map((t=>t instanceof CSSStyleSheet?t:t.styleSheet));else for(const e of o){const o=document.createElement(\"style\"),n=t.litNonce;void 0!==n&&o.setAttribute(\"nonce\",n),o.textContent=e.cssText,s.appendChild(o)}},c=e?t=>t:t=>t instanceof CSSStyleSheet?(t=>{let e=\"\";for(const s of t.cssRules)e+=s.cssText;return r(e)})(t):t;export{n as CSSResult,S as adoptStyles,i as css,c as getCompatibleStyle,e as supportsAdoptingStyleSheets,r as unsafeCSS};\n//# sourceMappingURL=css-tag.js.map\n","import{getCompatibleStyle as t,adoptStyles as s}from\"./css-tag.js\";export{CSSResult,adoptStyles,css,getCompatibleStyle,supportsAdoptingStyleSheets,unsafeCSS}from\"./css-tag.js\";\n/**\n * @license\n * Copyright 2017 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */const{is:i,defineProperty:e,getOwnPropertyDescriptor:r,getOwnPropertyNames:h,getOwnPropertySymbols:o,getPrototypeOf:n}=Object,a=globalThis,c=a.trustedTypes,l=c?c.emptyScript:\"\",p=a.reactiveElementPolyfillSupport,d=(t,s)=>t,u={toAttribute(t,s){switch(s){case Boolean:t=t?l:null;break;case Object:case Array:t=null==t?t:JSON.stringify(t)}return t},fromAttribute(t,s){let i=t;switch(s){case Boolean:i=null!==t;break;case Number:i=null===t?null:Number(t);break;case Object:case Array:try{i=JSON.parse(t)}catch(t){i=null}}return i}},f=(t,s)=>!i(t,s),y={attribute:!0,type:String,converter:u,reflect:!1,hasChanged:f};Symbol.metadata??=Symbol(\"metadata\"),a.litPropertyMetadata??=new WeakMap;class b extends HTMLElement{static addInitializer(t){this._$Ei(),(this.l??=[]).push(t)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(t,s=y){if(s.state&&(s.attribute=!1),this._$Ei(),this.elementProperties.set(t,s),!s.noAccessor){const i=Symbol(),r=this.getPropertyDescriptor(t,i,s);void 0!==r&&e(this.prototype,t,r)}}static getPropertyDescriptor(t,s,i){const{get:e,set:h}=r(this.prototype,t)??{get(){return this[s]},set(t){this[s]=t}};return{get(){return e?.call(this)},set(s){const r=e?.call(this);h.call(this,s),this.requestUpdate(t,r,i)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)??y}static _$Ei(){if(this.hasOwnProperty(d(\"elementProperties\")))return;const t=n(this);t.finalize(),void 0!==t.l&&(this.l=[...t.l]),this.elementProperties=new Map(t.elementProperties)}static finalize(){if(this.hasOwnProperty(d(\"finalized\")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(d(\"properties\"))){const t=this.properties,s=[...h(t),...o(t)];for(const i of s)this.createProperty(i,t[i])}const t=this[Symbol.metadata];if(null!==t){const s=litPropertyMetadata.get(t);if(void 0!==s)for(const[t,i]of s)this.elementProperties.set(t,i)}this._$Eh=new Map;for(const[t,s]of this.elementProperties){const i=this._$Eu(t,s);void 0!==i&&this._$Eh.set(i,t)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(s){const i=[];if(Array.isArray(s)){const e=new Set(s.flat(1/0).reverse());for(const s of e)i.unshift(t(s))}else void 0!==s&&i.push(t(s));return i}static _$Eu(t,s){const i=s.attribute;return!1===i?void 0:\"string\"==typeof i?i:\"string\"==typeof t?t.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev()}_$Ev(){this._$ES=new Promise((t=>this.enableUpdating=t)),this._$AL=new Map,this._$E_(),this.requestUpdate(),this.constructor.l?.forEach((t=>t(this)))}addController(t){(this._$EO??=new Set).add(t),void 0!==this.renderRoot&&this.isConnected&&t.hostConnected?.()}removeController(t){this._$EO?.delete(t)}_$E_(){const t=new Map,s=this.constructor.elementProperties;for(const i of s.keys())this.hasOwnProperty(i)&&(t.set(i,this[i]),delete this[i]);t.size>0&&(this._$Ep=t)}createRenderRoot(){const t=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return s(t,this.constructor.elementStyles),t}connectedCallback(){this.renderRoot??=this.createRenderRoot(),this.enableUpdating(!0),this._$EO?.forEach((t=>t.hostConnected?.()))}enableUpdating(t){}disconnectedCallback(){this._$EO?.forEach((t=>t.hostDisconnected?.()))}attributeChangedCallback(t,s,i){this._$AK(t,i)}_$EC(t,s){const i=this.constructor.elementProperties.get(t),e=this.constructor._$Eu(t,i);if(void 0!==e&&!0===i.reflect){const r=(void 0!==i.converter?.toAttribute?i.converter:u).toAttribute(s,i.type);this._$Em=t,null==r?this.removeAttribute(e):this.setAttribute(e,r),this._$Em=null}}_$AK(t,s){const i=this.constructor,e=i._$Eh.get(t);if(void 0!==e&&this._$Em!==e){const t=i.getPropertyOptions(e),r=\"function\"==typeof t.converter?{fromAttribute:t.converter}:void 0!==t.converter?.fromAttribute?t.converter:u;this._$Em=e,this[e]=r.fromAttribute(s,t.type),this._$Em=null}}requestUpdate(t,s,i){if(void 0!==t){if(i??=this.constructor.getPropertyOptions(t),!(i.hasChanged??f)(this[t],s))return;this.P(t,s,i)}!1===this.isUpdatePending&&(this._$ES=this._$ET())}P(t,s,i){this._$AL.has(t)||this._$AL.set(t,s),!0===i.reflect&&this._$Em!==t&&(this._$Ej??=new Set).add(t)}async _$ET(){this.isUpdatePending=!0;try{await this._$ES}catch(t){Promise.reject(t)}const t=this.scheduleUpdate();return null!=t&&await t,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??=this.createRenderRoot(),this._$Ep){for(const[t,s]of this._$Ep)this[t]=s;this._$Ep=void 0}const t=this.constructor.elementProperties;if(t.size>0)for(const[s,i]of t)!0!==i.wrapped||this._$AL.has(s)||void 0===this[s]||this.P(s,this[s],i)}let t=!1;const s=this._$AL;try{t=this.shouldUpdate(s),t?(this.willUpdate(s),this._$EO?.forEach((t=>t.hostUpdate?.())),this.update(s)):this._$EU()}catch(s){throw t=!1,this._$EU(),s}t&&this._$AE(s)}willUpdate(t){}_$AE(t){this._$EO?.forEach((t=>t.hostUpdated?.())),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(t)),this.updated(t)}_$EU(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(t){return!0}update(t){this._$Ej&&=this._$Ej.forEach((t=>this._$EC(t,this[t]))),this._$EU()}updated(t){}firstUpdated(t){}}b.elementStyles=[],b.shadowRootOptions={mode:\"open\"},b[d(\"elementProperties\")]=new Map,b[d(\"finalized\")]=new Map,p?.({ReactiveElement:b}),(a.reactiveElementVersions??=[]).push(\"2.0.4\");export{b as ReactiveElement,u as defaultConverter,f as notEqual};\n//# sourceMappingURL=reactive-element.js.map\n","import{ReactiveElement as t}from\"@lit/reactive-element\";export*from\"@lit/reactive-element\";import{render as e,noChange as s}from\"lit-html\";export*from\"lit-html\";\n/**\n * @license\n * Copyright 2017 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */class r extends t{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){const t=super.createRenderRoot();return this.renderOptions.renderBefore??=t.firstChild,t}update(t){const s=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(t),this._$Do=e(s,this.renderRoot,this.renderOptions)}connectedCallback(){super.connectedCallback(),this._$Do?.setConnected(!0)}disconnectedCallback(){super.disconnectedCallback(),this._$Do?.setConnected(!1)}render(){return s}}r._$litElement$=!0,r[\"finalized\"]=!0,globalThis.litElementHydrateSupport?.({LitElement:r});const i=globalThis.litElementPolyfillSupport;i?.({LitElement:r});const o={_$AK:(t,e,s)=>{t._$AK(e,s)},_$AL:t=>t._$AL};(globalThis.litElementVersions??=[]).push(\"4.1.1\");export{r as LitElement,o as _$LE};\n//# sourceMappingURL=lit-element.js.map\n"],"names":["window","JSCompiler_renameProperty","prop","obj","policy","trustedTypes","createPolicy","createHTML","s","LiteralString","constructor","strings","values","assertValidTemplateStringParameters","string","reduce","acc","v","idx","literalValue","this","value","toString","Error","html","template","document","createElement","HTMLTemplateElement","innerHTML","htmlValue","Array","isArray","raw","length","TypeError","dedupeId","MixinFunction","prototype","__mixinApplications","__mixinSet","dedupingMixin","mixin","mixinApplications","WeakMap","mixinDedupeId","base","baseSet","map","extended","get","set","mixinSet","Object","create","workingURL","resolveDoc","CSS_URL_RX","ABS_URL","resolveUrl","url","baseURI","test","undefined","u","URL","pathname","href","e","location","implementation","createHTMLDocument","head","appendChild","anchor","body","resolveCss","cssText","replace","m","pre","post","pathFromUrl","substring","lastIndexOf","useShadow","ShadyDOM","supportsAdoptingStyleSheets","Boolean","ShadyCSS","nativeCss","customElements","Document","CSSStyleSheet","sheet","replaceSync","host","attachShadow","mode","shadowRoot","adoptedStyleSheets","rootPath","Polymer","sanitizeDOMValue","setPassiveTouchGestures","strictTemplatePolicy","allowTemplateFromDomModule","legacyOptimizations","legacyWarnings","syncInitialRender","legacyUndefined","orderedComputed","cancelSyntheticClickEvents","setCancelSyntheticClickEvents","useCancelSyntheticClickEvents","removeNestedTemplates","fastDomIf","suppressTemplateNotifications","legacyNoObservedAttributes","useAdoptedStyleSheetsWithBuiltCSS","modules","lcModules","setModule","id","module","toLowerCase","findModule","DomModule","HTMLElement","observedAttributes","import","selector","querySelector","attributeChangedCallback","name","old","namespace","register","assetpath","__assetpath","owner","HTMLImports","importForElement","ownerDocument","getAttribute","inst","console","warn","define","SHADY_UNSCOPED_ATTR","importModule","moduleId","styleForImport","importDoc","container","importCss","textContent","style","stylesFromModules","moduleIds","trim","split","styles","i","push","stylesFromModule","_styles","_stylesFromModuleImports","stylesFromTemplate","e$","content","querySelectorAll","include","filter","item","index","self","indexOf","p$","p","unscoped","hasAttribute","_unscopedStyle","setAttribute","_style","wrap","n","isPath","path","root","dotIndex","slice","isDescendant","translate","newBase","normalize","parts","args","j","join","info","last","caseMap","DASH_TO_CAMEL","CAMEL_TO_DASH","dashToCamelCase","dash","toUpperCase","camelToDashCase","camel","microtaskCurrHandle","microtaskLastHandle","microtaskCallbacks","microtaskNodeContent","microtaskScheduled","microtaskNode","createTextNode","MutationObserver","len","cb","setTimeout","splice","observe","characterData","microtask","run","callback","cancel","handle","PropertiesChanged","superClass","createProperties","props","proto","_createPropertyAccessor","attributeNameForProperty","property","typeForProperty","readOnly","_addPropertyToAttributeMap","hasOwnProperty","__dataHasAccessor","assign","_definePropertyAccessor","__dataAttributes","attr","defineProperty","__data","_setPendingProperty","_invalidateProperties","super","__dataEnabled","__dataReady","__dataInvalid","__dataPending","__dataOld","__dataInstanceProps","__dataCounter","__serializing","_initializeProperties","ready","_flushProperties","_initializeInstanceProperties","_setProperty","_getProperty","ext","changed","_shouldPropertyChange","_isPropertyPending","_enableProperties","changedProps","_shouldPropertiesChange","_propertiesChanged","currentProps","oldProps","_attributeToProperty","attribute","type","_deserializeValue","_propertyToAttribute","arguments","_valueToNodeAttribute","node","str","_serializeValue","removeAttribute","Number","nativeProperties","getOwnPropertyNames","getPrototypeOf","isTrustedType","val","isHTML","isScript","isScriptURL","PropertyAccessors","createPropertiesForAttributes","a$","__dataProto","_initializeProtoProperties","_ensureAttribute","Date","JSON","stringify","x","outValue","parse","isNaN","String","model","saveAccessorValue","_hasAccessor","templateExtensions","placeholderBugDetect","placeholderBug","copyAttributeWithTemplateEventPolicy","polymerTemplateEventAttributePolicy","createScript","dest","src","startsWith","wrapTemplateExtension","is","t","parentNode","replaceChild","attributes","findTemplateNode","nodeInfo","parent","parentInfo","firstChild","nextSibling","parentIndex","applyIdToMap","applyEventListener","events","_addMethodEventListenerToNode","applyTemplateInfo","parentTemplateInfo","templateInfo","_templateInfo","_parentTemplateInfo","TemplateStamp","_parseTemplate","outerTemplateInfo","nodeInfoList","nestedTemplate","stripWhiteSpace","_parseTemplateContent","_parseTemplateNode","noted","element","localName","hasInsertionPoint","_parseTemplateNestedTemplate","placeholder","hasPlaceholderBug","fixPlaceholder","_parseTemplateChildNodes","hasAttributes","_parseTemplateNodeAttributes","next","nodeType","Node","TEXT_NODE","removeChild","childInfo","infoIndex","createDocumentFragment","attrs","from","a","_parseTemplateNodeAttribute","_contentForTemplate","_stampTemplate","decorate","dom","importNode","__noInsertionPoint","nodes","nodeList","$","l","eventName","methodName","context","handler","_methodHost","detail","createNodeEventHandler","_addEventListenerToNode","addEventListener","_removeEventListenerFromNode","removeEventListener","NOOP","TYPES","COMPUTE","REFLECT","NOTIFY","PROPAGATE","OBSERVE","READ_ONLY","COMPUTE_INFO","capitalAttributeRegex","ensureOwnEffectMap","cloneArrays","effects","protoFx","instFx","runEffects","hasPaths","extraArgs","ran","fxs","fx","lastRun","pathMatchesTrigger","trigger","fn","runEffectsForProperty","triggerPath","structured","isAncestor","wildcard","runObserverEffect","method","changedProp","call","dynamicFn","notifyPath","rootProperty","dispatchNotifyEvent","queueProperty","dispatchEvent","CustomEvent","runNotifyEffect","runReflectEffect","attrName","insertEffect","queue","order","start","end","mid","cmp","methodInfo","enqueueEffectsFor","computeEffects","runComputedEffect","result","runMethodEffect","computedProp","addBinding","kind","target","literal","bindings","binding","isCompound","shouldAddListener","event","negate","listenerEvent","listenerNegate","part","compoundIndex","addEffectForBindingPart","dependencies","evaluator","parseArg","_addTemplatePropertyEffect","runBindingEffect","source","__isPropertyEffectsClient","_setPendingPropertyOrPath","_enqueueClient","_evaluateBinding","storage","__dataCompoundStorage","computeBindingValue","_setUnmanagedPropertyToNode","applyBindingValue","setupCompoundStorage","literals","addNotifyListener","fromProp","toPath","fromPath","currentTarget","handleNotification","createMethodEffect","sig","effectFn","static","arg","_addPropertyEffect","_marshalArgs","apply","emptyArray","IDENT","ARGUMENT","bindingRegex","RegExp","OPEN_BRACKET","literalFromParts","parseMethod","expression","match","argList","rawArg","parseArgs","fc","getArgValue","data","notifySplices","array","splices","splicesData","indexSplices","_overrideLegacyUndefined","notifySplice","addedCount","removed","object","PropertyEffects","propertyEffectsBase","__dataClientsReady","__dataPendingClients","__dataToNotify","__dataLinkedPaths","__dataHasPaths","__dataHost","__dataTemp","__dataClientsInitialized","__computeEffects","__computeInfo","__reflectEffects","__notifyEffects","__propagateEffects","__observeEffects","__readOnly","__templateInfo","PROPERTY_EFFECT_TYPES","_registerHost","hostStack","effect","_removePropertyEffect","_hasPropertyEffect","_hasReadOnlyEffect","_hasNotifyEffect","_hasReflectEffect","_hasComputedEffect","shouldNotify","isPathNotification","links","link","b","computeLinkedPaths","propIsPath","prevProps","client","_flushClients","__enableOrFlushClients","_readyClients","clients","setProperties","setReadOnly","notifyProps","ordered","__orderedComputedDeps","Map","curr","counts","total","infoForComputed","computedDeps","dependencyCounts","shift","size","computedByCurr","forEach","el","getComputedOrder","inputProps","runComputedEffects","_propagatePropertyChanges","notified","runNotifyEffects","_runEffectsForTemplate","baseRunEffects","propertyEffects","linkPaths","to","unlinkPaths","items","ret","pop","hadLength","deleteCount","Math","floor","unshift","propPath","_createReadOnlyProperty","protectedSetter","_createPropertyObserver","_createMethodObserver","_createNotifyingProperty","_createReflectedProperty","_createComputedProperty","matches","pathValue","addPropertyEffect","createPropertyObserver","createMethodObserver","createNotifyingProperty","createReadOnlyProperty","createReflectedProperty","createComputedProperty","bindTemplate","_bindTemplate","instanceBinding","wasPreBound","__preBoundTemplateInfo","previous","lastChild","previousSibling","hostProps","childNodes","setupBindings","_removeBoundDom","_parseBindings","origName","nestedTemplateInfo","isDomIf","isDomRepeat","hostProp","text","lastIndex","exec","customEvent","notifyEvent","colon","signature","dynamicFns","registrations","PropertiesMixin","superPropertiesClass","superCtor","ownProperties","properties","output","o","normalizeProperties","__ownProperties","_properties","__observedAttributes","keys","finalize","__finalized","_finalizeClass","__properties","connectedCallback","disconnectedCallback","builtCSS","ElementMixin","polymerElementBase","createPropertyFromConfig","allProps","computed","reflectToAttribute","notify","observer","polymerElementVersion","observers","__ownObservers","createObservers","_prepareTemplate","error","cloneNode","_template","protoTemplate","importPath","meta","importMeta","_importPath","_finalizeTemplate","__propertyDefaults","propertyDefaults","_canApplyPropertyDefault","_processStyleText","__polymerFinalized","klass","templateStyles","stylesWithImports","linkedStyles","stylesFromModuleImports","firstTemplateChild","firstElementChild","insertBefore","templateStyleIndex","templateStyle","prepareTemplate","css","_styleSheet","processElementStyles","styleElement","_attachDom","shadyUpgradeFragment","DESCOPE_NONCE","flushInitial","updateStyles","styleSubtree","PolymerElement","timeOut","after","delay","clearTimeout","animationFrame","requestAnimationFrame","cancelAnimationFrame","idlePeriod","requestIdleCallback","cancelIdleCallback","microTask","queueMicrotask","microtaskFlush","debouncerQueue","Set","Debouncer","debounce","debouncer","asyncModule","_cancelAsync","setConfig","_asyncModule","_callback","_timer","delete","isActive","flush","enqueueDebouncer","add","flushDebouncers","didFlush","debouncers","defineCustomElement","CustomElement","defined","definedVersion","version","directionSubscribers","alignDirs","documentDir","elementDir","getDocumentDir","documentElement","attributeFilter","DirMixin","dir","converter","fromAttribute","toAttribute","__isRTL","__restoreSubscription","__subscribe","oldValue","newValue","newValueEqlDocDir","newValueEmptied","newDiffValue","__unsubscribe","includes","colorBase","color","addLumoGlobalStyles","styleTag","insertAdjacentElement","addGlobalThemeStyles","spacing","Lumo","themeRegistry","classHasThemes","elementClass","registerStyles","themeFor","options","tagName","flat","Infinity","flattenStyles","Vaadin","styleModules","getAllThemes","getIncludePriority","moduleName","includePriority","getIncludedStyles","theme","includedStyles","concat","includeModuleId","includedTheme","find","getThemes","defaultModuleName","themes","some","themeForToken","matchesThemeFor","sort","themeA","themeB","ThemableMixin","elementStyles","styleEl","addStylesToTemplate","getStylesForThis","finalizeStyles","themeStyles","inheritedThemes","__themes","flatMap","ThemePropertyMixin","_theme","_set_theme","globalThis","h","random","toFixed","r","createComment","c","Symbol","iterator","d","f","_","g","y","_$litType$","T","for","E","A","C","createTreeWalker","P","V","N","currentNode","replaceWith","nextNode","getAttributeNames","endsWith","ctor","H","I","L","k","emptyScript","append","S","_$Co","_$Cl","_$litDirective$","_$AO","_$AT","_$AS","M","_$AV","_$AN","_$AD","_$AM","_$AU","creationScope","R","z","_$AI","_$Cv","_$AH","_$AA","_$AB","isConnected","startNode","endNode","_$AR","O","_$AC","_$AP","remove","setConnected","fill","toggleAttribute","capture","once","passive","handleEvent","Z","D","U","B","F","litHtmlPolyfillSupport","litHtmlVersions","renderBefore","_$litPart$","ShadowRoot","nativeShadow","_$cssResult$","styleSheet","litNonce","cssRules","getOwnPropertyDescriptor","getOwnPropertySymbols","reactiveElementPolyfillSupport","reflect","hasChanged","metadata","litPropertyMetadata","addInitializer","_$Ei","_$Eh","createProperty","state","elementProperties","noAccessor","getPropertyDescriptor","requestUpdate","configurable","enumerable","getPropertyOptions","finalized","_$Eu","reverse","_$Ep","isUpdatePending","hasUpdated","_$Em","_$Ev","_$ES","Promise","enableUpdating","_$AL","_$E_","addController","_$EO","renderRoot","hostConnected","removeController","createRenderRoot","shadowRootOptions","hostDisconnected","_$AK","_$EC","_$ET","has","_$Ej","reject","scheduleUpdate","performUpdate","wrapped","shouldUpdate","willUpdate","hostUpdate","update","_$EU","_$AE","hostUpdated","firstUpdated","updated","updateComplete","getUpdateComplete","ReactiveElement","reactiveElementVersions","renderOptions","_$Do","render","_$litElement$","litElementHydrateSupport","LitElement","litElementPolyfillSupport","litElementVersions"],"sourceRoot":""}