useblocks 1.1.85-dev.9 → 1.1.102

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 (516) hide show
  1. package/CHANGELOG.md +91 -0
  2. package/README.md +74 -41
  3. package/compat-globals.js +1 -1
  4. package/iframe/.vite/manifest.json +4 -4
  5. package/iframe/css/sandbox.css +35 -1
  6. package/iframe/{iframe.bb6d921f.html → iframe-eblock.1c4e77a0.html} +2 -2
  7. package/iframe/{iframe-eblock.bb6d921f.html → iframe.1c4e77a0.html} +2 -2
  8. package/iframe/js/discussHandlers.Xh4-JUcT.js +88 -0
  9. package/iframe/js/{iframe-eblock.body.js → iframe-eblock.body.1c4e77a0.js} +1 -1
  10. package/iframe/js/iframe-eblock.js +2 -2
  11. package/iframe/js/iframe.body.1c4e77a0.js +319 -0
  12. package/iframe/js/iframe.js +2 -2
  13. package/package.json +8 -1
  14. package/runtime/THIRD_PARTY_LICENSES.txt +49 -42
  15. package/runtime/package.json +4 -1
  16. package/runtime/react/index.js +1 -1
  17. package/runtime/uuid/index.js +21 -0
  18. package/static/core/11b821ed.js +1 -0
  19. package/static/core/160bf060.js +104 -0
  20. package/static/core/1b68c0f0.js +1 -0
  21. package/static/core/1ed86ed3.js +1 -0
  22. package/static/core/26cc947d.js +1 -0
  23. package/static/core/{67f78cad.js → 3ec42945.js} +7 -7
  24. package/static/core/3fb172c7.js +1 -0
  25. package/static/core/448f03f8.js +1 -0
  26. package/static/core/44d2c046.js +1 -0
  27. package/static/core/{79749848.js → 4c8d0155.js} +5 -5
  28. package/static/core/53103851.js +4 -0
  29. package/static/core/{a767f327.js → 5d849eef.js} +1 -1
  30. package/static/core/5e7c221f.js +28 -0
  31. package/static/core/64be048b.js +27 -0
  32. package/static/core/{de07cade.js → 6a671446.js} +3 -3
  33. package/static/core/{db82c42b.js → 756874c6.js} +1 -1
  34. package/static/core/{4c3f5897.js → 847338a8.js} +2 -2
  35. package/static/core/91e07171.js +2 -0
  36. package/static/core/a2e57e5f.js +1 -0
  37. package/static/core/{a5996860.js → a6303cb2.js} +1 -1
  38. package/static/core/{9f137764.js → a98b6879.js} +1 -1
  39. package/static/core/ae22b7f6.js +93 -0
  40. package/static/core/{44a83e21.js → b653f9c5.js} +1 -1
  41. package/static/core/{cb46784e.js → b7aa9fec.js} +1 -1
  42. package/static/core/{d8bbcfbd.js → ca4dad9b.js} +2 -2
  43. package/static/core/{6faa23a1.js → cc180859.js} +1 -1
  44. package/static/core/d7666ad0.js +291 -0
  45. package/static/core/dcc37768.js +1 -0
  46. package/static/core/edf450a1.js +7 -0
  47. package/static/core/f1ee2bef.js +1 -0
  48. package/static/core/{1e3078da.js → f323e60e.js} +1 -1
  49. package/static/core/{175b5b0f.js → ff7d14e8.js} +1 -1
  50. package/static/esm/2490dab8.js +1 -0
  51. package/static/esm/668ee399.js +1 -0
  52. package/static/esm/971f1b2c.js +1 -0
  53. package/static/esm/f76c9d9d.js +1 -0
  54. package/static/umd/6639d610.js +1 -0
  55. package/static/umd-runtime/B7h7P1Np.js +1 -0
  56. package/static/umd-runtime/{DHIkHsbq.js → BAqQTgiL.js} +1 -1
  57. package/static/umd-runtime/{DiNHpyis.js → BB6AXfHj.js} +1 -1
  58. package/static/umd-runtime/{CnUGCoaH.js → BauvM4c_.js} +1 -1
  59. package/static/umd-runtime/{cL_ha9ef.js → CgVJ4rE0.js} +1 -1
  60. package/static/umd-runtime/Cvm7BS4_.js +341 -0
  61. package/static/umd-runtime/{BnE05QKl.js → D7DggGzi.js} +1 -1
  62. package/static/umd-runtime/{2iAslXEF.js → DBbch1O-.js} +1 -1
  63. package/static/umd-runtime/{Bcqtk2f7.js → Dqoi-pC_.js} +2 -2
  64. package/static/umd-runtime/{CDTBLHGd.js → G2k8ELiO.js} +3 -3
  65. package/static/umd-runtime/{CVtPwspX.js → SFp4nbvq.js} +1 -1
  66. package/static/umd-runtime/{DVB_-O4B.js → UsRzAWs2.js} +1 -1
  67. package/static/umd-runtime/runtime.2paN090q.js +1 -0
  68. package/static/umd-runtime/{ui-kit-icons.js → ui-kit-icons.DqlZwgBU.js} +1 -1
  69. package/static/umd-runtime/{ui-kit.js → ui-kit.CoVNet0I.js} +2 -2
  70. package/static/umd-runtime/{DP3QTW77.js → uk9LyZos.js} +1 -1
  71. package/ui-kit/icons.js +2 -0
  72. package/useblocks-core.1c4e77a0.js +859 -0
  73. package/useblocks-esm.js +11 -10
  74. package/{useblocks-po.bb6d921f.js → useblocks-po.1c4e77a0.js} +1 -1
  75. package/useblocks.d.ts +162 -28
  76. package/useblocks.js +39 -15
  77. package/vendor/@rc-component/cascader/package.json +1 -1
  78. package/vendor/@rc-component/dialog/es/Dialog/Content/Panel.js +3 -2
  79. package/vendor/@rc-component/dialog/package.json +1 -1
  80. package/vendor/@rc-component/image/es/Preview/index.js +3 -3
  81. package/vendor/@rc-component/image/package.json +1 -1
  82. package/vendor/@rc-component/input/es/BaseInput.js +3 -3
  83. package/vendor/@rc-component/input/es/Input.js +20 -27
  84. package/vendor/@rc-component/{textarea → input}/es/ResizableTextArea.js +5 -4
  85. package/vendor/@rc-component/{textarea → input}/es/TextArea.js +30 -40
  86. package/vendor/@rc-component/{textarea → input}/es/calculateNodeHeight.js +4 -4
  87. package/vendor/@rc-component/input/es/hooks/useCountDisplay.js +25 -0
  88. package/vendor/@rc-component/input/es/hooks/useCountExceed.js +25 -0
  89. package/vendor/@rc-component/input/es/hooks/useMergedValue.js +13 -0
  90. package/vendor/@rc-component/input/es/index.js +3 -1
  91. package/vendor/@rc-component/input/package.json +1 -1
  92. package/vendor/@rc-component/mentions/es/DropdownMenu.js +1 -1
  93. package/vendor/@rc-component/mentions/es/Mentions.js +35 -8
  94. package/vendor/@rc-component/mentions/package.json +1 -1
  95. package/vendor/@rc-component/menu/es/Menu.js +1 -0
  96. package/vendor/@rc-component/menu/es/MenuItem.js +1 -0
  97. package/vendor/@rc-component/menu/es/MenuItemGroup.js +1 -0
  98. package/vendor/@rc-component/menu/es/SubMenu/PopupTrigger.js +1 -0
  99. package/vendor/@rc-component/menu/es/SubMenu/index.js +1 -0
  100. package/vendor/@rc-component/menu/es/context/MenuContext.js +1 -0
  101. package/vendor/@rc-component/menu/es/hooks/useAccessibility.js +1 -0
  102. package/vendor/@rc-component/menu/es/hooks/useKeyRecords.js +1 -0
  103. package/vendor/@rc-component/menu/es/utils/commonUtil.js +1 -0
  104. package/vendor/@rc-component/menu/es/utils/nodeUtil.js +2 -1
  105. package/vendor/@rc-component/menu/es/utils/warnUtil.js +1 -0
  106. package/vendor/@rc-component/menu/package.json +1 -1
  107. package/vendor/@rc-component/notification/LICENSE +21 -0
  108. package/vendor/@rc-component/notification/_/@rc-component/util/LICENSE +22 -0
  109. package/vendor/@rc-component/notification/_/@rc-component/util/es/Children/toArray.js +15 -0
  110. package/vendor/@rc-component/notification/_/@rc-component/util/es/Dom/canUseDom.js +6 -0
  111. package/vendor/@rc-component/notification/_/@rc-component/util/es/Dom/contains.js +13 -0
  112. package/vendor/@rc-component/notification/_/@rc-component/util/es/Dom/dynamicCSS.js +94 -0
  113. package/vendor/@rc-component/notification/_/@rc-component/util/es/Dom/findDOMNode.js +14 -0
  114. package/vendor/@rc-component/notification/_/@rc-component/util/es/Dom/focus.js +99 -0
  115. package/vendor/@rc-component/notification/_/@rc-component/util/es/Dom/isVisible.js +18 -0
  116. package/vendor/@rc-component/notification/_/@rc-component/util/es/Dom/shadow.js +12 -0
  117. package/vendor/@rc-component/notification/_/@rc-component/util/es/Dom/styleChecker.js +2 -0
  118. package/vendor/@rc-component/notification/_/@rc-component/util/es/KeyCode.js +499 -0
  119. package/vendor/@rc-component/notification/_/@rc-component/util/es/Portal.js +28 -0
  120. package/vendor/@rc-component/notification/_/@rc-component/util/es/React/isFragment.js +12 -0
  121. package/vendor/@rc-component/notification/_/@rc-component/util/es/React/render.js +2 -0
  122. package/vendor/@rc-component/notification/_/@rc-component/util/es/getScrollBarSize.js +2 -0
  123. package/vendor/@rc-component/notification/_/@rc-component/util/es/hooks/useControlledState.js +3 -0
  124. package/vendor/@rc-component/notification/_/@rc-component/util/es/hooks/useDelayState.js +4 -0
  125. package/vendor/@rc-component/notification/_/@rc-component/util/es/hooks/useEvent.js +9 -0
  126. package/vendor/@rc-component/notification/_/@rc-component/util/es/hooks/useId.js +23 -0
  127. package/vendor/@rc-component/notification/_/@rc-component/util/es/hooks/useLayoutEffect.js +26 -0
  128. package/vendor/@rc-component/notification/_/@rc-component/util/es/hooks/useMemo.js +12 -0
  129. package/vendor/@rc-component/notification/_/@rc-component/util/es/hooks/useMergedState.js +4 -0
  130. package/vendor/@rc-component/notification/_/@rc-component/util/es/hooks/useState.js +24 -0
  131. package/vendor/@rc-component/notification/_/@rc-component/util/es/hooks/useSyncState.js +20 -0
  132. package/vendor/@rc-component/notification/_/@rc-component/util/es/index.js +36 -0
  133. package/vendor/@rc-component/notification/_/@rc-component/util/es/is.js +21 -0
  134. package/vendor/@rc-component/notification/_/@rc-component/util/es/isEqual.js +35 -0
  135. package/vendor/@rc-component/notification/_/@rc-component/util/es/isMobile.js +11 -0
  136. package/vendor/@rc-component/notification/_/@rc-component/util/es/mergeProps.js +14 -0
  137. package/vendor/@rc-component/notification/_/@rc-component/util/es/omit.js +1 -0
  138. package/vendor/@rc-component/notification/_/@rc-component/util/es/pickAttrs.js +50 -0
  139. package/vendor/@rc-component/notification/_/@rc-component/util/es/proxyObject.js +1 -0
  140. package/vendor/@rc-component/notification/_/@rc-component/util/es/raf.js +36 -0
  141. package/vendor/@rc-component/notification/_/@rc-component/util/es/ref.js +38 -0
  142. package/vendor/@rc-component/notification/_/@rc-component/util/es/test/domHook.js +36 -0
  143. package/vendor/@rc-component/notification/_/@rc-component/util/es/utils/get.js +11 -0
  144. package/vendor/@rc-component/notification/_/@rc-component/util/es/utils/set.js +58 -0
  145. package/vendor/@rc-component/notification/_/@rc-component/util/es/warning.js +46 -0
  146. package/vendor/@rc-component/notification/_/@rc-component/util/package.json +6 -0
  147. package/vendor/@rc-component/notification/es/Notification.js +129 -0
  148. package/vendor/@rc-component/notification/es/NotificationList/Content.js +33 -0
  149. package/vendor/@rc-component/notification/es/NotificationList/index.js +174 -0
  150. package/vendor/@rc-component/notification/es/NotificationProvider.js +4 -3
  151. package/vendor/@rc-component/notification/es/Notifications.js +28 -31
  152. package/vendor/@rc-component/notification/es/Progress.js +10 -0
  153. package/vendor/@rc-component/notification/es/hooks/useClosable.js +30 -0
  154. package/vendor/@rc-component/notification/es/hooks/useListPosition/index.js +50 -0
  155. package/vendor/@rc-component/notification/es/hooks/useListPosition/useSizes.js +33 -0
  156. package/vendor/@rc-component/notification/es/hooks/useNoticeTimer.js +58 -0
  157. package/vendor/@rc-component/notification/es/hooks/useNotification.js +27 -18
  158. package/vendor/@rc-component/notification/es/hooks/useStack.js +4 -4
  159. package/vendor/@rc-component/notification/es/index.js +4 -2
  160. package/vendor/@rc-component/notification/package.json +1 -1
  161. package/vendor/@rc-component/picker/es/PickerInput/Selector/SingleSelector/MultipleDates.js +13 -3
  162. package/vendor/@rc-component/picker/es/PickerInput/Selector/SingleSelector/index.js +3 -1
  163. package/vendor/@rc-component/picker/es/PickerInput/SinglePicker.js +2 -1
  164. package/vendor/@rc-component/picker/package.json +1 -1
  165. package/vendor/@rc-component/table/LICENSE +21 -0
  166. package/vendor/@rc-component/table/es/Body/MeasureCell.js +1 -0
  167. package/vendor/@rc-component/table/es/Body/MeasureRow.js +1 -0
  168. package/vendor/@rc-component/table/es/Cell/useCellRender.js +1 -0
  169. package/vendor/@rc-component/table/es/FixedHolder/index.js +1 -0
  170. package/vendor/@rc-component/table/es/Table.js +17 -9
  171. package/vendor/@rc-component/table/es/VirtualTable/BodyGrid.js +10 -4
  172. package/vendor/@rc-component/table/es/VirtualTable/BodyLine.js +13 -5
  173. package/vendor/@rc-component/table/es/hooks/useColumns/index.js +1 -0
  174. package/vendor/@rc-component/table/es/hooks/useExpand.js +1 -0
  175. package/vendor/@rc-component/table/es/hooks/useFixedInfo.js +1 -0
  176. package/vendor/@rc-component/table/es/hooks/useSticky.js +1 -0
  177. package/vendor/@rc-component/table/es/index.js +2 -1
  178. package/vendor/@rc-component/table/es/stickyScrollBar.js +1 -0
  179. package/vendor/@rc-component/table/es/utils/legacyUtil.js +1 -0
  180. package/vendor/@rc-component/table/es/utils/offsetUtil.js +1 -0
  181. package/vendor/@rc-component/table/package.json +1 -1
  182. package/vendor/@rc-component/tabs/es/TabNavList/OperationNode.js +4 -2
  183. package/vendor/@rc-component/tabs/es/TabNavList/TabNode.js +5 -4
  184. package/vendor/@rc-component/tabs/es/TabNavList/index.js +11 -4
  185. package/vendor/@rc-component/tabs/es/Tabs.js +1 -0
  186. package/vendor/@rc-component/tabs/es/hooks/useAnimateConfig.js +1 -0
  187. package/vendor/@rc-component/tabs/es/hooks/useIndicator.js +1 -0
  188. package/vendor/@rc-component/tabs/es/hooks/useUpdate.js +1 -0
  189. package/vendor/@rc-component/tabs/package.json +1 -1
  190. package/vendor/@rc-component/tour/es/TourStep/DefaultPanel.js +4 -1
  191. package/vendor/@rc-component/tour/package.json +1 -1
  192. package/vendor/@rc-component/tree/es/MotionTreeNode.js +1 -0
  193. package/vendor/@rc-component/tree/es/NodeList.js +2 -2
  194. package/vendor/@rc-component/tree/es/Tree.js +4 -5
  195. package/vendor/@rc-component/tree/es/TreeNode.js +7 -2
  196. package/vendor/@rc-component/tree/es/index.js +3 -0
  197. package/vendor/@rc-component/tree/es/useUnmount.js +1 -0
  198. package/vendor/@rc-component/tree/es/util.js +1 -0
  199. package/vendor/@rc-component/tree/es/utils/conductUtil.js +1 -0
  200. package/vendor/@rc-component/tree/es/utils/treeUtil.js +1 -0
  201. package/vendor/@rc-component/tree/package.json +1 -1
  202. package/vendor/@rc-component/tree-select/package.json +1 -1
  203. package/vendor/@rc-component/util/es/index.js +10 -10
  204. package/vendor/antd/es/_util/ActionButton.js +2 -3
  205. package/vendor/antd/es/_util/ContextIsolator.js +1 -1
  206. package/vendor/antd/es/_util/PurePanel.js +7 -4
  207. package/vendor/antd/es/_util/convertToTooltipProps.js +2 -2
  208. package/vendor/antd/es/_util/fallbackProp.js +15 -0
  209. package/vendor/antd/es/_util/gapSize.js +2 -1
  210. package/vendor/antd/es/_util/getRenderPropValue.js +2 -1
  211. package/vendor/antd/es/_util/getScroll.js +4 -4
  212. package/vendor/antd/es/_util/hooks/index.js +2 -2
  213. package/vendor/antd/es/_util/hooks/useAllowClear.js +25 -0
  214. package/vendor/antd/es/_util/hooks/useClosable.js +6 -5
  215. package/vendor/antd/es/_util/hooks/{useMergeSemantic.js → useMergeSemantic/index.js} +14 -24
  216. package/vendor/antd/es/_util/hooks/useMergeSemantic/utils.js +14 -0
  217. package/vendor/antd/es/_util/hooks/useMergedMask.js +2 -1
  218. package/vendor/antd/es/_util/is.js +27 -0
  219. package/vendor/antd/es/_util/motion.js +8 -8
  220. package/vendor/antd/es/_util/normalizeIcon.js +9 -0
  221. package/vendor/antd/es/_util/placements.js +2 -1
  222. package/vendor/antd/es/_util/reactNode.js +2 -1
  223. package/vendor/antd/es/_util/responsiveObserver.js +3 -2
  224. package/vendor/antd/es/_util/scrollTo.js +3 -1
  225. package/vendor/antd/es/_util/styleChecker.js +1 -0
  226. package/vendor/antd/es/_util/throttleByAnimationFrame.js +1 -0
  227. package/vendor/antd/es/_util/toList.js +1 -1
  228. package/vendor/antd/es/_util/wave/WaveEffect.js +3 -1
  229. package/vendor/antd/es/_util/wave/index.js +14 -4
  230. package/vendor/antd/es/_util/wave/util.js +5 -3
  231. package/vendor/antd/es/alert/Alert.js +12 -10
  232. package/vendor/antd/es/alert/ErrorBoundary.js +1 -1
  233. package/vendor/antd/es/alert/style/index.js +16 -10
  234. package/vendor/antd/es/anchor/Anchor.js +23 -16
  235. package/vendor/antd/es/anchor/AnchorLink.js +4 -4
  236. package/vendor/antd/es/app/App.js +7 -3
  237. package/vendor/antd/es/auto-complete/AutoComplete.js +7 -8
  238. package/vendor/antd/es/avatar/Avatar.js +5 -3
  239. package/vendor/antd/es/back-top/index.js +1 -0
  240. package/vendor/antd/es/badge/Badge.js +5 -6
  241. package/vendor/antd/es/badge/Ribbon.js +1 -2
  242. package/vendor/antd/es/badge/style/index.js +4 -3
  243. package/vendor/antd/es/border-beam/BorderBeam.js +42 -0
  244. package/vendor/antd/es/border-beam/BorderBeamEffect.js +24 -0
  245. package/vendor/antd/es/border-beam/hooks/useBorderSize.js +37 -0
  246. package/vendor/antd/es/border-beam/hooks/useChildDom.js +24 -0
  247. package/vendor/antd/es/border-beam/index.js +7 -0
  248. package/vendor/antd/es/border-beam/style/index.js +60 -0
  249. package/vendor/antd/es/border-beam/util.js +26 -0
  250. package/vendor/antd/es/breadcrumb/Breadcrumb.js +1 -2
  251. package/vendor/antd/es/breadcrumb/BreadcrumbItem.js +1 -1
  252. package/vendor/antd/es/breadcrumb/useItemRender.js +3 -2
  253. package/vendor/antd/es/button/Button.js +7 -6
  254. package/vendor/antd/es/button/buttonHelpers.js +4 -8
  255. package/vendor/antd/es/button/index.js +2 -2
  256. package/vendor/antd/es/button/style/index.js +5 -0
  257. package/vendor/antd/es/calendar/generateCalendar.js +20 -8
  258. package/vendor/antd/es/card/Card.js +5 -7
  259. package/vendor/antd/es/card/CardMeta.js +1 -2
  260. package/vendor/antd/es/carousel/index.js +2 -1
  261. package/vendor/antd/es/cascader/Panel.js +1 -1
  262. package/vendor/antd/es/cascader/index.js +23 -16
  263. package/vendor/antd/es/cascader/style/columns.js +6 -2
  264. package/vendor/antd/es/checkbox/Checkbox.js +2 -3
  265. package/vendor/antd/es/checkbox/Group.js +2 -1
  266. package/vendor/antd/es/checkbox/style/index.js +1 -5
  267. package/vendor/antd/es/checkbox/useBubbleLock.js +1 -0
  268. package/vendor/antd/es/collapse/Collapse.js +3 -3
  269. package/vendor/antd/es/collapse/style/index.js +1 -4
  270. package/vendor/antd/es/color-picker/ColorPicker.js +1 -2
  271. package/vendor/antd/es/color-picker/ColorPickerPanel.js +2 -1
  272. package/vendor/antd/es/color-picker/components/ColorTrigger.js +3 -1
  273. package/vendor/antd/es/color-picker/components/PanelPicker/index.js +1 -0
  274. package/vendor/antd/es/config-provider/hooks/useSize.js +3 -2
  275. package/vendor/antd/es/config-provider/hooks/useTheme.js +2 -0
  276. package/vendor/antd/es/config-provider/index.js +11 -3
  277. package/vendor/antd/es/date-picker/generatePicker/generateRangePicker.js +20 -10
  278. package/vendor/antd/es/date-picker/generatePicker/generateSinglePicker.js +17 -8
  279. package/vendor/antd/es/date-picker/generatePicker/useSuffixIcon.js +1 -1
  280. package/vendor/antd/es/date-picker/hooks/useMergedPickerSemantic.js +1 -2
  281. package/vendor/antd/es/date-picker/style/index.js +13 -3
  282. package/vendor/antd/es/date-picker/style/multiple.js +3 -4
  283. package/vendor/antd/es/date-picker/style/panel.js +5 -20
  284. package/vendor/antd/es/date-picker/util.js +14 -13
  285. package/vendor/antd/es/descriptions/Cell.js +2 -3
  286. package/vendor/antd/es/descriptions/hooks/useItems.js +2 -1
  287. package/vendor/antd/es/descriptions/index.js +3 -3
  288. package/vendor/antd/es/divider/index.js +3 -2
  289. package/vendor/antd/es/drawer/Drawer.js +10 -5
  290. package/vendor/antd/es/drawer/DrawerPanel.js +3 -2
  291. package/vendor/antd/es/dropdown/dropdown.js +11 -8
  292. package/vendor/antd/es/dropdown/style/index.js +2 -6
  293. package/vendor/antd/es/empty/index.js +1 -2
  294. package/vendor/antd/es/flex/index.js +2 -2
  295. package/vendor/antd/es/float-button/BackTop.js +1 -0
  296. package/vendor/antd/es/float-button/FloatButton.js +3 -3
  297. package/vendor/antd/es/float-button/FloatButtonGroup.js +2 -2
  298. package/vendor/antd/es/form/ErrorList.js +13 -6
  299. package/vendor/antd/es/form/Form.js +7 -6
  300. package/vendor/antd/es/form/FormItem/ItemHolder.js +1 -1
  301. package/vendor/antd/es/form/FormItem/index.js +6 -6
  302. package/vendor/antd/es/form/FormItemInput.js +5 -3
  303. package/vendor/antd/es/form/FormItemLabel.js +2 -1
  304. package/vendor/antd/es/form/FormList.js +1 -0
  305. package/vendor/antd/es/form/hooks/useChildren.js +4 -3
  306. package/vendor/antd/es/form/hooks/useForm.js +3 -1
  307. package/vendor/antd/es/form/hooks/useFrameState.js +1 -0
  308. package/vendor/antd/es/form/hooks/useItemRef.js +7 -5
  309. package/vendor/antd/es/form/style/index.js +1 -3
  310. package/vendor/antd/es/grid/col.js +5 -7
  311. package/vendor/antd/es/grid/hooks/useBreakpoint.js +1 -0
  312. package/vendor/antd/es/grid/hooks/useGutter.js +2 -1
  313. package/vendor/antd/es/grid/row.js +7 -6
  314. package/vendor/antd/es/image/PreviewGroup.js +1 -2
  315. package/vendor/antd/es/image/Progress.js +58 -0
  316. package/vendor/antd/es/image/hooks/useMergedPreviewConfig.js +3 -1
  317. package/vendor/antd/es/image/hooks/usePlaceholderConfig.js +15 -0
  318. package/vendor/antd/es/image/hooks/usePreviewConfig.js +3 -2
  319. package/vendor/antd/es/image/index.js +36 -5
  320. package/vendor/antd/es/image/style/index.js +114 -4
  321. package/vendor/antd/es/image/style/progressAnimation.js +26 -0
  322. package/vendor/antd/es/index.js +2 -1
  323. package/vendor/antd/es/input/Input.js +9 -4
  324. package/vendor/antd/es/input/OTP/OTPInput.js +1 -0
  325. package/vendor/antd/es/input/OTP/index.js +3 -3
  326. package/vendor/antd/es/input/Password.js +45 -26
  327. package/vendor/antd/es/input/Search.js +6 -5
  328. package/vendor/antd/es/input/TextArea.js +13 -7
  329. package/vendor/antd/es/input/style/index.js +17 -11
  330. package/vendor/antd/es/input/style/otp.js +2 -1
  331. package/vendor/antd/es/input/style/variants.js +16 -10
  332. package/vendor/antd/es/input-number/index.js +3 -3
  333. package/vendor/antd/es/input-number/style/index.js +9 -9
  334. package/vendor/antd/es/layout/Sider.js +3 -2
  335. package/vendor/antd/es/list/index.js +5 -3
  336. package/vendor/antd/es/locale/en_US.js +3 -1
  337. package/vendor/antd/es/locale/ru_RU.js +3 -1
  338. package/vendor/antd/es/locale/useLocale.js +2 -1
  339. package/vendor/antd/es/masonry/Masonry.js +4 -3
  340. package/vendor/antd/es/mentions/index.js +28 -14
  341. package/vendor/antd/es/menu/MenuItem.js +2 -1
  342. package/vendor/antd/es/menu/OverrideContext.js +1 -0
  343. package/vendor/antd/es/menu/SubMenu.js +1 -1
  344. package/vendor/antd/es/menu/menu.js +5 -5
  345. package/vendor/antd/es/menu/style/index.js +21 -36
  346. package/vendor/antd/es/menu/style/vertical.js +2 -1
  347. package/vendor/antd/es/message/PureList.js +49 -0
  348. package/vendor/antd/es/message/PurePanel.js +28 -36
  349. package/vendor/antd/es/message/index.js +6 -3
  350. package/vendor/antd/es/message/style/index.js +102 -99
  351. package/vendor/antd/es/message/useMessage.js +29 -33
  352. package/vendor/antd/es/message/util.js +1 -1
  353. package/vendor/antd/es/modal/ConfirmDialog.js +11 -9
  354. package/vendor/antd/es/modal/Modal.js +12 -7
  355. package/vendor/antd/es/modal/PurePanel.js +1 -2
  356. package/vendor/antd/es/modal/confirm.js +4 -3
  357. package/vendor/antd/es/modal/shared.js +3 -2
  358. package/vendor/antd/es/modal/useModal/HookModal.js +2 -1
  359. package/vendor/antd/es/notification/PureList.js +46 -0
  360. package/vendor/antd/es/notification/PurePanel.js +37 -56
  361. package/vendor/antd/es/notification/hooks/useStackConfig.js +13 -0
  362. package/vendor/antd/es/notification/index.js +3 -1
  363. package/vendor/antd/es/notification/style/index.js +103 -170
  364. package/vendor/antd/es/notification/style/notification.js +191 -0
  365. package/vendor/antd/es/notification/style/placement.js +117 -60
  366. package/vendor/antd/es/notification/useNotification.js +37 -40
  367. package/vendor/antd/es/notification/util.js +9 -50
  368. package/vendor/antd/es/pagination/Pagination.js +1 -2
  369. package/vendor/antd/es/pagination/useShowSizeChanger.js +2 -1
  370. package/vendor/antd/es/popconfirm/PurePanel.js +4 -1
  371. package/vendor/antd/es/popconfirm/index.js +1 -2
  372. package/vendor/antd/es/popover/PurePanel.js +1 -2
  373. package/vendor/antd/es/popover/index.js +1 -2
  374. package/vendor/antd/es/progress/Circle.js +2 -1
  375. package/vendor/antd/es/progress/progress.js +3 -3
  376. package/vendor/antd/es/progress/utils.js +4 -3
  377. package/vendor/antd/es/qr-code/index.js +4 -4
  378. package/vendor/antd/es/radio/group.js +4 -3
  379. package/vendor/antd/es/radio/radio.js +2 -2
  380. package/vendor/antd/es/radio/style/index.js +1 -1
  381. package/vendor/antd/es/rate/index.js +2 -4
  382. package/vendor/antd/es/result/index.js +6 -5
  383. package/vendor/antd/es/result/style/index.js +10 -6
  384. package/vendor/antd/es/segmented/index.js +5 -3
  385. package/vendor/antd/es/select/index.js +23 -12
  386. package/vendor/antd/es/select/style/dropdown.js +1 -1
  387. package/vendor/antd/es/select/style/select-input.js +23 -15
  388. package/vendor/antd/es/select/useIcons.js +43 -26
  389. package/vendor/antd/es/skeleton/Element.js +2 -1
  390. package/vendor/antd/es/skeleton/Skeleton.js +3 -3
  391. package/vendor/antd/es/slider/SliderTooltip.js +1 -0
  392. package/vendor/antd/es/slider/index.js +5 -3
  393. package/vendor/antd/es/slider/useRafLock.js +1 -0
  394. package/vendor/antd/es/space/Compact.js +1 -1
  395. package/vendor/antd/es/space/Item.js +1 -1
  396. package/vendor/antd/es/space/index.js +2 -2
  397. package/vendor/antd/es/space/style/addon.js +5 -2
  398. package/vendor/antd/es/spin/Indicator/Progress.js +2 -1
  399. package/vendor/antd/es/spin/index.js +1 -2
  400. package/vendor/antd/es/splitter/Panel.js +7 -3
  401. package/vendor/antd/es/splitter/SplitBar.js +5 -4
  402. package/vendor/antd/es/splitter/Splitter.js +9 -6
  403. package/vendor/antd/es/splitter/hooks/useItems.js +2 -1
  404. package/vendor/antd/es/splitter/hooks/useSizes.js +1 -1
  405. package/vendor/antd/es/splitter/style/index.js +8 -6
  406. package/vendor/antd/es/statistic/Number.js +8 -4
  407. package/vendor/antd/es/statistic/Statistic.js +14 -10
  408. package/vendor/antd/es/steps/index.js +4 -4
  409. package/vendor/antd/es/style/compact-item-vertical.js +2 -1
  410. package/vendor/antd/es/style/compact-item.js +6 -6
  411. package/vendor/antd/es/switch/index.js +1 -2
  412. package/vendor/antd/es/table/InternalTable.js +23 -14
  413. package/vendor/antd/es/table/hooks/useFilledColumns.js +23 -0
  414. package/vendor/antd/es/table/hooks/useFilter/FilterDropdown.js +22 -16
  415. package/vendor/antd/es/table/hooks/useFilter/FilterWrapper.js +1 -0
  416. package/vendor/antd/es/table/hooks/useFilter/index.js +34 -18
  417. package/vendor/antd/es/table/hooks/useLazyKVMap.js +2 -1
  418. package/vendor/antd/es/table/hooks/usePagination.js +7 -4
  419. package/vendor/antd/es/table/hooks/useSelection.js +32 -21
  420. package/vendor/antd/es/table/hooks/useSorter.js +10 -5
  421. package/vendor/antd/es/table/style/bordered.js +5 -27
  422. package/vendor/antd/es/table/style/empty.js +1 -4
  423. package/vendor/antd/es/table/style/index.js +1 -4
  424. package/vendor/antd/es/table/util.js +6 -6
  425. package/vendor/antd/es/tabs/hooks/useAnimateConfig.js +2 -1
  426. package/vendor/antd/es/tabs/index.js +1 -2
  427. package/vendor/antd/es/tag/CheckableTagGroup.js +8 -5
  428. package/vendor/antd/es/tag/hooks/useColor.js +4 -3
  429. package/vendor/antd/es/tag/index.js +13 -7
  430. package/vendor/antd/es/theme/themes/dark/colors.js +2 -1
  431. package/vendor/antd/es/theme/themes/default/colors.js +2 -1
  432. package/vendor/antd/es/theme/useToken.js +2 -2
  433. package/vendor/antd/es/theme/util/alias.js +34 -29
  434. package/vendor/antd/es/timeline/Timeline.js +3 -4
  435. package/vendor/antd/es/tooltip/PurePanel.js +1 -2
  436. package/vendor/antd/es/tooltip/UniqueProvider/index.js +2 -1
  437. package/vendor/antd/es/tooltip/index.js +9 -7
  438. package/vendor/antd/es/tour/PurePanel.js +2 -2
  439. package/vendor/antd/es/tour/index.js +1 -1
  440. package/vendor/antd/es/tour/panelRender.js +4 -2
  441. package/vendor/antd/es/transfer/ListBody.js +3 -1
  442. package/vendor/antd/es/transfer/ListItem.js +2 -1
  443. package/vendor/antd/es/transfer/Section.js +17 -8
  444. package/vendor/antd/es/transfer/index.js +51 -16
  445. package/vendor/antd/es/transfer/style/index.js +5 -1
  446. package/vendor/antd/es/tree/Tree.js +1 -2
  447. package/vendor/antd/es/tree/style/index.js +5 -1
  448. package/vendor/antd/es/tree/utils/iconUtil.js +5 -4
  449. package/vendor/antd/es/tree-select/index.js +3 -3
  450. package/vendor/antd/es/typography/Base/CopyBtn.js +3 -2
  451. package/vendor/antd/es/typography/Base/Ellipsis.js +3 -3
  452. package/vendor/antd/es/typography/Base/index.js +38 -31
  453. package/vendor/antd/es/typography/Editable.js +10 -4
  454. package/vendor/antd/es/typography/Link.js +1 -0
  455. package/vendor/antd/es/typography/Text.js +2 -1
  456. package/vendor/antd/es/typography/Typography.js +20 -10
  457. package/vendor/antd/es/typography/hooks/useCopyClick.js +2 -1
  458. package/vendor/antd/es/typography/hooks/useMergedConfig.js +13 -7
  459. package/vendor/antd/es/typography/hooks/useTooltipProps.js +2 -1
  460. package/vendor/antd/es/typography/hooks/useTypographySemantic.js +33 -0
  461. package/vendor/antd/es/typography/style/index.js +12 -27
  462. package/vendor/antd/es/typography/style/mixins.js +46 -13
  463. package/vendor/antd/es/upload/Upload.js +13 -7
  464. package/vendor/antd/es/upload/UploadList/ListItem.js +6 -5
  465. package/vendor/antd/es/upload/UploadList/index.js +4 -3
  466. package/vendor/antd/es/upload/utils.js +18 -1
  467. package/vendor/antd/es/version/version.js +1 -1
  468. package/vendor/antd/es/watermark/index.js +6 -4
  469. package/vendor/antd/es/watermark/useSingletonCache.js +1 -0
  470. package/vendor/antd/es/watermark/useWatermark.js +3 -3
  471. package/vendor/antd/package.json +1 -1
  472. package/vendor/useblocks-ui-kit/es/components/DataEntry/Input/index.js +1 -1
  473. package/vendor/useblocks-ui-kit/es/components/General/EmIcons/deprecationNotice.js +1 -1
  474. package/vendor/useblocks-ui-kit/package.json +1 -1
  475. package/vite/index.cjs +2 -2
  476. package/vite/index.js +2 -2
  477. package/iframe/js/discussHandlers.ozU2Hn_l.js +0 -87
  478. package/iframe/js/iframe.body.js +0 -319
  479. package/static/core/1c535081.js +0 -1
  480. package/static/core/1cee0d36.js +0 -1
  481. package/static/core/4fbdd8b6.js +0 -2
  482. package/static/core/55a38638.js +0 -93
  483. package/static/core/605c665e.js +0 -28
  484. package/static/core/68cbe23d.js +0 -1
  485. package/static/core/89431649.js +0 -7
  486. package/static/core/8b821a61.js +0 -1
  487. package/static/core/9718977a.js +0 -1
  488. package/static/core/b7e9202e.js +0 -27
  489. package/static/core/b877f7b4.js +0 -1
  490. package/static/core/baded0c1.js +0 -1
  491. package/static/core/c6cc104d.js +0 -4
  492. package/static/core/d70aac44.js +0 -291
  493. package/static/core/e0d71533.js +0 -100
  494. package/static/core/fb57f60b.js +0 -1
  495. package/static/core/fe756e4d.js +0 -1
  496. package/static/esm/349f9e2c.js +0 -1
  497. package/static/esm/50fbfdf6.js +0 -1
  498. package/static/media/icon-sets/lucide.json +0 -6275
  499. package/static/media/icon-sets/tabler.json +0 -19336
  500. package/static/umd-runtime/Cl8heeC3.js +0 -1
  501. package/static/umd-runtime/D0xo8o9c.js +0 -335
  502. package/static/umd-runtime/runtime.js +0 -1
  503. package/useblocks-core.bb6d921f.js +0 -859
  504. package/vendor/@rc-component/notification/es/Notice.js +0 -106
  505. package/vendor/@rc-component/notification/es/NoticeList.js +0 -98
  506. package/vendor/@rc-component/textarea/LICENSE.md +0 -9
  507. package/vendor/@rc-component/textarea/es/index.js +0 -6
  508. package/vendor/@rc-component/textarea/package.json +0 -6
  509. package/vendor/antd/es/_util/extendsObject.js +0 -12
  510. package/vendor/antd/es/_util/getAllowClear.js +0 -12
  511. package/vendor/antd/es/_util/isNonNullable.js +0 -6
  512. package/vendor/antd/es/_util/isPrimitive.js +0 -4
  513. package/vendor/antd/es/notification/style/pure-panel.js +0 -18
  514. package/vendor/antd/es/notification/style/stack.js +0 -85
  515. /package/static/monaco/{index.js → index.CO7s5UdA.js} +0 -0
  516. /package/static/umd-runtime/{delivery-libs.js → delivery-libs.3Svr0avG.js} +0 -0
@@ -1,87 +0,0 @@
1
- __useblocks__.define("js/discussHandlers.ozU2Hn_l.js",["require","exports","module","js/rolldown-runtime.BRlIiq3h.js"],function(Eo,_,QN){const F=Eo("./rolldown-runtime.BRlIiq3h.js");function Ir(e){"@babel/helpers - typeof";return Ir=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ir(e)}function ep(e,t){if(Ir(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(Ir(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function tp(e){var t=ep(e,"string");return Ir(t)=="symbol"?t:t+""}function k(e,t,r){return(t=tp(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var gl;gl=Symbol.toStringTag;var _o=class{constructor(){k(this,"_valuesMap",new Map),k(this,gl,"Storage")}getItem(e){const t=String(e);return this._valuesMap.has(e)?String(this._valuesMap.get(t)):null}setItem(e,t){this._valuesMap.set(String(e),String(t))}removeItem(e){this._valuesMap.delete(e)}clear(){this._valuesMap.clear()}key(e){if(arguments.length===0)throw new TypeError("Failed to execute 'key' on 'Storage': 1 argument required, but only 0 present.");return Array.from(this._valuesMap.keys())[e]}get length(){return this._valuesMap.size}};function bl(){const e=new _o;return new Proxy(e,{set:function(t,r,n){return typeof r=="string"&&_o.prototype.hasOwnProperty(r)?e[r]=n:typeof r=="string"&&e.setItem(r,String(n)),!0},get:function(t,r){if(typeof r=="string"){if(_o.prototype.hasOwnProperty(r)){const n=e[r];if(typeof n=="function"){const i=n;return(...o)=>i.apply(e,o)}return n}return e.getItem(r)}}})}function yl(){const e=bl(),t=bl();Object.defineProperty(window,"localStorage",{configurable:!0,enumerable:!0,get:()=>e}),Object.defineProperty(window,"sessionStorage",{configurable:!0,enumerable:!0,get:()=>t});let r=Object.create(null);Object.defineProperty(document,"cookie",{enumerable:!1,configurable:!0,get(){const n=[];for(var i in r)n.push(i+"="+r[i]);return n.join(";")},set(n){const i=n.indexOf("=");var o=n.substr(0,i),s=n.substring(i+1);return r[o]=s,o+"="+s}}),Object.defineProperty(document,"clearCookies",{enumerable:!1,configurable:!0,value:()=>r=Object.create(null)})}yl();function So(e,t){if(e===t)return!0;if(!e||!t||typeof e!="object"||typeof t!="object")return!1;const r=Array.isArray(e);if(r!==Array.isArray(t))return!1;if(r){const o=e,s=t;return o.length===s.length&&o.every((a,l)=>So(a,s[l]))}const n=Object.keys(e),i=Object.keys(t);return n.length!==i.length?!1:n.every(o=>Object.prototype.hasOwnProperty.call(t,o)&&So(e[o],t[o]))}function vl(e,t){const r={watch(n){let i,o=!1;return e.watch(s=>{const a=t(s);o&&So(i,a)||(i=a,o=!0,n(a))})},select(n){return vl(r,n)}};return r}function rp(...e){let t=e[0],r=e.length>0;const n=new Set,i={get(){return r?t:void 0},set(o){t=o,r=!0;for(const s of Array.from(n))s(o)},watch(o){return n.add(o),r&&o(t),{dispose:()=>n.delete(o)}},select(o){return vl(i,o)}};return i}var Z=class Ym{constructor(t=[]){k(this,"_inner",void 0),k(this,"_isDisposed",!1),this._inner=t}addDisposable(t){return this._inner.push(t),t instanceof Ym&&t.addDispose(()=>{this.removeDisposable(t)}),t}addDispose(t){this.addDisposable({dispose:t})}removeDisposable(t){const r=this._inner.indexOf(t);r>=0&&this._inner.splice(r,1)}isDisposed(){return this._isDisposed}dispose(){if(!this._isDisposed){this._isDisposed=!0;for(const t of[...this._inner])t.dispose()}}};function wo(e){return`service_container_${e}`}var Br=new Set,Co;function np(){if(!Co)return;const e=new Error("getInstanceAsync"),t=Error;return typeof t.captureStackTrace=="function"&&t.captureStackTrace(e,El.prototype.getInstanceAsync),e.stack}function Ao(e){Br.delete(e)&&Co?.end(e)}var El=class pl extends Z{_runCallbacks(t){this._injectCallbacks.forEach(r=>r(t))}constructor(t=null){super(),k(this,"_parent",void 0),k(this,"_injectCallbacks",[]),k(this,"_injections",Object.create(null)),k(this,"onInject",r=>(this._injectCallbacks.push(r),{dispose:()=>{const n=this._injectCallbacks.indexOf(r);n>=0&&this._injectCallbacks.splice(n,1)}})),this._parent=t,t&&this.addDisposable(t.onInject(r=>this._runCallbacks(r)))}inject(t,r){this._injections[t]=()=>r,this._runCallbacks(t)}injectFactory(t,r,n){const i=this._injections[t];let o=typeof i=="function"?i():i;const s=this._injections[t]=()=>(o=r(this,o),o);n&&s(),this._runCallbacks(t)}_find(t,r=!0){return this._injections[t]||r&&this._parent?._find(t)}_onInject(t,r,n=new Z){return n.addDisposable(this.onInject(i=>{t===i&&(n.dispose(),r(this.getInstance(i)))})),this._parent&&n.addDisposable(this._parent._onInject(t,r,n)),this.addDisposable(n),n}getInstance(t,r=!0){const n=this._find(t,r);if(typeof n=="function")return n()}getOrCreateInstance(t,r){const n=this._find(t);if(typeof n=="function")return n();const i=r(this);return this.inject(t,i),i}getInstanceAsync(t){const r=this._find(t);if(typeof r=="function")return Promise.resolve(r());const n=np();return new Promise((i,o)=>{const s={id:String(t),startedAt:Date.now(),origin:n,container:this,reject:o};Br.add(s),Co?.start(s),this._onInject(t,()=>{Ao(s),i(this.getInstance(t))})})}failPendingWaits(t){for(const r of Array.from(Br))r.container===this&&(Ao(r),r.reject(t))}pendingWaits(){return[...Br].filter(t=>t.container===this)}addService(t,r){const n=wo(t);this.injectFactory(n,(o,s=[])=>s.indexOf(r)<0?[...s,r]:s);const i=new Z;return i.addDispose(()=>{this.injectFactory(n,(o,s=[])=>s.filter(a=>a!==r))}),i}addServiceFactory(t,r,n){const i=wo(t);let o;this.injectFactory(i,(a,l=[])=>(o=r(a,o),o===void 0?l:l.indexOf(o)<0?[...l,o]:l),n);const s=new Z;return s.addDispose(()=>{this.injectFactory(i,(a,l=[])=>o===void 0?l:l.filter(c=>c!==o))}),s}getServices(t){const r=wo(t);return[...this.getInstance(r,!1)||[],...this._parent?.getServices(t)||[]]}createChild(){return new pl(this)}getOrCreateIsolatedContainer(t){return this.getOrCreateInstance(t,()=>{const r=this._parent?.getOrCreateIsolatedContainer(t);return new pl(r)})}remove(t){const r=this._injections;delete r[String(t)]}injectListenerCount(){return this._injectCallbacks.length}dispose(){for(const t of Array.from(Br))t.container===this&&Ao(t);this._injections=Object.create(null),this._injectCallbacks=[],super.dispose()}};function To(e){return e.startsWith("__")?e:`__${e}__`}function ip(e){if(typeof globalThis>"u")throw new Error("[di] globalThis is required for namespace container access.");const t=To(e),r=globalThis;return r[t]??(r[t]={})}function op(e){return e!=null&&typeof e=="object"&&typeof e.inject=="function"&&typeof e.getInstance=="function"}function sp(e){if(e)return To(e);const t="useblocks".trim();if(!t)throw new Error("[di] REACT_APP_NAME is required for resolveContainer().");return To(t)}function ko(e){const t=sp(e),r=ip(t);if(op(r.container))return r.container;const n=new El(null);return r.container=n,n}function ap(){let e=new Date().getTime(),t=typeof performance<"u"&&performance.now&&performance.now()*1e3||0;return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(r){let n=Math.random()*16;return e>0?(n=(e+n)%16|0,e=Math.floor(e/16)):(n=(t+n)%16|0,t=Math.floor(t/16)),(r==="x"?n:n&3|8).toString(16)})}function lp(){return typeof crypto<"u"&&typeof crypto.randomUUID=="function"?crypto.randomUUID():ap()}function ge(e=lp()){return e}function _l(){return"iframe".trim()||"unknown"}function cp(e){if(typeof globalThis>"u")return;const t=_l(),r=globalThis[e]??{};globalThis[e]=r;const n=r.__diagnostics??(r.__diagnostics={}),i=n.diModuleEval??(n.diModuleEval={evalCount:0,records:[]});i.records.push({buildSource:t,timestamp:Date.now(),stack:new Error().stack}),i.evalCount+=1}function up(){const e="useblocks".trim();if(!e)throw new Error("[di] REACT_APP_NAME is required for DependencyResolver diagnostics.");return`__${e}__`}function dp(e,t){if(cp(t),typeof globalThis>"u")return e;const r=_l(),n=globalThis,i=n[t]=n[t]||{},o=i.__diagnostics=i.__diagnostics||{},s=o.dependencyResolver=o.dependencyResolver||{entries:[]},a={container:e,source:"packages/runtime-core/di/index.ts",buildSource:r,timestamp:Date.now(),stack:new Error().stack};return s.entries.push(a),e}var jn;function fp(){if(jn)return jn;const e=up();return jn=dp(ko(e),e),jn}var ZN=new Proxy({},{get(e,t,r){const n=fp(),i=Reflect.get(n,t,r);return typeof i=="function"?i.bind(n):i}}),hp=new Function("url","return import(url)");function mp(e){if(typeof e!="function")return!1;try{return Reflect.construct(String,[],e),!0}catch{return!1}}function pp(e){return typeof e=="object"&&e!==null&&"type"in e&&"url"in e}function gp(e){return e.type==="umd"||e.resolve==="registry"}function JN(e){return e}var bp=class{constructor(e,t,r={}){k(this,"_context",void 0),k(this,"_pluginRegistry",void 0),k(this,"_options",void 0),k(this,"_map",new Map),k(this,"_optionsMap",new Map),k(this,"_readyMap",new Map),k(this,"_resolveMap",new Map),k(this,"_initializingPlugins",new Map),k(this,"_creatingPlugins",new Set),k(this,"_initializedPlugins",new Set),k(this,"_creationOrder",[]),k(this,"_lifecycleListeners",new Set),k(this,"_activated",!1),this._context=e,this._pluginRegistry=t,this._options=r}activate(){return this._activated=!0,this._startPluginsBatch(Array.from(this._map.values()))}activateSync(){this._activated=!0,this._startPluginsBatch(Array.from(this._map.values()))}onLifecycle(e){return this._lifecycleListeners.add(e),{dispose:()=>this._lifecycleListeners.delete(e)}}_emitLifecycle(e){for(const t of Array.from(this._lifecycleListeners))try{t(e)}catch{}}async _resolveEntry(e){if(typeof e=="string"||typeof e=="symbol"){const t=await this._pluginRegistry.getAsync(e);if(!t)throw new Error(`Plugin "${String(e)}" not registered.`);return{ctor:t}}if(typeof e=="function")return e.length===0?{ctor:await e()}:{ctor:e};if(Array.isArray(e)){const[t,r]=e;if(typeof t=="function")return{ctor:t,options:r};const n=await this._pluginRegistry.getAsync(t);if(!n)throw new Error(`Plugin "${String(t)}" not registered.`);return{ctor:n,options:r}}if(pp(e))return this._resolveDescriptor(e);throw new Error(`Unknown plugin entry format: ${JSON.stringify(e)}`)}async _resolveDescriptor(e){const t=e.resolve??(e.type==="umd"?"window":"module");if(gp(e)&&await this._options.ensureHostRuntimeReady?.(e),e.type==="esm"){const r=await hp(e.url);if(t==="module")return{ctor:r.default??r};if(t==="registry"&&e.name){const n=await this._pluginRegistry.getAsync(e.name);if(!n)throw new Error(`Plugin "${e.name}" not found in registry after ESM load`);return{ctor:n}}}if(e.type==="umd"){if(await this._loadScript(e.url),t==="window"&&e.name){const r=globalThis[e.name];if(!r)throw new Error(`Plugin "${e.name}" not found on window after script load`);return{ctor:r}}if(t==="registry"&&e.name){const r=await this._pluginRegistry.getAsync(e.name);if(!r)throw new Error(`Plugin "${e.name}" not found in registry after script load`);return{ctor:r}}}throw new Error(`Cannot resolve descriptor: type=${e.type}, resolve=${t}, name=${e.name??"none"}`)}_loadScript(e){return new Promise((t,r)=>{if(typeof document>"u"){r(new Error("Cannot load UMD script in non-browser environment"));return}const n=document.createElement("script");n.src=e,n.onload=()=>t(),n.onerror=()=>r(new Error(`Failed to load script: ${e}`)),document.head.appendChild(n)})}initSync(e){const t=[];for(const r of e){const n=this._getOrCreate(r,void 0);t.push(n)}this._activated=!0,this._startPluginsBatch(t)}async init(e){const t=[],r=new Set;for(const n of e){const{ctor:i,options:o}=await this._resolveEntry(n),s=this._getOrCreate(i,o);r.has(s)||(r.add(s),t.push(s))}this._activated=!0,await this._startPluginsBatch(t)}async setPlugins(e){const t=new Set,r=[];for(const s of e){const a=await this._resolveEntry(s);t.add(a.ctor),r.push(a)}const n=[];this._map.forEach((s,a)=>{t.has(a)||n.push({key:a,plugin:s})});for(let s=n.length-1;s>=0;s--){const{key:a,plugin:l}=n[s];await this._initializingPlugins.get(l),await this._disposePlugin(l,l.constructor.name),this._map.delete(a),this._optionsMap.delete(a),this._readyMap.delete(l),this._resolveMap.delete(l),this._initializingPlugins.delete(l),this._initializedPlugins.delete(l);const c=this._creationOrder.indexOf(l);c>=0&&this._creationOrder.splice(c,1)}const i=[],o=new Set;for(const{ctor:s,options:a}of r){const l=this._getOrCreate(s,a);o.has(l)||(o.add(l),i.push(l))}this._activated&&await this._startPluginsBatch(i)}isReady(e){return this._initializedPlugins.has(e)}ready(e){return this._initializingPlugins.get(e)??this._readyMap.get(e)??Promise.resolve()}async waitFor(e,t){if(this._pluginRegistry.has(e))return this.useByKeyAsync(e);const{timeout:r}=t??{};return await new Promise((n,i)=>{let o,s=!1;const a=()=>{s||(s=!0,o&&clearTimeout(o),this._pluginRegistry.off(e,a),n())};this._pluginRegistry.on(e,a),r!==void 0&&r>0&&(o=setTimeout(()=>{s||(s=!0,this._pluginRegistry.off(e,a),i(new Error(`waitFor("${String(e)}") timed out after ${r}ms`)))},r))}),this.useByKeyAsync(e)}useByKey(e){const t=this._pluginRegistry.get(e);if(!t)throw new Error(`Plugin "${String(e)}" not registered or not loaded yet. Use useByKeyAsync() for async plugins.`);const r=this._getOrCreate(t);return this._activated&&this._startPluginsBatch([r]),r}async useByKeyAsync(e){const t=await this._pluginRegistry.getAsync(e);if(!t)throw new Error(`Plugin "${String(e)}" not registered.`);const r=this._getOrCreate(t);return this._activated&&await this._startPluginsBatch([r]),r}useByCtor(e,t){const r=this._getOrCreate(e,t);return this._activated&&this._startPluginsBatch([r]),r}use(e){return typeof e=="function"?this.useByCtor(e):this.useByKey(e)}async useAsync(e){const{ctor:t,options:r}=await this._resolveEntry(e),n=this._getOrCreate(t,r);return this._activated&&await this._startPluginsBatch([n]),n}_getOrCreate(e,t){const r=e;if(!this._map.has(r)){t!==void 0&&this._optionsMap.set(r,t);const n=this._optionsMap.get(r),i=this._createPluginInstance(e,n),o=i.constructor.name;this._emitLifecycle({type:"created",plugin:i,name:o}),i.required?.(),this._map.set(r,i),this._creationOrder.push(i),this._setupReadyPromise(i)}return this._map.get(r)}_createPluginInstance(e,t){const r=e;if(this._creatingPlugins.has(r))throw new Error(`Cyclic dependency for plugin ${e.name}`);this._creatingPlugins.add(r);try{return mp(e)?new e(this._context,t):e(this._context,t)||{}}finally{this._creatingPlugins.delete(r)}}_setupReadyPromise(e){const t=new Promise(r=>{this._resolveMap.set(e,r)});this._readyMap.set(e,t)}async _startPluginsBatch(e){const t=Array.from(new Set(e)),r=new Set,n=[];for(const i of t){if(this._initializedPlugins.has(i))continue;const o=this._initializingPlugins.get(i);if(o){r.add(o);continue}n.push(i)}if(n.length>0){const i=this._runBatchLifecycle(n);for(const o of n)this._initializingPlugins.set(o,i);r.add(i),i.finally(()=>{for(const o of n)this._initializingPlugins.get(o)===i&&this._initializingPlugins.delete(o)})}await Promise.all(r)}async _runBatchLifecycle(e){const t=[];for(const r of e){const n=r.constructor.name;this._emitLifecycle({type:"init:start",plugin:r,name:n});try{await r.init?.(),this._emitLifecycle({type:"init:success",plugin:r,name:n}),t.push(r)}catch(i){this._emitLifecycle({type:"init:error",plugin:r,name:n,error:i})}}for(const r of t){const n=r.constructor.name;this._emitLifecycle({type:"afterInit:start",plugin:r,name:n});try{await r.afterInit?.(),this._emitLifecycle({type:"afterInit:success",plugin:r,name:n})}catch(i){this._emitLifecycle({type:"afterInit:error",plugin:r,name:n,error:i})}}for(const r of e)this._initializedPlugins.add(r),this._resolveMap.get(r)?.(),this._resolveMap.delete(r)}async _disposePlugin(e,t){this._emitLifecycle({type:"dispose:start",plugin:e,name:t});try{await e.dispose?.(),this._emitLifecycle({type:"dispose:success",plugin:e,name:t})}catch(r){this._emitLifecycle({type:"dispose:error",plugin:e,name:t,error:r})}}async dispose(){for(let e=this._creationOrder.length-1;e>=0;e--){const t=this._creationOrder[e];await this._initializingPlugins.get(t),await this._disposePlugin(t,t.constructor.name)}this._map.clear(),this._optionsMap.clear(),this._readyMap.clear(),this._resolveMap.clear(),this._initializingPlugins.clear(),this._initializedPlugins.clear(),this._creationOrder.length=0,this._lifecycleListeners.clear()}getStatus(){return Array.from(this._map.values()).map(e=>({name:e.constructor.name,initialized:this._initializedPlugins.has(e)}))}},Sl=class{constructor(){k(this,"_plugins",new Map),k(this,"_listeners",new Map)}_getOrCreateEntry(e){let t=this._plugins.get(e);return t||(t={overrides:[]},this._plugins.set(e,t)),t}_applyOverrides(e,t){const r=this._plugins.get(e);if(r?.overrides)for(const n of r.overrides)t=n(t)||t;return t}_notifyListeners(e,t){const r=this._listeners.get(e);if(!r||r.length===0)return;for(const i of r)try{i.callback(t)}catch{}const n=r.filter(i=>!i.once);n.length>0?this._listeners.set(e,n):this._listeners.delete(e)}get(e){const t=this._plugins.get(e);if(t?.ctor)return this._applyOverrides(e,t.ctor)}async getAsync(e){const t=this._plugins.get(e);if(t?.ctor)return this._applyOverrides(e,t.ctor);if(t?.loading){const r=await t.loading;return this._applyOverrides(e,r)}if(t?.factory){const r=Promise.resolve(t.factory()).then(i=>(t.ctor=i,t.loading=void 0,this._notifyListeners(e,i),i));t.loading=r;const n=await r;return this._applyOverrides(e,n)}return new Promise(r=>{this.on(e,n=>r(this._applyOverrides(e,n)))})}add(e,t){const r=this._getOrCreateEntry(e);r.ctor=t,this._notifyListeners(e,t)}addAll(e){for(const t of Object.keys(e)){const r=e[t];r!==void 0&&this.add(t,r)}}addAsync(e,t){const r=this._getOrCreateEntry(e);return r.factory=t,{dispose:()=>{r.ctor||(r.factory=void 0)}}}has(e){const t=this._plugins.get(e);return!!(t?.ctor||t?.factory)}isLoaded(e){return!!this._plugins.get(e)?.ctor}override(e,t){const r=this._getOrCreateEntry(e);return r.overrides.push(t),{dispose:()=>{const n=r.overrides.indexOf(t);n>=0&&r.overrides.splice(n,1)}}}on(e,t){const r=this.get(e);r&&t(r);let n=this._listeners.get(e);n||(n=[],this._listeners.set(e,n));const i={callback:t,once:!1};return n.push(i),{dispose:()=>this._removeListener(e,t)}}once(e,t){const r=this.get(e);if(r)return t(r),{dispose:()=>{}};let n=this._listeners.get(e);n||(n=[],this._listeners.set(e,n));const i={callback:t,once:!0};return n.push(i),{dispose:()=>this._removeListener(e,t)}}off(e,t){this._removeListener(e,t)}_removeListener(e,t){const r=this._listeners.get(e);if(r){const n=r.findIndex(i=>i.callback===t);n>=0&&r.splice(n,1),r.length===0&&this._listeners.delete(e)}}keys(){return Array.from(this._plugins.keys())}forContext(){const e=this;return{add(t,r){e.add(t,r)}}}},yp=class{constructor(e){k(this,"resolveRegistry",void 0),this.resolveRegistry=e}target(){return this.resolveRegistry()}get(e){return this.target().get(e)}getAsync(e){return this.target().getAsync(e)}add(e,t){return this.target().add(e,t)}addAll(e){return this.target().addAll(e)}addAsync(e,t){return this.target().addAsync(e,t)}has(e){return this.target().has(e)}isLoaded(e){return this.target().isLoaded(e)}override(e,t){return this.target().override(e,t)}on(e,t){return this.target().on(e,t)}once(e,t){return this.target().once(e,t)}off(e,t){return this.target().off(e,t)}keys(){return this.target().keys()}forContext(){return this.target().forContext()}},wl=class extends Z{constructor(e={}){super(),k(this,"_options",void 0),k(this,"_listeners",[]),k(this,"on",this._addListener.bind(this)),k(this,"event",this._addListener.bind(this)),k(this,"once",(t,r=0,n)=>{const i=this._addListener((...o)=>(i?.dispose(),n?t.call(n,...o):t(...o)),r);return i}),k(this,"un",t=>{const r=this._listeners.findIndex(([n])=>n===t);r>=0&&(this._listeners.splice(r,1),this._listeners.length===0&&this._options.onLastListenerRemove&&this._options.onLastListenerRemove())}),this._options=e}getListeners(e){return this._listeners.flatMap(([t])=>typeof t=="function"?t:t.getListeners(e))}hasListeners(){for(const[e]of this._listeners){if(typeof e=="function")return!0;const t=e;if(typeof t.hasListeners=="function"){if(t.hasListeners())return!0;continue}return!0}return!1}_addListener(e,t=0,r){if(this.isDisposed())return{dispose:()=>{}};const n=this._listeners,i=this._options;r&&typeof e=="function"&&(e=e.bind(r));const o=n.findIndex(([,a])=>a<t),s=[e,t];return n.splice(o>=0?o:n.length,0,s),n.length===1&&i.onFirstListenerAdd&&i.onFirstListenerAdd(),{dispose:()=>{const a=n.indexOf(s);a>=0&&(n.splice(a,1),!n.length&&i.onLastListenerRemove&&i.onLastListenerRemove())}}}dispose(){this._listeners.splice(0,this._listeners.length),this._options.onLastListenerRemove&&this._options.onLastListenerRemove(),super.dispose()}},vp=class extends wl{execute(e,t){for(const r of t)try{r(...e)}catch{}}fire(...e){if(!this.isDisposed()){const t=this.execute(e,this.getListeners(e));return t===void 0?void 0:t}}},J=class extends vp{execute([e],t){for(const r of t)try{r(e)}catch{}}},Ep=class extends wl{fire(e){if(this.isDisposed())return;let t=!1,r=!1;const n={value:e,preventDefault(){t=!0},stopPropagation(){r=!0}},i=this.getListeners([n]);for(const o of i){if(r)break;try{o(n)}catch{}}return t?!1:void 0}};function _p(e,t,r){let n;const i=new J({onFirstListenerAdd(){n=i.addDisposable(new Z),n.addDisposable(e(o=>{t(o)!==!1&&i.fire(o)}))},onLastListenerRemove(){n?.dispose(),n=void 0}});return r?.addDisposable(i),i.event}var $n={lockEditorInit:!0,lockEdit:!1,lockEditor:!0,activeElementLocked:0,applicationTheme:"light",applicationMode:"default",previewHeight:0,emailWidth:0,previewPage:!1,globalHolder:null,elementPath:[],activeElementText:"",selectedElem:null,iframeOffsetTop:0,scrollTop:0,copyPasteEnabled:!0,saveBlockEnabled:!0,editImageControlEnabled:!0,elementAIimageEnabled:!0,imageCenterStockEnabled:!0,imageCenterGifEnabled:!0,imageCenterEditorEnabled:!0,blocksAddPanelEnabled:!0,codeMode:!0,appName:"",isLeftButtonDown:!1,isProgrammaticSelection:!1,isDirectionUP:!1,isDirectionDOWN:!1,isDirectionLEFT:!1,isDirectionRIGHT:!1,actualTargetCount:0,activeCell:[],commonStyles:{},loadStylesTimer:!1,_pushUndoStop:!1},Fr=rp({...$n});function Re(){return Fr.get()}var Hn=new J,Gt=new Map,_e={source:Fr,get(e){return Re()[e]},getState(){return{...Re()}},getStateRef(){return Re()},set(e,t){if(Re()[e]===t)return;Fr.set({...Re(),[e]:t}),Hn.fire({[e]:t});const r=Gt.get(e);r&&r.forEach(n=>n(t))},update(e){let t=!1;const r={};for(const n of Object.keys(e)){const i=e[n];if(Re()[n]!==i){Fr.set({...Re(),[n]:i}),r[n]=i,t=!0;const o=Gt.get(n);o&&o.forEach(s=>s(i))}}t&&Hn.fire(r)},increment(e,t=1){const r=Re()[e];typeof r=="number"&&_e.set(e,r+t)},decrement(e,t=1){const r=Re()[e];typeof r=="number"&&_e.set(e,r-t)},subscribe(e){return Hn.event(e)},subscribeToKey(e,t){Gt.has(e)||Gt.set(e,new Set);const r=Gt.get(e),n=t;return r.add(n),()=>{r.delete(n),r.size===0&&Gt.delete(e)}},reset(){Fr.set({...$n}),Hn.fire(Re())},resetKey(e){this.set(e,$n[e])},isEditingLocked(){const e=Re();return e.lockEdit||e.lockEditor||e.lockEditorInit},isActiveElementLocked(){return Re().activeElementLocked>0},getInitialState(){return $n}},zn=e=>e?.trim().replaceAll(/[\s\u00A0]+/g," ").replaceAll(/\n/g,"");function Cl(e){let t=e;for(;t;){if(t.tagName==="TR")return t;t=t.parentElement}return null}function Tt(e,t){return Array.from(e.classList).find(r=>r.includes(t))}function Al(e){return!e||!e.childNodes?!1:Array.from(e.childNodes).every(t=>t.nodeType===Node.TEXT_NODE?(t.textContent?.trim()??"")!=="":t.nodeType===Node.ELEMENT_NODE?Al(t):!1)}function z(e){const t=document.createElement(e.tag||"div");if(t.setAttribute("contentEditable","false"),e.width&&(t.style.width=e.width+"px"),e.height&&(t.style.height=e.height+"px"),e.left&&(t.style.left=e.left+"px"),e.top&&(t.style.top=e.top+"px"),e.className&&(t.className=e.className),e.style&&t.setAttribute("style",e.style),e.HTMLcontent&&(t.innerHTML=e.HTMLcontent),e.title&&t.setAttribute("title",e.title),e["data-id"]&&t.setAttribute("data-id",e["data-id"]),e.targetElement){const r=typeof e.targetElement=="string"?document.querySelector(e.targetElement):e.targetElement;if(r)switch(e.insertType){case"append":r.append(t);break;case"prepend":r.prepend(t);break;case"before":r.before(t);break;case"after":r.after(t);break;case"replaceWith":r.replaceWith(t)}}return t}function Sp(e){try{return JSON.parse(e),!0}catch{return!1}}function wp(e,t,r=2){const n=e.split(""),i=t.split("");if(Math.abs(n.length-i.length)>r)return!1;let o=0;if(n.length===i.length){for(let s=0;s<n.length;s++)if(n[s]!==i[s]&&(o++,o>r))return!1}else{const s=n.length>i.length?n:i,a=n.length>i.length?i:n;let l=0,c=0;for(;l<s.length&&c<a.length;)if(s[l]!==a[c]){if(o++,o>r)return!1;l++}else l++,c++;if(l<s.length&&o++,o>1)return!1}return!0}function Cp(e){const t=window.getSelection();t&&(t.removeAllRanges(),t.addRange(e))}function Ap(e,t){let r=e;for(;r&&r!==document.body;){const n=r.style?.[t];if(n&&typeof n=="string")return n;if(r.tagName==="EDITOR")return null;r=r.parentElement}return null}function Tp(e){const t=e.style?.fontWeight;if(typeof t=="number")return t>=600;if(typeof t=="string"){const r=t.toLowerCase();return r.includes("bold")||r.includes("black")||parseInt(r)>=600}return!1}function Tl(){const e=window.getSelection();if(!e||e.rangeCount===0)return null;const t=e.getRangeAt(0).commonAncestorContainer;return t.nodeType===1?t:t.parentElement}function kp(e,t=null){const r=e?.innerText;for(;e!==null;){if(e.innerText===r){const n=e.parentElement;if(n===null||n.innerText!==r||n.tagName==="EDITOR"||e.tagName===t?.toUpperCase())return e.tagName===t?.toUpperCase()||!t?e:null}e=e.parentElement}return null}function kl(e,t=Tl()){e=zn(e)??"";const r=o=>zn(o?.textContent||"")??"",n=Array.from(t?.childNodes||[]).filter(o=>!!o&&o.nodeName!=="BR");let i=null;if(t&&t.nodeType===Node.TEXT_NODE&&r(t).includes(e)&&r(t)===e)return t;for(let o=0;o<n.length;o++){const s=n[o];if(s.nodeType===Node.TEXT_NODE&&r(s).includes(e)&&r(s)===e){i=s.parentNode;break}else if(s.nodeType===Node.ELEMENT_NODE&&(i=kl(e,s),i))break}return i}function Ll(e){const t=Array.from(e),r=t.map(o=>o.clientWidth),n=r.reduce((o,s)=>o+s,0),i=r.map(o=>((o||0)/n*100).toFixed(1));t.forEach((o,s)=>{o.setAttribute("data-percent",i[s])})}function jr(e){e.elem.nodeName==="#comment"&&e.elem.textContent&&e.elem.textContent.indexOf("mso")>-1?e.elem.textContent=e.elem.textContent.replace(/width=".*"/gi,`width="${e.width}"`):e.elem.previousSibling&&jr({elem:e.elem.previousSibling,width:e.width})}function Lp(e){let t="";const r="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";let i=0;for(;i<e;)t+=r.charAt(Math.floor(Math.random()*62)),i+=1;return t}var Vn=null,Lo=null,Op=null,xp=null,$r=0;function Pp(e){Vn=e.htmlDocument,Lo=e.remoteDocument,Op=e.textDocument,xp=e.documentMapping}function Oo(){if(!Vn)throw new Error("Documents not initialized. Call initDocuments first.");return Vn}function Ol(){if(!Lo)throw new Error("Documents not initialized. Call initDocuments first.");return Lo}function Np(e){Oo().commit(e)}async function Mp(e){const t=Oo();try{$r++,await t.commit(e,!0)}finally{$r--}}function Rp(){return $r>0}function Dp(){$r++}function Ip(){$r--}function xo(){return Vn!==null}var Wn=null,Xt=void 0,Po=null;function Bp(e){Po=e}function Fp(e){Wn=e}function jp(e){if(Po){Po.setEditorFocus(e);return}if(Wn&&Wn.isEditorInFocus!==e){const t=e;e&&typeof Xt=="boolean"&&(xo()&&Ol().saveChanges(Xt),Xt=void 0),Wn.setFocus(t),!e&&typeof Xt=="boolean"&&(xo()&&Ol().saveChanges(Xt),Xt=void 0)}}function $p(e,t=window){return{peer:e,send(r){e.postMessage(r,"*")},subscribe(r){const n=i=>{r({data:i.data,source:i.source,ports:i.ports})};return t.addEventListener("message",n),{dispose:()=>t.removeEventListener("message",n)}},close(){}}}function Hp(e){let t=!1;return{peer:e,send(r){e.postMessage(r)},subscribe(r){const n=i=>{r({data:i.data,source:e})};return e.addEventListener("message",n),t||(t=!0,e.start()),{dispose:()=>e.removeEventListener("message",n)}},close(){e.close()}}}function eM(e){return e}function zp(e){return e&&typeof e=="object"}function xl(e,t){return e&&typeof e=="object"&&e.operationId===t}var Xe="INIT_MESSAGE",Vp="em:port-ready",Wp="em:window-drained",No="";function Pl(){return Math.random().toString(36).substring(2,15)+Math.random().toString(36).substring(2,15)}var Up=class extends Z{constructor(...e){super(...e),k(this,"_listeners",Object.create(null)),k(this,"addListenerAsync",(t,r,n=0,i)=>{const o=this._listeners[t]||(this._listeners[t]=[]);i&&typeof r=="function"&&(r=r.bind(i));const s=o.findIndex(([l,c])=>n<=c),a=[r,n];return this.isDisposed()||o.splice(s>=0?s:o.length,0,a),{dispose(){const l=o.indexOf(a);l>=0&&o.splice(l,1)}}}),k(this,"fireAsync",(t,r)=>{if(!this.isDisposed()){const n=this._listeners[t]||(this._listeners[t]=[]);let i;for(let o=0;o<n.length;o++){const s=n[o][0],a=i;i=l=>s(l,a)}if(i)return i(r)}}),k(this,"addListener",(t,r,n=0)=>this.addListenerAsync(t,(i,o)=>{try{r(i)}catch{}return o&&o(i)},n))}},qp=class extends Z{constructor(e,t){super(),k(this,"_singleton",void 0),k(this,"_target",void 0),k(this,"_transport",void 0),k(this,"_transportSubscription",void 0),k(this,"_ports",new Map),k(this,"_drained",new WeakSet),k(this,"_inited",!1),k(this,"_emitter",this.addDisposable(new Up)),k(this,"_handshaken",new WeakSet),k(this,"_greeted",new WeakSet),k(this,"_outgoingFilter",void 0),k(this,"_onTransportMessage",r=>{const n=r,i=n.data,o=n.source,s=i?.port===!0?n.ports?.[0]:void 0,a=!this._isPortSource(n.source);if(a&&o&&i?.operationId==="em:window-drained"){this._drained.add(o);return}if(!(a&&o&&this._drained.has(o))){if(o&&o!==this._target&&this._greeted.has(o)&&xl(i,Xe)){this._greeted.delete(o),this._handshaken.add(o),this._postMessage(o,{operationId:Xe,data:{}}),s&&this.usePort(s,!0,o);return}if(zp(i)&&(n.source===this.target||this._isCurrentPort(n.source))||this._singleton&&xl(i,Xe)){if(s){const d=this._target;Promise.resolve().then(()=>this.usePort(s,!0,d))}const l=this._emitter.fireAsync(i.operationId||No,i.operationId===void 0?n:i.data),c=i.result,u=i.error;c&&u&&Promise.resolve(l).then(d=>this._sendMessage(c,d),d=>this._sendMessage(u,d))}}}),this._singleton=t,this._transport=$p({postMessage:()=>{}},window),this._transportSubscription=this.addDisposable(this._transport.subscribe(this._onTransportMessage)),this.addListener(Xe,()=>{this._inited||(this._inited=!0,this._target&&this._handshaken.add(this._target),this.send(Xe))}),e&&this.setTarget(e)}setTarget(e){if(this._target!==e){if(this._target=e,!e){this._inited=!1;return}if(this._handshaken.has(e)){this._inited=!0,this._emitter.fireAsync(Xe,void 0);return}this._inited=!1,this._postMessage(e,{operationId:Xe,data:{}})}}sendPort(e,t){this._postMessage(e,{operationId:Xe,data:{},port:!0},[t])}setOutgoingFilter(e){return this._outgoingFilter=e,()=>{this._outgoingFilter===e&&(this._outgoingFilter=void 0)}}sendNow(e){const t=this._target;return!this._inited||!t?!1:(this._postMessage(t,e),!0)}greet(e){this._handshaken.has(e)||this._greeted.has(e)||this._target===e||(this._greeted.add(e),this._postMessage(e,{operationId:Xe,data:{}}))}forget(e){this._handshaken.delete(e),this._greeted.delete(e),this._closePort(e),this._drained.delete(e),this._target===e&&(this._inited=!1)}usePort(e,t=!1,r=this._target){if(!r||this._ports.has(r))return;const n=Hp(e),i=n.subscribe(this._onTransportMessage);this._ports.set(r,{transport:n,subscription:i}),t&&(n.send({operationId:Vp,data:{}}),this.drainWindow(r))}useWindow(e=this._target){e&&(this._closePort(e),this._drained.delete(e))}get usesPort(){return this._target!==void 0&&this._ports.has(this._target)}hasPort(e){return this._ports.has(e)}_closePort(e){const t=this._ports.get(e);t&&(t.subscription.dispose(),t.transport.close(),this._ports.delete(e))}drainWindow(e){this._ports.has(e)&&e.postMessage({operationId:Wp,data:{}},"*")}isWindowDrained(e){return this._drained.has(e)}_isPortSource(e){for(const t of this._ports.values())if(t.transport.peer===e)return!0;return!1}_isCurrentPort(e){return this._target!==void 0&&this._ports.get(this._target)?.transport.peer===e}getTarget(){return this._target}get target(){return this._target}_postMessage(e,t,r){let n=t;this._outgoingFilter&&!r?.length&&(n="data"in t?{...t,data:this._outgoingFilter(t.data)}:this._outgoingFilter(t));try{const i=this._ports.get(e);if(i){i.transport.send(n);return}if(r?.length){e.postMessage(n,"*",r);return}e.postMessage(n,"*")}catch(i){if(i?.name==="DataCloneError"){const o=typeof n?.data=="object"&&n?.data!==null?n.data:void 0}throw i}}_sendMessage(e,t,r=!0){if(!r&&!this.isInited())return;const n=this.addDisposable(this.onInit(i=>{const o=e?{operationId:e,data:t}:t;try{this._postMessage(i,{...o})}finally{n.dispose()}}))}send(e,t,r){return typeof e=="string"?this._sendMessage(e,t,r):this._sendMessage(No,e,t)}sendAsync(e,t,r=!0){if(!r&&!this.isInited())return Promise.resolve();const n=Pl(),i=Pl();return new Promise((o,s)=>{const a=this.addDisposable(new Z);a.addDisposable(this.onInit(l=>{try{this._postMessage(l,{operationId:e,data:t,result:n,error:i})}catch(c){a.dispose(),s(c);return}a.addDisposable(this._onMessage(n,c=>{o(c),a.dispose()})),a.addDisposable(this._onMessage(i,c=>{s(c),a.dispose()}))}))})}_onMessage(e,t,r=0){return this._emitter.addListener(e,t,r)}addListener(e,t,r){return t?this._onMessage(e,t,r):this._onMessage(No,e)}addListenerAsyncPipe(e,t,r=0){return this._emitter.addListenerAsync(e,t,r)}addListenerAsync(e,t,r=0){return this._emitter.addListenerAsync(e,async(n,i)=>{const o=await t(n);return i?i(n):o},r)}isInited(){return this._inited}get inited(){return this._inited}onInit(e,t=!0,r=0){const n=this.addDisposable(new Z);return this._inited&&this._target?t&&Promise.resolve().then(()=>{!this._inited||!this._target?n.addDisposable(this.onInit(e,t,r)):e(this._target)}):n.addDisposable(this._onMessage(Xe,()=>{e(this._target)},r)),n}dispose(){for(const e of Array.from(this._ports.keys()))this._closePort(e);this._transport.close(),super.dispose()}},Gp=/<\/?[a-zA-Z][a-zA-Z0-9-]*(?:\s[^<>]*)?\/?>/g;function Xp(e){return e.replace(Gp,t=>/^<br\b/i.test(t)?" ":"")}var Yp="fonts.googleapis.com",Kp=e=>{try{const t=new URL(String(e??"").trim());return t.protocol==="https:"?t:null}catch{return null}},Qp=e=>{const t=Kp(String(e??""));return t?t.hostname===Yp&&t.pathname.startsWith("/css")&&!!t.searchParams.get("family"):!1},me={MESSAGE:"message",INIT_PREVIEW:"init_preview",UPDATE_PREVIEW:"update_preview",UPDATE_EDITOR:"update_editor",UPDATE_EDITOR_POSITION:"update_editor_position",UPDATE_SIDE_MENU_EDITOR:"update_side_menu_editor",SAVE_EMAIL:"saveEmail",SANDBOX_ELEMENT_SETTINGS_SET:"sandbox_element_settings_set",SANDBOX_IMAGE_RESET:"sandbox_image_reset",SANDBOX_NATIVE_IMAGE_DROP_CLEAR:"sandbox_native-image-drop-clear",SANDBOX_EMAIL_SETTINGS_SET:"sandbox_email_settings_set",SANDBOX_BLOCK_SETTINGS_SET:"sandbox_block_settings_set",SANDBOX_ELEMENT_PARENT_GET:"sandbox_element_parent_get",SANDBOX_ELEMENT_PARENT_TABLE_GET:"sandbox_element_parent_table_get",SANDBOX_ELEMENT_PREV_GET:"sandbox_element_prev_get",SANDBOX_ELEMENT_NEXT_GET:"sandbox_element_next_get",SANDBOX_ELEMENT_REMOVE:"sandbox_element_remove",SANDBOX_ELEMENT_ACTIVE_RESET:"sandbox_element_active_reset",SANDBOX_ELEMENT_ACTIVE_SET:"sandbox_element_active_set",SANDBOX_ELEMENT_HOVER_SET:"sandbox_element_hover_set",SANDBOX_ELEMENT_IMG_LINK:"sandbox_element_img_link",SANDBOX_ELEMENT_TEXT:"sandbox_element_text",SANDBOX_EMAIL_CONTENT_GET:"sandbox_email_content_get",SANDBOX_SET_POSITION_TO_IMG:"sandbox_set_position_to_img",SANDBOX_SET_POSITION_TO_LINK:"sandbox_set_position_to_link",SANDBOX_ACCORDION_ADD_SECTION:"sandbox_accordion_add_section",SANDBOX_ACCORDION_REMOVE_SECTION:"sandbox_accordion_remove_section",APPLICATION_FOCUS_IN_IFRAME:"application_focus_in_iframe",APPLICATION_EMAIL_SETTINGS_SET:"application_email_settings_set",APPLICATION_BLOCK_SETTINGS_SET:"application_block_settings_set",APPLICATION_ELEMENT_SETTINGS_SET:"application_element_settings_set",_APPLICATION_ELEMENT_SETTINGS_SET:"application_element_settings_set",APPLICATION_ELEMENT_SETTINGS_CLOSE:"application_element_settings_close",APPLICATION_ACTION:"application_action",APPLICATION_EBLOCK_ADD:"application_eblock_add",SANDBOX_EBLOCK_SET_EM_BLOCK_ID:"sandbox_eblock_set_em_block_id",SANDBOX_GLOBAL_BLOCK_REPLACE:"sandbox_global_block_replace",APPLICATION_SCROLL_TO:"application_scroll-to",APPLICATION_SCROLL_BLOCK_SHOW:"application_scroll-block-show",APPLICATION_SCROLL_BLOCK_HIDE:"application_scroll-block-hide",APPLICATION_DISCUSS_SET_ID:"application_discuss_set_id",APPLICATION_DISCUSS_GET_COMMENT:"application_discuss_get_comment",APPLICATION_DISCUSS_NO_COMMENT:"application_discuss_no_comment",APPLICATION_DISCUSS_SAVE_TARGET:"application_discuss_save_target",APPLICATION_IFRAME_SET_HEIGHT:"application_iframe_set_height",APPLICATION_COMMON_STYLES_UPDATE:"application_commonStyles_update",APPLICATION_EMAIL_CONTENT_GET:"application_email_content_get",APPLICATION_OPEN_IMAGE_AI_POPUP:"application_open-image-ai-popup",APPLICATION_OPEN_IMAGE_UPLOAD_POPUP:"application_open-image-upload-popup",APPLICATION_OPEN_IMAGE_EDIT_POPUP:"application_open-image-edit-popup",APPLICATION_OPEN_IMAGE_GIF_POPUP:"application_open-image-gif-popup",APPLICATION_OPEN_IMAGE_STOCK_POPUP:"application_open-image-stock-popup",APPLICATION_CLOSE_IMAGE_EDIT_POPUP:"application_close-image-edit-popup",APPLICATION_NATIVE_IMAGE_DROP:"application_native-image-drop",APPLICATION_SUBJECT_UPDATE:"application_subject_update",APPLICATION_PREHEADER_UPDATE:"application_preheader_update",APPLICATION_DOMPARSER_ERROR:"application_domparser_error",APPLICATION_UPDATE_ENTITY:"application_update_entity",APPLICATION_IFRAME_DRAG_EVENT:"application_iframe_drag_event",APPLICATION_HAS_AMP:"application_has_amp",APPLICATION_CANVAS_IMAGE_GET:"application_canvas_image_get",APPLICATION_PREVIEW_ALERT_SHOW:"application_preview_alert_show",APPLICATION_ATOM_INSERTED:"application_atom_inserted",APPLICATION_TEMPLATE_NOT_EM_ALERT_SHOW:"application_template_not_em_alert_show",SANDBOX_WINDOW_CHARACTERISTIC:"sandbox_window-characteristic",SANDBOX_IFRAME_SETSIZE:"sandbox_iframe-setsize",SANDBOX_BLOCK_INSERT:"sandbox_block-insert",SANDBOX_ATOM_INSERT:"sandbox_atom-insert",SANDBOX_DRAG_CANCEL:"sandbox_drag-cancel",UPDATE_EDITOR_POSITION_FROM_EDITOR:"update_position_from_editor",UPDATE_EDITOR_POSITION_FROM_IFRAME:"update_position_from_iframe",SANDBOX_CHANGE_PREVIEW:"sandbox_change_preview",APPLICATION_CHANGE_PREVIEW:"application_change_preview",SANDBOX_LOCK_EDIT:"sandbox_lock_edit",SANDBOX_FLOATBLOCK_ADD:"sandbox_floatBlock_add",SANDBOX_FLOATBLOCK_REMOVE:"sandbox_floatBlock_remove",SANDBOX_FLOATBLOCK_COPY:"sandbox_floatBlock_copy",SANDBOX_FLOATBLOCK_SWAP:"sandbox_floatBlock_swap",EDITOR_CHANGE_FOCUS:"editor_change_focus",SANDBOX_RESIZED:"sandbox_resized",SANDBOX_LOCK_DISCUSS:"sandbox_lock_discuss",SANDBOX_DISCUSS_SET_TARGET:"sandbox_discuss_set_target",SANDBOX_DISCUSS_REMOVE_TARGET:"sandbox_discuss_remove_target",SANDBOX_DISCUSS_RESET:"sandbox_discuss_reset",SANDBOX_DISCUSS_GET_TARGET:"sandbox_discuss_get_target",SANDBOX_READY:"SANDBOX_READY",SANDBOX_FLOATBLOCK_WRAP:"sandbox_floatblock_wrap",SANDBOX_FLOATBLOCK_DIR:"sandbox_floatblock_dir",SANDBOX_SUBJECT_UPDATE:"sandbox_subject_update",SANDBOX_PREHEADER_UPDATE:"sandbox_preheader_update",SANDBOX_DRAG_EVENT:"sandbox_drag_event",SANDBOX_WHEEL:"sandbox_wheel",SANDBOX_ADD_MERGETAG:"sandbox_add_mergetag",SANDBOX_TRANSLATIONS:"sandbox_send_translations",SANDBOX_SET_THEME_VARIABLES:"sandbox_send_theme_variables",SANDBOX_SET_PROJECT_FONTS:"sandbox_set_project_fonts",SANDBOX_CANVAS_IMAGE_CACHE_SETUP:"sandbox_canvas_image_cache_setup",SANDBOX_SET_ENTITY:"sandbox_set_entity",SANDBOX_INIT_START:"sandbox_init_start",SANDBOX_INITED:"sandbox_inited",SANDBOX_UPDATE_ENTITY:"sandbox_update_entity",RELOAD:"reload",SANDBOX_ADD_EXTENSIONS:"sandbox_add_extensions",SANDBOX_REMOVE_EXTENSIONS:"sandbox_remove_extensions",SANDBOX_ADD_SCRIPT:"sandbox_add_script",SANDBOX_IS_EMAIL_EMPTY:"sandbox_is_email_empty",SANDBOX_SWITCH_THEME:"sandbox_switch_theme"},Zp=e=>({REORDER_ATOM:e("Reorder element"),CLONE_ATOM:e("Clone element"),REMOVE_ATOM:e("Remove element"),EDIT_ATOM:e("Edit element"),CHANGE_IMAGE:e("Change image"),CHANGE_IMAGE_EDIT:e("Edit"),CHANGE_IMAGE_STOCK:e("Stock"),CHANGE_IMAGE_CHANGETO:e("Upload"),CHANGE_IMAGE_GIF:e("GIF"),CHANGE_IMAGE_AI:e("Generate"),REORDER_BLOCK:e("Reorder block"),REORDER_BLOCK_UP:e("Move up"),REORDER_BLOCK_DOWN:e("Move down"),EDIT_BLOCK:e("Edit block"),CLONE_BLOCK:e("Clone block"),MERGE_BLOCK:e("Merge with the chosen block"),UNMERGE_BLOCK:e("Split blocks"),COPY_BLOCK_TO_CLIPBOARD:e("Copy block to clipboard"),PASTE_BLOCK_FROM_CLIPBOARD:e("Paste block from clipboard"),REMOVE_BLOCK:e("Remove block"),SAVE_TO_BLOCKS:e("Save to Blocks"),UPDATE_GLOBAL_BLOCK_IN_TEMPLATES:e("Push block update to all templates"),ADD_BLOCK:e("Add block"),ADD_EMPTY_BLOCK:e("Add an empty block"),ADD_SAVED_BLOCK:e("Add a saved block"),ADD_COMMON_BLOCK:e("Add a common block"),ADD_TEMPLATE_BLOCK:e("Add a template block"),ADD_SEARCH_BLOCK:e("Search a block"),REORDER_GROUP:e("Reorder group"),EDIT_GROUP:e("Edit group"),CLONE_GROUP:e("Clone group"),REMOVE_GROUP:e("Remove group"),ADD_GROUP:e("Add group"),LINK:e("link"),TABLE_COLUMN:e("cell"),TABLE:e("table"),FLOAT_BLOCK:e("column"),CONTAINER:e("container"),PICTURE:e("picture"),CAROUSEL:e("carousel"),ACCORDION:e("accordion"),SOCIAL:e("Social media"),VERTICAL_INDENT:e("indent"),TEXT:e("text"),BUTTON:e("button"),VAR:e("variable"),STRUCTURE:e("block"),EMAIL:e("email"),GROUP:e("group"),TYPOGRAF:e("Typograf"),COUNTDOWN:e("countdown"),ELEMENT:e("element"),VIDEO:e("video"),ELEMENT_PATH_LINK:e("Link"),ELEMENT_PATH_BLOCK:e("Block"),ELEMENT_PATH_ATOM:e("Element"),ELEMENT_PATH_TD:e("Cell"),ELEMENT_PATH_TABLE:e("Table"),ELEMENT_PATH_FLOATBLOCK:e("Column"),ELEMENT_PATH_TEXT:e("Text"),ELEMENT_PATH_DIV:e("Container"),ELEMENT_PATH_GROUP:e("Group"),ELEMENT_PATH_EMAIL:e("Email"),ELEMENT_PATH_IMG:e("Picture"),ELEMENT_PATH_VINDENT:e("Indent"),ELEMENT_PATH_BUTTON:e("Button"),ELEMENT_PATH_CAROUSEL:e("Carousel"),ELEMENT_PATH_ACCORDION:e("Accordion"),ELEMENT_PATH_SOCIAL:e("Social media"),ELEMENT_PATH_SECTION:e("Section"),TINYMCE_CHANGECASE:e("Case Change"),TINYMCE_UPPERCASE:e("Uppercase"),TINYMCE_LOWERCASE:e("Lowercase"),PASTE_HERE:e("Drop here"),INSERT_COLUMN_BEFORE_TABLE:e("Insert column before"),INSERT_COLUMN_AFTER_TABLE:e("Insert column after"),INSERT_ROW_BEFORE_TABLE:e("Insert row before"),INSERT_ROW_AFTER_TABLE:e("Insert row after"),MERGE_RIGHT_CELL_TABLE:e("Merge right cell"),MERGE_LEFT_CELL_TABLE:e("Merge left cell"),MERGE_TOP_CELL_TABLE:e("Merge top cell"),MERGE_BOTTOM_CELL_TABLE:e("Merge bottom cell"),SPLIT_CELL_TABLE:e("Split cell"),REMOVE_COLUMN_TABLE:e("Remove column"),REMOVE_ROW_TABLE:e("Remove row"),DROP_BLOCK_HINT:e("Click or drag a block")}),X=new qp(window.parent,!0);function Nl(e){for(const t of document.querySelectorAll(`[${e}]`))t.removeAttribute(e)}function be(e,t,r=!1){for(const n of e.querySelectorAll(t))r||!n.childNodes.length?n.remove():n.replaceWith(...n.childNodes)}var Un="em-element-list-ol",qn="em-element-list-ul",Jp="em-element-list-bullet",eg=`.${Un}, .${qn}`,tg=["DIV","P","TD","H1","H2","H3","H4","H5","H6"],rg="div, p, td, h1, h2, h3, h4, h5, h6",ng={LIST:"margin: 0; padding: 0 0 0 20px;",LIST_ITEM:"padding-bottom: 5px;"};function ig(e,t,r){const n=document.createElement("div");return n.innerHTML=e,n.querySelectorAll("tr").forEach(i=>{const o=i.querySelectorAll("td");if(o.length>1){const s=o[1],a=(s.getAttribute("style")||"").split(";").filter(u=>u.trim()!==""),l={};a.forEach(u=>{const[d,h]=u.split(":").map(f=>f.trim());l[d]=h}),l[t]=`${r}px`;const c=Object.entries(l).map(([u,d])=>`${u}: ${d}`).join("; ");s.setAttribute("style",c)}}),n.innerHTML}function og(e,t){const r=document.createElement("div");return r.innerHTML=e,r.querySelectorAll("tr").forEach(n=>{const i=n.querySelector("td:first-child");if(i){const o=i.querySelector("div");o&&(o.innerHTML=t)}}),r.innerHTML}function sg(e,t){const r=document.createElement("div");return r.innerHTML=e,r.querySelectorAll("tr").forEach(n=>{const i=n.querySelector("td:first-child");if(i){const o=i.querySelector("div");if(o){const s=o.getAttribute("style")||"",a=s.split(";").map(l=>l.trim()).filter(l=>l);if(a.some(l=>l.startsWith("color"))){const l=a.map(c=>c.startsWith("color")?`color: ${t};`:c);o.setAttribute("style",l.join("; "))}else o.setAttribute("style",s?`${s} color: ${t};`:`color: ${t};`)}}}),r.innerHTML}function ag(e,t){const r=document.createElement("div");return r.innerHTML=e,r.querySelectorAll("tr").forEach(n=>{const i=n.querySelector("td:first-child");if(i){const o=i.querySelector("div");if(o){const s=o.getAttribute("style")||"",a=s.split(";").map(l=>l.trim()).filter(l=>l);if(a.some(l=>l.startsWith("font-size"))){const l=a.map(c=>c.startsWith("font-size")?`font-size: ${t}px;`:c);o.setAttribute("style",l.join("; "))}else o.setAttribute("style",s?`${s} font-size: ${t}px;`:`font-size: ${t}px;`)}}}),r.innerHTML}function lg(e,t){if(typeof t!="boolean")throw new Error("Invalid isBold value: must be a boolean");const r=t?"bold":"normal",n=document.createElement("div");return n.innerHTML=e,n.querySelectorAll("tr").forEach(i=>{const o=i.querySelector("td:first-child");if(o){const s=o.querySelector("div");if(s){const a=s.getAttribute("style")||"",l=a.split(";").map(c=>c.trim()).filter(c=>c);if(l.some(c=>c.startsWith("font-weight"))){const c=l.map(u=>u.startsWith("font-weight")?`font-weight: ${r};`:u);s.setAttribute("style",c.join("; "))}else s.setAttribute("style",a?`${a} font-weight: ${r};`:`font-weight: ${r};`)}}}),n.innerHTML}function cg(e,t){if(typeof t!="boolean")throw new Error("Invalid isItalic value: must be a boolean");const r=t?"italic":"normal",n=document.createElement("div");return n.innerHTML=e,n.querySelectorAll("tr").forEach(i=>{const o=i.querySelector("td:first-child");if(o){const s=o.querySelector("div");if(s){const a=s.getAttribute("style")||"",l=a.split(";").map(c=>c.trim()).filter(c=>c);if(l.some(c=>c.startsWith("font-style"))){const c=l.map(u=>u.startsWith("font-style")?`font-style: ${r};`:u);s.setAttribute("style",c.join("; "))}else s.setAttribute("style",a?`${a} font-style: ${r};`:`font-style: ${r};`)}}}),n.innerHTML}function ug(e,t){if(typeof t!="boolean")throw new Error("Invalid shouldUnderline value: must be a boolean");const r=document.createElement("div");return r.innerHTML=e,r.querySelectorAll("tr").forEach(n=>{const i=n.querySelector("td:first-child");if(i){const o=i.querySelector("div");if(o){const s=o.getAttribute("style")||"",a=s.split(";").map(d=>d.trim()).filter(d=>d);let l="none";const c=a.findIndex(d=>d.startsWith("text-decoration"));if(c!==-1){const d=a[c].match(/^text-decoration\s*:\s*(.*)$/);d&&(l=d[1].trim())}let u;t?l.includes("line-through")?u="underline line-through":u="underline":l.includes("line-through")?u="line-through":u="none",c!==-1?(a[c]=`text-decoration: ${u};`,o.setAttribute("style",a.join("; "))):o.setAttribute("style",s?`${s} text-decoration: ${u};`:`text-decoration: ${u};`)}}}),r.innerHTML}function dg(e,t){if(typeof t!="boolean")throw new Error("Invalid shouldStrikethrough value: must be a boolean");const r=document.createElement("div");return r.innerHTML=e,r.querySelectorAll("tr").forEach(n=>{const i=n.querySelector("td:first-child");if(i){const o=i.querySelector("div");if(o){const s=o.getAttribute("style")||"",a=s.split(";").map(d=>d.trim()).filter(d=>d);let l="none";const c=a.findIndex(d=>d.startsWith("text-decoration"));if(c!==-1){const d=a[c].match(/^text-decoration\s*:\s*(.*)$/);d&&(l=d[1].trim())}let u;t?l.includes("underline")?u="underline line-through":u="line-through":l.includes("underline")?u="underline":u="none",c!==-1?(a[c]=`text-decoration: ${u};`,o.setAttribute("style",a.join("; "))):o.setAttribute("style",s?`${s} text-decoration: ${u};`:`text-decoration: ${u};`)}}}),r.innerHTML}function fg(e,t){if(!e)return!1;const r=e.closest("table");return r?r.classList.contains(t):!1}function hg(e){return!e||!(e instanceof Node)?null:document.createTreeWalker(e,NodeFilter.SHOW_TEXT,{acceptNode:t=>t.nodeValue?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}).nextNode()}function mg(e){if(!e||!(e instanceof Node))return null;const t=document.createTreeWalker(e,NodeFilter.SHOW_TEXT,{acceptNode:i=>i.nodeValue?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP});let r=null,n;for(;n=t.nextNode();)r=n;return r}function pg(e){if(!e||!(e instanceof HTMLElement))return"inside";const t=window.getSelection();if(!t||t.rangeCount===0)return"inside";const r=t.getRangeAt(0);if(!r.collapsed)return"inside";let{startContainer:n,startOffset:i}=r;if(n===e)return i===0?"start":i===e.childNodes.length?"end":"inside";const o=hg(e),s=mg(e);let a=n;return a&&a.nodeType===Node.ELEMENT_NODE&&(a=a.childNodes[0]),o&&a===o&&i===0?"start":s&&n===s&&(i===s?.nodeValue?.length||i===s?.nodeValue?.trim().length)?"end":"inside"}function Ml(e){const t=e.cloneNode(!0),r=document.createTreeWalker(t,NodeFilter.SHOW_TEXT,null);let n;for(;n=r.nextNode();)n.nodeValue="";return t}function Mo(e){let t="";for(const r of e.attributes)t+=` ${r.name}="${r.value}"`;return t}function gg(e,t){const r=e.closest(`table.${t}`);if(!r)return null;const n=r.querySelector("tbody"),i=n?n.innerHTML.trim():r.innerHTML.trim(),o=e.closest("tr");if(!o)return{rowHtml:i,firstCellText:"",secondCellText:"",firstCellHtmlNoText:"",secondCellHtmlNoText:"",secondCellWrapperHtml:"",secondCellInnerDivHtml:"",wrappedSecondCellHtml:"",secondCellInnerDivWrapperHtml:"",secondCellTextHTML:""};const s=o.querySelectorAll("td"),a=s[0]||null,l=s[1]||null,c=a?a.textContent.trim():"",u=l?l.textContent.trim():"",d=l?l.innerHTML.trim():"",h=a?Ml(a).outerHTML:"",f=l?Ml(l).outerHTML:"",g=l?`<td${Mo(l)}></td>`:"",y=l?l.querySelector("div"):null;return{rowHtml:i,firstCellText:c,secondCellText:u,firstCellHtmlNoText:h,secondCellHtmlNoText:f,secondCellWrapperHtml:g,secondCellInnerDivHtml:y?y.outerHTML:"",wrappedSecondCellHtml:l&&y?`<td${Mo(l)}>${y.outerHTML}</td>`:"",secondCellInnerDivWrapperHtml:y?`<div${Mo(y)}></div>`:"",secondCellTextHTML:d}}function Gn(e){const t=document.createElement("textarea");return t.innerHTML=e,t.value}function bg(e,t){const r=document.createElement("template");r.innerHTML=e;const n=r.content.firstElementChild;if(!n||n.tagName.toLowerCase()!=="td")return e;const i=n.querySelector("div");return i?i.textContent=Gn(t)||" ":n.insertAdjacentText("afterbegin",Gn(t)),n.outerHTML}function yg(e){const t=document.createElement("template");return t.innerHTML=e,t.content.querySelectorAll("editor").forEach(r=>{r.replaceWith(...Array.from(r.childNodes))}),t.content.querySelectorAll('[em-edit="active"]').forEach(r=>{r.removeAttribute("em-edit")}),t.innerHTML}function vg(e){const t=window.getSelection();if(!t||!t.rangeCount)return null;const r=t.getRangeAt(0);if(!e.contains(r.startContainer))return null;const n=document.createRange();n.selectNodeContents(e),n.setEnd(r.startContainer,r.startOffset);const i=n.toString(),o=document.createRange();return o.selectNodeContents(e),o.setStart(r.startContainer,r.startOffset),{beforeCursorPosition:i,afterCursorPosition:o.toString()}}function Eg(e,t){const r=document.createElement("template");return r.innerHTML=e,r.content.querySelectorAll(`div.${t}`).forEach(n=>{const i=n.closest("tr");i&&i.remove()}),r.innerHTML}function _g(e,t,r,n=!0){const i=document.createElement("template");i.innerHTML=e.trim();const o=i.content.querySelector(`div.${r}`);if(o){const s=o.closest("tr");if(s){const a=n?"beforebegin":"afterend";s.insertAdjacentHTML(a,t)}}return i.innerHTML}function Sg(e){const t=/^(\s|&nbsp;)+|(\s|&nbsp;)+$/g,r=e.querySelectorAll("tr"),n=[];return r.forEach(i=>{const o=i.querySelectorAll("td");if(o.length>=2){const s=o[0].querySelector("div"),a=o[1].querySelector("div, editor"),l=s?s.textContent.trim():"";let c="";if(a)if(a.classList.contains("em-text")){const u=a.querySelector("div");c=u?u.innerHTML:""}else c=a.innerHTML;c=c.replace(t,""),n.push({cellOneText:l,cellTwoText:c})}}),n}function wg(e){let t=1;return e.map(r=>{if(r.cellOneText&&/^\d+\.$/.test(r.cellOneText.trim())){const i={...r,cellOneText:`${t}.`};return t++,i}if(!r.cellOneText||/^\s*$/.test(r.cellOneText))return{...r};const n={...r,cellOneText:`${t}.`};return t++,n})}function Cg(e,t){if(typeof e!="string")return"";const r=document.createElement("template");r.innerHTML=e.toString().trim();const n=r.content.querySelector("table");return n?(n.querySelectorAll("tr").forEach((i,o)=>{if(o>=t.length)return;const s=i.querySelectorAll("td");if(s.length<2)return;const a=s[0].querySelector("div");a&&(a.textContent=Gn(t[o].cellOneText));const l=s[1].querySelector("div");l&&(l.textContent=Gn(t[o].cellTwoText))}),n.outerHTML):e}function Ag(e){return e.map(t=>({...t,cellOneText:t.cellOneText===""?" ":t.cellOneText,cellTwoText:t.cellTwoText===""?" ":t.cellTwoText}))}function Tg(e){if(!Array.isArray(e)||e.length===0)return e;const t=" ",r=e.map(i=>{if(!i.cellOneText)return i;let o=i.cellOneText.trim();return o.endsWith(t)||(o+=t),{...i,cellOneText:o}}),n=Math.max(...r.map(i=>i.cellOneText?i.cellOneText.length:0));return r.map(i=>{if(!i.cellOneText)return i;let o=i.cellOneText;for(;o.length<n;)o+=t;return{...i,cellOneText:o}})}function kg(e,t,r,n){const i=new DOMParser().parseFromString(e,"text/html"),o=i.querySelector(`div.${t}`);if(!o)return e;const s=o.closest("tr");if(!s)return e;const a=n==="ArrowUp"?s.previousElementSibling:s.nextElementSibling;if(a&&a.tagName==="TR"){const c=a.querySelectorAll("td")[1]||null;if(c){const u=c.querySelector("div");u&&u.classList.add(r)}}else o.classList.add(r);const l=i.querySelector("table");return l?l.outerHTML:e}function Lg(e){const t=window.getSelection();if(!t||!t.rangeCount)return null;const r=t.getRangeAt(0);if(!e.contains(r.startContainer))return null;const n=document.createRange();n.selectNodeContents(e),n.setEnd(r.startContainer,r.startOffset);const i=n.cloneContents(),o=document.createRange();o.selectNodeContents(e),o.setStart(r.startContainer,r.startOffset);const s=o.cloneContents();function a(l){const c=document.createElement("div");return c.appendChild(l),c.childNodes.length===1&&c.firstChild.nodeType===Node.ELEMENT_NODE?c.firstChild.innerHTML:c.innerHTML}return{beforeHTML:a(i),afterHTML:a(s)}}function Og(e,t,r,n){const i=e.closest(`table.${t}`)||e.closest(`table.${r}`);i&&i.querySelectorAll("tr").forEach(o=>{const s=o.querySelector("td:nth-child(2)");if(!s)return;const a=s.querySelectorAll("div, strong");if(a.length===0){const l=document.createElement("div");l.innerHTML="&nbsp;",s.appendChild(l)}else a.forEach(l=>{let c=l.innerHTML.trim();!c||c.replace(n,"")===""?l.innerHTML="&nbsp;":(c=c.replace(n,""),c.endsWith("&nbsp;")||(c+="&nbsp;"),c=c.replace(/&nbsp;+$/,"&nbsp;"),l.innerHTML=c)})})}function xg(e){const t=`<table><tbody><tr>${e}</tr></tbody></table>`,r=new DOMParser().parseFromString(t,"text/html"),n=r.querySelector("div");return n&&(n.classList.add("remove-new-editor-element"),n.innerHTML.trim()?n.innerHTML+="&nbsp;":n.innerHTML="&nbsp;"),r.querySelector("td")?.outerHTML||""}function Pg(e,t){const r=document.createElement("div");return r.innerHTML=e,r.querySelectorAll("tr").forEach(n=>{const i=n.querySelectorAll("td");if(i.length>1){const o=i[1],s=(o.getAttribute("class")||"").split(" ").map(l=>l.trim()).filter(l=>l!=="");s.includes(t)||s.push(t);const a=s.join(" ");o.setAttribute("class",a)}}),r.innerHTML}function ye(e){if(Ng(e))return Mg(e)?e.trim():Rg(e)}var Rl={RGB:/^rgba?\s*\(\s*(?<r>\d+)\s*,\s*(?<g>\d+)\s*,\s*(?<b>\d+)\s*(?:,\s*(?<a>(?:0?\.)?\d+)\s*)?\)/i,HEX:/^\s*#(?:[0-9a-f]{3}|[0-9a-f]{4}|[0-9a-f]{6}|[0-9a-f]{8})\s*$/i},Ng=e=>typeof e=="string"&&e.trim()!=="",Mg=e=>Rl.HEX.test(e);function Rg(e){const t=Rl.RGB.exec(e)?.groups;if(!t)return;const r=Dg(t);return Bg(r)}var Dg=e=>({r:Ro(e.r),g:Ro(e.g),b:Ro(e.b),a:Ig(e.a)}),Ro=e=>parseInt(e||"0",10),Ig=e=>parseFloat(e||"1"),Bg=e=>`#${Do(e.r)}${Do(e.g)}${Do(e.b)}`,Do=e=>e.toString(16).padStart(2,"0"),Fg=class extends Z{constructor(...e){super(...e),k(this,"_transforms",[]),k(this,"_byAttribute",new Map)}register(e){this._transforms.push(e);for(const t of e.attributes){const r=t.toLowerCase(),n=this._byAttribute.get(r);n?n.push(e):this._byAttribute.set(r,[e])}return{dispose:()=>this._remove(e)}}_remove(e){const t=this._transforms.indexOf(e);if(t!==-1){this._transforms.splice(t,1);for(const r of e.attributes){const n=r.toLowerCase(),i=this._byAttribute.get(n);if(!i)continue;const o=i.indexOf(e);o!==-1&&i.splice(o,1),i.length||this._byAttribute.delete(n)}}}get isEmpty(){return this._transforms.length===0}handles(e){return this._byAttribute.has(e.toLowerCase())}get attributes(){return[...this._byAttribute.keys()]}render(e,t){return this._run("render",e,t)}serialize(e,t){return this._run("serialize",e,t)}_run(e,t,r){const n=this._byAttribute.get(r.attribute.toLowerCase());if(!n?.length)return t;const i=e==="render"?n:[...n].reverse();let o=t;for(const s of i){if(o===null)break;const a=e==="render"?s.render?.(o,r):s.serialize?.(o,r);a!==void 0&&(o=a)}return o}dispose(){this._transforms.length=0,this._byAttribute.clear(),super.dispose()}},Hr;function jg(e){const t=Hr;return Hr=e,{dispose:()=>{Hr===e&&(Hr=t)}}}function Io(){return Hr}var Xn=new WeakMap;function $g(e,t,r){const n=Xn.get(e);n?n.set(t.toLowerCase(),r):Xn.set(e,new Map([[t.toLowerCase(),r]]))}function Hg(e,t){const r=Xn.get(e);r?.size&&Xn.set(t,new Map(r))}function Dl(e,t,r){const n=e.tagName.toLowerCase();for(const i of t.attributes){if(!e.hasAttribute(i))continue;const o=e.getAttribute(i)??"",s=t.serialize(o,{element:e,tag:n,attribute:i,stage:r});s===null?e.removeAttribute(i):s!==o&&e.setAttribute(i,s)}}function Bo(e,t={}){const r=t.pipeline??Io(),n=t.stage??"build";let i=e;if(t.clone&&(i=e.cloneNode(!0),r&&!r.isEmpty&&Il(e,i)),!r||r.isEmpty)return i;i instanceof Element&&Dl(i,r,n);const o=i.querySelectorAll?.("*");if(o)for(const s of o)Dl(s,r,n);return i}function zg(e,t={}){const r=t.pipeline??Io();return!r||r.isEmpty?e.outerHTML:Bo(e,{...t,pipeline:r,clone:!0}).outerHTML}function Il(e,t){Hg(e,t);const r=e.childNodes,n=t.childNodes;for(let i=0;i<r.length&&i<n.length;i++)Il(r[i],n[i])}function Fo(e,t,r,n={}){const i=jo(e,t,r,{stage:"settings",...n});i===null?e.removeAttribute(t):e.setAttribute(t,i)}function jo(e,t,r,n={}){const i=n.pipeline??Io();if(!i||!i.handles(t))return r;const o=e?.tagName.toLowerCase()??"",s=i.render(r,{element:e,tag:o,attribute:t,stage:n.stage??"build"});if(s!==r){const a=n.owner??e;a&&$g(a,t,r)}return s}var Bl=class{constructor(e){k(this,"_voidElements",void 0),this._voidElements=new Set(e)}isVoidElement(e){return this._voidElements.has(e.toLowerCase())}},Ce=(function(e){return e[e.StartCommentTag=0]="StartCommentTag",e[e.Comment=1]="Comment",e[e.EndCommentTag=2]="EndCommentTag",e[e.StartTagOpen=3]="StartTagOpen",e[e.StartTagClose=4]="StartTagClose",e[e.StartTagSelfClose=5]="StartTagSelfClose",e[e.StartTag=6]="StartTag",e[e.EndTagOpen=7]="EndTagOpen",e[e.EndTagClose=8]="EndTagClose",e[e.EndTag=9]="EndTag",e[e.DelimiterAssign=10]="DelimiterAssign",e[e.AttributeName=11]="AttributeName",e[e.AttributeValue=12]="AttributeValue",e[e.StartDoctypeTag=13]="StartDoctypeTag",e[e.Doctype=14]="Doctype",e[e.EndDoctypeTag=15]="EndDoctypeTag",e[e.Content=16]="Content",e[e.Whitespace=17]="Whitespace",e[e.Unknown=18]="Unknown",e[e.Script=19]="Script",e[e.Styles=20]="Styles",e[e.EOS=21]="EOS",e[e.AdvancedStart=100]="AdvancedStart",e[e.AdvancedEnd=101]="AdvancedEnd",e})({}),Vg=class{constructor(e,t){k(this,"source",void 0),k(this,"len",void 0),k(this,"position",void 0),this.source=e,this.len=e.length,this.position=t}eos(){return this.len<=this.position}getSource(){return this.source}pos(){return this.position}goBackTo(e){this.position=e}goBack(e){this.position-=e}advance(e){this.position+=e}goToEnd(){this.position=this.source.length}nextChar(){return this.source.charCodeAt(this.position++)||0}peekChar(e=0){return this.source.charCodeAt(this.position+e)||0}advanceIfChar(e){return e===this.source.charCodeAt(this.position)?(this.position++,!0):!1}advanceIfChars(e){let t;if(this.position+e.length>this.source.length)return!1;for(t=0;t<e.length;t++)if(this.source.charCodeAt(this.position+t)!==e[t])return!1;return this.advance(t),!0}advanceIfRegExp(e){const t=this.source.substr(this.position).match(e);return t?(this.position=this.position+t.index+t[0].length,t[0]):""}advanceUntilRegExp(e){const t=this.source.substr(this.position).match(e);return t?(this.position=this.position+t.index,t[0]):(this.goToEnd(),"")}advanceUntilChar(e){for(;this.position<this.source.length;){if(this.source.charCodeAt(this.position)===e)return!0;this.advance(1)}return!1}advanceUntilChars(e){for(;this.position+e.length<=this.source.length;){let t=0;for(;t<e.length&&this.source.charCodeAt(this.position+t)===e[t];t++);if(t===e.length)return!0;this.advance(1)}return this.goToEnd(),!1}skipWhitespace(){return this.advanceWhileChar(e=>e===Kg||e===Qg||e===Gg||e===Yg||e===Xg)>0}advanceWhileChar(e){const t=this.position;for(;this.position<this.len&&e(this.source.charCodeAt(this.position));)this.position++;return this.position-t}},Fl=33,Yt=45,Yn=60,Ye=62,$o=47,Wg=61,Ug=34,qg=39,Gg=10,Xg=13,Yg=12,Kg=32,Qg=9,Zg={"text/x-handlebars-template":!0,"text/html":!0};function Jg(e,t=0,r=0,n=!1){const i=new Vg(e,t);let o=r,s=0,a=18,l,c,u,d,h;function f(){return i.advanceIfRegExp(/^[_:a-zA-Z][_:\w-.\d]*/).toLowerCase()}function g(){return i.advanceIfRegExp(/^[^\s"'></=\x00-\x0F\x7F\x80-\x9F]*/).toLowerCase()}function y(C,O,E){return a=O,s=C,l=E,O}function A(){const C=i.pos(),O=o,E=L();return E!==21&&C===i.pos()&&!(n&&(E===4||E===8))?(i.advance(1),y(C,18)):E}function L(){const C=i.pos();if(i.eos())return y(C,21);let O;switch(o){case 6:return i.advanceIfChars([Yt,Yt,Ye])?(o=0,y(C,2)):(i.advanceUntilChars([Yt,Yt,Ye]),y(C,1));case 3:return i.advanceIfChar(Ye)?(o=0,y(C,15)):(i.advanceUntilChar(Ye),y(C,14));case 0:if(i.advanceIfChar(Yn)){if(!i.eos()&&i.peekChar()===Fl){if(i.advanceIfChars([Fl,Yt,Yt]))return o=6,y(C,0);if(i.advanceIfRegExp(/^!doctype/i))return o=3,y(C,13)}return i.advanceIfChar($o)?(o=2,y(C,7)):(o=1,y(C,3))}return i.advanceUntilChar(Yn),y(C,16);case 2:return f().length>0?(o=5,y(C,9)):i.skipWhitespace()?y(C,17,"Tag name must directly follow the open bracket."):(o=5,i.advanceUntilChar(Ye),C<i.pos()?y(C,18,"End tag name expected."):L());case 5:if(i.skipWhitespace())return y(C,17);if(i.advanceIfChar(Ye))return o=0,y(C,8);if(n&&i.peekChar()===Yn)return o=0,y(C,8,"Closing bracket missing.");O="Closing bracket expected.";break;case 1:return u=f(),h=void 0,d=void 0,u.length>0?(c=!1,o=4,y(C,6)):i.skipWhitespace()?y(C,17,"Tag name must directly follow the open bracket."):(o=4,i.advanceUntilChar(Ye),C<i.pos()?y(C,18,"Start tag name expected."):L());case 4:return i.skipWhitespace()?(c=!0,y(C,17)):c&&(d=g(),d.length>0)?(o=9,c=!1,y(C,11)):i.advanceIfChars([$o,Ye])?(o=0,y(C,5)):i.advanceIfChar(Ye)?(u==="script"?h&&Zg[h]?o=0:o=7:u==="style"?o=8:o=0,y(C,4)):n&&i.peekChar()===Yn?(o=0,y(C,4,"Closing bracket missing.")):(i.advance(1),y(C,18,"Unexpected character in tag."));case 9:return i.skipWhitespace()?(c=!0,y(C,17)):i.advanceIfChar(Wg)?(o=10,y(C,10)):(o=4,L());case 10:if(i.skipWhitespace())return y(C,17);let E=i.advanceIfRegExp(/^[^\s"'`=<>]+/);if(E.length>0)return i.peekChar()===Ye&&i.peekChar(-1)===$o&&(i.goBack(1),E=E.substr(0,E.length-1)),d==="type"&&(h=E),o=4,c=!1,y(C,12);const m=i.peekChar();return m===qg||m===Ug?(i.advance(1),i.advanceUntilChar(m)&&i.advance(1),d==="type"&&(h=i.getSource().substring(C+1,i.pos()-1)),o=4,c=!1,y(C,12)):(o=4,c=!1,L());case 7:let b=1;for(;!i.eos();){const S=i.advanceIfRegExp(/<!--|-->|<\/?script\s*\/?>?/i);if(S.length===0)return i.goToEnd(),y(C,19);if(S==="<!--")b===1&&(b=2);else if(S==="-->")b=1;else if(S[1]!=="/")b===2&&(b=3);else if(b===3)b=2;else{i.goBack(S.length);break}}return o=0,C<i.pos()?y(C,19):L();case 8:return i.advanceUntilRegExp(/<\/style/i),o=0,C<i.pos()?y(C,20):L()}return i.advance(1),o=0,y(C,18,O)}return{scan:A,getTokenType:()=>a,getTokenOffset:()=>s,getTokenLength:()=>i.pos()-s,getTokenEnd:()=>i.pos(),getTokenText:()=>i.getSource().substring(s,i.pos()),getScannerState:()=>o,getTokenError:()=>l}}function eb(e,t){return t||e.start!==e.end?`<!DOCTYPE${e.content}>`:""}function tb(e,t){const r=`<!DOCTYPE${e.content}>`;return e.start=t,e.endTagStart=e.startTagEnd=e.end=t+r.length,r}function rb(e,t){return t||e.start!==e.end?`<!--${e.content}-->`:""}function nb(e,t){const r=`<!--${e.content}-->`;return e.start=t,e.startTagEnd=t+4,e.end=t+r.length,e.endTagStart=e.end-3,r}var Ho=new Set(["area","br","col","embed","hr","img","input","link","meta","param","vk-snippet-end"]);function ib(e){return e.toLowerCase().replace(/[^a-zA-Z0-9]+(.)/g,(t,r)=>r.toUpperCase())}var jl=Object.create(null);function ob(e,t){const r=jl[e]||(jl[e]=Object.create(null));let n=r[t];if(typeof n!="boolean"){const i=document.createElement(e)[ib(t)];n=r[t]=typeof i<"u"&&typeof i!="boolean"}return n}function zo(e,t){if(e.start===e.end||t)return"";switch(e.type){case I.ELEMENT:return Wo(e,t);case I.ROOT:return[...e.children].map(r=>zo(r,t)).join("");case I.DOCTYPE:return eb(e,t);case I.COMMENT:return rb(e,t);default:return e.content||""}}function Vo(e,t=0){if(e.start===e.end)return"";switch(e.type){case I.ELEMENT:return ab(e,t);case I.ROOT:return Hl(e,t);case I.DOCTYPE:return tb(e,t);case I.COMMENT:return nb(e,t);default:return e.start=e.startTagEnd=t,e.end=e.endTagStart=t+(e.content?.length||0),e.content||""}}function $l(e){const t=e.tag?.toLowerCase();let r="";if(t){const n=e.attributes;if(n){const i=Object.keys(n);for(const o of i){const s=n[o]===null?"":n[o];typeof s=="string"&&(r+=s===""&&o!=="em"&&!ob(t,o)?` ${o}`:` ${o}="${s.replaceAll('"',"'")}"`)}}}return r}function sb(e,t){let r="";if(e.startTagEnd!==e.endTagStart||t)for(const n of e.children)r+=zo(n);return r}function Hl(e,t){let r="";if(e.startTagEnd!==e.endTagStart)for(const n of e.children)r+=Vo(n,t+r.length);return r}function zl(e,t){if(e.start!==e.startTagEnd||t){const r=e.tag?.toLowerCase()||"div",n=$l(e);return r==="vk-snippet-end"?`<${r}${n}/>`:`<${r}${n}>`}return""}function Vl(e,t){return t||e.endTagStart!==e.end?`</${e.tag?.toLowerCase()||"div"}>`:""}function Wo(e,t,r=!0){const n=e.tag?.toLowerCase()||"div",i=zl(e,t);if(Ho.has(n))return i;{const o=Vl(e,t);return`${i}${r?sb(e,t):""}${o}`}}function ab(e,t){const r=e.tag?.toLowerCase()||"div",n=zl(e);if(e.start=t,e.startTagEnd=t+n.length,Ho.has(r)){e.endTagStart=e.startTagEnd,e.end=e.startTagEnd;const i=o=>{for(const s of o.children)s.start=s.startTagEnd=s.endTagStart=s.end=o.end,i(s)};return i(e),n}else{const i=Hl(e,e.startTagEnd);e.endTagStart=e.startTagEnd+i.length;const o=Vl(e);return e.end=e.endTagStart+o.length,`${n}${i}${o}`}}function Uo(e,t){let r=0,n=e.length;if(n===0)return 0;for(;r<n;){const i=Math.floor((r+n)/2);t(e[i])?n=i:r=i+1}return r}var I=(function(e){return e[e.HTML=0]="HTML",e[e.ELEMENT=1]="ELEMENT",e[e.ROOT=2]="ROOT",e[e.COMMENT=3]="COMMENT",e[e.DOCTYPE=4]="DOCTYPE",e[e.ADVANCED=5]="ADVANCED",e})({}),Kn=e=>e.type===0?e.start-1:e.start,lb=e=>e.type===0?e.end+1:e.end,Oe=class Km{get attributeNames(){return this.attributes?Object.keys(this.attributes):[]}get root(){return this.parent?this.parent.root:this}constructor(t,r,n,i){k(this,"start",void 0),k(this,"end",void 0),k(this,"children",void 0),k(this,"parent",void 0),k(this,"content",void 0),k(this,"type",1),k(this,"tag",void 0),k(this,"closed",!1),k(this,"startTagEnd",void 0),k(this,"endTagStart",void 0),k(this,"attributes",void 0),k(this,"createdBy",void 0),k(this,"isDirty",void 0),this.start=t,this.end=r,this.children=n,this.parent=i}isSameTag(t){return this.tag===void 0?t===void 0:t!==void 0&&this.tag.length===t.length&&this.tag.toLowerCase()===t}get firstChild(){return this.children[0]}get lastChild(){return this.children.length?this.children[this.children.length-1]:void 0}findNodeBefore(t){const r=Uo(this.children,n=>t<=Kn(n))-1;if(r>=0){const n=this.children[r];if(t>Kn(n)){if(t<n.end)return n.findNodeBefore(t);const i=n.lastChild;return i&&i.end===n.end?n.findNodeBefore(t):n}}return this}findNodeAt(t){const r=Uo(this.children,n=>t<=Kn(n))-1;if(r>=0){const n=this.children[r];if(t>=Kn(n)&&t<=lb(n))return n.findNodeAt(t)}return this}find(t){if(t(this))return this;for(const r of this.children){const n=r.find(t);if(n)return n}}closest(t){let r=this;do if(t(r))return r;while(r=r.parent)}parents(){return this.parent?[this.parent,...this.parent.parents()]:[]}closestFromRoot(t,r=!0){const n=r?[this,...this.parents()]:this.parents();for(let i=n.length-1;i>=0;i--){const o=n[i];if(t(o))return o}}contains(t){return!!t.closest(r=>r===this)}clone(t=this.parent,r=this.start,n=!0){const i=this.start-r,o=new Km(r,this.end-i,[],t);return o.children=n?this.children.map(s=>s.clone(o,s.start-i)):[],o.attributes={...this.attributes},o.closed=this.closed,o.content=this.content,o.startTagEnd=this.startTagEnd,o.endTagStart=this.endTagStart,o.tag=this.tag,o.type=this.type,o}};function cb(e){if(typeof e=="string"){const t=e.startsWith("'")||e.startsWith('"')?1:0,r=e.endsWith("'")||e.endsWith('"')?e.length-1:e.length;return e.substring(t,r)}return e}var Wl=class{constructor(e,t){k(this,"text",void 0),k(this,"type",void 0),k(this,"node",void 0),k(this,"replaces",void 0),this.text=e,this.type=t}get hasNode(){return!!this.node}addReplace(e){this.replaces?.push(e)}start(e,t,r){if(!this.node){const n=this.node=new Oe(e,this.text.length,[],r);n.type=this.type,n.startTagEnd=t,this.replaces=[]}}finish(e,t){const r=this.replaces,n=this.node,i=e+(t||0);if(r){for(const o of r){const s=o.parent;if(!s)throw new Error("parent not defined");const a=s.children.indexOf(o);s.children.splice(a,1)}this.replaces=void 0}if(n){const o=n.parent;if(!o)throw new Error("parent not defined");o.children.push(n),n.closed=t!==void 0,n.endTagStart=e,n.end=i,n.content=this.text.substring(n.startTagEnd,e),this.node=void 0}}},Ul=class{constructor(e){k(this,"dataManager",void 0),this.dataManager=e}parse(e,t=[]){const r=Jg(e,void 0,void 0,!0),n=new Oe(0,e.length,[],void 0);n.type=I.ROOT;let i=n,o=-1,s,a=null,l=r.scan();const c=()=>{if(!i.tag){const g=i.parent.children,y=g[g.length-2],A=e.substring(i.start,i.end);y?.type===I.HTML?(y.content=(y.content||"")+A,y.end=i.end,g.splice(g.length-1,1)):(i.type=I.HTML,i.content=A,i.children=[]),i.type=I.HTML}i=i.parent},u=new Wl(e,I.COMMENT),d=new Wl(e,I.DOCTYPE),h=g=>{i.children.push(g)};for(;l!==Ce.EOS;){switch(l){case Ce.StartDoctypeTag:d.start(r.getTokenOffset(),r.getTokenEnd(),i);break;case Ce.EndDoctypeTag:{const C=i.lastChild,O=d.node;if(!O)throw new Error("");const E=C?C.end:i.startTagEnd!==void 0?i.startTagEnd:i.start;if(E!==O.start){const m=e.substring(E,O.start);if(m){const b=new Oe(E,O.start,[],i);b.type=I.HTML,b.content=m,h(b)}}d.finish(r.getTokenOffset(),r.getTokenLength());break}case Ce.StartCommentTag:u.start(r.getTokenOffset(),r.getTokenEnd(),i);break;case Ce.EndCommentTag:{const C=i.lastChild,O=u.node;if(!O)throw new Error("");const E=C?C.end:i.startTagEnd!==void 0?i.startTagEnd:i.start;if(E!==O.start){const m=e.substring(E,O.start);if(m){const b=new Oe(E,O.start,[],i);b.type=I.HTML,b.content=m,h(b)}}u.finish(r.getTokenOffset(),r.getTokenLength());break}case Ce.StartTagOpen:const g=i.lastChild,y=new Oe(r.getTokenOffset(),e.length,[],i),A=g?g.end:i.startTagEnd!==void 0?i.startTagEnd:i.start;if(A!==y.start){const C=e.substring(A,y.start);if(C){const O=new Oe(A,y.start,[],i);O.type=I.HTML,O.content=C,h(O)}}h(y),i=y;break;case Ce.StartTag:i.tag=r.getTokenText();break;case Ce.StartTagClose:i.parent&&(i.end=r.getTokenEnd(),r.getTokenLength()?(i.startTagEnd=r.getTokenEnd(),i.tag&&this.dataManager.isVoidElement(i.tag)&&(i.closed=!0,c())):c());break;case Ce.StartTagSelfClose:i.parent&&(i.closed=!0,i.end=r.getTokenEnd(),i.startTagEnd=r.getTokenEnd(),c());break;case Ce.EndTagOpen:o=r.getTokenOffset(),s=void 0;break;case Ce.EndTag:s=r.getTokenText().toLowerCase();break;case Ce.EndTagClose:let L=i;for(;!L.isSameTag(s)&&L.parent;)L=L.parent;if(L.parent){const C=i.lastChild,O=C?C.end:i.startTagEnd===void 0?i.start:i.startTagEnd;if(O!==o){const E=e.substring(O,o);if(E){const m=new Oe(O,o,[],i);m.type=I.HTML,m.content=E,h(m)}}for(;i!==L;)i.end=o,i.closed=!1,c();i.closed=!0,i.endTagStart=o,i.end=r.getTokenEnd(),c()}break;case Ce.AttributeName:{a=r.getTokenText();let C=i.attributes;C||(i.attributes=C={}),C[a]=null;break}case Ce.AttributeValue:{const C=r.getTokenText(),O=i.attributes;O&&a&&(O[a]=cb(C),a=null);break}}l=r.scan()}for(;i.parent;)i.end=e.length,i.closed=!1,c();u.hasNode,u.finish(e.length);const f=n.lastChild?.end||0;if(f<e.length){const g=e.substring(f);if(g){const y=new Oe(f,e.length,[],n);y.type=I.HTML,y.content=g,h(y)}}return{roots:n.children,findNodeBefore:n.findNodeBefore.bind(n),findNodeAt:n.findNodeAt.bind(n)}}},tM=new Ul(new Bl(["area","base","br","col","embed","hr","img","input","link","meta","source","track","wbr","vk-snippet-end"])),ub=new Bl(["area","base","br","col","embed","hr","img","input","link","meta","source","track","wbr","vk-snippet-end"]),db=new Ul(ub);function Kt(e){return db.parse(e)}function qo(e){if(e){const t=document.createElement("div");return t.insertAdjacentHTML("afterbegin",e),t.firstChild||document.createTextNode("")}else return document.createTextNode("")}var Qt,kt;function fb(e){const t=Qt;return Qt=e,()=>{Qt===e&&(Qt=t)}}function hb(e){const t=kt;return kt=e,()=>{kt===e&&(kt=t)}}function ql(e,t,r){return Qt?Qt(e,t,r):r}function mb(){return kt!==void 0}function Gl(e,t,r){return kt?kt(e,t,r):r}var Go;function pb(){return Go||(Go=document.implementation.createHTMLDocument("")),Go}function gb(e,t){let r;switch(t?.toLowerCase()){case"tr":r=e.createElement("table");break;case"td":r=e.createElement("tr");break;case"head":case"body":r=e.createElement("html");break;case"documenttype":case"html":{const n=e.implementation.createHTMLDocument();for(const i of[...n.childNodes])i.remove();return n}default:r=e.createElement("div")}return r}var bb=new Set(["onclick","onload","onchange","onsubmit","onmouseover","onkeydown","onerror"]),yb=new Set(["script","style","xmp"]);function vb(e,t){return!(t&&yb.has(t.toLowerCase())||bb.has(e.toLowerCase()))}var Eb=e=>{let t=e.indexOf("&");for(;t!==-1;){if(e.indexOf(";",t)!==-1)return!0;t=e.indexOf("&",t+1)}return!1};function Xl(e,t,r){let n=e.tagName.toLowerCase();n==="html"&&(n="div");const i=`<${n} ${t}="${r}"/>`,o=gb(pb(),n);if(o instanceof Document)return;o.innerHTML=i;const s=o.querySelector(n);if(!s)throw new Error("targetElement is not defined");const a=s.getAttributeNode(t);a&&e.setAttributeNode(a.cloneNode())}function st(e,t,r){try{vb(t,e.tagName)&&!Eb(r)?e.setAttribute(t,r):Xl(e,t,r)}catch{Xl(e,t,r)}}function Qn(e,t=!0){const r=e.content;switch(e.type){case I.ROOT:{const n=document.implementation.createHTMLDocument();for(const i of[...n.childNodes])n.removeChild(i);if(t)for(const i of e.children)n.appendChild(Qn(i));return n}case I.DOCTYPE:return new DOMParser().parseFromString(`<!DOCTYPE${e.content}>`,"text/html").doctype;case I.COMMENT:return document.createComment(r||"");case I.ELEMENT:if(e.tag){const n=document.createElement(e.tag);if(Object.defineProperty(n,"$$tagName",{enumerable:!1,configurable:!1,value:e.tag}),e.attributes)for(const i of e.attributeNames){const o=e.attributes[i];try{const s=ql(n,i,typeof o=="string"?o:"");s!==null&&st(n,i,s)}catch{}}if(t)for(const i of e.children)n.appendChild(Qn(i));return n}return document.createTextNode("<");case I.HTML:return qo(r||"");default:throw new Error("unsupported node")}}function xe(e){return Kt(e).roots.map(t=>Qn(t))}function Yl(e,t,r){const n=xe(r);switch(t){case"afterend":e.after(...n);break;case"afterbegin":e.prepend(...n);break;case"beforeend":e.append(...n);break;case"beforebegin":e.before(...n)}}function $e(e,t){e.remove?.(t)}var Xo=ge("SandboxHtmlDocument"),Yo=ge("SandboxRemoteDocument"),Ko=ge("SandboxTextDocument"),Qo=ge("SandboxDocumentMapping"),Kl=ge("SandboxSyncCommit"),Ql=ge("SandboxLayoutProfile"),_b=ge("SandboxState"),Zl=ge("SandboxAttributePipeline"),Jl=ge("SandboxAmpService"),ec=ge("SandboxImageReload"),Zo=ge("SandboxImageCache"),tc=ge("SandboxFocus");function Sb(e){const t=new Fg,r=jg(t),n=fb((o,s,a)=>t.isEmpty?a:jo(o,s,a,{pipeline:t})),i=hb((o,s,a)=>t.isEmpty?a:t.serialize(a,{element:o,tag:o.tagName.toLowerCase(),attribute:s,stage:"apply"}));return e.inject(Zl,t),{pipeline:t,dispose(){i(),n(),r.dispose(),t.dispose(),$e(e,Zl)}}}function wb(e,t){if(!e)return;const{minify:r,cssbeautify:n,HTMLDocument:i}=t;let o=document.head.querySelector('style[em="styles"]'),s="";o?s=i.getInnerHtml(o):(o=document.createElement("style"),o.setAttribute("em","styles"),o=document.head.insertAdjacentElement("beforeend",o));const a=document.createElement("div");a.insertAdjacentHTML("afterbegin",e);let l=r(s+`
2
- `+[...a.querySelectorAll("style")].map(c=>c.innerHTML).join(`
3
- `),{restructure:!0,forceMediaMerge:!0}).css;l=n(l,{indent:" ",autosemicolon:!0}),o.textContent=`
4
- `+l+`
5
- `}function zr(e){return(e||"").replace(/\s/g,"")}function Zn(e,t){return`em-font-${zr(e)}-${zr(t)}`}function rc(e){return e.replace(/([!"#$%&'()*+,./:;<=>?@[\\\]^`{|}~])/g,"\\$1")}function Cb(e){return Zn(e[2]||"",e[3]||"")}var Jo="em-font-custom";function Ab(e){return e[1]==="Project Fonts"}function Tb(e,t){Ab(t)&&e.classList.add(Jo)}function kb(e,t){const r=[...e.classList].filter(n=>n.startsWith(t));r.length>0&&e.classList.remove(...r)}function Lb(e,t,r){t.backgroundColor!==void 0&&(t.backgroundColor===""?(e.removeAttribute("bgcolor"),e.style.removeProperty("background-color"),document.body.style.removeProperty("background-color"),r&&(r.style.color="transparent")):(document.body.style.backgroundColor=t.backgroundColor,e.setAttribute("bgcolor",t.backgroundColor),e.style.backgroundColor=t.backgroundColor,r&&(r.style.color=t.backgroundColor),e.closest(".full-wrap")&&e.closest("body")?.setAttribute("bgcolor",t.backgroundColor))),t.backgroundImage&&(t.backgroundColor===""?(e.style.removeProperty("background-image"),e.removeAttribute("background")):(e.style.removeProperty("background-image"),e.style.backgroundImage=t.backgroundImage[0].type+"("+t.backgroundImage[0].value+")",Fo(e,"background",t.backgroundImage[0].value))),t.backgroundPositionX&&(t.backgroundPositionX==="none"?e.style.removeProperty("background-position-x"):e.style.backgroundPositionX=t.backgroundPositionX!=="initial"?t.backgroundPositionX:""),t.backgroundPositionY&&(t.backgroundPositionY==="none"?e.style.removeProperty("background-position-y"):e.style.backgroundPositionY=t.backgroundPositionY!=="initial"?t.backgroundPositionY:""),t.backgroundRepeat&&(t.backgroundRepeat==="none"?e.style.removeProperty("background-repeat"):e.style.backgroundRepeat=t.backgroundRepeat),t.backgroundSize!==void 0&&(t.backgroundSize===""?e.style.removeProperty("background-size"):e.style.backgroundSize=t.backgroundSize)}function Ob(e){if(!e)return null;const t=(e.closest('[style*="line-height"]')||e.querySelector('[style*="line-height"]'))?.style.lineHeight?.trim();if(!t||t.toLowerCase()==="normal")return null;if(t.includes("px")){const o=parseFloat(t);return Number.isFinite(o)?o:null}const r=e.closest('[style*="font-size"]')?.style.fontSize||getComputedStyle(e).fontSize,n=parseFloat(r);if(!Number.isFinite(n)||n<=0)return null;if(t.includes("%")){const o=parseFloat(t);return Number.isFinite(o)?n*(o/100):null}const i=parseFloat(t);return Number.isFinite(i)?n*i:null}function xb(e){if(!e)return[];const t=[],r=e.style.fontFamily||getComputedStyle(e).fontFamily,n=[...(e.closest('[style*="font-family"]')||e).classList].filter(s=>s.startsWith("em-font-")),i=n.includes(Jo),o=n.filter(s=>s!==Jo);if(o.length>0){t.push("Google Fonts"),t.push(i?"Project Fonts":r.includes("sans-serif")?"Sans Serif":"Serif");const s=o[0].slice(8),a=s.lastIndexOf("-");a>0?t.push(s.slice(0,a),s.slice(a+1)):s&&t.push(s)}else r&&t.push("Safe Fonts",r.replaceAll('"',"'"));return t}function Pb(e,t,r){if(!e||e.tagName==="DIV")return!1;const n=window.getSelection();let i=null;if(n&&n.rangeCount>0){const a=n.getRangeAt(0).commonAncestorContainer;i=a.nodeType===1?a:a.parentElement}const o=a=>{if(!a)return!1;const l=a.tagName.toLowerCase();return l===t||l===r},s=e.closest(t)||(r?e.closest(r):null);return o(e)||!!i&&o(i)||!!s}function Nb(e){if(!e)return!1;const t=e.style.fontWeight||getComputedStyle(e).fontWeight;return t==="bold"||t==="700"||parseInt(t,10)>=700}function Mb(e,t="background-color"){if(!e)return"";let r=e;for(;r;){const n=r.style.getPropertyValue(t);if(n&&n!=="transparent"&&n!=="inherit")return n;r=r.parentElement}return""}function Rb(){const e=window.getSelection();if(!e||e.rangeCount===0)return null;const t=e.getRangeAt(0).commonAncestorContainer;return t.nodeType===1?t:t.parentElement}function Db(e){return!!e.closest(".em-show-td-mobile")||!!e.closest(".em-show-table-mobile")||!!e.closest(".em-show-div-mobile")||e.classList.contains("em-show-img-mobile")||!!e.closest(".desktop_hide")}function Ib(){const e=window.getSelection();if(!e||e.rangeCount===0)return!1;let t=e.anchorNode,r=e.focusNode;t?.nodeType===3&&(t=t.parentNode),r?.nodeType===3&&(r=r.parentNode);const n=t?.closest?.("a"),i=r?.closest?.("a");return!!(n?.getAttribute("href")||i?.getAttribute("href"))}function nc(e){const t={all:{width:null,style:null,color:null},top:{width:null,style:null,color:null},right:{width:null,style:null,color:null},bottom:{width:null,style:null,color:null},left:{width:null,style:null,color:null}};if(parseInt(e.style.border)||parseInt(e.style.borderTop)||parseInt(e.style.borderRight)||parseInt(e.style.borderBottom)||parseInt(e.style.borderLeft)||parseInt(e.style.borderTopWidth)||parseInt(e.style.borderRightWidth)||parseInt(e.style.borderBottomWidth)||parseInt(e.style.borderLeftWidth)||e.style.borderStyle||e.style.borderTopStyle||e.style.borderRightStyle||e.style.borderBottomStyle||e.style.borderLeftStyle||e.style.borderColor||e.style.borderTopColor||e.style.borderRightColor||e.style.borderBottomColor||e.style.borderLeftColor)if(e.style.border){const r=e.style.border.split(" "),n=parseInt(r[0]),i=r[1]||null,o=ye(r[2]+r[3]+r[4])||null;t.all={width:n,style:i,color:o},t.top={width:n,style:i,color:o},t.right={width:n,style:i,color:o},t.bottom={width:n,style:i,color:o},t.left={width:n,style:i,color:o}}else if((e.style.borderWidth||e.style.borderStyle||e.style.borderColor)&&e.style.borderWidth.indexOf(" ")===-1&&e.style.borderStyle.indexOf(" ")===-1&&(!e.style.borderColor||(ye(e.style.borderColor)||"").indexOf(" ")===-1))e.style.borderWidth&&e.style.borderWidth.indexOf(" ")===-1&&(t.all.width=parseInt(e.style.borderWidth)),e.style.borderStyle&&(t.all.style=e.style.borderStyle),e.style.borderColor&&(t.all.color=ye(e.style.borderColor)||null);else{if(e.style.borderTop){const r=e.style.borderTop.split(" ");t.top.width=parseInt(r[0]),t.top.style=r[1]||null,t.top.color=ye(r[2]+r[3]+r[4])||null}else e.style.borderTopWidth&&(t.top.width=parseInt(e.style.borderTopWidth)),e.style.borderTopStyle&&(t.top.style=e.style.borderTopStyle),e.style.borderTopColor&&(t.top.color=ye(e.style.borderTopColor)||null);if(e.style.borderRight){const r=e.style.borderRight.split(" ");t.right.width=parseInt(r[0]),t.right.style=r[1]||null,t.right.color=ye(r[2]+r[3]+r[4])||null}else e.style.borderRightWidth&&(t.right.width=parseInt(e.style.borderRightWidth)),e.style.borderRightStyle&&(t.right.style=e.style.borderRightStyle),e.style.borderRightColor&&(t.right.color=ye(e.style.borderRightColor)||null);if(e.style.borderBottom){const r=e.style.borderBottom.split(" ");t.bottom.width=parseInt(r[0]),t.bottom.style=r[1]||null,t.bottom.color=ye(r[2]+r[3]+r[4])||null}else e.style.borderBottomWidth&&(t.bottom.width=parseInt(e.style.borderBottomWidth)),e.style.borderBottomStyle&&(t.bottom.style=e.style.borderBottomStyle),e.style.borderBottomColor&&(t.bottom.color=ye(e.style.borderBottomColor)||null);if(e.style.borderLeft){const r=e.style.borderLeft.split(" ");t.left.width=parseInt(r[0]),t.left.style=r[1]||null,t.left.color=ye(r[2]+r[3]+r[4])||null}else e.style.borderLeftWidth&&(t.left.width=parseInt(e.style.borderLeftWidth)),e.style.borderLeftStyle&&(t.left.style=e.style.borderLeftStyle),e.style.borderLeftColor&&(t.left.color=ye(e.style.borderLeftColor)||null)}return t}function ic(e){const t={all:null,topLeft:null,topRight:null,bottomRight:null,bottomLeft:null};return(e.style.borderRadius||e.style.borderTopLeftRadius||e.style.borderTopRightRadius||e.style.borderBottomRightRadius||e.style.borderBottomLeftRadius)&&(!e.style.borderRadius||e.style.borderRadius.indexOf(" ")>-1?t.all=null:t.all=parseFloat(e.style.borderRadius),t.topLeft=e.style.borderTopLeftRadius?parseFloat(e.style.borderTopLeftRadius):null,t.topRight=e.style.borderTopRightRadius?parseFloat(e.style.borderTopRightRadius):null,t.bottomRight=e.style.borderBottomRightRadius?parseFloat(e.style.borderBottomRightRadius):null,t.bottomLeft=e.style.borderBottomLeftRadius?parseFloat(e.style.borderBottomLeftRadius):null),t}function oc(e){let t=null;if(e.style.boxShadow){const r=e.style.boxShadow.match(/[^\s\(]+(\(.+\))?/g);r&&(t={hOffset:r[1]?parseFloat(r[1]):null,vOffset:r[2]?parseFloat(r[2]):null,blurRadius:r[3]&&r[3]!=="inset"?parseFloat(r[3]):null,spreadRadius:r[4]&&r[4]!=="inset"?parseFloat(r[4]):null,color:r[0]&&ye(r[0])||"",inset:r[3]==="inset"||r[4]==="inset"||r[5]==="inset"})}return t}function Bb(e){if(!e)return null;const t=e.style;if(t.border&&parseInt(t.borderWidth||t.border)>0)return"all";const r=!!(t.borderTop||t.borderTopWidth&&parseInt(t.borderTopWidth)>0),n=!!(t.borderRight||t.borderRightWidth&&parseInt(t.borderRightWidth)>0),i=!!(t.borderBottom||t.borderBottomWidth&&parseInt(t.borderBottomWidth)>0),o=!!(t.borderLeft||t.borderLeftWidth&&parseInt(t.borderLeftWidth)>0);return r&&n&&i&&o?"all":r&&!n&&!i&&!o?"top":!r&&n&&!i&&!o?"right":!r&&!n&&i&&!o?"bottom":!r&&!n&&!i&&o?"left":r?"top":n?"right":i?"bottom":o?"left":null}function sc(e){const{elem:t,settings:r}=e,{border:n}=r;n&&(n.all?n.all.width!=null&&(n.all.style||n.all.color)?(t.style.borderWidth=n.all.width+"px",n.all.style&&(t.style.borderStyle=n.all.style),n.all.color&&(t.style.borderColor=n.all.color)):t.style.removeProperty("border"):(n.top&&(n.top.width!=null&&(n.top.style||n.top.color)?(t.style.borderTopWidth=n.top.width+"px",n.top.style&&(t.style.borderTopStyle=n.top.style),n.top.color&&(t.style.borderTopColor=n.top.color)):t.style.removeProperty("border-top")),n.right&&(n.right.width!=null&&(n.right.style||n.right.color)?(t.style.borderRightWidth=n.right.width+"px",n.right.style&&(t.style.borderRightStyle=n.right.style),n.right.color&&(t.style.borderRightColor=n.right.color)):t.style.removeProperty("border-right")),n.bottom&&(n.bottom.width!=null&&(n.bottom.style||n.bottom.color)?(t.style.borderBottomWidth=n.bottom.width+"px",n.bottom.style&&(t.style.borderBottomStyle=n.bottom.style),n.bottom.color&&(t.style.borderBottomColor=n.bottom.color)):t.style.removeProperty("border-bottom")),n.left&&(n.left.width!=null&&(n.left.style||n.left.color)?(t.style.borderLeftWidth=n.left.width+"px",n.left.style&&(t.style.borderLeftStyle=n.left.style),n.left.color&&(t.style.borderLeftColor=n.left.color)):t.style.removeProperty("border-left"))))}function Fb(e){const{elem:t,settings:r}=e,{boxShadow:n}=r;if(n)if(n.hOffset!=null&&n.vOffset!=null){let i="";i=n.inset?"inset ":"",i+=n.hOffset+"px ",i+=n.vOffset+"px ",i+=n.blurRadius!==void 0&&n.blurRadius!==null?n.blurRadius+"px ":"",i+=n.spreadRadius!==void 0&&n.spreadRadius!==null?n.spreadRadius+"px ":"",i+=n.color?n.color:"",t.style.boxShadow=i}else t.style.removeProperty("box-shadow")}function ac(e){const{elem:t,settings:r}=e,{borderRadius:n}=r;n&&(n.all?t.style.borderRadius=n.all+"px":(n.topLeft!==null&&n.topLeft!==void 0?t.style.borderTopLeftRadius=n.topLeft+"px":t.style.removeProperty("border-top-left-radius"),n.topRight!==null&&n.topRight!==void 0?t.style.borderTopRightRadius=n.topRight+"px":t.style.removeProperty("border-top-right-radius"),n.bottomRight!==null&&n.bottomRight!==void 0?t.style.borderBottomRightRadius=n.bottomRight+"px":t.style.removeProperty("border-bottom-right-radius"),n.bottomLeft!==null&&n.bottomLeft!==void 0?t.style.borderBottomLeftRadius=n.bottomLeft+"px":t.style.removeProperty("border-bottom-left-radius")))}function ie(){if(!document.head.querySelector('style[em="styles"]')){const e=document.createElement("style");e.setAttribute("em","styles"),document.head.append(e)}}function jb(){if(!document.head.querySelector("style")){const r=document.createElement("style"),n=document.querySelector('[em="block"]');if(n){const i=n.offsetWidth;r.innerHTML=`@media only screen and (max-device-width: ${i}px), only screen and (max-width: ${i}px) {}`}document.head.appendChild(r)}let e=null;const t=document.head.querySelectorAll("style");for(const r of Array.from(t)){const n=r.innerHTML.match(/@media.*?max((.|\n|\r)*?){/);if(n){e=n[0];break}}return e===null&&(e="@media only screen and (max-device-width: 660px), only screen and (max-width: 660px) {"),e}function $b(e,t){const r=[];e.classList.forEach(n=>{n.indexOf(t)>-1&&r.push(n)}),r.forEach(n=>e.classList.remove(n))}function lc(e){const t=e.elem.getAttribute("class");if(t){const r=t.split(" ");for(const n of r)n.indexOf("em-mob-padding_"+e.position)>-1&&e.elem.classList.remove(n)}}function es(){return _e.get("commonStyles")}var Jn={Thin:"100","Thin Italic":"100i",ExtraLight:"200","ExtraLight Italic":"200i",Light:"300","Light Italic":"300i",Regular:"400","Regular Italic":"400i",Medium:"500","Medium Italic":"500i",SemiBold:"600","SemiBold Italic":"600i",Bold:"700","Bold Italic":"700i",ExtraBold:"800","ExtraBold Italic":"800i",Black:"900","Black Italic":"900i"},cc={"Sans Serif":"sans-serif",Serif:"serif"},Hb="#1C52DC",rM="#1C52DC",nM="#1C52DC",Vr="em_version";function ei(e){if(!e||!e.includes("em_version"))return e;try{const t=typeof document<"u"?document.baseURI:"http://localhost/",r=new URL(e,t);return r.searchParams.has("em_version")?(r.searchParams.delete(Vr),/^https?:\/\//i.test(e)||e.startsWith("//")?r.href:r.pathname+r.search+r.hash):e}catch{return e}}function zb(e){try{const t=typeof document<"u"?document.baseURI:"http://localhost/",r=new URL(e,t);return r.searchParams.set(Vr,String(Date.now())),/^https?:\/\//i.test(e)||e.startsWith("//")?r.href:r.pathname+r.search+r.hash}catch{return`${e}${e.includes("?")?"&":"?"}${Vr}=${Date.now()}`}}var ti="none",uc="b64_",Vb=/^(\d+(?:_\d+)?)(px|perc)$/;function Wb(e){if(e===ti)return ti;let t="";return new TextEncoder().encode(ei(e)).forEach(r=>{t+=String.fromCharCode(r)}),uc+btoa(t).replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/,"")}function Ub(e){if(e===ti)return ti;if(!e.startsWith(uc))return e.replace(/em-doubledots/gi,":").replace(/em-dot/gi,".").replace(/em-slash/gi,"/");try{const t=atob(e.slice(4).replace(/-/g,"+").replace(/_/g,"/")),r=Uint8Array.from(t,n=>n.charCodeAt(0));return new TextDecoder("utf-8",{fatal:!0}).decode(r)}catch{return""}}function qb(e){return`url("${e.replace(/[\n\r\f]/g,"").replace(/\\/g,"\\\\").replace(/"/g,'\\"')}")`}function dc(e){return e.replace(/\./g,"_").replace(/%/g,"perc")}function fc(e){const t=e.match(Vb);return t?t[1].replace("_",".")+(t[2]==="perc"?"%":"px"):e}function Gb(){return document.head.querySelector('style[em="styles"]')}function te(e,t){const r=Gb();r&&r.insertAdjacentHTML("beforeend",`
6
- ${jb()}
7
- .${e} { ${t} }
8
- }
9
- `)}function G(e,t){const r=[];e.classList.forEach(n=>{n.indexOf(t)>-1&&r.push(n)}),r.forEach(n=>e.classList.remove(n))}function Xb(e){const t=e.settings.mobileWidth;if(t.value!=null){let r="";if(t.dim?r=t.classNamePrefix+t.value+(t.dim==="%"?"perc":"px"):r=t.classNamePrefix+t.value,G(e.elem,t.classNamePrefix),e.elem.classList.add(r),ie(),t.dim)te(r,`width: ${t.value}${t.dim} !important; max-width: ${t.value}${t.dim} !important; min-width: ${t.value}${t.dim} !important;`);else{const n=t.value!=="auto"?t.value:"none";te(r,`width: ${t.value} !important; max-width: ${t.value} !important; min-width: ${n} !important;`)}}else G(e.elem,t.classNamePrefix)}function Yb(e){const t=e.settings.mobileContentWidth;if(t.value!=null){let r="";t.dim?r=t.classNamePrefix+t.value+(t.dim==="%"?"perc":"px"):r=t.classNamePrefix+t.value,G(e.elem,t.classNamePrefix),e.elem.classList.add(r),ie(),t.dim?te(r,`width: ${t.value}${t.dim} !important; max-width: ${t.value}${t.dim} !important; min-width: ${t.value}${t.dim} !important;`):te(r,`width: ${t.value} !important; max-width: ${t.value} !important; min-width: ${t.value}${t.dim} !important;`)}else G(e.elem,t.classNamePrefix)}function ri(e){const t=e.settings.mobileHeight;if(t.value!=null){let r="";t.dim?r=t.classNamePrefix+t.value+(t.dim==="%"?"perc":"px"):r=t.classNamePrefix+t.value,G(e.elem,t.classNamePrefix),e.elem.classList.add(r),ie(),t.dim?te(r,`height: ${t.value}${t.dim} !important;`):te(r,`height: ${t.value} !important;`)}else G(e.elem,t.classNamePrefix)}function Kb(e){const t=["all","top","right","bottom","left"],r={all:"em-mob-border_all-",top:"em-mob-border_top-",right:"em-mob-border_right-",bottom:"em-mob-border_bottom-",left:"em-mob-border_left-"},n=Object.values(r);e.elem.classList.forEach(o=>{n.some(s=>o.includes(s))&&e.elem.classList.remove(o)});const i=e.settings.mobileBorder;t.forEach(o=>{const s=i[o];if(s&&(parseInt(String(s.width))||s.style||s.color)){let a=(s.classNamePrefix||r[o])+(s.width!=null?s.width+"px":"")+(s.style?"_"+s.style:"")+(s.color?"_"+s.color.substring(1):"");e.elem.classList.add(a),ie();let l="";o==="all"?l=(s.width!=null?`border-width: ${s.width}px !important; `:"")+(s.style?`border-style: ${s.style} !important; `:"")+(s.color?`border-color: ${s.color} !important; `:""):l=(s.width!=null?`border-${o}-width: ${s.width}px !important; `:"")+(s.style?`border-${o}-style: ${s.style} !important; `:"")+(s.color?`border-${o}-color: ${s.color} !important; `:""),te(a,l)}})}function Qb(e){const t=e.settings.mobileBorderRadius;if(!t)return;const r=["all","topLeft","topRight","bottomRight","bottomLeft"].find(s=>s in t);if(!r)return;const n=t.classNamePrefix||`em-mob-border_radius_${r}-`,i=t[r],o=typeof i=="object"&&i!==null&&"value"in i?i.value:i;if(r==="all"&&o==null){Array.from(e.elem.classList).forEach(s=>{s.startsWith("em-mob-border_radius_")&&e.elem.classList.remove(s)});return}if(o!=null){const s=n+o;e.elem.classList.forEach(a=>{a.indexOf(n)>-1&&e.elem.classList.remove(a)}),r==="all"&&Array.from(e.elem.classList).forEach(a=>{a.startsWith("em-mob-border_radius_")&&e.elem.classList.remove(a)}),e.elem.classList.add(s),ie(),te(s,`${{all:"border-radius",topLeft:"border-top-left-radius",topRight:"border-top-right-radius",bottomRight:"border-bottom-right-radius",bottomLeft:"border-bottom-left-radius"}[r]||"border-radius"}: ${o}px !important;`),r!=="all"&&["em-mob-border_radius_topLeft","em-mob-border_radius_topRight","em-mob-border_radius_bottomLeft","em-mob-border_radius_bottomRight"].every(a=>Array.from(e.elem.classList).some(l=>l.startsWith(a)))&&G(e.elem,"em-mob-border_radius_all-")}else e.elem.classList.forEach(s=>{s.indexOf(n)>-1&&e.elem.classList.remove(s)})}function Zb(e){const t=e.settings.mobileBoxShadow,r=t.classNamePrefix||"em-mob-box_shadow-";if(t.hOffset!=null||t.vOffset!=null||t.blurRadius!=null||t.spreadRadius!=null){const n=t.hOffset!=null?`${t.hOffset}px`:"0px",i=t.vOffset!=null?`${t.vOffset}px`:"0px",o=t.blurRadius!=null?`${t.blurRadius}px`:"0px",s=t.spreadRadius!=null?`${t.spreadRadius}px`:"0px",a=t.color||"#000000",l=t.inset?" inset":"",c=r+(t.hOffset!=null?t.hOffset+"px":"0px")+"_"+(t.vOffset!=null?t.vOffset+"px":"0px")+"_"+(t.blurRadius!=null?t.blurRadius+"px":"0px")+"_"+(t.spreadRadius!=null?t.spreadRadius+"px":"0px")+"_"+(t.color?t.color.substring(1):"000000")+(t.inset?"_inset":"");G(e.elem,r),e.elem.classList.add(c),ie(),te(c,`box-shadow:${l} ${n} ${i} ${o} ${s} ${a} !important;`)}else if(t.value){const n=(t.classNamePrefix||"em-mob-boxshadow_")+t.value.replace(/\s/g,"_").replace(/\(/g,"").replace(/\)/g,"").replace(/,/g,"-");G(e.elem,t.classNamePrefix||"em-mob-boxshadow_"),e.elem.classList.add(n),ie(),te(n,`box-shadow: ${t.value} !important;`)}else G(e.elem,r)}function Jb(e){const t=e.fieldName??"mobileAlign",r=e.settings[t];if(r.value){const n=r.classNamePrefix+r.value;G(e.elem,r.classNamePrefix),e.elem.classList.add(n),ie(),te(n,`text-align: ${r.value} !important;`)}else G(e.elem,r.classNamePrefix)}function ey(e){const t=e.settings.mobileAlign;if(t.value){const r=t.classNamePrefix+t.value;G(e.elem,t.classNamePrefix),e.elem.classList.add(r),ie();let n="";t.value==="left"||t.value==="right"?n=`float: ${t.value}`:n="margin: 0 auto",te(r,`${n} !important;`)}else G(e.elem,t.classNamePrefix)}function ty(e){const t=e.settings.mobileVerticalAlign;if(t.value){const r=t.classNamePrefix+t.value;G(e.elem,t.classNamePrefix),e.elem.classList.add(r),ie(),te(r,`vertical-align: ${t.value} !important;`)}else G(e.elem,t.classNamePrefix)}function ry(e){const t=e.settings.mobileDirection;if(t.value){const r=t.classNamePrefix+t.value;G(e.elem,t.classNamePrefix),e.elem.classList.add(r),ie(),te(r,`direction: ${t.value} !important;`)}else G(e.elem,t.classNamePrefix)}function ny(e){const t=e.settings.mobileBackgroundColor;if(t.value){const r=t.value!=="none"?String(t.value).substring(1):"none",n=t.classNamePrefix+r;G(e.elem,t.classNamePrefix),e.elem.classList.add(n),ie(),te(n,`background-color: ${t.value!=="none"?t.value:"transparent"} !important;`)}else G(e.elem,t.classNamePrefix)}function iy(e){const t=e.settings.mobileBackgroundImage[0];if(t.value){const r=String(t.value),n=t.classNamePrefix+Wb(r);G(e.elem,t.classNamePrefix),e.elem.classList.add(n),ie(),te(n,`background-image: ${r!=="none"?qb(ei(r)):"none"} !important;`)}else G(e.elem,t.classNamePrefix)}function oy(e){const t=e.settings.mobileBackgroundPositionX;if(t.value){const r=t.classNamePrefix+dc(String(t.value));G(e.elem,t.classNamePrefix),e.elem.classList.add(r),ie(),te(r,`background-position-x: ${t.value} !important;`)}else G(e.elem,t.classNamePrefix)}function sy(e){const t=e.settings.mobileBackgroundPositionY;if(t.value){const r=t.classNamePrefix+dc(String(t.value));G(e.elem,t.classNamePrefix),e.elem.classList.add(r),ie(),te(r,`background-position-y: ${t.value} !important;`)}else G(e.elem,t.classNamePrefix)}function ay(e){const t=e.settings.mobileBackgroundRepeat;if(t.value&&t.value!=="none"){const r=t.classNamePrefix+t.value;G(e.elem,t.classNamePrefix),e.elem.classList.add(r),ie(),te(r,`background-repeat: ${t.value} !important;`)}else G(e.elem,t.classNamePrefix)}function ly(e){const t=e.settings.mobileBackgroundSize;if(t.value){const r=t.classNamePrefix+t.value;G(e.elem,t.classNamePrefix),e.elem.classList.add(r),ie(),te(r,`background-size: ${t.value} !important;`)}else G(e.elem,t.classNamePrefix)}function Wr(e){const t=e.settings.mobilePadding;ie(),["top","right","bottom","left"].forEach(r=>{const n=t[r];if(n!=null){lc({elem:e.elem,position:r});const i=t.classNamePrefix+r+"-"+n;e.elem.classList.add(i),te(i,`padding-${r}: ${n}px !important;`)}else n===null&&lc({elem:e.elem,position:r})})}function cy(e){const t=e.settings.mobileFontSize;if(t.value!=null){const r=t.classNamePrefix+t.value+"px";G(e.elem,t.classNamePrefix),e.elem.classList.add(r),ie(),te(r,`font-size: ${t.value}px !important;`)}else G(e.elem,t.classNamePrefix)}function uy(e){const t=e.settings.mobileLineHeight;if(t&&t.value!==null){const r=t.classNamePrefix+t.value+"px";G(e.elem,t.classNamePrefix),e.elem.classList.add(r),ie(),te(r,`line-height: ${t.value}px !important;`)}else t&&G(e.elem,t.classNamePrefix)}function dy(e){const t=e.settings.show,r=()=>{e.elem.style.removeProperty("display"),e.elem.tagName==="IMG"&&(e.elem.style.display="block"),e.elem.previousSibling&&e.elem.previousSibling.textContent?.indexOf("mso")!==-1&&e.elem.previousSibling.remove(),e.elem.nextSibling&&e.elem.nextSibling.textContent?.indexOf("endif")!==-1&&e.elem.nextSibling.remove()};if(t!=="all"){const n="em-show-"+e.elem.tagName?.toLowerCase()+"-"+t;if(e.elem.classList.forEach(i=>{i.indexOf("em-show-")>-1&&e.elem.classList.remove(i)}),e.elem.classList.add(n),ie(),t==="mobile"){e.elem.style.display="none",(!e.elem.previousSibling||e.elem.previousSibling.textContent?.indexOf("mso")===-1)&&(e.elem.insertAdjacentHTML("beforebegin","<!--[if !mso]><!-->"),e.elem.insertAdjacentHTML("afterend","<!--<![endif]-->"));let i="block";e.elem.tagName==="TD"?i="table-cell":e.elem.tagName==="IMG"?i="block":e.elem.tagName==="TABLE"&&(i="table"),te(n,`display: ${i} !important;`)}t==="desktop"&&(r(),te(n,"display: none !important;"))}else r(),e.elem.classList.forEach(n=>{n.indexOf("em-show-")>-1&&e.elem.classList.remove(n)})}function fy(e){const t=e.settings.isContrastBlock,r=es();if(t){e.elem.closest('[em="block"]')?.classList.add("em-contrast-block");const n=r.block?.contrastBackgroundColor||"#1C52DC";e.elem.setAttribute("bgcolor",n),e.elem.style.backgroundColor=n;const i=e.elem.querySelectorAll('div[style*="font-family"]');i.forEach(o=>{const s=o;!s.style.display&&parseFloat(s.style.fontSize)<=20&&(s.style.color=r.text?.contrastColor||"#FFFFFF")}),i.forEach(o=>{const s=o;!s.style.display&&parseFloat(s.style.fontSize)>20&&(s.style.color=r.headings?.contrastColor||"#FFFFFF")}),e.elem.querySelectorAll('a[style*="color"]').forEach(o=>{const s=o;s.style.display||(s.style.color=r.links?.contrastColor||"#FFFFFF")}),e.elem.querySelectorAll('a[style*="font-family"]').forEach(o=>{const s=o;if(s.style.display&&s.style.display==="block"){s.style.color=r.buttons?.contrastColor||"#1C52DC";const a=s.closest("td");if(a){const l=r.buttons?.contrastBackgroundColor||"#FFFFFF";a.setAttribute("bgcolor",l),a.style.backgroundColor=l}}})}else{e.elem.closest('[em="block"]')?.classList.remove("em-contrast-block");const n=r.block?.backgroundColor||"#FFFFFF";e.elem.setAttribute("bgcolor",n),e.elem.style.backgroundColor=n;const i=e.elem.querySelectorAll('div[style*="font-family"]');i.forEach(o=>{const s=o;!s.style.display&&parseFloat(s.style.fontSize)<=20&&(s.style.color=r.text?.color||"")}),i.forEach(o=>{const s=o;!s.style.display&&parseFloat(s.style.fontSize)>20&&(s.style.color=r.headings?.color||"")}),e.elem.querySelectorAll('a[style*="color"]').forEach(o=>{const s=o;s.style.display||(s.style.color=r.links?.color||"")}),e.elem.querySelectorAll('a[style*="font-family"]').forEach(o=>{const s=o;if(s.style.display&&s.style.display==="block"){s.style.color=r.buttons?.color||"";const a=s.closest("td");if(a){const l=r.buttons?.backgroundColor||"";a.setAttribute("bgcolor",l),a.style.backgroundColor=l}}})}}function hy(){return{mobileWidth:null,mobileWidthDim:"px",mobileHeight:null,mobileHeightDim:"px",mobileBorder:{all:{width:null,style:null,color:null},top:{width:null,style:null,color:null},right:{width:null,style:null,color:null},bottom:{width:null,style:null,color:null},left:{width:null,style:null,color:null}},mobileBorderRadius:{all:null,topLeft:null,topRight:null,bottomRight:null,bottomLeft:null},mobileBoxShadow:{hOffset:null,vOffset:null,blurRadius:null,spreadRadius:null,color:null,inset:null},mobileAlign:{value:""},mobileTextAlign:{value:""},mobileVerticalAlign:{value:""},mobileDirection:{value:""},mobileBackgroundColor:{value:""},mobileBackgroundImage:[{type:"url",value:""}],mobileBackgroundPositionX:{value:""},mobileBackgroundPositionY:{value:""},mobileBackgroundRepeat:{value:"none"},mobileBackgroundSize:{value:""},mobilePadding:{all:null,bottom:null,left:null,right:null,top:null},show:"all",mobileFontSize:null,mobileFontSizeDim:"px"}}function ts(e,t=!1){const r=hy();return e.elem?.classList?.forEach(n=>{if(n.indexOf("em-mob-width-")>-1&&(n.substring(n.length-2)==="px"?(r.mobileWidthDim="px",r.mobileWidth=parseFloat(n.substring(13,n.length-2))):n.substring(n.length-4)==="perc"?(r.mobileWidthDim="%",r.mobileWidth=parseFloat(n.substring(13,n.length-4))):n.substring(n.length-4)==="auto"&&(r.mobileWidthDim="px",r.mobileWidth="auto")),n.indexOf("em-mob-height-")>-1&&(n.substring(n.length-2)==="px"?(r.mobileHeightDim="px",r.mobileHeight=parseFloat(n.substring(14,n.length-2))):n.substring(n.length-4)==="perc"?(r.mobileHeightDim="%",r.mobileHeight=parseFloat(n.substring(14,n.length-4))):n.substring(n.length-4)==="auto"&&(r.mobileHeightDim="px",r.mobileHeight="auto")),n.indexOf("em-mob-border")>-1){if(n.substring(14,17)==="all"){const i=n.substring(18).split("_");r.mobileBorder.all.width=parseFloat(i[0]),r.mobileBorder.all.style=i[1],r.mobileBorder.all.color=i[2]?"#"+i[2]:""}if(n.substring(14,17)==="top"){const i=n.substring(18).split("_");r.mobileBorder.top.width=parseFloat(i[0]),r.mobileBorder.top.style=i[1],r.mobileBorder.top.color=i[2]?"#"+i[2]:""}if(n.substring(14,19)==="right"){const i=n.substring(20).split("_");r.mobileBorder.right.width=parseFloat(i[0]),r.mobileBorder.right.style=i[1],r.mobileBorder.right.color=i[2]?"#"+i[2]:""}if(n.substring(14,20)==="bottom"){const i=n.substring(21).split("_");r.mobileBorder.bottom.width=parseFloat(i[0]),r.mobileBorder.bottom.style=i[1],r.mobileBorder.bottom.color=i[2]?"#"+i[2]:""}if(n.substring(14,18)==="left"){const i=n.substring(19).split("_");r.mobileBorder.left.width=parseFloat(i[0]),r.mobileBorder.left.style=i[1],r.mobileBorder.left.color=i[2]?"#"+i[2]:""}}if(n.indexOf("em-mob-border_radius")>-1&&(n.substring(21,28)==="topLeft"&&(r.mobileBorderRadius.topLeft=parseFloat(n.substring(29))),n.substring(21,29)==="topRight"&&(r.mobileBorderRadius.topRight=parseFloat(n.substring(30))),n.substring(21,32)==="bottomRight"&&(r.mobileBorderRadius.bottomRight=parseFloat(n.substring(33))),n.substring(21,31)==="bottomLeft"&&(r.mobileBorderRadius.bottomLeft=parseFloat(n.substring(32))),n.substring(21,24)==="all"&&(r.mobileBorderRadius.all=parseFloat(n.substring(25)))),n.indexOf("em-mob-box_shadow")>-1){const i=n.substring(18).split("_");r.mobileBoxShadow.hOffset=parseFloat(i[0]),r.mobileBoxShadow.vOffset=parseFloat(i[1]),r.mobileBoxShadow.blurRadius=parseFloat(i[2]),r.mobileBoxShadow.spreadRadius=parseFloat(i[3]),r.mobileBoxShadow.color=i[4]?"#"+i[4]:"",r.mobileBoxShadow.inset=!!i[5]}n.indexOf("em-mob-text_align")>-1&&(r.mobileAlign.value=n.substring(18)),n.indexOf("em-mob-table_align")>-1&&(r.mobileAlign.value=n.substring(19)),n.indexOf("em-mob-vertical_align")>-1&&(r.mobileVerticalAlign.value=n.substring(22)),n.indexOf("em-mob-direction")>-1&&(r.mobileDirection.value=n.substring(17)),n.indexOf("em-mob-background_color")>-1&&(r.mobileBackgroundColor.value=n.substring(24)!=="none"?"#"+n.substring(24):"none"),n.indexOf("em-mob-background_image")>-1&&(r.mobileBackgroundImage[0].value=Ub(n.substring(24))),n.indexOf("em-mob-background_position_x")>-1&&(r.mobileBackgroundPositionX.value=fc(n.substring(29))),n.indexOf("em-mob-background_position_y")>-1&&(r.mobileBackgroundPositionY.value=fc(n.substring(29))),n.indexOf("em-mob-background_repeat")>-1&&(r.mobileBackgroundRepeat.value=n.substring(25)),n.indexOf("em-mob-background_size")>-1&&(r.mobileBackgroundSize.value=n.substring(23)),n.indexOf("em-mob-padding")>-1&&(n.substring(15,18)==="all"&&(r.mobilePadding.all=parseFloat(n.substring(19))),n.substring(15,18)==="top"&&(r.mobilePadding.top=parseFloat(n.substring(19))),n.substring(15,20)==="right"&&(r.mobilePadding.right=parseFloat(n.substring(21))),n.substring(15,21)==="bottom"&&(r.mobilePadding.bottom=parseFloat(n.substring(22))),n.substring(15,19)==="left"&&(r.mobilePadding.left=parseFloat(n.substring(20)))),n.indexOf("em-show")>-1&&(n.substring(n.length-6)==="mobile"?r.show="mobile":n.substring(n.length-7)==="desktop"&&(r.show="desktop")),t&&(n==="em-amp-show-only"?r.ampShow="amp":n==="em-amp-show-disabled"&&(r.ampShow="html")),n.indexOf("em-mob-font_size")>-1&&(r.mobileFontSizeDim="px",r.mobileFontSize=n.substring(17,n.length-2)),n.indexOf("em-mob-line_height")>-1&&(r.mobileLineHeight=n.substring(19,n.length-2))}),r}var ni=[];function my(e){return ni.push(e),{dispose:()=>{const t=ni.indexOf(e);t!==-1&&ni.splice(t,1)}}}function hc(e){for(const t of ni){const r=t(e);if(r)return r}return e}function py(){const e=document.querySelector("[em-edit]");return e?hc(e):null}function gy(e){return e?e.backgroundImage!==void 0||e.backgroundColor!==void 0||e.backgroundSize!==void 0||e.backgroundRepeat!==void 0||e.width!==void 0||e.height!==void 0:!1}var mc=/\[if[^\]]*mso[^\]]*\]/i,pc="[if gte mso 9]></v:textbox></v:rect><![endif]";function by(e){const t=e.style.backgroundImage;if(t&&t!=="none"){const r=t.match(/url\(["']?([^"')]+)["']?\)/i);if(r)return r[1]}return e.getAttribute("background")||e.getAttribute("data-bg-image")||""}function yy(e){return(e.style.backgroundRepeat||"").trim().toLowerCase().startsWith("repeat")?"tile":"frame"}function vy(e){const t=Math.round(e.getBoundingClientRect().width);if(t)return t;const r=(e.getAttribute("width")||"").trim();return r&&!r.includes("%")&&parseInt(r,10)||0}function Ey(e,t,r,n){const i=t?` color="${t}"`:"";return`[if gte mso 9]><v:rect xmlns:v="urn:schemas-microsoft-com:vml" fill="true" stroke="false" style="${n?`width:${n}px;`:"mso-width-percent:1000;"}"><v:fill type="${r}" src="${e}"${i} /><v:textbox style="mso-fit-shape-to-text:true" inset="0,0,0,0"><![endif]`}function gc(e){return!!e&&e.nodeType===Node.COMMENT_NODE}function Ur(e){if(!gc(e))return!1;const t=e.nodeValue||"";return mc.test(t)&&/src\s*=/i.test(t)&&/v:(fill|image|rect)/i.test(t)}function rs(e){if(!gc(e))return!1;const t=e.nodeValue||"";return mc.test(t)&&/<\/v:(rect|image|textbox)>/i.test(t)&&!/src\s*=/i.test(t)}function ns(e){let t=e.previousSibling;for(;t&&t.nodeType===Node.TEXT_NODE&&!(t.nodeValue||"").trim();)t=t.previousSibling;return t}function bc(e){let t=e.nextSibling;for(;t&&t.nodeType===Node.TEXT_NODE&&!(t.nodeValue||"").trim();)t=t.nextSibling;return t}function yc(e){for(const t of Array.from(e.childNodes))(Ur(t)||rs(t))&&e.removeChild(t)}function is(e,t="inside"){return t==="around"?Ur(ns(e)):Array.from(e.childNodes).some(r=>Ur(r))}function vc(e,t="inside"){if(t==="around"){const r=e.parentNode;if(!r)return;const n=ns(e),i=bc(e);Ur(n)&&r.removeChild(n),rs(i)&&r.removeChild(i);return}yc(e)}function Ec(e,t="inside"){const r=by(e);if(!r){vc(e,t);return}const n=Ey(r,(e.style.backgroundColor||e.getAttribute("bgcolor")||"").trim(),yy(e),vy(e)),i=e.ownerDocument;if(i){if(t==="around"){const o=e.parentNode;if(!o)return;const s=ns(e);Ur(s)&&o.removeChild(s);const a=bc(e);rs(a)&&o.removeChild(a),o.insertBefore(i.createComment(n),e),o.insertBefore(i.createComment(pc),e.nextSibling);return}yc(e),e.insertBefore(i.createComment(n),e.firstChild),e.appendChild(i.createComment(pc))}}function _y(e,t,r="inside"){t?.outlookBackground===!0?Ec(e,r):t?.outlookBackground===!1?vc(e,r):is(e,r)&&gy(t)&&Ec(e,r)}var os=/v:roundrect/i,ss=/\[if\s*!\s*mso\]/i,_c=/^\s*<!\[endif\]\s*$/i,as=["background-color","border-radius","border","border-top","border-right","border-bottom","border-left","border-color","border-style","border-width","box-shadow"],Sy=[...as,"padding","padding-top","padding-right","padding-bottom","padding-left","color","font-family","font-size","font-weight","font-style","text-align","line-height","letter-spacing","width"];function Zt(e){return!!e&&e.nodeType===Node.COMMENT_NODE}function ls(e){const t=[],r=n=>{n.childNodes.forEach(i=>{Zt(i)&&os.test(i.nodeValue||"")&&t.push(i),r(i)})};return r(e),t}function cs(e,t){const r=Jt(e);if(!r)return!1;const n=r.nodeValue||"";if(!/<center\b[^>]*>[\s\S]*?<\/center>/i.test(n))return!1;const i=wc((t||"").replace(/\s+/g," ").trim());return r.nodeValue=n.replace(/(<center\b[^>]*>)[\s\S]*?(<\/center>)/i,(o,s,a)=>`${s}${i}${a}`),!0}function Jt(e){for(const t of Array.from(e.childNodes)){if(Zt(t)&&os.test(t.nodeValue||""))return t;const r=Jt(t);if(r)return r}return null}function Sc(e){let t=e.previousSibling;for(;t&&t.nodeType===Node.TEXT_NODE&&!(t.nodeValue||"").trim();)t=t.previousSibling;return t}function wy(e){let t=e.nextSibling;for(;t&&t.nodeType===Node.TEXT_NODE&&!(t.nodeValue||"").trim();)t=t.nextSibling;return t}function Ke(e){const t=parseInt(String(e??""),10);return Number.isFinite(t)?t:0}function Cy(e,t){const r=(e.textContent||"").replace(/\s+/g," ").trim();if(r)return r;for(const n of t){const i=(n.nodeValue||"").match(/<center[^>]*>([\s\S]*?)<\/center>/i);if(i)return i[1].replace(/\s+/g," ").trim()}return""}function wc(e){return e.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;")}function Ay(e,t){const r=e.getAttribute("bgcolor");r&&(t.style.backgroundColor||(t.style.backgroundColor=r),e.removeAttribute("bgcolor"));for(const n of as){const i=e.style.getPropertyValue(n);i&&(t.style.setProperty(n,i,e.style.getPropertyPriority(n)),e.style.removeProperty(n))}t.style.display||(t.style.display="block")}function Ty(e,t){const r=t.getAttribute("bgcolor");r&&(!e.style.backgroundColor&&!e.getAttribute("bgcolor")&&(e.style.backgroundColor=r),t.removeAttribute("bgcolor"));for(const n of as){const i=t.style.getPropertyValue(n);i&&(e.style.getPropertyValue(n)||e.style.setProperty(n,i,t.style.getPropertyPriority(n)),t.style.removeProperty(n))}}function ky(e){const t=e.style.display;return t!=="inline-block"&&t!=="block"?!1:!!(e.style.backgroundColor||e.style.borderRadius)}function us(e){if(!e)return null;for(const t of Array.from(e.querySelectorAll("[style]")))if(ky(t))return t;return null}function Ly(e){return e?!!us(e)||!!Jt(e):!1}function Oy(e,t){for(const r of Sy){const n=e.style.getPropertyValue(r);n&&!t.style.getPropertyValue(r)&&t.style.setProperty(r,n,e.style.getPropertyPriority(r))}t.style.display||(t.style.display="block")}function xy(e){const t=e.parentNode;if(t){for(;e.firstChild;)t.insertBefore(e.firstChild,e);t.removeChild(e)}}function Cc(e,t){const r=us(t);return r?(Oy(r,t),xy(r),ls(t).forEach(n=>n.parentNode?.removeChild(n)),ds(t),!0):!1}function Py(e){for(const t of e){const r=t.nodeValue||"";if(!os.test(r))continue;const n=/<v:roundrect[^>]*\bstyle="([^"]*)"/i.exec(r),i=n?n[1]:"",o=/width:\s*(\d+)\s*px/i.exec(i),s=/height:\s*(\d+)\s*px/i.exec(i),a=/arcsize="(\d+)%?"/i.exec(r);return{width:o?Ke(o[1]):0,height:s?Ke(s[1]):0,arcsize:a?Ke(a[1]):0}}return{width:0,height:0,arcsize:0}}function Ny(e){const t=e.style;let r=t.borderWidth||t.borderTopWidth||"",n=t.borderStyle||t.borderTopStyle||"",i=t.borderColor||t.borderTopColor||"";if((!r||!n)&&t.border){const a=t.border.trim().split(/\s+/);r||(r=a[0]||""),n||(n=a[1]||""),i||(i=a.slice(2).join(" ")||"")}if(!n||n==="none")return null;const o=parseFloat(r);if(!Number.isFinite(o)||o<=0)return null;const s=n==="dashed"?"dash":n==="dotted"?"dot":"";return{color:ye(i)||i||"#000000",weight:`${o}px`,dash:s}}var My=new Set(["bold","bolder","600","700","800","900"]);function Ry(e){const t={bold:!1,italic:!1,underline:!1,strikethrough:!1};e.querySelector("b, strong")&&(t.bold=!0),e.querySelector("i, em")&&(t.italic=!0),e.querySelector("u")&&(t.underline=!0),e.querySelector("s, strike")&&(t.strikethrough=!0);const r=[e,...Array.from(e.querySelectorAll("*"))];for(const n of r){const i=n.style;if(!i)continue;const o=(i.fontWeight||"").toLowerCase();o&&My.has(o)&&(t.bold=!0),i.fontStyle==="italic"&&(t.italic=!0);const s=i.textDecoration||i.textDecorationLine||"";s.includes("underline")&&(t.underline=!0),s.includes("line-through")&&(t.strikethrough=!0)}return t}function Dy(e){const t=[e.height?`height:${e.height}px`:"","v-text-anchor:middle",e.width?`width:${e.width}px`:""].filter(Boolean),r=[e.underline?"underline":"",e.strikethrough?"line-through":""].filter(Boolean).join(" "),n=[e.color?`color:${e.color}`:"",e.fontFamily?`font-family:${e.fontFamily}`:"",e.fontSize?`font-size:${e.fontSize}`:"",e.bold?"font-weight:bold":"",e.italic?"font-style:italic":"",r?`text-decoration:${r}`:""].filter(Boolean),i=!!e.strokeColor&&!!e.strokeWeight,o=i?`stroke="t" strokecolor="${e.strokeColor}" strokeweight="${e.strokeWeight}"`:'stroke="f"',s=i&&e.strokeDash?`<v:stroke dashstyle="${e.strokeDash}"/>`:"",a=u=>u.replace(/"/g,"'"),l=a(`${t.join(";")};`),c=a(`${n.join(";")}${n.length?";":""}`);return`[if mso]><v:roundrect xmlns:v="urn:schemas-microsoft-com:vml" xmlns:w="urn:schemas-microsoft-com:office:word" href="${a(e.href)}" style="${l}" arcsize="${e.arcsize}%" ${o} fillcolor="${e.fillcolor||"none"}"><w:anchorlock/>`+s+`<center style="${c}">${wc(e.label)}</center></v:roundrect><![endif]`}function ds(e){const t=[],r=n=>{n.childNodes.forEach(i=>{if(Zt(i)){const o=i.nodeValue||"";(ss.test(o)||_c.test(o))&&t.push(i)}r(i)})};r(e),t.forEach(n=>n.parentNode?.removeChild(n))}function Iy(e){const t=e.closest("td");if(!t)return;const r=e.closest("a")||t.querySelector("a");r&&Cc(t,r),ls(t).forEach(n=>n.parentNode?.removeChild(n)),ds(t),r&&Ty(t,r)}function By(e){const t=e.ownerDocument;if(!t)return;const r=e.parentNode;if(!r)return;const n=Sc(e);Zt(n)&&ss.test(n.nodeValue||"")||r.insertBefore(t.createComment("[if !mso]><!"),e);const i=wy(e);Zt(i)&&_c.test(i.nodeValue||"")||r.insertBefore(t.createComment("<![endif]"),e.nextSibling)}function Fy(e,t){return e?.backgroundColor!==void 0?e.backgroundColor===""?"none":e.backgroundColor:t.style.backgroundColor||t.getAttribute("bgcolor")||"none"}function jy(e,t){if(t?.width?.value&&t.width.dim==="px")return Ke(t.width.value);const r=e?.getAttribute("width")||"";return r&&!r.includes("%")?Ke(r):0}function $y(e,t){if(t?.height?.value&&t.height.dim==="px")return Ke(t.height.value);const r=e.getAttribute("height")||"";return r&&!r.includes("%")?Ke(r):Ke(e.style.height)}function Hy(e,t){return e?.borderRadius&&e.borderRadius.all!=null?Ke(e.borderRadius.all):Ke(t.style.borderRadius)}function zy(e,t,r){const n=[t,r].filter(o=>o>0);if(!n.length||e<=0)return 0;const i=Math.min(...n);return Math.max(0,Math.min(100,Math.round(e/i*100)))}function Ac(e,t){const r=e.closest("td");if(!r)return;const n=e.closest("a")||r.querySelector("a");if(!n)return;const i=ls(r),o=Cy(n,i),s=Py(i);Cc(r,n),Ay(r,n),i.forEach(L=>L.parentNode?.removeChild(L)),ds(r);const a=jy(r.closest("table"),t)||s.width,l=$y(r,t)||s.height,c=Hy(t,n),u=Ry(n),d=Ny(n),h=zy(c,a,l)||s.arcsize,f={href:t?.href!==void 0?t.href:n.getAttribute("href")||"",fillcolor:Fy(t,n),width:a,height:l,arcsize:h,label:o,color:n.style.color||"",fontFamily:n.style.fontFamily||"",fontSize:n.style.fontSize||"",bold:u.bold,italic:u.italic,underline:u.underline,strikethrough:u.strikethrough,strokeColor:d?.color||"",strokeWeight:d?.weight||"",strokeDash:d?.dash||""};By(n);const g=r.ownerDocument;if(!g)return;const y=Sc(n),A=g.createComment(Dy(f));Zt(y)&&ss.test(y.nodeValue||"")&&y.parentNode?y.parentNode.insertBefore(A,y):r.insertBefore(A,r.firstChild)}var Tc="__emOwnEditor";function Vy(e){e[Tc]=!0}function kc(e){const t=[e.closest("editor"),...Array.from(e.querySelectorAll("editor"))],r=e.ownerDocument.activeElement;let n=!1;for(const i of t)i&&!i[Tc]&&!i.contains(r)&&(i.replaceWith(...Array.from(i.childNodes)),n=!0);return n}function Wy(e){return function(r,n){if(!r||(r.querySelectorAll("editor")?.forEach(s=>{s.onclick=null,s.onkeyup=null,s.onmousedown=null}),e.removeHiddenClasses(r),document.querySelectorAll(":not(.em-element-path) .em-element-path").forEach(s=>s.remove()),kc(r),e.checkIsInited(r,n)))return;e.prepareEditorHTML(r);const i=document.createElement("editor");if(Vy(i),i.classList.add("em-text"),i.setAttribute("contenteditable","true"),n)r.before(i),i.replaceChildren(r);else{const s=[...r.childNodes];r.appendChild(i),i.replaceChildren(...s)}const o=i.parentElement;if(o&&!o.style.fontFamily&&!o.style.fontSize&&i.firstElementChild){const s=i.firstElementChild,a=s.getAttribute("style"),l=s.getAttribute("class"),c=s.getAttribute("href"),u=s.getAttribute("target"),d=s.getAttribute("align");a&&i.setAttribute("innerStyle",a),l&&i.setAttribute("innerClass",l),c!==null&&i.setAttribute("innerHref",c),u&&i.setAttribute("innerTarget",u),d&&i.setAttribute("innerAlign",d)}i.addEventListener("input",()=>e.commit(!0),!0),i.addEventListener("beforeinput",e.createBeforeInputHandler({element:r,getVisibleText:e.getVisibleText,mapFn:e.defaultVisibleTextMapFn,getTagNameForContainer:e.getTagNameForContainer,applyAttributesToTag:e.applyAttributesToTag,setCursorToElement:e.setCursorToElement,removeLastWord:e.removeLastWord,hasOnlyTextNodesDeep:e.hasOnlyTextNodesDeep,isRangeCoveringAllVisibleText:e.isRangeCoveringAllVisibleText,isEditorContentOnlyNbsp:e.isEditorContentOnlyNbsp,isClickAtEndOfEmReplace:e.isClickAtEndOfEmReplace,getOrCreateAfterSpan:e.getOrCreateAfterSpan,setCursorInsideSpan:e.setCursorInsideSpan,commit:e.commit}))}}function Uy(e){const{element:t,getVisibleText:r,mapFn:n,getTagNameForContainer:i,applyAttributesToTag:o,setCursorToElement:s,removeLastWord:a,hasOnlyTextNodesDeep:l,isRangeCoveringAllVisibleText:c,isEditorContentOnlyNbsp:u,isClickAtEndOfEmReplace:d,getOrCreateAfterSpan:h,setCursorInsideSpan:f,commit:g}=e;return function(A){const L=A.target,C=window.getSelection();if(!C||C.rangeCount===0)return;const O=r(L,n).trim(),E=r(C.getRangeAt(0)?.cloneContents(),n).trim(),m=C.getRangeAt(0),b=m.startContainer,S=b.nodeType===Node.TEXT_NODE?b.parentNode:b,p=S.closest("sup, sub")||S,v=p.outerHTML,T=p?.tagName?.toLowerCase(),w=A.target.closest("em-replace");if(w&&d(A,w)){A.preventDefault(),A.stopPropagation();const P=h(w);f(P);return}if(A.inputType==="deleteContentBackward"&&!C?.isCollapsed&&E){if((T==="sup"||T==="sub")&&v&&(p?.insertAdjacentHTML("beforebegin","&nbsp;"),p?.removeAttribute("em-edit"),p.remove()),c(m)){A.preventDefault();const P=i(L),x=L.firstElementChild||L,R=document.createElement(P);R.innerHTML=" ",o(R,L,x),L.tagName==="A"||L.parentNode&&L.parentNode.tagName==="A"?L.innerHTML=R.innerHTML:L.innerHTML=R.outerHTML;const N=L.firstChild||L;s(N.firstChild||N),t.setAttribute("em-edit","active"),g(!0);return}t.setAttribute("em-edit","active"),g(!0)}if(A.inputType==="deleteContentBackward"&&C?.isCollapsed&&!E){if(b.length===1&&((T==="sup"||T==="sub")&&v&&(p?.insertAdjacentHTML("beforebegin","&nbsp;"),p?.removeAttribute("em-edit"),p.remove()),t.setAttribute("em-edit","active"),g(!0)),b.nodeType!==Node.TEXT_NODE&&!c(m))return;const P=m.startOffset;if(P===0&&!c(m))return;const x=b.parentNode;if(!x)return;const R=Array.prototype.indexOf.call(x.childNodes,b);if(x.childNodes[R-1]?.nodeType===Node.COMMENT_NODE){A.preventDefault(),b.deleteData(P-1,1);const N=document.createRange();N.setStart(b,P-1),N.collapse(!0),C.removeAllRanges(),C.addRange(N),g(!0);return}L&&u(L)&&(A.preventDefault(),A.stopImmediatePropagation())}if(A.inputType==="insertText"&&!C?.isCollapsed){A.preventDefault();let P=A.data||"";const x=C.anchorNode;c(m)&&(x.tagName==="A"||x?.parentNode&&x.parentNode.tagName==="A")&&(P=" "+A.data),m.deleteContents();const R=document.createTextNode(P||" ");m.insertNode(R),m.setStartAfter(R),m.collapse(!0),C.removeAllRanges(),C.addRange(m),g(!0);return}if(A.inputType.includes("deleteSoftLine")||A.inputType.includes("deleteHardLine")||A.inputType.includes("deleteWord")){if(A.preventDefault(),!C||C.rangeCount===0)return;const P=C.getRangeAt(0),x=document.createRange();x.setStart(L,0),x.setEnd(P.startContainer,P.startOffset);const R=x.toString(),N=document.createRange();N.setStart(P.endContainer,P.endOffset),L.lastChild?N.setEndAfter(L.lastChild):N.setEnd(L,L.childNodes.length);const D=N.toString();if(!R)return;let ne="";if(A.inputType.includes("deleteWord")){const Rr=R.trimEnd().split(/\s+/);Rr.pop(),ne=Rr.length>0?Rr.join(" ")+" ":""}const je=(ne+D).trim(),ht=i(L),In=L.firstElementChild||L,ot=document.createElement(ht);ot.innerHTML=je||" ",o(ot,L,In),L.tagName==="A"||L.parentNode&&L.parentNode.tagName==="A"?L.innerHTML=ot.innerHTML:L.innerHTML=ot.outerHTML;const Le=L.firstChild?.firstChild||L.firstChild||L,Bn=(Le.textContent||"").length,qt=Math.min(ne.length,Bn),At=document.createRange();Le.nodeType===Node.TEXT_NODE?At.setStart(Le,qt):Le.firstChild&&Le.firstChild.nodeType===Node.TEXT_NODE?At.setStart(Le.firstChild,Math.min(qt,(Le.firstChild.textContent||"").length)):At.setStart(Le,0),At.collapse(!0),C.removeAllRanges(),C.addRange(At),g();return}if(A.inputType.includes("deleteContent")&&(O.length<2||O===E)&&l(L)){A.preventDefault();const P=i(L),x=L.firstElementChild||L,R=document.createElement(P);R.innerHTML=" ",o(R,L,x),L.tagName==="A"||L.parentNode&&L.parentNode.tagName==="A"?L.innerHTML=R.innerHTML:L.innerHTML=R.outerHTML;const N=L.firstChild||L;s(N.firstChild||N),g(!0);return}if(A.inputType==="insertText"&&A.data){const P=C.anchorNode;if(P?.tagName==="A"&&!P.textContent?.trim().length){A.preventDefault(),A.stopImmediatePropagation(),P.insertAdjacentText("beforeend",A.data);const x=document.createRange();x.selectNodeContents(P),x.collapse(!1),C.removeAllRanges(),C.addRange(x),g(!0);return}if(P?.parentNode&&P.parentNode.tagName==="A"||P?.tagName==="A"){A.preventDefault(),A.stopImmediatePropagation();const x=C.getRangeAt(0),R=document.createTextNode(A.data||"");x.insertNode(R),x.setStartAfter(R),x.collapse(!0),C.removeAllRanges(),C.addRange(x),g(!0);return}}A.inputType==="deleteContentBackward"&&!C.isCollapsed&&!E&&L&&u(L)&&(A.preventDefault(),A.stopImmediatePropagation()),g()}}var ii={drag:"em-icon-drag",moveUp:"em-icon-move-up",moveDown:"em-icon-move-down",merge:"em-icon-merge",unmerge:"em-icon-unmerge",add:"em-icon-add"},oi="em-icon";function Lc(e){return/#set\s*\(\s*.*=.*\)/.test(e)}function si(e){const t=e.indexOf("(");if(t<0)return!0;let r=0,n="",i=!1;for(let o=t;o<e.length;o++){const s=e[o];if(i){i=!1;continue}if(s==="\\"){i=!0;continue}if(n){s===n&&(n="");continue}if(s==='"'||s==="'"){n=s;continue}if(s==="("){r++;continue}if(s===")"&&(r--,r<0))return!1}return r===0}function qy(e){return(t,r,n)=>si(t)?e(t,r,n):!1}function Gy(e){return t=>si(t.startsWith("<!--")&&t.endsWith("-->")?t.slice(4,-3):t)?e(t):!1}function Xy(e){return(t,r,n)=>si(t)?Lc(t)?e(t,r,n):t:!1}function Yy(e){return t=>{const r=t.startsWith("<!--")&&t.endsWith("-->")?t.slice(4,-3):t;return si(r)?Lc(r)?e(t):t:!1}}function Ky(e){const t=/[<>&]/g;for(;t.exec(e)!==null;)return!0;return!1}function fs(e,t){const r=e.length;for(let n=0;n<r;n++){const i=e.charCodeAt(n);if(i===0||t==='"'&&i===34||t==="'"&&i===39||t===""&&(i===32||i===9||i===10||i===13||i===12||i===34||i===39||i===60||i===62||i===61||i===96))return!1}return!0}function Qy(e){const t="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789",n=new Uint8Array(e);crypto.getRandomValues(n);let i="";for(let o=0;o<e;o++){const s=n[o]%62;i+=t.charAt(s)}return i}var Zy=8,Jy=class{constructor(){k(this,"_byKey",Object.create(null)),k(this,"_byValue",Object.create(null))}getOrCreateByKey(e){let t=this._byKey[e];return t===void 0&&(t=Qy(Zy),this._byKey[e]=t,this._byValue[t]=e),t}getByValue(e){return this._byValue[e]}},ai=new Jy;function Oc(e,t){return t!==void 0&&!fs(e,t)?`%|{${ai.getOrCreateByKey(e)}}|%`:e}function ev(e){const t=ai.getByValue(e.slice(3,e.length-3));return t===void 0?e:t}function ce(e,t,r){return t!==void 0?fs(e,t)?e:`%|{${ai.getOrCreateByKey(e)}}|%`:`<!--${e}-->`}function tv(e){return e.replace(/&gt;/g,">").replace(/&lt;/g,"<").replace(/&amp;/g,"&")}function se(e){return e.startsWith("<!--")&&e.endsWith("-->")?tv(e.slice(4,-3)):e}function rv(e){const t=/^(IF|ELSE|ELSIF|ELSEIF|END|FOREACH|WHILE|NEXT|LAST|BREAK|DO|UNLESS|CONTINUE|SET|UNSET|DEFINE|INCLUDE)\b/i,r=/\w+\s*\(/;let n=e;const i=e.match(/\[%\s*([^%]*?)\s*%\]/);i&&(n=i[1]);const o=n.trim();return t.test(o)||r.test(o)}function nv(e,t,r){return t!==void 0?fs(e,t)?e:`%|{${ai.getOrCreateByKey(e)}}|%`:r||Ky(e)||rv(e)?`<!--${e}-->`:e}var Lt=qy(ce),Ot=Gy(se),iv=Xy(ce),ov=Yy(se),sv=e=>{e.escape("<!--","-->",t=>t,!1),e.escape("<style","</style>",t=>t,!1),e.escape("<script","<\/script>",t=>t,!1),e.unescape("%|{","}|%",ev),e.escape("@{","}",ce,!0).unescape("<!--@{","}-->",se,!0),e.unescape("<!--%%%{{{","}}}%%%-->",t=>t.substring(10,t.length-9),!1),e.escape("${","}",Oc,!0),e.escape("{{","}}",Oc,!0),e.createSyntax("brace-percent").escape("{%","%}",ce).unescape("<!--{%","%}-->",se),e.createSyntax("brace-hash").escape("{#","#}",ce).unescape("<!--{#","#}-->",se),e.createSyntax("proscript").escape("[%","%]",nv,!0).unescape("<!--[%","%]-->",se,!0),e.createSyntax("getresponse").escape("[[IF","]]",ce).escape("[[if","]]",ce).escape("[[ELSE]]","",ce).escape("[[else]]","",ce).escape("[[ENDIF]]","",ce).escape("[[endif]]","",ce).unescape("<!--[[IF","]]-->",se).unescape("<!--[[if","]]-->",se).unescape("<!--[[ELSE]]","-->",se).unescape("<!--[[else]]","-->",se).unescape("<!--[[ENDIF]]","-->",se).unescape("<!--[[endif]]","-->",se),e.createSyntax("expert-sender").escape("<if",">",ce).escape("</if",">",ce).escape("<else",">",ce).escape("</else",">",ce).escape("<var ",">",ce,!0).unescape("<!--<if ",">-->",se).unescape("<!--</if",">-->",se).unescape("<!--<else ",">-->",se).unescape("<!--</else",">-->",se).unescape("<!--<var",">-->",se,!0),e.createSyntax("velocity").escape("#if",")",Lt).escape("#elseif",")",Lt).escape("#else","",ce).escape("#foreach",")",Lt).escape("#macro",")",Lt).escape("#set",")",iv,!0).escape("#parse",")",Lt).escape("#include",")",Lt).escape("#evaluate",")",Lt).escape("#end","",ce).escape("#break","",ce).escape("#stop","",ce).unescape("<!--#macro","-->",Ot).unescape("<!--#if","-->",Ot).unescape("<!--#elseif","-->",Ot).unescape("<!--#else","-->",se).unescape("<!--#foreach","-->",Ot).unescape("<!--#parse","-->",Ot).unescape("<!--#include","-->",Ot).unescape("<!--#evaluate","-->",Ot).unescape("<!--#end","-->",se).unescape("<!--#break","-->",se).unescape("<!--#stop","-->",se).unescape("<!--#set","-->",ov,!0),e.createSyntax("mailchimp").escape("*|","|*",ce).unescape("<!--*|","|*-->",se)},xc="bare",hs=new Map;function av(e){for(const t of Object.keys(e)){const r=e[t];r&&hs.set(t,r)}}function lv(e){return e?hs.get(e)??xc:xc}function cv(){hs.clear()}function Pc(e,t,r,n){for(let i=t;i<r;i++){const o=e[i];n.insideAttributeValue?n.attributeQuoteChar==='"'||n.attributeQuoteChar==="'"?o===n.attributeQuoteChar&&(n.insideAttributeValue=!1,n.attributeQuoteChar=void 0):n.unquotedAttr&&/[\s>]/.test(o)&&(n.insideAttributeValue=!1,n.attributeQuoteChar=void 0,n.unquotedAttr=!1):o==="<"?n.insideTag=!0:o===">"?n.insideTag=!1:n.insideTag&&(o==='"'||o==="'")?(n.insideAttributeValue=!0,n.attributeQuoteChar=o,n.unquotedAttr=!1):n.insideTag&&/\S/.test(o)&&n.attributeQuoteChar===void 0&&e[i-1]==="="&&!['"',"'","`"].includes(o)&&(n.insideAttributeValue=!0,n.attributeQuoteChar="",n.unquotedAttr=!0)}}function qr(e,t){return e.start<t.end&&t.start<e.end}function Nc(e,t,r,n,i=[]){if(r&&(t=t.filter(u=>u.isVariable)),!t.length)return[];const o=t.flatMap(u=>u.match(e).flatMap(d=>!Number.isInteger(d.start)||!Number.isInteger(d.end)||d.start<0||d.end>e.length||d.start>=d.end?[]:[{range:d,mapFn:u.mapFn,overrideBuiltins:u.overrideBuiltins,syntax:u.syntax,isVariable:u.isVariable}])).sort((u,d)=>u.range.start-d.range.start||u.range.end-d.range.end),s=[],a=i.slice().sort((u,d)=>u.start-d.start),l={insideTag:!1,insideAttributeValue:!1,attributeQuoteChar:void 0,unquotedAttr:!1};let c=0;for(const{range:u,mapFn:d,overrideBuiltins:h,syntax:f,isVariable:g}of o){if(n?(l.insideAttributeValue=!0,l.attributeQuoteChar='"'):Pc(e,c,u.start,l),c=u.end,a.some(C=>qr(C,u)))continue;const y=l.insideAttributeValue?l.attributeQuoteChar??"":void 0,A=e.substring(u.start,u.end),L=d(A,y,l.insideTag);L!==!1&&L!==A&&(s.push({range:u,text:L,overrideBuiltins:h,syntax:f,isVariable:g}),a.push(u))}return s.sort((u,d)=>u.range.start-d.range.start||u.range.end-d.range.end)}function uv(e,t){const r=t.reduce((a,{mapFn:l,start:c,end:u,syntax:d,isVariable:h})=>(a[c]||(a[c]=[]),a[c].push({value:u,mapFn:l,syntax:d,isVariable:h}),a),Object.create(null)),n=Object.keys(r).map(a=>a.replace(/[-[\]{}()*+?.,\\^$|]/g,"\\$&")).join("|"),i=new RegExp(n,"g"),o=[];let s;for(;(s=i.exec(e))!==null;){const a=s[0];o.push({start:s.index,startToken:a,endTokens:r[a]})}return o}function ms(e,t,r,n,i=!1){const o=[];if(r&&(t=t.filter(c=>c.isVariable)),!t.length)return o;const s=uv(e,t),a={insideTag:!1,insideAttributeValue:!1,attributeQuoteChar:void 0,unquotedAttr:!1};let l=0;for(let c=0;c<s.length;c++){const{start:u,startToken:d,endTokens:h}=s[c];n?(a.insideAttributeValue=!0,a.attributeQuoteChar='"'):Pc(e,l,u,a),l=u;const f=a.insideAttributeValue?a.attributeQuoteChar??"":void 0;let g=!1;for(const{mapFn:y,value:A,syntax:L,isVariable:C}of h){let O=u+d.length,E=e.indexOf(A,O);for(;E!==-1;){let m=E,b=u+d.length,S=0;for(;m!==-1;){const P=e.indexOf(d,b);if(P!==-1&&P<m)S++,b=P+d.length,m=e.indexOf(A,b);else if(S>0)S--,b=m+A.length,m=e.indexOf(A,b);else break}if(m<0)break;const p=m+A.length,v=e.substring(u,p),T=y(v,f,a.insideTag);if(T===!1){O=E+Math.max(A.length,1),E=e.indexOf(A,O);continue}(i||T!==v)&&o.push({range:{start:u,end:p},text:i?v:T,syntax:L,isVariable:C});const w=s.findIndex(({start:P})=>P>=p);w>c?c=w-1:c=s.length,g=!0;break}if(g)break}}return o}function li(e,t){if(!t.length)return e;const r=t.slice().sort((i,o)=>o.range.start-i.range.start);let n=e;for(const{text:i,range:o}of r)n=n.slice(0,o.start)+i+n.slice(o.end);return n}var Mc=class{constructor(e=sv){k(this,"_disposables",[]),k(this,"_escapes",[]),k(this,"_unescapes",[]),k(this,"_escapeMatchers",[]),k(this,"_unescapeMatchers",[]);const{_escapes:t,_unescapes:r}=this;e({createSyntax(n){return{...this,syntax:n}},escape(n,i,o,s){return t.push({start:n,end:i,mapFn:o,isVariable:s,syntax:this.syntax||n}),this},unescape(n,i,o,s){return r.push({start:n,end:i,mapFn:o,isVariable:s,syntax:this.syntax||n}),this}})}registerMatcherPair(e){const t=e.syntax||"matcher",r={syntax:t,match:e.escape.match,mapFn:e.escape.mapFn,isVariable:e.escape.isVariable,overrideBuiltins:e.escape.overrideBuiltins},n={syntax:t,match:e.unescape.match,mapFn:e.unescape.mapFn,isVariable:e.unescape.isVariable,overrideBuiltins:e.unescape.overrideBuiltins};this._escapeMatchers.push(r),this._unescapeMatchers.push(n);let i=!1;const o={dispose:()=>{i||(i=!0,this._escapeMatchers=this._escapeMatchers.filter(s=>s!==r),this._unescapeMatchers=this._unescapeMatchers.filter(s=>s!==n))}};return this.addDisposable(o),o}_collectMappings(e,t,r){const n=ms(e,this._escapes,t,r),i=Nc(e,this._escapeMatchers,t,r),o=i.filter(l=>l.overrideBuiltins).map(l=>l.range),s=n.filter(l=>!o.some(c=>qr(c,l.range))),a=i.filter(l=>l.overrideBuiltins||!s.some(c=>qr(l.range,c.range)));return[...s,...a].sort((l,c)=>l.range.start-c.range.start||l.range.end-c.range.end)}getMappings(e,t,r){return this._collectMappings(e,t,r)}_collectRevertMappings(e,t){const r=ms(e,this._unescapes,t),n=Nc(e,this._unescapeMatchers,t,!1),i=n.filter(a=>a.overrideBuiltins).map(a=>a.range),o=r.filter(a=>!i.some(l=>qr(l,a.range))),s=n.filter(a=>a.overrideBuiltins||!o.some(l=>qr(a.range,l.range)));return[...o,...s].sort((a,l)=>a.range.start-l.range.start||a.range.end-l.range.end)}getRevertMappings(e,t,r){const n=r?i=>i!==void 0&&r.has(i):i=>lv(i)==="html-comment";return this._collectRevertMappings(e,t).filter(i=>i.isVariable||!n(i.syntax))}getDetectedMappings(e,t,r){return ms(e,this._escapes,t,r,!0)}getEscapedText(e,t){return li(e,this.getMappings(e,t))}getUnescapedText(e,t,r){return li(e,this.getRevertMappings(e,t,r))}normalizeToPolicy(e,t){const r=o=>o===void 0?void 0:t[o],n=Object.values(t);let i=e;return n.includes("bare")&&(i=li(i,this._collectRevertMappings(i).filter(o=>r(o.syntax)==="bare"))),n.includes("html-comment")&&(i=li(i,this._collectMappings(i).filter(o=>!o.isVariable&&r(o.syntax)==="html-comment"&&o.text.startsWith("<!--")&&o.text.endsWith("-->")))),i}hasDetectedMappings(e,t,r){return this.getDetectedMappings(e,t,r).length>0}addDisposable(e){this._disposables.push(e)}dispose(){for(const e of this._disposables)e.dispose()}};function dv(){return NodeFilter.FILTER_ACCEPT}function fv(e){if(e instanceof Comment)return[e];const t=[];if(e){const r=document.createNodeIterator(e,NodeFilter.SHOW_COMMENT,dv);let n;for(;n=r.nextNode();)t.push(n)}return t}var hv=new Mc,mv=new Set;function Rc(e){return e?hv.getUnescapedText(e,!0,mv)!==e:!1}function Dc(e){return e.nodeValue?Rc(e.nodeValue):!1}function pv(e){const t=e.previousSibling;if(t instanceof HTMLSpanElement&&t.classList.contains("em-code")&&t.classList.contains("em-code_var"))return t}function gv(e){const t=e?.nextSibling;if(t instanceof Comment&&Dc(t))return t}function Ic(e,t){if(t.ownerDocument){const r=t.ownerDocument.createRange();try{r.selectNode(t)}catch{r.selectNodeContents(t)}const n=e.compareBoundaryPoints(Range.START_TO_START,r)===1,i=e.compareBoundaryPoints(Range.END_TO_END,r)===-1;if(n&&!i)return 0;if(!n&&i)return 1;if(n&&i)return 2}return 3}function bv(){let e=!1;document.addEventListener("keydown",r=>{r.key.toLowerCase()==="arrowleft"&&(e||(e=!0,setTimeout(()=>{e=!1},50)))});const t=()=>{const r=window.getSelection();if(r?.rangeCount){const n=r.getRangeAt(0),i=document.querySelectorAll(".em-code");for(const o of i){const s=o.nextSibling;if(s instanceof Comment){if(Ic(n,o)===0&&Ic(n,s)===1){e?(n.setStartBefore(o),n.setEndBefore(o)):(n.setStartAfter(s),n.setEndAfter(s));return}r.containsNode(s)&&!r.containsNode(o)&&n.setStartAfter(s)}}}};return document.addEventListener("selectionchange",t),{dispose(){document.removeEventListener("selectionchange",t)}}}var ci=null;function yv(e){ci=e}function vv(){return ci}function Bc(){ci=null}function Ev(){return ci?.kind==="atom"}function _v(e,t){return(window.navigator.platform.match("Mac")?e.metaKey:e.ctrlKey)&&e.keyCode===83?(e.preventDefault(),t.messageService.send({operation:"application_action",action:"save_email"}),!0):!1}function Sv(e,t){return(window.navigator.platform.match("Mac")?e.metaKey:e.ctrlKey)&&e.keyCode===90?(e.preventDefault(),t.messageService.send({operation:"application_action",action:e.shiftKey?"redo":"undo"}),!0):!1}function wv(e,t){return e.altKey&&e.keyCode===88?(e.preventDefault(),t.messageService.send({operation:"application_action",action:"toggle_editor"}),!0):!1}function Cv(e,t){if(e.keyCode===27){const r=document.querySelector(".em-editor-wrapper");return r&&(r.style.display="none"),t.removeAllAttributes("em-edit"),document.querySelectorAll("editor").forEach(n=>n.blur()),window.getSelection()?.removeAllRanges(),t.applicationElementSettingsSet({elem:null}),t.messageService.send({operation:"application_close-image-edit-popup"}),!0}return!1}function Av(e,t,r,n){if(!((window.navigator.platform.match("Mac")?e.code==="Backspace":e.keyCode===46||e.keyCode===8)&&!t&&r!=="start"&&!e.ctrlKey&&!e.metaKey))return!1;const i=e.target,o=i.tagName==="EDITOR"?i:i.closest("editor");if(o){if(o.querySelectorAll(".em-code")?.length){const u=()=>{const d=n.getAllComments(i);for(const h of d)n.isVariableComment(h)&&(n.getVariableIcon(h)||h.remove());o.removeEventListener("input",u)};o.addEventListener("input",u)}return!0}const s=document.querySelector("[em-edit]");if(!s||s.closest("editor"))return!1;const a=n.getElementParent(s);let l=s.parentNode;const c=s.closest("editor");if(n.setCursorPosition(a),s.classList.contains("em-mob-wrap")){n.removeElementEditors();const u=s.closest("tr");if(u&&[...u.cells].every(d=>!d.textContent?.trim())){const d=s.closest("table");l=d?.parentNode||null,d?.remove()}}else if(s.classList.contains("em-code")){const u=n.getVariableByIcon(s);u&&(u.parentNode?.removeChild(u),s.remove())}else if(s.tagName==="TD"&&s.innerHTML===""&&s.hasAttribute("height")){const u=s.closest("table");if(u){const d=u.previousSibling;d&&d.textContent?.trim()===""&&d.remove(),u.remove()}}else if(s.closest(".em-element-resize-img-container")){const u=s.closest(".em-element-resize-img-container");l=u.parentNode;const d=s.closest("td")?.querySelector("editor");d&&d.innerHTML===""&&d.remove(),u.remove()}else if(s.closest('[em="atom"]')){const u=s.closest('[em="atom"]');l=u.parentNode;const d=s.closest(".em-mob-wrap, .noresp-em-mob-wrap");s.tagName==="TD"&&s.previousElementSibling===null&&s.nextElementSibling===null?u.remove():s.remove(),s.tagName!=="TD"&&d&&d.textContent?.trim()===""&&(d.textContent="")}else if(s.parentElement?.tagName==="TR"&&s.parentElement.getAttribute("em")==="group"&&document.querySelectorAll('[em="group"]').length===1)s.querySelector(".em-narrow-table")?.replaceChildren();else{s.remove();const u=s.previousSibling;u&&u.textContent?.trim()===""&&u.remove()}return c&&c.remove(),l&&n.removeEmptyParents(l),n.commit(),n.messageService.send({operation:"application_element_settings_close"}),!0}function Tv(e,t){if(!(e.keyCode===39||e.key==="ArrowRight"))return!1;const r=window.getSelection();if(!r||r.rangeCount===0)return!1;const n=r.getRangeAt(0),i=n.startContainer,o=i.nodeType===Node.TEXT_NODE?i.parentElement:i;let s=null;if(i.nodeType===Node.TEXT_NODE?s=i.parentElement?.closest("em-replace"):i.nodeType===Node.ELEMENT_NODE&&(s=i.closest("em-replace")),s){if(!t.isCaretAtEndOfEmReplace(n,s))return!1;e.preventDefault();const f=s.closest("div");if(!f)return!0;const g=`em-${Date.now()}-${Math.random().toString(36).substr(2,9)}`;s.setAttribute("data-em-id",g);const y=t.getOrCreateAfterSpan(s),A=`temp-${Date.now()}-${Math.random().toString(36).substr(2,9)}`;y.setAttribute("data-cursor-target",A),f.innerHTML=f.innerHTML;const L=f.querySelector(`[data-em-id="${g}"]`);if(L){L.removeAttribute("data-em-id");let C=L.nextElementSibling;(!C||!C.hasAttribute("data-cursor-target"))&&(C=f.querySelector(`[data-cursor-target="${A}"]`)),C&&(C.removeAttribute("data-cursor-target"),C.removeAttribute("style"),f.getAttribute("contenteditable")==="true"&&f.focus(),setTimeout(()=>{t.setCursorInsideSpan(C),t.wrapEditor(C,!0),t.commit()},10))}return t.commit(),!0}const a=["strong","em","u","b","i","span","a","sub","sup","strike"];let l=null;for(const f of a){const g=o?.closest(f);if(g){l=g;break}}if(!l||!t.isCaretAtEndOfStandardElement(n,l))return!1;e.preventDefault();const c=l.nextSibling;if(c&&c.nodeType===Node.TEXT_NODE&&(c.textContent?.length||0)>0){const f=c.textContent||"";return f[0]===" "||f[0]===" "?(t.setCursorPositionSimple(c,1),!0):(c.textContent=" "+f,t.setCursorPositionSimple(c,1),t.commit(),!0)}const u=l.parentNode;if(!u)return!0;if(c&&c.nodeType===Node.ELEMENT_NODE&&c.tagName==="SPAN"&&c.textContent===" ")return t.setCursorInsideSpan(c),!0;const d=document.createElement("span"),h=document.createTextNode(" ");return d.appendChild(h),c?u.insertBefore(d,c):u.appendChild(d),t.setCursorInsideSpan(d),!0}function kv(e,t,r,n,i){if(!(e.keyCode===13&&!r||(e.key==="Enter"||e.keyCode===13)&&e.shiftKey&&r&&n))return!1;if(e.preventDefault(),e.stopImmediatePropagation(),!t)return!0;const o=window.getSelection(),s=o&&o.rangeCount>0?o.getRangeAt(0):null;if(!s)return!0;const a=o.anchorNode,l=a?.parentNode,c=l?.tagName==="A";s.collapsed||s.deleteContents();const u=document.createElement("br");if(a?.nextSibling===null&&c&&a.nodeType===Node.TEXT_NODE){if(o.anchorOffset===0)return l.parentNode.insertBefore(u,l),i.commit(),!0;if(o.anchorOffset===(a.textContent?.length||0))return l.after(u),s.setStartAfter(u),s.setEndAfter(u),i.commit(),!0}if(r){const d=t.querySelector('div[em-edit="active"]');if(!(d&&d.contains(s.startContainer))&&d){const h=d.lastChild;h&&s.setStart(h,h.textContent?.length||0)}}return s.insertNode(u),s.setStartAfter(u),s.setEndAfter(u),o.removeAllRanges(),o.addRange(s),i.commit(),!0}function Lv(e){const t=e.target,r=t?.closest?.("a")||t?.querySelector?.("a");if(!r)return!1;const n=r.closest("td")||r.parentElement;return n?cs(n,r.textContent||""):!1}function Ov(e,t){const r=e.target?.closest("a");if(!r)return!1;const n=r.closest("td")||r.parentElement;return n?(setTimeout(()=>{cs(n,r.textContent||"")&&t.commit()},100),!0):!1}var Fc={START_POSITION:"remove-start-element-position",NEW_EDITOR:"remove-new-editor-element",ACTIVE_ELEMENT:"remove-active-element"},xv={TRIM_SPACES:/^(\s|&nbsp;)+|(\s|&nbsp;)+$/g,LT:/&lt;/g,GT:/&gt;/g,EMPTY_TEXT:/^(?:\s|&nbsp;)*$/};function jc(e,t){if(!e)return!1;const r=e.closest("tr");return r?r.closest("table")?.classList.contains(t)??!1:!1}function Pv(e){const t=jc(e,Un),r=jc(e,qn),n=t||r;let i=null;return e&&n&&(i=e.closest("table.em-element-list-ol")||e.closest("table.em-element-list-ul")),{classNameOl:Un,classNameUl:qn,classNameBullet:Jp,isListOL:t,isListUL:r,isList:n,listType:t?"ol":r?"ul":null,tableElement:i}}function Nv(e){if(!e)return null;const t=e.closest("tr");return t?t.querySelector("td:first-child div:first-child"):null}function Mv(e){return e?e.querySelector(".em-element-list-ol")||e.querySelector(".em-element-list-ul"):null}function Rv(e=Object.values(Fc)){e.forEach(t=>{document.querySelectorAll(`.${t}`).forEach(r=>{r.classList.remove(t)})})}var Dv="remove-basic-cell",Iv="remove-basic-row",Bv="em-active-table-cell",Fv="em-temporary-class",ps="em-temporary-active-cell-background-color",jv="temporary-cell-class",$v="cursor: pointer; margin: auto; margin-top: 5px",Hv="display: none; position: absolute; top: -3px; left: 0; width: 24px; background: #FFFFFF; border: 1px solid #ccc; box-shadow: 0 2px 5px rgba(0,0,0,0.2); border-radius: 5px; z-index: 1000; list-style: none; padding: 5px 0; margin: 0; text-align: left;",iM=(function(){const t=typeof document<"u"&&document.createElement("link").relList;return t&&t.supports&&t.supports("modulepreload")?"modulepreload":"preload"})(),oM=function(e,t){return new URL(e,t).href},sM={},gs=function(t,r,n){let i=Promise.resolve();if(0)var s,a;function o(l){const c=new Event("vite:preloadError",{cancelable:!0});if(c.payload=l,window.dispatchEvent(c),!c.defaultPrevented)throw l}return i.then(l=>{for(const c of l||[])c.status==="rejected"&&o(c.reason);return t().catch(o)})};function $c(e,t){e.data.value?(document.querySelectorAll("editor").forEach(r=>{r.setAttribute("contenteditable","false")}),document.body.classList.add("em-sandbox-discuss")):(document.querySelectorAll("editor").forEach(r=>{r.setAttribute("contenteditable","true")}),document.body.classList.remove("em-sandbox-discuss","em-sandbox-discuss_set-target"))}function Hc(e,t){e.data.value?document.body.classList.add("em-sandbox-discuss_set-target"):document.body.classList.remove("em-sandbox-discuss_set-target")}function zc(e,t){const r=e.data.value,n=document.querySelector(`[em-discuss-id="${r}"]`);n&&t.messageService.send({operation:"application_scroll-to",settings:{value:n.getBoundingClientRect().top+t.iframeOffsetTop-t.previewHeight/2}}),document.body.classList.remove("em-sandbox-discuss_set-target"),document.querySelectorAll(".em-discuss-id-new").forEach(i=>{i.removeAttribute("em-discuss-id")}),t.removeAllAttributes("em-edit"),n&&document.querySelectorAll(`[em-discuss-id="${r}"]`).forEach(i=>{i.removeAttribute("em-discuss-id")}),t.commit()}function Vc(e,t){document.body.classList.remove("em-sandbox-discuss_set-target"),document.querySelectorAll(".em-discuss-id-new").forEach(r=>{r.classList.remove("em-discuss-id-new")}),t.removeAllAttributes("em-edit"),t.commit(),setTimeout(()=>{t.messageService.send({operation:"application_discuss_save_target"})},500)}function Wc(e,t){const r=e.data.value,n=document.querySelector(`[em-discuss-id="${r}"]`);n?(t.messageService.send({operation:"application_scroll-to",settings:{value:n.getBoundingClientRect().top+t.iframeOffsetTop-t.previewHeight/2}}),n.classList.add("em-discuss-target-active"),setTimeout(()=>{n.classList.remove("em-discuss-target-active")},2e3)):t.messageService.send({operation:"application_discuss_no_comment"})}var zv={sandbox_lock_discuss:$c,sandbox_discuss_set_target:Hc,sandbox_discuss_remove_target:zc,sandbox_discuss_reset:Vc,sandbox_discuss_get_target:Wc};function fe(e,t){return X.send(me.APPLICATION_DOMPARSER_ERROR,{message:e,stack:new Error().stack}),t}function bs(e,t){let r=t.children,n=e(t)||0;if(n!=0||!r)return n!==1;for(const i of r)if(bs(e,i)===!1)return!1;return!0}function Uc(e,t,r=[t]){for(;t=t.parent;)if(e(r=[t,...r])===!1)return!1;return!0}function Vv(e,t){return Uc(([r,n])=>{const{children:i}=r;if(i){for(let o=i.indexOf(n)+1,s=i.length;o<s;o++)if(bs(e,i[o])===!1)return!1}},t)}function xt(e,t,r){bs(n=>{n.start+=t,n.startTagEnd!==void 0&&(n.startTagEnd+=t),n.end+=t,n.endTagStart!==void 0&&(n.endTagStart+=t)},e),r&&(Uc(([n])=>{n.end+=r,n.endTagStart!==void 0&&(n.endTagStart+=r)},e),Vv(n=>{n.start+=r,n.startTagEnd!==void 0&&(n.startTagEnd+=r),n.end+=r,n.endTagStart!==void 0&&(n.endTagStart+=r)},e))}var Wv=e=>e.type===I.HTML?e.start-1:e.start,Uv=e=>e.type===I.HTML?e.end+1:e.end;function qv(e,t){const{start:r,end:n}=e;let i=t.findNodeAt(r);for(;i&&(Wv(i)>=r||Uv(i)<=n||i.start===i.startTagEnd);)i=i.parent;return i}function Gv(e){return{start:e.start+(e.tag?.length||0)+1,end:(e.startTagEnd!==void 0?e.startTagEnd:e.start)-1}}function er(e){let t=e;do t=Xv(t);while(t&&t.type===I.HTML&&!t.content);return t}function Xv(e){const t=e.parent?.children;if(t){const r=t.indexOf(e);if(r<0)return fe("parent and child not sync",e);if(r<t.length-1)return t[r+1]||null}return null}var Pt=class{constructor(e,t,r,n){k(this,"originalStart",void 0),k(this,"originalLength",void 0),k(this,"modifiedStart",void 0),k(this,"modifiedLength",void 0),this.originalStart=e,this.originalLength=t,this.modifiedStart=r,this.modifiedLength=n}getOriginalEnd(){return this.originalStart+this.originalLength}getModifiedEnd(){return this.modifiedStart+this.modifiedLength}};function qc(e,t){return(t<<5)-t+e|0}function Yv(e,t){t=qc(149417,t);for(let r=0,n=e.length;r<n;r++)t=qc(e.charCodeAt(r),t);return t}var Gc=class{constructor(e){k(this,"source",void 0),this.source=e}getElements(){const e=this.source,t=new Int32Array(e.length);for(let r=0,n=e.length;r<n;r++)t[r]=e.charCodeAt(r);return t}};function Xc(e,t,r){return new Kv(new Gc(e),new Gc(t)).ComputeDiff(r).changes}var tr=class{static Assert(e,t){if(!e)throw new Error(t)}},rr=class{static Copy(e,t,r,n,i){for(let o=0;o<i;o++)r[n+o]=e[t+o]}static Copy2(e,t,r,n,i){for(let o=0;o<i;o++)r[n+o]=e[t+o]}},Yc=class{constructor(){k(this,"m_changes",void 0),k(this,"m_originalStart",void 0),k(this,"m_modifiedStart",void 0),k(this,"m_originalCount",void 0),k(this,"m_modifiedCount",void 0),this.m_changes=[],this.m_originalStart=1073741824,this.m_modifiedStart=1073741824,this.m_originalCount=0,this.m_modifiedCount=0}MarkNextChange(){(this.m_originalCount>0||this.m_modifiedCount>0)&&this.m_changes.push(new Pt(this.m_originalStart,this.m_originalCount,this.m_modifiedStart,this.m_modifiedCount)),this.m_originalCount=0,this.m_modifiedCount=0,this.m_originalStart=1073741824,this.m_modifiedStart=1073741824}AddOriginalElement(e,t){this.m_originalStart=Math.min(this.m_originalStart,e),this.m_modifiedStart=Math.min(this.m_modifiedStart,t),this.m_originalCount++}AddModifiedElement(e,t){this.m_originalStart=Math.min(this.m_originalStart,e),this.m_modifiedStart=Math.min(this.m_modifiedStart,t),this.m_modifiedCount++}getChanges(){return(this.m_originalCount>0||this.m_modifiedCount>0)&&this.MarkNextChange(),this.m_changes}getReverseChanges(){return(this.m_originalCount>0||this.m_modifiedCount>0)&&this.MarkNextChange(),this.m_changes.reverse(),this.m_changes}},Kv=class Dr{constructor(t,r,n=null){k(this,"ContinueProcessingPredicate",void 0),k(this,"_originalSequence",void 0),k(this,"_modifiedSequence",void 0),k(this,"_hasStrings",void 0),k(this,"_originalStringElements",void 0),k(this,"_originalElementsOrHash",void 0),k(this,"_modifiedStringElements",void 0),k(this,"_modifiedElementsOrHash",void 0),k(this,"m_forwardHistory",void 0),k(this,"m_reverseHistory",void 0),this.ContinueProcessingPredicate=n,this._originalSequence=t,this._modifiedSequence=r;const[i,o,s]=Dr._getElements(t),[a,l,c]=Dr._getElements(r);this._hasStrings=s&&c,this._originalStringElements=i,this._originalElementsOrHash=o,this._modifiedStringElements=a,this._modifiedElementsOrHash=l,this.m_forwardHistory=[],this.m_reverseHistory=[]}static _isStringArray(t){return t.length>0&&typeof t[0]=="string"}static _getElements(t){const r=t.getElements();if(Dr._isStringArray(r)){const n=new Int32Array(r.length);for(let i=0,o=r.length;i<o;i++)n[i]=Yv(r[i],0);return[r,n,!0]}return r instanceof Int32Array?[[],r,!1]:[[],new Int32Array(r),!1]}ElementsAreEqual(t,r){return this._originalElementsOrHash[t]!==this._modifiedElementsOrHash[r]?!1:this._hasStrings?this._originalStringElements[t]===this._modifiedStringElements[r]:!0}ElementsAreStrictEqual(t,r){return this.ElementsAreEqual(t,r)?Dr._getStrictElement(this._originalSequence,t)===Dr._getStrictElement(this._modifiedSequence,r):!1}static _getStrictElement(t,r){return typeof t.getStrictElement=="function"?t.getStrictElement(r):null}OriginalElementsAreEqual(t,r){return this._originalElementsOrHash[t]!==this._originalElementsOrHash[r]?!1:this._hasStrings?this._originalStringElements[t]===this._originalStringElements[r]:!0}ModifiedElementsAreEqual(t,r){return this._modifiedElementsOrHash[t]!==this._modifiedElementsOrHash[r]?!1:this._hasStrings?this._modifiedStringElements[t]===this._modifiedStringElements[r]:!0}ComputeDiff(t){return this._ComputeDiff(0,this._originalElementsOrHash.length-1,0,this._modifiedElementsOrHash.length-1,t)}_ComputeDiff(t,r,n,i,o){const s=[!1];let a=this.ComputeDiffRecursive(t,r,n,i,s);return o&&(a=this.PrettifyChanges(a)),{quitEarly:s[0],changes:a}}ComputeDiffRecursive(t,r,n,i,o){for(o[0]=!1;t<=r&&n<=i&&this.ElementsAreEqual(t,n);)t++,n++;for(;r>=t&&i>=n&&this.ElementsAreEqual(r,i);)r--,i--;if(t>r||n>i){let c;return n<=i?(tr.Assert(t===r+1,"originalStart should only be one more than originalEnd"),c=[new Pt(t,0,n,i-n+1)]):t<=r?(tr.Assert(n===i+1,"modifiedStart should only be one more than modifiedEnd"),c=[new Pt(t,r-t+1,n,0)]):(tr.Assert(t===r+1,"originalStart should only be one more than originalEnd"),tr.Assert(n===i+1,"modifiedStart should only be one more than modifiedEnd"),c=[]),c}const s=[0],a=[0],l=this.ComputeRecursionPoint(t,r,n,i,s,a,o);return s[0],a[0],l!==null?l:[new Pt(t,r-t+1,n,i-n+1)]}WALKTRACE(t,r,n,i,o,s,a,l,c,u,d,h,f,g,y,A,L,C){let O=null,E=null,m=new Yc,b=r,S=n,p=f[0]-A[0]-i,v=-1073741824,T=this.m_forwardHistory.length-1;do{const w=p+t;w===b||w<S&&c[w-1]<c[w+1]?(d=c[w+1],g=d-p-i,d<v&&m.MarkNextChange(),v=d,m.AddModifiedElement(d+1,g),p=w+1-t):(d=c[w-1]+1,g=d-p-i,d<v&&m.MarkNextChange(),v=d-1,m.AddOriginalElement(d,g+1),p=w-1-t),T>=0&&(c=this.m_forwardHistory[T],t=c[0],b=1,S=c.length-1)}while(--T>=-1);if(O=m.getReverseChanges(),C[0]){let w=f[0]+1,P=A[0]+1;if(O!==null&&O.length>0){const x=O[O.length-1];w=Math.max(w,x.getOriginalEnd()),P=Math.max(P,x.getModifiedEnd())}E=[new Pt(w,h-w+1,P,y-P+1)]}else{m=new Yc,b=s,S=a,p=f[0]-A[0]-l,v=1073741824,T=L?this.m_reverseHistory.length-1:this.m_reverseHistory.length-2;do{const w=p+o;w===b||w<S&&u[w-1]>=u[w+1]?(d=u[w+1]-1,g=d-p-l,d>v&&m.MarkNextChange(),v=d+1,m.AddOriginalElement(d+1,g+1),p=w+1-o):(d=u[w-1],g=d-p-l,d>v&&m.MarkNextChange(),v=d,m.AddModifiedElement(d+1,g+1),p=w-1-o),T>=0&&(u=this.m_reverseHistory[T],o=u[0],b=1,S=u.length-1)}while(--T>=-1);E=m.getChanges()}return this.ConcatenateChanges(O,E)}ComputeRecursionPoint(t,r,n,i,o,s,a){let l=0,c=0,u=0,d=0,h=0,f=0;t--,n--,o[0]=0,s[0]=0,this.m_forwardHistory=[],this.m_reverseHistory=[];const g=r-t+(i-n),y=g+1,A=new Int32Array(y),L=new Int32Array(y),C=i-n,O=r-t,E=t-n,m=r-i,b=(O-C)%2===0;A[C]=t,L[O]=r,a[0]=!1;for(let S=1;S<=g/2+1;S++){let p=0,v=0;if(S>100)return null;u=this.ClipDiagonalBound(C-S,S,C,y),d=this.ClipDiagonalBound(C+S,S,C,y);for(let w=u;w<=d;w+=2){w===u||w<d&&A[w-1]<A[w+1]?l=A[w+1]:l=A[w-1]+1,c=l-(w-C)-E;const P=l;for(;l<r&&c<i&&this.ElementsAreEqual(l+1,c+1);)l++,c++;if(A[w]=l,l+c>p+v&&(p=l,v=c),!b&&Math.abs(w-O)<=S-1&&l>=L[w])return o[0]=l,s[0]=c,P<=L[w]&&S<=1448?this.WALKTRACE(C,u,d,E,O,h,f,m,A,L,l,r,o,c,i,s,b,a):null}const T=(p-t+(v-n)-S)/2;if(this.ContinueProcessingPredicate!==null&&!this.ContinueProcessingPredicate(p,T))return a[0]=!0,o[0]=p,s[0]=v,T>0&&S<=1448?this.WALKTRACE(C,u,d,E,O,h,f,m,A,L,l,r,o,c,i,s,b,a):(t++,n++,[new Pt(t,r-t+1,n,i-n+1)]);h=this.ClipDiagonalBound(O-S,S,O,y),f=this.ClipDiagonalBound(O+S,S,O,y);for(let w=h;w<=f;w+=2){w===h||w<f&&L[w-1]>=L[w+1]?l=L[w+1]-1:l=L[w-1],c=l-(w-O)-m;const P=l;for(;l>t&&c>n&&this.ElementsAreEqual(l,c);)l--,c--;if(L[w]=l,b&&Math.abs(w-C)<=S&&l<=A[w])return o[0]=l,s[0]=c,P>=A[w]&&S<=1448?this.WALKTRACE(C,u,d,E,O,h,f,m,A,L,l,r,o,c,i,s,b,a):null}if(S<=1447){let w=new Int32Array(d-u+2);w[0]=C-u+1,rr.Copy2(A,u,w,1,d-u+1),this.m_forwardHistory.push(w),w=new Int32Array(f-h+2),w[0]=O-h+1,rr.Copy2(L,h,w,1,f-h+1),this.m_reverseHistory.push(w)}}return this.WALKTRACE(C,u,d,E,O,h,f,m,A,L,l,r,o,c,i,s,b,a)}PrettifyChanges(t){for(let r=0;r<t.length;r++){const n=t[r],i=r<t.length-1?t[r+1].originalStart:this._originalElementsOrHash.length,o=r<t.length-1?t[r+1].modifiedStart:this._modifiedElementsOrHash.length,s=n.originalLength>0,a=n.modifiedLength>0;for(;n.originalStart+n.originalLength<i&&n.modifiedStart+n.modifiedLength<o&&(!s||this.OriginalElementsAreEqual(n.originalStart,n.originalStart+n.originalLength))&&(!a||this.ModifiedElementsAreEqual(n.modifiedStart,n.modifiedStart+n.modifiedLength));){const c=this.ElementsAreStrictEqual(n.originalStart,n.modifiedStart);if(this.ElementsAreStrictEqual(n.originalStart+n.originalLength,n.modifiedStart+n.modifiedLength)&&!c)break;n.originalStart++,n.modifiedStart++}const l=[null];if(r<t.length-1&&this.ChangesOverlap(t[r],t[r+1],l)){t[r]=l[0],t.splice(r+1,1),r--;continue}}for(let r=t.length-1;r>=0;r--){const n=t[r];let i=0,o=0;if(r>0){const d=t[r-1];i=d.originalStart+d.originalLength,o=d.modifiedStart+d.modifiedLength}const s=n.originalLength>0,a=n.modifiedLength>0;let l=0,c=this._boundaryScore(n.originalStart,n.originalLength,n.modifiedStart,n.modifiedLength);for(let d=1;;d++){const h=n.originalStart-d,f=n.modifiedStart-d;if(h<i||f<o||s&&!this.OriginalElementsAreEqual(h,h+n.originalLength)||a&&!this.ModifiedElementsAreEqual(f,f+n.modifiedLength))break;const g=(h===i&&f===o?5:0)+this._boundaryScore(h,n.originalLength,f,n.modifiedLength);g>c&&(c=g,l=d)}n.originalStart-=l,n.modifiedStart-=l;const u=[null];if(r>0&&this.ChangesOverlap(t[r-1],t[r],u)){t[r-1]=u[0],t.splice(r,1),r++;continue}}if(this._hasStrings)for(let r=1,n=t.length;r<n;r++){const i=t[r-1],o=t[r],s=o.originalStart-i.originalStart-i.originalLength,a=i.originalStart,l=o.originalStart+o.originalLength,c=l-a,u=i.modifiedStart,d=o.modifiedStart+o.modifiedLength,h=d-u;if(s<5&&c<20&&h<20){const f=this._findBetterContiguousSequence(a,c,u,h,s);if(f){const[g,y]=f;(g!==i.originalStart+i.originalLength||y!==i.modifiedStart+i.modifiedLength)&&(i.originalLength=g-i.originalStart,i.modifiedLength=y-i.modifiedStart,o.originalStart=g+s,o.modifiedStart=y+s,o.originalLength=l-o.originalStart,o.modifiedLength=d-o.modifiedStart)}}}return t}_findBetterContiguousSequence(t,r,n,i,o){if(r<o||i<o)return null;const s=t+r-o+1,a=n+i-o+1;let l=0,c=0,u=0;for(let d=t;d<s;d++)for(let h=n;h<a;h++){const f=this._contiguousSequenceScore(d,h,o);f>0&&f>l&&(l=f,c=d,u=h)}return l>0?[c,u]:null}_contiguousSequenceScore(t,r,n){let i=0;for(let o=0;o<n;o++){if(!this.ElementsAreEqual(t+o,r+o))return 0;i+=this._originalStringElements[t+o].length}return i}_OriginalIsBoundary(t){return t<=0||t>=this._originalElementsOrHash.length-1?!0:this._hasStrings&&/^\s*$/.test(this._originalStringElements[t])}_OriginalRegionIsBoundary(t,r){if(this._OriginalIsBoundary(t)||this._OriginalIsBoundary(t-1))return!0;if(r>0){const n=t+r;if(this._OriginalIsBoundary(n-1)||this._OriginalIsBoundary(n))return!0}return!1}_ModifiedIsBoundary(t){return t<=0||t>=this._modifiedElementsOrHash.length-1?!0:this._hasStrings&&/^\s*$/.test(this._modifiedStringElements[t])}_ModifiedRegionIsBoundary(t,r){if(this._ModifiedIsBoundary(t)||this._ModifiedIsBoundary(t-1))return!0;if(r>0){const n=t+r;if(this._ModifiedIsBoundary(n-1)||this._ModifiedIsBoundary(n))return!0}return!1}_boundaryScore(t,r,n,i){return(this._OriginalRegionIsBoundary(t,r)?1:0)+(this._ModifiedRegionIsBoundary(n,i)?1:0)}ConcatenateChanges(t,r){const n=[];if(t.length===0||r.length===0)return r.length>0?r:t;if(this.ChangesOverlap(t[t.length-1],r[0],n)){const i=new Array(t.length+r.length-1);return rr.Copy(t,0,i,0,t.length-1),i[t.length-1]=n[0],rr.Copy(r,1,i,t.length,r.length-1),i}else{const i=new Array(t.length+r.length);return rr.Copy(t,0,i,0,t.length),rr.Copy(r,0,i,t.length,r.length),i}}ChangesOverlap(t,r,n){if(tr.Assert(t.originalStart<=r.originalStart,"Left change is not less than or equal to right change"),tr.Assert(t.modifiedStart<=r.modifiedStart,"Left change is not less than or equal to right change"),t.originalStart+t.originalLength>=r.originalStart||t.modifiedStart+t.modifiedLength>=r.modifiedStart){const i=t.originalStart;let o=t.originalLength;const s=t.modifiedStart;let a=t.modifiedLength;return t.originalStart+t.originalLength>=r.originalStart&&(o=r.originalStart+r.originalLength-t.originalStart),t.modifiedStart+t.modifiedLength>=r.modifiedStart&&(a=r.modifiedStart+r.modifiedLength-t.modifiedStart),n[0]=new Pt(i,o,s,a),!0}else return n[0]=null,!1}ClipDiagonalBound(t,r,n,i){if(t>=0&&t<i)return t;const o=n,s=i-n-1,a=r%2===0;return t<0?a===(o%2===0)?0:1:a===(s%2===0)?i-1:i-2}};function ui(e){return e.replace(/\n/g,"\\n").replace(/\r/g,"\\r")}var De=class{get oldLength(){return this.oldText.length}get oldEnd(){return this.oldPosition+this.oldText.length}get newLength(){return this.newText.length}get newEnd(){return this.newPosition+this.newText.length}constructor(e,t,r,n){k(this,"oldPosition",void 0),k(this,"oldText",void 0),k(this,"newPosition",void 0),k(this,"newText",void 0),this.oldPosition=e,this.oldText=t,this.newPosition=r,this.newText=n}toString(){return this.oldText.length===0?`(insert@${this.oldPosition} "${ui(this.newText)}")`:this.newText.length===0?`(delete@${this.oldPosition} "${ui(this.oldText)}")`:`(replace@${this.oldPosition} "${ui(this.oldText)}" with "${ui(this.newText)}")`}};function He(e,t){return e===null||e.length===0?t:new Qv(e,t).compress()}var Qv=class mt{constructor(t,r){k(this,"_prevEdits",void 0),k(this,"_currEdits",void 0),k(this,"_result",void 0),k(this,"_resultLen",void 0),k(this,"_prevLen",void 0),k(this,"_prevDeltaOffset",void 0),k(this,"_currLen",void 0),k(this,"_currDeltaOffset",void 0),this._prevEdits=t,this._currEdits=r,this._result=[],this._resultLen=0,this._prevLen=this._prevEdits.length,this._prevDeltaOffset=0,this._currLen=this._currEdits.length,this._currDeltaOffset=0}compress(){let t=0,r=0,n=this._getPrev(t),i=this._getCurr(r);for(;t<this._prevLen||r<this._currLen;){if(n===null){if(i===null)break;this._acceptCurr(i),i=this._getCurr(++r);continue}if(i===null){this._acceptPrev(n),n=this._getPrev(++t);continue}if(i.oldEnd<=n.newPosition){this._acceptCurr(i),i=this._getCurr(++r);continue}if(n.newEnd<=i.oldPosition){this._acceptPrev(n),n=this._getPrev(++t);continue}if(i.oldPosition<n.newPosition){const[l,c]=mt._splitCurr(i,n.newPosition-i.oldPosition);this._acceptCurr(l),i=c;continue}if(n.newPosition<i.oldPosition){const[l,c]=mt._splitPrev(n,i.oldPosition-n.newPosition);this._acceptPrev(l),n=c;continue}let s,a;if(i.oldEnd===n.newEnd)s=n,a=i,n=this._getPrev(++t),i=this._getCurr(++r);else if(i.oldEnd<n.newEnd){const[l,c]=mt._splitPrev(n,i.oldLength);s=l,a=i,n=c,i=this._getCurr(++r)}else{const[l,c]=mt._splitCurr(i,n.newLength);s=n,a=l,n=this._getPrev(++t),i=c}this._result[this._resultLen++]=new De(s.oldPosition,s.oldText,a.newPosition,a.newText),this._prevDeltaOffset+=s.newLength-s.oldLength,this._currDeltaOffset+=a.newLength-a.oldLength}const o=mt._merge(this._result);return mt._removeNoOps(o)}_acceptCurr(t){this._result[this._resultLen++]=mt._rebaseCurr(this._prevDeltaOffset,t),this._currDeltaOffset+=t.newLength-t.oldLength}_getCurr(t){return t<this._currLen?this._currEdits[t]:null}_acceptPrev(t){this._result[this._resultLen++]=mt._rebasePrev(this._currDeltaOffset,t),this._prevDeltaOffset+=t.newLength-t.oldLength}_getPrev(t){return t<this._prevLen?this._prevEdits[t]:null}static _rebaseCurr(t,r){return new De(r.oldPosition-t,r.oldText,r.newPosition,r.newText)}static _rebasePrev(t,r){return new De(r.oldPosition,r.oldText,r.newPosition+t,r.newText)}static _splitPrev(t,r){const n=t.newText.substr(0,r),i=t.newText.substr(r);return[new De(t.oldPosition,t.oldText,t.newPosition,n),new De(t.oldEnd,"",t.newPosition+r,i)]}static _splitCurr(t,r){const n=t.oldText.substr(0,r),i=t.oldText.substr(r);return[new De(t.oldPosition,n,t.newPosition,t.newText),new De(t.oldPosition+r,i,t.newEnd,"")]}static _merge(t){if(t.length===0)return t;const r=[];let n=0,i=t[0];for(let o=1;o<t.length;o++){const s=t[o];i.oldEnd===s.oldPosition?i=new De(i.oldPosition,i.oldText+s.oldText,i.newPosition,i.newText+s.newText):(r[n++]=i,i=s)}return r[n++]=i,r}static _removeNoOps(t){if(t.length===0)return t;const r=[];let n=0;for(let i=0;i<t.length;i++){const o=t[i];o.oldText!==o.newText&&(r[n++]=o)}return r}};function Kc(e){return new De(e.newPosition,e.newText,e.oldPosition,e.oldText)}function at(e){return e.map(Kc)}function Zv(e,t,r){let n=0;const i=e.start===e.end;for(const o of t){const s=o.newLength-o.oldLength;if(o.oldLength===0){const a=o.oldPosition;if(i&&a===e.start)n+=r==="after"?s:0;else{if(e.start<a&&a<e.end)return null;a<=e.start&&(n+=s)}continue}if(i){if(e.start>=o.oldEnd)n+=s;else if(e.start>o.oldPosition)return null;continue}if(e.start>=o.oldEnd)n+=s;else if(e.end>o.oldPosition)return null}return{start:e.start+n,end:e.end+n}}function Qc(e,t,r){if(!t.length)return[...e];const n=[];let i=0;for(const o of e){const s=Zv({start:o.oldPosition,end:o.oldEnd},t,r);if(!s)return null;n.push(new De(s.start,o.oldText,s.start+i,o.newText)),i+=o.newLength-o.oldLength}return n}function Zc(e,t,r=0){const n=e.range;return new De(e.range.start,typeof t=="string"?t.substring(n.start,n.end):t.getText(n),n.start+r,e.text)}function nr(e,t){let r=0;return e.map(({text:n,range:{start:i,end:o}})=>{let s=r;return r+=n.length-(o-i),Zc({text:n,range:{start:i,end:o}},t,s)})}function Jv(e){return{range:{start:e.oldPosition,end:e.oldEnd},text:e.newText}}function Nt(e){return e.map(t=>Jv(t))}function eE(e,t=ys(e)){const r=e.getLength(),{start:n,end:i}=t;return n>r||i<0?null:{start:n,end:i}}var aM=RegExp("["+["-","[","]","/","{","}","(",")","*","+","?",".","\\","^","$","|"].join("\\")+"]","g");function tE(e,{start:t,end:r}){return{start:t,end:r+(e.newLength-e.oldLength)}}function ys(e){return{start:0,end:e.getLength()}}function rE(e,t,r){return`${e.substring(0,r.start)}${t}${e.substring(r.end)}`}function Gr(e,t){const r=[e];for(let n=t.length-1;n>=0;n--){const{text:i,range:o}=t[n],s=r[0];r.splice(0,1,s.substring(0,o.start),i,s.substring(o.end))}return r.join("")}function nE(e,t){return t=di(t).sort(({range:r},{range:n})=>r.start-n.start),Gr(e,t)}function Xr(e,t){return e>=t.start&&e<=t.end}function di(e,t){e=[...e];let r=e.length;if(r<=1)return e;e=e.sort(({range:n},{range:i})=>n.start-i.start);for(let n=0;n<r;n++){let i=e[n],o=e[n].range;for(let s=n+1;s<r;s++){const a=e[s];let l=e[s].range,c;if(Xr(o.start,l)&&Xr(o.start,l))c=l;else if(Xr(l.start,o))Xr(l.end,o)?c=o:c={start:o.start,end:l.end};else if(Xr(l.end,o))c={start:l.start,end:o.end};else continue;const u=i.text;let d=l.start-o.start+u.length,h=l.end-o.start+u.length;const f=rE(u,a.text,{start:d,end:h});e[n]=i={range:o=c,text:f},e.splice(s--,1),r--}}return e}function iE(e,t){if(e.length<=1)return e[0]||null;e=di(e);const r=e.reduce((n,{range:i})=>({start:Math.min(n.start,i.start),end:Math.max(n.end,i.end)}),{start:Number.MAX_VALUE,end:Number.MIN_VALUE});return{text:Gr(t.substring(r.start,r.end),e.map(({range:n,text:i})=>({text:i,range:{start:n.start-r.start,end:n.end-r.start}}))),range:r}}function oE(e,t){const r=at(e),n=iE(Nt(r),t);if(n){const i=Zc(n,t);return Kc(i)}return null}function sE(e,{range:t,text:r}){const n=e.getText(t);return Xc(n,r,!0).map(i=>({range:{start:t.start+i.originalStart,end:t.start+i.originalStart+i.originalLength},text:r.substring(i.modifiedStart,i.modifiedStart+i.modifiedLength)}))}function aE({oldText:e,newText:t,oldPosition:r,newPosition:n}){return Xc(e,t,!0).map(i=>new De(r+i.originalStart,e.substring(i.originalStart,i.originalStart+i.originalLength),n+i.modifiedStart,t.substring(i.modifiedStart,i.modifiedStart+i.modifiedLength)))}var lE=class{constructor(e,t){k(this,"index",void 0),k(this,"values",void 0),k(this,"type","insert"),this.index=e,this.values=t}},cE=class{constructor(e,t){k(this,"index",void 0),k(this,"howMany",void 0),k(this,"type","remove"),this.index=e,this.howMany=t}},uE=class{constructor(e,t,r){k(this,"from",void 0),k(this,"to",void 0),k(this,"howMany",void 0),k(this,"type","move"),this.from=e,this.to=t,this.howMany=r}};function dE(e,t){return e===t}function fE(e,t,r=dE){for(var n=e.length,i=t.length,o=[],s=Object.create(null),a=Object.create(null),l=0;l<n;l++)for(var c=e[l],u=0;u<i;u++)if(!a[u]&&r(c,t[u])){var d=l,h=u,f=0;do s[l++]=a[u++]=!0,f++;while(l<n&&u<i&&r(e[l],t[u])&&!a[u]);o.push(new uE(d,h,f)),l--;break}var g=[];for(l=0;l<n;){if(s[l]){l++;continue}for(var y=l,f=0;l<n&&!s[l++];)f++;g.push(new cE(y,f))}for(var A=[],u=0;u<i;){if(a[u]){u++;continue}for(var y=u,f=0;u<i&&!a[u++];)f++;var L=t.slice(y,y+f);A.push(new lE(y,L))}var C=A.length,O=g.length,E=o.length,m,b,S=0;for(m=0;m<O;m++){var p=g[m];for(p.index-=S,S+=p.howMany,b=0;b<E;b++){var v=o[b];v.from>=p.index&&(v.from-=p.howMany)}}for(m=C;m--;){var T=A[m],f=T.values.length;for(b=E;b--;){var v=o[b];v.to>=T.index&&(v.to-=f)}}for(m=E;m-- >1;){var v=o[m];if(v.to!==v.from)for(b=m;b--;){var w=o[b];w.to>=v.to&&(w.to-=v.howMany),w.to>=v.from&&(w.to+=v.howMany)}}var P=[];for(m=0;m<E;m++){var v=o[m];if(v.to!==v.from)for(P.push(v),b=m+1;b<E;b++){var x=o[b];x.from>=v.from&&(x.from-=v.howMany),x.from>=v.to&&(x.from+=v.howMany)}}return[...g,...P,...A]}var Jc=class{constructor(){k(this,"_byKey",new Map),k(this,"_byValue",new Map)}set(e,t){this._byKey.set(e,t),this._byValue.set(t,e)}getByKey(e){return this._byKey.get(e)}getByValue(e){return this._byValue.get(e)}delete(e){const t=this._byKey.has(e);if(t){const r=this._byKey.get(e);this._byKey.delete(e),this._byValue.delete(r)}return t}deleteByValue(e){const t=this._byValue.has(e);if(t){const r=this._byValue.get(e);this._byValue.delete(e),this._byKey.delete(r)}return t}get size(){return this._byKey.size}},V;(function(e){function t(u,d,h){return{type:"Add",node:d,nextSibling:h,parent:u}}e.add=t;function r(u){return{type:"Remove",node:u}}e.remove=r;function n(u,d,h){return{type:"Attribute",node:u,name:d,value:h}}e.attribute=n;function i(u,d){return{type:"Update",prev:u,next:d}}e.update=i;function o(u,d,h){return{type:"Move",node:d,nextSibling:h,parent:u}}e.move=o;function s(u,d){return{type:"Set",node:u,data:d}}e.set=s;function a(u,d,h){return{type:"ClassList",node:u,addedClasses:d,removedClasses:h}}e.classList=a;function l(u,d){return{type:"Style",node:u,value:d}}e.style=l;function c(u,d){return{type:"Hidden",node:u,value:d}}e.hidden=c})(V||(V={}));function hE(e,t){const r=e.attributes||{},n=t.attributes||{},i=e.attributeNames,o=t.attributeNames,s=i.length,a=o.length,l=[];let c=0;for(;c<s;c++){const u=i[c];if(u!==o[c]){for(let d=c;d<s;d++){const h=i[d];l.push(V.attribute(t,h,void 0))}break}else n[u]!==r[u]&&l.push(V.attribute(t,u,n[u]))}for(;c<a;c++){const u=o[c];l.push(V.attribute(t,u,n[u]))}return l}function mE(e){let t=[];const r=e.children.filter(i=>i.type!==I.HTML||!!i.content);let n;for(let i=r.length-1;i>=0;i--)t.push(V.add(e,r[i],n)),n=r[i];return t}function pE(e){return V.remove(e)}var gE=new Set(["head","body","html"]),bE=e=>e.type===I.ROOT||e.type===I.DOCTYPE||e.type===I.ELEMENT&&e.tag&&gE.has(e.tag.toLowerCase());function eu(e){const t=new Jc,r=Object.create(null);for(const n of e){const i=String(n.type===I.ELEMENT?n.tag:n.type)+(!bE(n)&&n.start===n.end?"_hidden":"");let o="";n.type===I.ELEMENT&&n.attributes?.id?o=`id_${n.attributes.id}`:o=r[i]=(r[i]||0)+1,t.set(`${i}_${o}`,n)}return t}function tu(e,t){let r=[];const n=eu(e.children),i=eu(t.children);for(let c=e.children.length-1;c>=0;c--){const u=e.children[c];if(u.type===I.ELEMENT&&u.start===u.end){const d=n.getByValue(u);if(!i.getByKey(d)){let h=!1;for(let f=c+1;c<e.children.length;c++)if(e.children[f]){const g=n.getByValue(u),y=i.getByKey(g);if(y){const A=y.start,L=u.clone();t.children.splice(t.children.indexOf(y),0,L),xt(L,A-u.start),L.parent=t,i.set(d,L),h=!0;break}}if(!h){const f=t.endTagStart===void 0?t.end:t.endTagStart,g=u.clone();t.children.push(g),i.set(d,g),xt(g,f-u.start),g.parent=t}}}}const o=e.children.filter(c=>c.type!==I.HTML||!!c.content),s=t.children.filter(c=>c.type!==I.HTML||!!c.content),a=fE(o,s,(c,u)=>n.getByValue(c)===i.getByValue(u)),l=new Set;for(const c of a)switch(c.type){case"insert":{const u=c.index;let d=o[u];for(const h of c.values.reverse())o.splice(u,0,h),l.add(h),r.push(V.add(t,h,d)),d=h;break}case"remove":{const u=o.splice(c.index,c.howMany);for(const d of u)r.push(V.remove(d));break}case"move":{const u=o.splice(c.from,c.howMany);let d=o[c.to];o.splice(c.to,0,...u);for(const h of u.reverse()){const f=n.getByValue(h),g=i.getByKey(f);l.add(g),r=[...r,...vs(h,g)],r.push(V.move(t,g,d)),d=h}break}}s.length!==o.length&&fe("error while sync");for(let c=s.length-1;c>=0;c--){const u=s[c];l.has(u)||(r=[...r,...vs(o[c],u)])}return r}function vs(e,t){if(e.type===t.type&&!(e.isDirty||t.isDirty)){if((e.type===I.ELEMENT||e.type===I.ROOT)&&e.tag===t.tag)return[V.update(e,t),...hE(e,t),...tu(e,t)];if(e.type===I.HTML||e.type===I.COMMENT)return e.content===t.content?[V.update(e,t)]:[V.update(e,t),V.set(t,t.content)]}return!e.parent||!t.parent?fe("cannot replace document",[]):[V.remove(e),V.add(t.parent,t,er(t)||void 0)]}var ir="FROM_DOM",Yr="FROM_REMOTE",fi=[];function yE(e){return fi.push(e),{dispose:()=>{const t=fi.indexOf(e);t!==-1&&fi.splice(t,1)}}}function vE(e){return e?fi.some(t=>t(e)):!1}var EE=/<\/.*>/gi,_E=class extends Z{constructor(e,t){super(),k(this,"_baseDocument",void 0),k(this,"_createRoot",void 0),k(this,"_beforeTextChangeEmitter",this.addDisposable(new J)),k(this,"_onTextChangeEmitter",this.addDisposable(new J)),k(this,"_onMutateEmitter",this.addDisposable(new J)),k(this,"_beforeRefreshEmitter",this.addDisposable(new J)),k(this,"_onRefreshEmitter",this.addDisposable(new J)),k(this,"_root",new Oe(0,0,[])),k(this,"beforeTextChange",this._beforeTextChangeEmitter.event),k(this,"beforeRefresh",this._beforeRefreshEmitter.event),k(this,"onTextChange",this._onTextChangeEmitter.event),k(this,"onRefresh",this._onRefreshEmitter.event),k(this,"onMutate",this._onMutateEmitter.event),this._baseDocument=e,this._createRoot=t,this._baseDocument.onChanged(this._onTextChange.bind(this));const r=this._root=new Oe(0,0,[]);r.type=I.ROOT}get root(){return this._root}contains(e){return e.root===this.root}initialize(e,t){const r=this._root;this._beforeRefreshEmitter.fire();let{roots:n}=Kt(e),i=this._root=this._createRoot?this._createRoot(n,e):new Oe(0,e.length,n);i.type=I.ROOT,this._createRoot||n.forEach(o=>o.parent=i),t||this._onRefreshEmitter.fire(r?tu(r,i):mE(i))}_onTextChange({source:e,changes:t}){if(e==="FROM_REMOTE"){const r=oE(t,this._baseDocument.getText());if(r)try{this._beforeTextChangeEmitter.fire(),this.replaceWithHtml(r,e)}finally{this._onTextChangeEmitter.fire()}}}insertBefore(e,t,r,n){if(t.parent){if(t.parent===e&&er(t)===r)return t;this.remove(t,n)}const i=this.contains(e),o=Vo(t),s=e.children,a=r?s.indexOf(r):s.length;if(a<0)return fe("referenced node is not a child of parent node",t);s.splice(a,0,t);const l=r?r.start:e.endTagStart===void 0?e.end:e.endTagStart;return t.parent=e,xt(t,l-t.start,o.length),i&&(n!=="FROM_DOM"&&this._onMutateEmitter.fire([V.add(e,t,r||void 0)]),n!=="FROM_REMOTE"&&this._baseDocument.applyEdits(n,[{text:o,range:{start:l,end:l}}])),t}getContext(e){return e.closest(t=>vE(t.tag))}replaceWithHtml(e,t){const r=this._baseDocument,n=c=>{const u=this.getContext(c);if(u)return u.isDirty=!0,Promise.resolve().then(()=>{u.isDirty=!1}),!1;if(c.type!==I.HTML){if(!c.closed)return!1}else return!c.content||!EE.test(c.content);return!0};if(!this._root)return this.initialize(r.getText());let i={start:e.oldPosition,end:e.oldEnd},o=qv(i,this._root);if(!o)return this.initialize(r.getText());let s,a,l;do{const c=tE(e,o);s=this._baseDocument.getText(c),[a,...l]=Kt(s).roots}while((!a||l.length||!n(o)||!n(a)||a.end-a.start!==s.length)&&(o=o.parent));if(!o||!o.parent)return this.initialize(r.getText());this.replaceChild(o.parent,{node:a,text:s},o,t)}replaceChild(e,t,r,n){const{text:i,node:o}=t,s=e.children,a=s.indexOf(r);if(a<0)return fe("referenced node is not a child of parent node",o);s.splice(a,1,o);const l=i.length-(r.end-r.start);return o.parent=e,xt(o,r.start-o.start,l),this._baseDocument.getText(o)!==i?(fe("Error while sync"),o):(n!=="FROM_DOM"&&this._onMutateEmitter.fire(vs(r,o)),r.parent=void 0,o)}remove(e,t){const r=this.contains(e),n=e.parent;if(!n)return fe("node is not in tree");const i=n.children,o=i.indexOf(e);if(o<0)return fe("referenced node is not a child of parent node");const s=e.end-e.start;xt(e,0,-s),i.splice(o,1),r&&(t!=="FROM_DOM"&&this._onMutateEmitter.fire([pE(e)]),t!=="FROM_REMOTE"&&this._baseDocument.applyEdits(t,[{text:"",range:{start:e.start,end:e.end}}])),e.parent=void 0}setAttribute(e,t,r,n){const i=this.contains(e),o=e.attributes||(e.attributes=Object.create(null));if(typeof r=="string"?o[t]=r:delete o[t],e.start===e.startTagEnd)return;const s=$l(e),a=e.startTagEnd===void 0?0:e.startTagEnd-e.start-(e.tag?.length||0)-2,l=Gv(e),c=s.length-a,u=e.start;xt(e,c,c),e.start=u,i&&this._baseDocument.applyEdits(n,[{text:s,range:l}])}setContent(e,t,r){const n=this.contains(e),i=e.start,o=e.end;e.content=t;const s=e.end-e.start;if(!s)return;const a=Vo(e,i),l=a.length-s;xt(e,0,l),n&&this._baseDocument.applyEdits(r,[{text:a,range:{start:i,end:o}}])}replaceWith(e,t,r){const n=e.parent;if(n){let i=er(e);this.remove(e,r);for(let o=t.length-1;o>=0;o--){const s=t[o];this.insertBefore(n,s,i,r),i=s}}return t}replaceWithEx(e,t,r){if(typeof t=="string"){const o=Kt(t).roots;o.length!==1&&fe("Error while replacing with string"),t=o[0]}const n=e.children;this.replaceWith(e,[t],r);let i=null;for(let o=n.length-1;o>=0;o--){let s=n[o];this.insertBefore(t,s,i,r),i=s}return t}setHidden(e,t,r){t?e.parent&&this.remove(e,r):this.replaceWith(e,[...e.children],r)}applyMutations(e){this._baseDocument.beginUpdate();try{for(const t of e)switch(t.type){case"Add":this.insertBefore(t.parent||this.root,t.node,t.nextSibling||null,ir);break;case"Remove":this.remove(t.node,ir);break;case"Set":this.setContent(t.node,t.data,ir);break;case"Hidden":this.setHidden(t.node,t.value,ir);break;case"Attribute":this.setAttribute(t.node,t.name,t.value===void 0?null:t.value,ir)}}finally{this._baseDocument.endUpdate()}}getNodeByPosition(e){return this._root?.findNodeAt(e)}};function SE(e){return e.toLowerCase().replace(/[^a-zA-Z0-9]+(.)/g,(t,r)=>r.toUpperCase())}function ru(e){return"<!DOCTYPE "+e.name+(e.publicId?' PUBLIC "'+e.publicId+'"':"")+(!e.publicId&&e.systemId?" SYSTEM":"")+(e.systemId?' "'+e.systemId+'"':"")+">"}var nu=Object.create(null);function iu(e,t){const r=nu[e]||(nu[e]=Object.create(null));let n=r[t];if(typeof n!="boolean"){const i=document.createElement(e)[SE(t)];n=r[t]=typeof i<"u"&&typeof i!="boolean"}return n}function Qe(e){return e.nodeType===Node.ELEMENT_NODE}function ou(e){return Qe(e)?e.tagName==="AMP-IMG"?!0:iu(e.tagName.toLowerCase(),"src"):!1}function Es(e){return Qe(e)&&!e.ownerSVGElement}function wE(e){return e.tagName==="IMG"}function CE(e){return e.tagName==="FORM"}function AE(e){return e.tagName==="SCRIPT"}function TE(e){return e.tagName==="STYLE"}function _s(e){return e.nodeType===Node.DOCUMENT_NODE}function su(e){return e.nodeType===Node.DOCUMENT_TYPE_NODE}var Kr;(function(e){function t(h){return h.constructor.name==="CSSStyleRule"}e.isStyleRule=t;function r(h){return h.constructor.name==="CSSImportRule"}e.isImportRule=r;function n(h){return h.constructor.name==="CSSMediaRule"}e.isMediaRule=n;function i(h){return h.constructor.name==="CSSFontFaceRule"}e.isFontFaceRule=i;function o(h){return h.constructor.name==="CSSPageRule"}e.isPageRule=o;function s(h){return h.constructor.name==="CSSKeyframesRule"}e.isKeyframesRule=s;function a(h){return h.constructor.name==="CSSKeyframeRule"}e.isKeyframeRuleRule=a;function l(h){return h.constructor.name==="CSSNamespaceRule"}e.isNamespaceRule=l;function c(h){return h.constructor.name==="CSSCounterStyleRule"}e.isCounterStyleRule=c;function u(h){return h.constructor.name==="CSSSupportsRule"}e.isSupportsRule=u;function d(h){return h.constructor.name==="CSSFontFeatureValuesRule"}e.isFontFeatureValuesRuleRule=d})(Kr||(Kr={}));function Ss(e){return e.nodeType===Node.COMMENT_NODE}function hi(e){return e.nodeType===Node.TEXT_NODE}function kE(e){return e.tagName==="TABLE"}async function LE(e,t=5e3){return typeof e.complete<"u"&&!e.complete?new Promise((r,n)=>{setTimeout(r,t),e.onload=()=>r(getComputedStyle(e)),e.onerror=i=>{}}):getComputedStyle(e)}function Mt(e){if(Qe(e))return au(e);if(_s(e))return[...e.childNodes].map(r=>Mt(r)).join("");if(su(e))return ru(e);const t=document.createElement("div");return t.appendChild(e.cloneNode(!0)),t.innerHTML}function OE(e){const t=e.tagName.toLowerCase();let r="";for(const n of e.attributes){const i=n.name,o=n.value;r+=o===""&&i!=="em"&&!iu(t,i)?` ${i}`:` ${i}="${o.replaceAll('"',"'")}"`}return r}function Se(e){let t="";for(const r of e.childNodes)t+=Mt(r);return t}function au(e){const t=Object.getOwnPropertyDescriptor(e,"$$tagName")?.value||e.tagName.toLowerCase(),r=OE(e);return Ho.has(t.toLowerCase())?t==="vk-snippet-end"?`<${t}${r}/>`:`<${t}${r}>`:TE(e)?`<${t}${r}>${e.innerHTML}</${t}>`:`<${t}${r}>${Se(e)}</${t}>`}function xE(e){return typeof e=="string"?e:""}function lu(e,t,r){if(r&&e.type===I.DOCTYPE&&r?.type!==I.ROOT){const i=document.createTextNode(e.content||"");return t.set(e,i),i}const n=Qn(e,!1);t.set(e,n);for(const i of e.children){const o=lu(i,t,e);n.appendChild(o)}return n}function pt(){fe("Element node not in tree")}function PE(e,t){const r=[],n=new Map,i=new Map,o=a=>t.getByNode(a)||n.get(a),s=a=>{if(a){const l=a.lastChild;let c=(l?o(l)?.nextSibling:o(a)?.firstChild)||void 0;for(;c&&i.has(c);)c=c.nextSibling||void 0;return c?.parentNode===o(a)?c:void 0}};for(const a of e)switch(a.type){case"Add":{let{node:l,nextSibling:c}=a;const u=l.parent;if(u){const d=lu(l,n,u);if(u.type===I.ROOT)r.push(V.add(null,d,c&&o(c)));else{const h=o(u);if(h){let f;for(;c;){const g=n.get(c);if(g){f=g;break}let y=t.getByNode(c);if(y&&!i.has(y)&&h.contains(y)){for(f=y;y.parentNode!==h&&y.parentNode;)y=y.parentNode,Qe(y)&&y.replaceWith(...y.childNodes);break}c=er(c)||void 0}f||(f=s(u)),r.push(V.add(h,d,f))}else pt()}}else pt();break}case"Move":{let{node:l,nextSibling:c}=a;const u=l.parent,d=o(l);if(u&&d)if(u.type===I.ROOT)r.push(V.move(null,d,c&&o(c)));else{const h=o(u);if(h){let f;for(;c;){const g=n.get(c);if(g){f=g;break}let y=t.getByNode(c);if(y&&!i.has(y)&&h.contains(y)){for(;y.parentNode!==h&&y.parentNode;)y=y.parentNode;y||fe("error while calculating next sibling"),f=y;break}c=er(c)||void 0}f||(f=s(u)),r.push(V.move(h,d,f))}else pt()}else pt();break}case"Remove":{const l=a.node,c=o(l);if(l.type===I.HTML&&!l.content)continue;c?(i.set(c,l),r.push(V.remove(c))):pt();break}case"Update":{const l=a.prev,c=o(l);c?n.set(a.next,c):pt();break}case"Attribute":{const l=o(a.node);l?r.push(V.attribute(l,a.name,a.value)):pt();break}case"Set":{const l=a.node,c=o(l);c?hi(c)&&l.type===I.HTML||Ss(c)&&l.type===I.HTML||su(c)&&l.type===I.DOCTYPE?r.push(V.set(c,a.data||"")):e.push(V.remove(l),V.add(l.parent||null,l,er(l)||void 0)):pt();break}}return{mutations:r,toAdd:n,toRemove:i}}function NE({mutations:e,toAdd:t,toRemove:r},n){const i=(o,s,a)=>{if(!o)return fe("Element node not in tree");if(!(o instanceof Element))return fe("node is not HTMLEement");const l=a===void 0?void 0:ql(o,s,xE(a));try{l!=null?st(o,s,l):o.removeAttribute(s)}catch{}};for(const o of e)switch(o.type){case"Add":{const{node:s,nextSibling:a,parent:l}=o;l?.insertBefore(s,a?.parentNode===l&&a||null);break}case"Move":{const{node:s,nextSibling:a,parent:l}=o;l?.insertBefore(s,a?.parentNode===l&&a||null);break}case"Remove":{const{node:s}=o;if(s instanceof Element)s.remove();else if(s instanceof Document)for(const a of[...s.childNodes])a.parentNode?.removeChild(a);else s.parentNode?.removeChild(s);break}case"Attribute":i(o.node,o.name,o.value);break;case"Set":{const{node:s,data:a}=o;s instanceof Comment?s.data=a:s instanceof Text&&(s.textContent=qo(a).textContent);break}}for(const[o,s]of r)n.remove(s);for(const[o,s]of t){const a=n.getByElement(s);a&&n.remove(a),n.set(o,s)}}var ME=class{constructor(){k(this,"_byKey",new WeakMap),k(this,"_byValue",new WeakMap)}get(e){return this._byKey.get(e)}getByValue(e){return this._byValue.get(e)?.deref()}set(e,t){this._byKey.set(e,t),this._byValue.set(t,new WeakRef(e))}delete(e){const t=this.get(e);t&&(this._byKey.delete(e),this._byValue.delete(t))}deleteByValue(e){const t=this.getByValue(e);t&&(this._byKey.delete(t),this._byValue.delete(e))}},RE=class{constructor(){k(this,"_map",new ME)}getByNode(e){return this._map.getByValue(e)}getByElement(e){return this._map.get(e)}set(e,t){this._map.set(t,e)}remove(e,t=!0){const r=this._map.getByValue(e);if(r&&this._map.delete(r),t){const n=e.children;for(let i=0,o=n.length;i<o;i++)this.remove(n[i])}}},ws;(function(e){function t(n,i,o=(s,a)=>s===a){const s=n.length;let a=s===i.length;if(a){for(let l=0;l<s;l++)if(!o(n[l],i[l])){a=!1;break}}return a}e.isEqual=t;function r(n,i,o=(s,a)=>s===a){const s=new Set,a=new Set;for(const l of n)for(const c of i)o(l,c)&&(s.add(l),a.add(c));return{added:i.filter(l=>!a.has(l)),removed:n.filter(l=>!s.has(l))}}e.compare=r})(ws||(ws={}));var cu=new WeakMap;function DE(e){const t=[],r=new Set(e);function n(i){if(r.has(i)){const{parentNode:o,nextSibling:s}=i;o&&r.has(o)&&n(o),s&&r.has(s)&&n(s),t.push(i),r.delete(i)}}for(const i of r)n(i);return t}function IE(e,t){let r=cu.get(e);if(!r){let l=function(c){for(const u of c)i.push(u),t(u)?o.push(u):l(u.childNodes)};var n=l;let{added:i,removed:o,reparented:s=[],reordered:a=[]}=e;i=[...i],o=[...o],s&&l(s),a&&l(a),i=DE(i),r={added:i,removed:o},cu.set(e,r)}return r}var BE=customElements.define,Cs=new J,As=new J,FE=Cs.event,jE=As.event;customElements.define=function(e,t,r){const n=t.prototype.connectedCallback,i=t.prototype.connectedCallback;BE.call(customElements,e,class extends t{connectedCallback(){if(n&&this.ownerDocument===window.document)try{Cs.fire(),n.call(this)}finally{As.fire()}}adoptedCallback(){if(i&&this.ownerDocument===window.document)try{Cs.fire(),i.call(this)}finally{As.fire()}}},r)};function uu(e,t,r,n){const i=[...e.childNodes],o=t(e,n);for(const s of i)r(o,uu(s,t,r,o));return o}function or(e,t,r){if(t(e,r)!==!1)for(const n of[...e.childNodes])or(n,t,e)}var lt="___em-internal";function Ts(e,t=!0,r=!1){let n=e.content;switch(e.type){case I.ROOT:{const i=document.implementation.createHTMLDocument();for(const o of[...i.childNodes])i.removeChild(o);if(t)for(const o of e.children)i.appendChild(Ts(o,t,r));return i}case I.DOCTYPE:return new DOMParser().parseFromString(`<!DOCTYPE${e.content}>`,"text/html").doctype;case I.COMMENT:return document.createComment(n||"");case I.ELEMENT:if(e.tag){if(r&&customElements.get(e.tag)){const o=document.createElement("div");return o.innerHTML=zo(e),o.firstChild}const i=document.createElement(e.tag);if(e.attributes)for(const o of e.attributeNames){const s=e.attributes[o];try{st(i,o,typeof s=="string"?s:"")}catch{}}if(t)for(const o of e.children)i.appendChild(Ts(o,t,r));return i}return document.createTextNode("<");case I.HTML:return qo(n||"");default:throw new Error("unsupported node")}}function $E(e){return Kt(e).roots.map(t=>Ts(t,!0,!0))}function du(){const e=document.implementation.createHTMLDocument();for(const t of[...e.childNodes])t.remove();return e}function HE(e){let t;switch(e){case"tr":t=document.createElement("table");break;case"td":t=document.createElement("tr");break;case"head":case"body":t=document.createElement("html");break;case"DocumentType":case"html":return du();default:t=document.createElement("div")}return t}function zE(e){return"<!DOCTYPE "+e.name+(e.publicId?' PUBLIC "'+e.publicId+'"':"")+(!e.publicId&&e.systemId?" SYSTEM":"")+(e.systemId?' "'+e.systemId+'"':"")+">"}function mi(e){if(e instanceof Element)return au(e);if(e instanceof Document)return[...e.childNodes].map(r=>mi(r)).join("");if(e instanceof DocumentType)return zE(e);if(e instanceof DocumentFragment)return[...e.childNodes].map(r=>mi(r)).join("");const t=document.createElement("div");return t.appendChild(e.cloneNode(!0)),t.innerHTML}function VE(e,t,r){let n=1;const i=new Jc,o=new Map,s=new Map,a=new Map;let l=!1;const c=uu(e,f=>{const g=String(n++);let y;if(ou(f)||f instanceof Element&&f.hasAttribute("src")){const A=document.createElement(f.tagName);for(const{name:L,value:C}of f.attributes){const O=Gl(f,L,C);O!==null&&st(A,L==="src"?"___src":L,O)}y=A}else y=f.cloneNode(),JE(f,y);if(y)y instanceof DocumentType&&(l=!0),a.set(y,g),o.set(f,g);else return document.createDocumentFragment();return y},(f,g)=>f&&g&&f.appendChild(g));let u=l?du():document.createDocumentFragment();u.appendChild(c),or(u,(f,g)=>{if(g){const y=a.get(f);if(g instanceof HTMLScriptElement||g instanceof HTMLStyleElement)return;if(!y)return fe("Error while mapping: not found element");f instanceof Element?f.setAttribute(lt,y):g.insertBefore(document.createComment(`${lt}${y}`),f)}});let d=$E(t(u)).filter(f=>!!f),h;if(!d.length)return i;if(u instanceof Document){const f=HE("html");for(const g of d)f.appendChild(g);h=f}else{h=document.createDocumentFragment();for(const f of d)h.appendChild(f)}return or(h,(f,g)=>{let y=null;if(f instanceof HTMLHtmlElement)s.set("1",f);else{if(f instanceof Element&&f.hasAttribute(lt)){y=f.getAttribute(lt),y&&s.set(y,f);return}const A=f.previousSibling;if(A instanceof Comment&&(!(f instanceof Comment)||f.data.indexOf(lt)<0)){const L=A.data,C=L.indexOf(lt);C>=0&&(y=L.substring(C+14),y&&s.set(y,f))}}}),or(h,f=>{if(f instanceof Element&&f.hasAttribute(lt)){f.removeAttribute(lt);return}f instanceof Comment&&f.data.indexOf(lt)>=0&&f.remove()}),or(e,f=>{const g=o.get(f),y=s.get(g);y&&(i.set(f,y),(f instanceof HTMLScriptElement||f instanceof HTMLStyleElement)&&f.firstChild&&y.firstChild&&i.set(f.firstChild,y.firstChild))}),i}function WE(e){const t=fu(e.cloneNode()),r=Wo(t),n=r.length;return t.startTagEnd=t.startTagEnd===void 0?void 0:r.indexOf(">",Math.max(r.lastIndexOf("'"),r.lastIndexOf('"')))+1,t.endTagStart=t.endTagStart===void 0?void 0:t.endTagStart+(n-t.end),t.end=n,t.type=I.ELEMENT,t}var sr;(function(e){e.HiddenResult=(function(t){return t[t.none=0]="none",t[t.node=1]="node",t[t.children=2]="children",t[t.all=3]="all",t})({})})(sr||(sr={}));function fu(e){let t=Kt(mi(e.cloneNode())).roots[0];return t||(t=new Oe(0,0,[]),t.type=I.HTML,t.content=""),t}function hu(e,t=sr.HiddenResult.node){if(t&sr.HiddenResult.node&&(e.end=e.start=e.startTagEnd=e.endTagStart=e.end=0),t&sr.HiddenResult.children)for(const r of e.children)hu(r,sr.HiddenResult.all)}function UE(e,t=[],r){let n;return e instanceof Element?n=WE(e):n=fu(e),n.children=t,n.parent=void 0,r&&hu(n,r(n)),n}function ks(e,t){let r=t.getByElement(e);if(r)return r;for(const n of e.childNodes)if(r=ks(n,t),r)return r}function qE(e,t,r){let n=e.parentNode,i=e.nextSibling,o;for(;n;){const s=t.getByElement(n)??(r&&n===r.node?r.treeNode:void 0);if(s){if(o){let a=t.getByNode(o);if(a&&n.contains(a))return{parentTreeNode:s,nextSiblingTreeNode:o};o=void 0}for(;i;){let a=ks(i,t);if(a)return{parentTreeNode:s,nextSiblingTreeNode:a};i=i.nextSibling}return{parentTreeNode:s}}if(!o)for(;i;){let a=ks(i,t);if(a){o=a,i=i.nextSibling;break}i=i.nextSibling}i||(i=n.nextSibling),n=n.parentNode}}function GE(e,t){const r=[],n=e.attributeChanged;if(n)for(const i of Object.keys(n)){const o=n[i];for(const s of o){const a=t.getByElement(s);if(a){const l=s.getAttribute(i);r.push(V.attribute(a,i,typeof l=="string"?l:void 0))}}}return r}function XE(e,t){const r=[],n=e.characterDataChanged;if(n)for(const i of n){const o=t.getByElement(i);o&&r.push(V.set(o,Ss(i)?i.data:mi(i)))}return r}function YE(e){return(e instanceof Element?e:e.parentElement)?.closest(".sortable-fallback")??null}function KE(e){if(e.nodeType!==Node.TEXT_NODE)return!1;const t=e.parentElement;if(!t||t.closest(".em-element-list-ul, .em-element-list-ol")&&t.closest(".em-element-list-bullet"))return!1;const r=t.closest('[class*="em-element-"]');return!(!r||[".em-element-list-ul",".em-element-list-ol",".em-element-custom-table"].some(n=>r.matches(n)))}function QE(e,t,r){const n=[],i=new Set;for(const o of e){const{added:s,removed:a}=IE(o,l=>!!t.getByElement(l));for(const l of a)if(!i.has(l)){const c=t.getByElement(l);c&&(n.push(V.remove(c)),i.add(l))}for(const l of s){if(KE(l))continue;const c=YE(l);if(c&&!t.getByElement(c))continue;const{parentTreeNode:u,nextSiblingTreeNode:d}=qE(l,t,r)||{};if(u){let h=t.getByElement(l);h||(h=UE(l),t.set(h,l)),n.push(V.add(u,h,d)),i.delete(l)}}n.push(...GE(o,t)),n.push(...XE(o,t))}return n}function ZE(e,t,r){const n=[],i=t.attributes,o=r.attributes;for(const s of i){const a=s.name,l=o.getNamedItem(a==="src"?"___src":a);if(l){const c=l.value;c!==s.value&&n.push(V.attribute(e,a,c))}else n.push(V.attribute(e,a,void 0))}for(const s of o){const a=s.name==="___src"?"src":s.name;i.getNamedItem(a)||n.push(V.attribute(e,a,s.value))}return n}function JE(e,t){if(!(!mb()||!(e instanceof Element)||!(t instanceof Element)))for(const{name:r,value:n}of Array.from(e.attributes)){const i=Gl(e,r,n);i===null?t.removeAttribute(r):i!==n&&st(t,r,i)}}function e_(e,t,r){const n=[],i=VE(e,r,t);return or(e,o=>{const s=t.getByElement(o);if(!s)return;const a=i.getByKey(o);if(a){if(a instanceof Element){if(!(o instanceof Element))return fe("CharacterData mapped to Element");n.push(...ZE(s,o,a))}else if(a instanceof CharacterData){if(!(o instanceof CharacterData))return fe("Element mapped to CharacterData");a.data!==o.data&&n.push(V.set(s,a.data))}else if(a instanceof Document&&!(o instanceof Document))return fe("Node mapped to Document")}else{const l=u=>{for(const d of u.childNodes)if(i.getByKey(d)||!l(d))return!1;return!0};let c;return l(o)?(n.push(V.hidden(s,!0)),c=!1):n.push(V.hidden(s,!1)),c}}),n}function t_(e,t){let r,n=e;do{if(t.getByElement(n))return r;r=n}while(n=n.parentNode);for(;e.parentNode;)e=e.parentNode}function r_(e){return[...new Set(e)]}function n_(e,t){return r_([...e.added,...e.reparented||[],...e.reordered||[],...Object.values(e.characterDataChanged||{}),...Object.values(e.attributeChanged||{})].flat().map(r=>t_(r,t)||r))}function i_(e,t){let r=[];for(const n of e){const i=n_(n,t),o=s=>{for(let a=0;a<r.length;a++){const l=r[a];if(l.contains(s)||l===s)return;if(s.contains(l)){r.splice(a,1,s);return}}r.push(s)};for(const s of i)o(s)}return r}function o_(e,t,r){return i_(e,t).flatMap(n=>e_(n,t,r))}function s_(e,t,r,n){return[...QE(e,t,n),...o_(e,t,r)]}function a_(e){const t=[],r=new Map;for(let n=e.length-1;n>=0;n--){const i=e[n];if(i.type==="Attribute"){const{node:o,name:s,value:a}=i;let l=r.get(o);l||r.set(o,l={}),l.hasOwnProperty(s)||(l[s]=a,o.attributes?.[s]!==a&&t.unshift(i))}else t.unshift(i)}return t}var l_=class{constructor(){k(this,"_map",new WeakMap)}getAttribute(e,t){return this._map.get(e)?.[t]}setAttribute(e,t,r){let n=this._map.get(e);n||this._map.set(e,n=Object.create(null)),n[t]=r}removeAttribute(e,t){let r=this._map.get(e);r&&delete r[t]}hasAttribute(e,t){return this._map.has(e)?.hasOwnProperty(t)}has(e){return this._map.has(e)}replaceNode(e,t){const r=this._map.get(e);r&&(this._map.delete(e),this._map.set(t,r))}},mu=class{constructor(e=10){k(this,"_max",void 0),k(this,"_cache",new Map),this._max=e}get(e){let t=this._cache.get(e);return t!==void 0&&(this._cache.delete(e),this._cache.set(e,t)),t}put(e,t){this._cache.has(e)?this._cache.delete(e):this._cache.size==this._max&&this._cache.delete(this.first()),this._cache.set(e,t)}first(){return this._cache.keys().next().value}},pu=new mu(1e3);function ar(e){if(e=e?.trim(),e){let t=pu.get(e);return t||(t=new Set(e.split(" ").filter(r=>!!r).map(r=>r)),pu.put(e,t)),t}else return new Set}function pi(e){e||(e="");const t=document.createElement("div");return t.setAttribute("style",e),t.style}var gu=new mu(1e3);function Qr(e){e||(e="");let t=gu.get(e);return t||(t=pi(e),gu.put(e,t)),t}function c_(e,t,r){const n=e?e.split(" "):[],i=ar(r),o=ar(t),s=n.filter(a=>(a=a.trim(),i.has(a)?o.has(a):!0));return s.length===n.length?e:s.join(" ")}function u_(e,t,r){const n=pi(e),i=Qr(r),o=Qr(t);let s=!1;for(const a of i){const l=i.getPropertyValue(a);n.getPropertyValue(a)===l&&o.getPropertyValue(a)!==l&&(s=!0,n.removeProperty(a))}return s?n.cssText:e}function bu(e,t,r,n){return typeof n!="string"?t:e==="class"?c_(t,r,n)||null:e==="style"?u_(t,r,n)||null:r!==t&&t===n?null:t}function d_(e,t){const r=ar(e),n=ar(t);for(const i of n)r.has(i)||(e=e?`${e.trimEnd()} ${i}`:i);return e}function f_(e,t){const r=pi(e),n=Qr(t);let i=!1;for(const o of n){const s=n.getPropertyValue(o);r.getPropertyValue(o)!==s&&(i=!0,r.setProperty(o,s))}return i?r.cssText:e}function h_(e,t,r){return typeof r!="string"?t:e==="class"?d_(t,r)||null:e==="style"?f_(t,r)||null:t}function m_(e,t,r){if(!t)return t;const n=ar(e),i=ar(r),o=t.split(" "),s=o.filter(a=>(a=a.trim(),!n.has(a)||i.has(a)));return s.length!==o.length?s.join(" "):t}function p_(e,t,r){if(!t)return t;const n=Qr(e),i=pi(t),o=Qr(r);let s=!1;for(const a of i){const l=i.getPropertyValue(a);n.getPropertyValue(a)===l&&o.getPropertyValue(a)!==l&&(s=!0,i.removeProperty(a))}return s?i.cssText:t}var g_=class{constructor(e,t,r,n){k(this,"element",void 0),k(this,"name",void 0),k(this,"nextValue",void 0),k(this,"prevValue",void 0),this.element=e,this.name=t,this.nextValue=r,this.prevValue=n}},b_=class{constructor(e){k(this,"_nodeMap",void 0),k(this,"_map",new l_),k(this,"_hiddenMutations",[]),this._nodeMap=e}_onHiddenMutate(){try{for(const{name:e,element:t,prevValue:r,nextValue:n}of this._hiddenMutations){const i=this._nodeMap.getByElement(t);if(i)if(e==="class"){const o=m_(r,n,this._map.getAttribute(i,e))||null;o===null?this._map.removeAttribute(i,e):this._map.setAttribute(i,e,o)}else if(e==="style"){const o=p_(r,n,this._map.getAttribute(i,e))||null;o===null?this._map.removeAttribute(i,e):this._map.setAttribute(i,e,o)}else n===null?this._map.removeAttribute(i,e):this._map.setAttribute(i,e,n)}}finally{this._hiddenMutations=[]}}onHiddenMutate(e){const t=this._hiddenMutations;for(const r of e){const n=r.attributeChanged;if(n)for(const i of Object.keys(n)){const o=n[i];for(const s of o)t.push(new g_(s,i,s.getAttribute(i),r.getOldAttribute(s,i)))}}}beforeCommit(e){this._onHiddenMutate();const t=[];for(const r of e){if(r.type==="Attribute"){const{name:n,node:i,value:o}=r,s=bu(n,o,i.attributes?.[n]||null,this._map.getAttribute(i,n));if(s!==o){t.push(V.attribute(i,n,s));continue}}if(t.push(r),r.type==="Add"){const{node:n}=r,i=n.attributes;if(i)for(const o of Object.keys(i)){const s=i[o],a=this._map.getAttribute(n,o);if(a){const l=bu(o,s,null,a);l!==s&&t.push(V.attribute(n,o,l))}}}}return t}onRemoteMutate(e){this._onHiddenMutate();const t=[];for(const r of e){if(r.type==="Attribute"){const{name:n,node:i,value:o}=r,s=h_(n,o,this._map.getAttribute(i,n));if(s!==o){t.push(V.attribute(i,n,s));continue}}else r.type==="Update"&&this._map.replaceNode(r.prev,r.next);t.push(r)}return t}},y_=F.__commonJSMin(((e,t)=>{(function(r,n){typeof e=="object"&&typeof t<"u"?n(e):typeof define=="function"&&define.amd?define(["exports"],n):(r=typeof globalThis<"u"?globalThis:r||self,n(r.MutationSummary={}))})(e,(function(r){"use strict";var n=(function(){function E(){this._nodes=[],this._values=[]}return E._isIndex=function(m){return+m===m>>>0},E._nodeId=function(m){var b=m[E._ID_PROP];return b||(b=m[E._ID_PROP]=E._NEXT_ID++),b},E.prototype.set=function(m,b){var S=E._nodeId(m);this._nodes[S]=m,this._values[S]=b},E.prototype.get=function(m){var b=E._nodeId(m);return b!==void 0?this._values[b]:void 0},E.prototype.has=function(m){return E._nodeId(m)in this._nodes},E.prototype.delete=function(m){var b=E._nodeId(m);delete this._nodes[b],this._values[b]=void 0},E.prototype.keys=function(){var m=[];for(var b in this._nodes)E._isIndex(b)&&m.push(this._nodes[b]);return m},E._ID_PROP="__mutation_summary_node_map_id__",E._NEXT_ID=1,E})(),i=(function(){function E(){this.added=new n,this.removed=new n,this.maybeMoved=new n,this.oldPrevious=new n,this.moved=void 0}return E})();r.Movement=void 0,(function(E){E[E.STAYED_OUT=0]="STAYED_OUT",E[E.ENTERED=1]="ENTERED",E[E.STAYED_IN=2]="STAYED_IN",E[E.REPARENTED=3]="REPARENTED",E[E.REORDERED=4]="REORDERED",E[E.EXITED=5]="EXITED"})(r.Movement||(r.Movement={}));var o=function(E,m){return o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(b,S){b.__proto__=S}||function(b,S){for(var p in S)Object.prototype.hasOwnProperty.call(S,p)&&(b[p]=S[p])},o(E,m)};function s(E,m){if(typeof m!="function"&&m!==null)throw new TypeError("Class extends value "+String(m)+" is not a constructor or null");o(E,m);function b(){this.constructor=E}E.prototype=m===null?Object.create(m):(b.prototype=m.prototype,new b)}var a=(function(){function E(m,b,S,p,v,T,w,P){b===void 0&&(b=!1),S===void 0&&(S=!1),p===void 0&&(p=!1),v===void 0&&(v=null),T===void 0&&(T=!1),w===void 0&&(w=null),P===void 0&&(P=null),this.node=m,this.childList=b,this.attributes=S,this.characterData=p,this.oldParentNode=v,this.added=T,this.attributeOldValues=w,this.characterDataOldValue=P,this.isCaseInsensitive=this.node.nodeType===Node.ELEMENT_NODE&&this.node instanceof HTMLElement&&this.node.ownerDocument instanceof HTMLDocument}return E.prototype.getAttributeOldValue=function(m){if(this.attributeOldValues)return this.isCaseInsensitive&&(m=m.toLowerCase()),this.attributeOldValues[m]},E.prototype.getAttributeNamesMutated=function(){var m=[];if(!this.attributeOldValues)return m;for(var b in this.attributeOldValues)this.attributeOldValues.hasOwnProperty(b)&&m.push(b);return m},E.prototype.attributeMutated=function(m,b){this.attributes=!0,this.attributeOldValues=this.attributeOldValues||{},!(m in this.attributeOldValues)&&(this.attributeOldValues[m]=b)},E.prototype.characterDataMutated=function(m){this.characterData||(this.characterData=!0,this.characterDataOldValue=m)},E.prototype.removedFromParent=function(m){this.childList=!0,this.added||this.oldParentNode?this.added=!1:this.oldParentNode=m},E.prototype.insertedIntoParent=function(){this.childList=!0,this.added=!0},E.prototype.getOldParent=function(){if(this.childList){if(this.oldParentNode)return this.oldParentNode;if(this.added)return null}return this.node.parentNode},E})(),l=(function(E){s(m,E);function m(b,S){var p=E.call(this)||this;p.rootNode=b,p.reachableCache=void 0,p.wasReachableCache=void 0,p.anyParentsChanged=!1,p.anyAttributesChanged=!1,p.anyCharacterDataChanged=!1;for(var v=0;v<S.length;v++){var T=S[v];switch(T.type){case"childList":p.anyParentsChanged=!0;for(var w=0;w<T.removedNodes.length;w++){var P=T.removedNodes[w];p.getChange(P).removedFromParent(T.target)}for(var w=0;w<T.addedNodes.length;w++){var P=T.addedNodes[w];p.getChange(P).insertedIntoParent()}break;case"attributes":p.anyAttributesChanged=!0;var x=p.getChange(T.target);x.attributeMutated(T.attributeName,T.oldValue);break;case"characterData":p.anyCharacterDataChanged=!0;var x=p.getChange(T.target);x.characterDataMutated(T.oldValue)}}return p}return m.prototype.getChange=function(b){var S=this.get(b);return S||(S=new a(b),this.set(b,S)),S},m.prototype.getOldParent=function(b){var S=this.get(b);return S?S.getOldParent():b.parentNode},m.prototype.getIsReachable=function(b){if(b===this.rootNode)return!0;if(!b)return!1;this.reachableCache=this.reachableCache||new n;var S=this.reachableCache.get(b);return S===void 0&&(S=this.getIsReachable(b.parentNode),this.reachableCache.set(b,S)),S},m.prototype.getWasReachable=function(b){if(b===this.rootNode)return!0;if(!b)return!1;this.wasReachableCache=this.wasReachableCache||new n;var S=this.wasReachableCache.get(b);return S===void 0&&(S=this.getWasReachable(this.getOldParent(b)),this.wasReachableCache.set(b,S)),S},m.prototype.reachabilityChange=function(b){return this.getIsReachable(b)?this.getWasReachable(b)?r.Movement.STAYED_IN:r.Movement.ENTERED:this.getWasReachable(b)?r.Movement.EXITED:r.Movement.STAYED_OUT},m})(n),c=(function(){function E(m,b,S,p,v){this.rootNode=m,this.mutations=b,this.selectors=S,this.calcReordered=p,this.calcOldPreviousSibling=v,this.treeChanges=new l(m,b),this.entered=[],this.exited=[],this.stayedIn=new n,this.visited=new n,this.childListChangeMap=void 0,this.characterDataOnly=void 0,this.matchCache=void 0,this.processMutations()}return E.prototype.processMutations=function(){if(!(!this.treeChanges.anyParentsChanged&&!this.treeChanges.anyAttributesChanged))for(var m=this.treeChanges.keys(),b=0;b<m.length;b++)this.visitNode(m[b],void 0)},E.prototype.visitNode=function(m,b){if(!this.visited.has(m)){this.visited.set(m,!0);var S=this.treeChanges.get(m),p=b;if((S&&S.childList||p==null)&&(p=this.treeChanges.reachabilityChange(m)),p!==r.Movement.STAYED_OUT){if(this.matchabilityChange(m),p===r.Movement.ENTERED)this.entered.push(m);else if(p===r.Movement.EXITED)this.exited.push(m),this.ensureHasOldPreviousSiblingIfNeeded(m);else if(p===r.Movement.STAYED_IN){var v=r.Movement.STAYED_IN;S&&S.childList&&(S.oldParentNode!==m.parentNode?(v=r.Movement.REPARENTED,this.ensureHasOldPreviousSiblingIfNeeded(m)):this.calcReordered&&this.wasReordered(m)&&(v=r.Movement.REORDERED)),this.stayedIn.set(m,v)}if(p!==r.Movement.STAYED_IN)for(var T=m.firstChild;T;T=T.nextSibling)this.visitNode(T,p)}}},E.prototype.ensureHasOldPreviousSiblingIfNeeded=function(m){if(this.calcOldPreviousSibling){this.processChildlistChanges();var b=m.parentNode,S=this.treeChanges.get(m);S&&S.oldParentNode&&(b=S.oldParentNode);var p=this.childListChangeMap.get(b);p||(p=new i,this.childListChangeMap.set(b,p)),p.oldPrevious.has(m)||p.oldPrevious.set(m,m.previousSibling)}},E.prototype.getChanged=function(m,b,S){this.selectors=b,this.characterDataOnly=S;for(var p=0;p<this.entered.length;p++){var v=this.entered[p],T=this.matchabilityChange(v);(T===r.Movement.ENTERED||T===r.Movement.STAYED_IN)&&m.added.push(v)}for(var w=this.stayedIn.keys(),p=0;p<w.length;p++){var v=w[p],T=this.matchabilityChange(v);if(T===r.Movement.ENTERED)m.added.push(v);else if(T===r.Movement.EXITED)m.removed.push(v);else if(T===r.Movement.STAYED_IN&&(m.reparented||m.reordered)){var P=this.stayedIn.get(v);m.reparented&&P===r.Movement.REPARENTED?m.reparented.push(v):m.reordered&&P===r.Movement.REORDERED&&m.reordered.push(v)}}for(var p=0;p<this.exited.length;p++){var v=this.exited[p],T=this.matchabilityChange(v);(T===r.Movement.EXITED||T===r.Movement.STAYED_IN)&&m.removed.push(v)}},E.prototype.getOldParentNode=function(m){var b=this.treeChanges.get(m);if(b&&b.childList)return b.oldParentNode?b.oldParentNode:null;var S=this.treeChanges.reachabilityChange(m);if(S===r.Movement.STAYED_OUT||S===r.Movement.ENTERED)throw Error("getOldParentNode requested on invalid node.");return m.parentNode},E.prototype.getOldPreviousSibling=function(m){var b=m.parentNode,S=this.treeChanges.get(m);S&&S.oldParentNode&&(b=S.oldParentNode);var p=this.childListChangeMap.get(b);if(!p)throw Error("getOldPreviousSibling requested on invalid node.");return p.oldPrevious.get(m)},E.prototype.getOldAttribute=function(m,b){var S=this.treeChanges.get(m);if(!S||!S.attributes)throw Error("getOldAttribute requested on invalid node.");var p=S.getAttributeOldValue(b);if(p===void 0)throw Error("getOldAttribute requested for unchanged attribute name.");return p},E.prototype.attributeChangedNodes=function(m){if(!this.treeChanges.anyAttributesChanged)return{};var b,S;if(m){b={},S={};for(var p=0;p<m.length;p++){var v=m[p];b[v]=!0,S[v.toLowerCase()]=v}}for(var T={},w=this.treeChanges.keys(),p=0;p<w.length;p++){var P=w[p],x=this.treeChanges.get(P);if(x.attributes&&!(r.Movement.STAYED_IN!==this.treeChanges.reachabilityChange(P)||r.Movement.STAYED_IN!==this.matchabilityChange(P)))for(var R=P,N=x.getAttributeNamesMutated(),D=0;D<N.length;D++){var v=N[D];b&&!b[v]&&!(x.isCaseInsensitive&&S[v])||x.getAttributeOldValue(v)!==R.getAttribute(v)&&(S&&x.isCaseInsensitive&&(v=S[v]),T[v]=T[v]||[],T[v].push(R))}}return T},E.prototype.getOldCharacterData=function(m){var b=this.treeChanges.get(m);if(!b||!b.characterData)throw Error("getOldCharacterData requested on invalid node.");return b.characterDataOldValue},E.prototype.getCharacterDataChanged=function(){if(!this.treeChanges.anyCharacterDataChanged)return[];for(var m=this.treeChanges.keys(),b=[],S=0;S<m.length;S++){var p=m[S];if(r.Movement.STAYED_IN===this.treeChanges.reachabilityChange(p)){var v=this.treeChanges.get(p);!v.characterData||p.textContent==v.characterDataOldValue||b.push(p)}}return b},E.prototype.computeMatchabilityChange=function(m,b){this.matchCache||(this.matchCache=[]),this.matchCache[m.uid]||(this.matchCache[m.uid]=new n);var S=this.matchCache[m.uid],p=S.get(b);return p===void 0&&(p=m.matchabilityChange(b,this.treeChanges.get(b)),S.set(b,p)),p},E.prototype.matchabilityChange=function(m){var b=this;if(this.characterDataOnly)switch(m.nodeType){case Node.COMMENT_NODE:case Node.TEXT_NODE:return r.Movement.STAYED_IN;default:return r.Movement.STAYED_OUT}if(!this.selectors)return r.Movement.STAYED_IN;if(m.nodeType!==Node.ELEMENT_NODE)return r.Movement.STAYED_OUT;for(var S=m,p=this.selectors.map(function(w){return b.computeMatchabilityChange(w,S)}),v=r.Movement.STAYED_OUT,T=0;v!==r.Movement.STAYED_IN&&T<p.length;){switch(p[T]){case r.Movement.STAYED_IN:v=r.Movement.STAYED_IN;break;case r.Movement.ENTERED:v===r.Movement.EXITED?v=r.Movement.STAYED_IN:v=r.Movement.ENTERED;break;case r.Movement.EXITED:v===r.Movement.ENTERED?v=r.Movement.STAYED_IN:v=r.Movement.EXITED}T++}return v},E.prototype.getChildlistChange=function(m){var b=this.childListChangeMap.get(m);return b||(b=new i,this.childListChangeMap.set(m,b)),b},E.prototype.processChildlistChanges=function(){if(!this.childListChangeMap){this.childListChangeMap=new n;for(var m=function(p){var v=b.mutations[p];if(v.type!="childList"||b.treeChanges.reachabilityChange(v.target)!==r.Movement.STAYED_IN&&!b.calcOldPreviousSibling)return"continue";for(var T=b.getChildlistChange(v.target),w=v.previousSibling,P=function(N,D){!N||T.oldPrevious.has(N)||T.added.has(N)||T.maybeMoved.has(N)||D&&(T.added.has(D)||T.maybeMoved.has(D))||T.oldPrevious.set(N,D)},x=0;x<v.removedNodes.length;x++){var R=v.removedNodes[x];P(R,w),T.added.has(R)?T.added.delete(R):(T.removed.set(R,!0),T.maybeMoved.delete(R)),w=R}P(v.nextSibling,w);for(var x=0;x<v.addedNodes.length;x++){var R=v.addedNodes[x];T.removed.has(R)?(T.removed.delete(R),T.maybeMoved.set(R,!0)):T.added.set(R,!0)}},b=this,S=0;S<this.mutations.length;S++)m(S)}},E.prototype.wasReordered=function(m){if(!this.treeChanges.anyParentsChanged)return!1;this.processChildlistChanges();var b=m.parentNode,S=this.treeChanges.get(m);S&&S.oldParentNode&&(b=S.oldParentNode);var p=this.childListChangeMap.get(b);if(!p)return!1;if(p.moved)return p.moved.get(m);p.moved=new n;var v=new n;function T(N){if(!N||!p.maybeMoved.has(N))return!1;var D=p.moved.get(N);return D!==void 0||(v.has(N)?D=!0:(v.set(N,!0),D=R(N)!==P(N)),v.has(N)?(v.delete(N),p.moved.set(N,D)):D=p.moved.get(N)),D}var w=new n;function P(N){var D=w.get(N);if(D!==void 0)return D;for(D=p.oldPrevious.get(N);D&&(p.removed.has(D)||T(D));)D=P(D);return D===void 0&&(D=N.previousSibling),w.set(N,D),D}var x=new n;function R(N){if(x.has(N))return x.get(N);for(var D=N.previousSibling;D&&(p.added.has(D)||T(D));)D=D.previousSibling;return x.set(N,D),D}return p.maybeMoved.keys().forEach(T),p.moved.get(m)},E})(),u=(function(){function E(m,b){var S=this;if(this.projection=m,this.added=[],this.removed=[],this.reparented=b.all||b.element||b.characterData?[]:void 0,this.reordered=b.all?[]:void 0,m.getChanged(this,b.elementFilter,b.characterData),b.all||b.attribute||b.attributeList){var p=b.attribute?[b.attribute]:b.attributeList,v=m.attributeChangedNodes(p);b.attribute?this.valueChanged=v[b.attribute]||[]:(this.attributeChanged=v,b.attributeList&&b.attributeList.forEach(function(w){S.attributeChanged.hasOwnProperty(w)||(S.attributeChanged[w]=[])}))}if(b.all||b.characterData){var T=m.getCharacterDataChanged();b.characterData?this.valueChanged=T:this.characterDataChanged=T}this.reordered&&(this.getOldPreviousSibling=m.getOldPreviousSibling.bind(m))}return E.prototype.getOldParentNode=function(m){return this.projection.getOldParentNode(m)},E.prototype.getOldAttribute=function(m,b){return this.projection.getOldAttribute(m,b)},E.prototype.getOldCharacterData=function(m){return this.projection.getOldCharacterData(m)},E.prototype.getOldPreviousSibling=function(m){return this.projection.getOldPreviousSibling(m)},E})(),d=(function(){function E(){}return E.prototype.matches=function(m){if(m===null)return!1;if(this.attrValue===void 0)return!0;if(!this.contains)return this.attrValue==m;for(var b=m.split(" "),S=0;S<b.length;S++)if(this.attrValue===b[S])return!0;return!1},E.prototype.toString=function(){return this.attrName==="class"&&this.contains?"."+this.attrValue:this.attrName==="id"&&!this.contains?"#"+this.attrValue:this.contains?"["+this.attrName+"~="+h(this.attrValue)+"]":"attrValue"in this?"["+this.attrName+"="+h(this.attrValue)+"]":"["+this.attrName+"]"},E})();function h(E){return'"'+E.replace(/"/,'\\"')+'"'}var f=/[a-zA-Z_]+/,g=/[a-zA-Z0-9_\-]+/,y=(function(){function E(){this.uid=E.nextUid++,this.qualifiers=[]}return Object.defineProperty(E.prototype,"caseInsensitiveTagName",{get:function(){return this.tagName.toUpperCase()},enumerable:!1,configurable:!0}),Object.defineProperty(E.prototype,"selectorString",{get:function(){return this.tagName+this.qualifiers.join("")},enumerable:!1,configurable:!0}),E.prototype.isMatching=function(m){return m[E.matchesSelector](this.selectorString)},E.prototype.wasMatching=function(m,b,S){if(!b||!b.attributes)return S;var p=b.isCaseInsensitive?this.caseInsensitiveTagName:this.tagName;if(p!=="*"&&p!==m.tagName)return!1;for(var v=[],T=!1,w=0;w<this.qualifiers.length;w++){var P=this.qualifiers[w],x=b.getAttributeOldValue(P.attrName);v.push(x),T=T||x!==void 0}if(!T)return S;for(var w=0;w<this.qualifiers.length;w++){var P=this.qualifiers[w],x=v[w];if(x===void 0&&(x=m.getAttribute(P.attrName)),!P.matches(x))return!1}return!0},E.prototype.matchabilityChange=function(m,b){var S=this.isMatching(m);return S?this.wasMatching(m,b,S)?r.Movement.STAYED_IN:r.Movement.ENTERED:this.wasMatching(m,b,S)?r.Movement.EXITED:r.Movement.STAYED_OUT},E.parseSelectors=function(m){var b=[],S,p;function v(){S&&(p&&(S.qualifiers.push(p),p=void 0),b.push(S)),S=new E}function T(){p&&S.qualifiers.push(p),p=new d}for(var w=/\s/,P=void 0,x="Invalid or unsupported selector syntax.",R=1,N=2,D=3,ne=4,je=5,ht=6,In=7,ot=8,Le=9,Bn=10,qt=11,At=12,Rr=13,Fn=14,W=R,Xm=0;Xm<m.length;){var B=m[Xm++];switch(W){case R:if(B.match(f)){v(),S.tagName=B,W=N;break}if(B=="*"){v(),S.tagName="*",W=D;break}if(B=="."){v(),T(),S.tagName="*",p.attrName="class",p.contains=!0,W=ne;break}if(B=="#"){v(),T(),S.tagName="*",p.attrName="id",W=ne;break}if(B=="["){v(),T(),S.tagName="*",p.attrName="",W=ht;break}if(B.match(w))break;throw Error(x);case N:if(B.match(g)){S.tagName+=B;break}if(B=="."){T(),p.attrName="class",p.contains=!0,W=ne;break}if(B=="#"){T(),p.attrName="id",W=ne;break}if(B=="["){T(),p.attrName="",W=ht;break}if(B.match(w)){W=Fn;break}if(B==","){W=R;break}throw Error(x);case D:if(B=="."){T(),p.attrName="class",p.contains=!0,W=ne;break}if(B=="#"){T(),p.attrName="id",W=ne;break}if(B=="["){T(),p.attrName="",W=ht;break}if(B.match(w)){W=Fn;break}if(B==","){W=R;break}throw Error(x);case ne:if(B.match(f)){p.attrValue=B,W=je;break}throw Error(x);case je:if(B.match(g)){p.attrValue+=B;break}if(B=="."){T(),p.attrName="class",p.contains=!0,W=ne;break}if(B=="#"){T(),p.attrName="id",W=ne;break}if(B=="["){T(),W=ht;break}if(B.match(w)){W=Fn;break}if(B==","){W=R;break}throw Error(x);case ht:if(B.match(f)){p.attrName=B,W=In;break}if(B.match(w))break;throw Error(x);case In:if(B.match(g)){p.attrName+=B;break}if(B.match(w)){W=ot;break}if(B=="~"){p.contains=!0,W=Le;break}if(B=="="){p.attrValue="",W=qt;break}if(B=="]"){W=D;break}throw Error(x);case ot:if(B=="~"){p.contains=!0,W=Le;break}if(B=="="){p.attrValue="",W=qt;break}if(B=="]"){W=D;break}if(B.match(w))break;throw Error(x);case Le:if(B=="="){p.attrValue="",W=qt;break}throw Error(x);case Bn:if(B=="]"){W=D;break}if(B.match(w))break;throw Error(x);case qt:if(B.match(w))break;if(B=='"'||B=="'"){P=B,W=Rr;break}p.attrValue+=B,W=At;break;case At:if(B.match(w)){W=Bn;break}if(B=="]"){W=D;break}if(B=="'"||B=='"')throw Error(x);p.attrValue+=B;break;case Rr:if(B==P){W=Bn;break}p.attrValue+=B;break;case Fn:if(B.match(w))break;if(B==","){W=R;break}throw Error(x)}}switch(W){case R:case N:case D:case je:case Fn:v();break;default:throw Error(x)}if(!b.length)throw Error(x);return b},E.nextUid=1,E.matchesSelector="matches",E})(),A=(function(){function E(){}return E.createObserverOptions=function(m){var b={childList:!0,subtree:!0},S;function p(v){if(!(b.attributes&&!S)){if(b.attributes=!0,b.attributeOldValue=!0,!v){S=void 0;return}S=S||{},v.forEach(function(T){S[T]=!0,S[T.toLowerCase()]=!0})}}return m.forEach(function(v){if(v.characterData){b.characterData=!0,b.characterDataOldValue=!0;return}if(v.all){p(),b.characterData=!0,b.characterDataOldValue=!0;return}if(v.attribute){p([v.attribute.trim()]);return}var T=E._elementFilterAttributes(v.elementFilter).concat(v.attributeList||[]);T.length&&p(T)}),S&&(b.attributeFilter=Object.keys(S)),b},E.validateOptions=function(m){for(var b in m)if(!(b in E._optionKeys))throw Error("Invalid option: "+b);if(typeof m.callback!="function")throw Error("Invalid options: callback is required and must be a function");if(!m.queries||!m.queries.length)throw Error("Invalid options: queries must contain at least one query request object.");for(var S={callback:m.callback,rootNode:m.rootNode||document,observeOwnChanges:!!m.observeOwnChanges,oldPreviousSibling:!!m.oldPreviousSibling,queries:[]},p=0;p<m.queries.length;p++){var v=m.queries[p];if(v.all){if(Object.keys(v).length>1)throw Error("Invalid request option. all has no options.");S.queries.push({all:!0});continue}if("attribute"in v){var T={attribute:E._validateAttribute(v.attribute)};if(T.elementFilter=y.parseSelectors("*["+T.attribute+"]"),Object.keys(v).length>1)throw Error("Invalid request option. attribute has no options.");S.queries.push(T);continue}if("element"in v){var w=Object.keys(v).length,T={element:v.element,elementFilter:y.parseSelectors(v.element)};if(v.hasOwnProperty("elementAttributes")&&(T.attributeList=E._validateElementAttributes(v.elementAttributes),w--),w>1)throw Error("Invalid request option. element only allows elementAttributes option.");S.queries.push(T);continue}if(v.characterData){if(Object.keys(v).length>1)throw Error("Invalid request option. characterData has no options.");S.queries.push({characterData:!0});continue}throw Error("Invalid request option. Unknown query request.")}return S},E._validateElementAttributes=function(m){if(!m.trim().length)throw Error("Invalid request option: elementAttributes must contain at least one attribute.");for(var b={},S={},p=m.split(/\s+/),v=0;v<p.length;v++){var T=p[v];if(T){T=E._validateAttribute(T);var w=T.toLowerCase();if(b[w])throw Error("Invalid request option: observing multiple case variations of the same attribute is not supported.");S[T]=!0,b[w]=!0}}return Object.keys(S)},E._elementFilterAttributes=function(m){var b={};return m.forEach(function(S){S.qualifiers.forEach(function(p){b[p.attrName]=!0})}),Object.keys(b)},E._validateAttribute=function(m){if(typeof m!="string"||(m=m.trim(),!m))throw Error("Invalid request option. attribute must be a non-zero length string.");if(!m.match(E._attributeFilterPattern))throw Error("Invalid request option. invalid attribute name: "+m);return m},E._attributeFilterPattern=/^([a-zA-Z:_]+[a-zA-Z0-9_\-:.]*)$/,E._optionKeys={callback:!0,queries:!0,rootNode:!0,oldPreviousSibling:!0,observeOwnChanges:!0},E})(),L=(function(){function E(m){var b=this;this._connected=!1,this._options=A.validateOptions(m),this._observerOptions=A.createObserverOptions(this._options.queries),this._root=this._options.rootNode,this._callback=this._options.callback,this._elementFilter=Array.prototype.concat.apply([],this._options.queries.map(function(S){return S.elementFilter?S.elementFilter:[]})),this._elementFilter.length||(this._elementFilter=void 0),this._calcReordered=this._options.queries.some(function(S){return S.all}),this._queryValidators=[],E.createQueryValidator&&(this._queryValidators=this._options.queries.map(function(S){return E.createQueryValidator(b._root,S)})),this._observer=new MutationObserver(function(S){b._observerCallback(S)}),this.reconnect()}return E.prototype.reconnect=function(){if(this._connected)throw Error("Already connected");this._observer.observe(this._root,this._observerOptions),this._connected=!0,this._checkpointQueryValidators()},E.prototype.takeSummaries=function(){if(!this._connected)throw Error("Not connected");var m=this._createSummaries(this._observer.takeRecords());return this._changesToReport(m)?m:void 0},E.prototype.disconnect=function(){var m=this.takeSummaries();return this._observer.disconnect(),this._connected=!1,m},E.prototype._observerCallback=function(m){this._options.observeOwnChanges||this._observer.disconnect();var b=this._createSummaries(m);this._runQueryValidators(b),this._options.observeOwnChanges&&this._checkpointQueryValidators(),this._changesToReport(b)&&this._callback(b),!this._options.observeOwnChanges&&this._connected&&(this._checkpointQueryValidators(),this._observer.observe(this._root,this._observerOptions))},E.prototype._createSummaries=function(m){if(!m||!m.length)return[];for(var b=new c(this._root,m,this._elementFilter,this._calcReordered,this._options.oldPreviousSibling),S=[],p=0;p<this._options.queries.length;p++)S.push(new u(b,this._options.queries[p]));return S},E.prototype._checkpointQueryValidators=function(){this._queryValidators.forEach(function(m){m&&m.recordPreviousState()})},E.prototype._runQueryValidators=function(m){this._queryValidators.forEach(function(b,S){b&&b.validate(m[S])})},E.prototype._changesToReport=function(m){return m.some(function(b){return!!(["added","removed","reordered","reparented","valueChanged","characterDataChanged"].some(function(S){return b[S]&&b[S].length})||b.attributeChanged&&Object.keys(b.attributeChanged).some(function(S){return!!b.attributeChanged[S].length}))})},E})(),C=(function(){function E(m,b){this.root=m,this.delegate=b,this.idMap={}}return E.prototype.initialize=function(m,b){this.idMap[m]=this.root;for(var S=0;S<b.length;S++)this.deserializeNode(b[S],this.root)},E.prototype.applyChanged=function(m,b,S,p){var v=this;b.forEach(function(T){var w=v.deserializeNode(T);v.deserializeNode(T.parentNode),v.deserializeNode(T.previousSibling),w.parentNode&&w.parentNode.removeChild(w)}),m.forEach(function(T){var w=v.deserializeNode(T);w.parentNode&&w.parentNode.removeChild(w)}),b.forEach(function(T){var w=v.deserializeNode(T),P=v.deserializeNode(T.parentNode),x=v.deserializeNode(T.previousSibling);P.insertBefore(w,x?x.nextSibling:P.firstChild)}),S.forEach(function(T){var w=v.deserializeNode(T);Object.keys(T.attributes).forEach(function(P){var x=T.attributes[P];x===null?w.removeAttribute(P):(!v.delegate||!v.delegate.setAttribute||!v.delegate.setAttribute(w,P,x))&&w.setAttribute(P,x)})}),p.forEach(function(T){var w=v.deserializeNode(T);w.textContent=T.textContent}),m.forEach(function(T){delete v.idMap[T.id]})},E.prototype.deserializeNode=function(m,b){var S=this;if(m===null)return null;var p=this.idMap[m.id];if(p)return p;var v=this.root.ownerDocument;switch(v===null&&(v=this.root),m.nodeType){case Node.COMMENT_NODE:p=v.createComment(m.textContent);break;case Node.TEXT_NODE:p=v.createTextNode(m.textContent);break;case Node.DOCUMENT_TYPE_NODE:p=v.implementation.createDocumentType(m.name,m.publicId,m.systemId);break;case Node.ELEMENT_NODE:this.delegate&&this.delegate.createElement&&(p=this.delegate.createElement(m.tagName)),p||(p=v.createElement(m.tagName)),Object.keys(m.attributes).forEach(function(w){(!S.delegate||!S.delegate.setAttribute||!S.delegate.setAttribute(p,w,m.attributes[w]))&&p.setAttribute(w,m.attributes[w])});break;default:throw"Unsupported node type: "+m.nodeType}if(this.idMap[m.id]=p,b&&b.appendChild(p),m.childNodes)for(var T=0;T<m.childNodes.length;T++)this.deserializeNode(m.childNodes[T],p);return p},E})(),O=(function(){function E(m,b,S){var p=this;this.target=m,this.mirror=b,this.nextId=1,this.knownNodes=new n;for(var v=this.serializeNode(m).id,T=[],w=m.firstChild;w;w=w.nextSibling)T.push(this.serializeNode(w,!0));this.mirror.initialize(v,T);var P=[{all:!0}];S&&(P=P.concat(S)),this.mutationSummary=new L({rootNode:m,callback:function(x){p.applyChanged(x)},queries:P})}return E.prototype.disconnect=function(){this.mutationSummary&&(this.mutationSummary.disconnect(),this.mutationSummary=void 0)},E.prototype.rememberNode=function(m){var b=this.nextId++;return this.knownNodes.set(m,b),b},E.prototype.forgetNode=function(m){this.knownNodes.delete(m)},E.prototype.serializeNode=function(m,b){if(m===null)return null;var S=this.knownNodes.get(m);if(S!==void 0)return{id:S};var p={nodeType:m.nodeType,id:this.rememberNode(m)};switch(p.nodeType){case Node.DOCUMENT_TYPE_NODE:var v=m;p.name=v.name,p.publicId=v.publicId,p.systemId=v.systemId;break;case Node.COMMENT_NODE:case Node.TEXT_NODE:p.textContent=m.textContent;break;case Node.ELEMENT_NODE:var T=m;p.tagName=T.tagName,p.attributes={};for(var w=0;w<T.attributes.length;w++){var P=T.attributes[w];p.attributes[P.name]=P.value}if(b&&T.childNodes.length){p.childNodes=[];for(var x=T.firstChild;x;x=x.nextSibling)p.childNodes.push(this.serializeNode(x,!0))}}return p},E.prototype.serializeAddedAndMoved=function(m,b,S){var p=this,v=m.concat(b).concat(S),T=new n;v.forEach(function(P){var x=P.parentNode,R=T.get(x);R||(R=new n,T.set(x,R)),R.set(P,!0)});var w=[];return T.keys().forEach(function(P){for(var x=T.get(P),R=x.keys();R.length;){for(var N=R[0];N.previousSibling&&x.has(N.previousSibling);)N=N.previousSibling;for(;N&&x.has(N);){var D=p.serializeNode(N);D.previousSibling=p.serializeNode(N.previousSibling),D.parentNode=p.serializeNode(N.parentNode),w.push(D),x.delete(N),N=N.nextSibling}R=x.keys()}}),w},E.prototype.serializeAttributeChanges=function(m){var b=this,S=new n;return Object.keys(m).forEach(function(p){m[p].forEach(function(v){var T=S.get(v);T||(T=b.serializeNode(v),T.attributes={},S.set(v,T)),T.attributes[p]=v.getAttribute(p)})}),S.keys().map(function(p){return S.get(p)})},E.prototype.applyChanged=function(m){var b=this,S=m[0],p=S.removed.map(function(P){return b.serializeNode(P)}),v=this.serializeAddedAndMoved(S.added,S.reparented,S.reordered),T=this.serializeAttributeChanges(S.attributeChanged),w=S.characterDataChanged.map(function(P){var x=b.serializeNode(P);return x.textContent=P.textContent,x});this.mirror.applyChanged(p,v,T,w),S.removed.forEach(function(P){b.forgetNode(P)})},E})();if(MutationObserver===void 0)throw Error("DOM Mutation Observers are required");r.ChildListChange=i,r.MutationProjection=c,r.MutationSummary=L,r.NodeChange=a,r.NodeMap=n,r.Qualifier=d,r.Selector=y,r.Summary=u,r.TreeChanges=l,r.TreeMirror=C,r.TreeMirrorClient=O,Object.defineProperty(r,"__esModule",{value:!0})}))})),v_=y_(),lr=0,cr=new Array(1e3);function E_(){for(let e=0;e<lr;e+=2){const t=cr[e],r=cr[e+1];t(...r),cr[e]=void 0,cr[e+1]=void 0}lr=0}function __(e,...t){cr[lr]=e,cr[lr+1]=t,lr+=2,lr===2&&w_()}function S_(){let e=0;const t=new MutationObserver(E_),r=document.createTextNode("");return t.observe(r,{characterData:!0}),()=>{r.data=String(e=++e%2)}}var w_=S_();function yu(){__(()=>{Ls.hasListeners()&&(Ls.fire(),yu())})}var Ls=new J({onFirstListenerAdd:yu}),gi=Ls.once;function C_(e,t,r){const n=new J;let i=[];return n.addDisposable(e(o=>{gi(()=>{n.fire(t(i)),i=[]}),i.push(o)})),r?.addDisposable(n),n.event}var A_=class extends J{constructor(e={}){super(),k(this,"_mutationSummary",void 0),this._mutationSummary=new v_.MutationSummary({...e,observeOwnChanges:!0,callback:t=>this.fire(t),queries:[{all:!0}]})}dispose(){this._mutationSummary.disconnect(),super.dispose()}trigger(e){const t=this._mutationSummary.takeSummaries();return(e||t?.length)&&this.fire(t||[]),t}},T_=class extends Z{_nextTickHandler(){gi(()=>{this.trigger(),this._summaries.length&&(this._innerEmitter.hasListeners()?this._innerEmitter.fire(this._summaries):this._lostEmitter.fire(this._summaries),this._summaries=[])},Number.MAX_VALUE)}constructor(e={}){super(),k(this,"_mutationEmitter",void 0),k(this,"_innerEmitter",this.addDisposable(new J({onFirstListenerAdd:()=>{this._nextTickHandler()}}))),k(this,"_lostEmitter",this.addDisposable(new J)),k(this,"_paused",0),k(this,"_stopped",0),k(this,"_summaries",[]),k(this,"onMutate",this._innerEmitter.event),k(this,"onLost",this._lostEmitter.event),k(this,"onNativeMutate",void 0),this._mutationEmitter=this.addDisposable(new A_(e)),this.onNativeMutate=this._mutationEmitter.event,this.addDisposable(this._mutationEmitter.event(t=>{this._stopped||(this._paused?this._lostEmitter.fire(t):(this._summaries.push(...t),gi(()=>{this._summaries.length&&!this._innerEmitter.hasListeners()&&(this._lostEmitter.fire(this._summaries),this._summaries=[])},Number.MAX_VALUE)))}))}get isStoped(){return this._paused>0||this._stopped>0}stop(){this._mutationEmitter.trigger(),this._stopped++}start(){this._mutationEmitter.trigger(),this._stopped--}pause(){this._mutationEmitter.trigger(),this._paused++}resume(){this._mutationEmitter.trigger(),this._paused--}trigger(){this._mutationEmitter.trigger(!0)}},k_=gi,L_=class extends Z{beginTextUpdate(){this._baseDocument.beginUpdate()}endTextUpdate(){this._baseDocument.endUpdate()}constructor(e,t,r){super(),k(this,"_baseDocument",void 0),k(this,"_remoteDocument",void 0),k(this,"_parsedDocument",void 0),k(this,"_nodeMap",void 0),k(this,"_beforeChangeEmitter",this.addDisposable(new J)),k(this,"_beforeCommitEmitter",this.addDisposable(new J)),k(this,"_onRefreshEmitter",this.addDisposable(new J)),k(this,"_documentElement",void 0),k(this,"_docType",void 0),k(this,"_parseFn",void 0),k(this,"_mapHTMLRoots",void 0),k(this,"_getRootsParent",void 0),k(this,"_mutationCollector",this.addDisposable(new T_)),k(this,"_attributeMapper",void 0),k(this,"_commitPromise",void 0),k(this,"_pushUndoStop",!1),k(this,"_locked",!1),k(this,"_treeMutations",[]),k(this,"beforeChange",this._beforeChangeEmitter.event),k(this,"beforeCommit",this._beforeCommitEmitter.event),k(this,"onChange",_p(C_(this._mutationCollector.onNativeMutate,i=>i.flat(),this),i=>i.length>0,this)),k(this,"onRefresh",this._onRefreshEmitter.event),this._baseDocument=e,this._remoteDocument=t,this._parseFn=r.prepareHtml,this._mapHTMLRoots=r.mapHTMLRoots,this._getRootsParent=r.rootsParent;const n=this._parsedDocument=new _E(e,r.createRoot);this._nodeMap=new RE,this.addDisposable(n.onRefresh(this._onRefresh.bind(this))),this.addDisposable(n.onMutate(this._onRemoteMutate.bind(this))),this._attributeMapper=new b_(this._nodeMap),this.addDisposable(FE(()=>this._mutationCollector.pause())),this.addDisposable(jE(()=>this._mutationCollector.resume())),this.addDisposable(this._mutationCollector.onLost(i=>this._attributeMapper.onHiddenMutate(i)))}commit(e=!0,t=!1){if(e&&(this._pushUndoStop=!0),t&&(this._locked=!0),!this._commitPromise){const r=()=>new Promise(n=>{try{this._beforeCommitEmitter.fire()}catch{}const i=this._mutationCollector.onMutate(o=>{if(o.length){const s=s_(o,this._nodeMap,this._parseFn,this._rootsParent());this._commit(s)}});k_(()=>{const o=()=>{this._pushUndoStop=!1,this._commitPromise=void 0,this._locked=!1,n()};t?this._remoteDocument.saveChangesAsync(this._pushUndoStop).finally(o):(this._remoteDocument.saveChanges(this._pushUndoStop),o()),i.dispose()})});this._commitPromise=r()}return this._commitPromise}whenSent(){return this._remoteDocument.whenSent()}renderOnly(e){this._mutationCollector.stop();try{return e()}finally{this._mutationCollector.start()}}_rootsParent(){const e=this._getRootsParent?.();return e?{node:e,treeNode:this._parsedDocument.root}:void 0}getMappedParent(e){for(;e;){const t=this._nodeMap.getByElement(e);if(t){const r=this._parsedDocument.getContext(t);return r?this._nodeMap.getByNode(r):void 0}else e=e.parentNode}}getContext(e){return this.getMappedParent(e)||e}isInExternal(e){return this.getContext(e)!==e}isVisible(e){return!!this._nodeMap.getByElement(e)}getVisibleNode(e){let t=e;do{if(!t||this._nodeMap.getByElement(t))return t;t=t.parentNode||void 0}while(t)}_commit(e){if(e.length){e=this._attributeMapper.beforeCommit(e),e=a_(e);try{this._baseDocument.beginUpdate(),this._parsedDocument.applyMutations(e);for(const t of e)t.type==="Hidden"&&this._nodeMap.remove(t.node,t.value)}finally{this._baseDocument.endUpdate()}}}correctNodes(e){const t=new Map;for(const r of e)if(!t.has(r)&&this._parsedDocument.contains(r)&&r.type===I.ELEMENT){const n=Wo(r,!1,!1);n!==this._baseDocument.getText({start:r.start,end:r.startTagEnd===void 0?r.start:r.startTagEnd})+this._baseDocument.getText({start:r.endTagStart===void 0?r.end:r.endTagStart,end:r.end})&&t.set(r,n)}try{this._baseDocument.beginUpdate();for(const[r,n]of t)if(n!==this._baseDocument.getText({start:r.start,end:r.end})){const i=this._parsedDocument.replaceWithEx(r,n,ir),o=this._nodeMap.getByNode(r);o&&(this._nodeMap.remove(r),this._nodeMap.set(i,o))}}finally{this._baseDocument.endUpdate()}}_onRefresh(e){try{this._onRemoteMutate(e,!0)}finally{this._onRefreshEmitter.fire()}}_onRemoteMutate(e,t){if(this._treeMutations.push([e,t]),!(this._remoteDocument.hasChanges()&&!this._remoteDocument.isApplyingRemote()))for(const[r,n]of this._treeMutations)this._doOnRemoteMutate(r,n)}_doOnRemoteMutate(e,t){try{if(this._mutationCollector.stop(),e=this._attributeMapper.onRemoteMutate(e),this._treeMutations=[],!t){const n=this._parsedDocument.root;for(const i of e)if(i.type==="Add"){if(i.parent===n){t=!0;break}}else if(i.type==="Remove"){if(i.node.parent===n){t=!0;break}}else if(i.type==="Move"&&(i.node.parent===n||i.parent===n)){t=!0;break}}const r=PE(e,this._nodeMap);if(this._beforeChangeEmitter.fire({domMutations:r.mutations,treeMutations:e}),NE(r,this._nodeMap),t){const n=this._parsedDocument.root?.children;if(n){const i=n.map(s=>this._nodeMap.getByNode(s)).filter(s=>!!s),o=this._mapHTMLRoots(i);ws.isEqual(i,o)}}}finally{this._mutationCollector.start()}}getLinks(e){const t=this._nodeMap.getByElement(e),r=t?[[t,e]]:[];for(const n of e.childNodes)r.push(...this.getLinks(n));return r}setLinks(e){for(const[t,r]of e)this._nodeMap.set(t,r)}_clearLinks(e){for(const[t]of e)this._nodeMap.remove(t)}_removeByLinks(e,t){const r=new Set,n=[];for(const[i,o]of e)i.parent&&!r.has(i.parent)&&(this._parsedDocument.remove(i,t),n.unshift(V.remove(o))),r.add(i);return n}getInnerHtml(e){let t=this._nodeMap.getByElement(e);return t?this._baseDocument.getText({start:t.startTagEnd===void 0?t.start:t.startTagEnd,end:t.endTagStart===void 0?t.end:t.endTagStart}):""}getOuterHtml(e){let t=this._nodeMap.getByElement(e);return t?this._baseDocument.getText({start:t.start,end:t.end}):""}setInnerHtml(e,t){if(e instanceof Element)e.innerHTML=t;else if(e instanceof Comment)e.data=t;else if(e instanceof Document){fe("not supported inner html of Document");return}else e instanceof Text&&(e.textContent=t)}getElementByPosition(e){let t=this._parsedDocument.getNodeByPosition(e);if(t){let r;do r=this._nodeMap.getByNode(t);while(!r&&(t=t?.parent));return r}}getRangeByElement(e,t=!1){if(e){let r=null;do r=this._nodeMap.getByElement(e);while(t&&!r&&(e=e.parentElement));if(r)return{start:r.start,end:r.end}}}},O_=class{constructor(){k(this,"_changes",null)}get(){return this._changes}hasChanges(){return!!this._changes?.length}add(e){const t=He(this._changes,e);this._changes=t.length?t:null}clear(){this._changes=null}replace(e){this._changes=e.length?e:null}correctOffset(e,t){const r=this._changes;if(r){let n=0;for(let i=0,o=r.length;i<o;i++){const s=r[i];if(s.oldPosition<e)n+=s.newLength-s.oldLength;else break}e=e+(t?1:-1)*n}return e}correctRange(e,t){return{start:this.correctOffset(e.start,t),end:this.correctOffset(e.end,t)}}},vu=60;function x_(e,t){if(e===t)return;const r=Math.min(e.length,t.length);let n=0;for(;n<r&&e[n]===t[n];)n+=1;return{offset:n,ownLength:e.length,cachedLength:t.length,own:e.substring(n,n+vu),cached:t.substring(n,n+vu)}}var P_=class extends Z{constructor(...e){super(...e),k(this,"_onApplyEmitter",this.addDisposable(new J)),k(this,"_onEmptyEmitter",this.addDisposable(new J)),k(this,"_dispatched",[]),k(this,"onApply",this._onApplyEmitter.event),k(this,"onEmpty",this._onEmptyEmitter.event)}_emit(e){e.length&&this._onApplyEmitter.fire(e),this.hasDispatched()||this._onEmptyEmitter.fire()}hasDispatched(){return!!this._dispatched.length}append(e,t){this._dispatched.unshift({changeId:t,textChanges:e})}apply(e,t){const r=t===void 0?-1:this._dispatched.findIndex(n=>n.changeId===t);if(r>=0){this._confirmEcho(r,e);return}this._applyExternal(e)}_confirmEcho(e,t){const[r]=this._dispatched.splice(e,1);this._emit(He(at(r.textChanges),t))}_applyExternal(e){let t=[];for(const r of this._dispatched)t=He(t,at(r.textChanges));this._dispatched=[],this._emit(He(t,e))}clear(){this._dispatched=[]}},N_=class Qm extends Z{constructor(t=""){super(),k(this,"_text",void 0),this._text=t}getText(t){const r=eE(this,t);return r?this._text.substring(r.start,r.end):""}getLength(){return this._text.length}clone(){return new Qm(this._text)}},bi=class Zm extends N_{constructor(t=""){super(t),k(this,"_eventQueue",void 0),k(this,"_lockCounter",0),k(this,"_onChangeEmitter",this.addDisposable(new J)),k(this,"_onChangedEmitter",this.addDisposable(new J)),k(this,"onChanged",this._onChangedEmitter.event)}applyEdits(t,r){if(r=r.flatMap(n=>sE(this,n)),r.length){const n=nr(r,this);this._eventQueue&&this._eventQueue.push({source:t,changes:n}),this.change(t,r),this._eventQueue||this._onChangedEmitter.fire({source:t,changes:n})}}change(t,r){this._text=nE(this._text,r)}beginUpdate(){this._lockCounter++===0&&(this._eventQueue=[])}endUpdate(t){const r=this._eventQueue;if(--this._lockCounter===0&&r&&(this._eventQueue=void 0,r.length)){t===void 0&&(t=r[0].source);let n=null;for(const{changes:i}of r)n=He(n,i);if(n=n?.filter(i=>i.oldPosition!==i.newPosition||i.newText!==i.oldText),n?.length)return this._onChangedEmitter.fire({source:t,changes:n}),!0}return!1}clone(){return new Zm(this._text)}},M_=class extends bi{constructor(){super(),k(this,"_editStack",new O_),k(this,"_editLog",[]),k(this,"_entityId",void 0),k(this,"_versionController",this.addDisposable(new P_)),k(this,"_beforeSaveEmitter",this.addDisposable(new Ep)),k(this,"_onReadyEmitter",this.addDisposable(new J)),k(this,"_onEntitySetEmitter",this.addDisposable(new J)),k(this,"_onPendingSentEmitter",this.addDisposable(new J)),k(this,"_cache",new bi),k(this,"beforeSave",this._beforeSaveEmitter.event),k(this,"_reverting",!1),k(this,"_inited",!1),k(this,"_nextChangeId",1),k(this,"_rev",null),k(this,"_pendingSave",null),k(this,"_applyingRemote",!1),k(this,"_handleUpdateEntity",({edits:e,guid:t,changeId:r,rev:n})=>{if(t===this._entityId)return this._reportSyncDrift("update-entity"),this._onRemoteChange(e,r,n)}),k(this,"_handleSetEntity",e=>{this._reportSyncDrift("set-entity"),cv(),av(e.templateDirectivesPolicy??{}),this._entityId=e.guid,this._onEntitySetEmitter.fire(e.guid),this._editStack.clear(),this._versionController.clear(),this._pendingSave=null,this._onPendingSentEmitter.fire();const t=[[{range:ys(this._cache),text:e.html}]];return this._onRemoteChange(t,void 0,e.rev)}),k(this,"_onRemoteChange",(e,t,r)=>new Promise((n,i)=>{const{_cache:o}=this;let s=[];for(const a of e){const l=a.reverse();s=He(s,nr(l,o)),o.applyEdits(Yr,l)}this._rev=r??null,this._versionController.apply(s,t),this._versionController.hasDispatched()||this._flushPendingSave(),this._versionController.hasDispatched()?this.addDisposable(this._versionController.onEmpty(()=>{n()})):(this._onReadyEmitter.fire(),n())})),k(this,"onReady",this._onReadyEmitter.event),k(this,"onEntitySet",this._onEntitySetEmitter.event),this.addDisposable(X.addListenerAsync(me.SANDBOX_SET_ENTITY,this._handleSetEntity)),this.addDisposable(X.addListenerAsync(me.SANDBOX_UPDATE_ENTITY,this._handleUpdateEntity)),this._versionController.onApply(this._onApply.bind(this))}loadState(e){this._entityId=e.entityId;const t=[[{range:ys(this._cache),text:e.text}]];this._onRemoteChange(t)}saveState(){return{entityId:this._entityId,text:this.getText()}}_onApply(e){const t=this._editStack.get();if(!t){super.applyEdits(Yr,Nt(e));return}const r=Qc(t,e,"after"),n=r&&Qc(e,t,"before");if(!r||!n){this._editStack.clear(),super.applyEdits(Yr,Nt(He(at(t),e)));return}try{this._applyingRemote=!0,super.applyEdits(Yr,Nt(n))}finally{this._applyingRemote=!1}this._editStack.replace(r)}isApplyingRemote(){return this._applyingRemote}_flushPendingSave(){if(this._pendingSave!==null){const e=this._pendingSave;this._pendingSave=null,this.saveChanges(e),this._onPendingSentEmitter.fire()}}whenSent(){return this._pendingSave===null?Promise.resolve():new Promise(e=>{const t=this._onPendingSentEmitter.event(()=>{t.dispose(),e()})})}_reportSyncDrift(e){if(this._editStack.hasChanges()||this._versionController.hasDispatched())return;const t=x_(this.getText(),this._cache.getText())}applyEdits(e,t){if(!this._reverting){const r=nr(t,this);this._editStack.add(r),super.applyEdits(e,t),this._editLog.push(t)}}correctOffset(e,t){return this._editStack.correctOffset(e,t)}correctRange(e,t){return this._editStack.correctRange(e,t)}saveChanges(e=!0){if(!this._reverting&&this._rev!==null&&this._versionController.hasDispatched())return this._editStack.hasChanges()&&(this._pendingSave=(this._pendingSave??!1)||e),!0;if(!this._reverting&&this._beforeSaveEmitter.fire(e)!==!1&&this._entityId){const t=this._editStack.get()?.flatMap(r=>aE(r));if(t){const r=this._nextChangeId++;this._editStack.clear(),this._versionController.append(t,r),X.send(me.APPLICATION_UPDATE_ENTITY,{guid:this._entityId,pushUndoStop:e,edits:Nt(t),changeId:r,...this._rev!==null?{baseRev:this._rev}:{}})}return!0}return!1}saveChangesAsync(e=!0){return new Promise(t=>{const r=setTimeout(()=>fe("error while async saving"),1e4);if(this.saveChanges(e)===!1&&clearTimeout(r),!this.hasChanges()||this._pendingSave!==null)clearTimeout(r),t();else{const n=this.onReady(()=>{n.dispose(),clearTimeout(r),t()})}})}hasChanges(){return this._editStack.hasChanges()}},R_=class extends Mc{constructor(e,t){super(),k(this,"_baseDocument",void 0),k(this,"_mappedDocument",void 0),k(this,"_mappings",[]),k(this,"_cachedMappedDocument",new bi),this._baseDocument=e,this._mappedDocument=t,this._baseDocument.onChanged(this._onBaseChange.bind(this),Number.MAX_SAFE_INTEGER),this._mappedDocument.onChanged(this._onMappedChange.bind(this),Number.MAX_SAFE_INTEGER)}_onBaseChange({source:e,changes:t}){if(e==="FROM_REMOTE"){const r=this._baseDocument.getText(),n=nr(this.getMappings(r),this._baseDocument),i=at(this._mappings);if(t=He(i,t),t=He(t,n),this._mappings=n,t.length){const o=Nt(t);this._mappedDocument.applyEdits(e,di(o))}}}correctOffset(e,t){const r=t?this._mappings:at(this._mappings),n=Uo(r,({oldPosition:o})=>o>=e),i=n>0?r[n-1]:void 0;return i&&(i.oldEnd>e?e+=i.newPosition-i.oldPosition:e+=i.newEnd-i.oldEnd),e}correctRange(e,t){return{start:this.correctOffset(e.start,t),end:this.correctOffset(e.end,t)}}getMappedReplacementRangeAtPosition(e){const t=at(this._mappings).find(({oldPosition:r,oldEnd:n})=>e>=r&&e<n);return t?{start:t.oldPosition,end:t.oldEnd}:null}hasMappedReplacementRangeInRange(e){return at(this._mappings).some(({oldPosition:t,oldEnd:r})=>t<e.end&&r>e.start)}isMappedElementInPosition(e){return!!this._mappings.find(t=>t.newPosition<e&&t.newEnd>e)}escape(e,t){const r=this.getMappings(e,!1,t);return Gr(e,r)}unescape(e){const t=this.getRevertMappings(e);return Gr(e,t)}registerMatcherPair(e){const t=super.registerMatcherPair(e);this.rebuildFromBase();let r=!1;return{dispose:()=>{r||(r=!0,t.dispose(),this.rebuildFromBase())}}}rebuildFromBase(e=Yr){const t=this._baseDocument.getText(),r=this.getMappings(t),n=Gr(t,r);this._mappings=nr(r,this._baseDocument),this._mappedDocument.getText()!==n&&this._mappedDocument.applyEdits(e,[{range:{start:0,end:this._mappedDocument.getLength()},text:n}])}_onMappedChange({source:e,changes:t}){if(e!=="FROM_REMOTE"){const r=this._mappedDocument.getText(),n=nr(this.getRevertMappings(r),this._mappedDocument),i=this._mappings;if(t=He(i,t),t=He(t,n),this._mappings=at(n),t.length){const o=Nt(t);this._baseDocument.applyEdits(e,di(o))}}}},D_=0;function he(e){return e>=48&&e<=57}function gt(e){return he(e)||e>=65&&e<=70||e>=97&&e<=102}function Os(e){return e>=65&&e<=90}function I_(e){return e>=97&&e<=122}function B_(e){return Os(e)||I_(e)}function F_(e){return e>=128}function yi(e){return B_(e)||F_(e)||e===95}function Eu(e){return yi(e)||he(e)||e===45}function j_(e){return e>=0&&e<=8||e===11||e>=14&&e<=31||e===127}function vi(e){return e===10||e===13||e===12}function Rt(e){return vi(e)||e===32||e===9}function Ze(e,t){return!(e!==92||vi(t)||t===D_)}function Ei(e,t,r){return e===45?yi(t)||t===45||Ze(t,r):yi(e)?!0:e===92?Ze(e,t):!1}function xs(e,t,r){return e===43||e===45?he(t)?2:t===46&&he(r)?3:0:e===46?he(t)?2:0:he(e)?1:0}function _u(e){return e===65279||e===65534?1:0}var Ps=new Array(128),lM=128,cM=130,uM=131,dM=132,fM=133;for(let e=0;e<Ps.length;e++)Ps[e]=Rt(e)&&130||he(e)&&131||yi(e)&&132||j_(e)&&133||e||128;function Ns(e){return e<128?Ps[e]:132}function ur(e,t){return t<e.length?e.charCodeAt(t):0}function Ms(e,t,r){return r===13&&ur(e,t+1)===10?2:1}function dr(e,t,r){let n=e.charCodeAt(t);return Os(n)&&(n=n|32),n===r}function Zr(e,t,r,n){if(r-t!==n.length||t<0||r>e.length)return!1;for(let i=t;i<r;i++){const o=n.charCodeAt(i-t);let s=e.charCodeAt(i);if(Os(s)&&(s=s|32),s!==o)return!1}return!0}function $_(e,t){for(;t>=0&&Rt(e.charCodeAt(t));t--);return t+1}function _i(e,t){for(;t<e.length&&Rt(e.charCodeAt(t));t++);return t}function Rs(e,t){for(;t<e.length&&he(e.charCodeAt(t));t++);return t}function fr(e,t){if(t+=2,gt(ur(e,t-1))){for(const n=Math.min(e.length,t+5);t<n&&gt(ur(e,t));t++);const r=ur(e,t);Rt(r)&&(t+=Ms(e,t,r))}return t}function Si(e,t){for(;t<e.length;t++){const r=e.charCodeAt(t);if(!Eu(r)){if(Ze(r,ur(e,t+1))){t=fr(e,t)-1;continue}break}}return t}function wi(e,t){let r=e.charCodeAt(t);if((r===43||r===45)&&(r=e.charCodeAt(t+=1)),he(r)&&(t=Rs(e,t+1),r=e.charCodeAt(t)),r===46&&he(e.charCodeAt(t+1))&&(t+=2,t=Rs(e,t)),dr(e,t,101)){let n=0;r=e.charCodeAt(t+1),(r===45||r===43)&&(n=1,r=e.charCodeAt(t+2)),he(r)&&(t=Rs(e,t+1+n+1))}return t}function Ds(e,t){for(;t<e.length;t++){const r=e.charCodeAt(t);if(r===41){t++;break}Ze(r,ur(e,t+1))&&(t=fr(e,t))}return t}function Su(e){if(e.length===1&&!gt(e.charCodeAt(0)))return e[0];let t=parseInt(e,16);return(t===0||t>=55296&&t<=57343||t>1114111)&&(t=65533),String.fromCodePoint(t)}var wu=["EOF-token","ident-token","function-token","at-keyword-token","hash-token","string-token","bad-string-token","url-token","bad-url-token","delim-token","number-token","percentage-token","dimension-token","whitespace-token","CDO-token","CDC-token","colon-token","semicolon-token","comma-token","[-token","]-token","(-token",")-token","{-token","}-token"],H_=16384;function Ci(e=null,t){return e===null||e.length<t?new Uint32Array(Math.max(t+1024,H_)):e}var Cu=10,z_=12,Au=13;function Tu(e){const t=e.source,r=t.length,n=t.length>0?_u(t.charCodeAt(0)):0,i=Ci(e.lines,r),o=Ci(e.columns,r);let s=e.startLine,a=e.startColumn;for(let l=n;l<r;l++){const c=t.charCodeAt(l);i[l]=s,o[l]=a++,(c===Cu||c===Au||c===z_)&&(c===Au&&l+1<r&&t.charCodeAt(l+1)===Cu&&(l++,i[l]=s,o[l]=a),s++,a=1)}i[r]=s,o[r]=a,e.lines=i,e.columns=o,e.computed=!0}var V_=class{constructor(){this.lines=null,this.columns=null,this.computed=!1}setSource(e,t=0,r=1,n=1){this.source=e,this.startOffset=t,this.startLine=r,this.startColumn=n,this.computed=!1}getLocation(e,t){return this.computed||Tu(this),{source:t,offset:this.startOffset+e,line:this.lines[e],column:this.columns[e]}}getLocationRange(e,t,r){return this.computed||Tu(this),{source:r,start:{offset:this.startOffset+e,line:this.lines[e],column:this.columns[e]},end:{offset:this.startOffset+t,line:this.lines[t],column:this.columns[t]}}}},Ie=16777215,bt=24,W_=new Map([[2,22],[21,22],[19,20],[23,24]]),U_=class{constructor(e,t){this.setSource(e,t)}reset(){this.eof=!1,this.tokenIndex=-1,this.tokenType=0,this.tokenStart=this.firstCharOffset,this.tokenEnd=this.firstCharOffset}setSource(e="",t=()=>{}){e=String(e||"");const r=e.length,n=Ci(this.offsetAndType,e.length+1),i=Ci(this.balance,e.length+1);let o=0,s=0,a=0,l=-1;for(this.offsetAndType=null,this.balance=null,t(e,(c,u,d)=>{switch(c){default:i[o]=r;break;case s:{let h=a&Ie;for(a=i[h],s=a>>bt,i[o]=h,i[h++]=o;h<o;h++)i[h]===r&&(i[h]=o);break}case 21:case 2:case 19:case 23:i[o]=a,s=W_.get(c),a=s<<bt|o}n[o++]=c<<bt|d,l===-1&&(l=u)}),n[o]=0<<bt|r,i[o]=r,i[r]=r;a!==0;){const c=a&Ie;a=i[c],i[c]=r}this.source=e,this.firstCharOffset=l===-1?0:l,this.tokenCount=o,this.offsetAndType=n,this.balance=i,this.reset(),this.next()}lookupType(e){return e+=this.tokenIndex,e<this.tokenCount?this.offsetAndType[e]>>bt:0}lookupOffset(e){return e+=this.tokenIndex,e<this.tokenCount?this.offsetAndType[e-1]&Ie:this.source.length}lookupValue(e,t){return e+=this.tokenIndex,e<this.tokenCount?Zr(this.source,this.offsetAndType[e-1]&Ie,this.offsetAndType[e]&Ie,t):!1}getTokenStart(e){return e===this.tokenIndex?this.tokenStart:e>0?e<this.tokenCount?this.offsetAndType[e-1]&Ie:this.offsetAndType[this.tokenCount]&Ie:this.firstCharOffset}substrToCursor(e){return this.source.substring(e,this.tokenStart)}isBalanceEdge(e){return this.balance[this.tokenIndex]<e}isDelim(e,t){return t?this.lookupType(t)===9&&this.source.charCodeAt(this.lookupOffset(t))===e:this.tokenType===9&&this.source.charCodeAt(this.tokenStart)===e}skip(e){let t=this.tokenIndex+e;t<this.tokenCount?(this.tokenIndex=t,this.tokenStart=this.offsetAndType[t-1]&Ie,t=this.offsetAndType[t],this.tokenType=t>>bt,this.tokenEnd=t&Ie):(this.tokenIndex=this.tokenCount,this.next())}next(){let e=this.tokenIndex+1;e<this.tokenCount?(this.tokenIndex=e,this.tokenStart=this.tokenEnd,e=this.offsetAndType[e],this.tokenType=e>>bt,this.tokenEnd=e&Ie):(this.eof=!0,this.tokenIndex=this.tokenCount,this.tokenType=0,this.tokenStart=this.tokenEnd=this.source.length)}skipSC(){for(;this.tokenType===13||this.tokenType===25;)this.next()}skipUntilBalanced(e,t){let r=e,n,i;e:for(;r<this.tokenCount;r++){if(n=this.balance[r],n<e)break e;switch(i=r>0?this.offsetAndType[r-1]&Ie:this.firstCharOffset,t(this.source.charCodeAt(i))){case 1:break e;case 2:r++;break e;default:this.balance[n]===r&&(r=n)}}this.skip(r-this.tokenIndex)}forEachToken(e){for(let t=0,r=this.firstCharOffset;t<this.tokenCount;t++){const n=r,i=this.offsetAndType[t],o=i&Ie,s=i>>bt;r=o,e(s,n,o,t)}}dump(){const e=new Array(this.tokenCount);return this.forEachToken((t,r,n,i)=>{e[i]={idx:i,type:wu[t],chunk:this.source.substring(r,n),balance:this.balance[i]}}),e}};function Ai(e,t){function r(d){return d<a?e.charCodeAt(d):0}function n(){if(c=wi(e,c),Ei(r(c),r(c+1),r(c+2))){u=12,c=Si(e,c);return}if(r(c)===37){u=11,c++;return}u=10}function i(){const d=c;if(c=Si(e,c),Zr(e,d,c,"url")&&r(c)===40){if(c=_i(e,c+1),r(c)===34||r(c)===39){u=2,c=d+4;return}s();return}if(r(c)===40){u=2,c++;return}u=1}function o(d){for(d||(d=r(c++)),u=5;c<e.length;c++){const h=e.charCodeAt(c);switch(Ns(h)){case d:c++;return;case 130:if(vi(h)){c+=Ms(e,c,h),u=6;return}break;case 92:if(c===e.length-1)break;const f=r(c+1);vi(f)?c+=Ms(e,c+1,f):Ze(h,f)&&(c=fr(e,c)-1)}}}function s(){for(u=7,c=_i(e,c);c<e.length;c++){const d=e.charCodeAt(c);switch(Ns(d)){case 41:c++;return;case 130:if(c=_i(e,c),r(c)===41||c>=e.length){c<e.length&&c++;return}c=Ds(e,c),u=8;return;case 34:case 39:case 40:case 133:c=Ds(e,c),u=8;return;case 92:if(Ze(d,r(c+1))){c=fr(e,c)-1;break}c=Ds(e,c),u=8;return}}}e=String(e||"");const a=e.length;let l=_u(r(0)),c=l,u;for(;c<a;){const d=e.charCodeAt(c);switch(Ns(d)){case 130:u=13,c=_i(e,c+1);break;case 34:o();break;case 35:Eu(r(c+1))||Ze(r(c+1),r(c+2))?(u=4,c=Si(e,c+1)):(u=9,c++);break;case 39:o();break;case 40:u=21,c++;break;case 41:u=22,c++;break;case 43:xs(d,r(c+1),r(c+2))?n():(u=9,c++);break;case 44:u=18,c++;break;case 45:xs(d,r(c+1),r(c+2))?n():r(c+1)===45&&r(c+2)===62?(u=15,c=c+3):Ei(d,r(c+1),r(c+2))?i():(u=9,c++);break;case 46:xs(d,r(c+1),r(c+2))?n():(u=9,c++);break;case 47:r(c+1)===42?(u=25,c=e.indexOf("*/",c+2),c=c===-1?e.length:c+2):(u=9,c++);break;case 58:u=16,c++;break;case 59:u=17,c++;break;case 60:r(c+1)===33&&r(c+2)===45&&r(c+3)===45?(u=14,c=c+4):(u=9,c++);break;case 64:Ei(r(c+1),r(c+2),r(c+3))?(u=3,c=Si(e,c+1)):(u=9,c++);break;case 91:u=19,c++;break;case 92:Ze(d,r(c+1))?i():(u=9,c++);break;case 93:u=20,c++;break;case 123:u=23,c++;break;case 125:u=24,c++;break;case 131:n();break;case 132:i();break;default:u=9,c++}t(u,l,l=c)}}var hr=null,ae=class Ge{static createItem(t){return{prev:null,next:null,data:t}}constructor(){this.head=null,this.tail=null,this.cursor=null}createItem(t){return Ge.createItem(t)}allocateCursor(t,r){let n;return hr!==null?(n=hr,hr=hr.cursor,n.prev=t,n.next=r,n.cursor=this.cursor):n={prev:t,next:r,cursor:this.cursor},this.cursor=n,n}releaseCursor(){const{cursor:t}=this;this.cursor=t.cursor,t.prev=null,t.next=null,t.cursor=hr,hr=t}updateCursors(t,r,n,i){let{cursor:o}=this;for(;o!==null;)o.prev===t&&(o.prev=r),o.next===n&&(o.next=i),o=o.cursor}*[Symbol.iterator](){for(let t=this.head;t!==null;t=t.next)yield t.data}get size(){let t=0;for(let r=this.head;r!==null;r=r.next)t++;return t}get isEmpty(){return this.head===null}get first(){return this.head&&this.head.data}get last(){return this.tail&&this.tail.data}fromArray(t){let r=null;this.head=null;for(let n of t){const i=Ge.createItem(n);r!==null?r.next=i:this.head=i,i.prev=r,r=i}return this.tail=r,this}toArray(){return[...this]}toJSON(){return[...this]}forEach(t,r=this){const n=this.allocateCursor(null,this.head);for(;n.next!==null;){const i=n.next;n.next=i.next,t.call(r,i.data,i,this)}this.releaseCursor()}forEachRight(t,r=this){const n=this.allocateCursor(this.tail,null);for(;n.prev!==null;){const i=n.prev;n.prev=i.prev,t.call(r,i.data,i,this)}this.releaseCursor()}reduce(t,r,n=this){let i=this.allocateCursor(null,this.head),o=r,s;for(;i.next!==null;)s=i.next,i.next=s.next,o=t.call(n,o,s.data,s,this);return this.releaseCursor(),o}reduceRight(t,r,n=this){let i=this.allocateCursor(this.tail,null),o=r,s;for(;i.prev!==null;)s=i.prev,i.prev=s.prev,o=t.call(n,o,s.data,s,this);return this.releaseCursor(),o}some(t,r=this){for(let n=this.head;n!==null;n=n.next)if(t.call(r,n.data,n,this))return!0;return!1}map(t,r=this){const n=new Ge;for(let i=this.head;i!==null;i=i.next)n.appendData(t.call(r,i.data,i,this));return n}filter(t,r=this){const n=new Ge;for(let i=this.head;i!==null;i=i.next)t.call(r,i.data,i,this)&&n.appendData(i.data);return n}nextUntil(t,r,n=this){if(t===null)return;const i=this.allocateCursor(null,t);for(;i.next!==null;){const o=i.next;if(i.next=o.next,r.call(n,o.data,o,this))break}this.releaseCursor()}prevUntil(t,r,n=this){if(t===null)return;const i=this.allocateCursor(t,null);for(;i.prev!==null;){const o=i.prev;if(i.prev=o.prev,r.call(n,o.data,o,this))break}this.releaseCursor()}clear(){this.head=null,this.tail=null}copy(){const t=new Ge;for(let r of this)t.appendData(r);return t}prepend(t){return this.updateCursors(null,t,this.head,t),this.head!==null?(this.head.prev=t,t.next=this.head):this.tail=t,this.head=t,this}prependData(t){return this.prepend(Ge.createItem(t))}append(t){return this.insert(t)}appendData(t){return this.insert(Ge.createItem(t))}insert(t,r=null){if(r!==null)if(this.updateCursors(r.prev,t,r,t),r.prev===null){if(this.head!==r)throw new Error("before doesn't belong to list");this.head=t,r.prev=t,t.next=r,this.updateCursors(null,t)}else r.prev.next=t,t.prev=r.prev,r.prev=t,t.next=r;else this.updateCursors(this.tail,t,null,t),this.tail!==null?(this.tail.next=t,t.prev=this.tail):this.head=t,this.tail=t;return this}insertData(t,r){return this.insert(Ge.createItem(t),r)}remove(t){if(this.updateCursors(t,t.prev,t,t.next),t.prev!==null)t.prev.next=t.next;else{if(this.head!==t)throw new Error("item doesn't belong to list");this.head=t.next}if(t.next!==null)t.next.prev=t.prev;else{if(this.tail!==t)throw new Error("item doesn't belong to list");this.tail=t.prev}return t.prev=null,t.next=null,t}push(t){this.insert(Ge.createItem(t))}pop(){return this.tail!==null?this.remove(this.tail):null}unshift(t){this.prepend(Ge.createItem(t))}shift(){return this.head!==null?this.remove(this.head):null}prependList(t){return this.insertList(t,this.head)}appendList(t){return this.insertList(t)}insertList(t,r){return t.head===null?this:(r!=null?(this.updateCursors(r.prev,t.tail,r,t.head),r.prev!==null?(r.prev.next=t.head,t.head.prev=r.prev):this.head=t.head,r.prev=t.tail,t.tail.next=r):(this.updateCursors(this.tail,t.tail,null,t.head),this.tail!==null?(this.tail.next=t.head,t.head.prev=this.tail):this.head=t.head,this.tail=t.tail),t.head=null,t.tail=null,this)}replace(t,r){"head"in r?this.insertList(r,t):this.insert(r,t),this.remove(t)}};function Ti(e,t){const r=Object.create(SyntaxError.prototype),n=new Error;return Object.assign(r,{name:e,message:t,get stack(){return(n.stack||"").replace(/^(.+\n){1,3}/,`${e}: ${t}
10
- `)}})}var ku=100,q_=60,G_=" ";function Lu({source:e,line:t,column:r},n){function i(u,d){return o.slice(u,d).map((h,f)=>String(u+f+1).padStart(l)+" |"+h).join(`
11
- `)}const o=e.split(/\r\n?|\n|\f/),s=Math.max(1,t-n)-1,a=Math.min(t+n,o.length+1),l=Math.max(4,String(a).length)+1;let c=0;r+=3*(o[t-1].substr(0,r-1).match(/\t/g)||[]).length,r>ku&&(c=r-q_+3,r=58);for(let u=s;u<=a;u++)u>=0&&u<o.length&&(o[u]=o[u].replace(/\t/g,G_),o[u]=(c>0&&o[u].length>c?"…":"")+o[u].substr(c,98)+(o[u].length>c+ku-1?"…":""));return[i(s,t),new Array(r+l+2).join("-")+"^",i(t,a)].filter(Boolean).join(`
12
- `)}function Ou(e,t,r,n,i){return Object.assign(Ti("SyntaxError",e),{source:t,offset:r,line:n,column:i,sourceFragment(o){return Lu({source:t,line:n,column:i},isNaN(o)?0:o)},get formattedMessage(){return`Parse error: ${e}
13
- `+Lu({source:t,line:n,column:i},2)}})}function X_(e){const t=this.createList();let r=!1;const n={recognizer:e};for(;!this.eof;){switch(this.tokenType){case 25:this.next();continue;case 13:r=!0,this.next();continue}let i=e.getNode.call(this,n);if(i===void 0)break;r&&(e.onWhiteSpace&&e.onWhiteSpace.call(this,i,t,n),r=!1),t.push(i)}return r&&e.onWhiteSpace&&e.onWhiteSpace.call(this,null,t,n),t}var xu=()=>{},Y_=33,K_=35,Is=59,Pu=123,Nu=0;function Q_(e){return function(){return this[e]()}}function Bs(e){const t=Object.create(null);for(const r in e){const n=e[r],i=n.parse||n;i&&(t[r]=i)}return t}function Z_(e){const t={context:Object.create(null),scope:Object.assign(Object.create(null),e.scope),atrule:Bs(e.atrule),pseudo:Bs(e.pseudo),node:Bs(e.node)};for(const r in e.parseContext)switch(typeof e.parseContext[r]){case"function":t.context[r]=e.parseContext[r];break;case"string":t.context[r]=Q_(e.parseContext[r])}return{config:t,...t,...t.node}}function J_(e){let t="",r="<unknown>",n=!1,i=xu,o=!1;const s=new V_,a=Object.assign(new U_,Z_(e||{}),{parseAtrulePrelude:!0,parseRulePrelude:!0,parseValue:!0,parseCustomProperty:!1,readSequence:X_,consumeUntilBalanceEnd:()=>0,consumeUntilLeftCurlyBracket(c){return c===Pu?1:0},consumeUntilLeftCurlyBracketOrSemicolon(c){return c===Pu||c===Is?1:0},consumeUntilExclamationMarkOrSemicolon(c){return c===Y_||c===Is?1:0},consumeUntilSemicolonIncluded(c){return c===Is?2:0},createList(){return new ae},createSingleNodeList(c){return new ae().appendData(c)},getFirstListNode(c){return c&&c.first},getLastListNode(c){return c&&c.last},parseWithFallback(c,u){const d=this.tokenIndex;try{return c.call(this)}catch(h){if(o)throw h;const f=u.call(this,d);return o=!0,i(h,f),o=!1,f}},lookupNonWSType(c){let u;do if(u=this.lookupType(c++),u!==13)return u;while(u!==Nu);return Nu},charCodeAt(c){return c>=0&&c<t.length?t.charCodeAt(c):0},substring(c,u){return t.substring(c,u)},substrToCursor(c){return this.source.substring(c,this.tokenStart)},cmpChar(c,u){return dr(t,c,u)},cmpStr(c,u,d){return Zr(t,c,u,d)},consume(c){const u=this.tokenStart;return this.eat(c),this.substrToCursor(u)},consumeFunctionName(){const c=t.substring(this.tokenStart,this.tokenEnd-1);return this.eat(2),c},consumeNumber(c){const u=t.substring(this.tokenStart,wi(t,this.tokenStart));return this.eat(c),u},eat(c){if(this.tokenType!==c){const u=wu[c].slice(0,-6).replace(/-/g," ").replace(/^./,f=>f.toUpperCase());let d=`${/[[\](){}]/.test(u)?`"${u}"`:u} is expected`,h=this.tokenStart;switch(c){case 1:this.tokenType===2||this.tokenType===7?(h=this.tokenEnd-1,d="Identifier is expected but function found"):d="Identifier is expected";break;case 4:this.isDelim(K_)&&(this.next(),h++,d="Name is expected");break;case 11:this.tokenType===10&&(h=this.tokenEnd,d="Percent sign is expected")}this.error(d,h)}this.next()},eatIdent(c){(this.tokenType!==1||this.lookupValue(0,c)===!1)&&this.error(`Identifier "${c}" is expected`),this.next()},eatDelim(c){this.isDelim(c)||this.error(`Delim "${String.fromCharCode(c)}" is expected`),this.next()},getLocation(c,u){return n?s.getLocationRange(c,u,r):null},getLocationFromList(c){if(n){const u=this.getFirstListNode(c),d=this.getLastListNode(c);return s.getLocationRange(u!==null?u.loc.start.offset-s.startOffset:this.tokenStart,d!==null?d.loc.end.offset-s.startOffset:this.tokenStart,r)}return null},error(c,u){const d=typeof u<"u"&&u<t.length?s.getLocation(u):this.eof?s.getLocation($_(t,t.length-1)):s.getLocation(this.tokenStart);throw new Ou(c||"Unexpected input",t,d.offset,d.line,d.column)}});return Object.assign(function(c,u){t=c,u=u||{},a.setSource(t,Ai),s.setSource(t,u.offset,u.line,u.column),r=u.filename||"<unknown>",n=!!u.positions,i=typeof u.onParseError=="function"?u.onParseError:xu,o=!1,a.parseAtrulePrelude="parseAtrulePrelude"in u?!!u.parseAtrulePrelude:!0,a.parseRulePrelude="parseRulePrelude"in u?!!u.parseRulePrelude:!0,a.parseValue="parseValue"in u?!!u.parseValue:!0,a.parseCustomProperty="parseCustomProperty"in u?!!u.parseCustomProperty:!1;const{context:d="default",onComment:h}=u;if(!(d in a.context))throw new Error("Unknown context `"+d+"`");typeof h=="function"&&a.forEachToken((g,y,A)=>{if(g===25){const L=a.getLocation(y,A),C=Zr(t,A-2,A,"*/")?t.slice(y+2,A-2):t.slice(y+2,A);h(C,L)}});const f=a.context[d].call(a,u);return a.eof||a.error(),f},{SyntaxError:Ou,config:a.config})}var eS=F.__commonJSMin((e=>{var t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split("");e.encode=function(r){if(0<=r&&r<t.length)return t[r];throw new TypeError("Must be between 0 and 63: "+r)},e.decode=function(r){var n=65,i=90,o=97,s=122,a=48,l=57,c=43,u=47,d=26,h=52;return n<=r&&r<=i?r-n:o<=r&&r<=s?r-o+d:a<=r&&r<=l?r-a+h:r==c?62:r==u?63:-1}})),tS=F.__commonJSMin((e=>{var t=eS(),r=5,n=1<<r,i=n-1,o=n;function s(l){return l<0?(-l<<1)+1:(l<<1)+0}function a(l){var c=(l&1)===1,u=l>>1;return c?-u:u}e.encode=function(c){var u="",d,h=s(c);do d=h&i,h>>>=r,h>0&&(d|=o),u+=t.encode(d);while(h>0);return u},e.decode=function(c,u,d){var h=c.length,f=0,g=0,y,A;do{if(u>=h)throw new Error("Expected more digits in base 64 VLQ value.");if(A=t.decode(c.charCodeAt(u++)),A===-1)throw new Error("Invalid base64 digit: "+c.charAt(u-1));y=!!(A&o),A&=i,f=f+(A<<g),g+=r}while(y);d.value=a(f),d.rest=u}})),Fs=F.__commonJSMin((e=>{function t(p,v,T){if(v in p)return p[v];if(arguments.length===3)return T;throw new Error('"'+v+'" is a required argument.')}e.getArg=t;var r=/^(?:([\w+\-.]+):)?\/\/(?:(\w+:\w+)@)?([\w.-]*)(?::(\d+))?(.*)$/,n=/^data:.+\,.+$/;function i(p){var v=p.match(r);return v?{scheme:v[1],auth:v[2],host:v[3],port:v[4],path:v[5]}:null}e.urlParse=i;function o(p){var v="";return p.scheme&&(v+=p.scheme+":"),v+="//",p.auth&&(v+=p.auth+"@"),p.host&&(v+=p.host),p.port&&(v+=":"+p.port),p.path&&(v+=p.path),v}e.urlGenerate=o;var s=32;function a(p){var v=[];return function(T){for(var w=0;w<v.length;w++)if(v[w].input===T){var P=v[0];return v[0]=v[w],v[w]=P,v[0].result}var x=p(T);return v.unshift({input:T,result:x}),v.length>s&&v.pop(),x}}var l=a(function(v){var T=v,w=i(v);if(w){if(!w.path)return v;T=w.path}for(var P=e.isAbsolute(T),x=[],R=0,N=0;;)if(R=N,N=T.indexOf("/",R),N===-1){x.push(T.slice(R));break}else for(x.push(T.slice(R,N));N<T.length&&T[N]==="/";)N++;for(var D,ne=0,N=x.length-1;N>=0;N--)D=x[N],D==="."?x.splice(N,1):D===".."?ne++:ne>0&&(D===""?(x.splice(N+1,ne),ne=0):(x.splice(N,2),ne--));return T=x.join("/"),T===""&&(T=P?"/":"."),w?(w.path=T,o(w)):T});e.normalize=l;function c(p,v){p===""&&(p="."),v===""&&(v=".");var T=i(v),w=i(p);if(w&&(p=w.path||"/"),T&&!T.scheme)return w&&(T.scheme=w.scheme),o(T);if(T||v.match(n))return v;if(w&&!w.host&&!w.path)return w.host=v,o(w);var P=v.charAt(0)==="/"?v:l(p.replace(/\/+$/,"")+"/"+v);return w?(w.path=P,o(w)):P}e.join=c,e.isAbsolute=function(p){return p.charAt(0)==="/"||r.test(p)};function u(p,v){p===""&&(p="."),p=p.replace(/\/$/,"");for(var T=0;v.indexOf(p+"/")!==0;){var w=p.lastIndexOf("/");if(w<0||(p=p.slice(0,w),p.match(/^([^\/]+:\/)?\/*$/)))return v;++T}return Array(T+1).join("../")+v.substr(p.length+1)}e.relative=u;var d=(function(){return!("__proto__"in Object.create(null))})();function h(p){return p}function f(p){return y(p)?"$"+p:p}e.toSetString=d?h:f;function g(p){return y(p)?p.slice(1):p}e.fromSetString=d?h:g;function y(p){if(!p)return!1;var v=p.length;if(v<9||p.charCodeAt(v-1)!==95||p.charCodeAt(v-2)!==95||p.charCodeAt(v-3)!==111||p.charCodeAt(v-4)!==116||p.charCodeAt(v-5)!==111||p.charCodeAt(v-6)!==114||p.charCodeAt(v-7)!==112||p.charCodeAt(v-8)!==95||p.charCodeAt(v-9)!==95)return!1;for(var T=v-10;T>=0;T--)if(p.charCodeAt(T)!==36)return!1;return!0}function A(p,v,T){var w=E(p.source,v.source);return w!==0||(w=p.originalLine-v.originalLine,w!==0)||(w=p.originalColumn-v.originalColumn,w!==0||T)||(w=p.generatedColumn-v.generatedColumn,w!==0)||(w=p.generatedLine-v.generatedLine,w!==0)?w:E(p.name,v.name)}e.compareByOriginalPositions=A;function L(p,v,T){var w=p.originalLine-v.originalLine;return w!==0||(w=p.originalColumn-v.originalColumn,w!==0||T)||(w=p.generatedColumn-v.generatedColumn,w!==0)||(w=p.generatedLine-v.generatedLine,w!==0)?w:E(p.name,v.name)}e.compareByOriginalPositionsNoSource=L;function C(p,v,T){var w=p.generatedLine-v.generatedLine;return w!==0||(w=p.generatedColumn-v.generatedColumn,w!==0||T)||(w=E(p.source,v.source),w!==0)||(w=p.originalLine-v.originalLine,w!==0)||(w=p.originalColumn-v.originalColumn,w!==0)?w:E(p.name,v.name)}e.compareByGeneratedPositionsDeflated=C;function O(p,v,T){var w=p.generatedColumn-v.generatedColumn;return w!==0||T||(w=E(p.source,v.source),w!==0)||(w=p.originalLine-v.originalLine,w!==0)||(w=p.originalColumn-v.originalColumn,w!==0)?w:E(p.name,v.name)}e.compareByGeneratedPositionsDeflatedNoLine=O;function E(p,v){return p===v?0:p===null?1:v===null?-1:p>v?1:-1}function m(p,v){var T=p.generatedLine-v.generatedLine;return T!==0||(T=p.generatedColumn-v.generatedColumn,T!==0)||(T=E(p.source,v.source),T!==0)||(T=p.originalLine-v.originalLine,T!==0)||(T=p.originalColumn-v.originalColumn,T!==0)?T:E(p.name,v.name)}e.compareByGeneratedPositionsInflated=m;function b(p){return JSON.parse(p.replace(/^\)]}'[^\n]*\n/,""))}e.parseSourceMapInput=b;function S(p,v,T){if(v=v||"",p&&(p[p.length-1]!=="/"&&v[0]!=="/"&&(p+="/"),v=p+v),T){var w=i(T);if(!w)throw new Error("sourceMapURL could not be parsed");if(w.path){var P=w.path.lastIndexOf("/");P>=0&&(w.path=w.path.substring(0,P+1))}v=c(o(w),v)}return l(v)}e.computeSourceURL=S})),rS=F.__commonJSMin((e=>{var t=Fs(),r=Object.prototype.hasOwnProperty,n=typeof Map<"u";function i(){this._array=[],this._set=n?new Map:Object.create(null)}i.fromArray=function(s,a){for(var l=new i,c=0,u=s.length;c<u;c++)l.add(s[c],a);return l},i.prototype.size=function(){return n?this._set.size:Object.getOwnPropertyNames(this._set).length},i.prototype.add=function(s,a){var l=n?s:t.toSetString(s),c=n?this.has(s):r.call(this._set,l),u=this._array.length;(!c||a)&&this._array.push(s),c||(n?this._set.set(s,u):this._set[l]=u)},i.prototype.has=function(s){if(n)return this._set.has(s);var a=t.toSetString(s);return r.call(this._set,a)},i.prototype.indexOf=function(s){if(n){var a=this._set.get(s);if(a>=0)return a}else{var l=t.toSetString(s);if(r.call(this._set,l))return this._set[l]}throw new Error('"'+s+'" is not in the set.')},i.prototype.at=function(s){if(s>=0&&s<this._array.length)return this._array[s];throw new Error("No element indexed by "+s)},i.prototype.toArray=function(){return this._array.slice()},e.ArraySet=i})),nS=F.__commonJSMin((e=>{var t=Fs();function r(i,o){var s=i.generatedLine,a=o.generatedLine,l=i.generatedColumn,c=o.generatedColumn;return a>s||a==s&&c>=l||t.compareByGeneratedPositionsInflated(i,o)<=0}function n(){this._array=[],this._sorted=!0,this._last={generatedLine:-1,generatedColumn:0}}n.prototype.unsortedForEach=function(o,s){this._array.forEach(o,s)},n.prototype.add=function(o){r(this._last,o)?(this._last=o,this._array.push(o)):(this._sorted=!1,this._array.push(o))},n.prototype.toArray=function(){return this._sorted||(this._array.sort(t.compareByGeneratedPositionsInflated),this._sorted=!0),this._array},e.MappingList=n})),iS=F.__commonJSMin((e=>{var t=tS(),r=Fs(),n=rS().ArraySet,i=nS().MappingList;function o(s){s||(s={}),this._file=r.getArg(s,"file",null),this._sourceRoot=r.getArg(s,"sourceRoot",null),this._skipValidation=r.getArg(s,"skipValidation",!1),this._ignoreInvalidMapping=r.getArg(s,"ignoreInvalidMapping",!1),this._sources=new n,this._names=new n,this._mappings=new i,this._sourcesContents=null}o.prototype._version=3,o.fromSourceMap=function(a,l){var c=a.sourceRoot,u=new o(Object.assign(l||{},{file:a.file,sourceRoot:c}));return a.eachMapping(function(d){var h={generated:{line:d.generatedLine,column:d.generatedColumn}};d.source!=null&&(h.source=d.source,c!=null&&(h.source=r.relative(c,h.source)),h.original={line:d.originalLine,column:d.originalColumn},d.name!=null&&(h.name=d.name)),u.addMapping(h)}),a.sources.forEach(function(d){var h=d;c!==null&&(h=r.relative(c,d)),u._sources.has(h)||u._sources.add(h);var f=a.sourceContentFor(d);f!=null&&u.setSourceContent(d,f)}),u},o.prototype.addMapping=function(a){var l=r.getArg(a,"generated"),c=r.getArg(a,"original",null),u=r.getArg(a,"source",null),d=r.getArg(a,"name",null);!this._skipValidation&&this._validateMapping(l,c,u,d)===!1||(u!=null&&(u=String(u),this._sources.has(u)||this._sources.add(u)),d!=null&&(d=String(d),this._names.has(d)||this._names.add(d)),this._mappings.add({generatedLine:l.line,generatedColumn:l.column,originalLine:c!=null&&c.line,originalColumn:c!=null&&c.column,source:u,name:d}))},o.prototype.setSourceContent=function(a,l){var c=a;this._sourceRoot!=null&&(c=r.relative(this._sourceRoot,c)),l!=null?(this._sourcesContents||(this._sourcesContents=Object.create(null)),this._sourcesContents[r.toSetString(c)]=l):this._sourcesContents&&(delete this._sourcesContents[r.toSetString(c)],Object.keys(this._sourcesContents).length===0&&(this._sourcesContents=null))},o.prototype.applySourceMap=function(a,l,c){var u=l;if(l==null){if(a.file==null)throw new Error(`SourceMapGenerator.prototype.applySourceMap requires either an explicit source file, or the source map's "file" property. Both were omitted.`);u=a.file}var d=this._sourceRoot;d!=null&&(u=r.relative(d,u));var h=new n,f=new n;this._mappings.unsortedForEach(function(g){if(g.source===u&&g.originalLine!=null){var y=a.originalPositionFor({line:g.originalLine,column:g.originalColumn});y.source!=null&&(g.source=y.source,c!=null&&(g.source=r.join(c,g.source)),d!=null&&(g.source=r.relative(d,g.source)),g.originalLine=y.line,g.originalColumn=y.column,y.name!=null&&(g.name=y.name))}var A=g.source;A!=null&&!h.has(A)&&h.add(A);var L=g.name;L!=null&&!f.has(L)&&f.add(L)},this),this._sources=h,this._names=f,a.sources.forEach(function(g){var y=a.sourceContentFor(g);y!=null&&(c!=null&&(g=r.join(c,g)),d!=null&&(g=r.relative(d,g)),this.setSourceContent(g,y))},this)},o.prototype._validateMapping=function(a,l,c,u){if(l&&typeof l.line!="number"&&typeof l.column!="number"){var d="original.line and original.column are not numbers -- you probably meant to omit the original mapping entirely and only map the generated position. If so, pass null for the original mapping instead of an object with empty or null values.";if(this._ignoreInvalidMapping)return!1;throw new Error(d)}if(!(a&&"line"in a&&"column"in a&&a.line>0&&a.column>=0&&!l&&!c&&!u)){if(a&&"line"in a&&"column"in a&&l&&"line"in l&&"column"in l&&a.line>0&&a.column>=0&&l.line>0&&l.column>=0&&c)return;var d="Invalid mapping: "+JSON.stringify({generated:a,source:c,original:l,name:u});if(this._ignoreInvalidMapping)return!1;throw new Error(d)}},o.prototype._serializeMappings=function(){for(var a=0,l=1,c=0,u=0,d=0,h=0,f="",g,y,A,L,C=this._mappings.toArray(),O=0,E=C.length;O<E;O++){if(y=C[O],g="",y.generatedLine!==l)for(a=0;y.generatedLine!==l;)g+=";",l++;else if(O>0){if(!r.compareByGeneratedPositionsInflated(y,C[O-1]))continue;g+=","}g+=t.encode(y.generatedColumn-a),a=y.generatedColumn,y.source!=null&&(L=this._sources.indexOf(y.source),g+=t.encode(L-h),h=L,g+=t.encode(y.originalLine-1-u),u=y.originalLine-1,g+=t.encode(y.originalColumn-c),c=y.originalColumn,y.name!=null&&(A=this._names.indexOf(y.name),g+=t.encode(A-d),d=A)),f+=g}return f},o.prototype._generateSourcesContent=function(a,l){return a.map(function(c){if(!this._sourcesContents)return null;l!=null&&(c=r.relative(l,c));var u=r.toSetString(c);return Object.prototype.hasOwnProperty.call(this._sourcesContents,u)?this._sourcesContents[u]:null},this)},o.prototype.toJSON=function(){var a={version:this._version,sources:this._sources.toArray(),names:this._names.toArray(),mappings:this._serializeMappings()};return this._file!=null&&(a.file=this._file),this._sourceRoot!=null&&(a.sourceRoot=this._sourceRoot),this._sourcesContents&&(a.sourcesContent=this._generateSourcesContent(a.sources,a.sourceRoot)),a},o.prototype.toString=function(){return JSON.stringify(this.toJSON())},e.SourceMapGenerator=o})),oS=iS(),Mu=new Set(["Atrule","Selector","Declaration"]);function sS(e){const t=new oS.SourceMapGenerator,r={line:1,column:0},n={line:0,column:0},i={line:1,column:0},o={generated:i};let s=1,a=0,l=!1;const c=e.node;e.node=function(h){if(h.loc&&h.loc.start&&Mu.has(h.type)){const f=h.loc.start.line,g=h.loc.start.column-1;(n.line!==f||n.column!==g)&&(n.line=f,n.column=g,r.line=s,r.column=a,l&&(l=!1,(r.line!==i.line||r.column!==i.column)&&t.addMapping(o)),l=!0,t.addMapping({source:h.loc.source,original:n,generated:r}))}c.call(this,h),l&&Mu.has(h.type)&&(i.line=s,i.column=a)};const u=e.emit;e.emit=function(h,f,g){for(let y=0;y<h.length;y++)h.charCodeAt(y)===10?(s++,a=0):a++;u(h,f,g)};const d=e.result;return e.result=function(){return l&&t.addMapping(o),{css:d(),map:t}},e}var Ru=F.__exportAll({safe:()=>Bu,spec:()=>uS}),aS=43,lS=45,js=(e,t)=>{if(e===9&&(e=t),typeof e=="string"){const r=e.charCodeAt(0);return r>127?32768:r<<8}return e},Du=[[1,1],[1,2],[1,7],[1,8],[1,"-"],[1,10],[1,11],[1,12],[1,15],[1,21],[3,1],[3,2],[3,7],[3,8],[3,"-"],[3,10],[3,11],[3,12],[3,15],[4,1],[4,2],[4,7],[4,8],[4,"-"],[4,10],[4,11],[4,12],[4,15],[12,1],[12,2],[12,7],[12,8],[12,"-"],[12,10],[12,11],[12,12],[12,15],["#",1],["#",2],["#",7],["#",8],["#","-"],["#",10],["#",11],["#",12],["#",15],["-",1],["-",2],["-",7],["-",8],["-","-"],["-",10],["-",11],["-",12],["-",15],[10,1],[10,2],[10,7],[10,8],[10,10],[10,11],[10,12],[10,"%"],[10,15],["@",1],["@",2],["@",7],["@",8],["@","-"],["@",15],[".",10],[".",11],[".",12],["+",10],["+",11],["+",12],["/","*"]],cS=Du.concat([[1,4],[12,4],[4,4],[3,21],[3,5],[3,16],[11,11],[11,12],[11,2],[11,"-"],[22,1],[22,2],[22,11],[22,12],[22,4],[22,"-"]]);function Iu(e){const t=new Set(e.map(([r,n])=>js(r)<<16|js(n)));return function(r,n,i){const o=js(n,i),s=i.charCodeAt(0);return(s===lS&&n!==1&&n!==2&&n!==15||s===aS?t.has(r<<16|s<<8):t.has(r<<16|o))&&this.emit(" ",13,!0),o}}var uS=Iu(Du),Bu=Iu(cS),dS=92;function fS(e,t){if(typeof t=="function"){let r=null;e.children.forEach(n=>{r!==null&&t.call(this,r),this.node(n),r=n});return}e.children.forEach(this.node,this)}function hS(e){Ai(e,(t,r,n)=>{this.token(t,e.slice(r,n))})}function mS(e){const t=new Map;for(let r in e.node){const n=e.node[r];typeof(n.generate||n)=="function"&&t.set(r,n.generate||n)}return function(r,n){let i="",o=0,s={node(l){if(t.has(l.type))t.get(l.type).call(a,l);else throw new Error("Unknown node type: "+l.type)},tokenBefore:Bu,token(l,c){o=this.tokenBefore(o,l,c),this.emit(c,l,!1),l===9&&c.charCodeAt(0)===dS&&this.emit(`
14
- `,13,!0)},emit(l){i+=l},result(){return i}};n&&(typeof n.decorator=="function"&&(s=n.decorator(s)),n.sourceMap&&(s=sS(s)),n.mode in Ru&&(s.tokenBefore=Ru[n.mode]));const a={node:l=>s.node(l),children:fS,token:(l,c)=>s.token(l,c),tokenize:hS};return s.node(r),s.result()}}function pS(e){return{fromPlainObject(t){return e(t,{enter(r){r.children&&!(r.children instanceof ae)&&(r.children=new ae().fromArray(r.children))}}),t},toPlainObject(t){return e(t,{leave(r){r.children&&r.children instanceof ae&&(r.children=r.children.toArray())}}),t}}}var{hasOwnProperty:$s}=Object.prototype,Jr=function(){};function Fu(e){return typeof e=="function"?e:Jr}function ju(e,t){return function(r,n,i){r.type===t&&e.call(this,r,n,i)}}function gS(e,t){const r=t.structure,n=[];for(const i in r){if($s.call(r,i)===!1)continue;let o=r[i];const s={name:i,type:!1,nullable:!1};Array.isArray(o)||(o=[o]);for(const a of o)a===null?s.nullable=!0:typeof a=="string"?s.type="node":Array.isArray(a)&&(s.type="list");s.type&&n.push(s)}return n.length?{context:t.walkContext,fields:n}:null}function bS(e){const t={};for(const r in e.node)if($s.call(e.node,r)){const n=e.node[r];if(!n.structure)throw new Error("Missed `structure` field in `"+r+"` node type definition");t[r]=gS(r,n)}return t}function $u(e,t){const r=e.fields.slice(),n=e.context,i=typeof n=="string";return t&&r.reverse(),function(o,s,a,l){let c;i&&(c=s[n],s[n]=o);for(const u of r){const d=o[u.name];if(!u.nullable||d){if(u.type==="list"){if(t?d.reduceRight(l,!1):d.reduce(l,!1))return!0}else if(a(d))return!0}}i&&(s[n]=c)}}function Hu({StyleSheet:e,Atrule:t,Rule:r,Block:n,DeclarationList:i}){return{Atrule:{StyleSheet:e,Atrule:t,Rule:r,Block:n},Rule:{StyleSheet:e,Atrule:t,Rule:r,Block:n},Declaration:{StyleSheet:e,Atrule:t,Rule:r,Block:n,DeclarationList:i}}}function yS(e){const t=bS(e),r={},n={},i=Symbol("break-walk"),o=Symbol("skip-node");for(const c in t)$s.call(t,c)&&t[c]!==null&&(r[c]=$u(t[c],!1),n[c]=$u(t[c],!0));const s=Hu(r),a=Hu(n),l=function(c,u){function d(L,C,O){const E=h.call(A,L,C,O);return E===i?!0:E===o?!1:!!(g.hasOwnProperty(L.type)&&g[L.type](L,A,d,y)||f.call(A,L,C,O)===i)}let h=Jr,f=Jr,g=r,y=(L,C,O,E)=>L||d(C,O,E);const A={break:i,skip:o,root:c,stylesheet:null,atrule:null,atrulePrelude:null,rule:null,selector:null,block:null,declaration:null,function:null};if(typeof u=="function")h=u;else if(u&&(h=Fu(u.enter),f=Fu(u.leave),u.reverse&&(g=n),u.visit)){if(s.hasOwnProperty(u.visit))g=u.reverse?a[u.visit]:s[u.visit];else if(!t.hasOwnProperty(u.visit))throw new Error("Bad value `"+u.visit+"` for `visit` option (should be: "+Object.keys(t).sort().join(", ")+")");h=ju(h,u.visit),f=ju(f,u.visit)}if(h===Jr&&f===Jr)throw new Error("Neither `enter` nor `leave` walker handler is set or both aren't a function");d(c)};return l.break=i,l.skip=o,l.find=function(c,u){let d=null;return l(c,function(h,f,g){if(u.call(this,h,f,g))return d=h,i}),d},l.findLast=function(c,u){let d=null;return l(c,{reverse:!0,enter(h,f,g){if(u.call(this,h,f,g))return d=h,i}}),d},l.findAll=function(c,u){const d=[];return l(c,function(h,f,g){u.call(this,h,f,g)&&d.push(h)}),d},l}function vS(e){return e}function ES(e){const{min:t,max:r,comma:n}=e;return t===0&&r===0?n?"#?":"*":t===0&&r===1?"?":t===1&&r===0?n?"#":"+":t===1&&r===1?"":(n?"#":"")+(t===r?"{"+t+"}":"{"+t+","+(r!==0?r:"")+"}")}function _S(e){if(e.type==="Range")return" ["+(e.min===null?"-∞":e.min)+","+(e.max===null?"∞":e.max)+"]";throw new Error("Unknown node type `"+e.type+"`")}function SS(e,t,r,n){const i=e.combinator===" "||n?e.combinator:" "+e.combinator+" ",o=e.terms.map(s=>Hs(s,t,r,n)).join(i);return e.explicit||r?(n||o[0]===","?"[":"[ ")+o+(n?"]":" ]"):o}function Hs(e,t,r,n){let i;switch(e.type){case"Group":i=SS(e,t,r,n)+(e.disallowEmpty?"!":"");break;case"Multiplier":return Hs(e.term,t,r,n)+t(ES(e),e);case"Type":i="<"+e.name+(e.opts?t(_S(e.opts),e.opts):"")+">";break;case"Property":i="<'"+e.name+"'>";break;case"Keyword":i=e.name;break;case"AtKeyword":i="@"+e.name;break;case"Function":i=e.name+"(";break;case"String":case"Token":i=e.value;break;case"Comma":i=",";break;default:throw new Error("Unknown node type `"+e.type+"`")}return t(i,e)}function zs(e,t){let r=vS,n=!1,i=!1;return typeof t=="function"?r=t:t&&(n=!!t.forceBraces,i=!!t.compact,typeof t.decorate=="function"&&(r=t.decorate)),Hs(e,r,n,i)}var zu={offset:0,line:1,column:1};function wS(e,t){const r=e.tokens,n=e.longestMatch,i=n<r.length&&r[n].node||null,o=i!==t?i:null;let s=0,a=0,l=0,c="",u,d;for(let h=0;h<r.length;h++){const f=r[h].value;h===n&&(a=f.length,s=c.length),o!==null&&r[h].node===o&&(h<=n?l++:l=0),c+=f}return n===r.length||l>1?(u=ki(o||t,"end")||en(zu,c),d=en(u)):(u=ki(o,"start")||en(ki(t,"start")||zu,c.slice(0,s)),d=ki(o,"end")||en(u,c.substr(s,a))),{css:c,mismatchOffset:s,mismatchLength:a,start:u,end:d}}function ki(e,t){const r=e&&e.loc&&e.loc[t];return r?"line"in r?en(r):r:null}function en({offset:e,line:t,column:r},n){const i={offset:e,line:t,column:r};if(n){const o=n.split(/\n|\r\n?|\f/);i.offset+=n.length,i.line+=o.length-1,i.column=o.length===1?i.column+n.length:o.pop().length+1}return i}var tn=function(e,t){const r=Ti("SyntaxReferenceError",e+(t?" `"+t+"`":""));return r.reference=t,r},CS=function(e,t,r,n){const i=Ti("SyntaxMatchError",e),{css:o,mismatchOffset:s,mismatchLength:a,start:l,end:c}=wS(n,r);return i.rawMessage=e,i.syntax=t?zs(t):"<generic>",i.css=o,i.mismatchOffset=s,i.mismatchLength=a,i.message=e+`
15
- syntax: `+i.syntax+`
16
- value: `+(o||"<empty string>")+`
17
- --------`+new Array(i.mismatchOffset+1).join("-")+"^",Object.assign(i,l),i.loc={source:r&&r.loc&&r.loc.source||"<unknown>",start:l,end:c},i},Li=new Map,mr=new Map,Oi=45,ze=AS,pr=TS;function Vs(e,t){return t=t||0,e.length-t>=2&&e.charCodeAt(t)===Oi&&e.charCodeAt(t+1)===Oi}function Vu(e,t){if(t=t||0,e.length-t>=3&&e.charCodeAt(t)===Oi&&e.charCodeAt(t+1)!==Oi){const r=e.indexOf("-",t+2);if(r!==-1)return e.substring(t,r+1)}return""}function AS(e){if(Li.has(e))return Li.get(e);const t=e.toLowerCase();let r=Li.get(t);if(r===void 0){const n=Vs(t,0),i=n?"":Vu(t,0);r=Object.freeze({basename:t.substr(i.length),name:t,prefix:i,vendor:i,custom:n})}return Li.set(e,r),r}function TS(e){if(mr.has(e))return mr.get(e);let t=e,r=e[0];r==="/"?r=e[1]==="/"?"//":"/":r!=="_"&&r!=="*"&&r!=="$"&&r!=="#"&&r!=="+"&&r!=="&"&&(r="");const n=Vs(t,r.length);if(!n&&(t=t.toLowerCase(),mr.has(t))){const a=mr.get(t);return mr.set(e,a),a}const i=n?"":Vu(t,r.length),o=t.substr(0,r.length+i.length),s=Object.freeze({basename:t.substr(o.length),name:t.substr(r.length),hack:r,vendor:i,prefix:o,custom:n});return mr.set(e,s),s}var Wu=["initial","inherit","unset","revert","revert-layer"],rn=43,Je=45,Ws=110,gr=!0,kS=!1;function Us(e,t){return e!==null&&e.type===9&&e.value.charCodeAt(0)===t}function nn(e,t,r){for(;e!==null&&(e.type===13||e.type===25);)e=r(++t);return t}function yt(e,t,r,n){if(!e)return 0;const i=e.value.charCodeAt(t);if(i===rn||i===Je){if(r)return 0;t++}for(;t<e.value.length;t++)if(!he(e.value.charCodeAt(t)))return 0;return n+1}function qs(e,t,r){let n=!1,i=nn(e,t,r);if(e=r(i),e===null)return t;if(e.type!==10)if(Us(e,rn)||Us(e,Je)){if(n=!0,i=nn(r(++i),i,r),e=r(i),e===null||e.type!==10)return 0}else return t;if(!n){const o=e.value.charCodeAt(0);if(o!==rn&&o!==Je)return 0}return yt(e,n?0:1,n,i)}function LS(e,t){let r=0;if(!e)return 0;if(e.type===10)return yt(e,0,kS,r);if(e.type===1&&e.value.charCodeAt(0)===Je){if(!dr(e.value,1,Ws))return 0;switch(e.value.length){case 2:return qs(t(++r),r,t);case 3:return e.value.charCodeAt(2)!==Je?0:(r=nn(t(++r),r,t),e=t(r),yt(e,0,gr,r));default:return e.value.charCodeAt(2)!==Je?0:yt(e,3,gr,r)}}else if(e.type===1||Us(e,rn)&&t(r+1).type===1){if(e.type!==1&&(e=t(++r)),e===null||!dr(e.value,0,Ws))return 0;switch(e.value.length){case 1:return qs(t(++r),r,t);case 2:return e.value.charCodeAt(1)!==Je?0:(r=nn(t(++r),r,t),e=t(r),yt(e,0,gr,r));default:return e.value.charCodeAt(1)!==Je?0:yt(e,2,gr,r)}}else if(e.type===12){let n=e.value.charCodeAt(0),i=n===rn||n===Je?1:0,o=i;for(;o<e.value.length&&he(e.value.charCodeAt(o));o++);return o===i||!dr(e.value,o,Ws)?0:o+1===e.value.length?qs(t(++r),r,t):e.value.charCodeAt(o+1)!==Je?0:o+2===e.value.length?(r=nn(t(++r),r,t),e=t(r),yt(e,0,gr,r)):yt(e,o+2,gr,r)}return 0}var OS=43,Uu=45,qu=63,xS=117;function Gs(e,t){return e!==null&&e.type===9&&e.value.charCodeAt(0)===t}function PS(e,t){return e.value.charCodeAt(0)===t}function on(e,t,r){let n=0;for(let i=t;i<e.value.length;i++){const o=e.value.charCodeAt(i);if(o===Uu&&r&&n!==0)return on(e,t+n+1,!1),6;if(!gt(o)||++n>6)return 0}return n}function xi(e,t,r){if(!e)return 0;for(;Gs(r(t),qu);){if(++e>6)return 0;t++}return t}function NS(e,t){let r=0;if(e===null||e.type!==1||!dr(e.value,0,xS)||(e=t(++r),e===null))return 0;if(Gs(e,OS))return e=t(++r),e===null?0:e.type===1?xi(on(e,0,!0),++r,t):Gs(e,qu)?xi(1,++r,t):0;if(e.type===10){const n=on(e,1,!0);return n===0?0:(e=t(++r),e===null?r:e.type===12||e.type===10?!PS(e,Uu)||!on(e,1,!1)?0:r+1:xi(n,r,t))}return e.type===12?xi(on(e,1,!0),++r,t):0}var MS=["calc(","-moz-calc(","-webkit-calc("],Xs=new Map([[2,22],[21,22],[19,20],[23,24]]),RS=["cm","mm","q","in","pt","pc","px","em","rem","ex","rex","cap","rcap","ch","rch","ic","ric","lh","rlh","vw","svw","lvw","dvw","vh","svh","lvh","dvh","vi","svi","lvi","dvi","vb","svb","lvb","dvb","vmin","svmin","lvmin","dvmin","vmax","svmax","lvmax","dvmax","cqw","cqh","cqi","cqb","cqmin","cqmax"],DS=["deg","grad","rad","turn"],IS=["s","ms"],BS=["hz","khz"],FS=["dpi","dpcm","dppx","x"],jS=["fr"],$S=["db"],HS=["st"];function Ve(e,t){return t<e.length?e.charCodeAt(t):0}function Gu(e,t){return Zr(e,0,e.length,t)}function Xu(e,t){for(let r=0;r<t.length;r++)if(Gu(e,t[r]))return!0;return!1}function Yu(e,t){return t!==e.length-2?!1:Ve(e,t)===92&&he(Ve(e,t+1))}function Pi(e,t,r){if(e&&e.type==="Range"){const n=Number(r!==void 0&&r!==t.length?t.substr(0,r):t);if(isNaN(n)||e.min!==null&&n<e.min&&typeof e.min!="string"||e.max!==null&&n>e.max&&typeof e.max!="string")return!0}return!1}function zS(e,t){let r=0,n=[],i=0;e:do{switch(e.type){case 24:case 22:case 20:if(e.type!==r)break e;if(r=n.pop(),n.length===0){i++;break e}break;case 2:case 21:case 19:case 23:n.push(r),r=Xs.get(e.type)}i++}while(e=t(i));return i}function Be(e){return function(t,r,n){return t===null?0:t.type===2&&Xu(t.value,MS)?zS(t,r):e(t,r,n)}}function ee(e){return function(t){return t===null||t.type!==e?0:1}}function VS(e){if(e===null||e.type!==1)return 0;const t=e.value.toLowerCase();return Xu(t,Wu)||Gu(t,"default")?0:1}function WS(e){return e===null||e.type!==1||Ve(e.value,0)!==45||Ve(e.value,1)!==45?0:1}function US(e){if(e===null||e.type!==4)return 0;const t=e.value.length;if(t!==4&&t!==5&&t!==7&&t!==9)return 0;for(let r=1;r<t;r++)if(!gt(Ve(e.value,r)))return 0;return 1}function qS(e){return e===null||e.type!==4||!Ei(Ve(e.value,1),Ve(e.value,2),Ve(e.value,3))?0:1}function GS(e,t){if(!e)return 0;let r=0,n=[],i=0;e:do{switch(e.type){case 6:case 8:break e;case 24:case 22:case 20:if(e.type!==r)break e;r=n.pop();break;case 17:if(r===0)break e;break;case 9:if(r===0&&e.value==="!")break e;break;case 2:case 21:case 19:case 23:n.push(r),r=Xs.get(e.type)}i++}while(e=t(i));return i}function XS(e,t){if(!e)return 0;let r=0,n=[],i=0;e:do{switch(e.type){case 6:case 8:break e;case 24:case 22:case 20:if(e.type!==r)break e;r=n.pop();break;case 2:case 21:case 19:case 23:n.push(r),r=Xs.get(e.type)}i++}while(e=t(i));return i}function ct(e){return e&&(e=new Set(e)),function(t,r,n){if(t===null||t.type!==12)return 0;const i=wi(t.value,0);if(e!==null){const o=t.value.indexOf("\\",i),s=o===-1||!Yu(t.value,o)?t.value.substr(i):t.value.substring(i,o);if(e.has(s.toLowerCase())===!1)return 0}return Pi(n,t.value,i)?0:1}}function YS(e,t,r){return e===null||e.type!==11||Pi(r,e.value,e.value.length-1)?0:1}function Ku(e){return typeof e!="function"&&(e=function(){return 0}),function(t,r,n){return t!==null&&t.type===10&&Number(t.value)===0?1:e(t,r,n)}}function KS(e,t,r){if(e===null)return 0;const n=wi(e.value,0);return n!==e.value.length&&!Yu(e.value,n)||Pi(r,e.value,n)?0:1}function QS(e,t,r){if(e===null||e.type!==10)return 0;let n=Ve(e.value,0)===43||Ve(e.value,0)===45?1:0;for(;n<e.value.length;n++)if(!he(Ve(e.value,n)))return 0;return Pi(r,e.value,n)?0:1}var Qu={"ident-token":ee(1),"function-token":ee(2),"at-keyword-token":ee(3),"hash-token":ee(4),"string-token":ee(5),"bad-string-token":ee(6),"url-token":ee(7),"bad-url-token":ee(8),"delim-token":ee(9),"number-token":ee(10),"percentage-token":ee(11),"dimension-token":ee(12),"whitespace-token":ee(13),"CDO-token":ee(14),"CDC-token":ee(15),"colon-token":ee(16),"semicolon-token":ee(17),"comma-token":ee(18),"[-token":ee(19),"]-token":ee(20),"(-token":ee(21),")-token":ee(22),"{-token":ee(23),"}-token":ee(24),string:ee(5),ident:ee(1),"custom-ident":VS,"custom-property-name":WS,"hex-color":US,"id-selector":qS,"an-plus-b":LS,urange:NS,"declaration-value":GS,"any-value":XS,dimension:Be(ct(null)),angle:Be(ct(DS)),decibel:Be(ct($S)),frequency:Be(ct(BS)),flex:Be(ct(jS)),length:Be(Ku(ct(RS))),resolution:Be(ct(FS)),semitones:Be(ct(HS)),time:Be(ct(IS)),percentage:Be(YS),zero:Ku(),number:Be(KS),integer:Be(QS)};function ZS(e,t,r){return Object.assign(Ti("SyntaxError",e),{input:t,offset:r,rawMessage:e,message:e+`
18
- `+t+`
19
- --`+new Array((r||t.length)+1).join("-")+"^"})}var JS=9,ew=10,tw=12,rw=13,nw=32,iw=class{constructor(e){this.str=e,this.pos=0}charCodeAt(e){return e<this.str.length?this.str.charCodeAt(e):0}charCode(){return this.charCodeAt(this.pos)}nextCharCode(){return this.charCodeAt(this.pos+1)}nextNonWsCode(e){return this.charCodeAt(this.findWsEnd(e))}findWsEnd(e){for(;e<this.str.length;e++){const t=this.str.charCodeAt(e);if(t!==rw&&t!==ew&&t!==tw&&t!==nw&&t!==JS)break}return e}substringToPos(e){return this.str.substring(this.pos,this.pos=e)}eat(e){this.charCode()!==e&&this.error("Expect `"+String.fromCharCode(e)+"`"),this.pos++}peek(){return this.pos<this.str.length?this.str.charAt(this.pos++):""}error(e){throw new ZS(e,this.str,this.pos)}},ow=9,sw=10,aw=12,lw=13,cw=32,Zu=33,Ys=35,Ju=38,Ni=39,ed=40,uw=41,td=42,Ks=43,Qs=44,rd=45,Zs=60,nd=62,Js=63,dw=64,Mi=91,ea=93,Ri=123,id=124,od=125,sd=8734,sn=new Uint8Array(128).map((e,t)=>/[a-zA-Z0-9\-]/.test(String.fromCharCode(t))?1:0),ad={" ":1,"&&":2,"||":3,"|":4};function Di(e){return e.substringToPos(e.findWsEnd(e.pos))}function br(e){let t=e.pos;for(;t<e.str.length;t++){const r=e.str.charCodeAt(t);if(r>=128||sn[r]===0)break}return e.pos===t&&e.error("Expect a keyword"),e.substringToPos(t)}function Ii(e){let t=e.pos;for(;t<e.str.length;t++){const r=e.str.charCodeAt(t);if(r<48||r>57)break}return e.pos===t&&e.error("Expect a number"),e.substringToPos(t)}function fw(e){const t=e.str.indexOf("'",e.pos+1);return t===-1&&(e.pos=e.str.length,e.error("Expect an apostrophe")),e.substringToPos(t+1)}function ld(e){let t=null,r=null;return e.eat(Ri),t=Ii(e),e.charCode()===Qs?(e.pos++,e.charCode()!==od&&(r=Ii(e))):r=t,e.eat(od),{min:Number(t),max:r?Number(r):0}}function hw(e){let t=null,r=!1;switch(e.charCode()){case td:e.pos++,t={min:0,max:0};break;case Ks:e.pos++,t={min:1,max:0};break;case Js:e.pos++,t={min:0,max:1};break;case Ys:e.pos++,r=!0,e.charCode()===Ri?t=ld(e):e.charCode()===Js?(e.pos++,t={min:0,max:0}):t={min:1,max:0};break;case Ri:t=ld(e);break;default:return null}return{type:"Multiplier",comma:r,min:t.min,max:t.max,term:null}}function yr(e,t){const r=hw(e);return r!==null?(r.term=t,e.charCode()===Ys&&e.charCodeAt(e.pos-1)===Ks?yr(e,r):r):t}function ta(e){const t=e.peek();return t===""?null:{type:"Token",value:t}}function mw(e){let t;return e.eat(Zs),e.eat(Ni),t=br(e),e.eat(Ni),e.eat(nd),yr(e,{type:"Property",name:t})}function pw(e){let t=null,r=null,n=1;return e.eat(Mi),e.charCode()===rd&&(e.peek(),n=-1),n==-1&&e.charCode()===sd?e.peek():(t=n*Number(Ii(e)),sn[e.charCode()]!==0&&(t+=br(e))),Di(e),e.eat(Qs),Di(e),e.charCode()===sd?e.peek():(n=1,e.charCode()===rd&&(e.peek(),n=-1),r=n*Number(Ii(e)),sn[e.charCode()]!==0&&(r+=br(e))),e.eat(ea),{type:"Range",min:t,max:r}}function gw(e){let t,r=null;return e.eat(Zs),t=br(e),e.charCode()===ed&&e.nextCharCode()===uw&&(e.pos+=2,t+="()"),e.charCodeAt(e.findWsEnd(e.pos))===Mi&&(Di(e),r=pw(e)),e.eat(nd),yr(e,{type:"Type",name:t,opts:r})}function bw(e){const t=br(e);return e.charCode()===ed?(e.pos++,{type:"Function",name:t}):yr(e,{type:"Keyword",name:t})}function yw(e,t){function r(i,o){return{type:"Group",terms:i,combinator:o,disallowEmpty:!1,explicit:!1}}let n;for(t=Object.keys(t).sort((i,o)=>ad[i]-ad[o]);t.length>0;){n=t.shift();let i=0,o=0;for(;i<e.length;i++){const s=e[i];s.type==="Combinator"&&(s.value===n?(o===-1&&(o=i-1),e.splice(i,1),i--):(o!==-1&&i-o>1&&(e.splice(o,i-o,r(e.slice(o,i),n)),i=o+1),o=-1))}o!==-1&&t.length&&e.splice(o,i-o,r(e.slice(o,i),n))}return n}function cd(e){const t=[],r={};let n,i=null,o=e.pos;for(;n=Ew(e);)n.type!=="Spaces"&&(n.type==="Combinator"?((i===null||i.type==="Combinator")&&(e.pos=o,e.error("Unexpected combinator")),r[n.value]=!0):i!==null&&i.type!=="Combinator"&&(r[" "]=!0,t.push({type:"Combinator",value:" "})),t.push(n),i=n,o=e.pos);return i!==null&&i.type==="Combinator"&&(e.pos-=o,e.error("Unexpected combinator")),{type:"Group",terms:t,combinator:yw(t,r)||" ",disallowEmpty:!1,explicit:!1}}function vw(e){let t;return e.eat(Mi),t=cd(e),e.eat(ea),t.explicit=!0,e.charCode()===Zu&&(e.pos++,t.disallowEmpty=!0),t}function Ew(e){let t=e.charCode();if(t<128&&sn[t]===1)return bw(e);switch(t){case ea:break;case Mi:return yr(e,vw(e));case Zs:return e.nextCharCode()===Ni?mw(e):gw(e);case id:return{type:"Combinator",value:e.substringToPos(e.pos+(e.nextCharCode()===id?2:1))};case Ju:return e.pos++,e.eat(Ju),{type:"Combinator",value:"&&"};case Qs:return e.pos++,{type:"Comma"};case Ni:return yr(e,{type:"String",value:fw(e)});case cw:case ow:case sw:case lw:case aw:return{type:"Spaces",value:Di(e)};case dw:return t=e.nextCharCode(),t<128&&sn[t]===1?(e.pos++,{type:"AtKeyword",name:br(e)}):ta(e);case td:case Ks:case Js:case Ys:case Zu:break;case Ri:if(t=e.nextCharCode(),t<48||t>57)return ta(e);break;default:return ta(e)}}function ud(e){const t=new iw(e),r=cd(t);return t.pos!==e.length&&t.error("Unexpected input"),r.terms.length===1&&r.terms[0].type==="Group"?r.terms[0]:r}var an=function(){};function dd(e){return typeof e=="function"?e:an}function _w(e,t,r){function n(s){switch(i.call(r,s),s.type){case"Group":s.terms.forEach(n);break;case"Multiplier":n(s.term);break;case"Type":case"Property":case"Keyword":case"AtKeyword":case"Function":case"String":case"Token":case"Comma":break;default:throw new Error("Unknown type: "+s.type)}o.call(r,s)}let i=an,o=an;if(typeof t=="function"?i=t:t&&(i=dd(t.enter),o=dd(t.leave)),i===an&&o===an)throw new Error("Neither `enter` nor `leave` walker handler is set or both aren't a function");n(e,r)}var Sw={decorator(e){const t=[];let r=null;return{...e,node(n){const i=r;r=n,e.node.call(this,n),r=i},emit(n,i,o){t.push({type:i,value:n,node:o?null:r})},result(){return t}}}};function ww(e){const t=[];return Ai(e,(r,n,i)=>t.push({type:r,value:e.slice(n,i),node:null})),t}function Cw(e,t){return typeof e=="string"?ww(e):t.generate(e,Sw)}var Y={type:"Match"},K={type:"Mismatch"},ra={type:"DisallowEmpty"},Aw=40,Tw=41;function ve(e,t,r){return t===Y&&r===K||e===Y&&t===Y&&r===Y?e:(e.type==="If"&&e.else===K&&t===Y&&(t=e.then,e=e.match),{type:"If",match:e,then:t,else:r})}function fd(e){return e.length>2&&e.charCodeAt(e.length-2)===Aw&&e.charCodeAt(e.length-1)===Tw}function hd(e){return e.type==="Keyword"||e.type==="AtKeyword"||e.type==="Function"||e.type==="Type"&&fd(e.name)}function na(e,t,r){switch(e){case" ":{let n=Y;for(let i=t.length-1;i>=0;i--){const o=t[i];n=ve(o,n,K)}return n}case"|":{let n=K,i=null;for(let o=t.length-1;o>=0;o--){let s=t[o];if(hd(s)&&(i===null&&o>0&&hd(t[o-1])&&(i=Object.create(null),n=ve({type:"Enum",map:i},Y,n)),i!==null)){const a=(fd(s.name)?s.name.slice(0,-1):s.name).toLowerCase();if(!(a in i)){i[a]=s;continue}}i=null,n=ve(s,Y,n)}return n}case"&&":{if(t.length>5)return{type:"MatchOnce",terms:t,all:!0};let n=K;for(let i=t.length-1;i>=0;i--){const o=t[i];let s;t.length>1?s=na(e,t.filter(function(a){return a!==o}),!1):s=Y,n=ve(o,s,n)}return n}case"||":{if(t.length>5)return{type:"MatchOnce",terms:t,all:!1};let n=r?Y:K;for(let i=t.length-1;i>=0;i--){const o=t[i];let s;t.length>1?s=na(e,t.filter(function(a){return a!==o}),!0):s=Y,n=ve(o,s,n)}return n}}}function kw(e){let t=Y,r=ia(e.term);if(e.max===0)r=ve(r,ra,K),t=ve(r,null,K),t.then=ve(Y,Y,t),e.comma&&(t.then.else=ve({type:"Comma",syntax:e},t,K));else for(let n=e.min||1;n<=e.max;n++)e.comma&&t!==Y&&(t=ve({type:"Comma",syntax:e},t,K)),t=ve(r,ve(Y,Y,t),K);if(e.min===0)t=ve(Y,Y,t);else for(let n=0;n<e.min-1;n++)e.comma&&t!==Y&&(t=ve({type:"Comma",syntax:e},t,K)),t=ve(r,t,K);return t}function ia(e){if(typeof e=="function")return{type:"Generic",fn:e};switch(e.type){case"Group":{let t=na(e.combinator,e.terms.map(ia),!1);return e.disallowEmpty&&(t=ve(t,ra,K)),t}case"Multiplier":return kw(e);case"Type":case"Property":return{type:e.type,name:e.name,syntax:e};case"Keyword":return{type:e.type,name:e.name.toLowerCase(),syntax:e};case"AtKeyword":return{type:e.type,name:"@"+e.name.toLowerCase(),syntax:e};case"Function":return{type:e.type,name:e.name.toLowerCase()+"(",syntax:e};case"String":return e.value.length===3?{type:"Token",value:e.value.charAt(1),syntax:e}:{type:e.type,value:e.value.substr(1,e.value.length-2).replace(/\\'/g,"'"),syntax:e};case"Token":return{type:e.type,value:e.value,syntax:e};case"Comma":return{type:e.type,syntax:e};default:throw new Error("Unknown node type:",e.type)}}function oa(e,t){return typeof e=="string"&&(e=ud(e)),{type:"MatchGraph",match:ia(e),syntax:t||null,source:e}}var{hasOwnProperty:md}=Object.prototype,Lw=0,Ow=1,sa=2,pd=3,gd="Match",xw="Mismatch",Pw="Maximum iteration number exceeded (please fill an issue on https://github.com/csstree/csstree/issues)",Nw=15e3,Mw=0;function Rw(e){let t=null,r=null,n=e;for(;n!==null;)r=n.prev,n.prev=t,t=n,n=r;return t}function aa(e,t){if(e.length!==t.length)return!1;for(let r=0;r<e.length;r++){const n=t.charCodeAt(r);let i=e.charCodeAt(r);if(i>=65&&i<=90&&(i=i|32),i!==n)return!1}return!0}function Dw(e){return e.type!==9?!1:e.value!=="?"}function bd(e){return e===null?!0:e.type===18||e.type===2||e.type===21||e.type===19||e.type===23||Dw(e)}function yd(e){return e===null?!0:e.type===22||e.type===20||e.type===24||e.type===9&&e.value==="/"}function Iw(e,t,r){function n(){do C++,L=C<e.length?e[C]:null;while(L!==null&&(L.type===13||L.type===25))}function i(m){const b=C+m;return b<e.length?e[b]:null}function o(m,b){return{nextState:m,matchStack:E,syntaxStack:d,thenStack:h,tokenIndex:C,prev:b}}function s(m){h={nextState:m,matchStack:E,syntaxStack:d,prev:h}}function a(m){f=o(m,f)}function l(){E={type:Ow,syntax:t.syntax,token:L,prev:E},n(),g=null,C>O&&(O=C)}function c(){d={syntax:t.syntax,opts:t.syntax.opts||d!==null&&d.opts||null,prev:d},E={type:sa,syntax:t.syntax,token:E.token,prev:E}}function u(){E.type===sa?E=E.prev:E={type:pd,syntax:d.syntax,token:E.token,prev:E},d=d.prev}let d=null,h=null,f=null,g=null,y=0,A=null,L=null,C=-1,O=0,E={type:Lw,syntax:null,token:null,prev:null};for(n();A===null&&++y<Nw;)switch(t.type){case"Match":if(h===null){if(L!==null&&(C!==e.length-1||L.value!=="\\0"&&L.value!=="\\9")){t=K;break}A=gd;break}if(t=h.nextState,t===ra)if(h.matchStack===E){t=K;break}else t=Y;for(;h.syntaxStack!==d;)u();h=h.prev;break;case"Mismatch":if(g!==null&&g!==!1)(f===null||C>f.tokenIndex)&&(f=g,g=!1);else if(f===null){A=xw;break}t=f.nextState,h=f.thenStack,d=f.syntaxStack,E=f.matchStack,C=f.tokenIndex,L=C<e.length?e[C]:null,f=f.prev;break;case"MatchGraph":t=t.match;break;case"If":t.else!==K&&a(t.else),t.then!==Y&&s(t.then),t=t.match;break;case"MatchOnce":t={type:"MatchOnceBuffer",syntax:t,index:0,mask:0};break;case"MatchOnceBuffer":{const S=t.syntax.terms;if(t.index===S.length){if(t.mask===0||t.syntax.all){t=K;break}t=Y;break}if(t.mask===(1<<S.length)-1){t=Y;break}for(;t.index<S.length;t.index++){const p=1<<t.index;if((t.mask&p)===0){a(t),s({type:"AddMatchOnce",syntax:t.syntax,mask:t.mask|p}),t=S[t.index++];break}}break}case"AddMatchOnce":t={type:"MatchOnceBuffer",syntax:t.syntax,index:0,mask:t.mask};break;case"Enum":if(L!==null){let S=L.value.toLowerCase();if(S.indexOf("\\")!==-1&&(S=S.replace(/\\[09].*$/,"")),md.call(t.map,S)){t=t.map[S];break}}t=K;break;case"Generic":{const S=d!==null?d.opts:null,p=C+Math.floor(t.fn(L,i,S));if(!isNaN(p)&&p>C){for(;C<p;)l();t=Y}else t=K;break}case"Type":case"Property":{const S=t.type==="Type"?"types":"properties",p=md.call(r,S)?r[S][t.name]:null;if(!p||!p.match)throw new Error("Bad syntax reference: "+(t.type==="Type"?"<"+t.name+">":"<'"+t.name+"'>"));if(g!==!1&&L!==null&&t.type==="Type"&&(t.name==="custom-ident"&&L.type===1||t.name==="length"&&L.value==="0")){g===null&&(g=o(t,f)),t=K;break}c(),t=p.match;break}case"Keyword":{const S=t.name;if(L!==null){let p=L.value;if(p.indexOf("\\")!==-1&&(p=p.replace(/\\[09].*$/,"")),aa(p,S)){l(),t=Y;break}}t=K;break}case"AtKeyword":case"Function":if(L!==null&&aa(L.value,t.name)){l(),t=Y;break}t=K;break;case"Token":if(L!==null&&L.value===t.value){l(),t=Y;break}t=K;break;case"Comma":L!==null&&L.type===18?bd(E.token)?t=K:(l(),t=yd(L)?K:Y):t=bd(E.token)||yd(L)?Y:K;break;case"String":let m="",b=C;for(;b<e.length&&m.length<t.value.length;b++)m+=e[b].value;if(aa(m,t.value)){for(;C<b;)l();t=Y}else t=K;break;default:throw new Error("Unknown node type: "+t.type)}switch(Mw+=y,A){case null:A=Pw,E=null;break;case gd:for(;d!==null;)u();break;default:E=null}return{tokens:e,reason:A,iterations:y,match:E,longestMatch:O}}function vd(e,t,r){const n=Iw(e,t,r||{});if(n.match===null)return n;let i=n.match,o=n.match={syntax:t.syntax||null,match:[]};const s=[o];for(i=Rw(i).prev;i!==null;){switch(i.type){case sa:o.match.push(o={syntax:i.syntax,match:[]}),s.push(o);break;case pd:s.pop(),o=s[s.length-1];break;default:o.match.push({syntax:i.syntax||null,token:i.token.value,node:i.token.node})}i=i.prev}return n}var Bw=F.__exportAll({getTrace:()=>Ed,isKeyword:()=>$w,isProperty:()=>jw,isType:()=>Fw});function Ed(e){function t(i){return i===null?!1:i.type==="Type"||i.type==="Property"||i.type==="Keyword"}function r(i){if(Array.isArray(i.match)){for(let o=0;o<i.match.length;o++)if(r(i.match[o]))return t(i.syntax)&&n.unshift(i.syntax),!0}else if(i.node===e)return n=t(i.syntax)?[i.syntax]:[],!0;return!1}let n=null;return this.matched!==null&&r(this.matched),n}function Fw(e,t){return la(this,e,r=>r.type==="Type"&&r.name===t)}function jw(e,t){return la(this,e,r=>r.type==="Property"&&r.name===t)}function $w(e){return la(this,e,t=>t.type==="Keyword")}function la(e,t,r){const n=Ed.call(e,t);return n===null?!1:n.some(r)}function _d(e){return"node"in e?e.node:_d(e.match[0])}function Sd(e){return"node"in e?e.node:Sd(e.match[e.match.length-1])}function wd(e,t,r,n,i){function o(a){if(a.syntax!==null&&a.syntax.type===n&&a.syntax.name===i){const l=_d(a),c=Sd(a);e.syntax.walk(t,function(u,d,h){if(u===l){const f=new ae;do{if(f.appendData(d.data),d.data===c)break;d=d.next}while(d!==null);s.push({parent:h,nodes:f})}})}Array.isArray(a.match)&&a.match.forEach(o)}const s=[];return r.matched!==null&&o(r.matched),s}var{hasOwnProperty:ln}=Object.prototype;function ca(e){return typeof e=="number"&&isFinite(e)&&Math.floor(e)===e&&e>=0}function Cd(e){return!!e&&ca(e.offset)&&ca(e.line)&&ca(e.column)}function Hw(e,t){return function(n,i){if(!n||n.constructor!==Object)return i(n,"Type of node should be an Object");for(let o in n){let s=!0;if(ln.call(n,o)!==!1){if(o==="type")n.type!==e&&i(n,"Wrong node type `"+n.type+"`, expected `"+e+"`");else if(o==="loc"){if(n.loc===null)continue;if(n.loc&&n.loc.constructor===Object)if(typeof n.loc.source!="string")o+=".source";else if(!Cd(n.loc.start))o+=".start";else if(!Cd(n.loc.end))o+=".end";else continue;s=!1}else if(t.hasOwnProperty(o)){s=!1;for(let a=0;!s&&a<t[o].length;a++){const l=t[o][a];switch(l){case String:s=typeof n[o]=="string";break;case Boolean:s=typeof n[o]=="boolean";break;case null:s=n[o]===null;break;default:typeof l=="string"?s=n[o]&&n[o].type===l:Array.isArray(l)&&(s=n[o]instanceof ae)}}}else i(n,"Unknown field `"+o+"` for "+e+" node type");s||i(n,"Bad value for `"+e+"."+o+"`")}}for(const o in t)ln.call(t,o)&&ln.call(n,o)===!1&&i(n,"Field `"+e+"."+o+"` is missed")}}function zw(e,t){const r=t.structure,n={type:String,loc:!0},i={type:'"'+e+'"'};for(const o in r){if(ln.call(r,o)===!1)continue;const s=[],a=n[o]=Array.isArray(r[o])?r[o].slice():[r[o]];for(let l=0;l<a.length;l++){const c=a[l];if(c===String||c===Boolean)s.push(c.name);else if(c===null)s.push("null");else if(typeof c=="string")s.push("<"+c+">");else if(Array.isArray(c))s.push("List");else throw new Error("Wrong value `"+c+"` in `"+e+"."+o+"` structure definition")}i[o]=s.join(" | ")}return{docs:i,check:Hw(e,n)}}function Vw(e){const t={};if(e.node){for(const r in e.node)if(ln.call(e.node,r)){const n=e.node[r];if(n.structure)t[r]=zw(r,n);else throw new Error("Missed `structure` field in `"+r+"` node type definition")}}return t}var Ww=oa(Wu.join(" | "));function ua(e,t,r){const n={};for(const i in e)e[i].syntax&&(n[i]=r?e[i].syntax:zs(e[i].syntax,{compact:t}));return n}function Uw(e,t,r){const n={};for(const[i,o]of Object.entries(e))n[i]={prelude:o.prelude&&(r?o.prelude.syntax:zs(o.prelude.syntax,{compact:t})),descriptors:o.descriptors&&ua(o.descriptors,t,r)};return n}function qw(e){for(let t=0;t<e.length;t++)if(e[t].value.toLowerCase()==="var(")return!0;return!1}function We(e,t,r){return{matched:e,iterations:r,error:t,...Bw}}function vr(e,t,r,n){const i=Cw(r,e.syntax);let o;return qw(i)?We(null,new Error("Matching for a tree with var() is not supported")):(n&&(o=vd(i,e.cssWideKeywordsSyntax,e)),(!n||!o.match)&&(o=vd(i,t.match,e),!o.match)?We(null,new CS(o.reason,t.syntax,r,o),o.iterations):We(o.match,null,o.iterations))}var Ad=class{constructor(e,t,r){if(this.cssWideKeywordsSyntax=Ww,this.syntax=t,this.generic=!1,this.atrules=Object.create(null),this.properties=Object.create(null),this.types=Object.create(null),this.structure=r||Vw(e),e){if(e.types)for(const n in e.types)this.addType_(n,e.types[n]);if(e.generic){this.generic=!0;for(const n in Qu)this.addType_(n,Qu[n])}if(e.atrules)for(const n in e.atrules)this.addAtrule_(n,e.atrules[n]);if(e.properties)for(const n in e.properties)this.addProperty_(n,e.properties[n])}}checkStructure(e){function t(i,o){n.push({node:i,message:o})}const r=this.structure,n=[];return this.syntax.walk(e,function(i){r.hasOwnProperty(i.type)?r[i.type].check(i,t):t(i,"Unknown node type `"+i.type+"`")}),n.length?n:!1}createDescriptor(e,t,r,n=null){const i={type:t,name:r},o={type:t,name:r,parent:n,serializable:typeof e=="string"||e&&typeof e.type=="string",syntax:null,match:null};return typeof e=="function"?o.match=oa(e,i):(typeof e=="string"?Object.defineProperty(o,"syntax",{get(){return Object.defineProperty(o,"syntax",{value:ud(e)}),o.syntax}}):o.syntax=e,Object.defineProperty(o,"match",{get(){return Object.defineProperty(o,"match",{value:oa(o.syntax,i)}),o.match}})),o}addAtrule_(e,t){t&&(this.atrules[e]={type:"Atrule",name:e,prelude:t.prelude?this.createDescriptor(t.prelude,"AtrulePrelude",e):null,descriptors:t.descriptors?Object.keys(t.descriptors).reduce((r,n)=>(r[n]=this.createDescriptor(t.descriptors[n],"AtruleDescriptor",n,e),r),Object.create(null)):null})}addProperty_(e,t){t&&(this.properties[e]=this.createDescriptor(t,"Property",e))}addType_(e,t){t&&(this.types[e]=this.createDescriptor(t,"Type",e))}checkAtruleName(e){if(!this.getAtrule(e))return new tn("Unknown at-rule","@"+e)}checkAtrulePrelude(e,t){const r=this.checkAtruleName(e);if(r)return r;const n=this.getAtrule(e);if(!n.prelude&&t)return new SyntaxError("At-rule `@"+e+"` should not contain a prelude");if(n.prelude&&!t&&!vr(this,n.prelude,"",!1).matched)return new SyntaxError("At-rule `@"+e+"` should contain a prelude")}checkAtruleDescriptorName(e,t){const r=this.checkAtruleName(e);if(r)return r;const n=this.getAtrule(e),i=ze(t);if(!n.descriptors)return new SyntaxError("At-rule `@"+e+"` has no known descriptors");if(!n.descriptors[i.name]&&!n.descriptors[i.basename])return new tn("Unknown at-rule descriptor",t)}checkPropertyName(e){if(!this.getProperty(e))return new tn("Unknown property",e)}matchAtrulePrelude(e,t){const r=this.checkAtrulePrelude(e,t);if(r)return We(null,r);const n=this.getAtrule(e);return n.prelude?vr(this,n.prelude,t||"",!1):We(null,null)}matchAtruleDescriptor(e,t,r){const n=this.checkAtruleDescriptorName(e,t);if(n)return We(null,n);const i=this.getAtrule(e),o=ze(t);return vr(this,i.descriptors[o.name]||i.descriptors[o.basename],r,!1)}matchDeclaration(e){return e.type!=="Declaration"?We(null,new Error("Not a Declaration node")):this.matchProperty(e.property,e.value)}matchProperty(e,t){if(pr(e).custom)return We(null,new Error("Lexer matching doesn't applicable for custom properties"));const r=this.checkPropertyName(e);return r?We(null,r):vr(this,this.getProperty(e),t,!0)}matchType(e,t){const r=this.getType(e);return r?vr(this,r,t,!1):We(null,new tn("Unknown type",e))}match(e,t){return typeof e!="string"&&(!e||!e.type)?We(null,new tn("Bad syntax")):((typeof e=="string"||!e.match)&&(e=this.createDescriptor(e,"Type","anonymous")),vr(this,e,t,!1))}findValueFragments(e,t,r,n){return wd(this,t,this.matchProperty(e,t),r,n)}findDeclarationValueFragments(e,t,r){return wd(this,e.value,this.matchDeclaration(e),t,r)}findAllFragments(e,t,r){const n=[];return this.syntax.walk(e,{visit:"Declaration",enter:i=>{n.push.apply(n,this.findDeclarationValueFragments(i,t,r))}}),n}getAtrule(e,t=!0){const r=ze(e);return(r.vendor&&t?this.atrules[r.name]||this.atrules[r.basename]:this.atrules[r.name])||null}getAtrulePrelude(e,t=!0){const r=this.getAtrule(e,t);return r&&r.prelude||null}getAtruleDescriptor(e,t){return this.atrules.hasOwnProperty(e)&&this.atrules.declarators&&this.atrules[e].declarators[t]||null}getProperty(e,t=!0){const r=pr(e);return(r.vendor&&t?this.properties[r.name]||this.properties[r.basename]:this.properties[r.name])||null}getType(e){return hasOwnProperty.call(this.types,e)?this.types[e]:null}validate(){function e(n,i,o,s){if(o.has(i))return o.get(i);o.set(i,!1),s.syntax!==null&&_w(s.syntax,function(a){if(a.type!=="Type"&&a.type!=="Property")return;const l=a.type==="Type"?n.types:n.properties,c=a.type==="Type"?t:r;(!hasOwnProperty.call(l,a.name)||e(n,a.name,c,l[a.name]))&&o.set(i,!0)},this)}let t=new Map,r=new Map;for(const n in this.types)e(this,n,t,this.types[n]);for(const n in this.properties)e(this,n,r,this.properties[n]);return t=[...t.keys()].filter(n=>t.get(n)),r=[...r.keys()].filter(n=>r.get(n)),t.length||r.length?{types:t,properties:r}:null}dump(e,t){return{generic:this.generic,types:ua(this.types,!t,e),properties:ua(this.properties,!t,e),atrules:Uw(this.atrules,!t,e)}}toString(){return JSON.stringify(this.dump())}},{hasOwnProperty:Er}=Object.prototype,Gw={generic:!0,types:da,atrules:{prelude:Od,descriptors:Od},properties:da,parseContext:Xw,scope:kd,atrule:["parse"],pseudo:["parse"],node:["name","structure","parse","generate","walkContext"]};function Bi(e){return e&&e.constructor===Object}function Td(e){return Bi(e)?{...e}:e}function Xw(e,t){return Object.assign(e,t)}function kd(e,t){for(const r in t)Er.call(t,r)&&(Bi(e[r])?kd(e[r],t[r]):e[r]=Td(t[r]));return e}function Ld(e,t){return typeof t=="string"&&/^\s*\|/.test(t)?typeof e=="string"?e+t:t.replace(/^\s*\|\s*/,""):t||null}function da(e,t){if(typeof t=="string")return Ld(e,t);const r={...e};for(let n in t)Er.call(t,n)&&(r[n]=Ld(Er.call(e,n)?e[n]:void 0,t[n]));return r}function Od(e,t){const r=da(e,t);return!Bi(r)||Object.keys(r).length?r:null}function cn(e,t,r){for(const n in r)if(Er.call(r,n)!==!1){if(r[n]===!0)Er.call(t,n)&&(e[n]=Td(t[n]));else if(r[n]){if(typeof r[n]=="function"){const i=r[n];e[n]=i({},e[n]),e[n]=i(e[n]||{},t[n])}else if(Bi(r[n])){const i={};for(let o in e[n])i[o]=cn({},e[n][o],r[n]);for(let o in t[n])i[o]=cn(i[o]||{},t[n][o],r[n]);e[n]=i}else if(Array.isArray(r[n])){const i={},o=r[n].reduce(function(s,a){return s[a]=!0,s},{});for(const[s,a]of Object.entries(e[n]||{}))i[s]={},a&&cn(i[s],a,o);for(const s in t[n])Er.call(t[n],s)&&(i[s]||(i[s]={}),t[n]&&t[n][s]&&cn(i[s],t[n][s],o));e[n]=i}}}return e}var fa=(e,t)=>cn(e,t,Gw);function xd(e){const t=J_(e),r=yS(e),n=mS(e),{fromPlainObject:i,toPlainObject:o}=pS(r),s={lexer:null,createLexer:a=>new Ad(a,s,s.lexer.structure),tokenize:Ai,parse:t,generate:n,walk:r,find:r.find,findLast:r.findLast,findAll:r.findAll,fromPlainObject:i,toPlainObject:o,fork(a){const l=fa({},e);return xd(typeof a=="function"?a(l,Object.assign):fa(l,a))}};return s.lexer=new Ad({generic:!0,types:e.types,atrules:e.atrules,properties:e.properties,node:e.node},s),s}var Yw=e=>xd(fa({},e)),Kw={generic:!0,types:{"absolute-size":"xx-small|x-small|small|medium|large|x-large|xx-large|xxx-large","alpha-value":"<number>|<percentage>","angle-percentage":"<angle>|<percentage>","angular-color-hint":"<angle-percentage>","angular-color-stop":"<color>&&<color-stop-angle>?","angular-color-stop-list":"[<angular-color-stop> [, <angular-color-hint>]?]# , <angular-color-stop>","animateable-feature":"scroll-position|contents|<custom-ident>",attachment:"scroll|fixed|local","attr()":"attr( <attr-name> <type-or-unit>? [, <attr-fallback>]? )","attr-matcher":"['~'|'|'|'^'|'$'|'*']? '='","attr-modifier":"i|s","attribute-selector":"'[' <wq-name> ']'|'[' <wq-name> <attr-matcher> [<string-token>|<ident-token>] <attr-modifier>? ']'","auto-repeat":"repeat( [auto-fill|auto-fit] , [<line-names>? <fixed-size>]+ <line-names>? )","auto-track-list":"[<line-names>? [<fixed-size>|<fixed-repeat>]]* <line-names>? <auto-repeat> [<line-names>? [<fixed-size>|<fixed-repeat>]]* <line-names>?","baseline-position":"[first|last]? baseline","basic-shape":"<inset()>|<circle()>|<ellipse()>|<polygon()>|<path()>","bg-image":"none|<image>","bg-layer":"<bg-image>||<bg-position> [/ <bg-size>]?||<repeat-style>||<attachment>||<box>||<box>","bg-position":"[[left|center|right|top|bottom|<length-percentage>]|[left|center|right|<length-percentage>] [top|center|bottom|<length-percentage>]|[center|[left|right] <length-percentage>?]&&[center|[top|bottom] <length-percentage>?]]","bg-size":"[<length-percentage>|auto]{1,2}|cover|contain","blur()":"blur( <length> )","blend-mode":"normal|multiply|screen|overlay|darken|lighten|color-dodge|color-burn|hard-light|soft-light|difference|exclusion|hue|saturation|color|luminosity",box:"border-box|padding-box|content-box","brightness()":"brightness( <number-percentage> )","calc()":"calc( <calc-sum> )","calc-sum":"<calc-product> [['+'|'-'] <calc-product>]*","calc-product":"<calc-value> ['*' <calc-value>|'/' <number>]*","calc-value":"<number>|<dimension>|<percentage>|( <calc-sum> )","cf-final-image":"<image>|<color>","cf-mixing-image":"<percentage>?&&<image>","circle()":"circle( [<shape-radius>]? [at <position>]? )","clamp()":"clamp( <calc-sum>#{3} )","class-selector":"'.' <ident-token>","clip-source":"<url>",color:"<rgb()>|<rgba()>|<hsl()>|<hsla()>|<hwb()>|<lab()>|<lch()>|<hex-color>|<named-color>|currentcolor|<deprecated-system-color>","color-stop":"<color-stop-length>|<color-stop-angle>","color-stop-angle":"<angle-percentage>{1,2}","color-stop-length":"<length-percentage>{1,2}","color-stop-list":"[<linear-color-stop> [, <linear-color-hint>]?]# , <linear-color-stop>",combinator:"'>'|'+'|'~'|['||']","common-lig-values":"[common-ligatures|no-common-ligatures]","compat-auto":"searchfield|textarea|push-button|slider-horizontal|checkbox|radio|square-button|menulist|listbox|meter|progress-bar|button","composite-style":"clear|copy|source-over|source-in|source-out|source-atop|destination-over|destination-in|destination-out|destination-atop|xor","compositing-operator":"add|subtract|intersect|exclude","compound-selector":"[<type-selector>? <subclass-selector>* [<pseudo-element-selector> <pseudo-class-selector>*]*]!","compound-selector-list":"<compound-selector>#","complex-selector":"<compound-selector> [<combinator>? <compound-selector>]*","complex-selector-list":"<complex-selector>#","conic-gradient()":"conic-gradient( [from <angle>]? [at <position>]? , <angular-color-stop-list> )","contextual-alt-values":"[contextual|no-contextual]","content-distribution":"space-between|space-around|space-evenly|stretch","content-list":"[<string>|contents|<image>|<counter>|<quote>|<target>|<leader()>|<attr()>]+","content-position":"center|start|end|flex-start|flex-end","content-replacement":"<image>","contrast()":"contrast( [<number-percentage>] )",counter:"<counter()>|<counters()>","counter()":"counter( <counter-name> , <counter-style>? )","counter-name":"<custom-ident>","counter-style":"<counter-style-name>|symbols( )","counter-style-name":"<custom-ident>","counters()":"counters( <counter-name> , <string> , <counter-style>? )","cross-fade()":"cross-fade( <cf-mixing-image> , <cf-final-image>? )","cubic-bezier-timing-function":"ease|ease-in|ease-out|ease-in-out|cubic-bezier( <number [0,1]> , <number> , <number [0,1]> , <number> )","deprecated-system-color":"ActiveBorder|ActiveCaption|AppWorkspace|Background|ButtonFace|ButtonHighlight|ButtonShadow|ButtonText|CaptionText|GrayText|Highlight|HighlightText|InactiveBorder|InactiveCaption|InactiveCaptionText|InfoBackground|InfoText|Menu|MenuText|Scrollbar|ThreeDDarkShadow|ThreeDFace|ThreeDHighlight|ThreeDLightShadow|ThreeDShadow|Window|WindowFrame|WindowText","discretionary-lig-values":"[discretionary-ligatures|no-discretionary-ligatures]","display-box":"contents|none","display-inside":"flow|flow-root|table|flex|grid|ruby","display-internal":"table-row-group|table-header-group|table-footer-group|table-row|table-cell|table-column-group|table-column|table-caption|ruby-base|ruby-text|ruby-base-container|ruby-text-container","display-legacy":"inline-block|inline-list-item|inline-table|inline-flex|inline-grid","display-listitem":"<display-outside>?&&[flow|flow-root]?&&list-item","display-outside":"block|inline|run-in","drop-shadow()":"drop-shadow( <length>{2,3} <color>? )","east-asian-variant-values":"[jis78|jis83|jis90|jis04|simplified|traditional]","east-asian-width-values":"[full-width|proportional-width]","element()":"element( <custom-ident> , [first|start|last|first-except]? )|element( <id-selector> )","ellipse()":"ellipse( [<shape-radius>{2}]? [at <position>]? )","ending-shape":"circle|ellipse","env()":"env( <custom-ident> , <declaration-value>? )","explicit-track-list":"[<line-names>? <track-size>]+ <line-names>?","family-name":"<string>|<custom-ident>+","feature-tag-value":"<string> [<integer>|on|off]?","feature-type":"@stylistic|@historical-forms|@styleset|@character-variant|@swash|@ornaments|@annotation","feature-value-block":"<feature-type> '{' <feature-value-declaration-list> '}'","feature-value-block-list":"<feature-value-block>+","feature-value-declaration":"<custom-ident> : <integer>+ ;","feature-value-declaration-list":"<feature-value-declaration>","feature-value-name":"<custom-ident>","fill-rule":"nonzero|evenodd","filter-function":"<blur()>|<brightness()>|<contrast()>|<drop-shadow()>|<grayscale()>|<hue-rotate()>|<invert()>|<opacity()>|<saturate()>|<sepia()>","filter-function-list":"[<filter-function>|<url>]+","final-bg-layer":"<'background-color'>||<bg-image>||<bg-position> [/ <bg-size>]?||<repeat-style>||<attachment>||<box>||<box>","fit-content()":"fit-content( [<length>|<percentage>] )","fixed-breadth":"<length-percentage>","fixed-repeat":"repeat( [<integer [1,∞]>] , [<line-names>? <fixed-size>]+ <line-names>? )","fixed-size":"<fixed-breadth>|minmax( <fixed-breadth> , <track-breadth> )|minmax( <inflexible-breadth> , <fixed-breadth> )","font-stretch-absolute":"normal|ultra-condensed|extra-condensed|condensed|semi-condensed|semi-expanded|expanded|extra-expanded|ultra-expanded|<percentage>","font-variant-css21":"[normal|small-caps]","font-weight-absolute":"normal|bold|<number [1,1000]>","frequency-percentage":"<frequency>|<percentage>","general-enclosed":"[<function-token> <any-value> )]|( <ident> <any-value> )","generic-family":"serif|sans-serif|cursive|fantasy|monospace|-apple-system","generic-name":"serif|sans-serif|cursive|fantasy|monospace","geometry-box":"<shape-box>|fill-box|stroke-box|view-box",gradient:"<linear-gradient()>|<repeating-linear-gradient()>|<radial-gradient()>|<repeating-radial-gradient()>|<conic-gradient()>|<repeating-conic-gradient()>|<-legacy-gradient>","grayscale()":"grayscale( <number-percentage> )","grid-line":"auto|<custom-ident>|[<integer>&&<custom-ident>?]|[span&&[<integer>||<custom-ident>]]","historical-lig-values":"[historical-ligatures|no-historical-ligatures]","hsl()":"hsl( <hue> <percentage> <percentage> [/ <alpha-value>]? )|hsl( <hue> , <percentage> , <percentage> , <alpha-value>? )","hsla()":"hsla( <hue> <percentage> <percentage> [/ <alpha-value>]? )|hsla( <hue> , <percentage> , <percentage> , <alpha-value>? )",hue:"<number>|<angle>","hue-rotate()":"hue-rotate( <angle> )","hwb()":"hwb( [<hue>|none] [<percentage>|none] [<percentage>|none] [/ [<alpha-value>|none]]? )",image:"<url>|<image()>|<image-set()>|<element()>|<paint()>|<cross-fade()>|<gradient>","image()":"image( <image-tags>? [<image-src>? , <color>?]! )","image-set()":"image-set( <image-set-option># )","image-set-option":"[<image>|<string>] [<resolution>||type( <string> )]","image-src":"<url>|<string>","image-tags":"ltr|rtl","inflexible-breadth":"<length>|<percentage>|min-content|max-content|auto","inset()":"inset( <length-percentage>{1,4} [round <'border-radius'>]? )","invert()":"invert( <number-percentage> )","keyframes-name":"<custom-ident>|<string>","keyframe-block":"<keyframe-selector># { <declaration-list> }","keyframe-block-list":"<keyframe-block>+","keyframe-selector":"from|to|<percentage>","layer()":"layer( <layer-name> )","layer-name":"<ident> ['.' <ident>]*","leader()":"leader( <leader-type> )","leader-type":"dotted|solid|space|<string>","length-percentage":"<length>|<percentage>","line-names":"'[' <custom-ident>* ']'","line-name-list":"[<line-names>|<name-repeat>]+","line-style":"none|hidden|dotted|dashed|solid|double|groove|ridge|inset|outset","line-width":"<length>|thin|medium|thick","linear-color-hint":"<length-percentage>","linear-color-stop":"<color> <color-stop-length>?","linear-gradient()":"linear-gradient( [<angle>|to <side-or-corner>]? , <color-stop-list> )","mask-layer":"<mask-reference>||<position> [/ <bg-size>]?||<repeat-style>||<geometry-box>||[<geometry-box>|no-clip]||<compositing-operator>||<masking-mode>","mask-position":"[<length-percentage>|left|center|right] [<length-percentage>|top|center|bottom]?","mask-reference":"none|<image>|<mask-source>","mask-source":"<url>","masking-mode":"alpha|luminance|match-source","matrix()":"matrix( <number>#{6} )","matrix3d()":"matrix3d( <number>#{16} )","max()":"max( <calc-sum># )","media-and":"<media-in-parens> [and <media-in-parens>]+","media-condition":"<media-not>|<media-and>|<media-or>|<media-in-parens>","media-condition-without-or":"<media-not>|<media-and>|<media-in-parens>","media-feature":"( [<mf-plain>|<mf-boolean>|<mf-range>] )","media-in-parens":"( <media-condition> )|<media-feature>|<general-enclosed>","media-not":"not <media-in-parens>","media-or":"<media-in-parens> [or <media-in-parens>]+","media-query":"<media-condition>|[not|only]? <media-type> [and <media-condition-without-or>]?","media-query-list":"<media-query>#","media-type":"<ident>","mf-boolean":"<mf-name>","mf-name":"<ident>","mf-plain":"<mf-name> : <mf-value>","mf-range":"<mf-name> ['<'|'>']? '='? <mf-value>|<mf-value> ['<'|'>']? '='? <mf-name>|<mf-value> '<' '='? <mf-name> '<' '='? <mf-value>|<mf-value> '>' '='? <mf-name> '>' '='? <mf-value>","mf-value":"<number>|<dimension>|<ident>|<ratio>","min()":"min( <calc-sum># )","minmax()":"minmax( [<length>|<percentage>|min-content|max-content|auto] , [<length>|<percentage>|<flex>|min-content|max-content|auto] )","name-repeat":"repeat( [<integer [1,∞]>|auto-fill] , <line-names>+ )","named-color":"transparent|aliceblue|antiquewhite|aqua|aquamarine|azure|beige|bisque|black|blanchedalmond|blue|blueviolet|brown|burlywood|cadetblue|chartreuse|chocolate|coral|cornflowerblue|cornsilk|crimson|cyan|darkblue|darkcyan|darkgoldenrod|darkgray|darkgreen|darkgrey|darkkhaki|darkmagenta|darkolivegreen|darkorange|darkorchid|darkred|darksalmon|darkseagreen|darkslateblue|darkslategray|darkslategrey|darkturquoise|darkviolet|deeppink|deepskyblue|dimgray|dimgrey|dodgerblue|firebrick|floralwhite|forestgreen|fuchsia|gainsboro|ghostwhite|gold|goldenrod|gray|green|greenyellow|grey|honeydew|hotpink|indianred|indigo|ivory|khaki|lavender|lavenderblush|lawngreen|lemonchiffon|lightblue|lightcoral|lightcyan|lightgoldenrodyellow|lightgray|lightgreen|lightgrey|lightpink|lightsalmon|lightseagreen|lightskyblue|lightslategray|lightslategrey|lightsteelblue|lightyellow|lime|limegreen|linen|magenta|maroon|mediumaquamarine|mediumblue|mediumorchid|mediumpurple|mediumseagreen|mediumslateblue|mediumspringgreen|mediumturquoise|mediumvioletred|midnightblue|mintcream|mistyrose|moccasin|navajowhite|navy|oldlace|olive|olivedrab|orange|orangered|orchid|palegoldenrod|palegreen|paleturquoise|palevioletred|papayawhip|peachpuff|peru|pink|plum|powderblue|purple|rebeccapurple|red|rosybrown|royalblue|saddlebrown|salmon|sandybrown|seagreen|seashell|sienna|silver|skyblue|slateblue|slategray|slategrey|snow|springgreen|steelblue|tan|teal|thistle|tomato|turquoise|violet|wheat|white|whitesmoke|yellow|yellowgreen|<-non-standard-color>","namespace-prefix":"<ident>","ns-prefix":"[<ident-token>|'*']? '|'","number-percentage":"<number>|<percentage>","numeric-figure-values":"[lining-nums|oldstyle-nums]","numeric-fraction-values":"[diagonal-fractions|stacked-fractions]","numeric-spacing-values":"[proportional-nums|tabular-nums]",nth:"<an-plus-b>|even|odd","opacity()":"opacity( [<number-percentage>] )","overflow-position":"unsafe|safe","outline-radius":"<length>|<percentage>","page-body":"<declaration>? [; <page-body>]?|<page-margin-box> <page-body>","page-margin-box":"<page-margin-box-type> '{' <declaration-list> '}'","page-margin-box-type":"@top-left-corner|@top-left|@top-center|@top-right|@top-right-corner|@bottom-left-corner|@bottom-left|@bottom-center|@bottom-right|@bottom-right-corner|@left-top|@left-middle|@left-bottom|@right-top|@right-middle|@right-bottom","page-selector-list":"[<page-selector>#]?","page-selector":"<pseudo-page>+|<ident> <pseudo-page>*","page-size":"A5|A4|A3|B5|B4|JIS-B5|JIS-B4|letter|legal|ledger","path()":"path( [<fill-rule> ,]? <string> )","paint()":"paint( <ident> , <declaration-value>? )","perspective()":"perspective( <length> )","polygon()":"polygon( <fill-rule>? , [<length-percentage> <length-percentage>]# )",position:"[[left|center|right]||[top|center|bottom]|[left|center|right|<length-percentage>] [top|center|bottom|<length-percentage>]?|[[left|right] <length-percentage>]&&[[top|bottom] <length-percentage>]]","pseudo-class-selector":"':' <ident-token>|':' <function-token> <any-value> ')'","pseudo-element-selector":"':' <pseudo-class-selector>","pseudo-page":": [left|right|first|blank]",quote:"open-quote|close-quote|no-open-quote|no-close-quote","radial-gradient()":"radial-gradient( [<ending-shape>||<size>]? [at <position>]? , <color-stop-list> )","relative-selector":"<combinator>? <complex-selector>","relative-selector-list":"<relative-selector>#","relative-size":"larger|smaller","repeat-style":"repeat-x|repeat-y|[repeat|space|round|no-repeat]{1,2}","repeating-conic-gradient()":"repeating-conic-gradient( [from <angle>]? [at <position>]? , <angular-color-stop-list> )","repeating-linear-gradient()":"repeating-linear-gradient( [<angle>|to <side-or-corner>]? , <color-stop-list> )","repeating-radial-gradient()":"repeating-radial-gradient( [<ending-shape>||<size>]? [at <position>]? , <color-stop-list> )","rgb()":"rgb( <percentage>{3} [/ <alpha-value>]? )|rgb( <number>{3} [/ <alpha-value>]? )|rgb( <percentage>#{3} , <alpha-value>? )|rgb( <number>#{3} , <alpha-value>? )","rgba()":"rgba( <percentage>{3} [/ <alpha-value>]? )|rgba( <number>{3} [/ <alpha-value>]? )|rgba( <percentage>#{3} , <alpha-value>? )|rgba( <number>#{3} , <alpha-value>? )","rotate()":"rotate( [<angle>|<zero>] )","rotate3d()":"rotate3d( <number> , <number> , <number> , [<angle>|<zero>] )","rotateX()":"rotateX( [<angle>|<zero>] )","rotateY()":"rotateY( [<angle>|<zero>] )","rotateZ()":"rotateZ( [<angle>|<zero>] )","saturate()":"saturate( <number-percentage> )","scale()":"scale( <number> , <number>? )","scale3d()":"scale3d( <number> , <number> , <number> )","scaleX()":"scaleX( <number> )","scaleY()":"scaleY( <number> )","scaleZ()":"scaleZ( <number> )","self-position":"center|start|end|self-start|self-end|flex-start|flex-end","shape-radius":"<length-percentage>|closest-side|farthest-side","skew()":"skew( [<angle>|<zero>] , [<angle>|<zero>]? )","skewX()":"skewX( [<angle>|<zero>] )","skewY()":"skewY( [<angle>|<zero>] )","sepia()":"sepia( <number-percentage> )",shadow:"inset?&&<length>{2,4}&&<color>?","shadow-t":"[<length>{2,3}&&<color>?]",shape:"rect( <top> , <right> , <bottom> , <left> )|rect( <top> <right> <bottom> <left> )","shape-box":"<box>|margin-box","side-or-corner":"[left|right]||[top|bottom]","single-animation":"<time>||<easing-function>||<time>||<single-animation-iteration-count>||<single-animation-direction>||<single-animation-fill-mode>||<single-animation-play-state>||[none|<keyframes-name>]","single-animation-direction":"normal|reverse|alternate|alternate-reverse","single-animation-fill-mode":"none|forwards|backwards|both","single-animation-iteration-count":"infinite|<number>","single-animation-play-state":"running|paused","single-animation-timeline":"auto|none|<timeline-name>","single-transition":"[none|<single-transition-property>]||<time>||<easing-function>||<time>","single-transition-property":"all|<custom-ident>",size:"closest-side|farthest-side|closest-corner|farthest-corner|<length>|<length-percentage>{2}","step-position":"jump-start|jump-end|jump-none|jump-both|start|end","step-timing-function":"step-start|step-end|steps( <integer> [, <step-position>]? )","subclass-selector":"<id-selector>|<class-selector>|<attribute-selector>|<pseudo-class-selector>","supports-condition":"not <supports-in-parens>|<supports-in-parens> [and <supports-in-parens>]*|<supports-in-parens> [or <supports-in-parens>]*","supports-in-parens":"( <supports-condition> )|<supports-feature>|<general-enclosed>","supports-feature":"<supports-decl>|<supports-selector-fn>","supports-decl":"( <declaration> )","supports-selector-fn":"selector( <complex-selector> )",symbol:"<string>|<image>|<custom-ident>",target:"<target-counter()>|<target-counters()>|<target-text()>","target-counter()":"target-counter( [<string>|<url>] , <custom-ident> , <counter-style>? )","target-counters()":"target-counters( [<string>|<url>] , <custom-ident> , <string> , <counter-style>? )","target-text()":"target-text( [<string>|<url>] , [content|before|after|first-letter]? )","time-percentage":"<time>|<percentage>","timeline-name":"<custom-ident>|<string>","easing-function":"linear|<cubic-bezier-timing-function>|<step-timing-function>","track-breadth":"<length-percentage>|<flex>|min-content|max-content|auto","track-list":"[<line-names>? [<track-size>|<track-repeat>]]+ <line-names>?","track-repeat":"repeat( [<integer [1,∞]>] , [<line-names>? <track-size>]+ <line-names>? )","track-size":"<track-breadth>|minmax( <inflexible-breadth> , <track-breadth> )|fit-content( [<length>|<percentage>] )","transform-function":"<matrix()>|<translate()>|<translateX()>|<translateY()>|<scale()>|<scaleX()>|<scaleY()>|<rotate()>|<skew()>|<skewX()>|<skewY()>|<matrix3d()>|<translate3d()>|<translateZ()>|<scale3d()>|<scaleZ()>|<rotate3d()>|<rotateX()>|<rotateY()>|<rotateZ()>|<perspective()>","transform-list":"<transform-function>+","translate()":"translate( <length-percentage> , <length-percentage>? )","translate3d()":"translate3d( <length-percentage> , <length-percentage> , <length> )","translateX()":"translateX( <length-percentage> )","translateY()":"translateY( <length-percentage> )","translateZ()":"translateZ( <length> )","type-or-unit":"string|color|url|integer|number|length|angle|time|frequency|cap|ch|em|ex|ic|lh|rlh|rem|vb|vi|vw|vh|vmin|vmax|mm|Q|cm|in|pt|pc|px|deg|grad|rad|turn|ms|s|Hz|kHz|%","type-selector":"<wq-name>|<ns-prefix>? '*'","var()":"var( <custom-property-name> , <declaration-value>? )","viewport-length":"auto|<length-percentage>","visual-box":"content-box|padding-box|border-box","wq-name":"<ns-prefix>? <ident-token>","-legacy-gradient":"<-webkit-gradient()>|<-legacy-linear-gradient>|<-legacy-repeating-linear-gradient>|<-legacy-radial-gradient>|<-legacy-repeating-radial-gradient>","-legacy-linear-gradient":"-moz-linear-gradient( <-legacy-linear-gradient-arguments> )|-webkit-linear-gradient( <-legacy-linear-gradient-arguments> )|-o-linear-gradient( <-legacy-linear-gradient-arguments> )","-legacy-repeating-linear-gradient":"-moz-repeating-linear-gradient( <-legacy-linear-gradient-arguments> )|-webkit-repeating-linear-gradient( <-legacy-linear-gradient-arguments> )|-o-repeating-linear-gradient( <-legacy-linear-gradient-arguments> )","-legacy-linear-gradient-arguments":"[<angle>|<side-or-corner>]? , <color-stop-list>","-legacy-radial-gradient":"-moz-radial-gradient( <-legacy-radial-gradient-arguments> )|-webkit-radial-gradient( <-legacy-radial-gradient-arguments> )|-o-radial-gradient( <-legacy-radial-gradient-arguments> )","-legacy-repeating-radial-gradient":"-moz-repeating-radial-gradient( <-legacy-radial-gradient-arguments> )|-webkit-repeating-radial-gradient( <-legacy-radial-gradient-arguments> )|-o-repeating-radial-gradient( <-legacy-radial-gradient-arguments> )","-legacy-radial-gradient-arguments":"[<position> ,]? [[[<-legacy-radial-gradient-shape>||<-legacy-radial-gradient-size>]|[<length>|<percentage>]{2}] ,]? <color-stop-list>","-legacy-radial-gradient-size":"closest-side|closest-corner|farthest-side|farthest-corner|contain|cover","-legacy-radial-gradient-shape":"circle|ellipse","-non-standard-font":"-apple-system-body|-apple-system-headline|-apple-system-subheadline|-apple-system-caption1|-apple-system-caption2|-apple-system-footnote|-apple-system-short-body|-apple-system-short-headline|-apple-system-short-subheadline|-apple-system-short-caption1|-apple-system-short-footnote|-apple-system-tall-body","-non-standard-color":"-moz-ButtonDefault|-moz-ButtonHoverFace|-moz-ButtonHoverText|-moz-CellHighlight|-moz-CellHighlightText|-moz-Combobox|-moz-ComboboxText|-moz-Dialog|-moz-DialogText|-moz-dragtargetzone|-moz-EvenTreeRow|-moz-Field|-moz-FieldText|-moz-html-CellHighlight|-moz-html-CellHighlightText|-moz-mac-accentdarkestshadow|-moz-mac-accentdarkshadow|-moz-mac-accentface|-moz-mac-accentlightesthighlight|-moz-mac-accentlightshadow|-moz-mac-accentregularhighlight|-moz-mac-accentregularshadow|-moz-mac-chrome-active|-moz-mac-chrome-inactive|-moz-mac-focusring|-moz-mac-menuselect|-moz-mac-menushadow|-moz-mac-menutextselect|-moz-MenuHover|-moz-MenuHoverText|-moz-MenuBarText|-moz-MenuBarHoverText|-moz-nativehyperlinktext|-moz-OddTreeRow|-moz-win-communicationstext|-moz-win-mediatext|-moz-activehyperlinktext|-moz-default-background-color|-moz-default-color|-moz-hyperlinktext|-moz-visitedhyperlinktext|-webkit-activelink|-webkit-focus-ring-color|-webkit-link|-webkit-text","-non-standard-image-rendering":"optimize-contrast|-moz-crisp-edges|-o-crisp-edges|-webkit-optimize-contrast","-non-standard-overflow":"-moz-scrollbars-none|-moz-scrollbars-horizontal|-moz-scrollbars-vertical|-moz-hidden-unscrollable","-non-standard-width":"fill-available|min-intrinsic|intrinsic|-moz-available|-moz-fit-content|-moz-min-content|-moz-max-content|-webkit-min-content|-webkit-max-content","-webkit-gradient()":"-webkit-gradient( <-webkit-gradient-type> , <-webkit-gradient-point> [, <-webkit-gradient-point>|, <-webkit-gradient-radius> , <-webkit-gradient-point>] [, <-webkit-gradient-radius>]? [, <-webkit-gradient-color-stop>]* )","-webkit-gradient-color-stop":"from( <color> )|color-stop( [<number-zero-one>|<percentage>] , <color> )|to( <color> )","-webkit-gradient-point":"[left|center|right|<length-percentage>] [top|center|bottom|<length-percentage>]","-webkit-gradient-radius":"<length>|<percentage>","-webkit-gradient-type":"linear|radial","-webkit-mask-box-repeat":"repeat|stretch|round","-webkit-mask-clip-style":"border|border-box|padding|padding-box|content|content-box|text","-ms-filter-function-list":"<-ms-filter-function>+","-ms-filter-function":"<-ms-filter-function-progid>|<-ms-filter-function-legacy>","-ms-filter-function-progid":"'progid:' [<ident-token> '.']* [<ident-token>|<function-token> <any-value>? )]","-ms-filter-function-legacy":"<ident-token>|<function-token> <any-value>? )","-ms-filter":"<string>",age:"child|young|old","attr-name":"<wq-name>","attr-fallback":"<any-value>","bg-clip":"<box>|border|text","border-radius":"<length-percentage>{1,2}",bottom:"<length>|auto","generic-voice":"[<age>? <gender> <integer>?]",gender:"male|female|neutral","lab()":"lab( [<percentage>|<number>|none] [<percentage>|<number>|none] [<percentage>|<number>|none] [/ [<alpha-value>|none]]? )","lch()":"lch( [<percentage>|<number>|none] [<percentage>|<number>|none] [<hue>|none] [/ [<alpha-value>|none]]? )",left:"<length>|auto","mask-image":"<mask-reference>#",paint:"none|<color>|<url> [none|<color>]?|context-fill|context-stroke",ratio:"<number [0,∞]> [/ <number [0,∞]>]?","reversed-counter-name":"reversed( <counter-name> )",right:"<length>|auto","svg-length":"<percentage>|<length>|<number>","svg-writing-mode":"lr-tb|rl-tb|tb-rl|lr|rl|tb",top:"<length>|auto","track-group":"'(' [<string>* <track-minmax> <string>*]+ ')' ['[' <positive-integer> ']']?|<track-minmax>","track-list-v0":"[<string>* <track-group> <string>*]+|none","track-minmax":"minmax( <track-breadth> , <track-breadth> )|auto|<track-breadth>|fit-content",x:"<number>",y:"<number>",declaration:"<ident-token> : <declaration-value>? ['!' important]?","declaration-list":"[<declaration>? ';']* <declaration>?",url:"url( <string> <url-modifier>* )|<url-token>","url-modifier":"<ident>|<function-token> <any-value> )","number-zero-one":"<number [0,1]>","number-one-or-greater":"<number [1,∞]>","positive-integer":"<integer [0,∞]>","-non-standard-display":"-ms-inline-flexbox|-ms-grid|-ms-inline-grid|-webkit-flex|-webkit-inline-flex|-webkit-box|-webkit-inline-box|-moz-inline-stack|-moz-box|-moz-inline-box"},properties:{"--*":"<declaration-value>","-ms-accelerator":"false|true","-ms-block-progression":"tb|rl|bt|lr","-ms-content-zoom-chaining":"none|chained","-ms-content-zooming":"none|zoom","-ms-content-zoom-limit":"<'-ms-content-zoom-limit-min'> <'-ms-content-zoom-limit-max'>","-ms-content-zoom-limit-max":"<percentage>","-ms-content-zoom-limit-min":"<percentage>","-ms-content-zoom-snap":"<'-ms-content-zoom-snap-type'>||<'-ms-content-zoom-snap-points'>","-ms-content-zoom-snap-points":"snapInterval( <percentage> , <percentage> )|snapList( <percentage># )","-ms-content-zoom-snap-type":"none|proximity|mandatory","-ms-filter":"<string>","-ms-flow-from":"[none|<custom-ident>]#","-ms-flow-into":"[none|<custom-ident>]#","-ms-grid-columns":"none|<track-list>|<auto-track-list>","-ms-grid-rows":"none|<track-list>|<auto-track-list>","-ms-high-contrast-adjust":"auto|none","-ms-hyphenate-limit-chars":"auto|<integer>{1,3}","-ms-hyphenate-limit-lines":"no-limit|<integer>","-ms-hyphenate-limit-zone":"<percentage>|<length>","-ms-ime-align":"auto|after","-ms-overflow-style":"auto|none|scrollbar|-ms-autohiding-scrollbar","-ms-scrollbar-3dlight-color":"<color>","-ms-scrollbar-arrow-color":"<color>","-ms-scrollbar-base-color":"<color>","-ms-scrollbar-darkshadow-color":"<color>","-ms-scrollbar-face-color":"<color>","-ms-scrollbar-highlight-color":"<color>","-ms-scrollbar-shadow-color":"<color>","-ms-scrollbar-track-color":"<color>","-ms-scroll-chaining":"chained|none","-ms-scroll-limit":"<'-ms-scroll-limit-x-min'> <'-ms-scroll-limit-y-min'> <'-ms-scroll-limit-x-max'> <'-ms-scroll-limit-y-max'>","-ms-scroll-limit-x-max":"auto|<length>","-ms-scroll-limit-x-min":"<length>","-ms-scroll-limit-y-max":"auto|<length>","-ms-scroll-limit-y-min":"<length>","-ms-scroll-rails":"none|railed","-ms-scroll-snap-points-x":"snapInterval( <length-percentage> , <length-percentage> )|snapList( <length-percentage># )","-ms-scroll-snap-points-y":"snapInterval( <length-percentage> , <length-percentage> )|snapList( <length-percentage># )","-ms-scroll-snap-type":"none|proximity|mandatory","-ms-scroll-snap-x":"<'-ms-scroll-snap-type'> <'-ms-scroll-snap-points-x'>","-ms-scroll-snap-y":"<'-ms-scroll-snap-type'> <'-ms-scroll-snap-points-y'>","-ms-scroll-translation":"none|vertical-to-horizontal","-ms-text-autospace":"none|ideograph-alpha|ideograph-numeric|ideograph-parenthesis|ideograph-space","-ms-touch-select":"grippers|none","-ms-user-select":"none|element|text","-ms-wrap-flow":"auto|both|start|end|maximum|clear","-ms-wrap-margin":"<length>","-ms-wrap-through":"wrap|none","-moz-appearance":"none|button|button-arrow-down|button-arrow-next|button-arrow-previous|button-arrow-up|button-bevel|button-focus|caret|checkbox|checkbox-container|checkbox-label|checkmenuitem|dualbutton|groupbox|listbox|listitem|menuarrow|menubar|menucheckbox|menuimage|menuitem|menuitemtext|menulist|menulist-button|menulist-text|menulist-textfield|menupopup|menuradio|menuseparator|meterbar|meterchunk|progressbar|progressbar-vertical|progresschunk|progresschunk-vertical|radio|radio-container|radio-label|radiomenuitem|range|range-thumb|resizer|resizerpanel|scale-horizontal|scalethumbend|scalethumb-horizontal|scalethumbstart|scalethumbtick|scalethumb-vertical|scale-vertical|scrollbarbutton-down|scrollbarbutton-left|scrollbarbutton-right|scrollbarbutton-up|scrollbarthumb-horizontal|scrollbarthumb-vertical|scrollbartrack-horizontal|scrollbartrack-vertical|searchfield|separator|sheet|spinner|spinner-downbutton|spinner-textfield|spinner-upbutton|splitter|statusbar|statusbarpanel|tab|tabpanel|tabpanels|tab-scroll-arrow-back|tab-scroll-arrow-forward|textfield|textfield-multiline|toolbar|toolbarbutton|toolbarbutton-dropdown|toolbargripper|toolbox|tooltip|treeheader|treeheadercell|treeheadersortarrow|treeitem|treeline|treetwisty|treetwistyopen|treeview|-moz-mac-unified-toolbar|-moz-win-borderless-glass|-moz-win-browsertabbar-toolbox|-moz-win-communicationstext|-moz-win-communications-toolbox|-moz-win-exclude-glass|-moz-win-glass|-moz-win-mediatext|-moz-win-media-toolbox|-moz-window-button-box|-moz-window-button-box-maximized|-moz-window-button-close|-moz-window-button-maximize|-moz-window-button-minimize|-moz-window-button-restore|-moz-window-frame-bottom|-moz-window-frame-left|-moz-window-frame-right|-moz-window-titlebar|-moz-window-titlebar-maximized","-moz-binding":"<url>|none","-moz-border-bottom-colors":"<color>+|none","-moz-border-left-colors":"<color>+|none","-moz-border-right-colors":"<color>+|none","-moz-border-top-colors":"<color>+|none","-moz-context-properties":"none|[fill|fill-opacity|stroke|stroke-opacity]#","-moz-float-edge":"border-box|content-box|margin-box|padding-box","-moz-force-broken-image-icon":"0|1","-moz-image-region":"<shape>|auto","-moz-orient":"inline|block|horizontal|vertical","-moz-outline-radius":"<outline-radius>{1,4} [/ <outline-radius>{1,4}]?","-moz-outline-radius-bottomleft":"<outline-radius>","-moz-outline-radius-bottomright":"<outline-radius>","-moz-outline-radius-topleft":"<outline-radius>","-moz-outline-radius-topright":"<outline-radius>","-moz-stack-sizing":"ignore|stretch-to-fit","-moz-text-blink":"none|blink","-moz-user-focus":"ignore|normal|select-after|select-before|select-menu|select-same|select-all|none","-moz-user-input":"auto|none|enabled|disabled","-moz-user-modify":"read-only|read-write|write-only","-moz-window-dragging":"drag|no-drag","-moz-window-shadow":"default|menu|tooltip|sheet|none","-webkit-appearance":"none|button|button-bevel|caps-lock-indicator|caret|checkbox|default-button|inner-spin-button|listbox|listitem|media-controls-background|media-controls-fullscreen-background|media-current-time-display|media-enter-fullscreen-button|media-exit-fullscreen-button|media-fullscreen-button|media-mute-button|media-overlay-play-button|media-play-button|media-seek-back-button|media-seek-forward-button|media-slider|media-sliderthumb|media-time-remaining-display|media-toggle-closed-captions-button|media-volume-slider|media-volume-slider-container|media-volume-sliderthumb|menulist|menulist-button|menulist-text|menulist-textfield|meter|progress-bar|progress-bar-value|push-button|radio|scrollbarbutton-down|scrollbarbutton-left|scrollbarbutton-right|scrollbarbutton-up|scrollbargripper-horizontal|scrollbargripper-vertical|scrollbarthumb-horizontal|scrollbarthumb-vertical|scrollbartrack-horizontal|scrollbartrack-vertical|searchfield|searchfield-cancel-button|searchfield-decoration|searchfield-results-button|searchfield-results-decoration|slider-horizontal|slider-vertical|sliderthumb-horizontal|sliderthumb-vertical|square-button|textarea|textfield|-apple-pay-button","-webkit-border-before":"<'border-width'>||<'border-style'>||<color>","-webkit-border-before-color":"<color>","-webkit-border-before-style":"<'border-style'>","-webkit-border-before-width":"<'border-width'>","-webkit-box-reflect":"[above|below|right|left]? <length>? <image>?","-webkit-line-clamp":"none|<integer>","-webkit-mask":"[<mask-reference>||<position> [/ <bg-size>]?||<repeat-style>||[<box>|border|padding|content|text]||[<box>|border|padding|content]]#","-webkit-mask-attachment":"<attachment>#","-webkit-mask-clip":"[<box>|border|padding|content|text]#","-webkit-mask-composite":"<composite-style>#","-webkit-mask-image":"<mask-reference>#","-webkit-mask-origin":"[<box>|border|padding|content]#","-webkit-mask-position":"<position>#","-webkit-mask-position-x":"[<length-percentage>|left|center|right]#","-webkit-mask-position-y":"[<length-percentage>|top|center|bottom]#","-webkit-mask-repeat":"<repeat-style>#","-webkit-mask-repeat-x":"repeat|no-repeat|space|round","-webkit-mask-repeat-y":"repeat|no-repeat|space|round","-webkit-mask-size":"<bg-size>#","-webkit-overflow-scrolling":"auto|touch","-webkit-tap-highlight-color":"<color>","-webkit-text-fill-color":"<color>","-webkit-text-stroke":"<length>||<color>","-webkit-text-stroke-color":"<color>","-webkit-text-stroke-width":"<length>","-webkit-touch-callout":"default|none","-webkit-user-modify":"read-only|read-write|read-write-plaintext-only","accent-color":"auto|<color>","align-content":"normal|<baseline-position>|<content-distribution>|<overflow-position>? <content-position>","align-items":"normal|stretch|<baseline-position>|[<overflow-position>? <self-position>]","align-self":"auto|normal|stretch|<baseline-position>|<overflow-position>? <self-position>","align-tracks":"[normal|<baseline-position>|<content-distribution>|<overflow-position>? <content-position>]#",all:"initial|inherit|unset|revert|revert-layer",animation:"<single-animation>#","animation-delay":"<time>#","animation-direction":"<single-animation-direction>#","animation-duration":"<time>#","animation-fill-mode":"<single-animation-fill-mode>#","animation-iteration-count":"<single-animation-iteration-count>#","animation-name":"[none|<keyframes-name>]#","animation-play-state":"<single-animation-play-state>#","animation-timing-function":"<easing-function>#","animation-timeline":"<single-animation-timeline>#",appearance:"none|auto|textfield|menulist-button|<compat-auto>","aspect-ratio":"auto|<ratio>",azimuth:"<angle>|[[left-side|far-left|left|center-left|center|center-right|right|far-right|right-side]||behind]|leftwards|rightwards","backdrop-filter":"none|<filter-function-list>","backface-visibility":"visible|hidden",background:"[<bg-layer> ,]* <final-bg-layer>","background-attachment":"<attachment>#","background-blend-mode":"<blend-mode>#","background-clip":"<bg-clip>#","background-color":"<color>","background-image":"<bg-image>#","background-origin":"<box>#","background-position":"<bg-position>#","background-position-x":"[center|[[left|right|x-start|x-end]? <length-percentage>?]!]#","background-position-y":"[center|[[top|bottom|y-start|y-end]? <length-percentage>?]!]#","background-repeat":"<repeat-style>#","background-size":"<bg-size>#","block-overflow":"clip|ellipsis|<string>","block-size":"<'width'>",border:"<line-width>||<line-style>||<color>","border-block":"<'border-top-width'>||<'border-top-style'>||<color>","border-block-color":"<'border-top-color'>{1,2}","border-block-style":"<'border-top-style'>","border-block-width":"<'border-top-width'>","border-block-end":"<'border-top-width'>||<'border-top-style'>||<color>","border-block-end-color":"<'border-top-color'>","border-block-end-style":"<'border-top-style'>","border-block-end-width":"<'border-top-width'>","border-block-start":"<'border-top-width'>||<'border-top-style'>||<color>","border-block-start-color":"<'border-top-color'>","border-block-start-style":"<'border-top-style'>","border-block-start-width":"<'border-top-width'>","border-bottom":"<line-width>||<line-style>||<color>","border-bottom-color":"<'border-top-color'>","border-bottom-left-radius":"<length-percentage>{1,2}","border-bottom-right-radius":"<length-percentage>{1,2}","border-bottom-style":"<line-style>","border-bottom-width":"<line-width>","border-collapse":"collapse|separate","border-color":"<color>{1,4}","border-end-end-radius":"<length-percentage>{1,2}","border-end-start-radius":"<length-percentage>{1,2}","border-image":"<'border-image-source'>||<'border-image-slice'> [/ <'border-image-width'>|/ <'border-image-width'>? / <'border-image-outset'>]?||<'border-image-repeat'>","border-image-outset":"[<length>|<number>]{1,4}","border-image-repeat":"[stretch|repeat|round|space]{1,2}","border-image-slice":"<number-percentage>{1,4}&&fill?","border-image-source":"none|<image>","border-image-width":"[<length-percentage>|<number>|auto]{1,4}","border-inline":"<'border-top-width'>||<'border-top-style'>||<color>","border-inline-end":"<'border-top-width'>||<'border-top-style'>||<color>","border-inline-color":"<'border-top-color'>{1,2}","border-inline-style":"<'border-top-style'>","border-inline-width":"<'border-top-width'>","border-inline-end-color":"<'border-top-color'>","border-inline-end-style":"<'border-top-style'>","border-inline-end-width":"<'border-top-width'>","border-inline-start":"<'border-top-width'>||<'border-top-style'>||<color>","border-inline-start-color":"<'border-top-color'>","border-inline-start-style":"<'border-top-style'>","border-inline-start-width":"<'border-top-width'>","border-left":"<line-width>||<line-style>||<color>","border-left-color":"<color>","border-left-style":"<line-style>","border-left-width":"<line-width>","border-radius":"<length-percentage>{1,4} [/ <length-percentage>{1,4}]?","border-right":"<line-width>||<line-style>||<color>","border-right-color":"<color>","border-right-style":"<line-style>","border-right-width":"<line-width>","border-spacing":"<length> <length>?","border-start-end-radius":"<length-percentage>{1,2}","border-start-start-radius":"<length-percentage>{1,2}","border-style":"<line-style>{1,4}","border-top":"<line-width>||<line-style>||<color>","border-top-color":"<color>","border-top-left-radius":"<length-percentage>{1,2}","border-top-right-radius":"<length-percentage>{1,2}","border-top-style":"<line-style>","border-top-width":"<line-width>","border-width":"<line-width>{1,4}",bottom:"<length>|<percentage>|auto","box-align":"start|center|end|baseline|stretch","box-decoration-break":"slice|clone","box-direction":"normal|reverse|inherit","box-flex":"<number>","box-flex-group":"<integer>","box-lines":"single|multiple","box-ordinal-group":"<integer>","box-orient":"horizontal|vertical|inline-axis|block-axis|inherit","box-pack":"start|center|end|justify","box-shadow":"none|<shadow>#","box-sizing":"content-box|border-box","break-after":"auto|avoid|always|all|avoid-page|page|left|right|recto|verso|avoid-column|column|avoid-region|region","break-before":"auto|avoid|always|all|avoid-page|page|left|right|recto|verso|avoid-column|column|avoid-region|region","break-inside":"auto|avoid|avoid-page|avoid-column|avoid-region","caption-side":"top|bottom|block-start|block-end|inline-start|inline-end","caret-color":"auto|<color>",clear:"none|left|right|both|inline-start|inline-end",clip:"<shape>|auto","clip-path":"<clip-source>|[<basic-shape>||<geometry-box>]|none",color:"<color>","print-color-adjust":"economy|exact","color-scheme":"normal|[light|dark|<custom-ident>]+&&only?","column-count":"<integer>|auto","column-fill":"auto|balance|balance-all","column-gap":"normal|<length-percentage>","column-rule":"<'column-rule-width'>||<'column-rule-style'>||<'column-rule-color'>","column-rule-color":"<color>","column-rule-style":"<'border-style'>","column-rule-width":"<'border-width'>","column-span":"none|all","column-width":"<length>|auto",columns:"<'column-width'>||<'column-count'>",contain:"none|strict|content|[size||layout||style||paint]",content:"normal|none|[<content-replacement>|<content-list>] [/ [<string>|<counter>]+]?","content-visibility":"visible|auto|hidden","counter-increment":"[<counter-name> <integer>?]+|none","counter-reset":"[<counter-name> <integer>?|<reversed-counter-name> <integer>?]+|none","counter-set":"[<counter-name> <integer>?]+|none",cursor:"[[<url> [<x> <y>]? ,]* [auto|default|none|context-menu|help|pointer|progress|wait|cell|crosshair|text|vertical-text|alias|copy|move|no-drop|not-allowed|e-resize|n-resize|ne-resize|nw-resize|s-resize|se-resize|sw-resize|w-resize|ew-resize|ns-resize|nesw-resize|nwse-resize|col-resize|row-resize|all-scroll|zoom-in|zoom-out|grab|grabbing|hand|-webkit-grab|-webkit-grabbing|-webkit-zoom-in|-webkit-zoom-out|-moz-grab|-moz-grabbing|-moz-zoom-in|-moz-zoom-out]]",direction:"ltr|rtl",display:"[<display-outside>||<display-inside>]|<display-listitem>|<display-internal>|<display-box>|<display-legacy>|<-non-standard-display>","empty-cells":"show|hide",filter:"none|<filter-function-list>|<-ms-filter-function-list>",flex:"none|[<'flex-grow'> <'flex-shrink'>?||<'flex-basis'>]","flex-basis":"content|<'width'>","flex-direction":"row|row-reverse|column|column-reverse","flex-flow":"<'flex-direction'>||<'flex-wrap'>","flex-grow":"<number>","flex-shrink":"<number>","flex-wrap":"nowrap|wrap|wrap-reverse",float:"left|right|none|inline-start|inline-end",font:"[[<'font-style'>||<font-variant-css21>||<'font-weight'>||<'font-stretch'>]? <'font-size'> [/ <'line-height'>]? <'font-family'>]|caption|icon|menu|message-box|small-caption|status-bar","font-family":"[<family-name>|<generic-family>]#","font-feature-settings":"normal|<feature-tag-value>#","font-kerning":"auto|normal|none","font-language-override":"normal|<string>","font-optical-sizing":"auto|none","font-variation-settings":"normal|[<string> <number>]#","font-size":"<absolute-size>|<relative-size>|<length-percentage>","font-size-adjust":"none|[ex-height|cap-height|ch-width|ic-width|ic-height]? [from-font|<number>]","font-smooth":"auto|never|always|<absolute-size>|<length>","font-stretch":"<font-stretch-absolute>","font-style":"normal|italic|oblique <angle>?","font-synthesis":"none|[weight||style||small-caps]","font-variant":"normal|none|[<common-lig-values>||<discretionary-lig-values>||<historical-lig-values>||<contextual-alt-values>||stylistic( <feature-value-name> )||historical-forms||styleset( <feature-value-name># )||character-variant( <feature-value-name># )||swash( <feature-value-name> )||ornaments( <feature-value-name> )||annotation( <feature-value-name> )||[small-caps|all-small-caps|petite-caps|all-petite-caps|unicase|titling-caps]||<numeric-figure-values>||<numeric-spacing-values>||<numeric-fraction-values>||ordinal||slashed-zero||<east-asian-variant-values>||<east-asian-width-values>||ruby]","font-variant-alternates":"normal|[stylistic( <feature-value-name> )||historical-forms||styleset( <feature-value-name># )||character-variant( <feature-value-name># )||swash( <feature-value-name> )||ornaments( <feature-value-name> )||annotation( <feature-value-name> )]","font-variant-caps":"normal|small-caps|all-small-caps|petite-caps|all-petite-caps|unicase|titling-caps","font-variant-east-asian":"normal|[<east-asian-variant-values>||<east-asian-width-values>||ruby]","font-variant-ligatures":"normal|none|[<common-lig-values>||<discretionary-lig-values>||<historical-lig-values>||<contextual-alt-values>]","font-variant-numeric":"normal|[<numeric-figure-values>||<numeric-spacing-values>||<numeric-fraction-values>||ordinal||slashed-zero]","font-variant-position":"normal|sub|super","font-weight":"<font-weight-absolute>|bolder|lighter","forced-color-adjust":"auto|none",gap:"<'row-gap'> <'column-gap'>?",grid:"<'grid-template'>|<'grid-template-rows'> / [auto-flow&&dense?] <'grid-auto-columns'>?|[auto-flow&&dense?] <'grid-auto-rows'>? / <'grid-template-columns'>","grid-area":"<grid-line> [/ <grid-line>]{0,3}","grid-auto-columns":"<track-size>+","grid-auto-flow":"[row|column]||dense","grid-auto-rows":"<track-size>+","grid-column":"<grid-line> [/ <grid-line>]?","grid-column-end":"<grid-line>","grid-column-gap":"<length-percentage>","grid-column-start":"<grid-line>","grid-gap":"<'grid-row-gap'> <'grid-column-gap'>?","grid-row":"<grid-line> [/ <grid-line>]?","grid-row-end":"<grid-line>","grid-row-gap":"<length-percentage>","grid-row-start":"<grid-line>","grid-template":"none|[<'grid-template-rows'> / <'grid-template-columns'>]|[<line-names>? <string> <track-size>? <line-names>?]+ [/ <explicit-track-list>]?","grid-template-areas":"none|<string>+","grid-template-columns":"none|<track-list>|<auto-track-list>|subgrid <line-name-list>?","grid-template-rows":"none|<track-list>|<auto-track-list>|subgrid <line-name-list>?","hanging-punctuation":"none|[first||[force-end|allow-end]||last]",height:"auto|<length>|<percentage>|min-content|max-content|fit-content|fit-content( <length-percentage> )","hyphenate-character":"auto|<string>",hyphens:"none|manual|auto","image-orientation":"from-image|<angle>|[<angle>? flip]","image-rendering":"auto|crisp-edges|pixelated|optimizeSpeed|optimizeQuality|<-non-standard-image-rendering>","image-resolution":"[from-image||<resolution>]&&snap?","ime-mode":"auto|normal|active|inactive|disabled","initial-letter":"normal|[<number> <integer>?]","initial-letter-align":"[auto|alphabetic|hanging|ideographic]","inline-size":"<'width'>","input-security":"auto|none",inset:"<'top'>{1,4}","inset-block":"<'top'>{1,2}","inset-block-end":"<'top'>","inset-block-start":"<'top'>","inset-inline":"<'top'>{1,2}","inset-inline-end":"<'top'>","inset-inline-start":"<'top'>",isolation:"auto|isolate","justify-content":"normal|<content-distribution>|<overflow-position>? [<content-position>|left|right]","justify-items":"normal|stretch|<baseline-position>|<overflow-position>? [<self-position>|left|right]|legacy|legacy&&[left|right|center]","justify-self":"auto|normal|stretch|<baseline-position>|<overflow-position>? [<self-position>|left|right]","justify-tracks":"[normal|<content-distribution>|<overflow-position>? [<content-position>|left|right]]#",left:"<length>|<percentage>|auto","letter-spacing":"normal|<length-percentage>","line-break":"auto|loose|normal|strict|anywhere","line-clamp":"none|<integer>","line-height":"normal|<number>|<length>|<percentage>","line-height-step":"<length>","list-style":"<'list-style-type'>||<'list-style-position'>||<'list-style-image'>","list-style-image":"<image>|none","list-style-position":"inside|outside","list-style-type":"<counter-style>|<string>|none",margin:"[<length>|<percentage>|auto]{1,4}","margin-block":"<'margin-left'>{1,2}","margin-block-end":"<'margin-left'>","margin-block-start":"<'margin-left'>","margin-bottom":"<length>|<percentage>|auto","margin-inline":"<'margin-left'>{1,2}","margin-inline-end":"<'margin-left'>","margin-inline-start":"<'margin-left'>","margin-left":"<length>|<percentage>|auto","margin-right":"<length>|<percentage>|auto","margin-top":"<length>|<percentage>|auto","margin-trim":"none|in-flow|all",mask:"<mask-layer>#","mask-border":"<'mask-border-source'>||<'mask-border-slice'> [/ <'mask-border-width'>? [/ <'mask-border-outset'>]?]?||<'mask-border-repeat'>||<'mask-border-mode'>","mask-border-mode":"luminance|alpha","mask-border-outset":"[<length>|<number>]{1,4}","mask-border-repeat":"[stretch|repeat|round|space]{1,2}","mask-border-slice":"<number-percentage>{1,4} fill?","mask-border-source":"none|<image>","mask-border-width":"[<length-percentage>|<number>|auto]{1,4}","mask-clip":"[<geometry-box>|no-clip]#","mask-composite":"<compositing-operator>#","mask-image":"<mask-reference>#","mask-mode":"<masking-mode>#","mask-origin":"<geometry-box>#","mask-position":"<position>#","mask-repeat":"<repeat-style>#","mask-size":"<bg-size>#","mask-type":"luminance|alpha","masonry-auto-flow":"[pack|next]||[definite-first|ordered]","math-style":"normal|compact","max-block-size":"<'max-width'>","max-height":"none|<length-percentage>|min-content|max-content|fit-content|fit-content( <length-percentage> )","max-inline-size":"<'max-width'>","max-lines":"none|<integer>","max-width":"none|<length-percentage>|min-content|max-content|fit-content|fit-content( <length-percentage> )|<-non-standard-width>","min-block-size":"<'min-width'>","min-height":"auto|<length>|<percentage>|min-content|max-content|fit-content|fit-content( <length-percentage> )","min-inline-size":"<'min-width'>","min-width":"auto|<length>|<percentage>|min-content|max-content|fit-content|fit-content( <length-percentage> )|<-non-standard-width>","mix-blend-mode":"<blend-mode>|plus-lighter","object-fit":"fill|contain|cover|none|scale-down","object-position":"<position>",offset:"[<'offset-position'>? [<'offset-path'> [<'offset-distance'>||<'offset-rotate'>]?]?]! [/ <'offset-anchor'>]?","offset-anchor":"auto|<position>","offset-distance":"<length-percentage>","offset-path":"none|ray( [<angle>&&<size>&&contain?] )|<path()>|<url>|[<basic-shape>||<geometry-box>]","offset-position":"auto|<position>","offset-rotate":"[auto|reverse]||<angle>",opacity:"<alpha-value>",order:"<integer>",orphans:"<integer>",outline:"[<'outline-color'>||<'outline-style'>||<'outline-width'>]","outline-color":"<color>|invert","outline-offset":"<length>","outline-style":"auto|<'border-style'>","outline-width":"<line-width>",overflow:"[visible|hidden|clip|scroll|auto]{1,2}|<-non-standard-overflow>","overflow-anchor":"auto|none","overflow-block":"visible|hidden|clip|scroll|auto","overflow-clip-box":"padding-box|content-box","overflow-clip-margin":"<visual-box>||<length [0,∞]>","overflow-inline":"visible|hidden|clip|scroll|auto","overflow-wrap":"normal|break-word|anywhere","overflow-x":"visible|hidden|clip|scroll|auto","overflow-y":"visible|hidden|clip|scroll|auto","overscroll-behavior":"[contain|none|auto]{1,2}","overscroll-behavior-block":"contain|none|auto","overscroll-behavior-inline":"contain|none|auto","overscroll-behavior-x":"contain|none|auto","overscroll-behavior-y":"contain|none|auto",padding:"[<length>|<percentage>]{1,4}","padding-block":"<'padding-left'>{1,2}","padding-block-end":"<'padding-left'>","padding-block-start":"<'padding-left'>","padding-bottom":"<length>|<percentage>","padding-inline":"<'padding-left'>{1,2}","padding-inline-end":"<'padding-left'>","padding-inline-start":"<'padding-left'>","padding-left":"<length>|<percentage>","padding-right":"<length>|<percentage>","padding-top":"<length>|<percentage>","page-break-after":"auto|always|avoid|left|right|recto|verso","page-break-before":"auto|always|avoid|left|right|recto|verso","page-break-inside":"auto|avoid","paint-order":"normal|[fill||stroke||markers]",perspective:"none|<length>","perspective-origin":"<position>","place-content":"<'align-content'> <'justify-content'>?","place-items":"<'align-items'> <'justify-items'>?","place-self":"<'align-self'> <'justify-self'>?","pointer-events":"auto|none|visiblePainted|visibleFill|visibleStroke|visible|painted|fill|stroke|all|inherit",position:"static|relative|absolute|sticky|fixed|-webkit-sticky",quotes:"none|auto|[<string> <string>]+",resize:"none|both|horizontal|vertical|block|inline",right:"<length>|<percentage>|auto",rotate:"none|<angle>|[x|y|z|<number>{3}]&&<angle>","row-gap":"normal|<length-percentage>","ruby-align":"start|center|space-between|space-around","ruby-merge":"separate|collapse|auto","ruby-position":"[alternate||[over|under]]|inter-character",scale:"none|<number>{1,3}","scrollbar-color":"auto|<color>{2}","scrollbar-gutter":"auto|stable&&both-edges?","scrollbar-width":"auto|thin|none","scroll-behavior":"auto|smooth","scroll-margin":"<length>{1,4}","scroll-margin-block":"<length>{1,2}","scroll-margin-block-start":"<length>","scroll-margin-block-end":"<length>","scroll-margin-bottom":"<length>","scroll-margin-inline":"<length>{1,2}","scroll-margin-inline-start":"<length>","scroll-margin-inline-end":"<length>","scroll-margin-left":"<length>","scroll-margin-right":"<length>","scroll-margin-top":"<length>","scroll-padding":"[auto|<length-percentage>]{1,4}","scroll-padding-block":"[auto|<length-percentage>]{1,2}","scroll-padding-block-start":"auto|<length-percentage>","scroll-padding-block-end":"auto|<length-percentage>","scroll-padding-bottom":"auto|<length-percentage>","scroll-padding-inline":"[auto|<length-percentage>]{1,2}","scroll-padding-inline-start":"auto|<length-percentage>","scroll-padding-inline-end":"auto|<length-percentage>","scroll-padding-left":"auto|<length-percentage>","scroll-padding-right":"auto|<length-percentage>","scroll-padding-top":"auto|<length-percentage>","scroll-snap-align":"[none|start|end|center]{1,2}","scroll-snap-coordinate":"none|<position>#","scroll-snap-destination":"<position>","scroll-snap-points-x":"none|repeat( <length-percentage> )","scroll-snap-points-y":"none|repeat( <length-percentage> )","scroll-snap-stop":"normal|always","scroll-snap-type":"none|[x|y|block|inline|both] [mandatory|proximity]?","scroll-snap-type-x":"none|mandatory|proximity","scroll-snap-type-y":"none|mandatory|proximity","shape-image-threshold":"<alpha-value>","shape-margin":"<length-percentage>","shape-outside":"none|[<shape-box>||<basic-shape>]|<image>","tab-size":"<integer>|<length>","table-layout":"auto|fixed","text-align":"start|end|left|right|center|justify|match-parent","text-align-last":"auto|start|end|left|right|center|justify","text-combine-upright":"none|all|[digits <integer>?]","text-decoration":"<'text-decoration-line'>||<'text-decoration-style'>||<'text-decoration-color'>||<'text-decoration-thickness'>","text-decoration-color":"<color>","text-decoration-line":"none|[underline||overline||line-through||blink]|spelling-error|grammar-error","text-decoration-skip":"none|[objects||[spaces|[leading-spaces||trailing-spaces]]||edges||box-decoration]","text-decoration-skip-ink":"auto|all|none","text-decoration-style":"solid|double|dotted|dashed|wavy","text-decoration-thickness":"auto|from-font|<length>|<percentage>","text-emphasis":"<'text-emphasis-style'>||<'text-emphasis-color'>","text-emphasis-color":"<color>","text-emphasis-position":"[over|under]&&[right|left]","text-emphasis-style":"none|[[filled|open]||[dot|circle|double-circle|triangle|sesame]]|<string>","text-indent":"<length-percentage>&&hanging?&&each-line?","text-justify":"auto|inter-character|inter-word|none","text-orientation":"mixed|upright|sideways","text-overflow":"[clip|ellipsis|<string>]{1,2}","text-rendering":"auto|optimizeSpeed|optimizeLegibility|geometricPrecision","text-shadow":"none|<shadow-t>#","text-size-adjust":"none|auto|<percentage>","text-transform":"none|capitalize|uppercase|lowercase|full-width|full-size-kana","text-underline-offset":"auto|<length>|<percentage>","text-underline-position":"auto|from-font|[under||[left|right]]",top:"<length>|<percentage>|auto","touch-action":"auto|none|[[pan-x|pan-left|pan-right]||[pan-y|pan-up|pan-down]||pinch-zoom]|manipulation",transform:"none|<transform-list>","transform-box":"content-box|border-box|fill-box|stroke-box|view-box","transform-origin":"[<length-percentage>|left|center|right|top|bottom]|[[<length-percentage>|left|center|right]&&[<length-percentage>|top|center|bottom]] <length>?","transform-style":"flat|preserve-3d",transition:"<single-transition>#","transition-delay":"<time>#","transition-duration":"<time>#","transition-property":"none|<single-transition-property>#","transition-timing-function":"<easing-function>#",translate:"none|<length-percentage> [<length-percentage> <length>?]?","unicode-bidi":"normal|embed|isolate|bidi-override|isolate-override|plaintext|-moz-isolate|-moz-isolate-override|-moz-plaintext|-webkit-isolate|-webkit-isolate-override|-webkit-plaintext","user-select":"auto|text|none|contain|all","vertical-align":"baseline|sub|super|text-top|text-bottom|middle|top|bottom|<percentage>|<length>",visibility:"visible|hidden|collapse","white-space":"normal|pre|nowrap|pre-wrap|pre-line|break-spaces",widows:"<integer>",width:"auto|<length>|<percentage>|min-content|max-content|fit-content|fit-content( <length-percentage> )|fill|stretch|intrinsic|-moz-max-content|-webkit-max-content|-moz-fit-content|-webkit-fit-content","will-change":"auto|<animateable-feature>#","word-break":"normal|break-all|keep-all|break-word","word-spacing":"normal|<length>","word-wrap":"normal|break-word","writing-mode":"horizontal-tb|vertical-rl|vertical-lr|sideways-rl|sideways-lr|<svg-writing-mode>","z-index":"auto|<integer>",zoom:"normal|reset|<number>|<percentage>","-moz-background-clip":"padding|border","-moz-border-radius-bottomleft":"<'border-bottom-left-radius'>","-moz-border-radius-bottomright":"<'border-bottom-right-radius'>","-moz-border-radius-topleft":"<'border-top-left-radius'>","-moz-border-radius-topright":"<'border-bottom-right-radius'>","-moz-control-character-visibility":"visible|hidden","-moz-osx-font-smoothing":"auto|grayscale","-moz-user-select":"none|text|all|-moz-none","-ms-flex-align":"start|end|center|baseline|stretch","-ms-flex-item-align":"auto|start|end|center|baseline|stretch","-ms-flex-line-pack":"start|end|center|justify|distribute|stretch","-ms-flex-negative":"<'flex-shrink'>","-ms-flex-pack":"start|end|center|justify|distribute","-ms-flex-order":"<integer>","-ms-flex-positive":"<'flex-grow'>","-ms-flex-preferred-size":"<'flex-basis'>","-ms-interpolation-mode":"nearest-neighbor|bicubic","-ms-grid-column-align":"start|end|center|stretch","-ms-grid-row-align":"start|end|center|stretch","-ms-hyphenate-limit-last":"none|always|column|page|spread","-webkit-background-clip":"[<box>|border|padding|content|text]#","-webkit-column-break-after":"always|auto|avoid","-webkit-column-break-before":"always|auto|avoid","-webkit-column-break-inside":"always|auto|avoid","-webkit-font-smoothing":"auto|none|antialiased|subpixel-antialiased","-webkit-mask-box-image":"[<url>|<gradient>|none] [<length-percentage>{4} <-webkit-mask-box-repeat>{2}]?","-webkit-print-color-adjust":"economy|exact","-webkit-text-security":"none|circle|disc|square","-webkit-user-drag":"none|element|auto","-webkit-user-select":"auto|none|text|all","alignment-baseline":"auto|baseline|before-edge|text-before-edge|middle|central|after-edge|text-after-edge|ideographic|alphabetic|hanging|mathematical","baseline-shift":"baseline|sub|super|<svg-length>",behavior:"<url>+","clip-rule":"nonzero|evenodd",cue:"<'cue-before'> <'cue-after'>?","cue-after":"<url> <decibel>?|none","cue-before":"<url> <decibel>?|none","dominant-baseline":"auto|use-script|no-change|reset-size|ideographic|alphabetic|hanging|mathematical|central|middle|text-after-edge|text-before-edge",fill:"<paint>","fill-opacity":"<number-zero-one>","fill-rule":"nonzero|evenodd","glyph-orientation-horizontal":"<angle>","glyph-orientation-vertical":"<angle>",kerning:"auto|<svg-length>",marker:"none|<url>","marker-end":"none|<url>","marker-mid":"none|<url>","marker-start":"none|<url>",pause:"<'pause-before'> <'pause-after'>?","pause-after":"<time>|none|x-weak|weak|medium|strong|x-strong","pause-before":"<time>|none|x-weak|weak|medium|strong|x-strong",rest:"<'rest-before'> <'rest-after'>?","rest-after":"<time>|none|x-weak|weak|medium|strong|x-strong","rest-before":"<time>|none|x-weak|weak|medium|strong|x-strong","shape-rendering":"auto|optimizeSpeed|crispEdges|geometricPrecision",src:"[<url> [format( <string># )]?|local( <family-name> )]#",speak:"auto|none|normal","speak-as":"normal|spell-out||digits||[literal-punctuation|no-punctuation]",stroke:"<paint>","stroke-dasharray":"none|[<svg-length>+]#","stroke-dashoffset":"<svg-length>","stroke-linecap":"butt|round|square","stroke-linejoin":"miter|round|bevel","stroke-miterlimit":"<number-one-or-greater>","stroke-opacity":"<number-zero-one>","stroke-width":"<svg-length>","text-anchor":"start|middle|end","unicode-range":"<urange>#","voice-balance":"<number>|left|center|right|leftwards|rightwards","voice-duration":"auto|<time>","voice-family":"[[<family-name>|<generic-voice>] ,]* [<family-name>|<generic-voice>]|preserve","voice-pitch":"<frequency>&&absolute|[[x-low|low|medium|high|x-high]||[<frequency>|<semitones>|<percentage>]]","voice-range":"<frequency>&&absolute|[[x-low|low|medium|high|x-high]||[<frequency>|<semitones>|<percentage>]]","voice-rate":"[normal|x-slow|slow|medium|fast|x-fast]||<percentage>","voice-stress":"normal|strong|moderate|none|reduced","voice-volume":"silent|[[x-soft|soft|medium|loud|x-loud]||<decibel>]"},atrules:{charset:{prelude:"<string>",descriptors:null},"counter-style":{prelude:"<counter-style-name>",descriptors:{"additive-symbols":"[<integer>&&<symbol>]#",fallback:"<counter-style-name>",negative:"<symbol> <symbol>?",pad:"<integer>&&<symbol>",prefix:"<symbol>",range:"[[<integer>|infinite]{2}]#|auto","speak-as":"auto|bullets|numbers|words|spell-out|<counter-style-name>",suffix:"<symbol>",symbols:"<symbol>+",system:"cyclic|numeric|alphabetic|symbolic|additive|[fixed <integer>?]|[extends <counter-style-name>]"}},document:{prelude:"[<url>|url-prefix( <string> )|domain( <string> )|media-document( <string> )|regexp( <string> )]#",descriptors:null},"font-face":{prelude:null,descriptors:{"ascent-override":"normal|<percentage>","descent-override":"normal|<percentage>","font-display":"[auto|block|swap|fallback|optional]","font-family":"<family-name>","font-feature-settings":"normal|<feature-tag-value>#","font-variation-settings":"normal|[<string> <number>]#","font-stretch":"<font-stretch-absolute>{1,2}","font-style":"normal|italic|oblique <angle>{0,2}","font-weight":"<font-weight-absolute>{1,2}","font-variant":"normal|none|[<common-lig-values>||<discretionary-lig-values>||<historical-lig-values>||<contextual-alt-values>||stylistic( <feature-value-name> )||historical-forms||styleset( <feature-value-name># )||character-variant( <feature-value-name># )||swash( <feature-value-name> )||ornaments( <feature-value-name> )||annotation( <feature-value-name> )||[small-caps|all-small-caps|petite-caps|all-petite-caps|unicase|titling-caps]||<numeric-figure-values>||<numeric-spacing-values>||<numeric-fraction-values>||ordinal||slashed-zero||<east-asian-variant-values>||<east-asian-width-values>||ruby]","line-gap-override":"normal|<percentage>","size-adjust":"<percentage>",src:"[<url> [format( <string># )]?|local( <family-name> )]#","unicode-range":"<urange>#"}},"font-feature-values":{prelude:"<family-name>#",descriptors:null},import:{prelude:"[<string>|<url>] [layer|layer( <layer-name> )]? [supports( [<supports-condition>|<declaration>] )]? <media-query-list>?",descriptors:null},keyframes:{prelude:"<keyframes-name>",descriptors:null},layer:{prelude:"[<layer-name>#|<layer-name>?]",descriptors:null},media:{prelude:"<media-query-list>",descriptors:null},namespace:{prelude:"<namespace-prefix>? [<string>|<url>]",descriptors:null},page:{prelude:"<page-selector-list>",descriptors:{bleed:"auto|<length>",marks:"none|[crop||cross]",size:"<length>{1,2}|auto|[<page-size>||[portrait|landscape]]"}},property:{prelude:"<custom-property-name>",descriptors:{syntax:"<string>",inherits:"true|false","initial-value":"<string>"}},"scroll-timeline":{prelude:"<timeline-name>",descriptors:null},supports:{prelude:"<supports-condition>",descriptors:null},viewport:{prelude:null,descriptors:{height:"<viewport-length>{1,2}","max-height":"<viewport-length>","max-width":"<viewport-length>","max-zoom":"auto|<number>|<percentage>","min-height":"<viewport-length>","min-width":"<viewport-length>","min-zoom":"auto|<number>|<percentage>",orientation:"auto|portrait|landscape","user-zoom":"zoom|fixed","viewport-fit":"auto|contain|cover",width:"<viewport-length>{1,2}",zoom:"auto|<number>|<percentage>"}}}},Qw=F.__exportAll({generate:()=>tC,name:()=>Jw,parse:()=>Pd,structure:()=>eC}),et=43,Pe=45,Fi=110,Dt=!0,Zw=!1;function ji(e,t){let r=this.tokenStart+e;const n=this.charCodeAt(r);for((n===et||n===Pe)&&(t&&this.error("Number sign is not allowed"),r++);r<this.tokenEnd;r++)he(this.charCodeAt(r))||this.error("Integer is expected",r)}function _r(e){return ji.call(this,0,e)}function vt(e,t){if(!this.cmpChar(this.tokenStart+e,t)){let r="";switch(t){case Fi:r="N is expected";break;case Pe:r="HyphenMinus is expected"}this.error(r,this.tokenStart+e)}}function ha(){let e=0,t=0,r=this.tokenType;for(;r===13||r===25;)r=this.lookupType(++e);if(r!==10)if(this.isDelim(et,e)||this.isDelim(Pe,e)){t=this.isDelim(et,e)?et:Pe;do r=this.lookupType(++e);while(r===13||r===25);r!==10&&(this.skip(e),_r.call(this,Dt))}else return null;return e>0&&this.skip(e),t===0&&(r=this.charCodeAt(this.tokenStart),r!==et&&r!==Pe&&this.error("Number sign is expected")),_r.call(this,t!==0),t===Pe?"-"+this.consume(10):this.consume(10)}var Jw="AnPlusB",eC={a:[String,null],b:[String,null]};function Pd(){const e=this.tokenStart;let t=null,r=null;if(this.tokenType===10)_r.call(this,Zw),r=this.consume(10);else if(this.tokenType===1&&this.cmpChar(this.tokenStart,Pe))switch(t="-1",vt.call(this,1,Fi),this.tokenEnd-this.tokenStart){case 2:this.next(),r=ha.call(this);break;case 3:vt.call(this,2,Pe),this.next(),this.skipSC(),_r.call(this,Dt),r="-"+this.consume(10);break;default:vt.call(this,2,Pe),ji.call(this,3,Dt),this.next(),r=this.substrToCursor(e+2)}else if(this.tokenType===1||this.isDelim(et)&&this.lookupType(1)===1){let n=0;switch(t="1",this.isDelim(et)&&(n=1,this.next()),vt.call(this,0,Fi),this.tokenEnd-this.tokenStart){case 1:this.next(),r=ha.call(this);break;case 2:vt.call(this,1,Pe),this.next(),this.skipSC(),_r.call(this,Dt),r="-"+this.consume(10);break;default:vt.call(this,1,Pe),ji.call(this,2,Dt),this.next(),r=this.substrToCursor(e+n+1)}}else if(this.tokenType===12){const n=this.charCodeAt(this.tokenStart),i=n===et||n===Pe;let o=this.tokenStart+i;for(;o<this.tokenEnd&&he(this.charCodeAt(o));o++);o===this.tokenStart+i&&this.error("Integer is expected",this.tokenStart+i),vt.call(this,o-this.tokenStart,Fi),t=this.substring(e,o),o+1===this.tokenEnd?(this.next(),r=ha.call(this)):(vt.call(this,o-this.tokenStart+1,Pe),o+2===this.tokenEnd?(this.next(),this.skipSC(),_r.call(this,Dt),r="-"+this.consume(10)):(ji.call(this,o-this.tokenStart+2,Dt),this.next(),r=this.substrToCursor(o+1)))}else this.error();return t!==null&&t.charCodeAt(0)===et&&(t=t.substr(1)),r!==null&&r.charCodeAt(0)===et&&(r=r.substr(1)),{type:"AnPlusB",loc:this.getLocation(e,this.tokenStart),a:t,b:r}}function tC(e){if(e.a){const t=e.a==="+1"&&"n"||e.a==="1"&&"n"||e.a==="-1"&&"-n"||e.a+"n";if(e.b){const r=e.b[0]==="-"||e.b[0]==="+"?e.b:"+"+e.b;this.tokenize(t+r)}else this.tokenize(t)}else this.tokenize(e.b)}var rC=F.__exportAll({generate:()=>aC,name:()=>iC,parse:()=>Md,structure:()=>sC,walkContext:()=>oC});function Nd(e){return this.Raw(e,this.consumeUntilLeftCurlyBracketOrSemicolon,!0)}function nC(){for(let e=1,t;t=this.lookupType(e);e++){if(t===24)return!0;if(t===23||t===3)return!1}return!1}var iC="Atrule",oC="atrule",sC={name:String,prelude:["AtrulePrelude","Raw",null],block:["Block",null]};function Md(){const e=this.tokenStart;let t,r,n=null,i=null;switch(this.eat(3),t=this.substrToCursor(e+1),r=t.toLowerCase(),this.skipSC(),this.eof===!1&&this.tokenType!==23&&this.tokenType!==17&&(this.parseAtrulePrelude?n=this.parseWithFallback(this.AtrulePrelude.bind(this,t),Nd):n=Nd.call(this,this.tokenIndex),this.skipSC()),this.tokenType){case 17:this.next();break;case 23:hasOwnProperty.call(this.atrule,r)&&typeof this.atrule[r].block=="function"?i=this.atrule[r].block.call(this):i=this.Block(nC.call(this))}return{type:"Atrule",loc:this.getLocation(e,this.tokenStart),name:t,prelude:n,block:i}}function aC(e){this.token(3,"@"+e.name),e.prelude!==null&&this.node(e.prelude),e.block?this.node(e.block):this.token(17,";")}var lC=F.__exportAll({generate:()=>fC,name:()=>cC,parse:()=>Rd,structure:()=>dC,walkContext:()=>uC}),cC="AtrulePrelude",uC="atrulePrelude",dC={children:[[]]};function Rd(e){let t=null;return e!==null&&(e=e.toLowerCase()),this.skipSC(),hasOwnProperty.call(this.atrule,e)&&typeof this.atrule[e].prelude=="function"?t=this.atrule[e].prelude.call(this):t=this.readSequence(this.scope.AtrulePrelude),this.skipSC(),this.eof!==!0&&this.tokenType!==23&&this.tokenType!==17&&this.error("Semicolon or block is expected"),{type:"AtrulePrelude",loc:this.getLocationFromList(t),children:t}}function fC(e){this.children(e)}var hC=F.__exportAll({generate:()=>_C,name:()=>vC,parse:()=>Id,structure:()=>EC}),mC=36,Dd=42,$i=61,pC=94,ma=124,gC=126;function bC(){this.eof&&this.error("Unexpected end of input");const e=this.tokenStart;let t=!1;return this.isDelim(Dd)?(t=!0,this.next()):this.isDelim(ma)||this.eat(1),this.isDelim(ma)?this.charCodeAt(this.tokenStart+1)!==$i?(this.next(),this.eat(1)):t&&this.error("Identifier is expected",this.tokenEnd):t&&this.error("Vertical line is expected"),{type:"Identifier",loc:this.getLocation(e,this.tokenStart),name:this.substrToCursor(e)}}function yC(){const e=this.tokenStart,t=this.charCodeAt(e);return t!==$i&&t!==gC&&t!==pC&&t!==mC&&t!==Dd&&t!==ma&&this.error("Attribute selector (=, ~=, ^=, $=, *=, |=) is expected"),this.next(),t!==$i&&(this.isDelim($i)||this.error("Equal sign is expected"),this.next()),this.substrToCursor(e)}var vC="AttributeSelector",EC={name:"Identifier",matcher:[String,null],value:["String","Identifier",null],flags:[String,null]};function Id(){const e=this.tokenStart;let t,r=null,n=null,i=null;return this.eat(19),this.skipSC(),t=bC.call(this),this.skipSC(),this.tokenType!==20&&(this.tokenType!==1&&(r=yC.call(this),this.skipSC(),n=this.tokenType===5?this.String():this.Identifier(),this.skipSC()),this.tokenType===1&&(i=this.consume(1),this.skipSC())),this.eat(20),{type:"AttributeSelector",loc:this.getLocation(e,this.tokenStart),name:t,matcher:r,value:n,flags:i}}function _C(e){this.token(9,"["),this.node(e.name),e.matcher!==null&&(this.tokenize(e.matcher),this.node(e.value)),e.flags!==null&&this.token(1,e.flags),this.token(9,"]")}var SC=F.__exportAll({generate:()=>LC,name:()=>AC,parse:()=>jd,structure:()=>kC,walkContext:()=>TC});function Bd(e){return this.Raw(e,null,!0)}function wC(){return this.parseWithFallback(this.Rule,Bd)}function Fd(e){return this.Raw(e,this.consumeUntilSemicolonIncluded,!0)}function CC(){if(this.tokenType===17)return Fd.call(this,this.tokenIndex);const e=this.parseWithFallback(this.Declaration,Fd);return this.tokenType===17&&this.next(),e}var AC="Block",TC="block",kC={children:[["Atrule","Rule","Declaration"]]};function jd(e){const t=e?CC:wC,r=this.tokenStart;let n=this.createList();this.eat(23);e:for(;!this.eof;)switch(this.tokenType){case 24:break e;case 13:case 25:this.next();break;case 3:n.push(this.parseWithFallback(this.Atrule,Bd));break;default:n.push(t.call(this))}return this.eof||this.eat(24),{type:"Block",loc:this.getLocation(r,this.tokenStart),children:n}}function LC(e){this.token(23,"{"),this.children(e,t=>{t.type==="Declaration"&&this.token(17,";")}),this.token(24,"}")}var OC=F.__exportAll({generate:()=>NC,name:()=>xC,parse:()=>$d,structure:()=>PC}),xC="Brackets",PC={children:[[]]};function $d(e,t){const r=this.tokenStart;let n=null;return this.eat(19),n=e.call(this,t),this.eof||this.eat(20),{type:"Brackets",loc:this.getLocation(r,this.tokenStart),children:n}}function NC(e){this.token(9,"["),this.children(e),this.token(9,"]")}var MC=F.__exportAll({generate:()=>DC,name:()=>"CDC",parse:()=>Hd,structure:()=>RC}),hM="CDC",RC=[];function Hd(){const e=this.tokenStart;return this.eat(15),{type:"CDC",loc:this.getLocation(e,this.tokenStart)}}function DC(){this.token(15,"-->")}var IC=F.__exportAll({generate:()=>FC,name:()=>"CDO",parse:()=>zd,structure:()=>BC}),mM="CDO",BC=[];function zd(){const e=this.tokenStart;return this.eat(14),{type:"CDO",loc:this.getLocation(e,this.tokenStart)}}function FC(){this.token(14,"<!--")}var jC=F.__exportAll({generate:()=>VC,name:()=>HC,parse:()=>Vd,structure:()=>zC}),$C=46,HC="ClassSelector",zC={name:String};function Vd(){return this.eatDelim($C),{type:"ClassSelector",loc:this.getLocation(this.tokenStart-1,this.tokenEnd),name:this.consume(1)}}function VC(e){this.token(9,"."),this.token(1,e.name)}var WC=F.__exportAll({generate:()=>KC,name:()=>XC,parse:()=>Ud,structure:()=>YC}),UC=43,Wd=47,qC=62,GC=126,XC="Combinator",YC={name:String};function Ud(){const e=this.tokenStart;let t;switch(this.tokenType){case 13:t=" ";break;case 9:switch(this.charCodeAt(this.tokenStart)){case qC:case UC:case GC:this.next();break;case Wd:this.next(),this.eatIdent("deep"),this.eatDelim(Wd);break;default:this.error("Combinator is expected")}t=this.substrToCursor(e)}return{type:"Combinator",loc:this.getLocation(e,this.tokenStart),name:t}}function KC(e){this.tokenize(e.name)}var QC=F.__exportAll({generate:()=>rA,name:()=>eA,parse:()=>qd,structure:()=>tA}),ZC=42,JC=47,eA="Comment",tA={value:String};function qd(){const e=this.tokenStart;let t=this.tokenEnd;return this.eat(25),t-e+2>=2&&this.charCodeAt(t-2)===ZC&&this.charCodeAt(t-1)===JC&&(t-=2),{type:"Comment",loc:this.getLocation(e,this.tokenStart),value:this.substring(e+2,t)}}function rA(e){this.token(25,"/*"+e.value+"*/")}var nA=F.__exportAll({generate:()=>pA,name:()=>fA,parse:()=>Yd,structure:()=>mA,walkContext:()=>hA}),Gd=33,iA=35,oA=36,sA=38,aA=42,lA=43,Xd=47;function cA(e){return this.Raw(e,this.consumeUntilExclamationMarkOrSemicolon,!0)}function uA(e){return this.Raw(e,this.consumeUntilExclamationMarkOrSemicolon,!1)}function dA(){const e=this.tokenIndex,t=this.Value();return t.type!=="Raw"&&this.eof===!1&&this.tokenType!==17&&this.isDelim(Gd)===!1&&this.isBalanceEdge(e)===!1&&this.error(),t}var fA="Declaration",hA="declaration",mA={important:[Boolean,String],property:String,value:["Value","Raw"]};function Yd(){const e=this.tokenStart,t=this.tokenIndex,r=gA.call(this),n=Vs(r),i=n?this.parseCustomProperty:this.parseValue,o=n?uA:cA;let s=!1,a;this.skipSC(),this.eat(16);const l=this.tokenIndex;if(n||this.skipSC(),i?a=this.parseWithFallback(dA,o):a=o.call(this,this.tokenIndex),n&&a.type==="Value"&&a.children.isEmpty){for(let c=l-this.tokenIndex;c<=0;c++)if(this.lookupType(c)===13){a.children.appendData({type:"WhiteSpace",loc:null,value:" "});break}}return this.isDelim(Gd)&&(s=bA.call(this),this.skipSC()),this.eof===!1&&this.tokenType!==17&&this.isBalanceEdge(t)===!1&&this.error(),{type:"Declaration",loc:this.getLocation(e,this.tokenStart),important:s,property:r,value:a}}function pA(e){this.token(1,e.property),this.token(16,":"),this.node(e.value),e.important&&(this.token(9,"!"),this.token(1,e.important===!0?"important":e.important))}function gA(){const e=this.tokenStart;if(this.tokenType===9)switch(this.charCodeAt(this.tokenStart)){case aA:case oA:case lA:case iA:case sA:this.next();break;case Xd:this.next(),this.isDelim(Xd)&&this.next()}return this.tokenType===4?this.eat(4):this.eat(1),this.substrToCursor(e)}function bA(){this.eat(9),this.skipSC();const e=this.consume(1);return e==="important"?!0:e}var yA=F.__exportAll({generate:()=>SA,name:()=>EA,parse:()=>Kd,structure:()=>_A});function vA(e){return this.Raw(e,this.consumeUntilSemicolonIncluded,!0)}var EA="DeclarationList",_A={children:[["Declaration"]]};function Kd(){const e=this.createList();for(;!this.eof;)switch(this.tokenType){case 13:case 25:case 17:this.next();break;default:e.push(this.parseWithFallback(this.Declaration,vA))}return{type:"DeclarationList",loc:this.getLocationFromList(e),children:e}}function SA(e){this.children(e,t=>{t.type==="Declaration"&&this.token(17,";")})}var wA=F.__exportAll({generate:()=>TA,name:()=>CA,parse:()=>Qd,structure:()=>AA}),CA="Dimension",AA={value:String,unit:String};function Qd(){const e=this.tokenStart,t=this.consumeNumber(12);return{type:"Dimension",loc:this.getLocation(e,this.tokenStart),value:t,unit:this.substring(e+t.length,this.tokenStart)}}function TA(e){this.token(12,e.value+e.unit)}var kA=F.__exportAll({generate:()=>PA,name:()=>LA,parse:()=>Zd,structure:()=>xA,walkContext:()=>OA}),LA="Function",OA="function",xA={name:String,children:[[]]};function Zd(e,t){const r=this.tokenStart,n=this.consumeFunctionName(),i=n.toLowerCase();let o;return o=t.hasOwnProperty(i)?t[i].call(this,t):e.call(this,t),this.eof||this.eat(22),{type:"Function",loc:this.getLocation(r,this.tokenStart),name:n,children:o}}function PA(e){this.token(2,e.name+"("),this.children(e),this.token(22,")")}var NA=F.__exportAll({generate:()=>DA,name:()=>MA,parse:()=>Jd,structure:()=>RA,xxx:()=>"XXX"}),pM="XXX",MA="Hash",RA={value:String};function Jd(){const e=this.tokenStart;return this.eat(4),{type:"Hash",loc:this.getLocation(e,this.tokenStart),value:this.substrToCursor(e+1)}}function DA(e){this.token(4,"#"+e.value)}var IA=F.__exportAll({generate:()=>jA,name:()=>BA,parse:()=>ef,structure:()=>FA}),BA="Identifier",FA={name:String};function ef(){return{type:"Identifier",loc:this.getLocation(this.tokenStart,this.tokenEnd),name:this.consume(1)}}function jA(e){this.token(1,e.name)}var $A=F.__exportAll({generate:()=>VA,name:()=>HA,parse:()=>tf,structure:()=>zA}),HA="IdSelector",zA={name:String};function tf(){const e=this.tokenStart;return this.eat(4),{type:"IdSelector",loc:this.getLocation(e,this.tokenStart),name:this.substrToCursor(e+1)}}function VA(e){this.token(9,"#"+e.name)}var WA=F.__exportAll({generate:()=>GA,name:()=>UA,parse:()=>rf,structure:()=>qA}),UA="MediaFeature",qA={name:String,value:["Identifier","Number","Dimension","Ratio",null]};function rf(){const e=this.tokenStart;let t,r=null;if(this.eat(21),this.skipSC(),t=this.consume(1),this.skipSC(),this.tokenType!==22){switch(this.eat(16),this.skipSC(),this.tokenType){case 10:this.lookupNonWSType(1)===9?r=this.Ratio():r=this.Number();break;case 12:r=this.Dimension();break;case 1:r=this.Identifier();break;default:this.error("Number, dimension, ratio or identifier is expected")}this.skipSC()}return this.eat(22),{type:"MediaFeature",loc:this.getLocation(e,this.tokenStart),name:t,value:r}}function GA(e){this.token(21,"("),this.token(1,e.name),e.value!==null&&(this.token(16,":"),this.node(e.value)),this.token(22,")")}var XA=F.__exportAll({generate:()=>QA,name:()=>YA,parse:()=>nf,structure:()=>KA}),YA="MediaQuery",KA={children:[["Identifier","MediaFeature","WhiteSpace"]]};function nf(){const e=this.createList();let t=null;this.skipSC();e:for(;!this.eof;){switch(this.tokenType){case 25:case 13:this.next();continue;case 1:t=this.Identifier();break;case 21:t=this.MediaFeature();break;default:break e}e.push(t)}return t===null&&this.error("Identifier or parenthesis is expected"),{type:"MediaQuery",loc:this.getLocationFromList(e),children:e}}function QA(e){this.children(e)}var ZA=F.__exportAll({generate:()=>t0,name:()=>JA,parse:()=>of,structure:()=>e0}),JA="MediaQueryList",e0={children:[["MediaQuery"]]};function of(){const e=this.createList();for(this.skipSC();!this.eof&&(e.push(this.MediaQuery()),this.tokenType===18);)this.next();return{type:"MediaQueryList",loc:this.getLocationFromList(e),children:e}}function t0(e){this.children(e,()=>this.token(18,","))}var r0=F.__exportAll({generate:()=>i0,name:()=>"Nth",parse:()=>sf,structure:()=>n0}),gM="Nth",n0={nth:["AnPlusB","Identifier"],selector:["SelectorList",null]};function sf(){this.skipSC();const e=this.tokenStart;let t=e,r=null,n;return this.lookupValue(0,"odd")||this.lookupValue(0,"even")?n=this.Identifier():n=this.AnPlusB(),t=this.tokenStart,this.skipSC(),this.lookupValue(0,"of")&&(this.next(),r=this.SelectorList(),t=this.tokenStart),{type:"Nth",loc:this.getLocation(e,t),nth:n,selector:r}}function i0(e){this.node(e.nth),e.selector!==null&&(this.token(1,"of"),this.node(e.selector))}var o0=F.__exportAll({generate:()=>l0,name:()=>s0,parse:()=>af,structure:()=>a0}),s0="Number",a0={value:String};function af(){return{type:"Number",loc:this.getLocation(this.tokenStart,this.tokenEnd),value:this.consume(10)}}function l0(e){this.token(10,e.value)}var c0=F.__exportAll({generate:()=>f0,name:()=>u0,parse:()=>lf,structure:()=>d0}),u0="Operator",d0={value:String};function lf(){const e=this.tokenStart;return this.next(),{type:"Operator",loc:this.getLocation(e,this.tokenStart),value:this.substrToCursor(e)}}function f0(e){this.tokenize(e.value)}var h0=F.__exportAll({generate:()=>g0,name:()=>m0,parse:()=>cf,structure:()=>p0}),m0="Parentheses",p0={children:[[]]};function cf(e,t){const r=this.tokenStart;let n=null;return this.eat(21),n=e.call(this,t),this.eof||this.eat(22),{type:"Parentheses",loc:this.getLocation(r,this.tokenStart),children:n}}function g0(e){this.token(21,"("),this.children(e),this.token(22,")")}var b0=F.__exportAll({generate:()=>E0,name:()=>y0,parse:()=>uf,structure:()=>v0}),y0="Percentage",v0={value:String};function uf(){return{type:"Percentage",loc:this.getLocation(this.tokenStart,this.tokenEnd),value:this.consumeNumber(11)}}function E0(e){this.token(11,e.value+"%")}var _0=F.__exportAll({generate:()=>A0,name:()=>S0,parse:()=>df,structure:()=>C0,walkContext:()=>w0}),S0="PseudoClassSelector",w0="function",C0={name:String,children:[["Raw"],null]};function df(){const e=this.tokenStart;let t=null,r,n;return this.eat(16),this.tokenType===2?(r=this.consumeFunctionName(),n=r.toLowerCase(),hasOwnProperty.call(this.pseudo,n)?(this.skipSC(),t=this.pseudo[n].call(this),this.skipSC()):(t=this.createList(),t.push(this.Raw(this.tokenIndex,null,!1))),this.eat(22)):r=this.consume(1),{type:"PseudoClassSelector",loc:this.getLocation(e,this.tokenStart),name:r,children:t}}function A0(e){this.token(16,":"),e.children===null?this.token(1,e.name):(this.token(2,e.name+"("),this.children(e),this.token(22,")"))}var T0=F.__exportAll({generate:()=>x0,name:()=>k0,parse:()=>ff,structure:()=>O0,walkContext:()=>L0}),k0="PseudoElementSelector",L0="function",O0={name:String,children:[["Raw"],null]};function ff(){const e=this.tokenStart;let t=null,r,n;return this.eat(16),this.eat(16),this.tokenType===2?(r=this.consumeFunctionName(),n=r.toLowerCase(),hasOwnProperty.call(this.pseudo,n)?(this.skipSC(),t=this.pseudo[n].call(this),this.skipSC()):(t=this.createList(),t.push(this.Raw(this.tokenIndex,null,!1))),this.eat(22)):r=this.consume(1),{type:"PseudoElementSelector",loc:this.getLocation(e,this.tokenStart),name:r,children:t}}function x0(e){this.token(16,":"),this.token(16,":"),e.children===null?this.token(1,e.name):(this.token(2,e.name+"("),this.children(e),this.token(22,")"))}var P0=F.__exportAll({generate:()=>I0,name:()=>R0,parse:()=>mf,structure:()=>D0}),N0=47,M0=46;function hf(){this.skipSC();const e=this.consume(10);for(let t=0;t<e.length;t++){const r=e.charCodeAt(t);!he(r)&&r!==M0&&this.error("Unsigned number is expected",this.tokenStart-e.length+t)}return Number(e)===0&&this.error("Zero number is not allowed",this.tokenStart-e.length),e}var R0="Ratio",D0={left:String,right:String};function mf(){const e=this.tokenStart,t=hf.call(this);let r;return this.skipSC(),this.eatDelim(N0),r=hf.call(this),{type:"Ratio",loc:this.getLocation(e,this.tokenStart),left:t,right:r}}function I0(e){this.token(10,e.left),this.token(9,"/"),this.token(10,e.right)}var B0=F.__exportAll({generate:()=>$0,name:()=>"Raw",parse:()=>pf,structure:()=>j0});function F0(){return this.tokenIndex>0&&this.lookupType(-1)===13?this.tokenIndex>1?this.getTokenStart(this.tokenIndex-1):this.firstCharOffset:this.tokenStart}var bM="Raw",j0={value:String};function pf(e,t,r){const n=this.getTokenStart(e);let i;return this.skipUntilBalanced(e,t||this.consumeUntilBalanceEnd),r&&this.tokenStart>n?i=F0.call(this):i=this.tokenStart,{type:"Raw",loc:this.getLocation(n,i),value:this.substring(n,i)}}function $0(e){this.tokenize(e.value)}var H0=F.__exportAll({generate:()=>q0,name:()=>V0,parse:()=>bf,structure:()=>U0,walkContext:()=>W0});function gf(e){return this.Raw(e,this.consumeUntilLeftCurlyBracket,!0)}function z0(){const e=this.SelectorList();return e.type!=="Raw"&&this.eof===!1&&this.tokenType!==23&&this.error(),e}var V0="Rule",W0="rule",U0={prelude:["SelectorList","Raw"],block:["Block"]};function bf(){const e=this.tokenIndex,t=this.tokenStart;let r,n;return this.parseRulePrelude?r=this.parseWithFallback(z0,gf):r=gf.call(this,e),n=this.Block(!0),{type:"Rule",loc:this.getLocation(t,this.tokenStart),prelude:r,block:n}}function q0(e){this.node(e.prelude),this.node(e.block)}var G0=F.__exportAll({generate:()=>K0,name:()=>X0,parse:()=>yf,structure:()=>Y0}),X0="Selector",Y0={children:[["TypeSelector","IdSelector","ClassSelector","AttributeSelector","PseudoClassSelector","PseudoElementSelector","Combinator","WhiteSpace"]]};function yf(){const e=this.readSequence(this.scope.Selector);return this.getFirstListNode(e)===null&&this.error("Selector is expected"),{type:"Selector",loc:this.getLocationFromList(e),children:e}}function K0(e){this.children(e)}var Q0=F.__exportAll({generate:()=>tT,name:()=>Z0,parse:()=>vf,structure:()=>eT,walkContext:()=>J0}),Z0="SelectorList",J0="selector",eT={children:[["Selector","Raw"]]};function vf(){const e=this.createList();for(;!this.eof;){if(e.push(this.Selector()),this.tokenType===18){this.next();continue}break}return{type:"SelectorList",loc:this.getLocationFromList(e),children:e}}function tT(e){this.children(e,()=>this.token(18,","))}var pa=92,Ef=34,_f=39;function Sf(e){const t=e.length,r=e.charCodeAt(0),n=r===Ef||r===_f?1:0,i=n===1&&t>1&&e.charCodeAt(t-1)===r?t-2:t-1;let o="";for(let s=n;s<=i;s++){let a=e.charCodeAt(s);if(a===pa){if(s===i){s!==t-1&&(o=e.substr(s+1));break}if(a=e.charCodeAt(++s),Ze(pa,a)){const l=s-1,c=fr(e,l);s=c-1,o+=Su(e.substring(l+1,c))}else a===13&&e.charCodeAt(s+1)===10&&s++}else o+=e[s]}return o}function ga(e,t){const r=t?"'":'"',n=t?_f:Ef;let i="",o=!1;for(let s=0;s<e.length;s++){const a=e.charCodeAt(s);if(a===0){i+="�";continue}if(a<=31||a===127){i+="\\"+a.toString(16),o=!0;continue}a===n||a===pa?(i+="\\"+e.charAt(s),o=!1):(o&&(gt(a)||Rt(a))&&(i+=" "),i+=e.charAt(s),o=!1)}return r+i+r}var rT=F.__exportAll({generate:()=>oT,name:()=>nT,parse:()=>wf,structure:()=>iT}),nT="String",iT={value:String};function wf(){return{type:"String",loc:this.getLocation(this.tokenStart,this.tokenEnd),value:Sf(this.consume(5))}}function oT(e){this.token(5,ga(e.value))}var sT=F.__exportAll({generate:()=>dT,name:()=>lT,parse:()=>Af,structure:()=>uT,walkContext:()=>cT}),aT=33;function Cf(e){return this.Raw(e,null,!1)}var lT="StyleSheet",cT="stylesheet",uT={children:[["Comment","CDO","CDC","Atrule","Rule","Raw"]]};function Af(){const e=this.tokenStart,t=this.createList();let r;for(;!this.eof;){switch(this.tokenType){case 13:this.next();continue;case 25:if(this.charCodeAt(this.tokenStart+2)!==aT){this.next();continue}r=this.Comment();break;case 14:r=this.CDO();break;case 15:r=this.CDC();break;case 3:r=this.parseWithFallback(this.Atrule,Cf);break;default:r=this.parseWithFallback(this.Rule,Cf)}t.push(r)}return{type:"StyleSheet",loc:this.getLocation(e,this.tokenStart),children:t}}function dT(e){this.children(e)}var fT=F.__exportAll({generate:()=>gT,name:()=>mT,parse:()=>kf,structure:()=>pT}),hT=42,Tf=124;function ba(){this.tokenType!==1&&this.isDelim(hT)===!1&&this.error("Identifier or asterisk is expected"),this.next()}var mT="TypeSelector",pT={name:String};function kf(){const e=this.tokenStart;return this.isDelim(Tf)?(this.next(),ba.call(this)):(ba.call(this),this.isDelim(Tf)&&(this.next(),ba.call(this))),{type:"TypeSelector",loc:this.getLocation(e,this.tokenStart),name:this.substrToCursor(e)}}function gT(e){this.tokenize(e.name)}var bT=F.__exportAll({generate:()=>ST,name:()=>ET,parse:()=>xf,structure:()=>_T}),Lf=43,Of=45,ya=63;function un(e,t){let r=0;for(let n=this.tokenStart+e;n<this.tokenEnd;n++){const i=this.charCodeAt(n);if(i===Of&&t&&r!==0)return un.call(this,e+r+1,!1),-1;gt(i)||this.error(t&&r!==0?"Hyphen minus"+(r<6?" or hex digit":"")+" is expected":r<6?"Hex digit is expected":"Unexpected input",n),++r>6&&this.error("Too many hex digits",n)}return this.next(),r}function Hi(e){let t=0;for(;this.isDelim(ya);)++t>e&&this.error("Too many question marks"),this.next()}function yT(e){this.charCodeAt(this.tokenStart)!==e&&this.error((e===Lf?"Plus sign":"Hyphen minus")+" is expected")}function vT(){let e=0;switch(this.tokenType){case 10:if(e=un.call(this,1,!0),this.isDelim(ya)){Hi.call(this,6-e);break}if(this.tokenType===12||this.tokenType===10){yT.call(this,Of),un.call(this,1,!1);break}break;case 12:e=un.call(this,1,!0),e>0&&Hi.call(this,6-e);break;default:if(this.eatDelim(Lf),this.tokenType===1){e=un.call(this,0,!0),e>0&&Hi.call(this,6-e);break}if(this.isDelim(ya)){this.next(),Hi.call(this,5);break}this.error("Hex digit or question mark is expected")}}var ET="UnicodeRange",_T={value:String};function xf(){const e=this.tokenStart;return this.eatIdent("u"),vT.call(this),{type:"UnicodeRange",loc:this.getLocation(e,this.tokenStart),value:this.substrToCursor(e)}}function ST(e){this.tokenize(e.value)}var wT=32,va=92,CT=34,AT=39,TT=40,Pf=41;function kT(e){const t=e.length;let r=4,n=e.charCodeAt(t-1)===Pf?t-2:t-1,i="";for(;r<n&&Rt(e.charCodeAt(r));)r++;for(;r<n&&Rt(e.charCodeAt(n));)n--;for(let o=r;o<=n;o++){let s=e.charCodeAt(o);if(s===va){if(o===n){o!==t-1&&(i=e.substr(o+1));break}if(s=e.charCodeAt(++o),Ze(va,s)){const a=o-1,l=fr(e,a);o=l-1,i+=Su(e.substring(a+1,l))}else s===13&&e.charCodeAt(o+1)===10&&o++}else i+=e[o]}return i}function Nf(e){let t="",r=!1;for(let n=0;n<e.length;n++){const i=e.charCodeAt(n);if(i===0){t+="�";continue}if(i<=31||i===127){t+="\\"+i.toString(16),r=!0;continue}i===wT||i===va||i===CT||i===AT||i===TT||i===Pf?(t+="\\"+e.charAt(n),r=!1):(r&&gt(i)&&(t+=" "),t+=e.charAt(n),r=!1)}return"url("+t+")"}var LT=F.__exportAll({generate:()=>xT,name:()=>"Url",parse:()=>Mf,structure:()=>OT}),yM="Url",OT={value:String};function Mf(){const e=this.tokenStart;let t;switch(this.tokenType){case 7:t=kT(this.consume(7));break;case 2:this.cmpStr(this.tokenStart,this.tokenEnd,"url(")||this.error("Function name must be `url`"),this.eat(2),this.skipSC(),t=Sf(this.consume(5)),this.skipSC(),this.eof||this.eat(22);break;default:this.error("Url or Function is expected")}return{type:"Url",loc:this.getLocation(e,this.tokenStart),value:t}}function xT(e){this.token(7,Nf(e.value))}var PT=F.__exportAll({generate:()=>RT,name:()=>NT,parse:()=>Rf,structure:()=>MT}),NT="Value",MT={children:[[]]};function Rf(){const e=this.tokenStart,t=this.readSequence(this.scope.Value);return{type:"Value",loc:this.getLocation(e,this.tokenStart),children:t}}function RT(e){this.children(e)}var DT=F.__exportAll({generate:()=>jT,name:()=>BT,parse:()=>Df,structure:()=>FT}),IT=Object.freeze({type:"WhiteSpace",loc:null,value:" "}),BT="WhiteSpace",FT={value:String};function Df(){return this.eat(13),IT}function jT(e){this.token(13,e.value)}var If=F.__exportAll({AnPlusB:()=>Qw,Atrule:()=>rC,AtrulePrelude:()=>lC,AttributeSelector:()=>hC,Block:()=>SC,Brackets:()=>OC,CDC:()=>MC,CDO:()=>IC,ClassSelector:()=>jC,Combinator:()=>WC,Comment:()=>QC,Declaration:()=>nA,DeclarationList:()=>yA,Dimension:()=>wA,Function:()=>kA,Hash:()=>NA,IdSelector:()=>$A,Identifier:()=>IA,MediaFeature:()=>WA,MediaQuery:()=>XA,MediaQueryList:()=>ZA,Nth:()=>r0,Number:()=>o0,Operator:()=>c0,Parentheses:()=>h0,Percentage:()=>b0,PseudoClassSelector:()=>_0,PseudoElementSelector:()=>T0,Ratio:()=>P0,Raw:()=>B0,Rule:()=>H0,Selector:()=>G0,SelectorList:()=>Q0,String:()=>rT,StyleSheet:()=>sT,TypeSelector:()=>fT,UnicodeRange:()=>bT,Url:()=>LT,Value:()=>PT,WhiteSpace:()=>DT}),$T={generic:!0,...Kw,node:If},HT=35,zT=42,Bf=43,VT=45,WT=47,UT=117;function Ff(e){switch(this.tokenType){case 4:return this.Hash();case 18:return this.Operator();case 21:return this.Parentheses(this.readSequence,e.recognizer);case 19:return this.Brackets(this.readSequence,e.recognizer);case 5:return this.String();case 12:return this.Dimension();case 11:return this.Percentage();case 10:return this.Number();case 2:return this.cmpStr(this.tokenStart,this.tokenEnd,"url(")?this.Url():this.Function(this.readSequence,e.recognizer);case 7:return this.Url();case 1:return this.cmpChar(this.tokenStart,UT)&&this.cmpChar(this.tokenStart+1,Bf)?this.UnicodeRange():this.Identifier();case 9:{const t=this.charCodeAt(this.tokenStart);if(t===WT||t===zT||t===Bf||t===VT)return this.Operator();t===HT&&this.error("Hex or identifier is expected",this.tokenStart+1);break}}}var qT={getNode:Ff},GT=35,XT=42,YT=43,KT=47,jf=46,QT=62,ZT=124,JT=126;function e1(e,t){t.last!==null&&t.last.type!=="Combinator"&&e!==null&&e.type!=="Combinator"&&t.push({type:"Combinator",loc:null,name:" "})}function t1(){switch(this.tokenType){case 19:return this.AttributeSelector();case 4:return this.IdSelector();case 16:return this.lookupType(1)===16?this.PseudoElementSelector():this.PseudoClassSelector();case 1:return this.TypeSelector();case 10:case 11:return this.Percentage();case 12:this.charCodeAt(this.tokenStart)===jf&&this.error("Identifier is expected",this.tokenStart+1);break;case 9:switch(this.charCodeAt(this.tokenStart)){case YT:case QT:case JT:case KT:return this.Combinator();case jf:return this.ClassSelector();case XT:case ZT:return this.TypeSelector();case GT:return this.IdSelector()}}}var r1={onWhiteSpace:e1,getNode:t1};function n1(){return this.createSingleNodeList(this.Raw(this.tokenIndex,null,!1))}function i1(){const e=this.createList();if(this.skipSC(),e.push(this.Identifier()),this.skipSC(),this.tokenType===18){e.push(this.Operator());const t=this.tokenIndex,r=this.parseCustomProperty?this.Value(null):this.Raw(this.tokenIndex,this.consumeUntilExclamationMarkOrSemicolon,!1);if(r.type==="Value"&&r.children.isEmpty){for(let n=t-this.tokenIndex;n<=0;n++)if(this.lookupType(n)===13){r.children.appendData({type:"WhiteSpace",loc:null,value:" "});break}}e.push(r)}return e}function $f(e){return e!==null&&e.type==="Operator"&&(e.value[e.value.length-1]==="-"||e.value[e.value.length-1]==="+")}var o1={getNode:Ff,onWhiteSpace(e,t){$f(e)&&(e.value=" "+e.value),$f(t.last)&&(t.last.value+=" ")},expression:n1,var:i1},s1=F.__exportAll({AtrulePrelude:()=>qT,Selector:()=>r1,Value:()=>o1}),a1={parse:{prelude:null,block(){return this.Block(!0)}}},l1={parse:{prelude(){const e=this.createList();switch(this.skipSC(),this.tokenType){case 5:e.push(this.String());break;case 7:case 2:e.push(this.Url());break;default:this.error("String or url() is expected")}return(this.lookupNonWSType(0)===1||this.lookupNonWSType(0)===21)&&e.push(this.MediaQueryList()),e},block:null}},c1={parse:{prelude(){return this.createSingleNodeList(this.MediaQueryList())},block(){return this.Block(!1)}}},u1={parse:{prelude(){return this.createSingleNodeList(this.SelectorList())},block(){return this.Block(!0)}}};function d1(){return this.createSingleNodeList(this.Raw(this.tokenIndex,null,!1))}function f1(){return this.skipSC(),this.tokenType===1&&this.lookupNonWSType(1)===16?this.createSingleNodeList(this.Declaration()):Hf.call(this)}function Hf(){const e=this.createList();let t;this.skipSC();e:for(;!this.eof;){switch(this.tokenType){case 25:case 13:this.next();continue;case 2:t=this.Function(d1,this.scope.AtrulePrelude);break;case 1:t=this.Identifier();break;case 21:t=this.Parentheses(f1,this.scope.AtrulePrelude);break;default:break e}e.push(t)}return e}var h1={parse:{prelude(){const e=Hf.call(this);return this.getFirstListNode(e)===null&&this.error("Condition is expected"),e},block(){return this.Block(!1)}}},m1={"font-face":a1,import:l1,media:c1,page:u1,supports:h1},It={parse(){return this.createSingleNodeList(this.SelectorList())}},p1={parse(){return this.createSingleNodeList(this.Selector())}},zf={parse(){return this.createSingleNodeList(this.Identifier())}},zi={parse(){return this.createSingleNodeList(this.Nth())}},g1={dir:zf,has:It,lang:zf,matches:It,is:It,"-moz-any":It,"-webkit-any":It,where:It,not:It,"nth-child":zi,"nth-last-child":zi,"nth-last-of-type":zi,"nth-of-type":zi,slotted:p1},b1=F.__exportAll({AnPlusB:()=>Pd,Atrule:()=>Md,AtrulePrelude:()=>Rd,AttributeSelector:()=>Id,Block:()=>jd,Brackets:()=>$d,CDC:()=>Hd,CDO:()=>zd,ClassSelector:()=>Vd,Combinator:()=>Ud,Comment:()=>qd,Declaration:()=>Yd,DeclarationList:()=>Kd,Dimension:()=>Qd,Function:()=>Zd,Hash:()=>Jd,IdSelector:()=>tf,Identifier:()=>ef,MediaFeature:()=>rf,MediaQuery:()=>nf,MediaQueryList:()=>of,Nth:()=>sf,Number:()=>af,Operator:()=>lf,Parentheses:()=>cf,Percentage:()=>uf,PseudoClassSelector:()=>df,PseudoElementSelector:()=>ff,Ratio:()=>mf,Raw:()=>pf,Rule:()=>bf,Selector:()=>yf,SelectorList:()=>vf,String:()=>wf,StyleSheet:()=>Af,TypeSelector:()=>kf,UnicodeRange:()=>xf,Url:()=>Mf,Value:()=>Rf,WhiteSpace:()=>Df}),y1={parseContext:{default:"StyleSheet",stylesheet:"StyleSheet",atrule:"Atrule",atrulePrelude(e){return this.AtrulePrelude(e.atrule?String(e.atrule):null)},mediaQueryList:"MediaQueryList",mediaQuery:"MediaQuery",rule:"Rule",selectorList:"SelectorList",selector:"Selector",block(){return this.Block(!0)},declarationList:"DeclarationList",declaration:"Declaration",value:"Value"},scope:s1,atrule:m1,pseudo:g1,node:b1},v1={node:If},E1=Yw({...$T,...y1,...v1});function Ea(e){const t={};for(const r in e){let n=e[r];n&&(Array.isArray(n)||n instanceof ae?n=n.map(Ea):n.constructor===Object&&(n=Ea(n))),t[r]=n}return t}var{tokenize:vM,parse:_1,generate:tt,lexer:Vf,createLexer:EM,walk:Ae,find:_M,findLast:SM,findAll:wM,toPlainObject:CM,fromPlainObject:AM,fork:S1}=E1,{hasOwnProperty:w1}=Object.prototype;function _a(e,t){const r=Object.create(null);if(!Array.isArray(e))return null;for(let n of e)t&&(n=n.toLowerCase()),r[n]=!0;return r}function Wf(e){if(!e)return null;const t=_a(e.tags,!0),r=_a(e.ids),n=_a(e.classes);return t===null&&r===null&&n===null?null:{tags:t,ids:r,classes:n}}function C1(e){let t=!1;if(e.scopes&&Array.isArray(e.scopes)){t=Object.create(null);for(let r=0;r<e.scopes.length;r++){const n=e.scopes[r];if(!n||!Array.isArray(n))throw new Error("Wrong usage format");for(const i of n){if(w1.call(t,i))throw new Error(`Class can't be used for several scopes: ${i}`);t[i]=r+1}}}return{whitelist:Wf(e),blacklist:Wf(e.blacklist),scopes:t}}function Bt(e){return!e||!e.children||e.children.isEmpty}function Uf(e,t){return e!==null&&e.children===t}function A1(e,t,r){if(e.block&&(this.stylesheet!==null&&(this.stylesheet.firstAtrulesAllowed=!1),Bt(e.block))){r.remove(t);return}switch(e.name){case"charset":if(Bt(e.prelude)){r.remove(t);return}if(t.prev){r.remove(t);return}break;case"import":if(this.stylesheet===null||!this.stylesheet.firstAtrulesAllowed){r.remove(t);return}r.prevUntil(t.prev,function(n){if(!(n.type==="Atrule"&&(n.name==="import"||n.name==="charset")))return this.root.firstAtrulesAllowed=!1,r.remove(t),!0},this);break;default:{const n=ze(e.name).basename;(n==="keyframes"||n==="media"||n==="supports")&&(Bt(e.prelude)||Bt(e.block))&&r.remove(t)}}}function T1(e,t,r){r.remove(t)}function k1(e,t,r){if(e.value.children&&e.value.children.isEmpty){r.remove(t);return}pr(e.property).custom&&/\S/.test(e.value.value)&&(e.value.value=e.value.value.trim())}function L1(e,t,r){(Uf(this.stylesheet,r)||Uf(this.block,r))&&r.remove(t)}var{hasOwnProperty:Sr}=Object.prototype,O1=new Set(["keyframes"]);function qf(e,t){return e.children.forEach((r,n,i)=>{let o=!1;Ae(r,function(s){if(this.selector===null||this.selector===e)switch(s.type){case"SelectorList":(this.function===null||this.function.name.toLowerCase()!=="not")&&qf(s,t)&&(o=!0);break;case"ClassSelector":t.whitelist!==null&&t.whitelist.classes!==null&&!Sr.call(t.whitelist.classes,s.name)&&(o=!0),t.blacklist!==null&&t.blacklist.classes!==null&&Sr.call(t.blacklist.classes,s.name)&&(o=!0);break;case"IdSelector":t.whitelist!==null&&t.whitelist.ids!==null&&!Sr.call(t.whitelist.ids,s.name)&&(o=!0),t.blacklist!==null&&t.blacklist.ids!==null&&Sr.call(t.blacklist.ids,s.name)&&(o=!0);break;case"TypeSelector":s.name.charAt(s.name.length-1)!=="*"&&(t.whitelist!==null&&t.whitelist.tags!==null&&!Sr.call(t.whitelist.tags,s.name.toLowerCase())&&(o=!0),t.blacklist!==null&&t.blacklist.tags!==null&&Sr.call(t.blacklist.tags,s.name.toLowerCase())&&(o=!0))}}),o&&i.remove(n)}),e.children.isEmpty}function x1(e,t,r,n){if(Bt(e.prelude)||Bt(e.block)){r.remove(t);return}if(this.atrule&&O1.has(ze(this.atrule.name).basename))return;const{usage:i}=n;if(i&&(i.whitelist!==null||i.blacklist!==null)&&(qf(e.prelude,i),Bt(e.prelude))){r.remove(t);return}}function P1(e,t,r){if(t.data.name!=="*")return;const n=t.next&&t.next.data.type;(n==="IdSelector"||n==="ClassSelector"||n==="AttributeSelector"||n==="PseudoClassSelector"||n==="PseudoElementSelector")&&r.remove(t)}function N1(e,t,r){r.remove(t)}var Gf={Atrule:A1,Comment:T1,Declaration:k1,Raw:L1,Rule:x1,TypeSelector:P1,WhiteSpace:N1};function M1(e,t){Ae(e,{leave(r,n,i){Gf.hasOwnProperty(r.type)&&Gf[r.type].call(this,r,n,i,t)}})}function R1(e){e.block.children.forEach(t=>{t.prelude.children.forEach(r=>{r.children.forEach((n,i)=>{n.type==="Percentage"&&n.value==="100"?i.data={type:"TypeSelector",loc:n.loc,name:"to"}:n.type==="TypeSelector"&&n.name==="from"&&(i.data={type:"Percentage",loc:n.loc,value:"0"})})})})}function D1(e){ze(e.name).basename==="keyframes"&&R1(e)}var I1=/^(-?\d|--)|[\u0000-\u002c\u002e\u002f\u003A-\u0040\u005B-\u005E\u0060\u007B-\u009f]/;function B1(e){return e===""||e==="-"?!1:!I1.test(e)}function F1(e){const t=e.value;!t||t.type!=="String"||B1(t.value)&&(e.value={type:"Identifier",loc:t.loc,name:t.value})}function j1(e){const t=e.children;t.forEachRight(function(r,n){if(r.type==="Identifier"){if(r.name==="bold")n.data={type:"Number",loc:r.loc,value:"700"};else if(r.name==="normal"){const i=n.prev;i&&i.data.type==="Operator"&&i.data.value==="/"&&this.remove(i),this.remove(n)}}}),t.isEmpty&&t.insert(t.createItem({type:"Identifier",name:"normal"}))}function $1(e){const t=e.children.head.data;if(t.type==="Identifier")switch(t.name){case"normal":e.children.head.data={type:"Number",loc:t.loc,value:"400"};break;case"bold":e.children.head.data={type:"Number",loc:t.loc,value:"700"}}}function H1(e){function t(){n.length||n.unshift({type:"Number",loc:null,value:"0"},{type:"Number",loc:null,value:"0"}),r.push.apply(r,n),n=[]}let r=[],n=[];e.children.forEach(i=>{if(i.type==="Operator"&&i.value===","){t(),r.push(i);return}i.type==="Identifier"&&(i.name==="transparent"||i.name==="none"||i.name==="repeat"||i.name==="scroll")||n.push(i)}),t(),e.children=new ae().fromArray(r)}function Xf(e){e.children.forEach((t,r,n)=>{t.type==="Identifier"&&t.name.toLowerCase()==="none"&&(n.head===n.tail?r.data={type:"Number",loc:t.loc,value:"0"}:n.remove(r))})}var Yf={font:j1,"font-weight":$1,background:H1,border:Xf,outline:Xf};function z1(e){if(!this.declaration)return;const t=pr(this.declaration.property);Yf.hasOwnProperty(t.basename)&&Yf[t.basename](e)}var V1=/^(?:\+|(-))?0*(\d*)(?:\.0*|(\.\d*?)0*)?$/,W1=/^([\+\-])?0*(\d*)(?:\.0*|(\.\d*?)0*)?$/,U1=new Set(["Dimension","Hash","Identifier","Number","Raw","UnicodeRange"]);function Vi(e,t){const r=t&&t.prev!==null&&U1.has(t.prev.data.type)?W1:V1;return e=String(e).replace(r,"$1$2$3"),(e===""||e==="-")&&(e="0"),e}function q1(e){e.value=Vi(e.value)}var G1=new Set(["calc","min","max","clamp"]),X1=new Set(["px","mm","cm","in","pt","pc","em","ex","ch","rem","vh","vw","vmin","vmax","vm"]);function Y1(e,t){const r=Vi(e.value);if(e.value=r,r==="0"&&this.declaration!==null&&this.atrulePrelude===null){const n=e.unit.toLowerCase();if(!X1.has(n)||this.declaration.property==="-ms-flex"||this.declaration.property==="flex"||this.function&&G1.has(this.function.name))return;t.data={type:"Number",loc:e.loc,value:r}}}var K1=new Set(["width","min-width","max-width","height","min-height","max-height","flex","-ms-flex"]);function Q1(e,t){e.value=Vi(e.value),e.value==="0"&&this.declaration&&!K1.has(this.declaration.property)&&(t.data={type:"Number",loc:e.loc,value:e.value},Vf.matchDeclaration(this.declaration).isType(t.data,"length")||(t.data=e))}function Z1(e){e.value=e.value.replace(/\\/g,"/")}var Kf={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"0ff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000",blanchedalmond:"ffebcd",blue:"00f",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"0ff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgrey:"a9a9a9",darkgreen:"006400",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkslategrey:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dimgrey:"696969",dodgerblue:"1e90ff",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"f0f",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",grey:"808080",green:"008000",greenyellow:"adff2f",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgray:"d3d3d3",lightgrey:"d3d3d3",lightgreen:"90ee90",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslategray:"789",lightslategrey:"789",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"0f0",limegreen:"32cd32",linen:"faf0e6",magenta:"f0f",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370db",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"db7093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",rebeccapurple:"639",red:"f00",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",slategrey:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",wheat:"f5deb3",white:"fff",whitesmoke:"f5f5f5",yellow:"ff0",yellowgreen:"9acd32"},Qf={8e5:"maroon",800080:"purple",808e3:"olive",808080:"gray","00ffff":"cyan",f0ffff:"azure",f5f5dc:"beige",ffe4c4:"bisque","000000":"black","0000ff":"blue",a52a2a:"brown",ff7f50:"coral",ffd700:"gold","008000":"green","4b0082":"indigo",fffff0:"ivory",f0e68c:"khaki","00ff00":"lime",faf0e6:"linen","000080":"navy",ffa500:"orange",da70d6:"orchid",cd853f:"peru",ffc0cb:"pink",dda0dd:"plum",f00:"red",ff0000:"red",fa8072:"salmon",a0522d:"sienna",c0c0c0:"silver",fffafa:"snow",d2b48c:"tan","008080":"teal",ff6347:"tomato",ee82ee:"violet",f5deb3:"wheat",ffffff:"white",ffff00:"yellow"};function Sa(e,t,r){return r<0&&(r+=1),r>1&&(r-=1),r<1/6?e+(t-e)*6*r:r<1/2?t:r<2/3?e+(t-e)*(2/3-r)*6:e}function Zf(e,t,r,n){let i,o,s;if(t===0)i=o=s=r;else{const a=r<.5?r*(1+t):r+t-r*t,l=2*r-a;i=Sa(l,a,e+1/3),o=Sa(l,a,e),s=Sa(l,a,e-1/3)}return[Math.round(i*255),Math.round(o*255),Math.round(s*255),n]}function wa(e){return e=e.toString(16),e.length===1?"0"+e:e}function Ca(e,t,r){let n=e.head,i=[],o=!1;for(;n!==null;){const{type:s,value:a}=n.data;switch(s){case"Number":case"Percentage":if(o)return;o=!0,i.push({type:s,value:Number(a)});break;case"Operator":if(a===","){if(!o)return;o=!1}else if(o||a!=="+")return;break;default:return}n=n.next}if(i.length===t){if(i.length===4){if(i[3].type!=="Number")return;i[3].type="Alpha"}if(r){if(i[0].type!==i[1].type||i[0].type!==i[2].type)return}else{if(i[0].type!=="Number"||i[1].type!=="Percentage"||i[2].type!=="Percentage")return;i[0].type="Angle"}return i.map(function(s){let a=Math.max(0,s.value);switch(s.type){case"Number":a=Math.min(a,255);break;case"Percentage":if(a=Math.min(a,100)/100,!r)return a;a=255*a;break;case"Angle":return(a%360+360)%360/360;case"Alpha":return Math.min(a,1)}return Math.round(a)})}}function J1(e,t){let r=e.name,n;if(r==="rgba"||r==="hsla"){if(n=Ca(e.children,4,r==="rgba"),!n)return;if(r==="hsla"&&(n=Zf(...n),e.name="rgba"),n[3]===0){const i=this.function&&this.function.name;if(n[0]===0&&n[1]===0&&n[2]===0||!/^(?:to|from|color-stop)$|gradient$/i.test(i)){t.data={type:"Identifier",loc:e.loc,name:"transparent"};return}}if(n[3]!==1){e.children.forEach((i,o,s)=>{if(i.type==="Operator"){i.value!==","&&s.remove(o);return}o.data={type:"Number",loc:i.loc,value:Vi(n.shift())}});return}r="rgb"}if(r==="hsl"){if(n=n||Ca(e.children,3,!1),!n)return;n=Zf(...n),r="rgb"}if(r==="rgb"){if(n=n||Ca(e.children,3,!0),!n)return;t.data={type:"Hash",loc:e.loc,value:wa(n[0])+wa(n[1])+wa(n[2])},Jf(t.data,t)}}function ek(e,t){if(this.declaration===null)return;let r=e.name.toLowerCase();if(Kf.hasOwnProperty(r)&&Vf.matchDeclaration(this.declaration).isType(e,"color")){const n=Kf[r];n.length+1<=r.length?t.data={type:"Hash",loc:e.loc,value:n}:(r==="grey"&&(r="gray"),e.name=r)}}function Jf(e,t){let r=e.value.toLowerCase();r.length===6&&r[0]===r[1]&&r[2]===r[3]&&r[4]===r[5]&&(r=r[0]+r[2]+r[4]),Qf[r]?t.data={type:"Identifier",loc:e.loc,name:Qf[r]}:e.value=r}var eh={Atrule:D1,AttributeSelector:F1,Value:z1,Dimension:Y1,Percentage:Q1,Number:q1,Url:Z1,Hash:Jf,Identifier:ek,Function:J1};function tk(e){Ae(e,{leave(t,r,n){eh.hasOwnProperty(t.type)&&eh[t.type].call(this,t,r,n)}})}var rk=class{constructor(){this.map=new Map}resolve(e){let t=this.map.get(e);return t===void 0&&(t=this.map.size+1,this.map.set(e,t)),t}};function nk(){const e=new rk;return function(r){const n=tt(r);return r.id=e.resolve(n),r.length=n.length,r.fingerprint=null,r}}function ik(e){return e.type==="Raw"?_1(e.value,{context:"selectorList"}):e}function ok(e,t){for(let r=0;r<3;r++)if(e[r]!==t[r])return e[r]>t[r]?e:t;return e}function th(e){return ik(e).children.reduce((t,r)=>ok(Aa(r),t),[0,0,0])}function Aa(e){let t=0,r=0,n=0;return e.children.forEach(i=>{switch(i.type){case"IdSelector":t++;break;case"ClassSelector":case"AttributeSelector":r++;break;case"PseudoClassSelector":switch(i.name.toLowerCase()){case"not":case"has":case"is":case"matches":case"-webkit-any":case"-moz-any":{const[o,s,a]=th(i.children.first);t+=o,r+=s,n+=a;break}case"nth-child":case"nth-last-child":{const o=i.children.first;if(o.type==="Nth"&&o.selector){const[s,a,l]=th(o.selector);t+=s,r+=a+1,n+=l}else r++;break}case"where":break;case"before":case"after":case"first-line":case"first-letter":n++;break;default:r++}break;case"TypeSelector":i.name.endsWith("*")||n++;break;case"PseudoElementSelector":n++}}),[t,r,n]}var sk=new Set(["first-letter","first-line","after","before"]),ak=new Set(["link","visited","hover","active","first-letter","first-line","after","before"]);function lk(e,t){const r=new Set;e.prelude.children.forEach(function(n){let i="*",o=0;n.children.forEach(function(s){switch(s.type){case"ClassSelector":if(t&&t.scopes){const a=t.scopes[s.name]||0;if(o!==0&&a!==o)throw new Error("Selector can't has classes from different scopes: "+tt(n));o=a}break;case"PseudoClassSelector":{const a=s.name.toLowerCase();ak.has(a)||r.add(`:${a}`);break}case"PseudoElementSelector":{const a=s.name.toLowerCase();sk.has(a)||r.add(`::${a}`);break}case"TypeSelector":i=s.name.toLowerCase();break;case"AttributeSelector":s.flags&&r.add(`[${s.flags.toLowerCase()}]`);break;case"Combinator":i="*"}}),n.compareMarker=Aa(n).toString(),n.id=null,n.id=tt(n),o&&(n.compareMarker+=":"+o),i!=="*"&&(n.compareMarker+=","+i)}),e.pseudoSignature=r.size>0?[...r].sort().join(","):!1}function ck(e,t){const r=nk();return Ae(e,{visit:"Rule",enter(n){n.block.children.forEach(r),lk(n,t.usage)}}),Ae(e,{visit:"Atrule",enter(n){n.prelude&&(n.prelude.id=null,n.prelude.id=tt(n.prelude)),ze(n.name).basename==="keyframes"&&(n.block.avoidRulesMerge=!0,n.block.children.forEach(function(i){i.prelude.children.forEach(function(o){o.compareMarker=o.id})}))}}),{declaration:r}}var{hasOwnProperty:rh}=Object.prototype;function nh(e,t,r,n){const i=t.data,o=ze(i.name).basename,s=i.name.toLowerCase()+"/"+(i.prelude?i.prelude.id:null);rh.call(e,o)||(e[o]=Object.create(null)),n&&delete e[o][s],rh.call(e[o],s)||(e[o][s]=new ae),e[o][s].append(r.remove(t))}function uk(e,t){const r=Object.create(null);let n=null;e.children.forEach(function(i,o,s){if(i.type==="Atrule"){const a=ze(i.name).basename;switch(a){case"keyframes":nh(r,o,s,!0);return;case"media":if(t.forceMediaMerge){nh(r,o,s,!1);return}}n===null&&a!=="charset"&&a!=="import"&&(n=o)}else n===null&&(n=o)});for(const i in r)for(const o in r[i])e.children.insertList(r[i][o],i==="media"?null:n)}function ih(e){return e.type==="Atrule"&&e.name==="media"}function dk(e,t,r){if(!ih(e))return;const n=t.prev&&t.prev.data;!n||!ih(n)||e.prelude&&n.prelude&&e.prelude.id===n.prelude.id&&(n.block.children.appendList(e.block.children),r.remove(t))}function fk(e,t){uk(e,t),Ae(e,{visit:"Atrule",reverse:!0,enter:dk})}var{hasOwnProperty:hk}=Object.prototype;function oh(e,t){let r=e.head,n=t.head;for(;r!==null&&n!==null&&r.data.id===n.data.id;)r=r.next,n=n.next;return r===null&&n===null}function sh(e,t){let r=e.head,n=t.head;for(;r!==null&&n!==null&&r.data.id===n.data.id;)r=r.next,n=n.next;return r===null&&n===null}function mk(e,t){const r={eq:[],ne1:[],ne2:[],ne2overrided:[]},n=Object.create(null),i=Object.create(null);for(let o=t.head;o;o=o.next)i[o.data.id]=!0;for(let o=e.head;o;o=o.next){const s=o.data;s.fingerprint&&(n[s.fingerprint]=s.important),i[s.id]?(i[s.id]=!1,r.eq.push(s)):r.ne1.push(s)}for(let o=t.head;o;o=o.next){const s=o.data;i[s.id]&&((!hk.call(n,s.fingerprint)||!n[s.fingerprint]&&s.important)&&r.ne2.push(s),r.ne2overrided.push(s))}return r}function dn(e,t){return t.forEach(r=>{const n=r.id;let i=e.head;for(;i;){const o=i.data.id;if(o===n)return;if(o>n)break;i=i.next}e.insert(e.createItem(r),i)}),e}function ah(e,t){let r=e.head;for(;r!==null;){let n=t.head;for(;n!==null;){if(r.data.compareMarker===n.data.compareMarker)return!0;n=n.next}r=r.next}return!1}function Wi(e){switch(e.type){case"Rule":return ah(e.prelude.children,this);case"Atrule":if(e.block)return e.block.children.some(Wi,this);break;case"Declaration":return!1}return!0}function pk(e,t,r){const n=e.prelude.children,i=e.block.children;r.prevUntil(t.prev,function(o){if(o.type!=="Rule")return Wi.call(n,o);const s=o.prelude.children,a=o.block.children;if(e.pseudoSignature===o.pseudoSignature){if(oh(s,n))return a.appendList(i),r.remove(t),!0;if(sh(i,a))return dn(s,n),r.remove(t),!0}return ah(n,s)})}function gk(e){Ae(e,{visit:"Rule",enter:pk})}function bk(e,t,r){const n=e.prelude.children;for(;n.head!==n.tail;){const i=new ae;i.insert(n.remove(n.head)),r.insert(r.createItem({type:"Rule",loc:e.loc,prelude:{type:"SelectorList",loc:e.prelude.loc,children:i},block:{type:"Block",loc:e.block.loc,children:e.block.children.copy()},pseudoSignature:e.pseudoSignature}),t)}}function yk(e){Ae(e,{visit:"Rule",reverse:!0,enter:bk})}var lh=1,vk=2,wr=0,fn=1,Ta=2,Ui=3,ch=["top","right","bottom","left"],Ek={"margin-top":"top","margin-right":"right","margin-bottom":"bottom","margin-left":"left","padding-top":"top","padding-right":"right","padding-bottom":"bottom","padding-left":"left","border-top-color":"top","border-right-color":"right","border-bottom-color":"bottom","border-left-color":"left","border-top-width":"top","border-right-width":"right","border-bottom-width":"bottom","border-left-width":"left","border-top-style":"top","border-right-style":"right","border-bottom-style":"bottom","border-left-style":"left"},uh={margin:"margin","margin-top":"margin","margin-right":"margin","margin-bottom":"margin","margin-left":"margin",padding:"padding","padding-top":"padding","padding-right":"padding","padding-bottom":"padding","padding-left":"padding","border-color":"border-color","border-top-color":"border-color","border-right-color":"border-color","border-bottom-color":"border-color","border-left-color":"border-color","border-width":"border-width","border-top-width":"border-width","border-right-width":"border-width","border-bottom-width":"border-width","border-left-width":"border-width","border-style":"border-style","border-top-style":"border-style","border-right-style":"border-style","border-bottom-style":"border-style","border-left-style":"border-style"},_k=class{constructor(e){this.name=e,this.loc=null,this.iehack=void 0,this.sides={top:null,right:null,bottom:null,left:null}}getValueSequence(e,t){const r=[];let n="";return e.value.type!=="Value"||e.value.children.some(function(i){let o=!1;switch(i.type){case"Identifier":switch(i.name){case"\\0":case"\\9":n=i.name;return;case"inherit":case"initial":case"unset":case"revert":o=i.name}break;case"Dimension":switch(i.unit){case"rem":case"vw":case"vh":case"vmin":case"vmax":case"vm":o=i.unit}break;case"Hash":case"Number":case"Percentage":break;case"Function":if(i.name==="var")return!0;o=i.name;break;default:return!0}r.push({node:i,special:o,important:e.important})})||r.length>t||typeof this.iehack=="string"&&this.iehack!==n?!1:(this.iehack=n,r)}canOverride(e,t){const r=this.sides[e];return!r||t.important&&!r.important}add(e,t){function r(){const n=this.sides,i=Ek[e];if(i){if(!(i in n))return!1;const o=this.getValueSequence(t,1);if(!o||!o.length)return!1;for(const s in n)if(n[s]!==null&&n[s].special!==o[0].special)return!1;return this.canOverride(i,o[0])&&(n[i]=o[0]),!0}else if(e===this.name){const o=this.getValueSequence(t,4);if(!o||!o.length)return!1;switch(o.length){case 1:o[fn]=o[wr],o[Ta]=o[wr],o[Ui]=o[wr];break;case 2:o[Ta]=o[wr],o[Ui]=o[fn];break;case 3:o[Ui]=o[fn]}for(let s=0;s<4;s++)for(const a in n)if(n[a]!==null&&n[a].special!==o[s].special)return!1;for(let s=0;s<4;s++)this.canOverride(ch[s],o[s])&&(n[ch[s]]=o[s]);return!0}}return r.call(this)?(this.loc||(this.loc=t.loc),!0):!1}isOkToMinimize(){const e=this.sides.top,t=this.sides.right,r=this.sides.bottom,n=this.sides.left;if(e&&t&&r&&n){const i=e.important+t.important+r.important+n.important;return i===0||i===4}return!1}getValue(){const e=new ae,t=this.sides,r=[t.top,t.right,t.bottom,t.left],n=[tt(t.top.node),tt(t.right.node),tt(t.bottom.node),tt(t.left.node)];n[Ui]===n[fn]&&(r.pop(),n[Ta]===n[wr]&&(r.pop(),n[fn]===n[wr]&&r.pop()));for(let i=0;i<r.length;i++)e.appendData(r[i].node);return this.iehack&&e.appendData({type:"Identifier",loc:null,name:this.iehack}),{type:"Value",loc:null,children:e}}getDeclaration(){return{type:"Declaration",loc:this.loc,important:this.sides.top.important,property:this.name,value:this.getValue()}}};function Sk(e,t,r,n){const i=e.block.children,o=e.prelude.children.first.id;return e.block.children.forEachRight(function(s,a){const l=s.property;if(!uh.hasOwnProperty(l))return;const c=uh[l];let u,d;if((!n||o===n)&&c in t&&(d=vk,u=t[c]),(!u||!u.add(l,s))&&(d=lh,u=new _k(c),!u.add(l,s))){n=null;return}t[c]=u,r.push({operation:d,block:i,item:a,shorthand:u}),n=o}),n}function wk(e,t){e.forEach(function(r){const n=r.shorthand;n.isOkToMinimize()&&(r.operation===lh?r.item.data=t(n.getDeclaration()):r.block.remove(r.item))})}function Ck(e,t){const r={},n=[];Ae(e,{visit:"Rule",reverse:!0,enter(i){const o=this.block||this.stylesheet,s=(i.pseudoSignature||"")+"|"+i.prelude.children.first.id;let a,l;r.hasOwnProperty(o.id)?a=r[o.id]:(a={lastShortSelector:null},r[o.id]=a),a.hasOwnProperty(s)?l=a[s]:(l={},a[s]=l),a.lastShortSelector=Sk.call(this,i,l,n,a.lastShortSelector)}}),wk(n,t.declaration)}var Ak=1,Tk=new Set(["src"]),dh={display:/table|ruby|flex|-(flex)?box$|grid|contents|run-in/i,"text-align":/^(start|end|match-parent|justify-all)$/i},fh={cursor:["auto","crosshair","default","move","text","wait","help","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","pointer","progress","not-allowed","no-drop","vertical-text","all-scroll","col-resize","row-resize"],overflow:["hidden","visible","scroll","auto"],position:["static","relative","absolute","fixed"]},hh={"border-width":["border"],"border-style":["border"],"border-color":["border"],"border-top":["border"],"border-right":["border"],"border-bottom":["border"],"border-left":["border"],"border-top-width":["border-top","border-width","border"],"border-right-width":["border-right","border-width","border"],"border-bottom-width":["border-bottom","border-width","border"],"border-left-width":["border-left","border-width","border"],"border-top-style":["border-top","border-style","border"],"border-right-style":["border-right","border-style","border"],"border-bottom-style":["border-bottom","border-style","border"],"border-left-style":["border-left","border-style","border"],"border-top-color":["border-top","border-color","border"],"border-right-color":["border-right","border-color","border"],"border-bottom-color":["border-bottom","border-color","border"],"border-left-color":["border-left","border-color","border"],"margin-top":["margin"],"margin-right":["margin"],"margin-bottom":["margin"],"margin-left":["margin"],"padding-top":["padding"],"padding-right":["padding"],"padding-bottom":["padding"],"padding-left":["padding"],"font-style":["font"],"font-variant":["font"],"font-weight":["font"],"font-size":["font"],"font-family":["font"],"list-style-type":["list-style"],"list-style-position":["list-style"],"list-style-image":["list-style"]};function mh(e,t,r){const n=pr(e).basename;if(n==="background")return e+":"+tt(t.value);const i=t.id;let o=r[i];if(!o){switch(t.value.type){case"Value":const s={};let a="",l="",c=!1;t.value.children.forEach(function u(d){switch(d.type){case"Value":case"Brackets":case"Parentheses":d.children.forEach(u);break;case"Raw":c=!0;break;case"Identifier":{const{name:h}=d;a||(a=ze(h).vendor),/\\[09]/.test(h)&&(l=RegExp.lastMatch),fh.hasOwnProperty(n)?fh[n].indexOf(h)===-1&&(s[h]=!0):dh.hasOwnProperty(n)&&dh[n].test(h)&&(s[h]=!0);break}case"Function":{let{name:h}=d;a||(a=ze(h).vendor),h==="rect"&&(d.children.some(f=>f.type==="Operator"&&f.value===",")||(h="rect-backward")),s[h+"()"]=!0,d.children.forEach(u);break}case"Dimension":{const{unit:h}=d;switch(/\\[09]/.test(h)&&(l=RegExp.lastMatch),h){case"rem":case"vw":case"vh":case"vmin":case"vmax":case"vm":s[h]=!0}break}}}),o=c?"!"+Ak++:"!"+Object.keys(s).sort()+"|"+l+a;break;case"Raw":o="!"+t.value.value;break;default:o=tt(t.value)}r[i]=o}return e+o}function kk(e,t,r){const n=pr(t.property);if(hh.hasOwnProperty(n.basename)){const i=hh[n.basename];for(const o of i){const s=mh(n.prefix+o,t,r),a=e.hasOwnProperty(s)?e[s]:null;if(a&&(!t.important||a.item.data.important))return a}}}function Lk(e,t,r,n,i){const o=e.block.children;o.forEachRight(function(s,a){const{property:l}=s,c=mh(l,s,i),u=n[c];u&&!Tk.has(l)?s.important&&!u.item.data.important?(n[c]={block:o,item:a},u.block.remove(u.item)):o.remove(a):kk(n,s,i)?o.remove(a):(s.fingerprint=c,n[c]={block:o,item:a})}),o.isEmpty&&r.remove(t)}function Ok(e){const t={},r=Object.create(null);Ae(e,{visit:"Rule",reverse:!0,enter(n,i,o){const s=this.block||this.stylesheet,a=(n.pseudoSignature||"")+"|"+n.prelude.children.first.id;let l,c;t.hasOwnProperty(s.id)?l=t[s.id]:(l={},t[s.id]=l),l.hasOwnProperty(a)?c=l[a]:(c={},l[a]=c),Lk.call(this,n,i,o,c,r)}})}function xk(e,t,r){const n=e.prelude.children,i=e.block.children,o=n.first.compareMarker,s={};r.nextUntil(t.next,function(a,l){if(a.type!=="Rule")return Wi.call(n,a);if(e.pseudoSignature!==a.pseudoSignature)return!0;const c=a.prelude.children.head,u=a.block.children,d=c.data.compareMarker;if(d in s)return!0;if(n.head===n.tail&&n.first.id===c.data.id){i.appendList(u),r.remove(l);return}if(sh(i,u)){const h=c.data.id;n.some((f,g)=>{const y=f.id;if(h<y)return n.insert(c,g),!0;if(!g.next)return n.insert(c),!0}),r.remove(l);return}if(d===o)return!0;s[d]=!0})}function Pk(e){Ae(e,{visit:"Rule",enter:xk})}function ka(e){return e.reduce((t,r)=>t+r.id.length+1,0)-1}function La(e){let t=0;for(const r of e)t+=r.length;return t+e.length-1}function Nk(e,t,r){const n=this.block!==null?this.block.avoidRulesMerge:!1,i=e.prelude.children,o=e.block,s=Object.create(null);let a=!0,l=!0;r.prevUntil(t.prev,function(c,u){const d=c.block,h=c.type;if(h!=="Rule"){const y=Wi.call(i,c);return!y&&h==="Atrule"&&d&&Ae(d,{visit:"Rule",enter(A){A.prelude.children.forEach(L=>{s[L.compareMarker]=!0})}}),y}if(e.pseudoSignature!==c.pseudoSignature)return!0;const f=c.prelude.children;if(l=!f.some(y=>y.compareMarker in s),!l&&!a)return!0;if(a&&oh(f,i))return d.children.appendList(o.children),r.remove(t),!0;const g=mk(o.children,d.children);if(g.eq.length){if(!g.ne1.length&&!g.ne2.length)return l&&(dn(i,f),r.remove(u)),!0;if(!n)if(g.ne1.length&&!g.ne2.length){const y=ka(i),A=La(g.eq);a&&y<A&&(dn(f,i),o.children.fromArray(g.ne1))}else if(!g.ne1.length&&g.ne2.length){const y=ka(f),A=La(g.eq);l&&y<A&&(dn(i,f),d.children.fromArray(g.ne2))}else{const y={type:"SelectorList",loc:null,children:dn(f.copy(),i)},A=ka(y.children)+2;if(La(g.eq)>=A){const L=r.createItem({type:"Rule",loc:null,prelude:y,block:{type:"Block",loc:null,children:new ae().fromArray(g.eq)},pseudoSignature:e.pseudoSignature});return o.children.fromArray(g.ne1),d.children.fromArray(g.ne2overrided),a?r.insert(L,u):r.insert(L,t),!0}}}a&&(a=!f.some(y=>i.some(A=>A.compareMarker===y.compareMarker))),f.forEach(y=>{s[y.compareMarker]=!0})})}function Mk(e){Ae(e,{visit:"Rule",reverse:!0,enter:Nk})}function Rk(e,t){const r=ck(e,t);t.logger("prepare",e),fk(e,t),t.logger("mergeAtrule",e),gk(e),t.logger("initialMergeRuleset",e),yk(e),t.logger("disjoinRuleset",e),Ck(e,r),t.logger("restructShorthand",e),Ok(e),t.logger("restructBlock",e),Pk(e),t.logger("mergeRuleset",e),Mk(e),t.logger("restructRuleset",e)}function Dk(e,t){const r=new ae;let n=!1,i;return e.nextUntil(e.head,(o,s,a)=>{if(o.type==="Comment"){if(!t||o.value.charAt(0)!=="!"){a.remove(s);return}if(n||i)return!0;a.remove(s),i=o;return}o.type!=="WhiteSpace"&&(n=!0),r.insert(a.remove(s))}),{comment:i,stylesheet:{type:"StyleSheet",loc:null,children:r}}}function Ik(e,t,r,n){n.logger(`Compress block #${r}`,null,!0);let i=1;return e.type==="StyleSheet"&&(e.firstAtrulesAllowed=t,e.id=i++),Ae(e,{visit:"Atrule",enter(o){o.block!==null&&(o.block.id=i++)}}),n.logger("init",e),M1(e,n),n.logger("clean",e),tk(e,n),n.logger("replace",e),n.restructuring&&Rk(e,n),e}function Bk(e){let t="comments"in e?e.comments:"exclamation";return typeof t=="boolean"?t=t?"exclamation":!1:t!=="exclamation"&&t!=="first-exclamation"&&(t=!1),t}function Fk(e){return"restructure"in e?e.restructure:"restructuring"in e?e.restructuring:!0}function jk(e){return new ae().appendData({type:"Rule",loc:null,prelude:{type:"SelectorList",loc:null,children:new ae().appendData({type:"Selector",loc:null,children:new ae().appendData({type:"TypeSelector",loc:null,name:"x"})})},block:e})}function $k(e,t){e=e||{type:"StyleSheet",loc:null,children:new ae},t=t||{};const r={logger:typeof t.logger=="function"?t.logger:function(){},restructuring:Fk(t),forceMediaMerge:!!t.forceMediaMerge,usage:t.usage?C1(t.usage):!1},n=new ae;let i=Bk(t),o=!0,s,a,l=1,c;t.clone&&(e=Ea(e)),e.type==="StyleSheet"?(s=e.children,e.children=n):s=jk(e);do{if(a=Dk(s,!!i),Ik(a.stylesheet,o,l++,r),c=a.stylesheet.children,a.comment&&(n.isEmpty||n.insert(ae.createItem({type:"Raw",value:`
20
- `})),n.insert(ae.createItem(a.comment)),c.isEmpty||n.insert(ae.createItem({type:"Raw",value:`
21
- `}))),o&&!c.isEmpty){const u=c.last;(u.type!=="Atrule"||u.name!=="import"&&u.name!=="charset")&&(o=!1)}i!=="exclamation"&&(i=!1),n.appendList(c)}while(!s.isEmpty);return{ast:e}}var Hk=F.__exportAll({compress:()=>$k,find:()=>Gk,findAll:()=>Yk,findLast:()=>Xk,fromPlainObject:()=>Kk,generate:()=>Uk,lexer:()=>zk,parse:()=>Wk,specificity:()=>Aa,toPlainObject:()=>Qk,tokenize:()=>Vk,walk:()=>qk});function ph(e){const t=ga(e,!0),r=ga(e);return t.length<r.length?t:r}var{lexer:zk,tokenize:Vk,parse:Wk,generate:Uk,walk:qk,find:Gk,findLast:Xk,findAll:Yk,fromPlainObject:Kk,toPlainObject:Qk}=S1({node:{String:{generate(e){this.token(5,ph(e.value))}},Url:{generate(e){const t=Nf(e.value),r=ph(e.value);this.token(7,t.length<=r.length+5?t:"url("+r+")")}}}}),{parse:Zk,generate:Oa,compress:Jk}=Hk;function Cr(e,t,r,n){return t.debug,n}function eL(e){let t;return function(n,i){let o=n;if(i&&(o=`[${((Date.now()-t)/1e3).toFixed(3)}s] ${o}`),e>1&&i){let s=Oa(i);e===2&&s.length>256&&(s=s.substr(0,256)+"..."),o+=`
22
- ${s}
23
- `}t=Date.now()}}function tL(e){return e={...e},typeof e.logger!="function"&&e.debug&&(e.logger=eL(e.debug)),e}function gh(e,t,r){Array.isArray(r)||(r=[r]),r.forEach(n=>n(e,t))}function rL(e,t,r){r=r||{};const n=r.filename||"<unknown>";let i;const o=Cr("parsing",r,Date.now(),Zk(t,{context:e,filename:n,positions:!!r.sourceMap}));r.beforeCompress&&Cr("beforeCompress",r,Date.now(),gh(o,r,r.beforeCompress));const s=Cr("compress",r,Date.now(),Jk(o,tL(r)));return r.afterCompress&&Cr("afterCompress",r,Date.now(),gh(s,r,r.afterCompress)),r.sourceMap?i=Cr("generate(sourceMap: true)",r,Date.now(),(()=>{const a=Oa(s.ast,{sourceMap:!0});return a.map._file=n,a.map.setSourceContent(n,t),a})()):i=Cr("generate",r,Date.now(),{css:Oa(s.ast),map:null}),i}function xa(e,t){return rL("stylesheet",e,t)}var bh={restructure:!0,forceMediaMerge:!0};function yh(e,t=[...e.querySelectorAll("style")],r={forceMediaMerge:!1}){if(!cssbeautify)return!1;let n=!1;if((!e.isConnected||e.ownerDocument===null)&&!(e instanceof Document)){const s=document.implementation.createDocument("http://www.w3.org/1999/xhtml","html",null);if(e instanceof HTMLHtmlElement)s.replaceChild(e,s.documentElement);else if(e instanceof HTMLBodyElement||e instanceof HTMLHeadElement)s.documentElement.appendChild(e);else{const a=s.createElement("body");s.documentElement.appendChild(a),a.appendChild(e)}}const i=!!e.querySelector('[class*="noresp-em"]'),o=new Map;for(const s of t){if(r.forceMediaMerge&&s.innerHTML){const a=`
24
- `+cssbeautify(xa(s.innerHTML,bh).css,{indent:" ",autosemicolon:!0})+`
25
- `;s.innerHTML!==a&&(s.textContent=a,n=!0)}if(s.sheet&&vh(e,s.sheet,i,o)){let a=iL(s.sheet);a=xa(a,bh).css,a=`
26
- `+cssbeautify(a,{indent:" ",autosemicolon:!0})+`
27
- `,s.innerHTML!==a&&(s.textContent=a,n=!0)}}return n}function vh(e,t,r,n,i=new Set){let o=!1,s;try{s=t.cssRules}catch{return!1}for(let a=s.length-1;a>=0;a--){const l=s[a];if(l instanceof CSSStyleRule){let c=l.selectorText;r&&c.includes(".em-")&&(c=`${c}, ${c.replace(/\.em-/g,".noresp-em-")}`),nL(e,c,n)||(t.deleteRule(a),o=!0)}else if(l instanceof CSSGroupingRule)o=vh(e,l,r,n,i)||o,l.cssRules.length||(t.deleteRule(a),o=!0);else if(l instanceof CSSFontFaceRule){const c=l.cssText;i.has(c)?(t.deleteRule(a),o=!0):i.add(c)}}return o}function nL(e,t,r){if(r.has(t))return r.get(t);let n=!1;try{n=!!e.querySelector(t)}catch{n=!0}return r.set(t,n),n}function iL(e){return Array.from(e.cssRules,t=>t.cssText).join(`
28
- `)}function hn(e){return ge(e)}var TM=ge("extensions.atomsHandlers"),kM=hn("HANDLE_ATOM_INSERT"),LM=ge("extensions.sandboxExtensions"),oL="SANDBOX_EXTENSION_SCRIPT_STATUS",OM=ge("MESSAGE_SERVICE"),xM=hn("SETTINGS_PANEL_EVENT"),PM=hn("MODAL_SHOW_EVENT"),NM=hn("MODAL_CLOSE_EVENT"),MM=hn("MODAL_UPDATE_EVENT");function RM(e){return e}var sL="SandboxApp",Eh="IframePluginRegistry",aL="__sandbox__";function _h(){return ko(aL)}function lL(e=_h()){return e.getOrCreateInstance(Eh,()=>new Sl)}var Pa=new yp(()=>lL()),qi=class Jm{constructor(){k(this,"container",_h()),k(this,"pluginCollection",new bp(this,Pa)),this.pluginCollection.activateSync()}static get instance(){return this._instance||(this._instance=new Jm)}static registerPlugin(t,r){Pa.add(t,r)}static registerAll(t){for(const r of Object.keys(t)){let n=r;const i=t[n];i&&Pa.add(n,i)}}static use(t){return this.instance.pluginCollection.use(t)}static initFeatures(t){this.instance.initFeatures(t)}static onLifecycle(t){return this.instance.onLifecycle(t)}use(t){return typeof t=="function"?this.pluginCollection.useByCtor(t):this.pluginCollection.useByKey(t)}initFeatures(t){this.pluginCollection.initSync(t)}onLifecycle(t){return this.pluginCollection.onLifecycle(t)}dispose(){this.pluginCollection.dispose()}};k(qi,"_instance",void 0);var mn="data-extension";function pn(e,t,r,n){X.send(oL,{key:e,phase:t,status:r,error:n})}function cL(){if(typeof document>"u")return;const e=document.currentScript;if(e instanceof HTMLScriptElement)return e.getAttribute(mn)||void 0}function Sh(e){return{key:e,hasSyncPlugins:!1,pendingPlugins:new Set,loadedNotified:!1,readyNotified:!1,readyFailed:!1}}function Na(e){!e.loadedNotified||e.readyNotified||e.readyFailed||(!e.hasSyncPlugins||e.pendingPlugins.size===0)&&(e.readyNotified=!0,pn(e.key,"ready","success"))}function uL({type:e,attributes:t,key:r,innerHTML:n}){const i=document.createElement(e);if(t)for(const[o,s]of Object.entries(t))s!=null&&i.setAttribute(o,String(s));return i.setAttribute(mn,r),n&&(i.innerHTML=n),e==="script"?t.type||i.setAttribute("type","text/javascript"):e==="style"&&(t.type||i.setAttribute("type","text/css")),i}function dL(e){const t=new Z,r=new Map,n=new Map,i=new Map,o=new WeakMap,s=l=>{let c=i.get(l);return c||(c=Sh(l),i.set(l,c)),c},a=l=>{if(l.type==="created"){const d=cL();if(!d)return;const h=s(d);h.hasSyncPlugins=!0,h.pendingPlugins.add(l.plugin),o.set(l.plugin,d);return}const c=o.get(l.plugin);if(!c)return;const u=i.get(c);if(u){if(l.type==="afterInit:success"){u.pendingPlugins.delete(l.plugin),Na(u);return}(l.type==="init:error"||l.type==="afterInit:error")&&(u.pendingPlugins.delete(l.plugin),u.readyFailed=!0,pn(c,"ready","error",`Sandbox plugin "${l.name}" failed during ${l.type==="init:error"?"init":"afterInit"}.`))}};return t.addDisposable(qi.onLifecycle(a)),t.addDisposable(X.addListener(me.SANDBOX_ADD_EXTENSIONS,l=>{for(const c of l){let u=r.get(c.key);u&&u.remove(),c.type==="script"&&i.set(c.key,Sh(c.key));const d=c.parent&&document.querySelector(c.parent)||document.head;if(u=uL(c),c.type==="script"){const h=u;h.src&&(h.onload=()=>{const f=s(c.key);f.loadedNotified=!0,pn(c.key,"load","success"),Na(f)},h.onerror=()=>pn(c.key,"load","error",`Failed to load sandbox script: ${h.src}`))}if(d.appendChild(u),c.type==="script"&&!u.src){const h=s(c.key);h.loadedNotified=!0,pn(c.key,"load","success"),Na(h)}r.set(c.key,u),n.set(c.key,c)}})),t.addDisposable(X.addListener(me.SANDBOX_REMOVE_EXTENSIONS,l=>{for(const c of l){const u=n.get(c),d=document.querySelector(`${u?.type}[${mn}]`);d&&d.remove(),r.delete(c),n.delete(c)}})),t.addDisposable(e.onChange(()=>{for(const[l,c]of r){const u=n.get(l),d=document.querySelector(`${u?.type}[${mn}]`);let h=u.parent?[...document.querySelectorAll(u.parent)]:[];h.length||(h=[document.head]),d?d!==c?r.set(l,d):h.some(f=>d.parentNode===f)||h[0]?.appendChild(d):h[0]?.appendChild(c)}})),t}function fL(e){e.querySelectorAll(`[${mn}]`).forEach(t=>t.remove())}var hL={brightness:100,contrast:100,sepia:0},Gi={DARK:"dark",LIGHT:"light"},wh=!1;function mL(e){wh||(e.setFetchMethod(t=>window.fetch(t)),wh=!0)}function pL(){let e=null,t=Gi.LIGHT;return{set(r){if(t=r,r===Gi.DARK){e??(e=gs(()=>Promise.resolve().then(()=>Eo("./darkreader.CyLMh7_H.js")),void 0,{}.url)),e.then(n=>{t===Gi.DARK&&(mL(n),n.enable(hL))}).catch(n=>{e=null});return}e?.then(n=>{t===Gi.LIGHT&&n.disable()})},clear(r){return r.replaceAll(/\s*?--darkreader.+?: .*?;/g,"")}}}var Ch=pL(),gL=/^(chrome-extension|moz-extension|safari-extension):\/\//i,bL=/local\.adguard\.org/i,yL=/^bis_/i,vL=new Set(["data-bis-config"]),Ar=/<script\b(?=[^>]*(?:\bbis_use(?:=|\s)|\bdata-bis-config(?:=|\s)|\bdata-dynamic-id(?:=|\s)|local\.adguard\.org|(?:chrome-extension|moz-extension|safari-extension):\/\/))[^>]*>[\s\S]*?<\/script>/gi,EL=/\s(?:bis_[a-z0-9_-]+|data-bis-config|data-dynamic-id)=(["'])(?:(?!\1).)*\1/gi,Xi=/<style\b[^>]*>[\s\S]*?<\/style>/gi,Ah=/display:\s*none\s*!important/gi,_L=[".socialshare,",".advertisment,",".adHolder,",".adsbygoogle-noablate","#ab_adblock","#popmechanic-snippet","filter_ads_by_classname","clever-core-ads","--gn-ov-ad-height","pub_728x90.text-ad.textAd","html-load.com/player","content-loader.com/player",".adblock","#advblock","body { overflow: visible!important; }"],Th=new Set(["em","data-theme-varibalse","data-em-localization"]);function SL(e){return Ah.lastIndex=0,(e.match(Ah)||[]).length}function Ma(e){const t=e.trim(),r=SL(t);if(r===0)return!1;if(t.includes(".advertisment,")&&t.includes(".adHolder,")&&(t.includes(".socialshare,")||r>=3||t.length>2e3))return!0;const n=_L.filter(i=>t.includes(i)).length;return n>=1&&(r>=3||t.length>2e3)||r>=5&&n>=1?!0:r>=20&&/\b(?:\.ad(?:s|vert|vertisment|Holder|banner|box|Container|Wrapper)?[,{]|#ad[-_]|ins\.adsbygoogle)/i.test(t)}function wL(e){if(Th.has("em")&&e.getAttribute("em")==="styles")return!1;for(const t of Th)if(e.hasAttribute(t))return!1;return Ma(e.textContent||"")}function kh(e){return gL.test(e.src)||bL.test(e.src)?!0:e.hasAttribute("bis_use")||e.hasAttribute("data-bis-config")}function Lh(e){let t=!1;for(const r of[...e.attributes])(yL.test(r.name)||vL.has(r.name))&&(e.removeAttribute(r.name),t=!0);return t}function CL(e){Xi.lastIndex=0;for(const t of e.matchAll(Xi))if(Ma(t[0].replace(/^<style\b[^>]*>/i,"").replace(/<\/style>$/i,"")))return!0;return!1}function AL(e){let t=!1;return Xi.lastIndex=0,{html:e.replace(Xi,r=>Ma(r.replace(/^<style\b[^>]*>/i,"").replace(/<\/style>$/i,""))?(t=!0,""):r),found:t}}function Oh(e){let t=!1;return e instanceof Element&&Lh(e)&&(t=!0),e.querySelectorAll("script").forEach(r=>{kh(r)&&(r.remove(),t=!0)}),e.querySelectorAll("style").forEach(r=>{r.tagName==="STYLE"&&wL(r)&&(r.remove(),t=!0)}),e.querySelectorAll("*").forEach(r=>{Lh(r)&&(t=!0)}),t}function TL(e){return Ar.lastIndex=0,Ar.test(e)||/\sbis_[a-z0-9_-]+\s*=/.test(e)||/\sdata-bis-config\s*=/.test(e)||CL(e)}function kL(e){if(!TL(e))return{html:e,found:!1};let t=!1,r=e;Ar.lastIndex=0,Ar.test(r)&&(Ar.lastIndex=0,r=r.replace(Ar,""),t=!0),(/\sbis_[a-z0-9_-]+\s*=/.test(r)||/\sdata-bis-config\s*=/.test(r))&&(r=r.replace(EL,""),t=!0);const n=AL(r);return r=n.html,t=t||n.found,{html:r,found:t}}function LL(e){return ei(e)}function xh(e){const t=(r,n)=>{const i=r.getAttribute(n);if(!i)return;const o=LL(i);o!==i&&r.setAttribute(n,o)};e.querySelectorAll("[src]").forEach(r=>t(r,"src")),e.querySelectorAll("[___src]").forEach(r=>t(r,"___src"))}var OL=new Set(["normal","400"]),xL=new Set(["normal"]),PL=new Set(["baseline","unset","initial",""]),Ph=new Set(["none",""]),NL=["b","strong","em","i","u","s","strike","sup","sub"],ML="___em-internal";function Ra(e){e.querySelectorAll(".em-block-insert").forEach(r=>{r.classList.remove("em-block-insert","em-block-insert_bottom-document","em-block-insert_top-document")}),e.querySelectorAll(".em-block-insert_bottom").forEach(r=>{r.classList.remove("em-block-insert_bottom")}),e.querySelectorAll(".em-block-insert_top").forEach(r=>{r.classList.remove("em-block-insert_top")}),e.querySelectorAll(".em-blockatom-insert").forEach(r=>{r.classList.remove("em-blockatom-insert","em-block-insert_bottom-document","em-block-insert_top-document")}),e.querySelectorAll(".em-atom-insert").forEach(r=>{r.classList.remove("em-atom-insert","em-atom-insert_bottom-document","em-atom-insert_bottom","em-atom-insert_top-document","em-atom-insert_top")}),["em-block-insert-empty","em-atom-insert-empty","em-block-insert-body","em-atom-insert-body","em-resize-start","sortable-chosen","sortable-ghost","em-vindent-table","em-vindent_low","em-vindent","em-relative","em-display-block","em-sandbox-discuss_set-target","em-sandbox-discuss","em-native-img-uploading","em-native-img-drop-target","em-native-img-drop-loading","em-native-file-drag"].forEach(r=>{e.querySelectorAll(`.${r}`).forEach(n=>n.classList.remove(r))}),e.querySelectorAll(".em-powered-logo").forEach(r=>r.remove());for(const r of e.querySelectorAll("[class='']"))r.removeAttribute("class");const t=e instanceof Document?e.documentElement:e;t&&(be(t,"[data-mce-caret=before]",!0),be(t,"span.em-element-resize-img-container"),be(t,"div.em-element-img-change-group",!0),be(t,"div.em-element-block-add",!0),be(t,"meta[http-equiv=Content-Security-Policy]",!0),be(t,"[class*=mce-]"),be(t,"script[em=initial]",!0),be(t,".em-editor-wrapper",!0),be(t,".em-element-resize-height",!0),be(t,".em-element-vindent-remove",!0),be(t,".em-element-vindent",!0),be(t,".em-element-vindent-value",!0),be(t,"div.iframe-resizer-inner"))}function RL(e){e.querySelectorAll("tbody").forEach(t=>t.replaceWith(...Array.from(t.childNodes))),e.querySelectorAll(".em-code").forEach(t=>t.remove()),e.querySelectorAll(':not(editor)[contenteditable="false"]').forEach(t=>t.remove()),e.querySelectorAll('.em-vindent[class*="em-vindent-padding"]').forEach(t=>t.remove()),e.querySelectorAll(".em-code").forEach(t=>t.remove()),e.querySelectorAll("[contenteditable]").forEach(t=>t.removeAttribute("contenteditable")),e.querySelectorAll("[em-edit]").forEach(t=>t.removeAttribute("em-edit")),e.querySelectorAll("[em-state]").forEach(t=>t.removeAttribute("em-state")),e.querySelectorAll("[em-hover]").forEach(t=>t.removeAttribute("em-hover")),e.querySelectorAll("#gtx-anchor").forEach(t=>t.remove()),e.querySelectorAll('[data-mce-bogus="1"]').forEach(t=>t.remove()),e.querySelectorAll("strike").forEach(t=>t.removeAttribute("style")),e.querySelectorAll("u").forEach(t=>t.removeAttribute("style")),e.querySelectorAll('style[data-theme-varibalse="true"]').forEach(t=>t.remove()),e.querySelectorAll('style[data-em-localization="true"]').forEach(t=>t.remove()),e.querySelectorAll(".em-element-img-change-group").forEach(t=>t.remove()),e.querySelectorAll(".em-element-resize-img").forEach(t=>t.remove()),e.querySelectorAll(".em-element-editor").forEach(t=>t.remove()),e.querySelectorAll(".em-element-vindent-bg").forEach(t=>t.remove()),e.querySelectorAll(".em-element-vindent-value").forEach(t=>t.remove()),e.querySelectorAll(".em-element-gap").forEach(t=>t.remove()),e.querySelectorAll(".em-element-gap-marker").forEach(t=>t.remove()),e.querySelectorAll(".em-element-gap-bg").forEach(t=>t.remove()),e.querySelectorAll(".em-gap").forEach(t=>t.remove()),e.querySelectorAll(".em-just-inserted").forEach(t=>t.classList.remove("em-just-inserted")),e.querySelectorAll(".em-native-img-uploading").forEach(t=>t.classList.remove("em-native-img-uploading")),e.querySelectorAll(".em-native-img-drop-target").forEach(t=>t.classList.remove("em-native-img-drop-target")),e.querySelectorAll(".em-native-img-upload-spin-overlay").forEach(t=>t.remove()),e.querySelectorAll(".em-element-list-bullet").forEach(t=>t.classList.remove("em-element-list-bullet")),e.querySelectorAll(".remove-new-editor-element").forEach(t=>t.classList.remove("remove-new-editor-element")),e.querySelectorAll(`.${ps}`).forEach(t=>t.classList.remove(ps)),Ra(e),be(e,"editor",!1),Mh(e),xh(e),Oh(e)}function gn(e){return(e??"").trim().toLowerCase()}function DL(e){const t=gn(e.style.fontWeight);t&&OL.has(t)&&e.style.removeProperty("font-weight");const r=gn(e.style.fontStyle);r&&xL.has(r)&&e.style.removeProperty("font-style");const n=gn(e.style.verticalAlign);n&&PL.has(n)&&e.style.removeProperty("vertical-align");const i=gn(e.style.textDecorationLine);i&&Ph.has(i)&&e.style.removeProperty("text-decoration-line");const o=gn(e.style.textDecoration);o&&Ph.has(o)&&e.style.removeProperty("text-decoration");const s=e.getAttribute("style");s!==null&&s.trim()===""&&e.removeAttribute("style")}function IL(e){const t=e.parentNode;if(t){for(;e.firstChild;)t.insertBefore(e.firstChild,e);t.removeChild(e)}}function Nh(e){if(e.attributes.length===0)return!0;for(const t of Array.from(e.attributes))if(t.name!==ML)return!1;return!0}function Mh(e){const t=Array.from(e.querySelectorAll("span"));for(let r=t.length-1;r>=0;r-=1){const n=t[r];DL(n),Nh(n)&&IL(n)}for(const r of NL){const n=Array.from(e.querySelectorAll(r));for(let i=n.length-1;i>=0;i-=1){const o=n[i];o.childNodes.length===0&&Nh(o)&&o.remove()}}}function BL(e){e=e.replaceAll(/\uFEFF/gmu,""),e=e.replaceAll(/<link[^>]*?em="css.*?>/gis,""),e=e.replaceAll(/draggable="false"|draggable="true"/gi,""),e=e.replaceAll(/ style="\s*"/gi,""),e=e.replaceAll(/<tbody.*?>/gi,"").replaceAll(/<\/tbody>/gi,""),e=e.replaceAll(/&amp;nbsp;/gi,"&nbsp;").replaceAll(/&amp;zwnj;/gi,"&zwnj;"),e=e.replaceAll(/style="transform: translateZ\(0px\);"/gi,""),e=e.replaceAll(/ +>/gi,">"),e=e.replaceAll(/&amp;/gi,"&"),e=e.replaceAll(/&quot;/gi,""),e=e.replaceAll(/^\s*$(?:\r\n?|\n)/gm,""),e=e.replaceAll(/ em-floatblock-width=".*?"/gi,""),e=e.replaceAll(/<script.*?editor.*?script>/gi,""),e=e.replaceAll(/<script[^>]*\bdata-amd-module-id\s*=[^>]*>[\s\S]*?<\/script>/gi,""),e=e.replaceAll(/<script[^>]*\/iframe\/js\/[^>]*>[\s\S]*?<\/script>/gi,""),e=e.replaceAll(/<style[^>]*?ad-right-container.*?style>/gi,""),e=e.replaceAll(/<div[^>]*?class="jfk-bubble.*?jfk-bubble-arrowimplafter".*?><\/div><\/div><\/div>/gis,""),e=e.replaceAll(/<span[^>]*?style="text-decoration: underline;"[^>]*?>(<a[^>]*?href.*?a>)<\/span>/gis,"$1"),e=e.replaceAll(/ rel="noopener"/gi,""),e=e.replaceAll(/ em-insert-ignore/gi,""),e=e.replaceAll(/ class="\s*"/gi,""),e=e.replaceAll(/<!--<em-root-text>(.*?)-->/gis,"$1"),e=e.replaceAll(/class="em-block.*?"/gi,""),e=e.replaceAll(/data-percent="[^"]*"/g,""),e=e.replaceAll(/em-optimise="[^"]*"/g,""),e=e.replaceAll(/em-optimise-error="[^"]*"/g,""),e=Ch.clear(e);const t=e.match(/((rgb)\(\d{1,3}(,\s?\d{1,3}){2}\))/gi);return t&&t.forEach(r=>{const n=ye(r);n&&(e=e.replaceAll(r,n))}),e=e.replaceAll(/<tbody>/gi,"").replaceAll(/<\/tbody>/gi,""),e}function Rh(e){switch(e.toLowerCase()){case"tr":return document.createElement("table");case"td":return document.createElement("tr");case"head":case"body":return document.createElement("html");default:return document.createElement("div")}}function FL(e,t){if(t.some(l=>l.nodeName==="HTML")){for(const l of t)e.appendChild(l);return}const r=t.find(l=>l.nodeType===Node.DOCUMENT_TYPE_NODE),n=t.find(l=>l.nodeName==="HEAD"),i=t.find(l=>l.nodeName==="BODY");r&&e.appendChild(r);const o=e.createElement("html"),s=n??e.createElement("head"),a=i??e.createElement("body");o.append(s,a);for(const l of t)l===r||l===n||l===i||l.nodeName==="HTML"||l.nodeName==="HEAD"||l.nodeName==="BODY"||a.appendChild(l);e.appendChild(o)}function jL(){const e=Array.from(document.querySelectorAll('style[em="styles"]'));return yh(document,e,{forceMediaMerge:!0})}function bn(e){let t=e.html??"";const r=e.node,n=e.isBlock??!1,i=e.isPartial??!1;if(n||i){let o,s="div";if(r){if(s=r.tagName??"div",s==="DOCTYPE"||s==="html")return bn({node:r});o=Rh(s),o.appendChild(r.cloneNode(!0))}else{const a=t.trim(),l=a.match(/<\!?([a-zA-Z]{1,})[^>]*>/i);if(s=l?l[1]:"div",s==="DOCTYPE"||s==="html")return bn({html:t});o=Rh(s);const c=xe(a);o.replaceChildren(...c)}Bo(o,{stage:"apply"}),RL(o),t=Se(o),s.toLowerCase()==="head"&&(t=t.replace("<body></body>","")),s.toLowerCase()==="body"&&(t=t.replace("<head></head>",""))}else{const o=document.implementation.createHTMLDocument();for(const s of[...o.childNodes])s.remove();t?FL(o,xe(t)):r&&o.appendChild(r.cloneNode(!0)),o.documentElement&&(o.querySelectorAll("tbody").forEach(s=>s.replaceWith(...Array.from(s.childNodes))),o.querySelectorAll(".em-code").forEach(s=>s.remove()),o.querySelectorAll(':not(editor)[contenteditable="false"]').forEach(s=>s.remove()),o.querySelectorAll(".em-code").forEach(s=>s.remove()),o.querySelectorAll("[contenteditable]").forEach(s=>s.removeAttribute("contenteditable")),o.querySelectorAll("[em-edit]").forEach(s=>s.removeAttribute("em-edit")),o.querySelectorAll("[em-state]").forEach(s=>s.removeAttribute("em-state")),o.querySelectorAll("[em-hover]").forEach(s=>s.removeAttribute("em-hover")),o.querySelectorAll(".em-just-inserted").forEach(s=>s.classList.remove("em-just-inserted")),o.querySelectorAll(".em-native-img-uploading").forEach(s=>s.classList.remove("em-native-img-uploading")),o.querySelectorAll(".em-native-img-drop-target").forEach(s=>s.classList.remove("em-native-img-drop-target")),o.querySelectorAll(".em-native-img-upload-spin-overlay").forEach(s=>s.remove()),o.body?.classList.remove("em-native-img-drop-loading"),o.body?.classList.remove("em-native-file-drag"),o.querySelectorAll("#gtx-anchor").forEach(s=>s.remove()),o.documentElement.removeAttribute("style"),o.querySelectorAll('style[data-theme-varibalse="true"]').forEach(s=>s.remove()),o.querySelectorAll('style[data-em-localization="true"]').forEach(s=>s.remove()),fL(o),Ra(o),o.documentElement&&be(o.documentElement,"editor",!1),o.querySelectorAll("ya-tr-span").forEach(s=>{s.parentNode&&(Array.from(s.childNodes).forEach(a=>s.parentNode.insertBefore(a,s)),s.remove())}),Mh(o)),Bo(o,{stage:"apply"}),xh(o),Oh(o),t=Mt(o)}return kL(BL(t)).html}function Dh(e,t){Bc(),document.body?.classList.contains("em-block-insert-body")&&document.body.classList.remove("em-block-insert-body"),document.body?.classList.contains("em-atom-insert-body")&&document.body.classList.remove("em-atom-insert-body");const r=document.querySelector(".em-block-insert");r&&r.classList.remove("em-block-insert","em-block-insert_bottom-document","em-block-insert_bottom","em-block-insert_top-document","em-block-insert_top");const n=document.querySelector(".em-block-insert-empty");n&&n.classList.remove("em-block-insert-empty");const i=document.querySelector(".em-atom-insert");i&&i.classList.remove("em-atom-insert","em-atom-insert_bottom-document","em-atom-insert_bottom","em-atom-insert_top-document","em-atom-insert_top");const o=document.querySelector(".em-atom-insert-empty");o&&o.classList.remove("em-atom-insert-empty"),document.querySelectorAll(".em-blockatom-insert").forEach(s=>{s.classList.remove("em-blockatom-insert","em-block-insert_bottom-document","em-block-insert_bottom","em-block-insert_top-document","em-block-insert_top")}),t.messageService.send({operation:"application_scroll-block-hide"})}function $L(e,t){t.messageService.send({operation:"application_email_content_get",htmlCode:bn({node:document.body,isPartial:!0})})}var HL={"sandbox_drag-cancel":Dh,sandbox_email_content_get:$L},Da=null,Ia=0,zL=6e5;function VL(e){Da=e,Ia=e?Date.now():0}function WL(){const e=Da,t=Ia;return Da=null,Ia=0,!e||!t||Date.now()-t>zL||!e.isConnected||!e.matches('[em="block"]')?null:e}var Yi=ko("__sandbox__");Yi.injectFactory(sL,()=>qi.instance),Yi.getOrCreateInstance(Eh,()=>new Sl),window.__sandbox__={container:Yi},(function(){"use strict";function e(t,r){var n,i=0,o=t.length,s,a="",l,c,u,d,h,f,g,y,A=!0,L=!1,C;n=arguments.length>1?r:{},typeof n.indent>"u"&&(n.indent=" "),typeof n.openbrace=="string"&&(A=n.openbrace==="end-of-line"),typeof n.autosemicolon=="boolean"&&(L=n.autosemicolon);function O(v){return v===" "||v===`
29
- `||v===" "||v==="\r"||v==="\f"}function E(v){return v==="'"||v==='"'}function m(v){return l>="a"&&l<="z"||l>="A"&&l<="Z"||l>="0"&&l<="9"||"-_*.:#[]".indexOf(v)>=0}function b(){for(var v=f;v>0;v-=1)a+=n.indent}function S(){a=C(a),A?a+=" {":(a+=`
30
- `,b(),a+="{"),c!==`
31
- `&&(a+=`
32
- `),f+=1}function p(){var v;f-=1,a=C(a),a.length>0&&L&&(v=a.charAt(a.length-1),v!==";"&&v!=="{"&&(a+=";")),a+=`
33
- `,b(),a+="}",s.push(a),a=""}for(String.prototype.trimRight?C=function(v){return v.trimRight()}:C=function(v){return v.replace(/\s+$/,"")},h={Start:0,AtRule:1,Block:2,Selector:3,Ruleset:4,Property:5,Separator:6,Expression:7,URL:8},f=0,d=h.Start,y=!1,s=[],t=t.replace(/\r\n/g,`
34
- `);i<o;){if(l=t.charAt(i),c=t.charAt(i+1),i+=1,E(g)){a+=l,l===g&&(g=null),l==="\\"&&c===g&&(a+=c,i+=1);continue}if(E(l)){a+=l,g=l;continue}if(y){a+=l,l==="*"&&c==="/"&&(y=!1,a+=c,i+=1);continue}if(l==="/"&&c==="*"){y=!0,a+=l,a+=c,i+=1;continue}if(d===h.Start){if(s.length===0&&O(l)&&a.length===0)continue;if(l<=" "||l.charCodeAt(0)>=128){d=h.Start,a+=l;continue}if(m(l)||l==="@"){if(u=C(a),u.length===0)s.length>0&&(a=`
35
-
36
- `);else if(u.charAt(u.length-1)==="}"||u.charAt(u.length-1)===";")a=u+`
37
-
38
- `;else for(;c=a.charAt(a.length-1),!(c!==" "&&c.charCodeAt(0)!==9);)a=a.substr(0,a.length-1);a+=l,d=l==="@"?h.AtRule:h.Selector;continue}}if(d===h.AtRule){if(l===";"){a+=l,d=h.Start;continue}if(l==="{"){u=C(a),S(),d=u==="@font-face"?h.Ruleset:h.Block;continue}a+=l;continue}if(d===h.Block){if(m(l)){if(u=C(a),u.length===0)s.length>0&&(a=`
39
-
40
- `);else if(u.charAt(u.length-1)==="}")a=u+`
41
-
42
- `;else for(;c=a.charAt(a.length-1),!(c!==" "&&c.charCodeAt(0)!==9);)a=a.substr(0,a.length-1);b(),a+=l,d=h.Selector;continue}if(l==="}"){p(),d=h.Start;continue}a+=l;continue}if(d===h.Selector){if(l==="{"){S(),d=h.Ruleset;continue}if(l==="}"){p(),d=h.Start;continue}a+=l;continue}if(d===h.Ruleset){if(l==="}"){p(),d=h.Start,f>0&&(d=h.Block);continue}if(l===`
43
- `){a=C(a),a+=`
44
- `;continue}if(!O(l)){a=C(a),a+=`
45
- `,b(),a+=l,d=h.Property;continue}a+=l;continue}if(d===h.Property){if(l===":"){a=C(a),a+=": ",d=h.Expression,O(c)&&(d=h.Separator);continue}if(l==="}"){p(),d=h.Start,f>0&&(d=h.Block);continue}a+=l;continue}if(d===h.Separator){if(!O(l)){a+=l,d=h.Expression;continue}E(c)&&(d=h.Expression);continue}if(d===h.Expression){if(l==="}"){p(),d=h.Start,f>0&&(d=h.Block);continue}if(l===";"){a=C(a),a+=`;
46
- `,d=h.Ruleset;continue}if(a+=l,l==="("&&a.charAt(a.length-2)==="l"&&a.charAt(a.length-3)==="r"&&a.charAt(a.length-4)==="u"){d=h.URL;continue}continue}if(d===h.URL&&l===")"&&a.charAt(a.length-1!=="\\")){a+=l,d=h.Expression;continue}a+=l}return a=s.join("")+a,a}window.cssbeautify=e})();var UL=["src","___src","background","poster","srcset","style"];function Ki(e){return ei(e.trim())}function qL(e,t){return e.split(",").map(r=>{const n=r.trim();if(!n)return r;const[i,...o]=n.split(/\s+/);return[t(i),...o].join(" ")}).join(", ")}function GL(e,t){return e.replaceAll(/url\((\s*['"]?)([^'")]+)(['"]?\s*)\)/gi,(r,n,i,o)=>`url(${n}${t(i)}${o})`)}function Ih(e,t,r){const n=e.toLowerCase();return n==="srcset"?qL(t,r):n==="style"?GL(t,r):r(t)}function XL(){const e=new Map,t=r=>{const n=Ki(r),i=e.get(n);return i?zb(n).replace(new RegExp(`${Vr}=\\d+`),`${Vr}=${i}`):r};return{transform:{name:"em-version",attributes:UL,render:(r,n)=>r&&Ih(n.attribute,r,t),serialize:(r,n)=>r&&Ih(n.attribute,r,Ki)},requestReload(r){e.set(Ki(r),String(Date.now()))},isPending(r){return e.has(Ki(r))},clear(){e.clear()}}}var Bh=["src","background","poster","srcset","style"];function Ba(e,t=document){const r=Bh.map(i=>`[${i}]`).join(","),n=[...t.querySelectorAll(r)];for(const i of n){const o=i.tagName.toLowerCase();for(const s of Bh){const a=i.getAttribute(s);if(!a)continue;const l=e.serialize(a,{element:i,tag:o,attribute:s,stage:"apply"})??a,c=jo(i,s,l,{pipeline:e,stage:"apply"});c===null?a!==l&&i.removeAttribute(s):c!==a&&i.setAttribute(s,c)}}}function YL(e,t){const{pipeline:r,htmlDocument:n}=t,i=XL(),o=r.register(i.transform),s={reload(a){a&&(i.requestReload(a),n.renderOnly(()=>Ba(r)))},clear(){i.clear()}};return e.inject(ec,s),{reload:s,dispose(){o.dispose(),i.clear(),$e(e,ec)}}}var KL=["https://emcdn.ru/843/20220715_113006_18.png","https://cdn.useblocks.io/843/230110_18_kXn4Evf.png"],QL="/static/media/",ZL="empty-image";function JL(e){return e.replace(/[.-][A-Za-z0-9_-]{7,20}$/,"")}function Fh(e){let t;try{t=new URL(e,document.baseURI).pathname}catch{return null}return t.includes(QL)?t:null}function eO(e){return!!e&&Fh(e)!==null}function tO(e){if(!e)return!1;if(KL.includes(e))return!0;const t=Fh(e);return t===null?!1:JL(t.slice(t.lastIndexOf("/")+1).replace(/\.[^.]+$/,""))===ZL}var rO=1e4;function nO(e=rO){const t=new Map,r=new Map,n=(i,o)=>{URL.revokeObjectURL(o.blobUrl),r.delete(o.blobUrl),t.delete(i)};return{acquire(i,o){const s=t.get(i);if(s)return s.revokeTimer&&(clearTimeout(s.revokeTimer),s.revokeTimer=void 0),s.refs+=1,s.blobUrl;const a=URL.createObjectURL(o);return t.set(i,{blobUrl:a,refs:1}),r.set(a,i),a},release(i){const o=t.get(i);o&&(o.refs-=1,!(o.refs>0||o.revokeTimer)&&(o.revokeTimer=setTimeout(()=>n(i,o),e)))},peek(i){return t.get(i)?.blobUrl},sourceOf(i){return r.get(i)},forget(i){const o=t.get(i);o&&(o.revokeTimer&&clearTimeout(o.revokeTimer),n(i,o))},get size(){return t.size},dispose(){for(const[i,o]of Array.from(t))o.revokeTimer&&clearTimeout(o.revokeTimer),n(i,o)}}}var Qi=new Set(["img","image","input","video","source","em-replace"]);function jh(e){const t=e.toLowerCase(),r=Qi.has(t);return Qi.add(t),{dispose:()=>{r||Qi.delete(t)}}}function iO(e){return Qi.has(e.toLowerCase())}var oO=3e3,sO=["src","___src","background","poster","srcset","style"],$h=e=>e.startsWith("blob:"),Zi="data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%220%22%20height%3D%220%22%2F%3E#em-wait=";function aO(e){const t=encodeURIComponent(e).replace(/[!'()*]/g,r=>`%${r.charCodeAt(0).toString(16).toUpperCase()}`);return`${Zi}${t}`}var lO=new RegExp(String.raw`blob:[^\s"'()<>]+|`+Zi.replace(/[.*+?^${}()|[\]\\]/g,String.raw`\$&`)+String.raw`[^\s"'()<>]*`,"g");function Hh(e){if(e.startsWith(Zi))try{return decodeURIComponent(e.slice(130))}catch{return}}function cO(e){const t=e.attribute.toLowerCase();if(t==="background"||t==="style"||t==="poster")return!0;const r=(e.element?.tagName??e.tag??"").toLowerCase();return r===""?!1:iO(r)}function uO(e){try{return new URL(e,document.baseURI).hostname}catch{return}}function dO(e,t){const r=[];let n=0;for(;n<e.length;){for(;n<e.length&&/[\s,]/.test(e[n]);)n+=1;if(n>=e.length)break;const i=n;for(;n<e.length&&!/\s/.test(e[n]);)n+=1;let o=e.slice(i,n),s="";if(o.endsWith(","))o=o.replace(/,+$/,"");else{const a=e.indexOf(",",n),l=a===-1?e.length:a;s=e.slice(n,l).trim(),n=l+1}r.push(s?`${t(o)} ${s}`:t(o))}return r.join(", ")}function fO(e,t){return e.replaceAll(/url\((\s*['"]?)([^'")]+)(['"]?\s*)\)/gi,(r,n,i,o)=>`url(${n}${t(i)}${o})`)}function hO(e){const t=e.store??nO(),r=e.answerTimeoutMs??oO,n=new Map,i=new Set;let o={enabled:!1,sourceHosts:[]},s=!1;const a={hits:0,misses:0,refused:0,failed:0},l=f=>{const g=uO(f);return g?g===window.location.hostname||o.sourceHosts.includes(g):!1},c=(f,g=!1)=>{if(n.has(f)||!g&&(i.has(f)||t.peek(f)))return;const y=X.sendAsync(me.APPLICATION_CANVAS_IMAGE_GET,g?{url:f,fresh:g}:{url:f}).then(L=>{const C=L;if(C&&"blob"in C){t.acquire(f,C.blob),a.hits+=1;return}i.add(f),a.refused+=1}).catch(()=>{i.add(f),a.failed+=1}),A=Promise.race([y,new Promise(L=>{setTimeout(()=>{n.has(f)&&(s=!0,i.add(f),a.failed+=1),L()},r)})]).then(()=>{n.delete(f),e.refresh()});n.set(f,A)},u=f=>{const g=Hh(f);if(g!==void 0)return u(g);if(!f||$h(f)||f.startsWith("data:")||eO(f))return f;const y=t.peek(f);return y||(s||!o.enabled||i.has(f)||!l(f)?f:(a.misses+=1,c(f),aO(f)))},d=f=>$h(f)?t.sourceOf(f)??f:Hh(f)??f,h=(f,g,y)=>{const A=g.attribute.toLowerCase();return A==="srcset"?dO(f,y):A==="style"?fO(f,y):y(f)};return{configure(f){o={enabled:f.enabled,sourceHosts:[...f.sourceHosts??[]]}},transform:{name:"image-cache",attributes:sO,render:(f,g)=>f&&cO(g)?h(f,g,u):f,serialize:(f,g)=>f&&h(f,g,d)},forget(f){t.forget(f),i.delete(f),c(f,!0)},restoreUrls(f){return Fa(f,d)},stats(){return{...a,blobs:t.size}},dispose(){t.dispose(),n.clear(),i.clear()}}}function mO(e,t){return!e.includes("blob:")&&!e.includes(Zi)?e:e.replace(lO,r=>t(r))}function Fa(e,t){if(typeof e=="string")return mO(e,t);if(Array.isArray(e)){let r=!1;const n=e.map(i=>{const o=Fa(i,t);return r||(r=o!==i),o});return r?n:e}if(e&&typeof e=="object"&&Object.getPrototypeOf(e)===Object.prototype){let r=!1;const n={};for(const[i,o]of Object.entries(e)){const s=Fa(o,t);r||(r=s!==o),n[i]=s}return r?n:e}return e}function pO(e,t){const{pipeline:r,htmlDocument:n}=t,i=hO({refresh:()=>n.renderOnly(()=>Ba(r))}),o=r.register(i.transform),s=X.addListener(me.SANDBOX_CANVAS_IMAGE_CACHE_SETUP,l=>{i.configure(l),n.renderOnly(()=>Ba(r))}),a=X.setOutgoingFilter(l=>i.restoreUrls(l));return e.inject(Zo,i),{cache:i,dispose(){a(),s.dispose(),o.dispose(),i.dispose(),$e(e,Zo)}}}function gO(e,t){const r=new M_,n=new bi,i=new R_(r,n),o=new L_(n,r,{prepareHtml:t.prepareHtml,mapHTMLRoots:e.mapHTMLRoots,...e.createRoot?{createRoot:e.createRoot}:{},...e.rootsParent?{rootsParent:e.rootsParent}:{}}),s=e.beforeCommit,a=s?o.beforeCommit(()=>s()):void 0;return{htmlDocument:o,remoteDocument:r,textDocument:n,documentMapping:i,onDocumentShown:l=>r.onReady(()=>l()),onDocumentReplaced:l=>r.onEntitySet(c=>l(c)),commit:l=>o.commit(l),commitLockedAsync:async l=>{try{t.lock?.increment(),await o.commit(l,!0)}finally{t.lock?.decrement()}},dispose(){a?.dispose(),o.dispose(),r.dispose(),n.dispose()}}}function bO(e,t,r){const n=gO(t,r),i={commit:o=>n.commit(o),commitLockedAsync:o=>n.commitLockedAsync(o)};return e.inject(Ql,t),e.inject(Yo,n.remoteDocument),e.inject(Ko,n.textDocument),e.inject(Qo,n.documentMapping),e.inject(Xo,n.htmlDocument),e.inject(Kl,i),{...n,dispose(){n.dispose(),$e(e,Ql),$e(e,Yo),$e(e,Ko),$e(e,Qo),$e(e,Xo),$e(e,Kl)}}}function yO(e){e.inject(_b,_e)}var vO=class{constructor(){k(this,"_nodes",[])}add(e){const t=this._nodes,r=new Set;for(const n of t){if(n.contains(e))return;e.contains(n)&&r.add(n)}for(const n of r){const i=t.indexOf(n);i>=0&&t.splice(i,1)}t.push(e)}remove(e){const t=new Set;for(const r of this._nodes)(e===r||e.contains(r))&&t.add(r);for(const r of t){const n=this._nodes.indexOf(r);n>=0&&this._nodes.splice(n,1)}}get nodes(){return[...this._nodes]}clear(){this._nodes.splice(0,this._nodes.length)}},zh=100,Vh=Symbol("EMULATED_DRAG_EVENT");function EO(e,t){return e[Vh]===t}var Wh=class{constructor(){k(this,"_target",null),k(this,"_interval",0),k(this,"_x",0),k(this,"_y",0)}_fireDragEvent(e,t,r,n,i){const o=new DragEvent(t,{dataTransfer:i,clientX:r,clientY:n,bubbles:!0,cancelable:!0});return o[Vh]=this,e.dispatchEvent(o),!o.defaultPrevented}start(e,t,r){const n=document.elementFromPoint(e,t);return n&&!this._target&&this._fireDragEvent(n,"dragstart",e,t,r)?(this._target=n,this._x=e,this._y=t,this._interval=setInterval(()=>{this._fireDragEvent(n,"drag",this._x,this._y,r)},zh),!0):!1}enter(e,t,r){const n=document.elementFromPoint(e,t);n&&n!==this._target&&(this._fireDragEvent(n,"dragenter",e,t,r),this._target=n,this._interval||(this._interval=setInterval(()=>{this._fireDragEvent(n,"drag",this._x,this._y,r)},zh)))}over(e,t,r){this._x=e,this._y=t;const n=document.elementFromPoint(e,t);n&&(n!==this._target&&this._fireDragEvent(n,"dragenter",e,t,r),this._fireDragEvent(n,"dragover",e,t,r)),this._target&&n!==this._target&&this._fireDragEvent(this._target,"dragleave",e,t,r),this._target=n}leave(e,t,r){this._target&&(this._fireDragEvent(this._target,"dragleave",e,t,r),this._target=null),this._target=null}drop(e,t,r){this._target&&(this._fireDragEvent(this._target,"drop",e,t,r),this._target=null),this._target=null,clearInterval(this._interval)}end(e,t,r){this._target&&this._fireDragEvent(this._target,"dragend",e,t,r),this._target=null,clearInterval(this._interval)}};function _O(e){const t=new Z,r=n=>{EO(n,e)||X.send(me.APPLICATION_IFRAME_DRAG_EVENT,{type:n.type,clientX:n.clientX,clientY:n.clientY,value:n.dataTransfer?.getData("Text")||""})};return window.addEventListener("dragstart",r),window.addEventListener("dragover",r),window.addEventListener("drag",r),window.addEventListener("dragleave",r),window.addEventListener("dragend",r),window.addEventListener("drop",r),window.addEventListener("dragenter",r),t.addDispose(()=>{window.removeEventListener("dragstart",r),window.removeEventListener("dragover",r),window.removeEventListener("drag",r),window.removeEventListener("dragleave",r),window.removeEventListener("dragend",r),window.removeEventListener("drop",r),window.removeEventListener("dragenter",r)}),t}function SO(){const e=new Wh,t=n=>{const i=new DataTransfer;switch(i.setData("Text",n.value),n.type){case"dragenter":e.enter(n.clientX,n.clientY,i);break;case"dragover":e.over(n.clientX,n.clientY,i);break;case"dragleave":e.leave(n.clientX,n.clientY,i);break;case"dragend":e.end(n.clientX,n.clientY,i);break;case"drop":e.drop(n.clientX,n.clientY,i)}},r=new Z;return r.addDisposable(X.addListener(me.SANDBOX_DRAG_EVENT,t)),r.addDisposable(_O(e)),r}function wO(e){const t=r=>function n(i,o=10){if(!CO(i)||o<0)return i;if(typeof i=="string")return r(i);if(i instanceof Array)return i.map(a=>n(a,o-1));const s=Object.entries(i).map(([a,l])=>[a,n(l,o-1)]);return Object.fromEntries(s)};return{escape:t(r=>e.escape(r,!0)),unescape:t(r=>e.unescape(r))}}function CO(e){return typeof e=="string"||typeof e=="object"&&e!==null&&!(e instanceof Element)}var AO=()=>zn(window.getSelection()?.toString())??"",Uh=e=>t=>t.some(r=>e(r).some(TO)),TO=e=>e instanceof Element&&(e.hasAttribute("em-edit")||e.querySelector("[em-edit]")),kO=Uh(({removed:e})=>e),LO=Uh(({added:e})=>e),OO=e=>t=>{kO(t)&&!LO(t)&&setTimeout(()=>{if(typeof document<"u"&&document.querySelector("[em-edit]"))return;const r=typeof document<"u"?document.querySelector('table[em-type="social"]'):null;if(r?.isConnected){Nl("em-edit"),r.setAttribute("em-edit","active"),e({elem:r});return}e({elem:null})},0)},xO=e=>e,PO=e=>`table:empty::before {
47
- /*content: 'Paste block here';*/
48
- }
49
-
50
- table:empty::after {
51
- content: '${e.DROP_BLOCK_HINT}' !important;
52
- }
53
-
54
- [em="block"].empty-structure td:not([height]):not([width]):empty::before {
55
- /*content: 'Paste atom here';*/
56
- }
57
-
58
- .em-block-insert:after {
59
- content: '${e.PASTE_HERE}' !important;
60
- }
61
-
62
- .em-atom-insert:after,
63
- .em-blockatom-insert:after {
64
- content: '${e.PASTE_HERE}' !important;
65
- }`,NO=class extends Z{constructor(e){super(),k(this,"htmlDocument",void 0),k(this,"_localized",{...Zp(xO)}),k(this,"_styles",""),k(this,"_onChangeLocaleEmitter",new J),k(this,"_onDomChanged",()=>{if(!document.querySelector('[data-em-localization="true"]')&&this._styles){const t=document.querySelector("head")||document.querySelector("body");if(t){const r=document.createElement("style");r.innerHTML=this._styles,r.dataset.emLocalization="true",t.insertBefore(r,t.firstChild)}}}),k(this,"onChangeLocale",this._onChangeLocaleEmitter.event),this.htmlDocument=e,this.addDisposable(e.onChange(this._onDomChanged))}get localized(){return this._localized}setTranslations({name:e,data:t}){this._localized=t;const r=document.createElement("style");r.dataset.emLocalization="true";const n=PO(t);if(n&&this._styles!==n){this._styles=n,r.innerHTML=n;const i=document.querySelector('[data-em-localization="true"]');if(i)i.replaceWith(r);else{const o=document.querySelector("head")||document.querySelector("body");o?.insertBefore(r,o.firstChild)}this.htmlDocument.commit(!1)}this._onChangeLocaleEmitter.fire({name:e,data:t})}};function MO(e){const t=new NO(e),r=n=>{t.setTranslations(n)};return t.addDisposable(X.addListener(me.SANDBOX_TRANSLATIONS,r)),t}var RO=/^(?:ant|vscode|monaco|docs)-/;function DO(e){return RO.test(e)}function IO(){const e="ub".trim();if(!/^[a-z][a-z0-9]*$/i.test(e))throw new Error(`[cssVars] REACT_APP_CSS_VAR_PREFIX="${e}" is not a valid CSS identifier fragment.`);return e}var BO=new Set(["animation-opacity","inline-edit-border-radius","separator-border","text-link-decoration"]);function FO(){return BO}var jO=new Set;function $O(e,t,r=jO){return e.startsWith(`${t}-`)?!1:!DO(e)&&!r.has(e)}function HO(e,t){return`--${t}-${e}`}function zO(e){const t=IO();return $O(e,t,FO())?HO(e,t):`--${e}`}function VO(e){const t=new Z;let r="";const n=i=>{document.querySelectorAll("style[em-variables]").forEach(a=>a.remove());const o=document.createElement("style");o.dataset.themeVaribalse="true";const s=Object.entries(i).map(([a,l])=>` ${zO(a)}: ${String(l)};
66
- `).join("");if(s&&r!==s){r=s,o.innerHTML=`:root {
67
- ${s}}`;const a=document.querySelector('[data-theme-varibalse="true"]');if(a)a.replaceWith(o);else{const l=document.querySelector("head")||document.querySelector("body");l?.insertBefore(o,l.firstChild)}e.commit(!1)}};return t.addDisposable(e.onChange(()=>{if(!document.querySelector('[data-theme-varibalse="true"]')&&r){const i=document.createElement("style");i.dataset.themeVaribalse="true",i.innerHTML=`:root {
68
- ${r}}`;const o=document.querySelector("head")||document.querySelector("body");o?.insertBefore(i,o.firstChild),e.commit(!1)}})),t.addDisposable(X.addListener(me.SANDBOX_SET_THEME_VARIABLES,n)),t}var WO=()=>{try{return localStorage.getItem("em-debug-project-fonts")==="1"}catch{return!1}},Ft=(e,t)=>{WO()},Et=new Map;function UO(e){return Et.get(e.toLowerCase())?.[0]}function ja(e){return Et.get(e.toLowerCase())??[]}function qO(){return Et.size>0}function GO(){return[...Et.values()].map(e=>e[0])}function XO(e){Et=new Map;for(const t of e??[]){const r=t.family.toLowerCase();Et.set(r,[...Et.get(r)??[],t])}return Et}var YO=e=>{const t=XO(e);Ft("iframe: project fonts map received",{count:t.size,families:[...t.keys()],entries:e})};function KO(){const e=new Z;return e.addDisposable(X.addListener(me.SANDBOX_SET_PROJECT_FONTS,YO)),e}var QO={"sans-serif":"Helvetica, Arial, sans-serif",serif:'"Times New Roman", Times, serif'};function qh(e){return e.category==="serif"?"serif":"sans-serif"}function Gh(e,t){const r=UO(t);return r?(e.style.fontFamily=QO[qh(r)],!0):!1}var ZO=/(?:\/\*\s*em-project-font-[^*]*\*\/\s*)?@font-face\s*\{([^}]*)\}\s*/g,JO=/url\(\s*(['"]?)(.*?)\1\s*\)/,ex=e=>e.trim().replace(/^(['"])(.*)\1$/,"$2");function $a(e){return Array.from(e.matchAll(ZO),t=>{const r=new Map(t[1].split(";").map(n=>n.split(":")).filter(n=>n.length>1).map(([n,...i])=>[n.trim().toLowerCase(),i.join(":").trim()]));return{start:t.index??0,end:(t.index??0)+t[0].length,family:ex(r.get("font-family")??""),src:JO.exec(r.get("src")??"")?.[2]??"",weight:r.get("font-weight")||"400",style:r.get("font-style")||"normal"}})}function Xh(e){return[e.family.toLowerCase(),e.src,e.weight,e.style].join("|")}function Yh(e,t){return[...t].sort((r,n)=>n.start-r.start).reduce((r,n)=>r.slice(0,n.start)+r.slice(n.end),e)}function Ji(e,t){return e.replace(/(^|[;\s])color:\s*[^;]*;?/i,`$1color: ${t};`)}function rt(e){return typeof e=="number"&&Number.isFinite(e)}function tx(e){return!e||typeof e!="object"?!1:rt(e.all)||rt(e.top)||rt(e.right)||rt(e.bottom)||rt(e.left)}function rx(e,t){const r=rt(t.all)?t.all:void 0,n=rt(t.top)?t.top:r,i=rt(t.right)?t.right:r,o=rt(t.bottom)?t.bottom:r,s=rt(t.left)?t.left:r;n!==void 0&&(e.style.paddingTop=`${n}px`),i!==void 0&&(e.style.paddingRight=`${i}px`),o!==void 0&&(e.style.paddingBottom=`${o}px`),s!==void 0&&(e.style.paddingLeft=`${s}px`)}function nx(e,t){const r=document.head.querySelectorAll("link");if(Array.from(r).some(o=>o.getAttribute("em-class")===t&&o.getAttribute("href")===e))return;const n=document.createElement("link");n.setAttribute("rel","stylesheet"),n.setAttribute("href",e),n.setAttribute("em-class",t);const i=document.querySelector("title");if(i){i.insertAdjacentElement("afterend",n);return}document.head.appendChild(n)}function Kh(e){return e.stylesheet??Qp(e.source_url)}function ix(e){return`/* ${`em-project-font-${zr(e.family)}-${e.weight}-${e.style}`} */
69
- @font-face{font-family:${JSON.stringify(e.family)};src:url(${JSON.stringify(e.source_url)});font-weight:${e.weight};font-style:${e.style};font-display:swap;}`}var ox=e=>Xh({family:e.family,src:e.source_url,weight:e.weight,style:e.style});function Qh(e,t){const r=e.fontFamilyArray[1],n=e.fontFamilyArray[2],i=e.fontFamilyArray[3],o=Zn(n,i);if(r==="Project Fonts"){const h=ja(n),f=h[0];if(Ft("iframe: addFontFamilyClass Project Fonts",{fontFamilyArray:e.fontFamilyArray,emClass:o,entryFound:!!f,faces:h}),f){ie();const g=document.querySelector('style[em="styles"]'),y=[...new Set(h.filter(Kh).map(A=>A.source_url))];if(y.forEach(A=>nx(A,o)),g){const A=new Set($a(g.textContent??"").map(Xh)),L=h.filter(m=>!Kh(m)).filter(m=>!A.has(ox(m))).map(ix).join(`
70
- `),C=L!=="";C&&g.insertAdjacentHTML("afterbegin",`${L}
71
- `);const O=`.${rc(o)} {`,E=!g.textContent?.includes(O);if(E){const m=Jn[i],b=(m||f.weight).replace(/i$/g,""),S=m?m.endsWith("i"):f.style!=="normal";let p=`font-family: ${JSON.stringify(f.family)}, ${qh(f)}!important;`;p+=` font-weight: ${b}!important;`,S&&(p+=" font-style: italic!important;"),g.insertAdjacentHTML("beforeend",`
72
- ${O} ${p} }`)}Ft("iframe: project font attached",{emClass:o,stylesheetUrls:y,faceInserted:C,classInserted:E})}else Ft("iframe: style[em=styles] not found — @font-face not injected");setTimeout(()=>{vn({elem:document.head},t),yn(t),t&&t(!1)},0);return}Ft("iframe: Project Fonts entry missing in map — skip Google Fonts fallback",{fontFamily:n,mapSize:document.querySelectorAll('style[em="styles"]').length}),setTimeout(()=>{vn({elem:document.head},t),yn(t)},0);return}const s=document.head.querySelectorAll("link");if(!Array.from(s).some(h=>h.getAttribute("em-class")===o)){const h=document.createElement("link");h.setAttribute("rel","stylesheet");const f=Jn[i]||"400",g=f.indexOf("i")>-1,y=f.replaceAll("i","");h.setAttribute("href",`https://fonts.googleapis.com/css2?family=${n}:ital,wght@${g?"1":"0"},${y}&display=swap`),h.setAttribute("em-class",o);const A=document.querySelector("title");A&&A.insertAdjacentElement("afterend",h)}ie();const a=Jn[i]||"400",l=a.replaceAll("i",""),c=a.indexOf("i")>-1;let u=`font-family: '${n}', ${cc[r]||"sans-serif"}!important;`;u+=` font-weight: ${l}!important;`,c&&(u+=" font-style: italic!important;");const d=document.querySelector('style[em="styles"]');d&&d.insertAdjacentHTML("beforeend",`
73
- .${rc(o)} { ${u} }`),setTimeout(()=>{vn({elem:document.head},t),yn(t)},0)}function sx(e){const t=zr(e);return!!document.querySelector(`[class*="em-font-${t}-"], [class*="em-font-${t.toLowerCase()}-"]`)}function yn(e){const t=document.querySelector('style[em="styles"]'),r=t?.textContent??"",n=$a(r).filter(i=>ja(i.family).length>0&&!sx(i.family));!t||n.length===0||(t.textContent=Yh(r,n),Ft("iframe: clearProjectFontFaces removed stale @font-face",{removedFamilies:[...new Set(n.map(i=>i.family))]}),e&&e(!1))}function vn(e,t){let r=!1;e.elem.querySelectorAll("link[em-class]").forEach(n=>{const i=n.getAttribute("em-class");i&&!document.querySelector("."+i)&&(r=!0,n.remove())}),r&&t&&t(!1)}function Ha(e,t,r){t[0]==="Safe Fonts"?(e.style.fontFamily=t[1],vn({elem:document.head},r),yn(r)):t[0]==="Google Fonts"&&(t[1]==="Sans Serif"?e.style.fontFamily="Helvetica, Arial, sans-serif":t[1]==="Serif"?e.style.fontFamily='"Times New Roman", Times, serif':t[1]==="Project Fonts"&&Gh(e,t[2]),e.classList.remove(...[...e.classList].filter(n=>n.startsWith("em-font"))),e.classList.add(Zn(t[2],t[3])),Qh({fontFamilyArray:t},r))}function Zh(e,t){if(t){const r=e.querySelector("b");r?r.replaceWith(...r.childNodes):e.querySelector("strong")||(e.innerHTML="<strong>"+e.innerHTML+"</strong>")}else{const r=e.querySelector("strong"),n=e.querySelector("b");r?r.replaceWith(...r.childNodes):n&&n.replaceWith(...n.childNodes)}if(e.style.fontWeight){const r=e.getAttribute("style")?.replace(/(\s+)?font-weight:(\s+)?(bold|[0-9]*)(;)?/,"")||"";e.setAttribute("style",r)}}function Jh(e,t){if(t){const r=e.querySelector("i");r?r.replaceWith(...r.childNodes):e.querySelector("em")||(e.innerHTML="<em>"+e.innerHTML+"</em>")}else{const r=e.querySelector("em"),n=e.querySelector("i");r?r.replaceWith(...r.childNodes):n&&n.replaceWith(...n.childNodes)}if(e.style.fontStyle){const r=e.getAttribute("style")?.replace(/(\s+)?font-style:(\s+)?.*?;/,"")||"";e.setAttribute("style",r)}}function em(e,t){let r;t>0?r=e.style.letterSpacing?e.getAttribute("style").replace(/letter-spacing:(\s+)?.*?px/,`letter-spacing: ${t}px`):e.getAttribute("style")+` letter-spacing: ${t}px;`:r=e.getAttribute("style")?.replace(/(\s+)?letter-spacing:(\s+)?.*?px(;)?/,"")||"",e.setAttribute("style",r)}function En(e,t){e&&e.tagName==="TABLE"&&(e.classList.contains("em-vindent-table")||e.querySelector("td")?.innerHTML==="")&&e.querySelector("td")?.setAttribute("height",String(t))}function ax(e,t){const r=es(),n=e.html.substring(0,3)==="<tr"?document.createElement("table"):document.createElement("div");return n.replaceChildren(...xe(e.html)),n.querySelectorAll('[em="atom"] div[style*="font-family"]').forEach(i=>{const o=i;if(!o.style.display&&parseFloat(o.style.fontSize)<=20){const s=r.text?.fontFamily||[],a=Ji((o.getAttribute("style")||"").replace(/font-size:(\s+)?.*?px/,`font-size: ${r.text?.fontSize||16}px`).replace(/line-height:(\s+)?.*?px/,`line-height: ${r.text?.lineHeight||24}px`),r.text?.color||"#000000");o.setAttribute("style",a),Ha(o,s,t);const l=o.closest('[em="atom"] > tr > td');l?.style.paddingBottom?l.style.paddingBottom=(r.text?.paddingBottom||0)+"px":En(o.nextElementSibling??o.closest("table")?.nextElementSibling,r.text?.paddingBottom||0)}else if(!o.style.display&&parseFloat(o.style.fontSize)>20){const s=r.headings?.fontFamily||[],a=Ji((o.getAttribute("style")||"").replace(/font-size:(\s+)?.*?px/,`font-size: ${r.headings?.fontSize||24}px`).replace(/line-height:(\s+)?.*?px/,`line-height: ${r.headings?.lineHeight||32}px`),r.headings?.color||"#000000");o.setAttribute("style",a),Ha(o,s,t),em(o,r.headings?.letterSpacing||0),Zh(o,r.headings?.bold||!1),Jh(o,r.headings?.italic||!1);const l=o.closest('[em="atom"] > tr > td');l?.style.paddingTop?l.style.paddingTop=(r.headings?.paddingTop||0)+"px":En(o.previousElementSibling,r.headings?.paddingTop||0),l?.style.paddingBottom?l.style.paddingBottom=(r.headings?.paddingBottom||0)+"px":En(o.nextElementSibling,r.headings?.paddingBottom||0)}}),n.querySelectorAll('[em="atom"] a[style*="color"]').forEach(i=>{const o=i;if(o.style.display){if(o.style.display==="block"){const s=r.buttons?.fontFamily||[],a=Ji((o.getAttribute("style")||"").replace(/font-size:(\s+)?.*?px/,`font-size: ${r.buttons?.fontSize||16}px`),r.buttons?.color||"#FFFFFF");o.setAttribute("style",a),Ha(o,s,t);const l=o.closest("td"),c=!!l&&!!Jt(l)&&!Jt(o),u=c?o:l,d=r.buttons?.backgroundColor||"#1677FF";u&&(u.style.backgroundColor=d,u.tagName==="TD"&&u.setAttribute("bgcolor",d)),l&&l.setAttribute("align",r.buttons?.textAlign||"center"),em(o,r.buttons?.letterSpacing||0),Zh(o,r.buttons?.bold||!1),Jh(o,r.buttons?.italic||!1);const h=o.closest('[em="atom"] > tr > td'),f=o.closest("table");h?.style.paddingTop?h.style.paddingTop=(r.buttons?.marginTop||0)+"px":f?.previousElementSibling&&En(f.previousElementSibling,r.buttons?.marginTop||0),h?.style.paddingBottom?h.style.paddingBottom=(r.buttons?.marginBottom||0)+"px":f?.nextElementSibling&&En(f.nextElementSibling,r.buttons?.marginBottom||0);const g=r.buttons?.padding||{};g.all&&(o.style.padding=g.all+"px"),g.top&&(o.style.paddingTop=g.top+"px"),g.right&&(o.style.paddingRight=g.right+"px"),g.bottom&&(o.style.paddingBottom=g.bottom+"px"),g.left&&(o.style.paddingLeft=g.left+"px"),u&&(r.buttons?.border&&sc({settings:{border:r.buttons.border},elem:u}),r.buttons?.borderRadius&&ac({settings:{borderRadius:r.buttons.borderRadius},elem:u})),c&&Ac(o,{backgroundColor:d})}}else{const s=Ji(o.getAttribute("style"),r.links?.color||"#0000FF");o.setAttribute("style",s);let a;r.links?.underline?a=o.style.textDecoration?o.getAttribute("style").replace(/(\s+)?text-decoration:(\s+)?.*?;/,"text-decoration: underline;"):o.getAttribute("style")+" text-decoration: underline;":a=o.style.textDecoration?o.getAttribute("style").replace(/(\s+)?text-decoration:(\s+)?.*?;/,"text-decoration: none;"):o.getAttribute("style")+" text-decoration: none;",o.setAttribute("style",a)}}),n.querySelector('[em="block"]')&&r.block?.backgroundColor&&n.querySelectorAll('[em="block"]').forEach(i=>{i.querySelectorAll(":scope > td").forEach(o=>{const s=o;s.setAttribute("bgcolor",r.block.backgroundColor),s.style.backgroundColor=r.block.backgroundColor})}),n.tagName==="DIV"?Se(n):Se(n.querySelector("tbody")||n)}function lx(e){const t=es(),r=e.html.substring(0,3)==="<tr"?document.createElement("table"):document.createElement("div");r.replaceChildren(...xe(e.html)),r.querySelector('[em="block"]')&&t.block?.backgroundColor&&r.querySelectorAll('[em="block"]').forEach(i=>{i.querySelectorAll(":scope > td").forEach(o=>{const s=o;s.setAttribute("bgcolor",t.block.backgroundColor),s.style.backgroundColor=t.block.backgroundColor})});const n=t.block?.padding;return tx(n)&&r.querySelectorAll('[em="block"] > td').forEach(i=>{rx(i,n)}),r.tagName==="DIV"?Se(r):Se(r.querySelector("tbody")||r)}function cx(e,t,r){return(t=hx(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function ut(){return ut=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},ut.apply(null,arguments)}function tm(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function nt(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?tm(Object(r),!0).forEach(function(n){cx(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):tm(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function ux(e,t){if(e==null)return{};var r,n,i=dx(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function dx(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)!==-1)continue;r[n]=e[n]}return r}function fx(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function hx(e){var t=fx(e,"string");return typeof t=="symbol"?t:t+""}function za(e){"@babel/helpers - typeof";return za=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},za(e)}var mx="1.15.7";function dt(e){if(typeof window<"u"&&window.navigator)return!!navigator.userAgent.match(e)}var ft=dt(/(?:Trident.*rv[ :]?11\.|msie|iemobile|Windows Phone)/i),_n=dt(/Edge/i),rm=dt(/firefox/i),Sn=dt(/safari/i)&&!dt(/chrome/i)&&!dt(/android/i),Va=dt(/iP(ad|od|hone)/i),nm=dt(/chrome/i)&&dt(/android/i),im={capture:!1,passive:!1};function q(e,t,r){e.addEventListener(t,r,!ft&&im)}function U(e,t,r){e.removeEventListener(t,r,!ft&&im)}function eo(e,t){if(t){if(t[0]===">"&&(t=t.substring(1)),e)try{if(e.matches)return e.matches(t);if(e.msMatchesSelector)return e.msMatchesSelector(t);if(e.webkitMatchesSelector)return e.webkitMatchesSelector(t)}catch{return!1}return!1}}function om(e){return e.host&&e!==document&&e.host.nodeType&&e.host!==e?e.host:e.parentNode}function Ue(e,t,r,n){if(e){r=r||document;do{if(t!=null&&(t[0]===">"?e.parentNode===r&&eo(e,t):eo(e,t))||n&&e===r)return e;if(e===r)break}while(e=om(e))}return null}var sm=/\s+/g;function Ne(e,t,r){e&&t&&(e.classList?e.classList[r?"add":"remove"](t):e.className=((" "+e.className+" ").replace(sm," ").replace(" "+t+" "," ")+(r?" "+t:"")).replace(sm," "))}function $(e,t,r){var n=e&&e.style;if(n){if(r===void 0)return document.defaultView&&document.defaultView.getComputedStyle?r=document.defaultView.getComputedStyle(e,""):e.currentStyle&&(r=e.currentStyle),t===void 0?r:r[t];!(t in n)&&t.indexOf("webkit")===-1&&(t="-webkit-"+t),n[t]=r+(typeof r=="string"?"":"px")}}function Tr(e,t){var r="";if(typeof e=="string")r=e;else do{var n=$(e,"transform");n&&n!=="none"&&(r=n+" "+r)}while(!t&&(e=e.parentNode));var i=window.DOMMatrix||window.WebKitCSSMatrix||window.CSSMatrix||window.MSCSSMatrix;return i&&new i(r)}function am(e,t,r){if(e){var n=e.getElementsByTagName(t),i=0,o=n.length;if(r)for(;i<o;i++)r(n[i],i);return n}return[]}function it(){var e=document.scrollingElement;return e||document.documentElement}function ue(e,t,r,n,i){if(!(!e.getBoundingClientRect&&e!==window)){var o,s,a,l,c,u,d;if(e!==window&&e.parentNode&&e!==it()?(o=e.getBoundingClientRect(),s=o.top,a=o.left,l=o.bottom,c=o.right,u=o.height,d=o.width):(s=0,a=0,l=window.innerHeight,c=window.innerWidth,u=window.innerHeight,d=window.innerWidth),(t||r)&&e!==window&&(i=i||e.parentNode,!ft))do if(i&&i.getBoundingClientRect&&($(i,"transform")!=="none"||r&&$(i,"position")!=="static")){var h=i.getBoundingClientRect();s-=h.top+parseInt($(i,"border-top-width")),a-=h.left+parseInt($(i,"border-left-width")),l=s+o.height,c=a+o.width;break}while(i=i.parentNode);if(n&&e!==window){var f=Tr(i||e),g=f&&f.a,y=f&&f.d;f&&(s/=y,a/=g,d/=g,u/=y,l=s+u,c=a+d)}return{top:s,left:a,bottom:l,right:c,width:d,height:u}}}function lm(e,t,r){for(var n=_t(e,!0),i=ue(e)[t];n;){var o=ue(n)[r],s=void 0;if(r==="top"||r==="left"?s=i>=o:s=i<=o,!s)return n;if(n===it())break;n=_t(n,!1)}return!1}function kr(e,t,r,n){for(var i=0,o=0,s=e.children;o<s.length;){if(s[o].style.display!=="none"&&s[o]!==j.ghost&&(n||s[o]!==j.dragged)&&Ue(s[o],r.draggable,e,!1)){if(i===t)return s[o];i++}o++}return null}function Wa(e,t){for(var r=e.lastElementChild;r&&(r===j.ghost||$(r,"display")==="none"||t&&!eo(r,t));)r=r.previousElementSibling;return r||null}function Fe(e,t){var r=0;if(!e||!e.parentNode)return-1;for(;e=e.previousElementSibling;)e.nodeName.toUpperCase()!=="TEMPLATE"&&e!==j.clone&&(!t||eo(e,t))&&r++;return r}function cm(e){var t=0,r=0,n=it();if(e)do{var i=Tr(e),o=i.a,s=i.d;t+=e.scrollLeft*o,r+=e.scrollTop*s}while(e!==n&&(e=e.parentNode));return[t,r]}function px(e,t){for(var r in e)if(e.hasOwnProperty(r)){for(var n in t)if(t.hasOwnProperty(n)&&t[n]===e[r][n])return Number(r)}return-1}function _t(e,t){if(!e||!e.getBoundingClientRect)return it();var r=e,n=!1;do if(r.clientWidth<r.scrollWidth||r.clientHeight<r.scrollHeight){var i=$(r);if(r.clientWidth<r.scrollWidth&&(i.overflowX=="auto"||i.overflowX=="scroll")||r.clientHeight<r.scrollHeight&&(i.overflowY=="auto"||i.overflowY=="scroll")){if(!r.getBoundingClientRect||r===document.body)return it();if(n||t)return r;n=!0}}while(r=r.parentNode);return it()}function gx(e,t){if(e&&t)for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r]);return e}function Ua(e,t){return Math.round(e.top)===Math.round(t.top)&&Math.round(e.left)===Math.round(t.left)&&Math.round(e.height)===Math.round(t.height)&&Math.round(e.width)===Math.round(t.width)}var wn;function um(e,t){return function(){if(!wn){var r=arguments,n=this;r.length===1?e.call(n,r[0]):e.apply(n,r),wn=setTimeout(function(){wn=void 0},t)}}}function bx(){clearTimeout(wn),wn=void 0}function dm(e,t,r){e.scrollLeft+=t,e.scrollTop+=r}function fm(e){var t=window.Polymer,r=window.jQuery||window.Zepto;return t&&t.dom?t.dom(e).cloneNode(!0):r?r(e).clone(!0)[0]:e.cloneNode(!0)}function hm(e,t,r){var n={};return Array.from(e.children).forEach(function(i){var o,s,a,l;if(!(!Ue(i,t.draggable,e,!1)||i.animated||i===r)){var c=ue(i);n.left=Math.min((o=n.left)!==null&&o!==void 0?o:1/0,c.left),n.top=Math.min((s=n.top)!==null&&s!==void 0?s:1/0,c.top),n.right=Math.max((a=n.right)!==null&&a!==void 0?a:-1/0,c.right),n.bottom=Math.max((l=n.bottom)!==null&&l!==void 0?l:-1/0,c.bottom)}}),n.width=n.right-n.left,n.height=n.bottom-n.top,n.x=n.left,n.y=n.top,n}var Te="Sortable"+new Date().getTime();function yx(){var e=[],t;return{captureAnimationState:function(){e=[],this.options.animation&&[].slice.call(this.el.children).forEach(function(n){if(!($(n,"display")==="none"||n===j.ghost)){e.push({target:n,rect:ue(n)});var i=nt({},e[e.length-1].rect);if(n.thisAnimationDuration){var o=Tr(n,!0);o&&(i.top-=o.f,i.left-=o.e)}n.fromRect=i}})},addAnimationState:function(n){e.push(n)},removeAnimationState:function(n){e.splice(px(e,{target:n}),1)},animateAll:function(n){var i=this;if(!this.options.animation){clearTimeout(t),typeof n=="function"&&n();return}var o=!1,s=0;e.forEach(function(a){var l=0,c=a.target,u=c.fromRect,d=ue(c),h=c.prevFromRect,f=c.prevToRect,g=a.rect,y=Tr(c,!0);y&&(d.top-=y.f,d.left-=y.e),c.toRect=d,c.thisAnimationDuration&&Ua(h,d)&&!Ua(u,d)&&(g.top-d.top)/(g.left-d.left)===(u.top-d.top)/(u.left-d.left)&&(l=Ex(g,h,f,i.options)),Ua(d,u)||(c.prevFromRect=u,c.prevToRect=d,l||(l=i.options.animation),i.animate(c,g,d,l)),l&&(o=!0,s=Math.max(s,l),clearTimeout(c.animationResetTimer),c.animationResetTimer=setTimeout(function(){c.animationTime=0,c.prevFromRect=null,c.fromRect=null,c.prevToRect=null,c.thisAnimationDuration=null},l),c.thisAnimationDuration=l)}),clearTimeout(t),o?t=setTimeout(function(){typeof n=="function"&&n()},s):typeof n=="function"&&n(),e=[]},animate:function(n,i,o,s){if(s){$(n,"transition",""),$(n,"transform","");var a=Tr(this.el),l=a&&a.a,c=a&&a.d,u=(i.left-o.left)/(l||1),d=(i.top-o.top)/(c||1);n.animatingX=!!u,n.animatingY=!!d,$(n,"transform","translate3d("+u+"px,"+d+"px,0)"),this.forRepaintDummy=vx(n),$(n,"transition","transform "+s+"ms"+(this.options.easing?" "+this.options.easing:"")),$(n,"transform","translate3d(0,0,0)"),typeof n.animated=="number"&&clearTimeout(n.animated),n.animated=setTimeout(function(){$(n,"transition",""),$(n,"transform",""),n.animated=!1,n.animatingX=!1,n.animatingY=!1},s)}}}}function vx(e){return e.offsetWidth}function Ex(e,t,r,n){return Math.sqrt(Math.pow(t.top-e.top,2)+Math.pow(t.left-e.left,2))/Math.sqrt(Math.pow(t.top-r.top,2)+Math.pow(t.left-r.left,2))*n.animation}var Lr=[],qa={initializeByDefault:!0},Cn={mount:function(t){for(var r in qa)qa.hasOwnProperty(r)&&!(r in t)&&(t[r]=qa[r]);Lr.forEach(function(n){if(n.pluginName===t.pluginName)throw"Sortable: Cannot mount plugin ".concat(t.pluginName," more than once")}),Lr.push(t)},pluginEvent:function(t,r,n){var i=this;this.eventCanceled=!1,n.cancel=function(){i.eventCanceled=!0};var o=t+"Global";Lr.forEach(function(s){r[s.pluginName]&&(r[s.pluginName][o]&&r[s.pluginName][o](nt({sortable:r},n)),r.options[s.pluginName]&&r[s.pluginName][t]&&r[s.pluginName][t](nt({sortable:r},n)))})},initializePlugins:function(t,r,n,i){Lr.forEach(function(a){var l=a.pluginName;if(!(!t.options[l]&&!a.initializeByDefault)){var c=new a(t,r,t.options);c.sortable=t,c.options=t.options,t[l]=c,ut(n,c.defaults)}});for(var o in t.options)if(t.options.hasOwnProperty(o)){var s=this.modifyOption(t,o,t.options[o]);typeof s<"u"&&(t.options[o]=s)}},getEventProperties:function(t,r){var n={};return Lr.forEach(function(i){typeof i.eventProperties=="function"&&ut(n,i.eventProperties.call(r[i.pluginName],t))}),n},modifyOption:function(t,r,n){var i;return Lr.forEach(function(o){t[o.pluginName]&&o.optionListeners&&typeof o.optionListeners[r]=="function"&&(i=o.optionListeners[r].call(t[o.pluginName],n))}),i}};function _x(e){var t=e.sortable,r=e.rootEl,n=e.name,i=e.targetEl,o=e.cloneEl,s=e.toEl,a=e.fromEl,l=e.oldIndex,c=e.newIndex,u=e.oldDraggableIndex,d=e.newDraggableIndex,h=e.originalEvent,f=e.putSortable,g=e.extraEventProperties;if(t=t||r&&r[Te],!!t){var y,A=t.options,L="on"+n.charAt(0).toUpperCase()+n.substr(1);window.CustomEvent&&!ft&&!_n?y=new CustomEvent(n,{bubbles:!0,cancelable:!0}):(y=document.createEvent("Event"),y.initEvent(n,!0,!0)),y.to=s||r,y.from=a||r,y.item=i||r,y.clone=o,y.oldIndex=l,y.newIndex=c,y.oldDraggableIndex=u,y.newDraggableIndex=d,y.originalEvent=h,y.pullMode=f?f.lastPutMode:void 0;var C=nt(nt({},g),Cn.getEventProperties(n,t));for(var O in C)y[O]=C[O];r&&r.dispatchEvent(y),A[L]&&A[L].call(t,y)}}var Sx=["evt"],ke=function(t,r){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},i=n.evt,o=ux(n,Sx);Cn.pluginEvent.bind(j)(t,r,nt({dragEl:M,parentEl:le,ghostEl:H,rootEl:re,nextEl:jt,lastDownEl:to,cloneEl:oe,cloneHidden:St,dragStarted:Tn,putSortable:pe,activeSortable:j.active,originalEvent:i,oldIndex:Or,oldDraggableIndex:An,newIndex:Me,newDraggableIndex:wt,hideGhostForTarget:Em,unhideGhostForTarget:_m,cloneNowHidden:function(){St=!0},cloneNowShown:function(){St=!1},dispatchSortableEvent:function(a){we({sortable:r,name:a,originalEvent:i})}},o))};function we(e){_x(nt({putSortable:pe,cloneEl:oe,targetEl:M,rootEl:re,oldIndex:Or,oldDraggableIndex:An,newIndex:Me,newDraggableIndex:wt},e))}var M,le,H,re,jt,to,oe,St,Or,Me,An,wt,ro,pe,xr=!1,no=!1,io=[],$t,qe,Ga,Xa,mm,pm,Tn,Pr,kn,Ln=!1,oo=!1,so,Ee,Ya=[],Ka=!1,ao=[],lo=typeof document<"u",co=Va,gm=_n||ft?"cssFloat":"float",wx=lo&&!nm&&!Va&&"draggable"in document.createElement("div"),bm=(function(){if(lo){if(ft)return!1;var e=document.createElement("x");return e.style.cssText="pointer-events:auto",e.style.pointerEvents==="auto"}})(),ym=function(t,r){var n=$(t),i=parseInt(n.width)-parseInt(n.paddingLeft)-parseInt(n.paddingRight)-parseInt(n.borderLeftWidth)-parseInt(n.borderRightWidth),o=kr(t,0,r),s=kr(t,1,r),a=o&&$(o),l=s&&$(s),c=a&&parseInt(a.marginLeft)+parseInt(a.marginRight)+ue(o).width,u=l&&parseInt(l.marginLeft)+parseInt(l.marginRight)+ue(s).width;if(n.display==="flex")return n.flexDirection==="column"||n.flexDirection==="column-reverse"?"vertical":"horizontal";if(n.display==="grid")return n.gridTemplateColumns.split(" ").length<=1?"vertical":"horizontal";if(o&&a.float&&a.float!=="none"){var d=a.float==="left"?"left":"right";return s&&(l.clear==="both"||l.clear===d)?"vertical":"horizontal"}return o&&(a.display==="block"||a.display==="flex"||a.display==="table"||a.display==="grid"||c>=i&&n[gm]==="none"||s&&n[gm]==="none"&&c+u>i)?"vertical":"horizontal"},Cx=function(t,r,n){var i=n?t.left:t.top,o=n?t.right:t.bottom,s=n?t.width:t.height,a=n?r.left:r.top,l=n?r.right:r.bottom,c=n?r.width:r.height;return i===a||o===l||i+s/2===a+c/2},Ax=function(t,r){var n;return io.some(function(i){var o=i[Te].options.emptyInsertThreshold;if(!(!o||Wa(i))){var s=ue(i),a=t>=s.left-o&&t<=s.right+o,l=r>=s.top-o&&r<=s.bottom+o;if(a&&l)return n=i}}),n},vm=function(t){function r(o,s){return function(a,l,c,u){var d=a.options.group.name&&l.options.group.name&&a.options.group.name===l.options.group.name;if(o==null&&(s||d))return!0;if(o==null||o===!1)return!1;if(s&&o==="clone")return o;if(typeof o=="function")return r(o(a,l,c,u),s)(a,l,c,u);var h=(s?a:l).options.group.name;return o===!0||typeof o=="string"&&o===h||o.join&&o.indexOf(h)>-1}}var n={},i=t.group;(!i||za(i)!="object")&&(i={name:i}),n.name=i.name,n.checkPull=r(i.pull,!0),n.checkPut=r(i.put),n.revertClone=i.revertClone,t.group=n},Em=function(){!bm&&H&&$(H,"display","none")},_m=function(){!bm&&H&&$(H,"display","")};lo&&!nm&&document.addEventListener("click",function(e){if(no)return e.preventDefault(),e.stopPropagation&&e.stopPropagation(),e.stopImmediatePropagation&&e.stopImmediatePropagation(),no=!1,!1},!0);var Ht=function(t){if(M){t=t.touches?t.touches[0]:t;var r=Ax(t.clientX,t.clientY);if(r){var n={};for(var i in t)t.hasOwnProperty(i)&&(n[i]=t[i]);n.target=n.rootEl=r,n.preventDefault=void 0,n.stopPropagation=void 0,r[Te]._onDragOver(n)}}},Tx=function(t){M&&M.parentNode[Te]._isOutsideThisEl(t.target)};function j(e,t){if(!(e&&e.nodeType&&e.nodeType===1))throw"Sortable: `el` must be an HTMLElement, not ".concat({}.toString.call(e));this.el=e,this.options=t=ut({},t),e[Te]=this;var r={group:null,sort:!0,disabled:!1,store:null,handle:null,draggable:/^[uo]l$/i.test(e.nodeName)?">li":">*",swapThreshold:1,invertSwap:!1,invertedSwapThreshold:null,removeCloneOnHide:!0,direction:function(){return ym(e,this.options)},ghostClass:"sortable-ghost",chosenClass:"sortable-chosen",dragClass:"sortable-drag",ignore:"a, img",filter:null,preventOnFilter:!0,animation:0,easing:null,setData:function(s,a){s.setData("Text",a.textContent)},dropBubble:!1,dragoverBubble:!1,dataIdAttr:"data-id",delay:0,delayOnTouchOnly:!1,touchStartThreshold:(Number.parseInt?Number:window).parseInt(window.devicePixelRatio,10)||1,forceFallback:!1,fallbackClass:"sortable-fallback",fallbackOnBody:!1,fallbackTolerance:0,fallbackOffset:{x:0,y:0},supportPointer:j.supportPointer!==!1&&"PointerEvent"in window&&(!Sn||Va),emptyInsertThreshold:5};Cn.initializePlugins(this,e,r);for(var n in r)!(n in t)&&(t[n]=r[n]);vm(t);for(var i in this)i.charAt(0)==="_"&&typeof this[i]=="function"&&(this[i]=this[i].bind(this));this.nativeDraggable=t.forceFallback?!1:wx,this.nativeDraggable&&(this.options.touchStartThreshold=1),t.supportPointer?q(e,"pointerdown",this._onTapStart):(q(e,"mousedown",this._onTapStart),q(e,"touchstart",this._onTapStart)),this.nativeDraggable&&(q(e,"dragover",this),q(e,"dragenter",this)),io.push(this.el),t.store&&t.store.get&&this.sort(t.store.get(this)||[]),ut(this,yx())}j.prototype={constructor:j,_isOutsideThisEl:function(t){!this.el.contains(t)&&t!==this.el&&(Pr=null)},_getDirection:function(t,r){return typeof this.options.direction=="function"?this.options.direction.call(this,t,r,M):this.options.direction},_onTapStart:function(t){if(t.cancelable){var r=this,n=this.el,i=this.options,o=i.preventOnFilter,s=t.type,a=t.touches&&t.touches[0]||t.pointerType&&t.pointerType==="touch"&&t,l=(a||t).target,c=t.target.shadowRoot&&(t.path&&t.path[0]||t.composedPath&&t.composedPath()[0])||l,u=i.filter;if(Rx(n),!M&&!(/mousedown|pointerdown/.test(s)&&t.button!==0||i.disabled)&&!c.isContentEditable&&!(!this.nativeDraggable&&Sn&&l&&l.tagName.toUpperCase()==="SELECT")&&(l=Ue(l,i.draggable,n,!1),!(l&&l.animated)&&to!==l)){if(Or=Fe(l),An=Fe(l,i.draggable),typeof u=="function"){if(u.call(this,t,l,this)){we({sortable:r,rootEl:c,name:"filter",targetEl:l,toEl:n,fromEl:n}),ke("filter",r,{evt:t}),o&&t.preventDefault();return}}else if(u&&(u=u.split(",").some(function(d){if(d=Ue(c,d.trim(),n,!1),d)return we({sortable:r,rootEl:d,name:"filter",targetEl:l,fromEl:n,toEl:n}),ke("filter",r,{evt:t}),!0}),u)){o&&t.preventDefault();return}i.handle&&!Ue(c,i.handle,n,!1)||this._prepareDragStart(t,a,l)}}},_prepareDragStart:function(t,r,n){var i=this,o=i.el,s=i.options,a=o.ownerDocument,l;if(n&&!M&&n.parentNode===o){var c=ue(n);if(re=o,M=n,le=M.parentNode,jt=M.nextSibling,to=n,ro=s.group,j.dragged=M,$t={target:M,clientX:(r||t).clientX,clientY:(r||t).clientY},mm=$t.clientX-c.left,pm=$t.clientY-c.top,this._lastX=(r||t).clientX,this._lastY=(r||t).clientY,M.style["will-change"]="all",l=function(){if(ke("delayEnded",i,{evt:t}),j.eventCanceled){i._onDrop();return}i._disableDelayedDragEvents(),!rm&&i.nativeDraggable&&(M.draggable=!0),i._triggerDragStart(t,r),we({sortable:i,name:"choose",originalEvent:t}),Ne(M,s.chosenClass,!0)},s.ignore.split(",").forEach(function(u){am(M,u.trim(),Qa)}),q(a,"dragover",Ht),q(a,"mousemove",Ht),q(a,"touchmove",Ht),s.supportPointer?(q(a,"pointerup",i._onDrop),!this.nativeDraggable&&q(a,"pointercancel",i._onDrop)):(q(a,"mouseup",i._onDrop),q(a,"touchend",i._onDrop),q(a,"touchcancel",i._onDrop)),rm&&this.nativeDraggable&&(this.options.touchStartThreshold=4,M.draggable=!0),ke("delayStart",this,{evt:t}),s.delay&&(!s.delayOnTouchOnly||r)&&(!this.nativeDraggable||!(_n||ft))){if(j.eventCanceled){this._onDrop();return}s.supportPointer?(q(a,"pointerup",i._disableDelayedDrag),q(a,"pointercancel",i._disableDelayedDrag)):(q(a,"mouseup",i._disableDelayedDrag),q(a,"touchend",i._disableDelayedDrag),q(a,"touchcancel",i._disableDelayedDrag)),q(a,"mousemove",i._delayedDragTouchMoveHandler),q(a,"touchmove",i._delayedDragTouchMoveHandler),s.supportPointer&&q(a,"pointermove",i._delayedDragTouchMoveHandler),i._dragStartTimer=setTimeout(l,s.delay)}else l()}},_delayedDragTouchMoveHandler:function(t){var r=t.touches?t.touches[0]:t;Math.max(Math.abs(r.clientX-this._lastX),Math.abs(r.clientY-this._lastY))>=Math.floor(this.options.touchStartThreshold/(this.nativeDraggable&&window.devicePixelRatio||1))&&this._disableDelayedDrag()},_disableDelayedDrag:function(){M&&Qa(M),clearTimeout(this._dragStartTimer),this._disableDelayedDragEvents()},_disableDelayedDragEvents:function(){var t=this.el.ownerDocument;U(t,"mouseup",this._disableDelayedDrag),U(t,"touchend",this._disableDelayedDrag),U(t,"touchcancel",this._disableDelayedDrag),U(t,"pointerup",this._disableDelayedDrag),U(t,"pointercancel",this._disableDelayedDrag),U(t,"mousemove",this._delayedDragTouchMoveHandler),U(t,"touchmove",this._delayedDragTouchMoveHandler),U(t,"pointermove",this._delayedDragTouchMoveHandler)},_triggerDragStart:function(t,r){r=r||t.pointerType=="touch"&&t,!this.nativeDraggable||r?this.options.supportPointer?q(document,"pointermove",this._onTouchMove):r?q(document,"touchmove",this._onTouchMove):q(document,"mousemove",this._onTouchMove):(q(M,"dragend",this),q(re,"dragstart",this._onDragStart));try{document.selection?fo(function(){document.selection.empty()}):window.getSelection().removeAllRanges()}catch{}},_dragStarted:function(t,r){if(xr=!1,re&&M){ke("dragStarted",this,{evt:r}),this.nativeDraggable&&q(document,"dragover",Tx);var n=this.options;!t&&Ne(M,n.dragClass,!1),Ne(M,n.ghostClass,!0),j.active=this,t&&this._appendGhost(),we({sortable:this,name:"start",originalEvent:r})}else this._nulling()},_emulateDragOver:function(){if(qe){this._lastX=qe.clientX,this._lastY=qe.clientY,Em();for(var t=document.elementFromPoint(qe.clientX,qe.clientY),r=t;t&&t.shadowRoot&&(t=t.shadowRoot.elementFromPoint(qe.clientX,qe.clientY),t!==r);)r=t;if(M.parentNode[Te]._isOutsideThisEl(t),r)do{if(r[Te]){var n=void 0;if(n=r[Te]._onDragOver({clientX:qe.clientX,clientY:qe.clientY,target:t,rootEl:r}),n&&!this.options.dragoverBubble)break}t=r}while(r=om(r));_m()}},_onTouchMove:function(t){if($t){var r=this.options,n=r.fallbackTolerance,i=r.fallbackOffset,o=t.touches?t.touches[0]:t,s=H&&Tr(H,!0),a=H&&s&&s.a,l=H&&s&&s.d,c=co&&Ee&&cm(Ee),u=(o.clientX-$t.clientX+i.x)/(a||1)+(c?c[0]-Ya[0]:0)/(a||1),d=(o.clientY-$t.clientY+i.y)/(l||1)+(c?c[1]-Ya[1]:0)/(l||1);if(!j.active&&!xr){if(n&&Math.max(Math.abs(o.clientX-this._lastX),Math.abs(o.clientY-this._lastY))<n)return;this._onDragStart(t,!0)}if(H){s?(s.e+=u-(Ga||0),s.f+=d-(Xa||0)):s={a:1,b:0,c:0,d:1,e:u,f:d};var h="matrix(".concat(s.a,",").concat(s.b,",").concat(s.c,",").concat(s.d,",").concat(s.e,",").concat(s.f,")");$(H,"webkitTransform",h),$(H,"mozTransform",h),$(H,"msTransform",h),$(H,"transform",h),Ga=u,Xa=d,qe=o}t.cancelable&&t.preventDefault()}},_appendGhost:function(){if(!H){var t=this.options.fallbackOnBody?document.body:re,r=ue(M,!0,co,!0,t),n=this.options;if(co){for(Ee=t;$(Ee,"position")==="static"&&$(Ee,"transform")==="none"&&Ee!==document;)Ee=Ee.parentNode;Ee!==document.body&&Ee!==document.documentElement?(Ee===document&&(Ee=it()),r.top+=Ee.scrollTop,r.left+=Ee.scrollLeft):Ee=it(),Ya=cm(Ee)}H=M.cloneNode(!0),Ne(H,n.ghostClass,!1),Ne(H,n.fallbackClass,!0),Ne(H,n.dragClass,!0),$(H,"transition",""),$(H,"transform",""),$(H,"box-sizing","border-box"),$(H,"margin",0),$(H,"top",r.top),$(H,"left",r.left),$(H,"width",r.width),$(H,"height",r.height),$(H,"opacity","0.8"),$(H,"position",co?"absolute":"fixed"),$(H,"zIndex","100000"),$(H,"pointerEvents","none"),j.ghost=H,t.appendChild(H),$(H,"transform-origin",mm/parseInt(H.style.width)*100+"% "+pm/parseInt(H.style.height)*100+"%")}},_onDragStart:function(t,r){var n=this,i=t.dataTransfer,o=n.options;if(ke("dragStart",this,{evt:t}),j.eventCanceled){this._onDrop();return}ke("setupClone",this),j.eventCanceled||(oe=fm(M),oe.removeAttribute("id"),oe.draggable=!1,oe.style["will-change"]="",this._hideClone(),Ne(oe,this.options.chosenClass,!1),j.clone=oe),n.cloneId=fo(function(){ke("clone",n),!j.eventCanceled&&(n.options.removeCloneOnHide||re.insertBefore(oe,M),n._hideClone(),we({sortable:n,name:"clone"}))}),!r&&Ne(M,o.dragClass,!0),r?(no=!0,n._loopId=setInterval(n._emulateDragOver,50)):(U(document,"mouseup",n._onDrop),U(document,"touchend",n._onDrop),U(document,"touchcancel",n._onDrop),i&&(i.effectAllowed="move",o.setData&&o.setData.call(n,i,M)),q(document,"drop",n),$(M,"transform","translateZ(0)")),xr=!0,n._dragStartId=fo(n._dragStarted.bind(n,r,t)),q(document,"selectstart",n),Tn=!0,window.getSelection().removeAllRanges(),Sn&&$(document.body,"user-select","none")},_onDragOver:function(t){var r=this.el,n=t.target,i,o,s,a=this.options,l=a.group,c=j.active,u=ro===l,d=a.sort,h=pe||c,f,g=this,y=!1;if(Ka)return;function A(je,ht){ke(je,g,nt({evt:t,isOwner:u,axis:f?"vertical":"horizontal",revert:s,dragRect:i,targetRect:o,canSort:d,fromSortable:h,target:n,completed:C,onMove:function(ot,Le){return uo(re,r,M,i,ot,ue(ot),t,Le)},changed:O},ht))}function L(){A("dragOverAnimationCapture"),g.captureAnimationState(),g!==h&&h.captureAnimationState()}function C(je){return A("dragOverCompleted",{insertion:je}),je&&(u?c._hideClone():c._showClone(g),g!==h&&(Ne(M,pe?pe.options.ghostClass:c.options.ghostClass,!1),Ne(M,a.ghostClass,!0)),pe!==g&&g!==j.active?pe=g:g===j.active&&pe&&(pe=null),h===g&&(g._ignoreWhileAnimating=n),g.animateAll(function(){A("dragOverAnimationComplete"),g._ignoreWhileAnimating=null}),g!==h&&(h.animateAll(),h._ignoreWhileAnimating=null)),(n===M&&!M.animated||n===r&&!n.animated)&&(Pr=null),!a.dragoverBubble&&!t.rootEl&&n!==document&&(M.parentNode[Te]._isOutsideThisEl(t.target),!je&&Ht(t)),!a.dragoverBubble&&t.stopPropagation&&t.stopPropagation(),y=!0}function O(){Me=Fe(M),wt=Fe(M,a.draggable),we({sortable:g,name:"change",toEl:r,newIndex:Me,newDraggableIndex:wt,originalEvent:t})}if(t.preventDefault!==void 0&&t.cancelable&&t.preventDefault(),n=Ue(n,a.draggable,r,!0),A("dragOver"),j.eventCanceled)return y;if(M.contains(t.target)||n.animated&&n.animatingX&&n.animatingY||g._ignoreWhileAnimating===n)return C(!1);if(no=!1,c&&!a.disabled&&(u?d||(s=le!==re):pe===this||(this.lastPutMode=ro.checkPull(this,c,M,t))&&l.checkPut(this,c,M,t))){if(f=this._getDirection(t,n)==="vertical",i=ue(M),A("dragOverValid"),j.eventCanceled)return y;if(s)return le=re,L(),this._hideClone(),A("revert"),j.eventCanceled||(jt?re.insertBefore(M,jt):re.appendChild(M)),C(!0);var E=Wa(r,a.draggable);if(!E||xx(t,f,this)&&!E.animated){if(E===M)return C(!1);if(E&&r===t.target&&(n=E),n&&(o=ue(n)),uo(re,r,M,i,n,o,t,!!n)!==!1)return L(),E&&E.nextSibling?r.insertBefore(M,E.nextSibling):r.appendChild(M),le=r,O(),C(!0)}else if(E&&Ox(t,f,this)){var m=kr(r,0,a,!0);if(m===M)return C(!1);if(n=m,o=ue(n),uo(re,r,M,i,n,o,t,!1)!==!1)return L(),r.insertBefore(M,m),le=r,O(),C(!0)}else if(n.parentNode===r){o=ue(n);var b=0,S,p=M.parentNode!==r,v=!Cx(M.animated&&M.toRect||i,n.animated&&n.toRect||o,f),T=f?"top":"left",w=lm(n,"top","top")||lm(M,"top","top"),P=w?w.scrollTop:void 0;Pr!==n&&(S=o[T],Ln=!1,oo=!v&&a.invertSwap||p),b=Px(t,n,o,f,v?1:a.swapThreshold,a.invertedSwapThreshold==null?a.swapThreshold:a.invertedSwapThreshold,oo,Pr===n);var x;if(b!==0){var R=Fe(M);do R-=b,x=le.children[R];while(x&&($(x,"display")==="none"||x===H))}if(b===0||x===n)return C(!1);Pr=n,kn=b;var N=n.nextElementSibling,D=!1;D=b===1;var ne=uo(re,r,M,i,n,o,t,D);if(ne!==!1)return(ne===1||ne===-1)&&(D=ne===1),Ka=!0,setTimeout(Lx,30),L(),D&&!N?r.appendChild(M):n.parentNode.insertBefore(M,D?N:n),w&&dm(w,0,P-w.scrollTop),le=M.parentNode,S!==void 0&&!oo&&(so=Math.abs(S-ue(n)[T])),O(),C(!0)}if(r.contains(M))return C(!1)}return!1},_ignoreWhileAnimating:null,_offMoveEvents:function(){U(document,"mousemove",this._onTouchMove),U(document,"touchmove",this._onTouchMove),U(document,"pointermove",this._onTouchMove),U(document,"dragover",Ht),U(document,"mousemove",Ht),U(document,"touchmove",Ht)},_offUpEvents:function(){var t=this.el.ownerDocument;U(t,"mouseup",this._onDrop),U(t,"touchend",this._onDrop),U(t,"pointerup",this._onDrop),U(t,"pointercancel",this._onDrop),U(t,"touchcancel",this._onDrop),U(document,"selectstart",this)},_onDrop:function(t){var r=this.el,n=this.options;if(Me=Fe(M),wt=Fe(M,n.draggable),ke("drop",this,{evt:t}),le=M&&M.parentNode,Me=Fe(M),wt=Fe(M,n.draggable),j.eventCanceled){this._nulling();return}xr=!1,oo=!1,Ln=!1,clearInterval(this._loopId),clearTimeout(this._dragStartTimer),Za(this.cloneId),Za(this._dragStartId),this.nativeDraggable&&(U(document,"drop",this),U(r,"dragstart",this._onDragStart)),this._offMoveEvents(),this._offUpEvents(),Sn&&$(document.body,"user-select",""),$(M,"transform",""),t&&(Tn&&(t.cancelable&&t.preventDefault(),!n.dropBubble&&t.stopPropagation()),H&&H.parentNode&&H.parentNode.removeChild(H),(re===le||pe&&pe.lastPutMode!=="clone")&&oe&&oe.parentNode&&oe.parentNode.removeChild(oe),M&&(this.nativeDraggable&&U(M,"dragend",this),Qa(M),M.style["will-change"]="",Tn&&!xr&&Ne(M,pe?pe.options.ghostClass:this.options.ghostClass,!1),Ne(M,this.options.chosenClass,!1),we({sortable:this,name:"unchoose",toEl:le,newIndex:null,newDraggableIndex:null,originalEvent:t}),re!==le?(Me>=0&&(we({rootEl:le,name:"add",toEl:le,fromEl:re,originalEvent:t}),we({sortable:this,name:"remove",toEl:le,originalEvent:t}),we({rootEl:le,name:"sort",toEl:le,fromEl:re,originalEvent:t}),we({sortable:this,name:"sort",toEl:le,originalEvent:t})),pe&&pe.save()):Me!==Or&&Me>=0&&(we({sortable:this,name:"update",toEl:le,originalEvent:t}),we({sortable:this,name:"sort",toEl:le,originalEvent:t})),j.active&&((Me==null||Me===-1)&&(Me=Or,wt=An),we({sortable:this,name:"end",toEl:le,originalEvent:t}),this.save()))),this._nulling()},_nulling:function(){ke("nulling",this),re=M=le=H=jt=oe=to=St=$t=qe=Tn=Me=wt=Or=An=Pr=kn=pe=ro=j.dragged=j.ghost=j.clone=j.active=null;var t=this.el;ao.forEach(function(r){t.contains(r)&&(r.checked=!0)}),ao.length=Ga=Xa=0},handleEvent:function(t){switch(t.type){case"drop":case"dragend":this._onDrop(t);break;case"dragenter":case"dragover":M&&(this._onDragOver(t),kx(t));break;case"selectstart":t.preventDefault()}},toArray:function(){for(var t=[],r,n=this.el.children,i=0,o=n.length,s=this.options;i<o;i++)r=n[i],Ue(r,s.draggable,this.el,!1)&&t.push(r.getAttribute(s.dataIdAttr)||Mx(r));return t},sort:function(t,r){var n={},i=this.el;this.toArray().forEach(function(o,s){var a=i.children[s];Ue(a,this.options.draggable,i,!1)&&(n[o]=a)},this),r&&this.captureAnimationState(),t.forEach(function(o){n[o]&&(i.removeChild(n[o]),i.appendChild(n[o]))}),r&&this.animateAll()},save:function(){var t=this.options.store;t&&t.set&&t.set(this)},closest:function(t,r){return Ue(t,r||this.options.draggable,this.el,!1)},option:function(t,r){var n=this.options;if(r===void 0)return n[t];var i=Cn.modifyOption(this,t,r);typeof i<"u"?n[t]=i:n[t]=r,t==="group"&&vm(n)},destroy:function(){ke("destroy",this);var t=this.el;t[Te]=null,U(t,"mousedown",this._onTapStart),U(t,"touchstart",this._onTapStart),U(t,"pointerdown",this._onTapStart),this.nativeDraggable&&(U(t,"dragover",this),U(t,"dragenter",this)),Array.prototype.forEach.call(t.querySelectorAll("[draggable]"),function(r){r.removeAttribute("draggable")}),this._onDrop(),this._disableDelayedDragEvents(),io.splice(io.indexOf(this.el),1),this.el=t=null},_hideClone:function(){if(!St){if(ke("hideClone",this),j.eventCanceled)return;$(oe,"display","none"),this.options.removeCloneOnHide&&oe.parentNode&&oe.parentNode.removeChild(oe),St=!0}},_showClone:function(t){if(t.lastPutMode!=="clone"){this._hideClone();return}if(St){if(ke("showClone",this),j.eventCanceled)return;M.parentNode==re&&!this.options.group.revertClone?re.insertBefore(oe,M):jt?re.insertBefore(oe,jt):re.appendChild(oe),this.options.group.revertClone&&this.animate(M,oe),$(oe,"display",""),St=!1}}};function kx(e){e.dataTransfer&&(e.dataTransfer.dropEffect="move"),e.cancelable&&e.preventDefault()}function uo(e,t,r,n,i,o,s,a){var l,c=e[Te],u=c.options.onMove,d;return window.CustomEvent&&!ft&&!_n?l=new CustomEvent("move",{bubbles:!0,cancelable:!0}):(l=document.createEvent("Event"),l.initEvent("move",!0,!0)),l.to=t,l.from=e,l.dragged=r,l.draggedRect=n,l.related=i||t,l.relatedRect=o||ue(t),l.willInsertAfter=a,l.originalEvent=s,e.dispatchEvent(l),u&&(d=u.call(c,l,s)),d}function Qa(e){e.draggable=!1}function Lx(){Ka=!1}function Ox(e,t,r){var n=ue(kr(r.el,0,r.options,!0)),i=hm(r.el,r.options,H),o=10;return t?e.clientX<i.left-o||e.clientY<n.top&&e.clientX<n.right:e.clientY<i.top-o||e.clientY<n.bottom&&e.clientX<n.left}function xx(e,t,r){var n=ue(Wa(r.el,r.options.draggable)),i=hm(r.el,r.options,H),o=10;return t?e.clientX>i.right+o||e.clientY>n.bottom&&e.clientX>n.left:e.clientY>i.bottom+o||e.clientX>n.right&&e.clientY>n.top}function Px(e,t,r,n,i,o,s,a){var l=n?e.clientY:e.clientX,c=n?r.height:r.width,u=n?r.top:r.left,d=n?r.bottom:r.right,h=!1;if(!s){if(a&&so<c*i){if(!Ln&&(kn===1?l>u+c*o/2:l<d-c*o/2)&&(Ln=!0),Ln)h=!0;else if(kn===1?l<u+so:l>d-so)return-kn}else if(l>u+c*(1-i)/2&&l<d-c*(1-i)/2)return Nx(t)}return h=h||s,h&&(l<u+c*o/2||l>d-c*o/2)?l>u+c/2?1:-1:0}function Nx(e){return Fe(M)<Fe(e)?1:-1}function Mx(e){for(var t=e.tagName+e.className+e.src+e.href+e.textContent,r=t.length,n=0;r--;)n+=t.charCodeAt(r);return n.toString(36)}function Rx(e){ao.length=0;for(var t=e.getElementsByTagName("input"),r=t.length;r--;){var n=t[r];n.checked&&ao.push(n)}}function fo(e){return setTimeout(e,0)}function Za(e){return clearTimeout(e)}lo&&q(document,"touchmove",function(e){(j.active||xr)&&e.cancelable&&e.preventDefault()}),j.utils={on:q,off:U,css:$,find:am,is:function(t,r){return!!Ue(t,r,t,!1)},extend:gx,throttle:um,closest:Ue,toggleClass:Ne,clone:fm,index:Fe,nextTick:fo,cancelNextTick:Za,detectDirection:ym,getChild:kr,expando:Te},j.get=function(e){return e[Te]},j.mount=function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];t[0].constructor===Array&&(t=t[0]),t.forEach(function(n){if(!n.prototype||!n.prototype.constructor)throw"Sortable: Mounted plugin must be a constructor function, not ".concat({}.toString.call(n));n.utils&&(j.utils=nt(nt({},j.utils),n.utils)),Cn.mount(n)})},j.create=function(e,t){return new j(e,t)},j.version=mx;var de=[],On,Ja,el=!1,tl,rl,ho,xn;function Dx(){function e(){this.defaults={scroll:!0,forceAutoScrollFallback:!1,scrollSensitivity:30,scrollSpeed:10,bubbleScroll:!0};for(var t in this)t.charAt(0)==="_"&&typeof this[t]=="function"&&(this[t]=this[t].bind(this))}return e.prototype={dragStarted:function(r){var n=r.originalEvent;this.sortable.nativeDraggable?q(document,"dragover",this._handleAutoScroll):this.options.supportPointer?q(document,"pointermove",this._handleFallbackAutoScroll):n.touches?q(document,"touchmove",this._handleFallbackAutoScroll):q(document,"mousemove",this._handleFallbackAutoScroll)},dragOverCompleted:function(r){var n=r.originalEvent;!this.options.dragOverBubble&&!n.rootEl&&this._handleAutoScroll(n)},drop:function(){this.sortable.nativeDraggable?U(document,"dragover",this._handleAutoScroll):(U(document,"pointermove",this._handleFallbackAutoScroll),U(document,"touchmove",this._handleFallbackAutoScroll),U(document,"mousemove",this._handleFallbackAutoScroll)),Sm(),mo(),bx()},nulling:function(){ho=Ja=On=el=xn=tl=rl=null,de.length=0},_handleFallbackAutoScroll:function(r){this._handleAutoScroll(r,!0)},_handleAutoScroll:function(r,n){var i=this,o=(r.touches?r.touches[0]:r).clientX,s=(r.touches?r.touches[0]:r).clientY,a=document.elementFromPoint(o,s);if(ho=r,n||this.options.forceAutoScrollFallback||_n||ft||Sn){nl(r,this.options,a,n);var l=_t(a,!0);el&&(!xn||o!==tl||s!==rl)&&(xn&&Sm(),xn=setInterval(function(){var c=_t(document.elementFromPoint(o,s),!0);c!==l&&(l=c,mo()),nl(r,i.options,c,n)},10),tl=o,rl=s)}else{if(!this.options.bubbleScroll||_t(a,!0)===it()){mo();return}nl(r,this.options,_t(a,!1),!1)}}},ut(e,{pluginName:"scroll",initializeByDefault:!0})}function mo(){de.forEach(function(e){clearInterval(e.pid)}),de=[]}function Sm(){clearInterval(xn)}var nl=um(function(e,t,r,n){if(t.scroll){var i=(e.touches?e.touches[0]:e).clientX,o=(e.touches?e.touches[0]:e).clientY,s=t.scrollSensitivity,a=t.scrollSpeed,l=it(),c=!1,u;Ja!==r&&(Ja=r,mo(),On=t.scroll,u=t.scrollFn,On===!0&&(On=_t(r,!0)));var d=0,h=On;do{var f=h,g=ue(f),y=g.top,A=g.bottom,L=g.left,C=g.right,O=g.width,E=g.height,m=void 0,b=void 0,S=f.scrollWidth,p=f.scrollHeight,v=$(f),T=f.scrollLeft,w=f.scrollTop;f===l?(m=O<S&&(v.overflowX==="auto"||v.overflowX==="scroll"||v.overflowX==="visible"),b=E<p&&(v.overflowY==="auto"||v.overflowY==="scroll"||v.overflowY==="visible")):(m=O<S&&(v.overflowX==="auto"||v.overflowX==="scroll"),b=E<p&&(v.overflowY==="auto"||v.overflowY==="scroll"));var P=m&&(Math.abs(C-i)<=s&&T+O<S)-(Math.abs(L-i)<=s&&!!T),x=b&&(Math.abs(A-o)<=s&&w+E<p)-(Math.abs(y-o)<=s&&!!w);if(!de[d])for(var R=0;R<=d;R++)de[R]||(de[R]={});(de[d].vx!=P||de[d].vy!=x||de[d].el!==f)&&(de[d].el=f,de[d].vx=P,de[d].vy=x,clearInterval(de[d].pid),(P!=0||x!=0)&&(c=!0,de[d].pid=setInterval(function(){n&&this.layer===0&&j.active._onTouchMove(ho);var N=de[this.layer].vy?de[this.layer].vy*a:0,D=de[this.layer].vx?de[this.layer].vx*a:0;typeof u=="function"&&u.call(j.dragged.parentNode[Te],D,N,e,ho,de[this.layer].el)!=="continue"||dm(de[this.layer].el,D,N)}.bind({layer:d}),24))),d++}while(t.bubbleScroll&&h!==l&&(h=_t(h,!1)));el=c}},30),wm=function(t){var r=t.originalEvent,n=t.putSortable,i=t.dragEl,o=t.activeSortable,s=t.dispatchSortableEvent,a=t.hideGhostForTarget,l=t.unhideGhostForTarget;if(r){var c=n||o;a();var u=r.changedTouches&&r.changedTouches.length?r.changedTouches[0]:r,d=document.elementFromPoint(u.clientX,u.clientY);l(),c&&!c.el.contains(d)&&(s("spill"),this.onSpill({dragEl:i,putSortable:n}))}};function il(){}il.prototype={startIndex:null,dragStart:function(t){var r=t.oldDraggableIndex;this.startIndex=r},onSpill:function(t){var r=t.dragEl,n=t.putSortable;this.sortable.captureAnimationState(),n&&n.captureAnimationState();var i=kr(this.sortable.el,this.startIndex,this.options);i?this.sortable.el.insertBefore(r,i):this.sortable.el.appendChild(r),this.sortable.animateAll(),n&&n.animateAll()},drop:wm},ut(il,{pluginName:"revertOnSpill"});function ol(){}ol.prototype={onSpill:function(t){var r=t.dragEl,n=t.putSortable||this.sortable;n.captureAnimationState(),r.parentNode&&r.parentNode.removeChild(r),n.animateAll()},drop:wm},ut(ol,{pluginName:"removeOnSpill"}),j.mount(new Dx),j.mount(ol,il);var Ix=class{constructor(){k(this,"_items",new Map)}gc(){for(const[e,t]of[...this._items])e.isConnected||(this._items.delete(e),t.destroy())}get(e){return this._items.get(e)}create(e,t){const r=j.create(e,t);return this._items.set(e,r),r}entries(){return[...this._items]}},Ct=new Ix,Bx=Number.MAX_VALUE,Fx=0;function Cm(e){return typeof e=="object"?e.name:e}function jx(e){Ct.gc();const t=document.querySelectorAll("[em=group]");j.prototype._emulateDragOver=function(){};let r;const n=new Wh;let i=0,o=0;const s=h=>{i=h.clientX,o=h.clientY},a=h=>{i=h.clientX,o=h.clientY,n.over(i,o)},l=()=>{e.commit(!0)};window.addEventListener("mousedown",s),window.addEventListener("mouseup",()=>n.end(i,o));function c(h){let f;function g(C,O){let E=null,m=Number.MAX_VALUE;const b=Cm(j.active?.options.group);for(const[S,p]of Ct.entries())if(Cm(p.options.group)===b&&(!h||f&&h(S,f)!==!1)){for(const v of S.children)if(!v.classList.contains("sortable-drag")){const T=v.getBoundingClientRect(),w=C<T.left?T.left-C:C>T.right?C-T.right:0,P=O<T.top?T.top-O:O>T.bottom?O-T.bottom:0;if(w<Bx||P<Fx){const x=Math.sqrt(w*w+P*P);x<m?(E=[p,v],m=x):x===m&&E[1].contains(v)&&(E=[p,v])}}}return E}function y(C){const O="TouchEvent"in window&&C instanceof TouchEvent?C.touches[0]:C,E=g(O.clientX,O.clientY);if(E){const[S,p]=E,v=p.getBoundingClientRect();var m={clientX:v.left+v.width/2,clientY:O.clientY};for(var b in C)C.hasOwnProperty(b)&&(m[b]=C[b]);m.target=p,m.rootEl=p.parentNode,m.preventDefault=void 0,m.stopPropagation=void 0,S._onDragOver(m)}}return{onStart:C=>{f=C.item,e.beginTextUpdate(),window.addEventListener("mousemove",y),window.addEventListener("touchmove",y),n.start(i,o)?(window.addEventListener("mousemove",a),r&&(r.dispose(),r=void 0)):C.preventDefault()},onEnd:C=>{window.removeEventListener("mousemove",y),window.removeEventListener("touchmove",y),C.from===C.to?n.end(i,o):n.drop(i,o),window.removeEventListener("mousemove",a),e.endTextUpdate(),C.from===C.to&&C.oldIndex!==C.newIndex&&e.commit(!0),r&&(r.dispose(),r=void 0),f=void 0}}}if(t.length)for(const h of t){const f=h.parentElement;f&&!Ct.get(f)&&Ct.create(f,{forceFallback:!0,group:"groups-sorting",handle:`.of-group .${ii.drag}`,...c(),onMove:l})}const u=[...document.querySelectorAll("[em=block]")],d=[...document.querySelectorAll("[em=atom]")].map(h=>h.parentElement);for(const h of u){const f=h.querySelectorAll("td");for(const g of f)!g.innerHTML&&!g.hasAttribute("height")&&[...g.parentElement?.children||[]].indexOf(g)%2===0&&d.push(g)}if(d.length){const h=new Set;for(const f of d)f&&!h.has(f)&&(h.add(f),Ct.get(f)||Ct.create(f,{forceFallback:!0,group:"atoms-sorting",handle:`.of-atom .${ii.drag}`,...c((g,y)=>{if(y.tagName==="TR"){if(g.tagName!=="TABLE"&&g.tagName!=="TBODY")return!1}else if(y.tagName==="TD"){if(g.tagName!=="TR")return!1}else if(y.tagName==="TABLE"){const A=e.getContext(g);if(A&&Qe(A)&&A.tagName==="AMP-ACCORDION"&&g.tagName==="DIV"&&[...A.querySelectorAll("section > div")].indexOf(g)>=0||e.isInExternal(g)&&g.tagName==="DIV")return!0;if(g.tagName!=="TD")return!1}}),onMove:l,onSort:function(){f.innerHTML.trim()===""&&(f.innerHTML="")}}))}if(u.length){const h=new Set;for(const f of u){const g=f.parentElement;g&&!h.has(g)&&(h.add(g),Ct.get(g)||Ct.create(g,{forceFallback:!0,group:"blocks-sorting",handle:`.of-block .${ii.drag}`,...c(),onMove:l}))}}}function Am(){X.send({operation:"sandbox_resized"})}function $x(e,t){const r=new Z,n=0;let i=0;r.addDisposable(t.beforeSave(()=>{i&&(clearTimeout(i),i=0)}));function o(){i||(i=setTimeout(()=>{Am(),i=0},n))}return r.addDisposable(e.onChange(s=>{const a=s.flatMap(function(l){return l.added.flatMap(c=>{if(Qe(c))return wE(c)?c:[...c.querySelectorAll("img")]})}).filter(l=>!!l).map(l=>l.complete?Promise.resolve():new Promise((c,u)=>{l.addEventListener("load",c),l.addEventListener("error",c)}));a.length&&Promise.all(a).then(o)})),window.addEventListener("resize",o),r.addDispose(()=>window.removeEventListener("resize",o)),r}function sl(){X.send(me.RELOAD),window.location.reload()}function Hx(e){const t=new Z;function r(){const i=new Set;for(const o of document.querySelectorAll("script"))o instanceof HTMLScriptElement&&kh(o)||e.getOuterHtml(o)&&(o.src||o.innerHTML).trim()&&i.add((o.src||o.innerHTML).trim());return i}let n=r();return t.addDisposable(X.addListener(me.RELOAD,sl)),t.addDisposable(e.onChange(()=>{let i=r();for(const o of n)i.has(o)||sl();n=i})),t}function zx(e){let t=e.documentElement;return t||(t=e.createElement("html"),e.appendChild(t)),t}function Pn(e){let t=e.head;if(!t){t=e.createElement("head");const r=zx(e);r.insertBefore(t,r.firstChild)}return t}function Vx(e){const t=Object.create(null),r=e.getAttributeNames();for(const n of r)t[n]=e.getAttribute(n);return t}function Wx(e){for(const t of document.querySelectorAll("iframe"))if(t.contentDocument===e.ownerDocument)return t}function Ux(e){const t=Pn(e);if(!e.querySelector("style[amp4email-boilerplate]")){const r=e.createElement("style");r.setAttribute("amp4email-boilerplate",""),r.innerHTML="body{visibility:hidden}",t.prepend(r)}}var Tm="amp-custom";function qx(e,t){return`em-${e.replaceAll("-","_")}-${t.toLowerCase()}`}function km(e,t,r){for(const n of t)if(Kr.isStyleRule(n)){const i=n.selectorText.split(/\+>~/).flatMap(o=>o.trim().split(" "));if(i.length===1&&i[0].trim().startsWith(".em-")){for(const o of n.style)if(n.style.getPropertyPriority(o)==="important"){for(const s of e.querySelectorAll(n.selectorText))if(Es(s)){const a=s.style;for(const l of[...a])if(l.startsWith(o)){const c=r(l,a.getPropertyValue(l)),u=s.getAttribute("class");s.setAttribute("class",u?`${c} ${u}`:c),a.removeProperty(l)}}}}}else Kr.isMediaRule(n)&&km(e,n.cssRules,r)}function Lm(e,t){const r=t.sheet;if(r){const o=new Set;km(e,r.cssRules,(s,a)=>{const l=qx(s,a),c=[...r.cssRules],u=`.${l} { ${s}: ${a} }`;return!c.find(d=>Kr.isStyleRule(d)&&d.selectorText===`.${l}`)&&!o.has(u)&&(o.add(u),t.innerHTML=`
74
- .${l} { ${s}: ${a} };
75
- ${t.innerHTML}`),l}),o.size&&(t.innerHTML=`
76
- ${[...o].join(`
77
- `)};
78
- ${t.innerHTML}`)}const n=t.innerHTML,i=n.replace(/!important/g,"");n!==i&&(t.innerHTML=i)}function Gx(e){const t=Pn(e),r=e.querySelectorAll('link[rel="stylesheet"]'),n=[...e.querySelectorAll("style")].filter(o=>!o.hasAttribute("amp4email-boilerplate"));if(n.length===1){const o=n[0];if(o.parentElement===t&&o.getAttribute(Tm)===""){Lm(e,o);return}}const i=[];for(const o of n)i.push(o.innerHTML),o.remove();if(i.length){const o=e.createElement("style");o.innerHTML=`
79
- ${i.join("")}
80
- `,o.setAttribute(Tm,""),t.append(o),Lm(e,o)}for(const o of r)o.remove()}var al="<!doctype html>";function Xx(e){const t=e.doctype;if(t){if(ru(t)===al)return;const r=new DOMParser().parseFromString(al,"text/html").doctype;e.replaceChild(r,t)}else{const r=new DOMParser().parseFromString(al,"text/html").doctype;e.insertBefore(r,e.firstChild)}}async function Om(e,t={}){const r=document.createElement("amp-img"),n=await LE(e)||void 0,i=[];try{let o=e;for(;o&&Es(o);)getComputedStyle(o)?.display==="none"&&(o.style.display="initial",i.push([o,o.style.display])),o=o.parentElement;const s=n?.height?`${parseInt(n.height)}`:"",a=n?.width?`${parseInt(n.width)}`:"",l=Wx(e);let c=!1;if(l){const d=l.getAttribute("width");try{let h=a?`${a}px`:"";d||(l.setAttribute("width","720px"),h=getComputedStyle(e).width||""),l.setAttribute("width",!d||parseInt(d)>320?"320px":"720px"),h!==(getComputedStyle(e).width||"")&&(c=!0)}finally{d&&l.setAttribute("width",d||"")}}const u=e.src||e.srcset.split(",")[0];e.style.width==="100%"&&e.style.removeProperty("width"),e.style.maxWidth==="100%"&&e.style.removeProperty("max-width"),t={...Vx(e),alt:e.alt,width:a,height:s,src:u,layout:c?"responsive":"fixed",...t};for(const d of Object.keys(t))st(r,d,t[d])}finally{for(const[o,s]of i)o.style.display=s}return r}async function Yx(e,t){const r=[...e.querySelectorAll("img")],n=[];for(const o of r)n.push(Om(o).then(s=>[o,s],()=>[o,void 0]));const i=[...e.querySelectorAll("picture")];for(const o of i){const s=o.querySelector("img");s?n.push(Om(s).then(a=>[o,a],()=>[o,void 0])):n.push([o,void 0])}if(n.length){const o=await Promise.all(n);for(const[s,a]of o)a?s.replaceWith(a):s.remove();t?.()}}function Kx(e){const t=e.querySelectorAll("meta");for(const i of t){const o=i.getAttribute("charset");if(o){o!=="utf-8"&&i.setAttribute("charset","utf-8");return}}const r=Pn(e),n=e.createElement("meta");n.setAttribute("charset","utf-8"),r.insertBefore(n,r.firstChild)}function Qx(e,t,r){const n=r('script:not([type="application/ld+json"])'),i=e.querySelectorAll(n);for(const o of i)!o.getAttribute("src")?.startsWith("https://cdn.ampproject.org/")&&!(o.closest("amp-state")&&o.getAttribute("type")==="application/json")&&o.remove()}var xm="https://cdn.ampproject.org/v0",Pm=`${xm}.js`,Zx=`script[src='${Pm}']`;function Jx(e,t){return`${xm}/${e.toLowerCase()}-${t}.js`}async function eP(e,t,r){for(const{name:n,versions:i}of t){const o=r.replaceSelectors(n==="amp-mustache"?`script[async][custom-template='${n}']`:`script[async][custom-element='${n}']`);if(!e.querySelector(o)){const s=Pn(e),a=r.createElementFn("script"),l=Jx(n,i.findLast(c=>c!=="latest")||"v0");a.setAttribute("async",""),a.setAttribute(n==="amp-mustache"?"custom-template":"custom-element",n),a.setAttribute("src",l),s.appendChild(a),s.appendChild(e.createTextNode(`
81
- `))}}}var Nm=void 0;async function po(){return Nm||(Nm=await gs(()=>Promise.resolve().then(()=>Eo("./rules.CL_BitCE.js")).then(e=>e.default),void 0,{}.url))}var ll=new Map;async function tP(){if(!ll.size){const e=await po(),t=e.tags;for(let r=0;r<t.length;r++){const n=t[r],{selector:i,attrs:o,attrLists:s}=n,a=s?.flatMap(l=>e.attrLists.filter(({name:c})=>c===l).flatMap(c=>c.attrs))||[];ll.set(i,{...n,priority:r,attrs:new Map([...o,...a].map(l=>[l.name,l]))})}}return ll}var cl=new Map;async function rP(){if(!cl.size){const e=await po();for(const t of e.declarations)cl.set(t.name,t)}return cl}var nP="$GLOBAL_ATTRS",ul=new Map;async function iP(){if(!ul.size){const e=(await po()).attrLists.find(t=>t.name===nP)?.attrs;if(e)for(const t of e)ul.set(t.name,t)}return ul}function oP(e){return Qe(e)&&(e.tagName.startsWith("AMP")||e.tagName==="FORM"||e.tagName==="TEMPLATE"&&e.getAttribute("type")?.toLowerCase()==="amp-mustache")}function Mm(e){return AE(e)&&e.src?.startsWith("https://cdn.ampproject.org/v0")}function Rm(e,t,r){if(!t)return;function n(){const o=t.compareDocumentPosition(e);if(!(o&8)){if(o&2)return t.insertBefore(e,t.firstChild),!0;if(o&4)return t.appendChild(e),!0}return!1}function i(){const o=[...e.childNodes];for(let s=o.length-1;s>=0;s--)Rm(o[s],t,r)}if(Qe(e))switch(e.tagName.toLowerCase()){case"body":return;case r("script"):case"style":case"meta":case"title":return;case"head":case"html":i();break;default:n()||i()}else _s(e)?i():hi(e)&&(e.textContent?.trim()||e.nextSibling?.textContent?.trim()&&hi(e.nextSibling))&&n()}async function sP(e,t){const r=new Set,n=t.commit,i=f=>t.replaceSelectors(f.toLowerCase());if(t.replaceImages&&await Yx(e,n),t.injectExtensions){const f=t.replaceSelectors(Zx);if(!e.querySelector(f)){const g=t.createElementFn("script");g.setAttribute("src",Pm),g.setAttribute("async",""),Pn(e).appendChild(g),n?.()}}t.injectRequiredTags&&(Qx(e,t.createElementFn,i),Xx(e),Ux(e),Kx(e),n?.()),t.replaceStylesAndLinks&&(Gx(e),n?.());const o=await po(),s=await tP(),a=new Set(t.removeUnsupportedTags?e.querySelectorAll("*"):[]),l=new Map;for(let[f,g]of s)if(!g.deprecation){f=i(f);let y=[...e.querySelectorAll(f)].filter(A=>!l.has(A));g.unique&&y.length&&(y=[y[0]]),t.injectRequiredTags&&g.required&&!y.length&&(y=[...y,t.createElementFn(g.name)]);for(const A of y){if(t.injectRequiredAttributes&&A.getAttribute("on")&&!A.getAttribute("tabindex")&&A.setAttribute("tabindex","0"),t.removeUnsupportedStyles){let C=!1;for(const O of[...A.classList])O.startsWith("i-amphtml")&&(C=!0,A.classList.remove(O));C&&!A.classList.length&&A.removeAttribute("class")}const L=l.get(A);L&&L.priority>g.priority||l.set(A,g)}}n?.();for(const[f,g]of l){if(t.injectExtensions&&g.requiresExtension)for(const L of g.requiresExtension)r.add(L);const y=g.requiredParent?g.requiredParent==="$ROOT"?e:e.querySelector(g.requiredParent):null;y&&(!f.parentNode||t.moveInvalidTagPosition)?y!==f.parentNode&&(g.name==="HEAD"||Qe(y)&&y.tagName==="HEAD"?y.insertBefore(f,y.firstChild):y.appendChild(f)):f.parentNode||e.body.appendChild(f),t.removeUnsupportedTags&&a.delete(f),n?.();const A=await iP();if(t.removeUnsupportedAttributes||t.injectRequiredAttributes){const L=g.attrs,C=t.injectRequiredAttributes?new Set([...L].map(([E,m])=>m).filter(E=>E.required&&E.value)):void 0,O=f.getAttributeNames();for(const E of O){const m=L.get(E)||A.get(E);if(m){if(E==="id"||E==="class"||E==="style"){C?.delete(m);continue}if(t.removeUnsupportedAttributes){const b=f.getAttribute(E);if(m.value&&m.value.indexOf(b)<0){f.removeAttribute(E);continue}if(m.valueRegex&&!new RegExp(m.valueRegex).test(b)){f.removeAttribute(E);continue}if(m.disallowedValueRegex&&new RegExp(m.disallowedValueRegex).test(b)){f.removeAttribute(E);continue}const S=m.valueUrl;if(S){if(b===""){if(!S.allowEmpty){f.removeAttribute(E);continue}}else if(!(b.indexOf("<!--")>0&&b.indexOf("-->")>0)){if(!S.allowRelative)if(b.startsWith("#")||b.startsWith("/")){f.removeAttribute(E);continue}else{const p=S.protocol.length?S.protocol:["https"],v=b.substring(0,b.indexOf(":"));if(v){if(p.indexOf(v)<0){const T=p[0]+b.substring(b.indexOf(":"));if(URL.canParse(T))st(f,E,T);else{f.removeAttribute(E);continue}}else if(!URL.canParse(b)){f.removeAttribute(E);continue}}else{const T=p[0]+b;if(URL.canParse(T))st(f,E,T);else{f.removeAttribute(E);continue}}}}}}C?.delete(m)}else{if(E==="id"||E==="class"||E==="style")continue;t.removeUnsupportedAttributes&&f.removeAttribute(E)}}if(C)for(const E of C)st(f,E.name,E.value[0])}n?.()}t.moveInvalidTagPosition&&(Rm(e,e.body,i),n?.());for(const f of a)f.remove();if(n?.(),t.removeUnsupportedStyles){let y=function(E){const m=E.cssText.replaceAll(/\".*\"/g,"").replaceAll(/\'.*\'/g,"").replaceAll(/\/\*.*\*\/|(-moz-|-ms-|-o-|-webkit-)+\w+(?=:)/g,"").match(/[a-z-]+(?=:[^before|after|hover])/gi)||[];for(const b of m){if(!b)continue;const S=E.getPropertyValue(b);E.getPropertyPriority(b)==="important"&&E.setProperty(b,S);const p=g.get(b);p?p.value?p.value.indexOf(S)<0&&E.removeProperty(b):p.valueRegex&&(new RegExp(p.valueRegex).test(S)||E.removeProperty(b)):E.removeProperty(b)}n?.()},A=function(E){return E.constructor.name==="CSSStyleRule"},L=function(E){return E.constructor.name==="CSSMediaRule"},C=function(E){const m=E.cssRules;for(let b=m.length-1;b>=0;b--){const S=m[b];A(S)?S.selectorText.indexOf("[")>=0||S.selectorText.indexOf(":")>=0?E.deleteRule(b):(y(S.style),S.style.cssText||E.deleteRule(b)):L(S)?(C(S),S.cssRules.length||E.deleteRule(b)):E.deleteRule(b)}};var c=y,u=A,d=L,h=C;const f=e.querySelectorAll("*"),g=await rP();for(const E of f)if(Es(E)){const m=E.getAttribute("style");m&&(y(E.style),E.style.length?E.style.cssText!==m&&E.setAttribute("style",E.style.cssText):E.removeAttribute("style"))}const O=e.querySelector("style[amp-custom]");if(O){const E=O.sheet;E&&(C(E),O.innerHTML=[...E.cssRules].map(m=>m.cssText).join(`
82
- `)),n?.()}}await eP(e,o.extensions.filter(({name:f})=>r.has(f)),t)}function aP(e,t){return Object.keys(t).reduce((r,n)=>r.replaceAll(n,t[n]),e)}function Dm(e,t={}){const{correct:r=!0,injectExtensions:n=!0,mappedTags:i={}}=t;return sP(e,{replaceImages:r,replaceStylesAndLinks:r,injectRequiredTags:r,injectExtensions:n,formsAsAmpForms:n,injectRequiredAttributes:r,moveInvalidTagPosition:r,removeUnsupportedTags:r,removeUnsupportedAttributes:r,removeUnsupportedStyles:r,createElementFn:o=>e.createElement(i[o.toLowerCase()]||o),replaceSelectors:o=>aP(o.toLowerCase(),i),commit:t.commit})}var Nn=[];function lP(e){return Nn.push(e),{dispose:()=>{const t=Nn.indexOf(e);t!==-1&&Nn.splice(t,1)}}}function cP(e){return Nn.some(t=>t.isPathElement?.(e))}function uP(e,t){let r;for(const n of Nn){const i=n.caption?.(e,t);i&&(r={...r,...i})}return r}function Im(e){return e.tagName==="TD"&&e===e.closest("amp-accordion")?.querySelector(":scope > section header td")}var dP={isPathElement(e){return e.tagName==="AMP-ACCORDION"||e.tagName==="AMP-CAROUSEL"||Im(e)},caption(e,t){if(e.tagName==="AMP-ACCORDION")return{title:t.ELEMENT_PATH_ACCORDION,className:"em-element-path-item-amp"};if(e.tagName==="AMP-CAROUSEL")return{title:t.ELEMENT_PATH_CAROUSEL,className:"em-element-path-item-amp"};if(Im(e))return{title:t.ELEMENT_PATH_SECTION,className:"em-element-path-item-block"};if(e.tagName==="IMG"&&e.closest("amp-carousel"))return{title:t.ELEMENT_PATH_CAROUSEL}}},fP=class extends Z{constructor(...e){super(...e),k(this,"hasAmp",!1)}};function hP(e,t,r=""){for(const n of e.classList)if(n.startsWith(`${t}-`))return n.replaceAll(`${t}-`,"");return r}function mP(e,t,r){const n=hP(e,t);n!==r&&(e.classList.remove(`${t}-${n}`),r&&e.classList.add(`${t}-${r}`))}function pP(e){const t=i=>Mm(i)&&e.getOuterHtml(i)!==""||oP(i)||CE(i),r=i=>{if(t(i))return!0;if(Qe(i)||_s(i)){for(const o of i.querySelectorAll("*"))if(t(o))return!0}return!1},n=new fP;return n.addDisposable(my(i=>i.closest("amp-img"))),n.addDisposable(lP(dP)),n.addDisposable(yE(i=>i.startsWith("amp"))),n.addDisposable(jh("amp-img")),n.addDisposable(jh("amp-anim")),n.addDisposable(e.onChange(i=>{let o=n.hasAmp,s=!1;for(const a of i){if(a.added.some(l=>r(l))){s=!0,o=!0;break}if(a.removed.some(l=>r(l))){o=r(document);break}}n.hasAmp!==o?(n.hasAmp=o,X.send(me.APPLICATION_HAS_AMP,o),setTimeout(()=>{if(o)Dm(document,{correct:!1});else{const a=[...document.querySelectorAll("script")];for(const l of a)Mm(l)&&l.remove();sl()}})):s&&setTimeout(()=>{Dm(document,{correct:!1})})})),n.addDisposable(X.addListener(i=>{if(i.data?.operation==="sandbox_element_settings_set"){const o=document.querySelector("[em-edit]");if(o){const s=i.data?.settings?.ampShow;s!==void 0&&(mP(o,"em-amp-show",s==="amp"?"only":s==="html"?"disabled":void 0),e.commit())}}})),n}function gP(e,t){const r=pP(t);return e.inject(Jl,r),{service:r,dispose(){r.dispose(),$e(e,Jl)}}}function bP(e){const t=e.innerHTML.trim();return[t==="&nbsp;",t==="<div>&nbsp;</div>",/^<div[^>]*>&nbsp;<\/div>$/.test(t),/^<[^>]*>&nbsp;<\/[^>]*>$/.test(t),t.replace(/<[^>]*>/g,"").trim()==="&nbsp;",e.textContent?.trim()===" "||e.textContent?.trim().charCodeAt(0)===160].some(r=>r===!0)}function yP(e){window.getSelection();const t=e.startContainer,r=t.nodeType===Node.TEXT_NODE?t.parentElement:t instanceof Element?t:null;if(!r||!r.contains(e.commonAncestorContainer))return!1;const n=r.textContent??"",i=e.toString(),o=n.replace(/\s+/g," ").trim(),s=i.replace(/\s+/g," ").trim();return n===i||o===s}var vP=(e,t)=>{const r=e.clientX,n=e.clientY,i=t.getBoundingClientRect(),o=10;if(!(n>=i.top-o&&n<=i.bottom+o))return!1;const s=r>=i.right-10&&r<=i.right,a=r>=i.left&&r<=i.right;if(r>i.right)return!0;if(a){if(s){let l=null;if(document.caretRangeFromPoint)l=document.caretRangeFromPoint(r,n);else if(document.caretPositionFromPoint){const c=document.caretPositionFromPoint(r,n);c&&(l=document.createRange(),l.setStart(c.offsetNode,c.offset),l.collapse(!0))}if(l){const c=l.commonAncestorContainer;let u=!1;if(c.nodeType===Node.TEXT_NODE){const d=c.parentNode;u=t===d||t.contains(d)}else u=t===c||t.contains(c);if(u){const d=Bm(t);if(d&&l.startContainer===d){const h=d.textContent?.length??0;if(l.startOffset>=h-1)return!0}}}return!0}return!1}return!1},EP=e=>{const t=e.parentElement;if(!t)return null;const r=e.nextSibling;if(r&&r.nodeType===Node.ELEMENT_NODE&&r.tagName==="SPAN"){const o=r;if(!o.textContent?.startsWith(" ")){const s=document.createTextNode(" ");o.insertBefore(s,o.firstChild)}return o}const n=document.createElement("span");n.style.display="inline-block",n.style.minWidth="1px";const i=document.createTextNode(" ");if(n.appendChild(i),r&&r.nodeType===Node.TEXT_NODE){const o=r.textContent||"";return o&&n.appendChild(document.createTextNode(o)),t.replaceChild(n,r),n}return e.nextSibling?t.insertBefore(n,e.nextSibling):t.appendChild(n),n},_P=e=>{if(!e)return;(!e.firstChild||e.firstChild.nodeType!==Node.TEXT_NODE)&&(e.textContent="",e.appendChild(document.createTextNode(" ")));const t=e.firstChild;t.textContent===""&&(t.textContent=" ");const r=window.getSelection();if(!r)return;const n=document.createRange();n.setStart(t,1),n.collapse(!0),r.removeAllRanges(),r.addRange(n);const i=e.closest('[contenteditable="true"]');i&&i.focus()},SP=(e,t)=>{const r=e.startContainer,n=e.startOffset,i=document.createTreeWalker(t,NodeFilter.SHOW_TEXT,null);let o=null,s;for(;s=i.nextNode();)o=s;return o?r===o&&n===o.textContent.length:!1},Bm=e=>{const t=document.createTreeWalker(e,NodeFilter.SHOW_TEXT,null);let r=null,n;for(;n=t.nextNode();)r=n;return r},wP=(e,t)=>{const r=e.startContainer,n=e.startOffset,i=Bm(t);if(!i)return!1;const o=i.textContent?.length??0;return r===i&&n===o},CP=(e,t)=>{try{const r=window.getSelection();if(!r)return!1;const n=document.createRange();return n.setStart(e,t),n.collapse(!0),r.removeAllRanges(),r.addRange(n),!0}catch{return!1}},AP=class extends Z{get isEditorInFocus(){return!!this._isEditorInFocus}constructor(e){super(),k(this,"_isEditorInFocus",!1),k(this,"_context",new Map),k(this,"_editorLostFocusEmitter",this.addDisposable(new J)),k(this,"_summaries",[]),k(this,"_onChange",t=>{this._isEditorInFocus&&this._summaries.push(...t)}),k(this,"editorLostFocus",this._editorLostFocusEmitter.event),this.addDisposable(e.onChange(this._onChange))}setFocus(e){this._isEditorInFocus!==e&&(this._isEditorInFocus=e,e||(this._editorLostFocusEmitter.fire(this._summaries),this._summaries=[],this._context.clear()))}whenEditorLostFocusAsync(e){return new Promise(t=>this.whenEditorLostFocus(t,e))}whenEditorLostFocus(e,t){if(this._isEditorInFocus){const r=this._editorLostFocusEmitter.once(e);if(t!==void 0){const n=this._context.get(t);n&&n.dispose(),this._context.set(t,r)}}else e([])}};function TP(e,t){const{htmlDocument:r,remoteDocument:n}=t,i=new AP(r);let o;const s=n.beforeSave(c=>{i.isEditorInFocus&&(o=o||c.value,c.preventDefault())}),a=()=>{typeof o=="boolean"&&(n.saveChanges(o),o=void 0)},l={controller:i,setEditorFocus(c){i.isEditorInFocus!==c&&(c&&a(),i.setFocus(c),c||a())},dispose(){s.dispose(),i.dispose(),$e(e,tc)}};return e.inject(tc,l),l}function kP(e){for(const t of e.classList)if(t.startsWith("em-element-"))return!1;return!0}function Fm(e,t){for(const r of e.childNodes){if(r.nodeType===Node.TEXT_NODE&&r.textContent?.trim()!==""){t.push(e);break}r.nodeType===Node.ELEMENT_NODE&&Fm(r,t)}}function LP(e,t,r){const n=e.getAttribute("style")||"",i={};n.split(";").forEach(function(s){if(s.trim()){const a=s.split(":");a.length>=2&&(i[a[0].trim()]=a[1].trim())}}),i[t]=r;const o=Object.keys(i).map(function(s){return i[s]?s+": "+i[s]:null}).filter(Boolean).join("; ");e.setAttribute("style",o)}function OP(e){const t=(e?.closest('[style*="line-height"]')||e?.querySelector('[style*="line-height"]'))?.style.lineHeight?.trim();if(!t)return null;const r=e?.closest('[style*="font-size"]')?.style.fontSize||getComputedStyle(e).fontSize,n=parseFloat(r);if(t.toLowerCase()==="normal")return null;if(t.includes("px")){const o=parseFloat(t);return Number.isFinite(o)?o:null}if(!Number.isFinite(n)||n<=0)return null;if(t.includes("%")){const o=parseFloat(t);return Number.isFinite(o)?n*(o/100):null}const i=parseFloat(t);return Number.isFinite(i)?n*i:null}function xP(e,t){let r=[];const n=t||e,i=e?.style.fontFamily||getComputedStyle(n).fontFamily,o=[...(e?.closest('[style*="font-family"]')||e).classList].filter(s=>s.startsWith("em-font-"));if(o.length>0){r=["Google Fonts"],r[1]=i.indexOf("sans-serif")>-1?"Sans Serif":"Serif";const s=o[0].match(/em-font-(.*?)-/);if(s){r[2]=s[1];const a=new RegExp(`${r[2]}-(.*)`),l=o[0].match(a);l&&(r[3]=l[1])}}else i&&(r=["Safe Fonts",i.replaceAll('"',"'")]);return r}function PP(e){if(!e)return null;try{return e.rangeCount>0?e.getRangeAt(0):null}catch{return null}}function NP(e,t,r=null){if(!e||e.tagName==="DIV")return!1;const n=window.getSelection();let i=null;if(n&&n.rangeCount>0){const a=n.getRangeAt(0).commonAncestorContainer;i=a.nodeType===1?a:a.parentElement}const o=a=>{if(!a)return!1;const l=a.tagName.toLowerCase();return l===t||r!==null&&l===r},s=e?.closest(t)||(r?e?.closest(r):null);return o(e)||i!==null&&o(i)||!!s}var MP="a, div, p, td, h1, h2, h3, h4, h5, h6, li, ul, ol, sup, sub";function RP(e,t=MP){if(!e)return null;const r=t.split(", ").map(i=>i.trim().toLowerCase());let n=e.nodeType===Node.ELEMENT_NODE?e:e.parentNode;for(;n&&n.nodeType===Node.ELEMENT_NODE;){const i=n;if(r.includes(i.tagName.toLowerCase())&&i.style.fontSize)return i;n=n.parentNode}return null}var DP=e=>{if(e instanceof Text)return e.textContent||"";if(e instanceof Element){if(e.tagName==="BR")return`
83
- `;if(e.classList?.contains(".em-element-path"))return"";if(e.classList?.contains("em-code"))return"⃠";if(e.tagName==="EM-REPLACE")return"⃡"}};function jm(e,t){if(!e)return"";const r=t(e);return r===void 0?[...e.childNodes].map(n=>jm(n,t)).join(""):r}function IP(e){const t=e.firstElementChild||e;return t.tagName!=="EDITOR"?t.tagName:"div"}function BP(e,t,r,n){e.setAttribute("style",r?.getAttribute("style")||t.getAttribute("innerStyle")||t.getAttribute("style")||""),e.style.color=n(e.style.color)??"",e.style.backgroundColor=n(e.style.backgroundColor)??"";const i=t.getAttribute("innerClass");i&&(e.className=i);const o=t.getAttribute("innerHref"),s=t.getAttribute("href"),a=r.getAttribute("href");(o!==null||s!==null||a!==null)&&(t.tagName==="A"||r.tagName==="A")&&e.setAttribute("href",o??s??a??"");const l=t.getAttribute("innerTarget");l&&e.setAttribute("target",l);const c=t.getAttribute("innerAlign");c&&e.setAttribute("align",c);const u=r.hasAttribute("em-edit")?r:r.querySelector("[em-edit]");u&&e.setAttribute("em-edit",u.getAttribute("em-edit")||"")}function FP(e,t=!0){const r=document.createRange(),n=window.getSelection();n&&(r.selectNodeContents(e),r.collapse(t),n.removeAllRanges(),n.addRange(r))}function jP(e){let t=!1;return e&&e.childNodes.forEach(r=>{if(r.nodeType===Node.TEXT_NODE&&r.nodeValue?.trim()!==""){const n=r.nodeValue?.trim()||"";/[a-zA-Zа-яА-Я]/.test(n)&&(t=!0)}}),t}function $P(e){return e.trim().split(" ").slice(0,-1).join(" ")||""}function HP(e){const t=e.textContent||"";return t.trim()===""||t.trim()===" "}function zP(){return py()}function VP(e,t=!1){if(e.closest("EDITOR")||!e.isConnected)return!0;let r=!1;if(!t)for(const n of Array.from(e.childNodes))if(n.tagName==="EDITOR"){if(r)return!1;r=!0}else return!1;return r}function $m(e,t){if(e instanceof Text){const r=e.textContent,n=r;r!==n&&e.replaceWith(...t(n||""))}else if(e instanceof Element){const r=[...e.childNodes];if(e.tagName==="EDITOR")e.replaceWith(...r);else if(e.tagName==="SPAN"&&e.classList.contains("mce-nbsp-wrap"))return;for(const n of r)$m(n,t)}}function WP(e=document){e.querySelectorAll('[em-edit="active"]').forEach(t=>t.removeAttribute("em-edit"))}function go(e){e.nodeName==="#comment"&&e.textContent?.indexOf("mso")!==-1?e.remove():e.previousSibling&&go(e.previousSibling)}function Mn(e){if(!e)return;if(e.parentElement?.tagName==="SECTION"||e.classList.contains("em-narrow-table")&&Array.from(e.childNodes).every(r=>r.nodeType===Node.TEXT_NODE)){e.innerHTML="";return}e.querySelectorAll(".em-element-editor").forEach(r=>r.remove()),e.querySelectorAll(".em-element-path").forEach(r=>r.remove()),e.querySelectorAll(".em-element-block-add").forEach(r=>r.remove()),e.querySelectorAll(".em-vindent-paddingTop, .em-vindent-paddingRight, .em-vindent-paddingBottom, .em-vindent-paddingLeft").forEach(r=>r.remove());const t=e.parentElement;if(e.classList.contains("em-mob-wrap")||e.classList.contains("noresp-em-mob-wrap"))e.innerHTML.trim()===""&&(e.parentElement.querySelectorAll(":scope > .em-mob-wrap, :scope > .noresp-em-mob-wrap").length>1?e.innerHTML="":(e.remove(),Mn(t)));else if(e.innerHTML.trim()==="")go(e),e.remove(),Mn(t);else if(t&&!t.querySelector('div[style*="display"]')){for(const r of Array.from(e.childNodes))r.nodeName==="#text"&&r.textContent?.trim()===""?(go(r),r.textContent=""):r.nodeName==="#comment"&&r.textContent?.indexOf("mso")!==-1&&(go(r),r.remove());e.innerHTML.trim()===""&&Mn(e)}}function UP(e,t){const r=e;if(!r||r.closest("editor")||r.firstElementChild?.tagName==="EDITOR")return!1;const n=t.getElementParent(r);let i=r.parentNode;if(n&&t.setCursorPosition(n),r.classList.contains("em-code")){const o=t.getVariableByIcon(r);o&&(o.parentNode?.removeChild(o),r.remove())}else if(r.tagName==="TD"&&r.innerHTML===""&&r.hasAttribute("height")){const o=r.closest("table");if(o){const s=o.previousSibling;s&&s?.textContent?.trim()===""&&s.remove(),o.remove()}}else if(r.closest(".em-element-resize-img-container"))i=r.closest(".em-element-resize-img-container").parentNode,r.closest(".em-element-resize-img-container").remove();else if(r.closest('[em="atom"]')){const o=r.closest('[em="atom"]');i=o.parentNode;const s=r.closest(".em-mob-wrap, .noresp-em-mob-wrap");r.tagName==="TD"&&!r.previousElementSibling&&!r.nextElementSibling?o.remove():r.remove();const a=!!s&&Array.from(s.querySelectorAll('[em="atom"]')).some(l=>l!==o);r.tagName!=="TD"&&!a&&s?.textContent?.trim()===""&&(s.textContent="")}else{r.remove();const o=r.previousSibling;o&&o?.textContent?.trim()===""&&o.remove()}return Mn(i),t.commit(),X.send({operation:"application_element_settings_close"}),!0}function qP(e,t){e.querySelector(".em-element-editor")?.remove(),e.removeAttribute("em-state");const[r]=t.parseFromString(t.HTMLDocument.getOuterHtml(e));e.after(r),t.commit(),t.implementElementEditor(r)}function GP(e,t){e.querySelector(".em-element-editor")?.remove(),e.removeAttribute("em-state");const[r]=t.parseFromString(t.HTMLDocument.getOuterHtml(e));e.after(r),t.commit(),t.implementElementEditor(r),t.setCursorPosition(r)}function XP(e,t){if(!e.previousElementSibling)return!1;const r=e.previousElementSibling;return r.before(e),t.commit(),t.implementElementEditor(e),X.send({operation:"application_scroll-to",settings:{value:t.scrollTop-r.getBoundingClientRect().height}}),!0}function YP(e,t){if(!e.nextElementSibling)return!1;const r=e.nextElementSibling;return r.after(e),t.commit(),t.implementElementEditor(e),X.send({operation:"application_scroll-to",settings:{value:t.scrollTop+r.getBoundingClientRect().height}}),!0}function Hm(e){e.innerHTML="",e.getAttribute("em")==="block"&&e.removeAttribute("em")}function KP(e,t){const r=e.closest("table");e.querySelector("[em-edit]")&&X.send({operation:"application_element_settings_close"});const n=e.closest('[em="group"]');n&&r&&n.querySelectorAll('[em="block"]').length===1?Hm(r):e.remove(),t.commit(),r&&t.setCursorPosition(r)}function zm(e){return e.querySelector(":scope > td, :scope > tr > td, :scope > tbody > tr > td")}function QP(e,t){if(!t.emFilter)return;const r=document.querySelector('[em-edit="active"]')?.closest('[em="block"]');if(!r)return;const n=[...r.parentElement.children].indexOf(r),i=zm(r),o=parseFloat(i?.style.paddingTop??"")||0,s=parseFloat(i?.style.paddingBottom??"")||0;if(e.tagName==="TR"||e.tagName==="TABLE"){const a=e.querySelector("td"),l=t.emFilter({html:a.innerHTML,isPartial:!0}),c=[...e.parentNode.children].indexOf(e),u=zm(e),d=parseFloat(u?.style.paddingTop??"")||0,h=parseFloat(u?.style.paddingBottom??"")||0,f=parseFloat(u?.style.borderTopLeftRadius??"")||0,g=parseFloat(u?.style.borderTopRightRadius??"")||0,y=parseFloat(u?.style.borderBottomLeftRadius??"")||0,A=parseFloat(u?.style.borderBottomRightRadius??"")||0,L=r.querySelector("td");n>c?(L.insertAdjacentHTML("afterbegin",`<table cellpadding="0" cellspacing="0" border="0" width="100%" em="atom"><tr><td height="${o+h}"></td></tr></table>`),L.insertAdjacentHTML("afterbegin",l),i&&(i.style.paddingTop=d+"px",i.style.borderTopLeftRadius=f+"px",i.style.borderTopRightRadius=g+"px",i.querySelector(":scope > .em-vindent-paddingTop")?.remove())):(L.insertAdjacentHTML("beforeend",`<table cellpadding="0" cellspacing="0" border="0" width="100%" em="atom"><tr><td height="${s+d}"></td></tr></table>`),L.insertAdjacentHTML("beforeend",l),i&&(i.style.paddingBottom=h+"px",i.style.borderBottomLeftRadius=y+"px",i.style.borderBottomRightRadius=A+"px",i.querySelector(":scope > .em-vindent-paddingBottom")?.remove()))}else if(e.tagName==="DIV"){const a=t.emFilter({html:e.innerHTML,isPartial:!0}),l=Array.prototype.indexOf.call(e.parentElement.children,e);r.insertAdjacentHTML(n>l?"afterbegin":"beforeend",a)}e.remove(),document.querySelector(".em-element-editor-widget-merge")?.remove(),t.commit(),t.setCursorPosition(r)}function ZP(e,t){const r=e.querySelector(":scope > td"),n=parseFloat(r?.style.paddingTop)||0,i=parseFloat(r?.style.paddingBottom)||0,o=parseFloat(r?.style.borderTopLeftRadius)||0,s=parseFloat(r?.style.borderTopRightRadius)||0,a=parseFloat(r?.style.borderBottomLeftRadius)||0,l=parseFloat(r?.style.borderBottomRightRadius)||0,c=e.querySelectorAll(':scope > td > table:not([em="atom"])'),u=c.length;c.forEach((d,h)=>{const f=e.cloneNode(!0),g=f.querySelector(":scope > td");g.style.paddingTop="0",g.style.paddingBottom="0",g.style.borderRadius="0",g.innerHTML=d.outerHTML,h===0?(g.style.paddingTop=n+"px",g.style.borderTopLeftRadius=o+"px",g.style.borderTopRightRadius=s+"px"):h===u-1&&(g.style.paddingBottom=i+"px",g.style.borderBottomLeftRadius=a+"px",g.style.borderBottomRightRadius=l+"px");const y=d.nextElementSibling;if(y?.getAttribute("em")==="atom"&&y.querySelector("td")?.hasAttribute("height")){const L=parseFloat(y.querySelector("td").getAttribute("height"))/2;g.style.paddingBottom=L+"px"}const A=d.previousElementSibling;if(A?.getAttribute("em")==="atom"&&A.querySelector("td")?.hasAttribute("height")){const L=parseFloat(A.querySelector("td").getAttribute("height"))/2;g.style.paddingTop=L+"px"}e.insertAdjacentElement("beforebegin",f)}),e.remove(),t.commit()}function JP(e,t){return e.previousElementSibling?(e.previousElementSibling.before(e),t.commit(),t.implementElementEditor(e),!0):!1}function eN(e,t){return e.nextElementSibling?(e.nextElementSibling.after(e),t.commit(),t.implementElementEditor(e),!0):!1}function tN(e,t){const r=document.querySelector('[em="group"]')?.cloneNode(!0);if(!r)return;const n=r.querySelector("table");n&&Hm(n),e.after(r),t.commit(),X.send({operation:"application_scroll-to",settings:{value:r.getBoundingClientRect().top+r.getBoundingClientRect().height+(t.iframeOffsetTop||0)}})}function rN(e,t){e.querySelector(".em-element-editor")?.remove(),e.removeAttribute("em-state");const[r]=t.parseFromString(t.HTMLDocument.getOuterHtml(e));e.after(r),t.commit(),t.implementElementEditor(r),t.setCursorPosition(r)}function nN(e,t){e.querySelector("[em-edit]")&&X.send({operation:"application_element_settings_close"}),e.remove(),t.commit()}function iN(e){return e.classList.contains("add-empty-block")?"empty":e.classList.contains("add-saved-block")?"project":e.classList.contains("add-common-block")?"common":e.classList.contains("add-template-block")?"template":e.classList.contains("add-search-block")?"search":""}function oN(e){const t=e.closest("i");return t?t.classList.contains("add-empty-block")||t.classList.contains("add-saved-block")||t.classList.contains("add-common-block")||t.classList.contains("add-template-block")||t.classList.contains("add-search-block"):!1}function sN(e,t,r){const n=t.closest("i");if(!n)return;r.removeAllAttributes("em-edit");const i=t.closest('[em="block"]');if(!i)return;i.tagName==="TR"?i.querySelector("TD")?.setAttribute("em-edit","active"):i.setAttribute("em-edit","active");const o={operation:"application_element_settings_set",type:"emptyTable",tab:iN(n)};try{r.state.increment("activeElementLocked"),X.send(o)}finally{r.commitLockedAsync(!1).finally(()=>{r.state.decrement("activeElementLocked")})}}function dl(e){document.querySelector(".noresp-em-narrow-table")&&e.querySelectorAll("img, amp-img").forEach(t=>{const r=t;r.style.removeProperty("width"),r.style.removeProperty("max-width")})}function aN(e){const t=document.createElement("div");t.replaceChildren(...xe(e.atomHTML));const r=t.querySelector("img");if(!r)return Se(t);let n=0;return e.targetAtom.classList.contains("em-block-insert-empty")?n=600:e.targetAtom.classList.contains("em-mob-wrap")||e.targetAtom.classList.contains("noresp-em-mob-wrap")?n=parseFloat(String(e.targetAtom.offsetWidth)):n=e.targetAtom.parentNode?parseFloat(String(e.targetAtom.parentNode.offsetWidth)):parseFloat(String(e.targetAtom.offsetWidth)),r.setAttribute("width",String(n)),document.querySelector(".noresp-em-narrow-table")?dl(t):r.style.maxWidth=n+"px",Se(t)}function lN(e,t){const r=e.atomHTML.substring(0,3)==="<tr"?document.createElement("table"):document.createElement("div");r.replaceChildren(...xe(e.atomHTML));const n=r.querySelector("img");if(!n)return!1;const i=new Image;return i.onload=function(){const o=Math.round(this.width/2);n.setAttribute("width",String(o)),document.querySelector(".noresp-em-narrow-table")?dl(r):(n.style.maxWidth=o+"px",n.style.width="100%"),Yl(e.targetElem,e.targetPlace,`
84
- `+Se(r)+`
85
- `),t()},i.src=n.getAttribute("src")||"",!1}function cN(e){const t=e.blockHTML.substring(0,3)==="<tr"?document.createElement("table"):document.createElement("div");t.replaceChildren(...xe(e.blockHTML));const r=t.querySelector("img.em-countdown");if(!r)return Se(t);const n=r.getAttribute("em-cd-settings")||"",i=e.project==="useblocks"?"https://cdt3.useblocks.io/rndt?":"https://cdt3.emcdn.ru/rndt?",o=new URL(i+n),s=new Date;return o.searchParams.set("time",new Date(+s+432e6).toISOString()),Fo(r,"src",o.href),r.setAttribute("em-cd-settings",o.search.substring(1)),Se(t)}function uN(e){const t=e.blockIsTr?document.createElement("table"):document.createElement("div");return t.replaceChildren(...xe(e.blockHTML)),document.querySelector(".noresp-em-narrow-table")?t.querySelectorAll('[class^="em-mob-"], [class*=" em-mob-"]').forEach(r=>{r.className=r.className.split(" ").map(n=>n.startsWith("em-mob-")?"noresp-"+n:n).join(" ")}):t.querySelectorAll('[class^="noresp-"], [class*=" noresp-"]').forEach(r=>{r.className=r.className.split(" ").map(n=>n.startsWith("noresp-")?n.substring(7):n).join(" ")}),dl(t),Se(t)}function dN(e,t){const r=t.getOuterHtml(e),n=document.createElement("html").appendChild(document.createElement("body"));let i;e.tagName==="TR"?i=document.createElement("table"):i=document.createElement("div"),document.querySelectorAll("style").forEach(a=>{const l=t.getOuterHtml(a);l&&i.insertAdjacentHTML("beforeend",l)}),i.insertAdjacentHTML("beforeend",`
86
- `);const o=xe(r)[0];if(!o)return null;o.querySelectorAll("style").forEach(a=>{a.remove()}),o.classList.remove("em-structure"),o.querySelectorAll(".em-structure").forEach(a=>a.classList.remove("em-structure")),i.appendChild(o),e.querySelectorAll('[class*="em-font-"]').forEach(a=>{const l=[...a.classList].find(c=>c.startsWith("em-font-")&&c!=="em-font-custom");if(l){const c=`link[em-class="${l}"]`;!i.querySelector(c)&&document.querySelector(c)&&(i.insertAdjacentHTML("afterbegin",`
87
- `),i.prepend(document.querySelector(c).cloneNode(!0)))}}),n.append(i),yh(n,[...n.querySelectorAll("style")],{forceMediaMerge:!0});let s=Mt(n);return e.tagName==="TR"?s=s.replaceAll(/<body(.|\n|\r)*?><table>/gi,"").replaceAll(/<\/table><\/body>/gi,""):s=s.replaceAll(/<body(.|\n|\r)*?><div>/gi,"").replaceAll(/<\/div><\/body>/gi,""),s=s.replaceAll(/html {((.|\n|\r)*?)}/gi,"").replaceAll(/<style[^>]*>\s*<\/style>/gi,""),s}function fN(e,t){const{HTMLDocument:r,messageService:n}=t,i=e.closest('[em="block"]');if(!i)return;const o=dN(i,r);if(!o)return;VL(i);const s=i.getAttribute("em-block-id"),a=i.getAttribute("em-block-version");n.send({operation:"application_eblock_add",data:bn({html:o.trim(),isBlock:!0}),settings:{...s?{emBlockId:s}:{},...a?{emBlockVersion:a}:{}}})}function hN(e){const t=document.querySelector(".em-element-editor:not(.of-atom)");if(!t)return;const r=(t.closest('[em="block"]')||t.closest('[em="group"]'))?.getBoundingClientRect().top||0;if(e.scrollTop>r+55){const n=e.scrollTop-r;t.style.top=n+8+"px"}else t.style.removeProperty("top")}function mN(e){const t=document.querySelector(".em-element-editor");if(!t)return;const r=t.getBoundingClientRect(),n=document.querySelector(".em-element-editor-widget");n&&(r.top<0?n.classList.add("sticky"):n.classList.remove("sticky"),r.top+t.offsetHeight-10-n.offsetHeight<0&&n.classList.remove("sticky"),e(!1))}function Vm(){return _e.get("emailWidth")}function pN(e){const t=e.querySelectorAll(".em-mob-wrap:nth-child(odd), .noresp-em-mob-wrap:nth-child(odd)");for(let r=0;r<t.length;r++){const n=t[r];if(n.classList.contains("em-insert-ignore"))continue;const i=n.getAttribute("width");if(i!=null&&i!=="")return!0}return!1}function gN(e,t){const r=Vm(),n=document.createElement("table");n.replaceChildren(...xe(e.blockHTML));let i=660;if(e.targetBlock.querySelector(".em-mob-wrap, .noresp-em-mob-wrap")){i=0;const a=n.querySelector(".em-mob-wrap:empty, .noresp-em-mob-wrap:empty")?660:e.project==="useblocks"?640:660;if(document.body.clientWidth>(r||a))i=e.targetBlock.clientWidth;else{const l=e.targetBlock.querySelector(".em-mob-wrap, .noresp-em-mob-wrap");if(l&&l.parentElement){l.parentElement.querySelectorAll(".em-mob-wrap, .noresp-em-mob-wrap").forEach(h=>{i+=parseFloat(h.getAttribute("width")||"0")});const c=l.parentElement.closest("td"),u=parseFloat(c?.style.paddingLeft||"0")||0,d=parseFloat(c?.style.paddingRight||"0")||0;i+=u,i+=d}}}else if(e.targetBlock.closest(".container-td"))i=parseInt(String(e.targetBlock.offsetWidth));else{const a=e.targetBlock.querySelector('table[style*="max-width"]'),l=e.targetBlock.querySelector('div[style*="max-width"]'),c=e.targetBlock.querySelector('.row-content[style*="width"]');a?i=parseInt(String(a.offsetWidth)):l?i=parseInt(String(l.offsetWidth)):c?i=parseInt(String(c.offsetWidth)):i=e.targetBlock.style.maxWidth?parseFloat(e.targetBlock.style.maxWidth):e.targetBlock.getBoundingClientRect().width}let o=n.querySelector(".em-mob-wrap:empty, .noresp-em-mob-wrap:empty")?660:e.project==="useblocks"?640:660;if(n.querySelector(".em-mob-wrap, .noresp-em-mob-wrap")){o=0;const a=n.querySelector(".em-mob-wrap, .noresp-em-mob-wrap");if(a&&a.parentElement){a.parentElement.querySelectorAll(".em-mob-wrap, .noresp-em-mob-wrap").forEach(d=>{o+=parseFloat(d.getAttribute("width")||"0")});const l=a.parentElement.closest("td"),c=parseFloat(l?.style.paddingLeft||"0")||0,u=parseFloat(l?.style.paddingRight||"0")||0;o+=c,o+=u}}if(n.querySelector('div[style*="inline-block"]')){if(i<660&&n.querySelector('div[style*="inline-block"]'))if(n.querySelectorAll('div[style*="inline-block"]').length>1)n.querySelectorAll('div[style*="inline-block"]').forEach(a=>{const l=a,c=parseFloat(l.style.width),u=c/o,d=a.firstElementChild;if(!d)return;const h=c-parseFloat(d.getAttribute("width")||"0"),f=parseFloat(String(i*u));l.style.width=f+"px",d.setAttribute("width",String(f-h)),jr({elem:l,width:f})});else{const a=n.querySelector('div[style*="inline-block"]');a.style.maxWidth=i+"px",jr({elem:a,width:i}),a.firstElementChild&&(a.firstElementChild.setAttribute("width",String(Math.round(i*.91))),a.firstElementChild.style.maxWidth=Math.round(i*.91)+"px")}}else if(n.querySelector(".em-mob-wrap, .noresp-em-mob-wrap")){const a=[];n.querySelectorAll(".em-mob-wrap:nth-child(odd), .noresp-em-mob-wrap:nth-child(odd)").forEach(function(l){const c=Cl(l);c&&a.indexOf(c)===-1&&a.push(c)}),a.forEach(l=>{const c=l.querySelector(".em-mob-wrap, .noresp-em-mob-wrap");if(!c||!c.parentElement)return;const u=c.parentElement.closest("td"),d=parseFloat(u?.style.paddingLeft||"0")||0,h=parseFloat(u?.style.paddingRight||"0")||0;if(l.querySelectorAll(".em-mob-wrap, .noresp-em-mob-wrap").length>1){if(!pN(l))return;const f=l.querySelector(".em-mob-wrap:nth-child(even), .noresp-em-mob-wrap:nth-child(even)"),g=f?parseFloat(f.getAttribute("width")||"0"):0,y=l.querySelectorAll(".em-mob-wrap:nth-child(odd), .noresp-em-mob-wrap:nth-child(odd)").length;let A=0,L=0;l.querySelectorAll(".em-mob-wrap:nth-child(odd), .noresp-em-mob-wrap:nth-child(odd)").forEach(E=>{if(E.getAttribute("width")&&!E.classList.contains("em-insert-ignore")){const m=parseFloat(E.getAttribute("width"))/o,b=Math.round(parseFloat(String(i*m))-g/(y*2));E.setAttribute("width",String(b)),A+=b}});const C=i-(d+h+g*(y-1)+A);l.querySelectorAll(".em-mob-wrap:nth-child(odd), .noresp-em-mob-wrap:nth-child(odd)").forEach(E=>{if(E.getAttribute("width")&&!E.classList.contains("em-insert-ignore")){const m=parseFloat(E.getAttribute("width"))+Math.round(C/y);L+=m,E.setAttribute("width",String(m)),E.querySelector("img")&&E.querySelectorAll("img").forEach(b=>{parseFloat(b.getAttribute("width")||"0")>parseFloat(E.getAttribute("width"))+Math.round(C/y)&&(b.setAttribute("width",E.getAttribute("width")),b.style.maxWidth=E.getAttribute("width")+"px")})}}),L=L+g*(y-1)+d+h;const O=i-L;if(O!==0&&A>0){const E=l.querySelector(".em-mob-wrap:last-child, .noresp-em-mob-wrap:last-child");if(E&&!E.classList.contains("em-insert-ignore")){const m=parseFloat(E.getAttribute("width")||"0");E.setAttribute("width",String(m+O))}else{const m=l.querySelectorAll(".em-mob-wrap:nth-child(odd), .noresp-em-mob-wrap:nth-child(odd)");for(let b=m.length-1;b>=0;b--){const S=m[b];if(S.classList.contains("em-insert-ignore"))continue;const p=parseFloat(S.getAttribute("width")||"0");S.setAttribute("width",String(p+O));break}}}}else if(c.getAttribute("width")&&!c.classList.contains("em-insert-ignore")){const f=Math.round(i-d-h);c.setAttribute("width",String(f))}})}const s=n.querySelector("tr");return s?Mt(s):Se(n)}function bN(e,t){const r=Vm(),n=document.createElement("table");n.replaceChildren(...xe(e.blockHTML));let i=660;const o=e.targetBlock.tagName==="TR"?document.createElement("table"):document.createElement("div");if(o.style.width=r+"px",o.style.height="1000px",o.style.borderCollapse="collapse",o.setAttribute("cellpadding","0"),o.setAttribute("cellspacing","0"),o.style.position="absolute",o.style.top="-9999px",o.style.left="-9999px",document.body.appendChild(o),o.innerHTML=t.getOuterHtml(e.targetBlock),r)i=r;else{const l=o.querySelector('table[style*="max-width"]'),c=o.querySelector('div[style*="max-width"]'),u=o.querySelector('.row-content[style*="width"]');if(l)i=parseInt(String(l.offsetWidth));else if(c)i=parseInt(String(c.offsetWidth));else if(u)i=parseInt(String(u.offsetWidth));else{const d=o.querySelector(e.targetBlock.tagName);i=d?.style.maxWidth?parseFloat(d.style.maxWidth):d?.getBoundingClientRect().width||660}}document.body.removeChild(o);const s=n.querySelector("table:first-child");s?.style.maxWidth&&(s.style.maxWidth=i+"px",jr({elem:s,width:i}));const a=n.querySelector("tr");return a?Mt(a):Se(n)}function fl(e){const t=e.querySelectorAll(".em-mob-wrap, .noresp-em-mob-wrap");if(!t.length)return;const r=e.querySelectorAll(".em-mob-wrap:nth-child(odd), .noresp-em-mob-wrap:nth-child(odd)"),n=Array.from(r).filter(u=>!u.classList.contains("em-insert-ignore")&&u.getAttribute("width")!=null&&u.getAttribute("width")!=="");if(n.length===0)return;const i=e.parentElement?.getBoundingClientRect().width||0;let o=0,s=0;t.forEach(u=>{o+=parseFloat(u.getAttribute("width")||"0")});let a=e.querySelector(".em-mob-wrap");for(;a&&a!==e.parentElement?.parentElement;){const u=window.getComputedStyle(a),d=parseFloat(u.paddingLeft)||0,h=parseFloat(u.paddingRight)||0;(d>0||h>0)&&(s+=d+h),a=a.parentElement}const l=i-(o+s),c=n.length;n.forEach(u=>{const d=parseFloat(u.getAttribute("width")||"0")+Math.ceil(l/c);u.setAttribute("width",String(d))})}function yN(e){const t={all:null,top:null,right:null,bottom:null,left:null},r={all:null,top:null,right:null,bottom:null,left:null},n=ts({elem:e}),i=n.mobileWidth,o=n.mobileHeight;(e.style.padding||e.style.paddingTop||e.style.paddingRight||e.style.paddingBottom||e.style.paddingLeft)&&(!e.style.padding||e.style.padding.indexOf(" ")>-1?t.all=null:!e.style.padding&&e.style.paddingTop&&e.style.paddingRight&&e.style.paddingBottom&&e.style.paddingLeft&&e.style.paddingTop===e.style.paddingRight&&e.style.paddingRight===e.style.paddingBottom&&e.style.paddingBottom===e.style.paddingLeft?t.all=parseFloat(e.style.paddingTop):t.all=parseFloat(e.style.padding),t.top=e.style.paddingTop?parseFloat(e.style.paddingTop):null,t.right=e.style.paddingRight?parseFloat(e.style.paddingRight):null,t.bottom=e.style.paddingBottom?parseFloat(e.style.paddingBottom):null,t.left=e.style.paddingLeft?parseFloat(e.style.paddingLeft):null),(n.mobilePadding.all!==null||n.mobilePadding.top!==null||n.mobilePadding.right!==null||n.mobilePadding.bottom!==null||n.mobilePadding.left!==null)&&(n.mobilePadding.all?!n.mobilePadding.all&&n.mobilePadding.top&&n.mobilePadding.right&&n.mobilePadding.bottom&&n.mobilePadding.left&&n.mobilePadding.top===n.mobilePadding.right&&n.mobilePadding.right===n.mobilePadding.bottom&&n.mobilePadding.bottom===n.mobilePadding.left?r.all=parseFloat(String(n.mobilePadding.top)):r.all=n.mobilePadding.all!==null?parseFloat(String(n.mobilePadding.all)):null:r.all=null,r.top=n.mobilePadding.top!==null?parseFloat(String(n.mobilePadding.top)):n.mobilePadding.all===null?null:n.mobilePadding.all,r.right=n.mobilePadding.right!==null?parseFloat(String(n.mobilePadding.right)):n.mobilePadding.all===null?null:n.mobilePadding.all,r.bottom=n.mobilePadding.bottom!==null?parseFloat(String(n.mobilePadding.bottom)):n.mobilePadding.all===null?null:n.mobilePadding.all,r.left=n.mobilePadding.left!==null?parseFloat(String(n.mobilePadding.left)):n.mobilePadding.all===null?null:n.mobilePadding.all);let s=e.getAttribute("align")??"";e.parentElement?.getAttribute("em")!=="group"&&e.querySelector('[em="atom"]')&&e.querySelectorAll('[em="atom"] > tr > td').forEach(c=>{c.getAttribute("align")!==s&&(s="")});const a={padding:t,borderRadius:ic(e),backgroundColor:e.style.backgroundColor?ye(e.style.backgroundColor):e.getAttribute("bgcolor")||"",backgroundImage:[{type:"url",value:""}],backgroundPositionX:e.style.backgroundPositionX&&e.style.backgroundPositionX!=="initial"?e.style.backgroundPositionX:"",backgroundPositionY:e.style.backgroundPositionY&&e.style.backgroundPositionY!=="initial"?e.style.backgroundPositionY:"",backgroundRepeat:e.style.backgroundRepeat||"repeat",backgroundSize:e.style.backgroundSize||"auto",height:{value:e.getAttribute("height")&&e.getAttribute("height")!=="auto"?parseFloat(e.getAttribute("height")):null,dim:e.getAttribute("height")&&e.getAttribute("height")!=="auto"&&e.getAttribute("height").indexOf("%")>-1?"%":"px"},align:s,valign:e.getAttribute("valign")??"",border:nc(e),boxShadow:oc(e),mobileWidth:{value:i!==null?i:null,dim:n.mobileWidthDim},mobileHeight:{value:o!==null?o:null,dim:n.mobileHeightDim},mobileBorder:n.mobileBorder,mobileBorderRadius:n.mobileBorderRadius,mobileBoxShadow:n.mobileBoxShadow,mobileAlign:n.mobileAlign,mobileVerticalAlign:n.mobileVerticalAlign,mobileDirection:n.mobileDirection,mobileBackgroundColor:n.mobileBackgroundColor,mobileBackgroundImage:n.mobileBackgroundImage,mobileBackgroundPositionX:n.mobileBackgroundPositionX,mobileBackgroundPositionY:n.mobileBackgroundPositionY,mobileBackgroundRepeat:n.mobileBackgroundRepeat,mobileBackgroundSize:n.mobileBackgroundSize,mobilePadding:r,show:n.show,exportAsPicture:e.getAttribute("em-operation")==="exportAsPicture",outlookBackground:is(e,"inside")},l=e.closest("table");if(l&&l.getAttribute("em")==="atom"){const c=l.getAttribute("width");a.width={value:c&&c!=="auto"?parseFloat(c):null,dim:c&&c!=="auto"&&c.indexOf("%")>-1?"%":"px"}}else{const c=e.getAttribute("width");a.width={value:c&&c!=="auto"?parseFloat(c):null,dim:c&&c!=="auto"&&c.indexOf("%")>-1?"%":"px"}}if(e.style.backgroundImage){const c=e.style.backgroundImage;a.backgroundImage=[{type:"url",value:c?c.substring(5,c.length-2):""}]}else e.getAttribute("background")&&(a.backgroundImage=[{type:"url",value:e.getAttribute("background")||""}]);return a}function vN(e){let t=[],r=null,n=null,i="",o,s=!1;if(e.elem.closest(".em-mob-wrap, .noresp-em-mob-wrap")){const a=e.elem.closest(".em-mob-wrap, .noresp-em-mob-wrap");if(o=!0,a.parentElement.querySelectorAll(":scope > .em-mob-wrap, :scope > .noresp-em-mob-wrap").length>1)a.parentElement.querySelectorAll(":scope > .em-mob-wrap:nth-child(odd), :scope > .noresp-em-mob-wrap:nth-child(odd)").forEach(l=>{t.push({width:parseFloat(l.getAttribute("width")||"0"),current:l===a});const c=a.parentElement.querySelector(":scope > .em-mob-wrap, :scope > .noresp-em-mob-wrap");c?.nextElementSibling&&(r=parseFloat(c.nextElementSibling.getAttribute("width")||"0"),n=ts({elem:c.nextElementSibling}).mobileHeight||0),(l.classList.contains("em-mob-wrap-cancel")||l.classList.contains("noresp-em-mob-wrap-cancel"))&&(o=!1)});else{const l=a.parentElement.querySelector(":scope > .em-mob-wrap, :scope > .noresp-em-mob-wrap");t=[{width:parseFloat(l?.getAttribute("width")||"0"),current:!0}],r=0}i=a.parentElement.querySelector(".em-mob-wrap, .noresp-em-mob-wrap")?.getAttribute("valign")||"",(e.elem.querySelector(".em-mob-wrap, .noresp-em-mob-wrap")?document.querySelector('[em-edit="active"]'):e.elem.closest(".em-mob-wrap, .noresp-em-mob-wrap").parentElement.closest("td"))?.getAttribute("dir")==="rtl"&&(s=!0)}else{const a=e.elem.closest('div[style*="inline-block"]');if(a&&a.parentElement.querySelectorAll('div[style*="inline-block"]').length>1)a.parentElement.querySelectorAll('div[style*="inline-block"]').forEach(l=>{const c=l;if(!c.style.fontFamily){const u=l.firstElementChild;t.push({width:parseFloat(u?.getAttribute("width")||"0"),current:l===a});const d=u?.getAttribute("width"),h=parseFloat(c.style.width);r=h-(!d||d.indexOf("%")>-1?h:parseFloat(d))}});else{const l=a?.parentElement?.querySelector('div[style*="inline-block"]');t=[{width:parseFloat(l?.firstElementChild?.getAttribute("width")||"0"),current:!0}],r=0}i=a?.parentElement?.querySelector('div[style*="inline-block"]')?.style.verticalAlign||"",(e.elem.querySelector('div[style*="inline-block"]')?document.querySelector('[em-edit="active"]'):e.elem.closest('div[style*="inline-block"]')?.parentElement)?.getAttribute("dir")==="rtl"&&(s=!0)}return{items:t,gap:r,gapMobile:n,valign:i,wrap:o,dirRevers:s}}var EN='table[em-type="social"]';function _N(e){return e.closest(EN)}function SN(e,t){return t.contains(e)?!!(e.tagName==="IMG"||e.tagName==="TD"&&(e.hasAttribute("em-platform")||e.hasAttribute("data-em-platform"))||e.tagName==="A"&&e.querySelector(":scope > img")):!1}function Wm(e){const t=_N(e);if(t&&e!==t&&SN(e,t))return t;const r=e.parentNode;if(!r)return!1;const n=r.tagName,i=r.style,o=r.parentNode;return n==="TD"||n==="TABLE"&&o?.style.display!=="inline-block"&&!e.closest(".em-narrow-table")&&r.getAttribute("em")!=="atom"||n==="DIV"&&(i.display==="inline-block"||i.display==="table-cell")&&i.verticalAlign||(n==="DIV"||n==="TABLE")&&wN(i)?r:Wm(r)}function wN(e){return!!(e.width||e.minWidth||e.maxWidth||e.height||e.background||e.backgroundColor||e.backgroundPositionX||e.backgroundPositionY||e.backgroundImage||e.backgroundRepeat||e.backgroundSize||e.padding||e.paddingTop||e.paddingRight||e.paddingBottom||e.paddingLeft||e.border||e.borderBottom||e.borderBottomWidth||e.borderBottomStyle||e.borderBottomColor||e.borderLeft||e.borderLeftWidth||e.borderLeftStyle||e.borderLeftColor||e.borderTop||e.borderTopWidth||e.borderTopStyle||e.borderTopColor||e.borderRight||e.borderRightWidth||e.borderRightStyle||e.borderRightColor||e.borderRadius||e.borderTopLeftRadius||e.borderTopRightRadius||e.borderBottomLeftRadius||e.borderBottomRightRadius||e.boxShadow||e.textAlign||e.align||e.verticalAlign)}function zt(e,t){return{settings:e,elem:t}}var Q=null;function CN(e){Q=e}function AN(){return _e.get("emailWidth")||475}function bo(){return document.documentElement.clientWidth<=AN()}function hl(e,t,r,n){if(!Q)return;const i=e;i.style.cursor=r,i.mousemove=t,i.onmousedown=function(){window.getSelection()?.removeAllRanges(),Q.applicationElementSettingsSet({elem:e});const o=document.querySelector("[em-edit]");o&&Q.setCursorPosition(o),document.documentElement.classList.add("em-resize-start");try{document.documentElement.addEventListener("mousemove",i.doDrag,!1),document.documentElement.addEventListener("mouseup",i.stopDrag,!1)}catch{}},i.doDrag=function(o){if(o.which!=1){i.stopDrag();return}i.mousemove(o)},i.stopDrag=function(){document.documentElement.removeEventListener("mousemove",i.doDrag,!1),document.documentElement.removeEventListener("mouseup",i.stopDrag,!1),n&&n(),setTimeout(()=>{document.documentElement.classList.remove("em-resize-start"),Q.commit(!1)})}}function Vt(e,t,r){hl(e,t,"ns-resize",r)}function Rn(e,t,r){hl(e,t,"ew-resize",r)}function TN(e,t,r){hl(e,t,"nwse-resize",r)}function Wt(e,t){if(!Q)return;let r=null,n=0;const i=bo();if(e.closest('div[style*="font-size"][style*="line-height"]')){if(r=e.closest('div[style*="height"][style*="line-height"]'),!r)return;n=r.clientHeight+t,i?ri(zt({mobileHeight:{value:n>0?n:0,dim:"px",classNamePrefix:"em-mob-height-"}},r)):(r.style.height=n+"px",r.style.lineHeight=n+"px")}else if(e.closest(".em-gap")){if(r=e.closest(".em-gap"),!r)return;r.classList.add("em-hover"),n=r.clientHeight+t,r.closest("tr")?.querySelectorAll(".em-gap").forEach(o=>{const s={mobileHeight:{value:n>0?n:0,dim:"px",classNamePrefix:"em-mob-height-"}},a=o.closest(".em-mob-wrap, .noresp-em-mob-wrap");ri(zt(s,a)),o.style.height=n+"px";const l=o.querySelector(".em-element-gap-value");l&&(l.innerHTML=n+"px")})}else if(e.closest(".em-vindent")?.classList.contains("em-vindent-paddingTop")){if(r=e.closest(".em-vindent-paddingTop"),!r)return;const o=r.parentElement;r.classList.add("em-hover"),n=r.clientHeight+t,r.style.height=n+"px",i&&o?Wr(zt({mobilePadding:{top:n>0?n:0,classNamePrefix:"em-mob-padding_"}},o)):o&&(o.style.paddingTop=n+"px")}else if(e.closest(".em-vindent")?.classList.contains("em-vindent-paddingBottom")){if(r=e.closest(".em-vindent-paddingBottom"),!r)return;const o=r.parentElement;r.classList.add("em-hover"),n=r.clientHeight+t,r.style.height=n+"px",i&&o?Wr(zt({mobilePadding:{bottom:n>0?n:0,classNamePrefix:"em-mob-padding_"}},o)):o&&(o.style.paddingBottom=n+"px")}else{if(r=e.closest("td"),!r)return;n=r.clientHeight+t,i?ri(zt({mobileHeight:{value:n>0?n:0,dim:"px",classNamePrefix:"em-mob-height-"}},r)):r.setAttribute("height",String(n))}if(r&&!e.closest(".em-gap")){if(n>=0){const o=r.querySelector(".em-element-vindent-value");o&&(o.innerHTML=n+"px")}n<30?r.classList.add("em-vindent_low"):r.classList.remove("em-vindent_low")}r&&Q.commit()}function Ut(e){if(!Q)return;let t=null;const r=bo();if(e.closest('div[style*="height"][style*="line-height"]')){if(t=e.closest('div[style*="height"][style*="line-height"]'),!t)return;parseInt(t.style.height)<=0?t.remove():Q.applicationElementSettingsSet({elem:t})}else if(e.closest(".em-gap")){if(t=e.closest(".em-gap"),!t)return;Q.applicationElementSettingsSet({elem:t.closest('[em="block"] > td')})}else if(e.closest(".em-vindent")?.classList.contains("em-vindent-paddingTop")){if(t=e.closest(".em-vindent-paddingTop"),!t)return;t.classList.remove("em-hover");const n=t.parentElement;parseInt(t.style.height)<=0?r&&n?Q.applicationElementSettingsSet({elem:n}):n&&n.style.removeProperty("padding-top"):n&&Q.applicationElementSettingsSet({elem:n})}else if(e.closest(".em-vindent")?.classList.contains("em-vindent-paddingBottom")){if(t=e.closest(".em-vindent-paddingBottom"),!t)return;t.classList.remove("em-hover");const n=t.parentElement;parseInt(t.style.height)<=0?r&&n?Q.applicationElementSettingsSet({elem:n}):n&&n.style.removeProperty("padding-bottom"):n&&Q.applicationElementSettingsSet({elem:n})}else{if(t=e.closest("td"),!t)return;const n=t.getAttribute("height");n&&parseInt(n)<=0?t.closest("table")?.remove():Q.applicationElementSettingsSet({elem:t})}t&&Q.commit()}function Nr(e,t){if(!Q)return;let r=null,n=0;const i=bo();if(e.closest(".em-element-resize-img-container")){const o=e.closest(".em-element-resize-img-container")?.querySelector("img");if(!o)return;const s=o.clientWidth+t;o.style.maxWidth=s+"px",o.setAttribute("width",String(s)),Q.commit()}else if(e.closest(".em-gap")){if(r=e.closest(".em-gap"),!r)return;if(r.classList.add("em-hover"),n=r.clientWidth+t,n>=0){const o=r.clientWidth,s=Array.from(r.closest("tr")?.querySelectorAll(".em-mob-wrap:nth-child(odd)")||[]).map(u=>u.clientWidth),a=s.reduce((u,d)=>u+d,0),l=a+(s.length-1)*o,c=r.closest("tr");if(!c)return;if(l-3<=c.clientWidth||t<=0){let u=Array.from(c.querySelectorAll(".em-mob-wrap:nth-child(odd)")).filter(A=>A.dataset.percent).map(A=>A.dataset.percent);u.length||(u=s.map(A=>((A||0)/a*100).toFixed(1)),Ll(c.querySelectorAll(".em-mob-wrap:nth-child(odd)")));const d=l-(s.length-1)*n,h=(A,L)=>Math.round(L*parseFloat(A)/100);let f=s.map((A,L)=>h(u[L],d));const g=l-(f.reduce((A,L)=>A+L,0)+(s.length-1)*n);if(g!==0){const A=f.length-Math.abs(g);f=f.map((L,C)=>A<=C?L+(g>0?1:-1):L)}const y=f;c.querySelectorAll(".em-mob-wrap:nth-child(odd)").forEach((A,L)=>{Array.from(A.querySelectorAll("table[width]")).filter(C=>!C.getAttribute("width")?.includes("%")).forEach(C=>{+(C.getAttribute("width")||0)<=y[L]&&(C.style.maxWidth=String(y[L]),C.setAttribute("width","100%"))})}),r.style.width=n+"px",c.querySelectorAll(".em-mob-wrap:nth-child(odd)").forEach((A,L)=>A.setAttribute("width",String(y[L]))),c.querySelectorAll(".em-gap").forEach(A=>{A.parentElement?.setAttribute("width",String(n)),A.style.width=n+"px";const L=A.querySelector(".em-element-gap-value");L&&(L.innerHTML=n+"px")})}}}else if(e.closest(".em-vindent")?.classList.contains("em-vindent-paddingLeft")){if(r=e.closest(".em-vindent-paddingLeft"),!r)return;const o=r.parentElement;r.classList.add("em-hover"),n=r.clientWidth+t,r.style.width=n+"px",i&&o?Wr(zt({mobilePadding:{left:n>0?n:0,classNamePrefix:"em-mob-padding_"}},o)):o&&(o.style.paddingLeft=n+"px",o.querySelectorAll(":scope > table").forEach(s=>fl(s)))}else if(e.closest(".em-vindent")?.classList.contains("em-vindent-paddingRight")){if(r=e.closest(".em-vindent-paddingRight"),!r)return;const o=r.parentElement;r.classList.add("em-hover"),n=r.clientWidth+t,r.style.width=n+"px",i&&o?Wr(zt({mobilePadding:{right:n>0?n:0,classNamePrefix:"em-mob-padding_"}},o)):o&&(o.style.paddingRight=n+"px",o.querySelectorAll(":scope > table").forEach(s=>fl(s)))}if(r&&!e.closest(".em-gap")){if(n>=0){const o=r.querySelector(".em-element-vindent-value, .em-element-gap-value");o&&(o.innerHTML=n+"px")}n<30?r.classList.add("em-vindent_low"):r.classList.remove("em-vindent_low")}r&&Q.commit()}function Mr(e){if(!Q)return;let t=null;const r=bo();if(e.closest(".em-element-resize-img-container")){const n=e.closest(".em-element-resize-img-container")?.querySelector("img");n&&(Q.applicationElementSettingsSet({elem:n}),Q.commit())}else if(e.closest(".em-gap"))t=e.closest(".em-gap"),t&&Q.applicationElementSettingsSet({elem:t.closest('[em="block"] > td')});else if(e.closest(".em-vindent")?.classList.contains("em-vindent-paddingLeft")){if(t=e.closest(".em-vindent-paddingLeft"),!t)return;t.classList.remove("em-hover");const n=t.parentElement;parseInt(t.style.width)<=0?r&&n?Q.applicationElementSettingsSet({elem:n}):n&&n.style.removeProperty("padding-left"):n&&Q.applicationElementSettingsSet({elem:n})}else if(e.closest(".em-vindent")?.classList.contains("em-vindent-paddingRight")){if(t=e.closest(".em-vindent-paddingRight"),!t)return;t.classList.remove("em-hover");const n=t.parentElement;parseInt(t.style.width)<=0?r&&n?Q.applicationElementSettingsSet({elem:n}):n&&n.style.removeProperty("padding-right"):n&&Q.applicationElementSettingsSet({elem:n})}t&&Q.commit()}var kN='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32"><path d="M 15 4 L 15 24.0625 L 8.21875 17.28125 L 6.78125 18.71875 L 15.28125 27.21875 L 16 27.90625 L 16.71875 27.21875 L 25.21875 18.71875 L 23.78125 17.28125 L 17 24.0625 L 17 4 Z"/></svg>',LN='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32"><path d="M 16 4.09375 L 15.28125 4.78125 L 6.78125 13.28125 L 8.21875 14.71875 L 15 7.9375 L 15 28 L 17 28 L 17 7.9375 L 23.78125 14.71875 L 25.21875 13.28125 L 16.71875 4.78125 Z"/></svg>',ON='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32"><path d="M 12 6 C 10.894531 6 10 6.894531 10 8 C 10 9.105469 10.894531 10 12 10 C 13.105469 10 14 9.105469 14 8 C 14 6.894531 13.105469 6 12 6 Z M 20 6 C 18.894531 6 18 6.894531 18 8 C 18 9.105469 18.894531 10 20 10 C 21.105469 10 22 9.105469 22 8 C 22 6.894531 21.105469 6 20 6 Z M 12 14 C 10.894531 14 10 14.894531 10 16 C 10 17.105469 10.894531 18 12 18 C 13.105469 18 14 17.105469 14 16 C 14 14.894531 13.105469 14 12 14 Z M 20 14 C 18.894531 14 18 14.894531 18 16 C 18 17.105469 18.894531 18 20 18 C 21.105469 18 22 17.105469 22 16 C 22 14.894531 21.105469 14 20 14 Z M 12 22 C 10.894531 22 10 22.894531 10 24 C 10 25.105469 10.894531 26 12 26 C 13.105469 26 14 25.105469 14 24 C 14 22.894531 13.105469 22 12 22 Z M 20 22 C 18.894531 22 18 22.894531 18 24 C 18 25.105469 18.894531 26 20 26 C 21.105469 26 22 25.105469 22 24 C 22 22.894531 21.105469 22 20 22 Z"/></svg>',xN='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32"><path d="M 4 4 L 4 24 L 11 24 L 11 22 L 6 22 L 6 6 L 18 6 L 18 7 L 20 7 L 20 4 Z M 12 8 L 12 28 L 28 28 L 28 8 Z M 14 10 L 26 10 L 26 26 L 14 26 Z"/></svg>',PN='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32"><path d="M 5 5 L 5 9 L 6 9 L 6 23 L 5 23 L 5 27 L 9 27 L 9 26 L 23 26 L 23 27 L 27 27 L 27 23 L 26 23 L 26 9 L 27 9 L 27 5 L 23 5 L 23 6 L 9 6 L 9 5 Z M 9 8 L 23 8 L 23 9 L 24 9 L 24 23 L 23 23 L 23 24 L 9 24 L 9 23 L 8 23 L 8 9 L 9 9 Z M 10 10 L 10 18 L 14 18 L 14 22 L 22 22 L 22 14 L 18 14 L 18 10 Z M 12 12 L 16 12 L 16 16 L 12 16 Z M 18 16 L 20 16 L 20 20 L 16 20 L 16 18 L 18 18 Z"/></svg>',ml='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32"><path d="M 23.90625 3.96875 C 22.859375 3.96875 21.8125 4.375 21 5.1875 L 5.1875 21 L 5.125 21.3125 L 4.03125 26.8125 L 3.71875 28.28125 L 5.1875 27.96875 L 10.6875 26.875 L 11 26.8125 L 26.8125 11 C 28.4375 9.375 28.4375 6.8125 26.8125 5.1875 C 26 4.375 24.953125 3.96875 23.90625 3.96875 Z M 23.90625 5.875 C 24.410156 5.875 24.917969 6.105469 25.40625 6.59375 C 26.378906 7.566406 26.378906 8.621094 25.40625 9.59375 L 24.6875 10.28125 L 21.71875 7.3125 L 22.40625 6.59375 C 22.894531 6.105469 23.402344 5.875 23.90625 5.875 Z M 20.3125 8.71875 L 23.28125 11.6875 L 11.1875 23.78125 C 10.53125 22.5 9.5 21.46875 8.21875 20.8125 Z M 6.9375 22.4375 C 8.136719 22.921875 9.078125 23.863281 9.5625 25.0625 L 6.28125 25.71875 Z"/></svg>',NN='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32"><path d="M 15 5 L 15 15 L 5 15 L 5 17 L 15 17 L 15 27 L 17 27 L 17 17 L 27 17 L 27 15 L 17 15 L 17 5 Z"/></svg>',MN='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32"><path d="M 5 5 L 5 27 L 27 27 L 27 9.59375 L 26.71875 9.28125 L 22.71875 5.28125 L 22.40625 5 Z M 7 7 L 10 7 L 10 13 L 22 13 L 22 7.4375 L 25 10.4375 L 25 25 L 23 25 L 23 16 L 9 16 L 9 25 L 7 25 Z M 12 7 L 16 7 L 16 9 L 18 9 L 18 7 L 20 7 L 20 11 L 12 11 Z M 11 18 L 21 18 L 21 25 L 11 25 Z"/></svg>',RN='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32"><path d="M 15 4 C 14.476563 4 13.941406 4.183594 13.5625 4.5625 C 13.183594 4.941406 13 5.476563 13 6 L 13 7 L 7 7 L 7 9 L 8 9 L 8 25 C 8 26.644531 9.355469 28 11 28 L 23 28 C 24.644531 28 26 26.644531 26 25 L 26 9 L 27 9 L 27 7 L 21 7 L 21 6 C 21 5.476563 20.816406 4.941406 20.4375 4.5625 C 20.058594 4.183594 19.523438 4 19 4 Z M 15 6 L 19 6 L 19 7 L 15 7 Z M 10 9 L 24 9 L 24 25 C 24 25.554688 23.554688 26 23 26 L 11 26 C 10.445313 26 10 25.554688 10 25 Z M 12 12 L 12 23 L 14 23 L 14 12 Z M 16 12 L 16 23 L 18 23 L 18 12 Z M 20 12 L 20 23 L 22 23 L 22 12 Z"/></svg>';function yo(e,t,r=""){const n=`class="${t}" width="1em" height="1em" fill="currentColor" aria-hidden="true"`;return e.replace("<svg",`<svg ${n}${r?` ${r}`:""}`)}var Dn=null;function DN(e){Dn=e}function IN(){if(!Dn)return;const e=_e.get("applicationTheme")||"light";let t=!1;try{Dn.textDocument.beginUpdate();const r=[...document.querySelectorAll('[em="css"]')].map(s=>s.getAttribute("href"));let n=document.getElementsByTagName("head")[0];if(!n)if(document.documentElement)n=document.createElement("head"),document.documentElement.insertBefore(n,document.documentElement.firstChild),t=!0;else return;const i="css/sandbox.css?bb6d921f";if(r.indexOf(i)<0){const s=document.createElement("link");s.setAttribute("rel","stylesheet"),s.setAttribute("type","text/css"),s.setAttribute("em","css"),s.setAttribute("href",i),n.appendChild(s),t=!0}const o=`css/sandbox-${e}.css?bb6d921f`;if(r.indexOf(o)<0){const s=document.createElement("link");s.setAttribute("rel","stylesheet"),s.setAttribute("type","text/css"),s.setAttribute("em","css"),s.setAttribute("href",o),n.appendChild(s),t=!0}}finally{Dn.textDocument.endUpdate()}t&&Dn.commit(!1)}var BN='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32"><path d="M 16 4 C 10.886719 4 6.617188 7.160156 4.875 11.625 L 6.71875 12.375 C 8.175781 8.640625 11.710938 6 16 6 C 19.242188 6 22.132813 7.589844 23.9375 10 L 20 10 L 20 12 L 27 12 L 27 5 L 25 5 L 25 8.09375 C 22.808594 5.582031 19.570313 4 16 4 Z M 25.28125 19.625 C 23.824219 23.359375 20.289063 26 16 26 C 12.722656 26 9.84375 24.386719 8.03125 22 L 12 22 L 12 20 L 5 20 L 5 27 L 7 27 L 7 23.90625 C 9.1875 26.386719 12.394531 28 16 28 C 21.113281 28 25.382813 24.839844 27.125 20.375 Z"/></svg>',vo=null,FN=".em-prevent-action",Um=new WeakSet;function jN(e){vo=e}function $N(){return _e.get("emailWidth")||475}function HN(){return _e.get("isLeftButtonDown")||!1}function zN(){return _e.get("editImageControlEnabled")||!1}function qm(){return _e.get("imageCenterEditorEnabled")||!1}function VN(){return _e.get("imageCenterStockEnabled")||!1}function WN(){return _e.get("imageCenterGifEnabled")||!1}function UN(){return _e.get("elementAIimageEnabled")||!1}function qN(e){if(!vo||document.body?.classList.contains("em-native-file-drag"))return;const t=vo.getLocale(),r=$N(),n=HN(),i=qm(),o=document.documentElement.clientWidth<=(r||475);if(document.body&&!document.body.classList.contains("mceNonEditable")&&!n){if(e.tagName==="TD"&&e.innerHTML===""&&e.getAttribute("height")&&!e.classList.contains("em-vindent")&&!e.closest("editor")){e.classList.add("em-vindent"),e.closest("table")?.classList.add("em-vindent-table"),parseInt(e.getAttribute("height")||"0")<30&&e.classList.add("em-vindent_low");const g=z({targetElement:e,insertType:"append",className:"em-element-resize-height"});z({targetElement:e,insertType:"append",className:"em-element-vindent"}),z({targetElement:e,insertType:"append",className:"em-element-vindent-bg"}),Vt(g,function(y){Wt(g,y.movementY)},function(){Ut(g)})}if(e.closest(FN))return;if((e.classList.contains("em-vindent")||e.closest(".em-vindent"))&&e.getAttribute("height")&&!e.querySelector(".em-element-vindent-value")){const g=Tt(e,"em-mob-height"),y=g?parseFloat(g.substring(14,g.length-2)):void 0;z({targetElement:e.querySelector(".em-element-vindent"),insertType:"append",className:"em-element-vindent-value",HTMLcontent:o?(y||e.getAttribute("height"))+"px":e.getAttribute("height")+"px"}),!o||!y?parseInt(e.getAttribute("height")||"0")<30?e.classList.add("em-vindent_low"):e.classList.remove("em-vindent_low"):y<30?e.classList.add("em-vindent_low"):e.classList.remove("em-vindent_low")}if(e.tagName==="DIV"&&e.style.height&&e.style.fontSize&&!e.classList.contains("em-vindent")&&!e.closest("editor")&&e.style.height&&e.style.lineHeight&&!e.style.fontFamily){e.classList.add("em-vindent"),parseFloat(e.style.height)<30&&e.classList.add("em-vindent_low");const g=z({targetElement:e,insertType:"append",className:"em-element-resize-height"}),y=z({targetElement:e,insertType:"append",className:"em-element-vindent"});z({targetElement:y,insertType:"append",className:"em-element-vindent-value",HTMLcontent:e.style.height}),z({targetElement:e,insertType:"append",className:"em-element-vindent-bg"}),Vt(g,function(A){Wt(g,A.movementY)},function(){Ut(g)})}if((e.classList.contains("em-vindent")||e.closest(".em-vindent"))&&e.style.height&&e.style.fontSize&&!e.querySelector(".em-element-vindent-value")){const g=Tt(e,"em-mob-height"),y=g?parseFloat(g.substring(14,g.length-2)):void 0;z({targetElement:e.querySelector(".em-element-vindent"),insertType:"append",className:"em-element-vindent-value",HTMLcontent:o?(y||parseFloat(e.style.height))+"px":parseFloat(e.style.height)+"px"}),!o||!y?parseFloat(e.style.height)<30?e.classList.add("em-vindent_low"):e.classList.remove("em-vindent_low"):y<30?e.classList.add("em-vindent_low"):e.classList.remove("em-vindent_low")}const s=Tt(e,"em-mob-padding_top"),a=s?parseFloat(s.substring(19)):void 0,l=Tt(e,"em-mob-padding_bottom"),c=l?parseFloat(l.substring(22)):void 0,u=Tt(e,"em-mob-padding_left"),d=u?parseFloat(u.substring(20)):void 0,h=Tt(e,"em-mob-padding_right"),f=h?parseFloat(h.substring(21)):void 0;if((e.style.padding||e.style.paddingTop||e.style.paddingBottom||e.style.paddingLeft||e.style.paddingRight)&&!e.closest("editor")&&(e.tagName!=="A"||e.style.height)){if(e.style.paddingTop&&!e.querySelector(":scope > .em-vindent-paddingTop")&&!e.querySelector(":scope > editor > .em-vindent-paddingTop")&&(!a||!o)){const g=z({targetElement:e,insertType:"append",className:"em-vindent em-vindent-paddingTop",style:`height: ${e.style.paddingTop}`});e.getBoundingClientRect().top<30&&g.classList.add("top-crossed")}e.style.paddingBottom&&!e.querySelector(":scope > .em-vindent-paddingBottom")&&!e.querySelector(":scope > editor > .em-vindent-paddingBottom")&&(!c||!o)&&z({targetElement:e,insertType:"append",className:"em-vindent em-vindent-paddingBottom",style:`height: ${e.style.paddingBottom}`}),e.style.paddingLeft&&!e.querySelector(":scope > .em-vindent-paddingLeft")&&!e.querySelector(":scope > editor > .em-vindent-paddingLeft")&&(!d||!o)&&z({targetElement:e,insertType:"append",className:"em-vindent em-vindent-paddingLeft",style:`width: ${e.style.paddingLeft}`}),e.style.paddingRight&&!e.querySelector(":scope > .em-vindent-paddingRight")&&!e.querySelector(":scope > editor > .em-vindent-paddingRight")&&(!f||!o)&&z({targetElement:e,insertType:"append",className:"em-vindent em-vindent-paddingRight",style:`width: ${e.style.paddingRight}`}),e.querySelectorAll('[class*="em-vindent-padding"]').forEach(g=>{if(!g.querySelector(".em-element-resize-height")){const y=g;(parseFloat(y.style.height)<30||parseFloat(y.style.width)<30)&&g.classList.add("em-vindent_low");const A=z({targetElement:y,insertType:"append",className:"em-element-resize-height"});z({targetElement:y,insertType:"append",className:"em-element-vindent-marker"}),z({targetElement:y,insertType:"append",className:"em-element-vindent-bg"});const L=z({targetElement:y,insertType:"append",className:"em-element-vindent"});let C="";y.className.indexOf("paddingTop")>-1?(C=e.style.paddingTop,Vt(A,function(O){Wt(A,O.movementY)},function(){Ut(A)})):y.className.indexOf("paddingBottom")>-1?(C=e.style.paddingBottom,Vt(A,function(O){Wt(A,O.movementY)},function(){Ut(A)})):y.className.indexOf("paddingLeft")>-1?(C=e.style.paddingLeft,Rn(A,function(O){Nr(A,O.movementX)},function(){Mr(A)})):y.className.indexOf("paddingRight")>-1&&(C=e.style.paddingRight,Rn(A,function(O){Nr(A,-O.movementX)},function(){Mr(A)})),z({targetElement:L,insertType:"append",className:"em-element-vindent-value",HTMLcontent:C})}})}if(e.className.length&&e.className?.includes("em-mob-padding")&&!e.closest("editor")&&o&&(a&&!e.querySelector(":scope > .em-vindent-paddingTop")&&z({targetElement:e,insertType:"append",className:"em-vindent em-vindent-paddingTop",style:`height: ${a}px`}),c&&!e.querySelector(":scope > .em-vindent-paddingBottom")&&z({targetElement:e,insertType:"append",className:"em-vindent em-vindent-paddingBottom",style:`height: ${c}px`}),d&&!e.querySelector(":scope > .em-vindent-paddingLeft")&&z({targetElement:e,insertType:"append",className:"em-vindent em-vindent-paddingLeft",style:`width: ${d}px`}),f&&!e.querySelector(":scope > .em-vindent-paddingRight")&&z({targetElement:e,insertType:"append",className:"em-vindent em-vindent-paddingRight",style:`width: ${f}px`}),e.querySelectorAll('[class*="em-vindent-padding"]').forEach(g=>{if(!g.querySelector(".em-element-resize-height")){const y=g;(parseFloat(y.style.height)<30||parseFloat(y.style.width)<30)&&g.classList.add("em-vindent_low");const A=z({targetElement:y,insertType:"append",className:"em-element-resize-height"});z({targetElement:y,insertType:"append",className:"em-element-vindent-marker"}),z({targetElement:y,insertType:"append",className:"em-element-vindent-bg"});const L=z({targetElement:y,insertType:"append",className:"em-element-vindent"});let C="";y.className.indexOf("paddingTop")>-1?(C=a,Vt(A,function(O){Wt(A,O.movementY)},function(){Ut(A)})):y.className.indexOf("paddingBottom")>-1?(C=c,Vt(A,function(O){Wt(A,O.movementY)},function(){Ut(A)})):y.className.indexOf("paddingLeft")>-1?(C=d,Rn(A,function(O){Nr(A,O.movementX)},function(){Mr(A)})):y.className.indexOf("paddingRight")>-1&&(C=f,Rn(A,function(O){Nr(A,-O.movementX)},function(){Mr(A)})),z({targetElement:L,insertType:"append",className:"em-element-vindent-value",HTMLcontent:String(C)})}})),e.closest('[em="block"]')?.querySelector(".em-mob-wrap, .noresp-em-mob-wrap")&&(e.closest('[em="block"]')?.querySelectorAll(".em-mob-wrap, .noresp-em-mob-wrap").length||0)>2&&!e.closest('[em="block"]')?.querySelector(".em-mob-wrap .em-gap, .noresp-em-mob-wrap .em-gap")){const g=Tt(e.closest('[em="block"]')?.querySelector(".em-mob-wrap:nth-child(even), .noresp-em-mob-wrap:nth-child(even)"),"em-mob-height"),y=g?parseFloat(g.substring(14,g.length-2)):void 0;e.closest('[em="block"]')?.querySelectorAll(".em-mob-wrap:nth-child(even), .noresp-em-mob-wrap:nth-child(even)").forEach(A=>{z({targetElement:A,insertType:"append",className:"em-gap",style:o?`height: ${y}px;`:`width: ${A.getAttribute("width")}px;`})}),e.closest('[em="block"]')?.querySelectorAll(".em-gap").forEach(A=>{if(!A.querySelector(".em-element-resize-height")){const L=A,C=z({targetElement:L,insertType:"append",className:"em-element-resize-height"});z({targetElement:L,insertType:"append",className:"em-element-gap-marker"}),z({targetElement:L,insertType:"append",className:"em-element-gap-bg"});const O=z({targetElement:L,insertType:"append",className:"em-element-gap"});let E="";o?(E=L.style.height,Vt(C,function(m){Wt(C,m.movementY)},function(){Ut(C)})):(E=L.style.width,Rn(C,function(m){Nr(C,m.movementX)},function(){Mr(C)})),z({targetElement:O,insertType:"append",className:"em-element-gap-value",HTMLcontent:E})}})}if(e.tagName==="IMG"){const g=e;if(g.closest("td[em-platform], td[data-em-platform]"))return;if(g.closest(".em-element-resize-img-container")||g.closest('div[style*="font-size"][style*="line-height"][style*="font-family"]')||g.closest("editor")||g.classList.contains("em-video")){if(g.closest(".em-element-resize-img-container")){const C=g.closest(".em-element-resize-img-container"),O=C.querySelector(".em-element-img-edit");!g.getAttribute("src")?.includes(".gif")&&i?O||z({targetElement:C.querySelector(".em-element-img-change-group"),insertType:"prepend",className:"em-element-img-edit",tag:"i",HTMLcontent:yo(ml,`${oi}`),title:t.CHANGE_IMAGE_EDIT}):C.querySelector(".em-element-img-edit")?.remove()}return}const y=document.createElement("span");y.classList.add("em-element-resize-img-container");const A=g.parentElement instanceof HTMLAnchorElement?g.parentElement:g;A.parentElement?.insertBefore(y,A),y.appendChild(A);const L=z({targetElement:y,insertType:"append",tag:"span",className:"em-element-resize-img"});TN(L,function(C){Nr(L,C.movementX)},function(){Mr(L)}),g?.style.maxWidth&&g?.style.display==="block"&&g.closest(".em-element-resize-img-container")?.classList.add("em-display-block"),Gm(g,y)}}}function Gm(e,t){const r=vo;if(!r||t.querySelector(".em-element-img-change-group"))return;const n=r.getLocale(),i=zN(),o=qm(),s=VN(),a=WN(),l=UN();if(i&&e.getBoundingClientRect().width>40&&e.getBoundingClientRect().height>40&&!e.classList.contains("em-countdown")){const c=z({targetElement:t,insertType:"append",className:"em-element-img-change-group"});if(z({targetElement:c,insertType:"append",className:"em-element-img-change",HTMLcontent:'<svg viewBox="0 0 20 20" focusable="false" data-icon="bg-colors" width="1em" height="1em" fill="currentColor" aria-hidden="true"><path d="M3.75 17.5C3.41667 17.5 3.125 17.375 2.875 17.125C2.625 16.875 2.5 16.5833 2.5 16.25V3.75C2.5 3.41667 2.625 3.125 2.875 2.875C3.125 2.625 3.41667 2.5 3.75 2.5H16.25C16.5833 2.5 16.875 2.625 17.125 2.875C17.375 3.125 17.5 3.41667 17.5 3.75V16.25C17.5 16.5833 17.375 16.875 17.125 17.125C16.875 17.375 16.5833 17.5 16.25 17.5H3.75ZM3.75 16.25H16.25V3.75H3.75V16.25ZM4.91667 14.2292H15.1042L12.0417 10.1458L9.29167 13.7083L7.35417 11.0625L4.91667 14.2292Z"></path></svg>',title:n.CHANGE_IMAGE}),!e.getAttribute("src")?.includes(".gif")&&o&&z({targetElement:c,insertType:"append",className:"em-element-img-edit",tag:"i",HTMLcontent:yo(ml,`${oi}`),title:n.CHANGE_IMAGE_EDIT}),s&&z({targetElement:c,insertType:"append",className:"em-element-img-stock",tag:"i",HTMLcontent:'<svg viewBox="0 0 12 12" focusable="false" data-icon="ai" width="1em" height="1em" fill="currentColor" aria-hidden="true"><path d="M4.12726 7.18183H9.6909L7.86364 4.76364L6.44545 6.63637L5.4909 5.49092L4.12726 7.18183ZM0.909082 11.3636C0.659082 11.3636 0.445068 11.2746 0.267041 11.0966C0.0890136 10.9186 0 10.7046 0 10.4546V2.99999H0.909082V10.4546H10.7273V11.3636H0.909082ZM2.72726 9.54546C2.47726 9.54546 2.26325 9.45644 2.08522 9.27842C1.90719 9.10039 1.81818 8.88638 1.81818 8.63638V1.90908C1.81818 1.65908 1.90719 1.44507 2.08522 1.26704C2.26325 1.08901 2.47726 1 2.72726 1H5.81817L6.90908 2.09091H11.0909C11.3409 2.09091 11.5549 2.17992 11.733 2.35795C11.911 2.53598 12 2.74999 12 2.99999V8.63638C12 8.88638 11.911 9.10039 11.733 9.27842C11.5549 9.45644 11.3409 9.54546 11.0909 9.54546H2.72726ZM2.72726 8.63638H11.0909V2.99999H6.53182L5.44091 1.90908H2.72726V8.63638Z"></path></svg>',title:n.CHANGE_IMAGE_STOCK}),z({targetElement:c,insertType:"append",className:"em-element-img-changeto",tag:"i",HTMLcontent:yo(BN,`${oi}`),title:n.CHANGE_IMAGE_CHANGETO}),a&&z({targetElement:c,insertType:"append",className:"em-element-img-gif",tag:"i",HTMLcontent:'<svg viewBox="0 0 12 12" focusable="false" data-icon="ai" width="1em" height="1em" fill="currentColor" aria-hidden="true"><<path d="M5.68571 8.14286V3H6.79999V8.14286H5.68571ZM0.771429 8.14286C0.54 8.14286 0.353571 8.06786 0.212143 7.91786C0.0707142 7.76786 0 7.58571 0 7.37143V3.77143C0 3.55714 0.0707142 3.375 0.212143 3.225C0.353571 3.075 0.54 3 0.771429 3H3.40001C3.63144 3 3.81786 3.075 3.95929 3.225C4.10072 3.375 4.17144 3.55714 4.17144 3.77143V4.11429H1.11429V7.02857H3.05715V5.57143H4.17144V7.37143C4.17144 7.58571 4.10072 7.76786 3.95929 7.91786C3.81786 8.06786 3.63144 8.14286 3.40001 8.14286H0.771429ZM8.25714 8.14286V3H12V4.11429H9.37142V5.25714H11.1V6.37142H9.37142V8.14286H8.25714Z"></path></svg>',title:n.CHANGE_IMAGE_GIF}),l&&z({targetElement:c,insertType:"append",className:"em-element-img-ai",tag:"i",HTMLcontent:'<svg viewBox="0 0 12 12" focusable="false" data-icon="ai" width="1em" height="1em" fill="currentColor" aria-hidden="true"><path d="M2.45454 11.7273C2.45454 11.7273 2.16994 10.446 1.66154 9.88113C1.15314 9.31625 0 9 0 9C0 9 1.15314 8.68374 1.66154 8.11887C2.16994 7.554 2.45454 6.27273 2.45454 6.27273C2.45454 6.27273 2.73915 7.554 3.24755 8.11887C3.75594 8.68374 4.90909 9 4.90909 9C4.90909 9 3.75594 9.31625 3.24755 9.88113C2.73915 10.446 2.45454 11.7273 2.45454 11.7273Z"></path><path d="M7.63636 9C7.63636 9 7.1304 6.94996 6.22658 6.04614C5.32276 5.14233 3.27273 4.63636 3.27273 4.63636C3.27273 4.63636 5.32276 4.1304 6.22658 3.22657C7.1304 2.32275 7.63636 0.272728 7.63636 0.272728C7.63636 0.272728 8.14233 2.32275 9.04615 3.22657C9.94996 4.1304 12 4.63636 12 4.63636C12 4.63636 9.94996 5.14233 9.04615 6.04614C8.14233 6.94996 7.63636 9 7.63636 9Z"></path><path d="M1.63636 4.09091C1.63636 4.09091 1.44663 3.19402 1.10769 2.7986C0.768758 2.40318 0 2.18182 0 2.18182C0 2.18182 0.768758 1.96046 1.10769 1.56503C1.44663 1.16961 1.63636 0.272728 1.63636 0.272728C1.63636 0.272728 1.8261 1.16961 2.16503 1.56503C2.50397 1.96046 3.27273 2.18182 3.27273 2.18182C3.27273 2.18182 2.50397 2.40318 2.16503 2.7986C1.8261 3.19402 1.63636 4.09091 1.63636 4.09091Z"></path><path d="M10.6364 11.7273C10.6364 11.7273 10.4782 11.0866 10.1958 10.8042C9.91336 10.5218 9.27273 10.3636 9.27273 10.3636C9.27273 10.3636 9.91336 10.2055 10.1958 9.92307C10.4782 9.64064 10.6364 9 10.6364 9C10.6364 9 10.7945 9.64064 11.0769 9.92307C11.3594 10.2055 12 10.3636 12 10.3636C12 10.3636 11.3594 10.5218 11.0769 10.8042C10.7945 11.0866 10.6364 11.7273 10.6364 11.7273Z"></path></svg>',title:n.CHANGE_IMAGE_AI}),r.commit(!1),Um.has(c))return;Um.add(c),c.addEventListener("click",function(u){const d=u.target.closest('i[class*="em-element-img"]'),h=e.getAttribute("src");let f="application_open-image-edit-popup";e.classList.contains("em-ai-img")||d?.classList.contains("em-element-img-ai")?f="application_open-image-ai-popup":tO(h)||d?.classList.contains("em-element-img-changeto")?f="application_open-image-upload-popup":d?.classList.contains("em-element-img-gif")?f="application_open-image-gif-popup":d?.classList.contains("em-element-img-stock")&&(f="application_open-image-stock-popup");const g={operation:f,src:h};setTimeout(()=>{r.messageService.send(g)},100)})}}function GN(){return document.body?.classList.contains("em-sandbox-discuss")&&!document.body.classList.contains("em-sandbox-discuss_set-target")}function XN(){return document.body?.classList.contains("em-sandbox-discuss_set-target")??!1}function YN(e){const t=e.getAttribute("em-discuss-id");return t&&X.send({operation:"application_discuss_get_comment",settings:{targetId:t}}),!1}function KN(e,t){let r=e;const n=r.getAttribute("em-discuss-id"),i=r.classList.contains("em-discuss-id-new");if(!n||n&&i){if(document.querySelectorAll(".em-discuss-id-new").forEach(o=>{o!==r&&(o.removeAttribute("em-discuss-id"),o.removeAttribute("contenteditable"),o.removeAttribute("em-edit"))}),r.tagName==="EDITOR"&&(r=r.parentElement),r.getAttribute("em-discuss-id"))r.removeAttribute("em-discuss-id"),r.removeAttribute("contenteditable"),r.removeAttribute("em-edit"),X.send({operation:"application_discuss_set_id",settings:{value:""}});else{const o=t.makeId(5);r.setAttribute("em-discuss-id",o),r.setAttribute("em-edit","active"),r.setAttribute("contenteditable","true"),r.classList.add("em-discuss-id-new"),X.send({operation:"application_discuss_set_id",settings:{value:o}})}t.commit()}return{handled:!0,newClickedElement:r}}Object.defineProperty(_,"AppImpl",{enumerable:!0,get:function(){return qi}}),Object.defineProperty(_,"CLASS_BACKGROUND_ACTIVE_CELL",{enumerable:!0,get:function(){return Bv}}),Object.defineProperty(_,"CLASS_FOR_BASIC_CELL",{enumerable:!0,get:function(){return Dv}}),Object.defineProperty(_,"CLASS_FOR_BASIC_ROW",{enumerable:!0,get:function(){return Iv}}),Object.defineProperty(_,"CLASS_NAME_OL",{enumerable:!0,get:function(){return Un}}),Object.defineProperty(_,"CLASS_NAME_UL",{enumerable:!0,get:function(){return qn}}),Object.defineProperty(_,"DEFAULT_LINK_COLOR",{enumerable:!0,get:function(){return Hb}}),Object.defineProperty(_,"DOCUMENT_MAPPING_ID",{enumerable:!0,get:function(){return Qo}}),Object.defineProperty(_,"Disposable",{enumerable:!0,get:function(){return Z}}),Object.defineProperty(_,"EVENT_TYPES",{enumerable:!0,get:function(){return me}}),Object.defineProperty(_,"HTML_DOCUMENT_ID",{enumerable:!0,get:function(){return Xo}}),Object.defineProperty(_,"ICON_ROLE",{enumerable:!0,get:function(){return ii}}),Object.defineProperty(_,"ICON_SIZE",{enumerable:!0,get:function(){return oi}}),Object.defineProperty(_,"IMAGE_CACHE_ID",{enumerable:!0,get:function(){return Zo}}),Object.defineProperty(_,"LIST_REGEX",{enumerable:!0,get:function(){return xv}}),Object.defineProperty(_,"LIST_TEMP_CLASSES",{enumerable:!0,get:function(){return Fc}}),Object.defineProperty(_,"Node",{enumerable:!0,get:function(){return Oe}}),Object.defineProperty(_,"NodeType",{enumerable:!0,get:function(){return I}}),Object.defineProperty(_,"REMOTE_DOCUMENT_ID",{enumerable:!0,get:function(){return Yo}}),Object.defineProperty(_,"STANDARD_LIST_CONTAINER_SELECTOR",{enumerable:!0,get:function(){return rg}}),Object.defineProperty(_,"STANDARD_LIST_CONTAINER_TAGS",{enumerable:!0,get:function(){return tg}}),Object.defineProperty(_,"STANDARD_LIST_STYLES",{enumerable:!0,get:function(){return ng}}),Object.defineProperty(_,"TABLE_LIST_SELECTOR",{enumerable:!0,get:function(){return eg}}),Object.defineProperty(_,"TEMPORARY_ACTIVE_CELL_BACKGROUND_COLOR",{enumerable:!0,get:function(){return ps}}),Object.defineProperty(_,"TEMPORARY_CELL_CLASS",{enumerable:!0,get:function(){return jv}}),Object.defineProperty(_,"TEMPORARY_CLASS",{enumerable:!0,get:function(){return Fv}}),Object.defineProperty(_,"TEXT_DOCUMENT_ID",{enumerable:!0,get:function(){return Ko}}),Object.defineProperty(_,"UpdateQueue",{enumerable:!0,get:function(){return vO}}),Object.defineProperty(_,"__vitePreload",{enumerable:!0,get:function(){return gs}}),Object.defineProperty(_,"_defineProperty",{enumerable:!0,get:function(){return k}}),Object.defineProperty(_,"addBlockToProject",{enumerable:!0,get:function(){return fN}}),Object.defineProperty(_,"addClassToSecondCell",{enumerable:!0,get:function(){return Pg}}),Object.defineProperty(_,"addElement",{enumerable:!0,get:function(){return z}}),Object.defineProperty(_,"addFontFamilyClass",{enumerable:!0,get:function(){return Qh}}),Object.defineProperty(_,"addNewRange",{enumerable:!0,get:function(){return Cp}}),Object.defineProperty(_,"applyAttributesToTag",{enumerable:!0,get:function(){return BP}}),Object.defineProperty(_,"applyProjectFontInlineFallback",{enumerable:!0,get:function(){return Gh}}),Object.defineProperty(_,"applyVMLBackgroundToggle",{enumerable:!0,get:function(){return _y}}),Object.defineProperty(_,"arrow_down_solid_default",{enumerable:!0,get:function(){return kN}}),Object.defineProperty(_,"arrow_up_solid_default",{enumerable:!0,get:function(){return LN}}),Object.defineProperty(_,"attachFocusService",{enumerable:!0,get:function(){return Bp}}),Object.defineProperty(_,"braille_solid_default",{enumerable:!0,get:function(){return ON}}),Object.defineProperty(_,"buildEmFontClassName",{enumerable:!0,get:function(){return Zn}}),Object.defineProperty(_,"captionByRules",{enumerable:!0,get:function(){return uP}}),Object.defineProperty(_,"changeBullets",{enumerable:!0,get:function(){return og}}),Object.defineProperty(_,"changeBulletsColor",{enumerable:!0,get:function(){return sg}}),Object.defineProperty(_,"changeBulletsItalic",{enumerable:!0,get:function(){return cg}}),Object.defineProperty(_,"changeBulletsSize",{enumerable:!0,get:function(){return ag}}),Object.defineProperty(_,"changeBulletsStrikethrough",{enumerable:!0,get:function(){return dg}}),Object.defineProperty(_,"changeBulletsUnderline",{enumerable:!0,get:function(){return ug}}),Object.defineProperty(_,"changeBulletsWeight",{enumerable:!0,get:function(){return lg}}),Object.defineProperty(_,"checkBlockAdaptivity",{enumerable:!0,get:function(){return uN}}),Object.defineProperty(_,"checkForTextNodes",{enumerable:!0,get:function(){return Fm}}),Object.defineProperty(_,"checkForWorkClass",{enumerable:!0,get:function(){return kP}}),Object.defineProperty(_,"checkIsEditorInited",{enumerable:!0,get:function(){return VP}}),Object.defineProperty(_,"checkSandboxStyles",{enumerable:!0,get:function(){return IN}}),Object.defineProperty(_,"clearActiveEditElements",{enumerable:!0,get:function(){return WP}}),Object.defineProperty(_,"clearLinkTags",{enumerable:!0,get:function(){return vn}}),Object.defineProperty(_,"clearPendingPaletteInsert",{enumerable:!0,get:function(){return Bc}}),Object.defineProperty(_,"clearProjectFontFaces",{enumerable:!0,get:function(){return yn}}),Object.defineProperty(_,"commit",{enumerable:!0,get:function(){return Np}}),Object.defineProperty(_,"commitLockedAsync",{enumerable:!0,get:function(){return Mp}}),Object.defineProperty(_,"commonStylesApply",{enumerable:!0,get:function(){return ax}}),Object.defineProperty(_,"commonStylesApplyToBlock",{enumerable:!0,get:function(){return lx}}),Object.defineProperty(_,"compareStrings",{enumerable:!0,get:function(){return wp}}),Object.defineProperty(_,"container",{enumerable:!0,get:function(){return Yi}}),Object.defineProperty(_,"copy_solid_default",{enumerable:!0,get:function(){return xN}}),Object.defineProperty(_,"createBeforeInputHandler",{enumerable:!0,get:function(){return Uy}}),Object.defineProperty(_,"createFontClassName",{enumerable:!0,get:function(){return Cb}}),Object.defineProperty(_,"createHandleChangesWithRemovedElementsOnly",{enumerable:!0,get:function(){return OO}}),Object.defineProperty(_,"createMapObj",{enumerable:!0,get:function(){return wO}}),Object.defineProperty(_,"createWrapEditor",{enumerable:!0,get:function(){return Wy}}),Object.defineProperty(_,"darkMode",{enumerable:!0,get:function(){return Ch}}),Object.defineProperty(_,"decrementLock",{enumerable:!0,get:function(){return Ip}}),Object.defineProperty(_,"defaultVisibleTextMapFn",{enumerable:!0,get:function(){return DP}}),Object.defineProperty(_,"discuss_default",{enumerable:!0,get:function(){return zv}}),Object.defineProperty(_,"display_default",{enumerable:!0,get:function(){return HL}}),Object.defineProperty(_,"editConditionalComment",{enumerable:!0,get:function(){return jr}}),Object.defineProperty(_,"emFilter",{enumerable:!0,get:function(){return bn}}),Object.defineProperty(_,"emFilterCSS",{enumerable:!0,get:function(){return jL}}),Object.defineProperty(_,"extractTableRowData",{enumerable:!0,get:function(){return gg}}),Object.defineProperty(_,"findElementWithSelectedText",{enumerable:!0,get:function(){return kl}}),Object.defineProperty(_,"findForeignButtonSpan",{enumerable:!0,get:function(){return us}}),Object.defineProperty(_,"findOutermostParentWithText",{enumerable:!0,get:function(){return kp}}),Object.defineProperty(_,"findParentTr",{enumerable:!0,get:function(){return Cl}}),Object.defineProperty(_,"findParentWithExplicitStyle",{enumerable:!0,get:function(){return Mb}}),Object.defineProperty(_,"findParentWithExplicitStyle$1",{enumerable:!0,get:function(){return Ap}}),Object.defineProperty(_,"findParentWithFontSizeAndTag",{enumerable:!0,get:function(){return RP}}),Object.defineProperty(_,"findRoundrectComment",{enumerable:!0,get:function(){return Jt}}),Object.defineProperty(_,"fontFamilyValues",{enumerable:!0,get:function(){return cc}}),Object.defineProperty(_,"fontValues",{enumerable:!0,get:function(){return Jn}}),Object.defineProperty(_,"formatCellOneText",{enumerable:!0,get:function(){return Tg}}),Object.defineProperty(_,"getActiveEditElement",{enumerable:!0,get:function(){return zP}}),Object.defineProperty(_,"getAllComments",{enumerable:!0,get:function(){return fv}}),Object.defineProperty(_,"getCursorPositionType",{enumerable:!0,get:function(){return pg}}),Object.defineProperty(_,"getElementBorder",{enumerable:!0,get:function(){return nc}}),Object.defineProperty(_,"getElementBorderRadius",{enumerable:!0,get:function(){return ic}}),Object.defineProperty(_,"getElementBoxShadow",{enumerable:!0,get:function(){return oc}}),Object.defineProperty(_,"getElementInnerHTML",{enumerable:!0,get:function(){return Se}}),Object.defineProperty(_,"getElementMobileProps",{enumerable:!0,get:function(){return ts}}),Object.defineProperty(_,"getElementParent",{enumerable:!0,get:function(){return Wm}}),Object.defineProperty(_,"getElementTdDiv",{enumerable:!0,get:function(){return yN}}),Object.defineProperty(_,"getFontFamilyFromElement",{enumerable:!0,get:function(){return xP}}),Object.defineProperty(_,"getFontFamilyFromElement$1",{enumerable:!0,get:function(){return xb}}),Object.defineProperty(_,"getHtmlDocument",{enumerable:!0,get:function(){return Oo}}),Object.defineProperty(_,"getHtmlPartsAtCursor",{enumerable:!0,get:function(){return Lg}}),Object.defineProperty(_,"getLineHeightInPixels",{enumerable:!0,get:function(){return OP}}),Object.defineProperty(_,"getLineHeightInPixels$1",{enumerable:!0,get:function(){return Ob}}),Object.defineProperty(_,"getListBullet",{enumerable:!0,get:function(){return Nv}}),Object.defineProperty(_,"getListContainer",{enumerable:!0,get:function(){return Mv}}),Object.defineProperty(_,"getListContext",{enumerable:!0,get:function(){return Pv}}),Object.defineProperty(_,"getOrCreateAfterSpan",{enumerable:!0,get:function(){return EP}}),Object.defineProperty(_,"getOuterHtml",{enumerable:!0,get:function(){return Mt}}),Object.defineProperty(_,"getParentElementOfSelection",{enumerable:!0,get:function(){return Rb}}),Object.defineProperty(_,"getParentElementOfSelection$1",{enumerable:!0,get:function(){return Tl}}),Object.defineProperty(_,"getPendingPaletteInsert",{enumerable:!0,get:function(){return vv}}),Object.defineProperty(_,"getProjectFontEntries",{enumerable:!0,get:function(){return GO}}),Object.defineProperty(_,"getProjectFontFaces",{enumerable:!0,get:function(){return ja}}),Object.defineProperty(_,"getRangeFromSelection",{enumerable:!0,get:function(){return PP}}),Object.defineProperty(_,"getSelectedText",{enumerable:!0,get:function(){return AO}}),Object.defineProperty(_,"getSimpleBorderType",{enumerable:!0,get:function(){return Bb}}),Object.defineProperty(_,"getStructureColumns",{enumerable:!0,get:function(){return vN}}),Object.defineProperty(_,"getTagNameForContainer",{enumerable:!0,get:function(){return IP}}),Object.defineProperty(_,"getTextPartsAtCursor",{enumerable:!0,get:function(){return vg}}),Object.defineProperty(_,"getVariableByIcon",{enumerable:!0,get:function(){return gv}}),Object.defineProperty(_,"getVariableIcon",{enumerable:!0,get:function(){return pv}}),Object.defineProperty(_,"getVisibleText",{enumerable:!0,get:function(){return jm}}),Object.defineProperty(_,"handleAddBlockMenu",{enumerable:!0,get:function(){return sN}}),Object.defineProperty(_,"handleAddGroup",{enumerable:!0,get:function(){return tN}}),Object.defineProperty(_,"handleArrowRight",{enumerable:!0,get:function(){return Tv}}),Object.defineProperty(_,"handleCloneAtom",{enumerable:!0,get:function(){return qP}}),Object.defineProperty(_,"handleCloneBlock",{enumerable:!0,get:function(){return GP}}),Object.defineProperty(_,"handleCloneGroup",{enumerable:!0,get:function(){return rN}}),Object.defineProperty(_,"handleDeleteKey",{enumerable:!0,get:function(){return Av}}),Object.defineProperty(_,"handleDiscussGetTarget",{enumerable:!0,get:function(){return Wc}}),Object.defineProperty(_,"handleDiscussRemoveTarget",{enumerable:!0,get:function(){return zc}}),Object.defineProperty(_,"handleDiscussReset",{enumerable:!0,get:function(){return Vc}}),Object.defineProperty(_,"handleDiscussSetTarget",{enumerable:!0,get:function(){return Hc}}),Object.defineProperty(_,"handleDiscussSetTargetClick",{enumerable:!0,get:function(){return KN}}),Object.defineProperty(_,"handleDiscussViewClick",{enumerable:!0,get:function(){return YN}}),Object.defineProperty(_,"handleDragCancel",{enumerable:!0,get:function(){return Dh}}),Object.defineProperty(_,"handleEnterForBr",{enumerable:!0,get:function(){return kv}}),Object.defineProperty(_,"handleEscapeKey",{enumerable:!0,get:function(){return Cv}}),Object.defineProperty(_,"handleLockDiscuss",{enumerable:!0,get:function(){return $c}}),Object.defineProperty(_,"handleMergeBlocks",{enumerable:!0,get:function(){return QP}}),Object.defineProperty(_,"handleMoveBlockDown",{enumerable:!0,get:function(){return YP}}),Object.defineProperty(_,"handleMoveBlockUp",{enumerable:!0,get:function(){return XP}}),Object.defineProperty(_,"handleMoveGroupDown",{enumerable:!0,get:function(){return eN}}),Object.defineProperty(_,"handleMoveGroupUp",{enumerable:!0,get:function(){return JP}}),Object.defineProperty(_,"handleRemoveAtom",{enumerable:!0,get:function(){return UP}}),Object.defineProperty(_,"handleRemoveBlock",{enumerable:!0,get:function(){return KP}}),Object.defineProperty(_,"handleRemoveGroup",{enumerable:!0,get:function(){return nN}}),Object.defineProperty(_,"handleSaveHotkey",{enumerable:!0,get:function(){return _v}}),Object.defineProperty(_,"handleToggleEditorHotkey",{enumerable:!0,get:function(){return wv}}),Object.defineProperty(_,"handleUndoRedoHotkey",{enumerable:!0,get:function(){return Sv}}),Object.defineProperty(_,"handleUnmergeBlocks",{enumerable:!0,get:function(){return ZP}}),Object.defineProperty(_,"handleVMLButtonInput",{enumerable:!0,get:function(){return Lv}}),Object.defineProperty(_,"handleVMLButtonText",{enumerable:!0,get:function(){return Ov}}),Object.defineProperty(_,"hasClosestTrWithClass",{enumerable:!0,get:function(){return fg}}),Object.defineProperty(_,"hasElementVMLBackground",{enumerable:!0,get:function(){return is}}),Object.defineProperty(_,"hasForeignButtonStructure",{enumerable:!0,get:function(){return Ly}}),Object.defineProperty(_,"hasLinkInSelection",{enumerable:!0,get:function(){return Ib}}),Object.defineProperty(_,"hasOnlyTextNodesDeep",{enumerable:!0,get:function(){return Al}}),Object.defineProperty(_,"hasPendingPaletteAtom",{enumerable:!0,get:function(){return Ev}}),Object.defineProperty(_,"hasProjectFonts",{enumerable:!0,get:function(){return qO}}),Object.defineProperty(_,"hasTextNodeInElement",{enumerable:!0,get:function(){return jP}}),Object.defineProperty(_,"icon",{enumerable:!0,get:function(){return yo}}),Object.defineProperty(_,"implementImageControls",{enumerable:!0,get:function(){return Gm}}),Object.defineProperty(_,"implementPolyfills",{enumerable:!0,get:function(){return yl}}),Object.defineProperty(_,"implementResizableElems",{enumerable:!0,get:function(){return qN}}),Object.defineProperty(_,"incrementLock",{enumerable:!0,get:function(){return Dp}}),Object.defineProperty(_,"initDocuments",{enumerable:!0,get:function(){return Pp}}),Object.defineProperty(_,"initFocusManager",{enumerable:!0,get:function(){return Fp}}),Object.defineProperty(_,"initResizableElements",{enumerable:!0,get:function(){return jN}}),Object.defineProperty(_,"initResizer",{enumerable:!0,get:function(){return CN}}),Object.defineProperty(_,"initSandboxStyles",{enumerable:!0,get:function(){return DN}}),Object.defineProperty(_,"initSortable",{enumerable:!0,get:function(){return jx}}),Object.defineProperty(_,"injectTextIntoFirstDiv",{enumerable:!0,get:function(){return bg}}),Object.defineProperty(_,"insertAdjacentHTML",{enumerable:!0,get:function(){return Yl}}),Object.defineProperty(_,"insertCountdown",{enumerable:!0,get:function(){return lN}}),Object.defineProperty(_,"insertRowRelativeToDivClass",{enumerable:!0,get:function(){return _g}}),Object.defineProperty(_,"isAddBlockMenuClick",{enumerable:!0,get:function(){return oN}}),Object.defineProperty(_,"isCaretAtEndOfEmReplace",{enumerable:!0,get:function(){return SP}}),Object.defineProperty(_,"isCaretAtEndOfStandardElement",{enumerable:!0,get:function(){return wP}}),Object.defineProperty(_,"isClickAtEndOfEmReplace",{enumerable:!0,get:function(){return vP}}),Object.defineProperty(_,"isComment",{enumerable:!0,get:function(){return Ss}}),Object.defineProperty(_,"isDiscussSetTargetMode",{enumerable:!0,get:function(){return XN}}),Object.defineProperty(_,"isDiscussViewMode",{enumerable:!0,get:function(){return GN}}),Object.defineProperty(_,"isEditorContentOnlyNbsp",{enumerable:!0,get:function(){return HP}}),Object.defineProperty(_,"isEditorContentOnlyNbsp$1",{enumerable:!0,get:function(){return bP}}),Object.defineProperty(_,"isElementHasBold",{enumerable:!0,get:function(){return Nb}}),Object.defineProperty(_,"isElementHasBold$1",{enumerable:!0,get:function(){return Tp}}),Object.defineProperty(_,"isElementLocked",{enumerable:!0,get:function(){return Rp}}),Object.defineProperty(_,"isInitialized",{enumerable:!0,get:function(){return xo}}),Object.defineProperty(_,"isJsonString",{enumerable:!0,get:function(){return Sp}}),Object.defineProperty(_,"isPathElementByRules",{enumerable:!0,get:function(){return cP}}),Object.defineProperty(_,"isRangeCoveringAllVisibleText",{enumerable:!0,get:function(){return yP}}),Object.defineProperty(_,"isShowOnMobile",{enumerable:!0,get:function(){return Db}}),Object.defineProperty(_,"isSrcElement",{enumerable:!0,get:function(){return ou}}),Object.defineProperty(_,"isTableElement",{enumerable:!0,get:function(){return kE}}),Object.defineProperty(_,"isTextNode",{enumerable:!0,get:function(){return hi}}),Object.defineProperty(_,"isVariableComment",{enumerable:!0,get:function(){return Dc}}),Object.defineProperty(_,"isVariableText",{enumerable:!0,get:function(){return Rc}}),Object.defineProperty(_,"logProjectFonts",{enumerable:!0,get:function(){return Ft}}),Object.defineProperty(_,"makeId",{enumerable:!0,get:function(){return Lp}}),Object.defineProperty(_,"markProjectFontClass",{enumerable:!0,get:function(){return Tb}}),Object.defineProperty(_,"messageService",{enumerable:!0,get:function(){return X}}),Object.defineProperty(_,"minifyStylesheet",{enumerable:!0,get:function(){return xa}}),Object.defineProperty(_,"modifyHtml",{enumerable:!0,get:function(){return kg}}),Object.defineProperty(_,"normalizeSpaces",{enumerable:!0,get:function(){return zn}}),Object.defineProperty(_,"object_group_solid_default",{enumerable:!0,get:function(){return PN}}),Object.defineProperty(_,"parseFromString",{enumerable:!0,get:function(){return xe}}),Object.defineProperty(_,"parseTableToArray",{enumerable:!0,get:function(){return Sg}}),Object.defineProperty(_,"pen_solid_default",{enumerable:!0,get:function(){return ml}}),Object.defineProperty(_,"plus_solid_default",{enumerable:!0,get:function(){return NN}}),Object.defineProperty(_,"prepareEditorHTML",{enumerable:!0,get:function(){return $m}}),Object.defineProperty(_,"processTableText",{enumerable:!0,get:function(){return Og}}),Object.defineProperty(_,"provideAmp",{enumerable:!0,get:function(){return gP}}),Object.defineProperty(_,"provideAttributePipeline",{enumerable:!0,get:function(){return Sb}}),Object.defineProperty(_,"provideDocumentSync",{enumerable:!0,get:function(){return bO}}),Object.defineProperty(_,"provideEmVersion",{enumerable:!0,get:function(){return YL}}),Object.defineProperty(_,"provideFocus",{enumerable:!0,get:function(){return TP}}),Object.defineProperty(_,"provideImageCache",{enumerable:!0,get:function(){return pO}}),Object.defineProperty(_,"provideSandboxState",{enumerable:!0,get:function(){return yO}}),Object.defineProperty(_,"readFontFaceBlocks",{enumerable:!0,get:function(){return $a}}),Object.defineProperty(_,"registerCorrectVariableSelectionService",{enumerable:!0,get:function(){return bv}}),Object.defineProperty(_,"registerCrossDomainDD",{enumerable:!0,get:function(){return SO}}),Object.defineProperty(_,"registerExtensionScriptsService",{enumerable:!0,get:function(){return dL}}),Object.defineProperty(_,"registerLocalizationService",{enumerable:!0,get:function(){return MO}}),Object.defineProperty(_,"registerProjectFontsService",{enumerable:!0,get:function(){return KO}}),Object.defineProperty(_,"registerResetService",{enumerable:!0,get:function(){return Hx}}),Object.defineProperty(_,"registerResizeWatch",{enumerable:!0,get:function(){return $x}}),Object.defineProperty(_,"registerThemeVariablesService",{enumerable:!0,get:function(){return VO}}),Object.defineProperty(_,"removeAllAttributes",{enumerable:!0,get:function(){return Nl}}),Object.defineProperty(_,"removeBySelector",{enumerable:!0,get:function(){return be}}),Object.defineProperty(_,"removeClassesByPrefix",{enumerable:!0,get:function(){return $b}}),Object.defineProperty(_,"removeClassesByPrefix$1",{enumerable:!0,get:function(){return kb}}),Object.defineProperty(_,"removeEditorTags",{enumerable:!0,get:function(){return yg}}),Object.defineProperty(_,"removeEmptyParents",{enumerable:!0,get:function(){return Mn}}),Object.defineProperty(_,"removeFontFaceBlocks",{enumerable:!0,get:function(){return Yh}}),Object.defineProperty(_,"removeHiddenClasses",{enumerable:!0,get:function(){return Ra}}),Object.defineProperty(_,"removeLastWord",{enumerable:!0,get:function(){return $P}}),Object.defineProperty(_,"removeTemporaryListClasses",{enumerable:!0,get:function(){return Rv}}),Object.defineProperty(_,"removeTrContainingDivWithClass",{enumerable:!0,get:function(){return Eg}}),Object.defineProperty(_,"renumberCellOneText",{enumerable:!0,get:function(){return wg}}),Object.defineProperty(_,"replaceEmptyWithNbsp",{enumerable:!0,get:function(){return Ag}}),Object.defineProperty(_,"resolveActiveElement",{enumerable:!0,get:function(){return hc}}),Object.defineProperty(_,"rgbToHex",{enumerable:!0,get:function(){return ye}}),Object.defineProperty(_,"save_solid_default",{enumerable:!0,get:function(){return MN}}),Object.defineProperty(_,"sendResizeEvent",{enumerable:!0,get:function(){return Am}}),Object.defineProperty(_,"serializeOuterHtml",{enumerable:!0,get:function(){return zg}}),Object.defineProperty(_,"setBlockGroupControlsPosition",{enumerable:!0,get:function(){return hN}}),Object.defineProperty(_,"setBlockMaxWidth",{enumerable:!0,get:function(){return bN}}),Object.defineProperty(_,"setContrastBlock",{enumerable:!0,get:function(){return fy}}),Object.defineProperty(_,"setCursorInsideSpan",{enumerable:!0,get:function(){return _P}}),Object.defineProperty(_,"setCursorPositionSimple",{enumerable:!0,get:function(){return CP}}),Object.defineProperty(_,"setCursorToElement",{enumerable:!0,get:function(){return FP}}),Object.defineProperty(_,"setCustomColor",{enumerable:!0,get:function(){return LP}}),Object.defineProperty(_,"setDocumentStyles",{enumerable:!0,get:function(){return wb}}),Object.defineProperty(_,"setEditorFocus",{enumerable:!0,get:function(){return jp}}),Object.defineProperty(_,"setElementBorder",{enumerable:!0,get:function(){return sc}}),Object.defineProperty(_,"setElementBorderRadius",{enumerable:!0,get:function(){return ac}}),Object.defineProperty(_,"setElementBoxShadow",{enumerable:!0,get:function(){return Fb}}),Object.defineProperty(_,"setElementMobileAlign",{enumerable:!0,get:function(){return Jb}}),Object.defineProperty(_,"setElementMobileBackgroundColor",{enumerable:!0,get:function(){return ny}}),Object.defineProperty(_,"setElementMobileBackgroundImage",{enumerable:!0,get:function(){return iy}}),Object.defineProperty(_,"setElementMobileBackgroundPositionX",{enumerable:!0,get:function(){return oy}}),Object.defineProperty(_,"setElementMobileBackgroundPositionY",{enumerable:!0,get:function(){return sy}}),Object.defineProperty(_,"setElementMobileBackgroundRepeat",{enumerable:!0,get:function(){return ay}}),Object.defineProperty(_,"setElementMobileBackgroundSize",{enumerable:!0,get:function(){return ly}}),Object.defineProperty(_,"setElementMobileBorder",{enumerable:!0,get:function(){return Kb}}),Object.defineProperty(_,"setElementMobileBorderRadius",{enumerable:!0,get:function(){return Qb}}),Object.defineProperty(_,"setElementMobileBoxShadow",{enumerable:!0,get:function(){return Zb}}),Object.defineProperty(_,"setElementMobileContentWidth",{enumerable:!0,get:function(){return Yb}}),Object.defineProperty(_,"setElementMobileDirection",{enumerable:!0,get:function(){return ry}}),Object.defineProperty(_,"setElementMobileFontSize",{enumerable:!0,get:function(){return cy}}),Object.defineProperty(_,"setElementMobileHeight",{enumerable:!0,get:function(){return ri}}),Object.defineProperty(_,"setElementMobileLineHeight",{enumerable:!0,get:function(){return uy}}),Object.defineProperty(_,"setElementMobilePadding",{enumerable:!0,get:function(){return Wr}}),Object.defineProperty(_,"setElementMobileTableAlign",{enumerable:!0,get:function(){return ey}}),Object.defineProperty(_,"setElementMobileVerticalAlign",{enumerable:!0,get:function(){return ty}}),Object.defineProperty(_,"setElementMobileWidth",{enumerable:!0,get:function(){return Xb}}),Object.defineProperty(_,"setElementShow",{enumerable:!0,get:function(){return dy}}),Object.defineProperty(_,"setEmailBackgroundSettings",{enumerable:!0,get:function(){return Lb}}),Object.defineProperty(_,"setFloatBlocksWidth",{enumerable:!0,get:function(){return gN}}),Object.defineProperty(_,"setImageWidth",{enumerable:!0,get:function(){return aN}}),Object.defineProperty(_,"setPendingPaletteInsert",{enumerable:!0,get:function(){return yv}}),Object.defineProperty(_,"setPercentsForColumns",{enumerable:!0,get:function(){return Ll}}),Object.defineProperty(_,"setRenderedAttribute",{enumerable:!0,get:function(){return Fo}}),Object.defineProperty(_,"setStructureBlocksWidth",{enumerable:!0,get:function(){return fl}}),Object.defineProperty(_,"state",{enumerable:!0,get:function(){return _e}}),Object.defineProperty(_,"stickyCheck",{enumerable:!0,get:function(){return mN}}),Object.defineProperty(_,"stripButtonVML",{enumerable:!0,get:function(){return Iy}}),Object.defineProperty(_,"stripSubjectTags",{enumerable:!0,get:function(){return Xp}}),Object.defineProperty(_,"styleMenuElement",{enumerable:!0,get:function(){return Hv}}),Object.defineProperty(_,"styleMenuElementList",{enumerable:!0,get:function(){return $v}}),Object.defineProperty(_,"syncButtonVML",{enumerable:!0,get:function(){return Ac}}),Object.defineProperty(_,"takeEblockRootSavedToProject",{enumerable:!0,get:function(){return WL}}),Object.defineProperty(_,"textHasStyle",{enumerable:!0,get:function(){return NP}}),Object.defineProperty(_,"textHasStyle$1",{enumerable:!0,get:function(){return Pb}}),Object.defineProperty(_,"toEmFontClassToken",{enumerable:!0,get:function(){return zr}}),Object.defineProperty(_,"trash_alt_solid_default",{enumerable:!0,get:function(){return RN}}),Object.defineProperty(_,"unwrapForeignEditors",{enumerable:!0,get:function(){return kc}}),Object.defineProperty(_,"updateButtonVMLLabel",{enumerable:!0,get:function(){return cs}}),Object.defineProperty(_,"updateDivWithClassAndNbsp",{enumerable:!0,get:function(){return xg}}),Object.defineProperty(_,"updateTableNumbering",{enumerable:!0,get:function(){return Cg}}),Object.defineProperty(_,"updateTableStyle",{enumerable:!0,get:function(){return ig}}),Object.defineProperty(_,"uptimeCountdown",{enumerable:!0,get:function(){return cN}})});