@creaditor/web-starterkit 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (393) hide show
  1. package/README.md +92 -0
  2. package/dist/.gitkeep +0 -0
  3. package/dist/112.creaditor.bundle.js +94 -0
  4. package/dist/112.creaditor.bundle.js.gz +0 -0
  5. package/dist/1142.creaditor.bundle.js +1 -0
  6. package/dist/1142.creaditor.bundle.js.gz +0 -0
  7. package/dist/1260.creaditor.bundle.js +234 -0
  8. package/dist/1260.creaditor.bundle.js.gz +0 -0
  9. package/dist/1271.creaditor.bundle.js +439 -0
  10. package/dist/1271.creaditor.bundle.js.gz +0 -0
  11. package/dist/1317.creaditor.bundle.js +142 -0
  12. package/dist/1317.creaditor.bundle.js.LICENSE.txt +20 -0
  13. package/dist/1317.creaditor.bundle.js.LICENSE.txt.gz +0 -0
  14. package/dist/1317.creaditor.bundle.js.gz +0 -0
  15. package/dist/1334.creaditor.bundle.js +51 -0
  16. package/dist/1334.creaditor.bundle.js.gz +0 -0
  17. package/dist/1396.creaditor.bundle.js +1 -0
  18. package/dist/1396.creaditor.bundle.js.gz +0 -0
  19. package/dist/1452.creaditor.bundle.js +23 -0
  20. package/dist/1452.creaditor.bundle.js.gz +0 -0
  21. package/dist/1456.creaditor.bundle.js +73 -0
  22. package/dist/1456.creaditor.bundle.js.gz +0 -0
  23. package/dist/1529.creaditor.bundle.js +16 -0
  24. package/dist/1529.creaditor.bundle.js.gz +0 -0
  25. package/dist/1565.creaditor.bundle.js +1016 -0
  26. package/dist/1565.creaditor.bundle.js.gz +0 -0
  27. package/dist/168.creaditor.bundle.js +540 -0
  28. package/dist/168.creaditor.bundle.js.LICENSE.txt +10 -0
  29. package/dist/168.creaditor.bundle.js.LICENSE.txt.gz +0 -0
  30. package/dist/168.creaditor.bundle.js.gz +0 -0
  31. package/dist/170.creaditor.bundle.js +51 -0
  32. package/dist/170.creaditor.bundle.js.gz +0 -0
  33. package/dist/175.creaditor.bundle.js +75 -0
  34. package/dist/175.creaditor.bundle.js.gz +0 -0
  35. package/dist/1756.creaditor.bundle.js +1 -0
  36. package/dist/1756.creaditor.bundle.js.gz +0 -0
  37. package/dist/1936.creaditor.bundle.js +177 -0
  38. package/dist/1936.creaditor.bundle.js.LICENSE.txt +29 -0
  39. package/dist/1936.creaditor.bundle.js.LICENSE.txt.gz +0 -0
  40. package/dist/1936.creaditor.bundle.js.gz +0 -0
  41. package/dist/1972.creaditor.bundle.js +12 -0
  42. package/dist/1972.creaditor.bundle.js.gz +0 -0
  43. package/dist/2001.creaditor.bundle.js +318 -0
  44. package/dist/2001.creaditor.bundle.js.LICENSE.txt +11 -0
  45. package/dist/2001.creaditor.bundle.js.LICENSE.txt.gz +0 -0
  46. package/dist/2001.creaditor.bundle.js.gz +0 -0
  47. package/dist/211.creaditor.bundle.js +1 -0
  48. package/dist/211.creaditor.bundle.js.gz +0 -0
  49. package/dist/2112.creaditor.bundle.js +24 -0
  50. package/dist/2112.creaditor.bundle.js.gz +0 -0
  51. package/dist/2234.creaditor.bundle.js +1 -0
  52. package/dist/2234.creaditor.bundle.js.gz +0 -0
  53. package/dist/2298.creaditor.bundle.js +1 -0
  54. package/dist/2298.creaditor.bundle.js.gz +0 -0
  55. package/dist/235.creaditor.bundle.js +11 -0
  56. package/dist/235.creaditor.bundle.js.LICENSE.txt +17 -0
  57. package/dist/235.creaditor.bundle.js.LICENSE.txt.gz +0 -0
  58. package/dist/235.creaditor.bundle.js.gz +0 -0
  59. package/dist/2350.creaditor.bundle.js +23 -0
  60. package/dist/2350.creaditor.bundle.js.gz +0 -0
  61. package/dist/2377.creaditor.bundle.js +64 -0
  62. package/dist/2377.creaditor.bundle.js.gz +0 -0
  63. package/dist/2384.creaditor.bundle.js +46 -0
  64. package/dist/2384.creaditor.bundle.js.gz +0 -0
  65. package/dist/2397.creaditor.bundle.js +38 -0
  66. package/dist/2397.creaditor.bundle.js.gz +0 -0
  67. package/dist/2409.creaditor.bundle.js +36 -0
  68. package/dist/2409.creaditor.bundle.js.gz +0 -0
  69. package/dist/2438.creaditor.bundle.js +67 -0
  70. package/dist/2438.creaditor.bundle.js.gz +0 -0
  71. package/dist/2547.creaditor.bundle.js +6 -0
  72. package/dist/2547.creaditor.bundle.js.gz +0 -0
  73. package/dist/2550.creaditor.bundle.js +75 -0
  74. package/dist/2550.creaditor.bundle.js.LICENSE.txt +1 -0
  75. package/dist/2550.creaditor.bundle.js.gz +0 -0
  76. package/dist/2590.creaditor.bundle.js +7 -0
  77. package/dist/2590.creaditor.bundle.js.gz +0 -0
  78. package/dist/2706.creaditor.bundle.js +130 -0
  79. package/dist/2706.creaditor.bundle.js.LICENSE.txt +20 -0
  80. package/dist/2706.creaditor.bundle.js.LICENSE.txt.gz +0 -0
  81. package/dist/2706.creaditor.bundle.js.gz +0 -0
  82. package/dist/271.creaditor.bundle.js +99 -0
  83. package/dist/271.creaditor.bundle.js.gz +0 -0
  84. package/dist/2717.creaditor.bundle.js +407 -0
  85. package/dist/2717.creaditor.bundle.js.LICENSE.txt +23 -0
  86. package/dist/2717.creaditor.bundle.js.LICENSE.txt.gz +0 -0
  87. package/dist/2717.creaditor.bundle.js.gz +0 -0
  88. package/dist/2765.creaditor.bundle.js +1 -0
  89. package/dist/2765.creaditor.bundle.js.gz +0 -0
  90. package/dist/2773.creaditor.bundle.js +25 -0
  91. package/dist/2773.creaditor.bundle.js.gz +0 -0
  92. package/dist/2833.creaditor.bundle.js +23 -0
  93. package/dist/2833.creaditor.bundle.js.gz +0 -0
  94. package/dist/2834.creaditor.bundle.js +14 -0
  95. package/dist/2834.creaditor.bundle.js.LICENSE.txt +5 -0
  96. package/dist/2834.creaditor.bundle.js.gz +0 -0
  97. package/dist/2956.creaditor.bundle.js +40 -0
  98. package/dist/2956.creaditor.bundle.js.gz +0 -0
  99. package/dist/2963.creaditor.bundle.js +25 -0
  100. package/dist/2963.creaditor.bundle.js.gz +0 -0
  101. package/dist/307.creaditor.bundle.js +23 -0
  102. package/dist/307.creaditor.bundle.js.gz +0 -0
  103. package/dist/3095.creaditor.bundle.js +161 -0
  104. package/dist/3095.creaditor.bundle.js.gz +0 -0
  105. package/dist/3105.creaditor.bundle.js +1 -0
  106. package/dist/3105.creaditor.bundle.js.gz +0 -0
  107. package/dist/3233.creaditor.bundle.js +12 -0
  108. package/dist/3233.creaditor.bundle.js.gz +0 -0
  109. package/dist/3521.creaditor.bundle.js +12 -0
  110. package/dist/3521.creaditor.bundle.js.gz +0 -0
  111. package/dist/353.creaditor.bundle.js +9 -0
  112. package/dist/353.creaditor.bundle.js.gz +0 -0
  113. package/dist/3545.creaditor.bundle.js +1 -0
  114. package/dist/3545.creaditor.bundle.js.gz +0 -0
  115. package/dist/3553.creaditor.bundle.js +60 -0
  116. package/dist/3553.creaditor.bundle.js.gz +0 -0
  117. package/dist/3606.creaditor.bundle.js +113 -0
  118. package/dist/3606.creaditor.bundle.js.gz +0 -0
  119. package/dist/365.creaditor.bundle.js +26 -0
  120. package/dist/365.creaditor.bundle.js.gz +0 -0
  121. package/dist/380.creaditor.bundle.js +186 -0
  122. package/dist/380.creaditor.bundle.js.gz +0 -0
  123. package/dist/3827.creaditor.bundle.js +13 -0
  124. package/dist/3827.creaditor.bundle.js.gz +0 -0
  125. package/dist/3875.creaditor.bundle.js +8 -0
  126. package/dist/3875.creaditor.bundle.js.gz +0 -0
  127. package/dist/3932.creaditor.bundle.js +30 -0
  128. package/dist/3932.creaditor.bundle.js.gz +0 -0
  129. package/dist/3971.creaditor.bundle.js +51 -0
  130. package/dist/3971.creaditor.bundle.js.gz +0 -0
  131. package/dist/4061.creaditor.bundle.js +1 -0
  132. package/dist/4061.creaditor.bundle.js.gz +0 -0
  133. package/dist/407.creaditor.bundle.js +21 -0
  134. package/dist/407.creaditor.bundle.js.gz +0 -0
  135. package/dist/4074.creaditor.bundle.js +33 -0
  136. package/dist/4074.creaditor.bundle.js.gz +0 -0
  137. package/dist/4100.creaditor.bundle.js +13 -0
  138. package/dist/4100.creaditor.bundle.js.gz +0 -0
  139. package/dist/4109.creaditor.bundle.js +2 -0
  140. package/dist/4109.creaditor.bundle.js.LICENSE.txt +1 -0
  141. package/dist/4109.creaditor.bundle.js.gz +0 -0
  142. package/dist/4114.creaditor.bundle.js +20 -0
  143. package/dist/4114.creaditor.bundle.js.gz +0 -0
  144. package/dist/4161.creaditor.bundle.js +21 -0
  145. package/dist/4161.creaditor.bundle.js.gz +0 -0
  146. package/dist/4186.creaditor.bundle.js +453 -0
  147. package/dist/4186.creaditor.bundle.js.LICENSE.txt +10 -0
  148. package/dist/4186.creaditor.bundle.js.LICENSE.txt.gz +0 -0
  149. package/dist/4186.creaditor.bundle.js.gz +0 -0
  150. package/dist/4217.creaditor.bundle.js +105 -0
  151. package/dist/4217.creaditor.bundle.js.gz +0 -0
  152. package/dist/4288.creaditor.bundle.js +98 -0
  153. package/dist/4288.creaditor.bundle.js.gz +0 -0
  154. package/dist/4413.creaditor.bundle.js +16 -0
  155. package/dist/4413.creaditor.bundle.js.gz +0 -0
  156. package/dist/4475.creaditor.bundle.js +16 -0
  157. package/dist/4475.creaditor.bundle.js.gz +0 -0
  158. package/dist/453.creaditor.bundle.js +114 -0
  159. package/dist/453.creaditor.bundle.js.gz +0 -0
  160. package/dist/4569.creaditor.bundle.js +1047 -0
  161. package/dist/4569.creaditor.bundle.js.gz +0 -0
  162. package/dist/4615.creaditor.bundle.js +14 -0
  163. package/dist/4615.creaditor.bundle.js.gz +0 -0
  164. package/dist/467.creaditor.bundle.js +23 -0
  165. package/dist/467.creaditor.bundle.js.gz +0 -0
  166. package/dist/4762.creaditor.bundle.js +53 -0
  167. package/dist/4762.creaditor.bundle.js.gz +0 -0
  168. package/dist/4770.creaditor.bundle.js +32 -0
  169. package/dist/4770.creaditor.bundle.js.gz +0 -0
  170. package/dist/4819.creaditor.bundle.js +407 -0
  171. package/dist/4819.creaditor.bundle.js.gz +0 -0
  172. package/dist/4947.creaditor.bundle.js +18 -0
  173. package/dist/4947.creaditor.bundle.js.gz +0 -0
  174. package/dist/4987.creaditor.bundle.js +171 -0
  175. package/dist/4987.creaditor.bundle.js.LICENSE.txt +11 -0
  176. package/dist/4987.creaditor.bundle.js.LICENSE.txt.gz +0 -0
  177. package/dist/4987.creaditor.bundle.js.gz +0 -0
  178. package/dist/4988.creaditor.bundle.js +6 -0
  179. package/dist/4988.creaditor.bundle.js.gz +0 -0
  180. package/dist/5133.creaditor.bundle.js +60 -0
  181. package/dist/5133.creaditor.bundle.js.gz +0 -0
  182. package/dist/5156.creaditor.bundle.js +93 -0
  183. package/dist/5156.creaditor.bundle.js.gz +0 -0
  184. package/dist/5284.creaditor.bundle.js +2 -0
  185. package/dist/5284.creaditor.bundle.js.LICENSE.txt +1 -0
  186. package/dist/5284.creaditor.bundle.js.gz +0 -0
  187. package/dist/5340.creaditor.bundle.js +66 -0
  188. package/dist/5340.creaditor.bundle.js.gz +0 -0
  189. package/dist/5391.creaditor.bundle.js +227 -0
  190. package/dist/5391.creaditor.bundle.js.gz +0 -0
  191. package/dist/5411.creaditor.bundle.js +27 -0
  192. package/dist/5411.creaditor.bundle.js.gz +0 -0
  193. package/dist/5428.creaditor.bundle.js +23 -0
  194. package/dist/5428.creaditor.bundle.js.gz +0 -0
  195. package/dist/5501.creaditor.bundle.js +112 -0
  196. package/dist/5501.creaditor.bundle.js.gz +0 -0
  197. package/dist/5530.creaditor.bundle.js +36 -0
  198. package/dist/5530.creaditor.bundle.js.gz +0 -0
  199. package/dist/5666.creaditor.bundle.js +28 -0
  200. package/dist/5666.creaditor.bundle.js.gz +0 -0
  201. package/dist/567.creaditor.bundle.js +439 -0
  202. package/dist/567.creaditor.bundle.js.gz +0 -0
  203. package/dist/5713.creaditor.bundle.js +86 -0
  204. package/dist/5713.creaditor.bundle.js.LICENSE.txt +10 -0
  205. package/dist/5713.creaditor.bundle.js.LICENSE.txt.gz +0 -0
  206. package/dist/5713.creaditor.bundle.js.gz +0 -0
  207. package/dist/574.creaditor.bundle.js +115 -0
  208. package/dist/574.creaditor.bundle.js.LICENSE.txt +21 -0
  209. package/dist/574.creaditor.bundle.js.LICENSE.txt.gz +0 -0
  210. package/dist/574.creaditor.bundle.js.gz +0 -0
  211. package/dist/578.creaditor.bundle.js +29 -0
  212. package/dist/578.creaditor.bundle.js.gz +0 -0
  213. package/dist/5791.creaditor.bundle.js +288 -0
  214. package/dist/5791.creaditor.bundle.js.gz +0 -0
  215. package/dist/5813.creaditor.bundle.js +613 -0
  216. package/dist/5813.creaditor.bundle.js.LICENSE.txt +10 -0
  217. package/dist/5813.creaditor.bundle.js.LICENSE.txt.gz +0 -0
  218. package/dist/5813.creaditor.bundle.js.gz +0 -0
  219. package/dist/5839.creaditor.bundle.js +47 -0
  220. package/dist/5839.creaditor.bundle.js.gz +0 -0
  221. package/dist/5849.creaditor.bundle.js +18 -0
  222. package/dist/5849.creaditor.bundle.js.gz +0 -0
  223. package/dist/5850.creaditor.bundle.js +23 -0
  224. package/dist/5850.creaditor.bundle.js.gz +0 -0
  225. package/dist/59.creaditor.bundle.js +381 -0
  226. package/dist/59.creaditor.bundle.js.LICENSE.txt +10 -0
  227. package/dist/59.creaditor.bundle.js.LICENSE.txt.gz +0 -0
  228. package/dist/59.creaditor.bundle.js.gz +0 -0
  229. package/dist/5926.creaditor.bundle.js +63 -0
  230. package/dist/5926.creaditor.bundle.js.gz +0 -0
  231. package/dist/6036.creaditor.bundle.js +34 -0
  232. package/dist/6036.creaditor.bundle.js.gz +0 -0
  233. package/dist/6151.creaditor.bundle.js +1 -0
  234. package/dist/6151.creaditor.bundle.js.gz +0 -0
  235. package/dist/6216.creaditor.bundle.js +2 -0
  236. package/dist/6216.creaditor.bundle.js.LICENSE.txt +10 -0
  237. package/dist/6216.creaditor.bundle.js.LICENSE.txt.gz +0 -0
  238. package/dist/6216.creaditor.bundle.js.gz +0 -0
  239. package/dist/638.creaditor.bundle.js +23 -0
  240. package/dist/638.creaditor.bundle.js.gz +0 -0
  241. package/dist/6442.creaditor.bundle.js +236 -0
  242. package/dist/6442.creaditor.bundle.js.gz +0 -0
  243. package/dist/6459.creaditor.bundle.js +23 -0
  244. package/dist/6459.creaditor.bundle.js.gz +0 -0
  245. package/dist/6496.creaditor.bundle.js +19 -0
  246. package/dist/6496.creaditor.bundle.js.gz +0 -0
  247. package/dist/653.creaditor.bundle.js +23 -0
  248. package/dist/653.creaditor.bundle.js.gz +0 -0
  249. package/dist/6751.creaditor.bundle.js +1 -0
  250. package/dist/6751.creaditor.bundle.js.gz +0 -0
  251. package/dist/6814.creaditor.bundle.js +1 -0
  252. package/dist/6814.creaditor.bundle.js.gz +0 -0
  253. package/dist/7051.creaditor.bundle.js +162 -0
  254. package/dist/7051.creaditor.bundle.js.LICENSE.txt +17 -0
  255. package/dist/7051.creaditor.bundle.js.LICENSE.txt.gz +0 -0
  256. package/dist/7051.creaditor.bundle.js.gz +0 -0
  257. package/dist/7055.creaditor.bundle.js +75 -0
  258. package/dist/7055.creaditor.bundle.js.LICENSE.txt +1 -0
  259. package/dist/7055.creaditor.bundle.js.gz +0 -0
  260. package/dist/715.creaditor.bundle.js +142 -0
  261. package/dist/715.creaditor.bundle.js.LICENSE.txt +11 -0
  262. package/dist/715.creaditor.bundle.js.LICENSE.txt.gz +0 -0
  263. package/dist/715.creaditor.bundle.js.gz +0 -0
  264. package/dist/7155.creaditor.bundle.js +23 -0
  265. package/dist/7155.creaditor.bundle.js.gz +0 -0
  266. package/dist/7209.creaditor.bundle.js +660 -0
  267. package/dist/7209.creaditor.bundle.js.gz +0 -0
  268. package/dist/7238.creaditor.bundle.js +131 -0
  269. package/dist/7238.creaditor.bundle.js.gz +0 -0
  270. package/dist/7255.creaditor.bundle.js +11 -0
  271. package/dist/7255.creaditor.bundle.js.gz +0 -0
  272. package/dist/738.creaditor.bundle.js +14 -0
  273. package/dist/738.creaditor.bundle.js.gz +0 -0
  274. package/dist/7380.creaditor.bundle.js +19 -0
  275. package/dist/7380.creaditor.bundle.js.gz +0 -0
  276. package/dist/7463.creaditor.bundle.js +395 -0
  277. package/dist/7463.creaditor.bundle.js.LICENSE.txt +10 -0
  278. package/dist/7463.creaditor.bundle.js.LICENSE.txt.gz +0 -0
  279. package/dist/7463.creaditor.bundle.js.gz +0 -0
  280. package/dist/7466.creaditor.bundle.js +1 -0
  281. package/dist/7466.creaditor.bundle.js.gz +0 -0
  282. package/dist/752.creaditor.bundle.js +40 -0
  283. package/dist/752.creaditor.bundle.js.gz +0 -0
  284. package/dist/7523.creaditor.bundle.js +27 -0
  285. package/dist/7523.creaditor.bundle.js.gz +0 -0
  286. package/dist/7564.creaditor.bundle.js +1 -0
  287. package/dist/7564.creaditor.bundle.js.gz +0 -0
  288. package/dist/763.creaditor.bundle.js +1 -0
  289. package/dist/763.creaditor.bundle.js.gz +0 -0
  290. package/dist/767.creaditor.bundle.js +274 -0
  291. package/dist/767.creaditor.bundle.js.gz +0 -0
  292. package/dist/7759.creaditor.bundle.js +25 -0
  293. package/dist/7759.creaditor.bundle.js.gz +0 -0
  294. package/dist/7838.creaditor.bundle.js +20 -0
  295. package/dist/7838.creaditor.bundle.js.gz +0 -0
  296. package/dist/7937.creaditor.bundle.js +130 -0
  297. package/dist/7937.creaditor.bundle.js.gz +0 -0
  298. package/dist/7997.creaditor.bundle.js +173 -0
  299. package/dist/7997.creaditor.bundle.js.gz +0 -0
  300. package/dist/8042.creaditor.bundle.js +71 -0
  301. package/dist/8042.creaditor.bundle.js.gz +0 -0
  302. package/dist/8064.creaditor.bundle.js +25 -0
  303. package/dist/8064.creaditor.bundle.js.gz +0 -0
  304. package/dist/8141.creaditor.bundle.js +21 -0
  305. package/dist/8141.creaditor.bundle.js.LICENSE.txt +5 -0
  306. package/dist/8141.creaditor.bundle.js.gz +0 -0
  307. package/dist/8173.creaditor.bundle.js +455 -0
  308. package/dist/8173.creaditor.bundle.js.LICENSE.txt +10 -0
  309. package/dist/8173.creaditor.bundle.js.LICENSE.txt.gz +0 -0
  310. package/dist/8173.creaditor.bundle.js.gz +0 -0
  311. package/dist/8250.creaditor.bundle.js +1 -0
  312. package/dist/8250.creaditor.bundle.js.gz +0 -0
  313. package/dist/8251.creaditor.bundle.js +23 -0
  314. package/dist/8251.creaditor.bundle.js.gz +0 -0
  315. package/dist/8303.creaditor.bundle.js +57 -0
  316. package/dist/8303.creaditor.bundle.js.LICENSE.txt +10 -0
  317. package/dist/8303.creaditor.bundle.js.LICENSE.txt.gz +0 -0
  318. package/dist/8303.creaditor.bundle.js.gz +0 -0
  319. package/dist/8305.creaditor.bundle.js +32 -0
  320. package/dist/8305.creaditor.bundle.js.gz +0 -0
  321. package/dist/8315.creaditor.bundle.js +44 -0
  322. package/dist/8315.creaditor.bundle.js.gz +0 -0
  323. package/dist/8443.creaditor.bundle.js +72 -0
  324. package/dist/8443.creaditor.bundle.js.gz +0 -0
  325. package/dist/84702e107adede1a967468c78921d455.mp4 +0 -0
  326. package/dist/8516.creaditor.bundle.js +15 -0
  327. package/dist/8516.creaditor.bundle.js.gz +0 -0
  328. package/dist/8533.creaditor.bundle.js +1 -0
  329. package/dist/8533.creaditor.bundle.js.gz +0 -0
  330. package/dist/8570.creaditor.bundle.js +102 -0
  331. package/dist/8570.creaditor.bundle.js.gz +0 -0
  332. package/dist/8646.creaditor.bundle.js +122 -0
  333. package/dist/8646.creaditor.bundle.js.gz +0 -0
  334. package/dist/8654.creaditor.bundle.js +109 -0
  335. package/dist/8654.creaditor.bundle.js.gz +0 -0
  336. package/dist/8676.creaditor.bundle.js +23 -0
  337. package/dist/8676.creaditor.bundle.js.gz +0 -0
  338. package/dist/88.creaditor.bundle.js +1 -0
  339. package/dist/88.creaditor.bundle.js.gz +0 -0
  340. package/dist/8854.creaditor.bundle.js +79 -0
  341. package/dist/8854.creaditor.bundle.js.gz +0 -0
  342. package/dist/8876.creaditor.bundle.js +25 -0
  343. package/dist/8876.creaditor.bundle.js.LICENSE.txt +32 -0
  344. package/dist/8876.creaditor.bundle.js.LICENSE.txt.gz +0 -0
  345. package/dist/8876.creaditor.bundle.js.gz +0 -0
  346. package/dist/8916.creaditor.bundle.js +18 -0
  347. package/dist/8916.creaditor.bundle.js.gz +0 -0
  348. package/dist/8921.creaditor.bundle.js +25 -0
  349. package/dist/8921.creaditor.bundle.js.gz +0 -0
  350. package/dist/898.creaditor.bundle.js +548 -0
  351. package/dist/898.creaditor.bundle.js.LICENSE.txt +10 -0
  352. package/dist/898.creaditor.bundle.js.LICENSE.txt.gz +0 -0
  353. package/dist/898.creaditor.bundle.js.gz +0 -0
  354. package/dist/8983.creaditor.bundle.js +1 -0
  355. package/dist/8983.creaditor.bundle.js.gz +0 -0
  356. package/dist/9041.creaditor.bundle.js +171 -0
  357. package/dist/9041.creaditor.bundle.js.gz +0 -0
  358. package/dist/9089.creaditor.bundle.js +21 -0
  359. package/dist/9089.creaditor.bundle.js.gz +0 -0
  360. package/dist/9162.creaditor.bundle.js +23 -0
  361. package/dist/9162.creaditor.bundle.js.gz +0 -0
  362. package/dist/9184.creaditor.bundle.js +23 -0
  363. package/dist/9184.creaditor.bundle.js.gz +0 -0
  364. package/dist/9193.creaditor.bundle.js +1 -0
  365. package/dist/9193.creaditor.bundle.js.gz +0 -0
  366. package/dist/9250.creaditor.bundle.js +274 -0
  367. package/dist/9250.creaditor.bundle.js.gz +0 -0
  368. package/dist/9386.creaditor.bundle.js +23 -0
  369. package/dist/9386.creaditor.bundle.js.gz +0 -0
  370. package/dist/9453.creaditor.bundle.js +15 -0
  371. package/dist/9453.creaditor.bundle.js.gz +0 -0
  372. package/dist/9570.creaditor.bundle.js +23 -0
  373. package/dist/9570.creaditor.bundle.js.gz +0 -0
  374. package/dist/975.creaditor.bundle.js +23 -0
  375. package/dist/975.creaditor.bundle.js.gz +0 -0
  376. package/dist/976.creaditor.bundle.js +23 -0
  377. package/dist/976.creaditor.bundle.js.gz +0 -0
  378. package/dist/9986.creaditor.bundle.js +11 -0
  379. package/dist/9986.creaditor.bundle.js.gz +0 -0
  380. package/dist/9990.creaditor.bundle.js +16 -0
  381. package/dist/9990.creaditor.bundle.js.gz +0 -0
  382. package/dist/creaditor.bundle.js +6433 -0
  383. package/dist/creaditor.bundle.js.LICENSE.txt +102 -0
  384. package/dist/creaditor.bundle.js.LICENSE.txt.gz +0 -0
  385. package/dist/creaditor.bundle.js.gz +0 -0
  386. package/dist/dca9330af07325d31ab04d60838684cd.png +0 -0
  387. package/dist/index.html +1 -0
  388. package/dist/index.html.gz +0 -0
  389. package/dist/service-worker.js +1 -0
  390. package/dist/service-worker.js.gz +0 -0
  391. package/dist/workbox-f3063069.js +1 -0
  392. package/dist/workbox-f3063069.js.gz +0 -0
  393. package/package.json +37 -0
@@ -0,0 +1,1047 @@
1
+ "use strict";(("undefined"!=typeof self?self:this).webpackChunkCreaditor=("undefined"!=typeof self?self:this).webpackChunkCreaditor||[]).push([[380,3095,4569],{73095(t,e,i){i.r(e),i.d(e,{default:()=>n});var s=i(59929),o=i(21421),r=i(69600);class n extends s.WF{constructor(){super(),this.contentRef=(0,o._)(),this.toggle=this.toggle.bind(this),this.onEnter=this.onEnter.bind(this),this.onKeydown=this.onKeydown.bind(this),this.overflow=!0,this.maxHeight=300,this.left=0,this.top=0,this.custom=!1,this.opened=!1}close(){this.toggle()}onBouncing(t){this.searchText=t.target.value;const e=new UIEvent("search",{view:window,bubbles:!0,cancelable:!0});this.dispatchEvent(e)}render(){return s.qy`
2
+ <slot @click=${()=>this.toggle()} tabindex="0" name="trigger"></slot>
3
+ ${this.opened?s.qy` <div
4
+ @mouseup=${this.onClickOutside}
5
+ class="backdrop"
6
+ style="z-index:${(0,r.A)()};"
7
+ >
8
+ <div
9
+ ${(0,o.K)(this.contentRef)}
10
+ @mouseup=${this.preventClosing}
11
+ style="z-index:${(0,r.A)()};left:${this.left}px;top:${this.top}px;"
12
+ class="dropdown-content fade-in ${this.custom?"":"dropdown-background"}"
13
+ >
14
+ ${this.search?s.qy`<cdtr-input
15
+ @input=${this.onBouncing}
16
+ type="search"
17
+ value=${this.searchText}
18
+ ></cdtr-input>`:null}
19
+ <slot name="content"></slot>
20
+ </div>
21
+ </div>`:null}
22
+ `}preventClosing(t){return t.stopPropagation(),setTimeout(()=>{this.calcRects()},0),!1}onClickOutside(){this.toggle(!1)}updated(){this.opened&&(setTimeout(()=>{this.calcRects()},0),this.contentRef.value?.classList.add("fade-in"),this.contentRef.value.style.maxHeight=`${this.maxHeight}px`)}calcRects(){let t=0,e=0;const i=this.getBoundingClientRect(),s=this.contentRef?.value?.getBoundingClientRect();s&&(t=i.left,e=i.top,t<0&&(t=0),e<0&&(e=0),t+s.width>window.innerWidth&&(t=window.innerWidth-s.width),e+s.height>window.innerHeight&&(e=window.innerHeight-s.height),this.left=t,this.top=e,this.contentRef.value.style.left=`${i.left}px`,this.contentRef.value.style.top=`${e+i.height}px`,this.contentRef.value.style.overflow=this.overflow?"hidden auto":"hidden")}toggle(){let t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];const e=t||!this.opened;e?(window.removeEventListener("keydown",this.onKeydown),window.addEventListener("keydown",this.onKeydown),this.opened=e,setTimeout(()=>{const t=this.focusedItem=this.querySelector("cdtr-dropdown-item[focused]")||this.querySelector("cdtr-dropdown-item");t&&t.focus()},20)):(window.removeEventListener("keydown",this.onKeydown),this.contentRef.value?.classList.add("fade-out"),setTimeout(()=>{this.opened=e},150)),this.setAttribute("aria-expanded",e)}onEnter(t){t.target===this&&13===t.keyCode&&this.toggle()}onKeydown(t){this.focusedItem&&40===t.keyCode&&this.focusedItem.nextElementSibling&&"CDTR-DROPDOWN-ITEM"===this.focusedItem.nextElementSibling.nodeName?(this.focusedItem=this.focusedItem.nextElementSibling,this.focusedItem&&this.focusedItem.focus()):this.focusedItem&&38===t.keyCode&&this.focusedItem.previousElementSibling&&"CDTR-DROPDOWN-ITEM"===this.focusedItem.previousElementSibling.nodeName?(this.focusedItem=this.focusedItem.previousElementSibling,this.focusedItem&&this.focusedItem.focus()):27===t.keyCode&&this.toggle();const e=new UIEvent("keypress",{view:window,bubbles:!0,cancelable:!0});this.dispatchEvent(e)}connectedCallback(){super.connectedCallback(),this.setAttribute("role","button"),this.setAttribute("tabindex","0"),this.setAttribute("aria-disabled","false"),this.setAttribute("aria-haspopup","true"),this.setAttribute("aria-expanded",this.opened),this.addEventListener("keydown",this.onEnter),setTimeout(()=>{this.opened&&this.toggle(!0)},50)}disconnectedCallback(){super.disconnectedCallback(),window.removeEventListener("keydown",this.onKeydown)}patch(t){this.value=t,this.toggle(!1);const e=new UIEvent("change",{view:window,bubbles:!0,cancelable:!0});this.dispatchEvent(e),setTimeout(()=>{this.focus()},0)}}n.styles=s.AH`
23
+ :host {
24
+ display: inline-block;
25
+ overflow: hidden;
26
+ box-sizing: border-box;
27
+ }
28
+
29
+ .backdrop {
30
+ position: fixed;
31
+ top: 0;
32
+ left: 0;
33
+ width: 100%;
34
+ height: 100%;
35
+ background: transparent;
36
+ overflow: hidden;
37
+ }
38
+ .dropdown-background {
39
+ background: #fff;
40
+ }
41
+ .dropdown-content {
42
+ box-sizing: border-box;
43
+ min-width: 50px;
44
+ min-height: 50;
45
+ position: fixed;
46
+ border-radius: 0.25rem;
47
+ /* padding: 3px; */
48
+ box-shadow: rgba(0, 0, 0, 0.24) 0px 3px 8px;
49
+ transition: box-shadow 300ms cubic-bezier(0.4, 0, 0.2, 1) 0ms;
50
+ }
51
+ .fade-in {
52
+ animation: fade-in 0.3s;
53
+ }
54
+ .fade-out {
55
+ animation: fade-out 0.3s;
56
+ opacity: 0;
57
+ }
58
+ @keyframes fade-in {
59
+ from {
60
+ opacity: 0;
61
+ margin-top: 5px;
62
+ }
63
+ to {
64
+ opacity: 1;
65
+ }
66
+ }
67
+ @keyframes fade-out {
68
+ from {
69
+ opacity: 1;
70
+ }
71
+ to {
72
+ margin-top: 5px;
73
+ opacity: 0;
74
+ }
75
+ }
76
+ `,n.properties={search:{type:Boolean},searchText:{type:String},left:{type:Number},top:{type:Number},opened:{type:Boolean},maxHeight:{type:Number},overflow:{type:Boolean},value:{type:String},custom:{type:String}};class a extends s.WF{constructor(){super(),this.minWidth=50}render(){return s.qy`<paper-button style="min-width:${this.minWidth}px"
77
+ ><slot></slot> <cdtr-dd-arrow-icon></cdtr-dd-arrow-icon
78
+ ></paper-button>`}}a.properties={minWidth:{type:Number}},a.styles=s.AH`
79
+ paper-button {
80
+ display: flex;
81
+ justify-content: space-between;
82
+ text-transform: capitalize;
83
+ width: 100%;
84
+ font-size: 14px;
85
+ font-weight: 400;
86
+ line-height: 1.5;
87
+ color: rgb(33, 37, 41);
88
+ background: rgb(255, 255, 255);
89
+ background-clip: padding-box;
90
+ border-width: 1px;
91
+ border-style: solid;
92
+ border-image: initial;
93
+ appearance: none;
94
+ border-radius: 0.25rem;
95
+ transition: border-color 0.15s ease-in-out 0s,
96
+ box-shadow 0.15s ease-in-out 0s;
97
+ margin: 0px;
98
+ font-family: var(--font-family);
99
+ border-color: var(--input-border-color);
100
+ box-sizing: border-box;
101
+ padding: 5px;
102
+ font-size: 12px;
103
+ }
104
+ paper-button:hover {
105
+ border-color: black;
106
+ }
107
+ `;class l extends s.WF{constructor(){super(),this.onFocus=this.onFocus.bind(this),this.onBlur=this.onBlur.bind(this)}focus(){this.shadowRoot.querySelector(".dropdown-item").focus()}onFocus(){this.focused=!0}onBlur(){this.focused=!1}onClick(t){if(this.notClickable)return;const e=this.closest("cdtr-dropdown");e&&e.patch(this.value,t,this)}onPress(t){if(13===t.keyCode){const e=new UIEvent("click",{view:window,bubbles:!0,cancelable:!0});this.dispatchEvent(e);const i=this.closest("cdtr-dropdown");i&&i.patch(this.value,t,this)}}connectedCallback(){super.connectedCallback(),this.selected&&this.scrollIntoView({behavior:"smooth",block:"start"})}render(){return s.qy`<div role="button"
108
+ @click=${this.onClick}
109
+ @keydown=${this.onPress}
110
+ @blur=${this.onBlur}
111
+ @focus=${this.onFocus}
112
+ class="dropdown-item"
113
+ tabindex="0"
114
+ >
115
+ ${this.selected?s.qy` <svg
116
+ class="selected-svg"
117
+ fill="var(--primary)"
118
+ xmlns="http://www.w3.org/2000/svg"
119
+ viewBox="0 0 24 24"
120
+ width="24"
121
+ height="24"
122
+ >
123
+ <path fill="none" d="M0 0h24v24H0z" />
124
+ <path
125
+ d="M10 15.172l9.192-9.193 1.415 1.414L10 18l-6.364-6.364 1.414-1.414z"
126
+ />
127
+ </svg>`:null}
128
+ <slot></slot>
129
+ </div>`}}l.properties={focused:{type:Boolean,reflect:!0},selected:{type:Boolean,reflect:!0},value:{type:String,reflect:!0},notClickable:{type:Boolean}},l.styles=s.AH`
130
+ .dropdown-item {
131
+ position: relative;
132
+ box-sizing: border-box;
133
+ display: flex;
134
+ font-family: Arial, Helvetica, sans-serif;
135
+ font-size: 12px;
136
+ cursor: pointer;
137
+ margin-bottom: 2px;
138
+ display: flex;
139
+ align-items: center;
140
+ user-select: none;
141
+ width: 100%;
142
+ justify-content: space-between;
143
+ box-sizing: border-box;
144
+ padding: 10px 20px;
145
+ }
146
+ .dropdown-item:hover {
147
+ background: #f3f3f396;
148
+ }
149
+ .dropdown-item:focus {
150
+ color: var(--primary-color);
151
+ outline: none;
152
+ background: #f3f3f3;
153
+ }
154
+ .selected-svg {
155
+ width: 16px;
156
+ position: absolute;
157
+ left: 95%;
158
+ transform: translate(-70%, -50%);
159
+ top: 50%;
160
+ }
161
+ `,customElements.get("cdtr-dropdown-item")||customElements.define("cdtr-dropdown-item",l),customElements.get("cdtr-dropdown-button")||customElements.define("cdtr-dropdown-button",a),customElements.get("cdtr-dropdown")||customElements.define("cdtr-dropdown",n)},70380(t,e,i){i.r(e),i.d(e,{default:()=>p});var s=i(59929),o=i(21421),r=i(91597);const n="֑-߿יִ-﷽ﹰ-ﻼ",a="A-Za-zÀ-ÖØ-öø-ʸ̀-֐ࠀ-῿‎Ⰰ-﬜︀-﹯﻽-￿",l=new RegExp("^[^"+a+"]*["+n+"]"),c=new RegExp("^[^"+n+"]*["+a+"]");var d=i(86319);const h=(0,r.S)();class p extends s.WF{constructor(){super(),this.inputRef=(0,o._)(),this.min=0,this.max=100,this.step=1,this.autofocus=!1,this.type="text",this.value="number"===this.type?"0":"",this.placeholder="",this.oldValue=this.value,this.successActive=!1,this._successTimeout=null}onSubmit(t){t.preventDefault();const e=new UIEvent("submit",{view:window,bubbles:!0,cancelable:!0});this.dispatchEvent(e),this.oldValue=this.value}focus(){const t=this.inputRef.value;t.focus(),t.setSelectionRange(t.value.length,t.value.length)}onFocus(){const t=new UIEvent("focus",{view:window,bubbles:!0,cancelable:!0});this.dispatchEvent(t)}onBlur(){const t=new UIEvent("blur",{view:window,bubbles:!0,cancelable:!0});this.dispatchEvent(t),this.oldValue=this.value}render(){this.fullWidth&&(this.style.width="100%"),this.value||"text"!==this.type||(this.value=""),this.icon&&"string"!=typeof this.inputStyle&&(this.inputStyle="");const t=d.M.get("lang",this.placeholder)||this.placeholder||"";t&&("string"!=typeof this.inputStyle&&(this.inputStyle=""),-1===this.inputStyle.indexOf("text-align")&&(this.inputStyle+=";text-align:"+("rtl"===function(t){const e=String(t||"");return l.test(e)?"rtl":c.test(e)?"ltr":"neutral"}(t)?"right":"")));const e=this.multiline?s.qy` <textarea
162
+ row=${this.row||4}
163
+ .disabled=${this.disabled}
164
+ dir="auto"
165
+ ${(0,o.K)(this.inputRef)}
166
+ style="${this.inputStyle}"
167
+ .autofocus="${this.autofocus}"
168
+ .placeholder="${t}"
169
+ @input="${this.setValue}"
170
+ @change="${this.setValue}"
171
+ .min="${String(this.min)}"
172
+ .max="${String(this.max)}"
173
+ .step="${String(this.step)}"
174
+ .value="${String(this.value)}"
175
+ />`:s.qy` <input
176
+ .disabled=${this.disabled}
177
+ dir="auto"
178
+ ${(0,o.K)(this.inputRef)}
179
+ style="${this.inputStyle}"
180
+ .autofocus="${this.autofocus}"
181
+ .placeholder="${t}"
182
+ @input="${this.setValue}"
183
+ @change="${this.setValue}"
184
+ .min="${String(this.min)}"
185
+ .type="${this.type}"
186
+ .max="${String(this.max)}"
187
+ .step="${String(this.step)}"
188
+ .value="${String(this.value)}"
189
+ />`;return s.qy`<form @submit=${this.onSubmit}>
190
+ ${e}
191
+ ${!this.icon||this.couchOnEmpty||this.successActive?null:s.qy`<cdtr-icon
192
+ color="#d9d9d9"
193
+ width=${20}
194
+ height=${20}
195
+ style="position: absolute;
196
+ transform: translateY(-50%);top:50%;z-index:1;
197
+ left: 10px;"
198
+ icon="${this.icon}"
199
+ ></cdtr-icon>`}
200
+ ${this.successActive?s.qy`<div class="success-overlay" aria-live="polite">
201
+ <cdtr-couch-mark></cdtr-couch-mark>
202
+ <span class="success-icon">✓</span>
203
+ </div>`:null}
204
+ ${!this.couchOnEmpty||this.value||this.successActive?null:s.qy`<cdtr-couch-mark
205
+ style="position: absolute;
206
+ transform: translateY(-50%);
207
+ left: 0;"
208
+ ></cdtr-couch-mark>`}
209
+ ${"text"===this.type&&this.maxLength?s.qy`<span class="counter"
210
+ >${this.value.length}/${this.maxLength}</span
211
+ > `:null}
212
+ </form>`}firstUpdated(){this.autofocus&&setTimeout(()=>{this.inputRef.value&&this.inputRef.value.focus()},500),void 0===this.value&&(this.value="")}focus(){super.focus(),this.inputRef.value.focus()}connectedCallback(){super.connectedCallback()}disconnectedCallback(){super.disconnectedCallback(),this._successTimeout&&(clearTimeout(this._successTimeout),this._successTimeout=null)}setValue(t){if(this.selectionStart=this.inputRef.value.selectionStart,!this.inputRef.value)return;const e=this.inputRef.value;if("text"===this.type&&this.max&&e.value.length>this.max)return e.value=this.value,void this.inputRef.value.focus();this.value=e.value;const i=new UIEvent(t.type,{view:window,bubbles:!0,cancelable:!0});if(this.dispatchEvent(i),"input"===t.type){const t=()=>{const t=new UIEvent("debounce",{view:window,bubbles:!0,cancelable:!0});this.dispatchEvent(t)};h.run(t,500)}}success(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:2e3;this._successTimeout&&(clearTimeout(this._successTimeout),this._successTimeout=null),this.successActive=!0;const e=Number(t);!Number.isFinite(e)||e<=0||(this._successTimeout=setTimeout(()=>{this.successActive=!1,this._successTimeout=null},e))}patch(t){this.value=t}}p.styles=s.AH`
213
+ :host {
214
+ display: inline-block;
215
+ --cdtr-input-height: 30px;
216
+ --cdtr-input-padding: 0.105rem 0.45rem;
217
+ }
218
+
219
+ form {
220
+ position: relative;
221
+ }
222
+ .counter {
223
+ font-size: 10px;
224
+ }
225
+ input,
226
+ textarea {
227
+ height: var(--cdtr-input-height);
228
+ display: inline-block;
229
+ width: 100%;
230
+ padding: var(--cdtr-input-padding);
231
+ font-size: 14px;
232
+ font-weight: 400;
233
+ line-height: 1.5;
234
+ color: #212529;
235
+ background: #fff;
236
+ background-clip: padding-box;
237
+ border: 1px solid #ced4da;
238
+ -webkit-appearance: none;
239
+ -moz-appearance: none;
240
+ appearance: none;
241
+ border-radius: 0.25rem;
242
+ transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
243
+ margin: 0;
244
+ font-family: var(--font-family);
245
+ border-color: var(--input-border-color);
246
+ outline: var(--input-border-color);
247
+ box-sizing: border-box;
248
+ }
249
+ textarea {
250
+ height: auto;
251
+ resize: none;
252
+ }
253
+ input:disabled,
254
+ textrea:disabled,
255
+ textareap[readonly],
256
+ input[readonly] {
257
+ background-color: #e9ecef;
258
+ opacity: 0.5;
259
+ }
260
+ input:hover,
261
+ textarea:hover {
262
+ border-color: black;
263
+ }
264
+ input::placeholder,
265
+ textarea::placeholder {
266
+ font-family: var(--font-family);
267
+ }
268
+ input:focus,
269
+ textarea:focus {
270
+ border-color: var(--primary);
271
+ }
272
+ input[type="number"] {
273
+ padding-right: 0px;
274
+ padding-left: 4px;
275
+ }
276
+
277
+ input[type="number"] {
278
+ -moz-appearance: textfield;
279
+ }
280
+
281
+ .success-overlay {
282
+ position: absolute;
283
+ top: 50%;
284
+ left: 4px;
285
+ transform: translateY(-50%);
286
+ width: 28px;
287
+ height: 28px;
288
+ display: flex;
289
+ align-items: center;
290
+ justify-content: center;
291
+ pointer-events: none;
292
+ z-index: 2;
293
+ }
294
+
295
+ .success-overlay cdtr-couch-mark {
296
+ position: absolute;
297
+ top: 50%;
298
+ left: 50%;
299
+ transform: translate(-50%, -50%) scale(0.75);
300
+ opacity: 0.85;
301
+ }
302
+
303
+ .success-overlay .success-icon {
304
+ position: absolute;
305
+ top: 50%;
306
+ left: 50%;
307
+ width: 20px;
308
+ height: 20px;
309
+ border-radius: 999px;
310
+ display: flex;
311
+ align-items: center;
312
+ justify-content: center;
313
+ background: var(--primary);
314
+ color: #f6fff9;
315
+ font-size: 14px;
316
+ font-weight: 600;
317
+ transform: translate(-50%, -50%) scale(0.85);
318
+ opacity: 0;
319
+ animation: successPop 0.32s ease-out forwards;
320
+ box-shadow: 0 0 6px rgba(79, 192, 111, 0.25);
321
+ }
322
+
323
+ @keyframes successPop {
324
+ 0% {
325
+ transform: translate(-50%, -50%) scale(0.85);
326
+ opacity: 0;
327
+ }
328
+ 50% {
329
+ transform: translate(-50%, -50%) scale(1.05);
330
+ opacity: 1;
331
+ }
332
+ 100% {
333
+ transform: translate(-50%, -50%) scale(1);
334
+ opacity: 1;
335
+ }
336
+ }
337
+
338
+ @keyframes successGlow {
339
+ 0% {
340
+ box-shadow: 0 0 6px rgba(79, 192, 111, 0.25);
341
+ }
342
+ 100% {
343
+ box-shadow: 0 0 10px rgba(79, 192, 111, 0.2);
344
+ }
345
+ }
346
+ `,p.properties={value:{type:String,reflect:!0},step:{type:Number,reflect:!0},min:{type:Number,reflect:!0},max:{type:Number,reflect:!0},type:{type:String,reflect:!0},inputDir:{type:String},icon:{type:String,reflect:!0},placeholder:{type:String,reflect:!0},autofocus:{type:Boolean,reflect:!0},fullWidth:{type:Boolean,reflect:!0},selectionStart:{type:Number},inputStyle:{type:String,reflect:!0},maxLength:{type:Number},couchOnEmpty:{type:Boolean},disabled:{type:Boolean},multiline:{type:Boolean},row:{type:Number},successActive:{type:Boolean}},customElements.get("cdtr-input")||customElements.define("cdtr-input",p)},64569(t,e,i){i.r(e),i.d(e,{LinkElement:()=>x});var s=i(59929),o=i(86319),r=i(88385);const n=s.AH`
347
+ :host {
348
+ --paper-radio-button-checked-color: var(--primary);
349
+ box-sizing: border-box;
350
+ }
351
+ .anchor-dd {
352
+ width: 100%;
353
+ }
354
+ cdtr-add-icon {
355
+ --cdtr-icon-width: 16px;
356
+ --cdtr-icon-height: 16px;
357
+ --cdtr-icon-color: var(--dark);
358
+ }
359
+ cdtr-row {
360
+ direction: var(--direction-locale);
361
+ }
362
+ paper-radio-button {
363
+ padding: 0;
364
+ display: flex;
365
+ gap: 5px;
366
+ margin-top: 8px;
367
+ }
368
+ .add-button {
369
+ background: var(--primary);
370
+ color: #fff;
371
+ min-width:0;
372
+ padding:6px;
373
+ width:100%;
374
+ }
375
+ paper-item {
376
+ width: 130px;
377
+ cursor: pointer;
378
+ }
379
+ paper-item:hover {
380
+ color: var(--primary);
381
+ }
382
+ .input-wrapper {
383
+ width: 100%;
384
+ position: relative;
385
+ }
386
+
387
+ paper-button {
388
+ padding: 0.4em;
389
+ color: var(--primary);
390
+ }
391
+ paper-button.indigo {
392
+ background: var(--primary);
393
+ color: white;
394
+ }
395
+
396
+ .input-wrapper cdtr-input {
397
+ display: block;
398
+ }
399
+ .explain-title {
400
+ margin: 20px 0 6px;
401
+ }
402
+ paper-item {
403
+ text-align: var(--text-align-locale);
404
+ direction: var(--direction-locale);
405
+ }
406
+ .link-type-dropdown {
407
+ text-align: var(--text-align-locale);
408
+ direction: var(--direction-locale);
409
+ width: 50%;
410
+ }
411
+ .trigger-wrapper svg {
412
+ width: 20px;
413
+ cursor: pointer;
414
+ fill: var(--dark);
415
+ }
416
+ .trigger-wrapper svg:hover {
417
+ fill: var(--primary);
418
+ }
419
+ .demo-icon {
420
+ position: absolute;
421
+ left: 100%;
422
+ transform: translate(-100%, -50%);
423
+ top: 55%;
424
+ }
425
+ .automations-view {
426
+ width: 100%;
427
+ }
428
+ .automation-card {
429
+ padding: 1rem;
430
+ border: 1px solid #e0e0e0;
431
+ border-radius: 4px;
432
+ margin-bottom: 0.5rem;
433
+ cursor: pointer;
434
+ transition: all 0.2s;
435
+ }
436
+ .automation-card:hover {
437
+ border-color: var(--primary);
438
+ box-shadow: 0 2px 4px rgba(0,0,0,0.1);
439
+ }
440
+ .automation-card.active {
441
+ border-color: var(--primary);
442
+ background: #e3f2fd;
443
+ box-shadow: 0 2px 4px rgba(0,0,0,0.1);
444
+ }
445
+ .automation-card.active:hover {
446
+ border-color: var(--primary);
447
+ box-shadow: 0 2px 6px rgba(0,0,0,0.15);
448
+ }
449
+ .automation-details-view {
450
+ width: 100%;
451
+ min-height: 400px;
452
+ display: flex;
453
+ flex-direction: column;
454
+ }
455
+ .automation-content {
456
+ overflow-y: auto;
457
+ flex: 1 1 auto;
458
+ min-height: 0;
459
+ }
460
+ .automation-footer {
461
+ flex: 0 0 auto;
462
+ position: sticky;
463
+ bottom: 0;
464
+ z-index: 10;
465
+ background: #fff;
466
+ }
467
+ .mailing-lists-container {
468
+ max-height: 300px;
469
+ overflow-y: auto;
470
+ }
471
+ .mailing-list-item {
472
+ padding: 0.5rem 0.75rem;
473
+ border-radius: 4px;
474
+ margin-bottom: 0.5rem;
475
+ cursor: pointer;
476
+ transition: all 0.2s;
477
+ }
478
+ .mailing-list-item:hover {
479
+ background: rgba(0, 0, 0, 0.03);
480
+ }
481
+ .action-section {
482
+ margin-bottom: 1.5rem;
483
+ }
484
+ .action-question {
485
+ padding: 0.75rem 0;
486
+ cursor: pointer;
487
+ border-bottom: 1px solid #e0e0e0;
488
+ transition: all 0.2s;
489
+ }
490
+ .action-question:hover {
491
+ border-bottom-color: var(--primary);
492
+ }
493
+ .mailing-lists-list {
494
+ margin-top: 0.75rem;
495
+ padding-left: 1rem;
496
+ }
497
+ `;var a=i(21421);i(73095),i(70380);const l="260px",c=[{type:"https:",text:"link"},{type:"http:",text:"link"},{type:"mailto:",text:"sendEmail"},{type:"tel:",text:"tel"},{type:"sms:",text:"sendSms"},{type:"whatsapp:",text:"sendWhatsapp"},{type:"anchor:",text:"anchor"}],d="cdtrAdd",h="cdtrRemove",p="cdtrAutomation",u=[d,h,p];function m(t,e){t=t.replace(/[\[\]]/g,"\\$&");var i=new RegExp("[?&]"+t+"(=([^&#]*)|&|#|$)").exec(e);return i?i[2]?decodeURIComponent(i[2].replace(/\+/g," ")):"":null}function f(t,e){switch(t){case"anchor:":return function(t){const{url:e,anchors:i,href:o,protocol:r,onChangeLink:n,onBlur:a,onRequest:l}=t;return s.qy`
498
+ <cdtr-row alignItems="center" spacing="5">
499
+ <cdtr-dropdown
500
+ @change=${t=>{n({target:{value:"#"+t.target.value},anchor:!0}),a()}}
501
+ .opened=${i.length>0&&"anchor:"===r&&!o}
502
+ class="anchor-dd"
503
+ >
504
+ <cdtr-dropdown-button
505
+ minWidth=${100}
506
+ class=" dropdown-button"
507
+ slot="trigger"
508
+ ><lang-text .text=${e.isAnchor?o:""}></lang-text>
509
+ </cdtr-dropdown-button>
510
+ <div style="min-width:150px" slot="content">
511
+ ${i.map(t=>s.qy`<cdtr-dropdown-item
512
+ value="${t.props.name||t.props.element_ID}"
513
+ >${t.props.name||t.props.element_ID}
514
+ </cdtr-dropdown-item>`)}
515
+ </div>
516
+ </cdtr-dropdown>
517
+ ${0===i.length?s.qy`<paper-button
518
+ @click=${()=>{"function"===l&&l("anchor")}}
519
+ ><cdtr-title
520
+ ><lang-text text="create_anchor"></lang-text></cdtr-title
521
+ ></paper-button>`:null}
522
+ </cdtr-row>
523
+ `}(e);case"mailto:":return function(t){const{href:e,body:i,subject:o,onBlur:r,updateBody:n,updateSubject:a}=t,c="string"==typeof e?m("body",e):i||e.params.body,d="string"==typeof e?m("subject",e):o||e.params.subject;return s.qy`
524
+ <cdtr-row spacing="5">
525
+ <cdtr-title class="explain-title"
526
+ ><lang-text text="add_catchy_subject"></lang-text
527
+ ></cdtr-title>
528
+ <cdtr-input
529
+ inputStyle="height:${"40px"};"
530
+ style="width:${l};"
531
+ @change=${t=>{let{target:e}=t;a(e.value),r()}}
532
+ value=${d||o||""}
533
+ ></cdtr-input>
534
+ <cdtr-title class="explain-title"
535
+ ><lang-text text="email_body_if_needed"></lang-text
536
+ ></cdtr-title>
537
+ <cdtr-input
538
+ .multiline=${!0}
539
+ value="${c||i||""}"
540
+ style="width:${l};"
541
+ @change=${t=>{let{target:e}=t;n(e.value),r()}}
542
+ ></cdtr-input>
543
+ </cdtr-row>
544
+ `}(e);case"sms:":return function(t){const{href:e,body:i,onBlur:o,updateBody:r}=t,n="string"==typeof e?m("body",e):e.params.body;return s.qy`
545
+ <cdtr-row spacing="5">
546
+ <cdtr-title class="explain-title"
547
+ ><lang-text text="sms_body_if_needed"></lang-text
548
+ ></cdtr-title>
549
+ <cdtr-input
550
+ .multiline=${!0}
551
+ value="${n||i||""}"
552
+ style="width:${l};"
553
+ @change=${t=>{let{target:e}=t;r(e.value),o()}}
554
+ ></cdtr-input>
555
+ </cdtr-row>
556
+ `}(e);case"whatsapp:":return function(t){const{href:e,body:i,onBlur:o,updateBody:r}=t,n="string"==typeof e?m("text",e)||m("body",e):e.params&&(e.params.text||e.params.body)||"";return s.qy`
557
+ <cdtr-row spacing="5">
558
+ <cdtr-title class="explain-title"
559
+ ><lang-text text="whatsapp_body_if_needed"></lang-text
560
+ ></cdtr-title>
561
+ <cdtr-input
562
+ .multiline=${!0}
563
+ value="${n||i||""}"
564
+ style="width:${l};"
565
+ @change=${t=>{let{target:e}=t;r(e.value),o()}}
566
+ ></cdtr-input>
567
+ </cdtr-row>
568
+ `}(e);default:return""}}function g(t,e,i,s,o,n){if(!t)return null;const a="string"==typeof t?new r.A({href:t,protocol:e,params:i}):new r.A(t);return t?"whatsapp:"===e||"whatsapp:"===a.protocol?function(t,e,i,s,o){const n="string"==typeof t?new r.A({href:t,protocol:e,params:i}):new r.A(t),a=(n.params&&(n.params.phone||function(t){try{const e=/whatsapp:([^?]+)/,i=t.match(e);return i?i[1]:""}catch(t){return""}}(n.fullHref))||m("phone",n.href||"")||n.url||"").replace(/\D+/g,"");if(!a)return null;const l=s||n.params&&(n.params.text||n.params.body)||"",c=l?encodeURIComponent(l):"";let d=`https://wa.me/${a}`;c&&(d+=`?text=${c}`);const h=new r.A(d);return h.target=o||h.target||"_blank",{url:h,params:h.params,protocol:"whatsapp:"}}(t,e,i,s,n):(a.isEmail?function(t,e,i){let s=!1;e?t.addParam("subject",e):t.params&&"subject"in t.params&&(delete t.params.subject,s=!0),i?t.addParam("body",i):t.params&&"body"in t.params&&(delete t.params.body,s=!0),s&&(t.href=t.getUrlWithParams())}(a,o,s):s?a.addParam("body",s):a.params&&"body"in a.params&&(delete a.params.body,a.href=a.getUrlWithParams()),a.target=n||a.target||"_blank",{url:a,params:a.params,protocol:a.protocol}):null}function b(t,e,i){if(!t)return{href:{},protocol:null,body:"",subject:""};if(t.startsWith("http")&&!t.startsWith("http://")&&!t.startsWith("https://"))return null;const s=r.A.getProtocol(t);let o=e;s&&(o=s+":");const n=new r.A({href:t,protocol:o||null});console.log("output",n);const a=(i instanceof r.A?i:new r.A(i)).url!==n.url;return{href:n,protocol:n.protocol,shouldBlur:n.isValid,clearParams:a}}function y(t){const{value:e="",inputRef:i,autofocus:o=!1,onChange:r,onBlur:n,onFocus:c,onKeyDown:d,placeholder:h="",inputStyle:p="",style:u="width:260px;",width:m=l}=t,f=t=>{r&&r(t),n&&n()},g=(()=>{if(null==e||""===e)return"";try{return decodeURI(String(e))||""}catch{return String(e)}})();return s.qy`
569
+ <cdtr-row style="position:relative;" spacing="5">
570
+ <span style="display:none;" aria-hidden="true">${e}</span>
571
+ <cdtr-input
572
+ .couchOnEmpty=${!0}
573
+ ${i?(0,a.K)(i):""}
574
+ style="${u}"
575
+ inputStyle="${p}"
576
+ .autofocus=${o}
577
+ type="search"
578
+ width="${m}"
579
+ placeholder="${h}"
580
+ @input=${t=>{if(t.target.selectionStart!==t.target.value.length)return;const e=t.target.value.trim();/^[^a-zA-Z0-9]+$/.test(e)||r&&r(t)}}
581
+ @change=${f}
582
+ @focus=${c}
583
+ @submit=${d||f}
584
+ .value="${g}"
585
+ ></cdtr-input>
586
+ </cdtr-row>
587
+ `}function v(t){return class extends t{initAutomations(){this.showAutomations=!1,this.selectedAutomation=null,this.activeAutomationId=null,this.selectedMailingLists=[],this.selectedMailingListsForAdd=[],this.selectedMailingListsForRemove=[],this.automationAction=null,this.activeTab="add",this.baseUrl="",this.showSaveSuccess=!1;const t=o.M.get("config","editor","configure","editorProps","mailingLists","items");this.mailingLists=t||[];const e=o.M.get("config","editor","configure","editorProps","automations")||{};this.automations=[],e.addAndRemoveFromMailingList&&this.automations.push({id:"addAndRemoveFromMailingList",name:"moving_from_mailing_list"})}onAutomationsClick(){if(this.showAutomations=!0,this.protocol="automation:",this.selectedAutomation=null,this.activeAutomationId=null,this.selectedMailingLists=[],this.selectedMailingListsForAdd=[],this.selectedMailingListsForRemove=[],this.automationAction=null,this.href&&this.href.href){const t=this.href.href;if("string"==typeof t&&t.match(/^\[\[([^\]]+)\]\]\?/))this.parseAutomationLink(this.href);else{const t=new r.A(this.href);t.params&&t.params[p]?(this.baseUrl=this.extractBaseUrl(t),this.parseAutomationLink(t)):this.baseUrl=t.href||""}}else this.baseUrl="";this.requestUpdate()}extractBaseUrl(t){const e=[];t.protocol&&e.push(t.protocol),t.host&&(e.push("//"),e.push(t.host)),t.pathname&&e.push(t.pathname);const i=u,s=[];t.params&&Object.keys(t.params).forEach(e=>{if(!i.includes(e)){const i=t.params[e];s.push(`${e}=${encodeURIComponent(i)}`)}});let o=e.join("");return s.length>0&&(o+=`?${s.join("&")}`),t.href}onBackClick(){if(this.selectedAutomation)this.selectedAutomation=null,this.selectedMailingLists=[],this.selectedMailingListsForAdd=[],this.selectedMailingListsForRemove=[],this.automationAction=null;else if(this.showAutomations=!1,this.activeAutomationId=null,"automation:"===this.protocol)if(this.baseUrl){const t=new r.A(this.baseUrl);this.href=t,this.protocol=t.protocol}else this.protocol=null,this.href={};this.requestUpdate()}onAutomationClick(t){this.selectedAutomation=t,this.activeAutomationId=t.id,this.selectedMailingLists=[],this.selectedMailingListsForAdd=[],this.selectedMailingListsForRemove=[],this.automationAction=null,this.requestUpdate()}onActionSelect(t){this.automationAction===t?this.automationAction=null:this.automationAction=t,this.requestUpdate()}onTabChange(t){this.activeTab=t,this.requestUpdate()}onMailingListToggle(t,e){("add"===e?this.selectedMailingListsForAdd:this.selectedMailingListsForRemove).indexOf(t)>-1?"add"===e?this.selectedMailingListsForAdd=this.selectedMailingListsForAdd.filter(e=>e!==t):this.selectedMailingListsForRemove=this.selectedMailingListsForRemove.filter(e=>e!==t):"add"===e?this.selectedMailingListsForAdd=[...this.selectedMailingListsForAdd,t]:this.selectedMailingListsForRemove=[...this.selectedMailingListsForRemove,t],this.requestUpdate()}createAutomationLink(){if(!this.selectedAutomation)return null;const t=[];if(this.selectedMailingListsForAdd.length>0&&t.push(`${d}=${this.selectedMailingListsForAdd.join(",")}`),this.selectedMailingListsForRemove.length>0&&t.push(`${h}=${this.selectedMailingListsForRemove.join(",")}`),0===t.length)return null;const e=this.selectedAutomation.name||this.selectedAutomation.id;if(this.baseUrl&&this.baseUrl.trim()){let e=this.baseUrl.trim();e.match(/^https?:\/\//i)||e.includes("://")||!e.includes(".")&&e.match(/^[a-zA-Z]+:/)||(e=`https://${e}`),t.push(`url=${encodeURIComponent(e)}`)}return`[[${e}]]?${t.join("&")}`}onSaveAutomation(){const t=this.createAutomationLink();if(!t)return;console.log("Saving automation link:",t);const e=t.match(/^\[\[([^\]]+)\]\]\?(.+)$/);if(!e)return void console.error("Invalid automation link format:",t);const i=e[1],s=e[2],o={};s.split("&").forEach(t=>{const[e,i]=t.split("=");e&&i&&(o[decodeURIComponent(e)]=decodeURIComponent(i))});const n=o.url;let a;if(delete o.url,a=n?new r.A(n):new r.A("https://example.com"),a.params||(a.params={}),o[d]&&(a.params[d]=o[d]),o[h]&&(a.params[h]=o[h]),a.params[p]=i,a.href=t,a.url=n||"",this.href=a,this.protocol=null,this.value=a,this.link=a,this.lastUrl=a,console.log("Set href to:",this.href),console.log("Set href.href to:",this.href?.href),this.onDispatch(),console.log("After dispatch, href:",this.href),console.log("After dispatch, href.href:",this.href?.href),console.log("After dispatch, href.params:",this.href?.params),this.href&&(!this.href.params||!this.href.params[p])){console.log("Restoring automation params after dispatch");const t=this.href.href||this.href,e=String(t).match(/^\[\[([^\]]+)\]\]\?(.+)$/);if(e){const i=e[2],s={};i.split("&").forEach(t=>{const[e,i]=t.split("=");e&&i&&(s[decodeURIComponent(e)]=decodeURIComponent(i))});const o=s.url,n=o?new r.A(o):new r.A("https://example.com");n.params||(n.params={}),s[d]&&(n.params[d]=s[d]),s[h]&&(n.params[h]=s[h]),n.params[p]=e[1],n.href=t,n.url=o||"",this.href=n,this.value=n,this.link=n,this.lastUrl=n,console.log("Restored href:",this.href?.href),console.log("Restored params:",this.href?.params)}}this.showSaveSuccess=!0,this.requestUpdate(),setTimeout(()=>{this.showSaveSuccess=!1,this.requestUpdate()},2e3)}parseAutomationLink(t){if(!t)return;let e=null,i=!1,s=t.href||t;if("string"==typeof s&&s.match(/^\[\[([^\]]+)\]\]\?/)){i=!0;e=s.match(/^\[\[([^\]]+)\]\]\?/)[1]}else t.params&&(e=t.params[p],i=e&&""!==e&&"string"==typeof e&&""!==e.trim());if(i){if("string"==typeof s&&s.match(/^\[\[([^\]]+)\]\]\?(.+)$/)){const t=s.match(/^\[\[([^\]]+)\]\]\?(.+)$/)[2],e={};if(t.split("&").forEach(t=>{const[i,s]=t.split("=");i&&s&&(e[decodeURIComponent(i)]=decodeURIComponent(s))}),e.url?this.baseUrl=e.url:this.baseUrl="",e[d]){const t="string"==typeof e[d]?e[d].split(",").filter(t=>t.trim()):Array.isArray(e[d])?e[d]:[];this.selectedMailingListsForAdd=t}if(e[h]){const t="string"==typeof e[h]?e[h].split(",").filter(t=>t.trim()):Array.isArray(e[h])?e[h]:[];this.selectedMailingListsForRemove=t}}else if(t.params){const e=this.extractBaseUrl(t);if(this.baseUrl=e,t.params[d]){const e="string"==typeof t.params[d]?t.params[d].split(",").filter(t=>t.trim()):Array.isArray(t.params[d])?t.params[d]:[];this.selectedMailingListsForAdd=e}if(t.params[h]){const e="string"==typeof t.params[h]?t.params[h].split(",").filter(t=>t.trim()):Array.isArray(t.params[h])?t.params[h]:[];this.selectedMailingListsForRemove=e}}if((this.selectedMailingListsForAdd.length>0||this.selectedMailingListsForRemove.length>0)&&(this.showAutomations=!0,this.automations&&this.automations.length>0)){const t=String(e).trim(),i=this.automations.find(e=>e.name&&String(e.name).trim()===t||e.id&&String(e.id).trim()===t)||this.automations[0];this.selectedAutomation=i,this.activeAutomationId=i.id}}}renderAutomationsView(){return this.selectedAutomation?this.renderAutomationDetails():s.qy`
588
+ <div class="automations-view">
589
+ <cdtr-row justify="space-between" alignItems="center" mb="1">
590
+ <cdtr-title
591
+ style="font-weight: 700; font-size: 14.4px; color: #000000b0;"
592
+ >
593
+ <lang-text text="automations"></lang-text>
594
+ </cdtr-title>
595
+ <paper-button
596
+ @click=${this.onBackClick}
597
+ style="padding: 0.4em; color: var(--primary); background: none; box-shadow: none;"
598
+ >
599
+ <lang-text text="back"></lang-text>
600
+ </paper-button>
601
+ </cdtr-row>
602
+ <cdtr-divider></cdtr-divider>
603
+ <div class="automations-list" style="margin-top: 1rem;">
604
+ ${this.automations.map(t=>{const e=this.activeAutomationId===t.id;return s.qy`
605
+ <div
606
+ class="automation-card ${e?"active":""}"
607
+ @click=${()=>this.onAutomationClick(t)}
608
+ style="
609
+ padding: 1rem;
610
+ border: 2px solid ${e?"var(--primary)":"#e0e0e0"};
611
+ border-radius: 4px;
612
+ margin-bottom: 0.5rem;
613
+ cursor: pointer;
614
+ transition: all 0.2s;
615
+ background: ${e?"#e3f2fd":"#fff"};
616
+ "
617
+ @mouseenter=${t=>{e||(t.currentTarget.style.borderColor="var(--primary)",t.currentTarget.style.boxShadow="0 2px 4px rgba(0,0,0,0.1)")}}
618
+ @mouseleave=${t=>{e||(t.currentTarget.style.borderColor="#e0e0e0",t.currentTarget.style.boxShadow="none")}}
619
+ >
620
+ <cdtr-row justify="space-between" alignItems="center">
621
+ <cdtr-title
622
+ style="font-size: 14px; color: ${e?"var(--primary)":"#000"}; font-weight: ${e?"600":"400"};"
623
+ >
624
+ <lang-text text="${t.name}"></lang-text>
625
+ </cdtr-title>
626
+ ${e?s.qy`
627
+ <span
628
+ style="color: var(--primary); font-weight: bold; font-size: 18px; margin-left: 0.5rem;"
629
+ >✓</span
630
+ >
631
+ `:null}
632
+ </cdtr-row>
633
+ </div>
634
+ `})}
635
+ <!-- coming soon -->
636
+ <h6 align="center">
637
+ <lang-text whiteSpace="break-spaces" text="coming_soon_automations"></lang-text>
638
+ </h6>
639
+ </div>
640
+ </div>
641
+ `}renderAutomationDetails(){const t=this.selectedMailingListsForAdd.length>0||this.selectedMailingListsForRemove.length>0;return s.qy`
642
+ <div
643
+ class="automation-details-view"
644
+ style="display: flex; flex-direction: column; height: 100%;"
645
+ >
646
+ <div style="flex: 0 0 auto;">
647
+ <cdtr-row justify="space-between" alignItems="center" mb="1">
648
+ <cdtr-title
649
+ style="font-weight: 700; font-size: 14.4px; color: #000000b0;"
650
+ >
651
+ <lang-text text="automation_settings"></lang-text>
652
+ </cdtr-title>
653
+ <paper-button
654
+ @click=${this.onBackClick}
655
+ style="padding: 0.4em; color: var(--primary); background: none; box-shadow: none;"
656
+ >
657
+ <lang-text text="back"></lang-text>
658
+ </paper-button>
659
+ </cdtr-row>
660
+ <cdtr-divider></cdtr-divider>
661
+ </div>
662
+
663
+ <div class="automation-content">
664
+ <!-- Success Message -->
665
+ ${this.showSaveSuccess?s.qy`
666
+ <style>
667
+ .save-success-container {
668
+ margin-bottom: 1rem;
669
+ animation: slideDown 0.3s ease-out, fadeOut 0.3s ease-in 2.7s forwards;
670
+ }
671
+
672
+ .save-success-content {
673
+ display: flex;
674
+ align-items: center;
675
+ gap: 12px;
676
+ background: #e8f5e9;
677
+ border: 1px solid #4caf50;
678
+ color: #2e7d32;
679
+ padding: 12px 16px;
680
+ border-radius: 6px;
681
+ animation: scaleIn 0.3s ease-out;
682
+ }
683
+
684
+ .success-icon {
685
+ display: flex;
686
+ align-items: center;
687
+ justify-content: center;
688
+ width: 20px;
689
+ height: 20px;
690
+ background: #4caf50;
691
+ border-radius: 50%;
692
+ flex-shrink: 0;
693
+ animation: iconBounce 0.5s ease-out 0.2s both;
694
+ }
695
+
696
+ .success-icon svg {
697
+ width: 14px;
698
+ height: 14px;
699
+ color: white;
700
+ }
701
+
702
+ .success-text {
703
+ font-size: 13px;
704
+ font-weight: 500;
705
+ flex: 1;
706
+ }
707
+
708
+ @keyframes slideDown {
709
+ from {
710
+ transform: translateY(-10px);
711
+ opacity: 0;
712
+ }
713
+ to {
714
+ transform: translateY(0);
715
+ opacity: 1;
716
+ }
717
+ }
718
+
719
+ @keyframes fadeOut {
720
+ from {
721
+ opacity: 1;
722
+ transform: translateY(0);
723
+ }
724
+ to {
725
+ opacity: 0;
726
+ transform: translateY(-10px);
727
+ }
728
+ }
729
+
730
+ @keyframes scaleIn {
731
+ from {
732
+ transform: scale(0.95);
733
+ opacity: 0;
734
+ }
735
+ to {
736
+ transform: scale(1);
737
+ opacity: 1;
738
+ }
739
+ }
740
+
741
+ @keyframes iconBounce {
742
+ 0% {
743
+ transform: scale(0);
744
+ opacity: 0;
745
+ }
746
+ 50% {
747
+ transform: scale(1.2);
748
+ }
749
+ 100% {
750
+ transform: scale(1);
751
+ opacity: 1;
752
+ }
753
+ }
754
+ </style>
755
+ <div class="save-success-container">
756
+ <div class="save-success-content">
757
+ <div class="success-icon">
758
+ <svg
759
+ width="24"
760
+ height="24"
761
+ viewBox="0 0 24 24"
762
+ fill="none"
763
+ xmlns="http://www.w3.org/2000/svg"
764
+ >
765
+ <path
766
+ d="M9 16.17L4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41L9 16.17z"
767
+ fill="currentColor"
768
+ />
769
+ </svg>
770
+ </div>
771
+ <span class="success-text">
772
+ <lang-text text="saved_successfully"></lang-text>
773
+ </span>
774
+ </div>
775
+ </div>
776
+ `:null}
777
+
778
+ <!-- URL Input (Optional) -->
779
+ <div style="margin-bottom: 1.5rem;">
780
+ <cdtr-title
781
+ style="font-size: 13px; color: #666; margin-bottom: 0.5rem; font-weight: 500;"
782
+ >
783
+ <lang-text text="url"></lang-text> (Optional)
784
+ </cdtr-title>
785
+ ${y({value:this.baseUrl||"",onChange:t=>{const e=t.target.value||"",i=b(e,null,this.baseUrl?new r.A(this.baseUrl):{});null===i?this.baseUrl=e:i.href?i.href instanceof r.A?this.baseUrl=i.href.href||e:"string"==typeof i.href?this.baseUrl=i.href:this.baseUrl=e:this.baseUrl=e,this.requestUpdate()},placeholder:"https://example.com",inputStyle:"height: 40px; padding: 0.5rem; border: 1px solid #e0e0e0; border-radius: 4px; width: 100%;",style:"width: 100%;"})}
786
+ </div>
787
+
788
+ <h6
789
+ class="explain-title"
790
+ style="margin-bottom: 1rem; font-size: 14px; color: #666;"
791
+ >
792
+ <lang-text whiteSpace="break-spaces" text="what_should_happen"></lang-text>
793
+ </h6>
794
+
795
+ <!-- Tabs -->
796
+ <div
797
+ style="margin-bottom: 1.5rem; border-bottom: 1px solid #e0e0e0;"
798
+ >
799
+ <cdtr-row spacing="0">
800
+ <paper-button
801
+ @click=${()=>this.onTabChange("add")}
802
+ style="
803
+ background: ${"add"===this.activeTab?"var(--primary)":"transparent"};
804
+ color: ${"add"===this.activeTab?"#fff":"var(--primary)"};
805
+ padding: 0.6em 1.5em;
806
+ font-size: 14px;
807
+ text-transform: none;
808
+ border-radius: 4px 4px 0 0;
809
+ margin-right: 0.5rem;
810
+ box-shadow: none;
811
+ "
812
+ >
813
+ <lang-text text="add_to_mailing_list_question"></lang-text>
814
+ </paper-button>
815
+ <paper-button
816
+ @click=${()=>this.onTabChange("remove")}
817
+ style="
818
+ background: ${"remove"===this.activeTab?"#f44336":"transparent"};
819
+ color: ${"remove"===this.activeTab?"#fff":"#f44336"};
820
+ padding: 0.6em 1.5em;
821
+ font-size: 14px;
822
+ text-transform: none;
823
+ border-radius: 4px 4px 0 0;
824
+ box-shadow: none;
825
+ "
826
+ >
827
+ <lang-text
828
+ text="remove_from_mailing_list_question"
829
+ ></lang-text>
830
+ </paper-button>
831
+ </cdtr-row>
832
+ </div>
833
+
834
+ <!-- Add to mailing list section -->
835
+ ${"add"===this.activeTab?s.qy`
836
+ <div class="action-section">
837
+ <div class="mailing-lists-list" style="padding-left: 1rem;">
838
+ ${this.mailingLists.map(t=>{const e=this.selectedMailingListsForAdd.includes(t.id);return s.qy`
839
+ <div
840
+ class="mailing-list-item ${e?"selected":""}"
841
+ @click=${()=>this.onMailingListToggle(t.id,"add")}
842
+ style="
843
+ padding: 0.75rem;
844
+ margin-bottom: 0.5rem;
845
+ cursor: pointer;
846
+ border-radius: 4px;
847
+ transition: all 0.2s;
848
+ border: 2px solid ${e?"var(--primary)":"#e0e0e0"};
849
+ background: ${e?"#e3f2fd":"#fff"};
850
+ "
851
+ @mouseenter=${t=>{e||(t.currentTarget.style.borderColor="var(--primary)",t.currentTarget.style.background="#f5f5f5")}}
852
+ @mouseleave=${t=>{e||(t.currentTarget.style.borderColor="#e0e0e0",t.currentTarget.style.background="#fff")}}
853
+ >
854
+ <cdtr-row
855
+ justify="space-between"
856
+ alignItems="center"
857
+ >
858
+ <cdtr-title
859
+ style="font-size: 13px; color: ${e?"var(--primary)":"#333"}; font-weight: ${e?"600":"400"};"
860
+ >
861
+ ${t.name}
862
+ </cdtr-title>
863
+ ${e?s.qy`
864
+ <span
865
+ style="color: var(--primary); font-weight: bold; font-size: 18px; margin-left: 0.5rem;"
866
+ >✓</span
867
+ >
868
+ `:s.qy`
869
+ <span
870
+ style="color: #ddd; font-size: 18px; margin-left: 0.5rem;"
871
+ >○</span
872
+ >
873
+ `}
874
+ </cdtr-row>
875
+ </div>
876
+ `})}
877
+ </div>
878
+ </div>
879
+ `:null}
880
+
881
+ <!-- Remove from mailing list section -->
882
+ ${"remove"===this.activeTab?s.qy`
883
+ <div class="action-section">
884
+ <div class="mailing-lists-list" style="padding-left: 1rem;">
885
+ ${this.mailingLists.map(t=>{const e=this.selectedMailingListsForRemove.includes(t.id);return s.qy`
886
+ <div
887
+ class="mailing-list-item ${e?"selected":""}"
888
+ @click=${()=>this.onMailingListToggle(t.id,"remove")}
889
+ style="
890
+ padding: 0.75rem;
891
+ margin-bottom: 0.5rem;
892
+ cursor: pointer;
893
+ border-radius: 4px;
894
+ transition: all 0.2s;
895
+ border: 2px solid ${e?"#f44336":"#e0e0e0"};
896
+ background: ${e?"#ffebee":"#fff"};
897
+ "
898
+ @mouseenter=${t=>{e||(t.currentTarget.style.borderColor="#f44336",t.currentTarget.style.background="#f5f5f5")}}
899
+ @mouseleave=${t=>{e||(t.currentTarget.style.borderColor="#e0e0e0",t.currentTarget.style.background="#fff")}}
900
+ >
901
+ <cdtr-row
902
+ justify="space-between"
903
+ alignItems="center"
904
+ >
905
+ <cdtr-title
906
+ style="font-size: 13px; color: ${e?"#f44336":"#333"}; font-weight: ${e?"600":"400"};"
907
+ >
908
+ ${t.name}
909
+ </cdtr-title>
910
+ ${e?s.qy`
911
+ <span
912
+ style="color: #f44336; font-weight: bold; font-size: 18px; margin-left: 0.5rem;"
913
+ >✓</span
914
+ >
915
+ `:s.qy`
916
+ <span
917
+ style="color: #ddd; font-size: 18px; margin-left: 0.5rem;"
918
+ >○</span
919
+ >
920
+ `}
921
+ </cdtr-row>
922
+ </div>
923
+ `})}
924
+ </div>
925
+ </div>
926
+ `:null}
927
+ </div>
928
+
929
+ <div
930
+ class="automation-footer"
931
+ style="flex: 0 0 auto; padding: 10px; border-top: 1px solid #e0e0e0; background: #fff;"
932
+ >
933
+ <cdtr-row justify="flex-end">
934
+ <paper-button
935
+ @click=${this.onSaveAutomation}
936
+ ?disabled=${!t}
937
+ style="
938
+ background: ${t?"var(--primary)":"#ccc"};
939
+ color: #fff;
940
+ padding: 0.6em 1.5em;
941
+ font-size: 14px;
942
+ text-transform: none;
943
+ cursor: ${t?"pointer":"not-allowed"};
944
+ "
945
+ >
946
+ <lang-text text="save"></lang-text>
947
+ </paper-button>
948
+ </cdtr-row>
949
+ </div>
950
+ </div>
951
+ `}}}customElements.get("paper-button")||Promise.resolve().then(i.bind(i,39239)),customElements.get("cdtr-emoji-picker")||i.e(3105).then(i.t.bind(i,63105,23));class x extends(v(s.WF)){constructor(){super(),this.inputRef=(0,a._)(),this.onBlur=this.onBlur.bind(this),this.onKeyDown=this.onKeyDown.bind(this),this.urlInputFocused=!1,this._urlInputRawValue="",this._lastSyncedMyHref=void 0,this._lastBodySyncHref=void 0,this.lastUrl=void 0,this.target="_blank",this.anchors=[],this.event=new UIEvent("change",{view:window,bubbles:!0,cancelable:!0}),this.options=c,this.body="",this.subject="",this.name=o.M.get("lang",c[0].text),this.initAutomations()}onDispatch(){const t=function(t){const{href:e,protocol:i,params:s,body:o,subject:r,target:n,dispatchEvent:a,event:l}=t;if(!e)return a(l),{dispatched:!0};const c=g(e,i,s,o,r,n);return c?{dispatched:!0,href:c.url,protocol:c.protocol,params:c.params,value:c.url,link:c.url,lastUrl:c.url}:{dispatched:!1}}({href:this.href,protocol:this.protocol,params:this.params,body:this.body,subject:this.subject,target:this.target,dispatchEvent:this.dispatchEvent.bind(this),event:this.event});if(t.dispatched){if(t.href){this.href=t.href,this.protocol=t.protocol,this.params=t.params?{...t.params}:{},this.value=t.value,this.link=t.link,this.lastUrl=t.lastUrl;const e="string"==typeof t.href?t.href:t.href?.href;this._urlInputRawValue=null!=e&&""!==e?String(e):""}this.dispatchEvent(this.event)}}onChangeLink(t){const e=t.target.value;this._urlInputRawValue=e;const i=b(e,this.protocol,this.href);null!==i?(this.href=i.href,this.protocol=i.protocol,i.clearParams&&(this.body="",this.subject=""),void 0!==i.body&&(this.body=i.body),void 0!==i.subject&&(this.subject=i.subject),i.shouldBlur&&this.onBlur()):this.href=e}onKeyDown(t){if("submit"===t.type){const t=this.inputRef?.value;void 0!==t?.value&&this.onChangeLink({target:{value:t.value}}),t&&"function"==typeof t.success&&t.success(),this.onDispatch()}}onUrlInputFocus(){const t=this.inputRef?.value?.value;null!=t&&(this._urlInputRawValue=t),this.urlInputFocused=!0}onUrlInputBlur(){this.urlInputFocused=!1,this.hasButton||this.onDispatch()}onBlur(){this.hasButton||this.onDispatch()}onClickOk(){this.onDispatch()}onChangeTarget(t){const e={target:t.target.value};this.target=e.target,t.stopPropagation(),!this.hasButton&&this.href&&this.onBlur()}resolveAnchors(){this.anchors=function(){const t=o.M.get("components");return t?.filter(t=>"anchor"===t.type&&t.props.name||t.props.element_ID)||[]}()}onChangeType(t){const e=function(t,e,i,s){const o=e.find(e=>e.type===t);if(!o)return{forceProtocolChange:!1};const r="anchor"===o.text,n=s!==o.type;return setTimeout(()=>{i&&i.value&&i.value.focus()},500),{protocol:o.type,forceProtocolChange:!0,shouldResolveAnchors:r,clearParams:n}}(t,this.options,this.inputRef,this.protocol);if(e.shouldResolveAnchors&&this.resolveAnchors(),this.protocol=e.protocol,this.forceProtocolChange=e.forceProtocolChange,e.clearParams&&(this.body="",this.subject=""),e.forceProtocolChange){const t=new r.A(this.href,{protocol:this.protocol});t.protocol=this.protocol,this.href=t,this.onBlur()}}connectedCallback(){super.connectedCallback(),this.href=new r.A(this.href);const t=String(this.href?.href||"").match(/^\[\[([^\]]+)\]\]\?/),e=this.href&&this.href.params&&this.href.params[p];(t||e)&&this.parseAutomationLink(this.href)}render(){const t=o.M.get("config","editor","configure","editorProps","linkPicker","savedVariables");this.resolveAnchors();const e=this.lastUrl!==this.href,i=new r.A(this.href,{protocol:e?null:this.protocol});this.protocol&&!e?i.protocol=this.protocol:i.protocol&&(this.protocol=i.protocol);const n=String(this.href?.href||this.href||"");if(this._lastBodySyncHref!==n){this._lastBodySyncHref=n,i.params?(this.body=i.params.text||i.params.body||"",this.subject=i.params.subject||""):(this.body="",this.subject="");n.match(/^\[\[([^\]]+)\]\]\?/)||i.params&&i.params[p]?(this.selectedAutomation=null,this.activeAutomationId=null,this.selectedMailingLists=[],this.selectedMailingListsForAdd=[],this.selectedMailingListsForRemove=[],this.automationAction=null,this.showAutomations=!0,this.parseAutomationLink(this.href)):(this.showAutomations=!1,this.selectedAutomation=null,this.activeAutomationId=null,this.selectedMailingLists=[],this.selectedMailingListsForAdd=[],this.selectedMailingListsForRemove=[],this.automationAction=null)}const l=function(t,e,i){let s=[];return t.isEmail?s=[]:t.isPhone?s=i.filter(t=>("tel:"===t.type||"sms:"===t.type||"whatsapp:"===t.type)&&t.type!==e):-1!==t.href.indexOf("http://")&&"https:"!==e&&(s=[{type:"https:",text:o.M.get("lang","is_user_wants_https"),reccomanded:!0}]),"anchor:"===e&&(s=[]),s}(i,this.protocol,this.options);let c=i.href;const d=String(i.href||""),h=d.match(/^\[\[([^\]]+)\]\]\?/),m=i.params&&i.params[p];if(h)c=d;else if(m){const t=u,e=[];i.params&&Object.keys(i.params).forEach(s=>{if(!t.includes(s)){const t=i.params[s];e.push(`${s}=${encodeURIComponent(t).replace(/%24/g,"$")}`)}});const s=i.url||"";c=i.protocol?"http:"===i.protocol||"https:"===i.protocol?`${i.protocol}//${s}`:`${i.protocol}${s}`:s,e.length>0&&(c+=`?${e.join("&")}`)}const g=function(t){switch(t){case"mailto:":return"what_the_email_address";case"tel:":return"what_the_phone_number";case"sms:":case"whatsapp:":return"what_the_phone_number_to_send_msg";case"anchor:":return"what_the_anchor_name";case"file:":return"what_the_file_name";default:return"what_the_url_address"}}(this.protocol),b=[...this.options],v=b.findIndex(t=>"http:"===t.type);v>-1&&b.splice(v,1);const x=o.M.get("config","editor","configure","editorProps","automations"),w={url:i,href:this.href,protocol:this.protocol,anchors:this.anchors,body:this.body,subject:this.subject,onChangeLink:this.onChangeLink.bind(this),onBlur:this.onBlur.bind(this),onRequest:this.onRequest,updateBody:t=>{this.body=t},updateSubject:t=>{this.subject=t}},$=null!=c&&""!==c?String(c):"",k=this._urlInputRawValue!==$,A=void 0!==this._lastSyncedMyHref&&$!==this._lastSyncedMyHref,_=this.urlInputFocused&&this._urlInputRawValue&&$&&!A;k&&!_?(this._urlInputRawValue=$,this._lastSyncedMyHref=$):k||(this._lastSyncedMyHref=$);const R=this.urlInputFocused&&void 0!==this._urlInputRawValue?this._urlInputRawValue:c,S={protocol:this.protocol,url:i,autofocus:this.autofocus,inputRef:(0,a.K)(this.inputRef),onChangeLink:this.onChangeLink.bind(this),onBlur:this.onUrlInputBlur.bind(this),onFocus:this.onUrlInputFocus.bind(this),onKeyDown:this.onKeyDown.bind(this),myHref:R};return this.showAutomations?s.qy` <div class="root">${this.renderAutomationsView()}</div>`:s.qy` <div class="root">
952
+ ${q=this.label,q?s.qy`<cdtr-title
953
+ style="font-weight: 700;
954
+ font-size: 14.4px;
955
+ margin-bottom: 0.6rem;
956
+ color: #000000b0;"
957
+ ><lang-text text=${q}></lang-text
958
+ ><cdtr-divider></cdtr-divider
959
+ ></cdtr-title>`:null}
960
+ <cdtr-row alignItems="center" justify="space-between" spacing="10">
961
+ ${E=this.options,B=this.protocol,M=this.onChangeType.bind(this),s.qy`
962
+ <cdtr-dropdown @change=${t=>M(t.target.value)}>
963
+ <cdtr-dropdown-button
964
+ minWidth=${100}
965
+ class=" dropdown-button"
966
+ slot="trigger"
967
+ ><lang-text
968
+ .text="${E.find(t=>t.type===B)?.text||"link"}"
969
+ ></lang-text>
970
+ </cdtr-dropdown-button>
971
+ <div slot="content">
972
+ ${E.map(t=>s.qy`<cdtr-dropdown-item
973
+ .focused=${t.type===B}
974
+ .selected=${t.type===B}
975
+ value="${t.type}"
976
+ ><lang-text text="${t.text}"></lang-text>
977
+ </cdtr-dropdown-item>`)}
978
+ </div>
979
+ </cdtr-dropdown>
980
+ `}
981
+ ${L=this.target,U=this.onChangeTarget.bind(this),s.qy`
982
+ <cdtr-dropdown @change=${t=>U(t)} style="min-width: 120px;">
983
+ <cdtr-dropdown-button minWidth=${120} class="dropdown-button" slot="trigger">
984
+ <lang-text .text=${L}></lang-text>
985
+ </cdtr-dropdown-button>
986
+ <div slot="content">
987
+ <cdtr-dropdown-item value="_blank" .selected=${"_blank"===L}>
988
+ <lang-text text="open_in_new_tab"></lang-text>
989
+ </cdtr-dropdown-item>
990
+ <cdtr-dropdown-item value="_self" .selected=${"_self"===L}>
991
+ <lang-text text="open_in_same_tab"></lang-text>
992
+ </cdtr-dropdown-item>
993
+ <cdtr-dropdown-item value="_parent" .selected=${"_parent"===L}>
994
+ <lang-text text="open_in_parent_frame"></lang-text>
995
+ </cdtr-dropdown-item>
996
+ <cdtr-dropdown-item value="_top" .selected=${"_top"===L}>
997
+ <lang-text text="open_in_top_frame"></lang-text>
998
+ </cdtr-dropdown-item>
999
+ </div>
1000
+ </cdtr-dropdown>
1001
+ `}
1002
+ </cdtr-row>
1003
+ <cdtr-row mt="1">
1004
+ ${function(t,e){return 0===t.length?null:s.qy`${t.map(t=>s.qy`<paper-button
1005
+ @click=${()=>e(t.type)}
1006
+ style="background:rgb(233, 237, 243);color:#000;font-size:13px;margin:0;margin-right:5px;"
1007
+ ><lang-text text="${t.text}"></lang-text
1008
+ ></paper-button>`)}`}(l,this.onChangeType.bind(this))}
1009
+ </cdtr-row>
1010
+
1011
+ <div class="input-wrapper">
1012
+ <cdtr-title class="explain-title"
1013
+ ><lang-text .text="${g}"></lang-text
1014
+ ></cdtr-title>
1015
+ ${function(t){const{protocol:e,url:i,autofocus:s,inputRef:o,onChangeLink:r,onBlur:n,onFocus:a,onKeyDown:l,myHref:c}=t;return"anchor:"===e?null:y({value:c,inputRef:o,autofocus:s,onChange:r,onBlur:n,onFocus:a,onKeyDown:l})}(S)}
1016
+ ${f(this.protocol,w)}
1017
+ ${x?s.qy` <cdtr-divider></cdtr-divider>
1018
+ <cdtr-row justify="flex-start" mt="1">
1019
+ <cdtr-title class="explain-title"
1020
+ ><lang-text
1021
+ whiteSpace="break-spaces"
1022
+ text="need_automations"
1023
+ ></lang-text>
1024
+ </cdtr-title>
1025
+ <paper-button
1026
+ @click=${this.onAutomationsClick.bind(this)}
1027
+ style="background:#000;color:#fff;font-size:13px;margin:0;width:100%;"
1028
+ >
1029
+ <lang-text text="menu_automations"></lang-text>
1030
+ </paper-button>
1031
+ <cdtr-divider></cdtr-divider
1032
+ ></cdtr-row>`:null}
1033
+ ${function(t,e,i,o){return t&&Array.isArray(t)&&0!==t.length?s.qy`<cdtr-list-picker
1034
+ .selected=${e}
1035
+ @change=${t=>{i({target:{value:t.target.value}}),o()}}
1036
+ heading="saved_links"
1037
+ .list=${t}
1038
+ ></cdtr-list-picker>`:null}(t,c,this.onChangeLink.bind(this),this.onBlur.bind(this))}
1039
+ </div>
1040
+
1041
+ ${C=this.hasButton,I=this.onClickOk.bind(this),C?s.qy`<hr style="margin: 1rem 0; border: none; border-top: 1px solid #e0e0e0;">
1042
+ <cdtr-row justify="flex-end" mt="1">
1043
+ <paper-button fullWidth @click=${I} raised class="add-button">
1044
+ <lang-text text="add_now"></lang-text>
1045
+ </paper-button>
1046
+ </cdtr-row>`:null}
1047
+ </div>`;var C,I,L,U,E,B,M,q}}x.styles=n,x.properties={href:{type:String,reflect:!0},value:{type:Object},protocol:{type:String},name:{type:String},label:{type:String},target:{type:String},hasButton:{type:Boolean},params:{type:Object},explain:{type:String},anchors:{type:Array},link:{},body:{type:String},subject:{type:String},autofocus:{type:Boolean},onRequest:{type:Function}},customElements.get("cdtr-link-element")||customElements.define("cdtr-link-element",x)},88385(t,e,i){i.d(e,{A:()=>a});const s=t=>!(!t||!t.match(/^(([^<>()[\]\\.,;:\s@"]+(\.[^<>()[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/)),o=t=>!(!t||!t.replace("-","").match(/^[+]*[(]{0,1}[0-9]{9,9}[)]{0,1}[-\s\./0-9]*$/g)&&!t.match(/[0-9]{3}-[0-9]{3}-[0-9]{4}/));function r(t){const e={},i=/([^&=]+)=?([^&]*)/g,s=t=>{try{return decodeURIComponent(t.replace(/\+/g," "))}catch(e){return t.replace(/\+/g," ")}},o=t.indexOf("?");let r,n=-1!==o?t.substring(o+1):"";for(;null!==(r=i.exec(n));){const t=s(r[1]),i=s(r[2]);t&&(e[t]=i)}return e}function n(t){if(!t)return"";let e=t.replace(/^[^:]+:(?:\/\/)?/,"");return e=e.replace(/^\/+/,""),e=e.split("?")[0],encodeURIComponent(e).replace(/%24/g,"$")}class a{static getProtocol(t){if(!t)return"";const e=t.indexOf(":");return e>0?t.slice(0,e):""}constructor(t,e){if(this.protocol="",this.href="",this.fullHref="",this.target="_self",this.isEmail=!1,this.isPhone=!1,this.isAnchor=!1,this.url="",this.isValid=!0,this.params={},"string"==typeof t?this.href=t:t&&"object"==typeof t&&Object.assign(this,t),/^\[\[[^\]]+\]\]\?/.test(this.href)){const t=this.href;this.isValid=!1,this.protocol=e?.protocol??"",this.isEmail=!1,this.isPhone=!1,this.isAnchor=!1,this.params={...this.params,...e?.params,...r(t)};const i=t.indexOf("?");return this.url=i>-1?t.slice(0,i):t,this.href=t,void(this.fullHref=t)}this.isValid=this.isValidUrl(this.href),this.protocol=e?.protocol??a.getProtocol(this.href);const i=function(t){if(!t)return"";let e=t.replace(/^[^:]+:(?:\/\/)?/,"");return e=e.replace(/^\/+/,""),e=e.split("?")[0],e}(this.href);if(this.isEmail=s(i),this.isPhone=o(i),this.protocol||(this.isEmail?this.protocol="mailto:":this.isPhone?this.protocol="tel:":this.isValid&&(this.protocol="https:")),this.isAnchor=this.href.startsWith("#"),e?.target){if(!["_blank","_self","_parent","_top"].includes(e.target))throw new Error(`Url: invalid target "${e.target}"`);this.target=e.target}this.params={...this.params,...e?.params,...r(this.href)},this.url=n(this.href),this.protocol&&!this.protocol.endsWith(":")&&(this.protocol+=":");const l="http:"===this.protocol||"https:"===this.protocol;this.href=l?`${this.protocol}//${this.url}`:this.protocol+this.url,this.fullHref=this.getUrlWithParams(),this.href=this.getUrlWithParams()}addParam(t,e){this.href=this.href.replace(new RegExp(`${t}=[^&]*`),`${t}=${e}`),this.params[t]=e}getUrlWithParams(){let t,e="";try{t=decodeURIComponent(this.url)}catch(e){t=this.url}if(Object.keys(this.params).length>0){t+="?",e="?";for(const i in this.params){const s=this.params[i],o=encodeURIComponent(i).replace(/%24/g,"$");if(s){const i=encodeURIComponent(s).replace(/%24/g,"$");t+=`${o}=${i}&`,e+=`${o}=${i}&`}else t+=`${o}&`,e+=`${o}&`}t=t.slice(0,-1)}const i=t=>{try{return decodeURIComponent(t)}catch{return t}};if(this.protocol&&("http:"===this.protocol||"https:"===this.protocol))return i(this.protocol+"//"+t);if("whatsapp:"===this.protocol){const s=this.extractPhoneFromTextUsingRegex(t);return s.length>0?i("https://wa.me/"+s[0]+e):i("https://wa.me/"+e)}return i(this.protocol+t)}extractPhoneFromTextUsingRegex(t){if(!t)return[];const e=[...t.matchAll(/(?:whatsapp:([^?\s]+)|\+?[\d\s\-\(\)\.]{7,20})/g)];return Array.from(new Set(e.map(t=>t[1]||t[0]).filter(t=>{const e=t.replace(/\D/g,"");return e.length>=7&&e.length<=15}).map(t=>t.trim())))}isValidUrl(t){if(!t)return!1;return/^(https?:\/\/)?([a-zA-Z0-9-]+\.)+[a-zA-Z]{2,}(\/.*)?$/.test(t)}}a.resetURL=n}}]);