@emailmaker/emailmaker 1.0.107-dev.3 → 1.0.107-dev.4

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 (325) hide show
  1. package/README.md +1 -1
  2. package/cli/dist/lib/cli/project.js +2 -16
  3. package/cli/dist/lib/config.js +20 -29
  4. package/cli/dist/lib/local-test.js +3 -19
  5. package/cli/dist/lib/paths.js +11 -0
  6. package/cli/dist/lib/resolveNpmSpawn.d.ts +20 -0
  7. package/cli/dist/lib/resolveNpmSpawn.js +71 -0
  8. package/cli/dist/lib/template-engine/context/pluginPackageJsonData.js +21 -19
  9. package/cli/dist/lib/template-engine/context/standVitePackageJsonData.js +7 -8
  10. package/cli/dist/lib/template-engine/resolveVariantDir.d.ts +5 -1
  11. package/cli/dist/lib/template-engine/resolveVariantDir.js +22 -0
  12. package/cli/dist/lib/templates/shared/i18n.js +2 -2
  13. package/cli/dist/lib/templates/shared/paths.js +3 -4
  14. package/cli/dist/lib/types/package-config.d.ts +1 -0
  15. package/cli/lib/cli/project.ts +2 -18
  16. package/cli/lib/config.ts +19 -30
  17. package/cli/lib/local-test.ts +3 -22
  18. package/cli/lib/paths.ts +15 -0
  19. package/cli/lib/resolveNpmSpawn.ts +72 -0
  20. package/cli/lib/template-engine/buildStandIndexHtml.test.ts +1 -0
  21. package/cli/lib/template-engine/context/pluginPackageJsonData.ts +23 -23
  22. package/cli/lib/template-engine/context/standVitePackageJsonData.ts +7 -12
  23. package/cli/lib/template-engine/pluginEtaParity.test.ts +1 -0
  24. package/cli/lib/template-engine/resolveVariantDir.ts +22 -0
  25. package/cli/lib/template-engine/standAdvancedViteDevHostEta.test.ts +4 -3
  26. package/cli/lib/template-engine/standWebpackDevHostEta.test.ts +7 -6
  27. package/cli/lib/templates/shared/i18n.ts +2 -2
  28. package/cli/lib/templates/shared/paths.ts +3 -4
  29. package/cli/lib/types/package-config.ts +1 -0
  30. package/cli/package.json +1 -1
  31. package/cli/project-templates/plugin/assets/vite/{plugin-build.config.mjs → plugin-build.config.ts} +7 -5
  32. package/cli/project-templates/plugin/assets/vite/{sandbox-build.config.mjs → sandbox-build.config.ts} +7 -5
  33. package/cli/project-templates/plugin/assets/webpack/{plugin-build.legacy.module.cjs → plugin-build.legacy.module.ts} +20 -7
  34. package/cli/project-templates/plugin/assets/webpack/{plugin-build.legacy.umd.cjs → plugin-build.legacy.umd.ts} +20 -7
  35. package/cli/project-templates/plugin/assets/webpack/{plugin-build.modern.module.cjs → plugin-build.modern.module.ts} +9 -4
  36. package/cli/project-templates/plugin/assets/webpack/{plugin-build.modern.umd.cjs → plugin-build.modern.umd.ts} +9 -4
  37. package/cli/project-templates/plugin/assets/webpack/{sandbox-build.config.cjs → sandbox-build.config.ts} +13 -3
  38. package/cli/project-templates/plugin/bundler-vite/release.html.eta +1 -0
  39. package/cli/project-templates/plugin/bundler-webpack/public/release.html.eta +1 -0
  40. package/cli/project-templates/plugin/shared-base/public/demo/product-1.svg +10 -0
  41. package/cli/project-templates/plugin/shared-base/public/demo/product-2.svg +10 -0
  42. package/cli/project-templates/plugin/shared-base/scripts/build-runner.ts +22 -0
  43. package/cli/project-templates/plugin/shared-base/scripts/build-types.ts +17 -0
  44. package/cli/project-templates/plugin/shared-base/scripts/clean.ts +16 -0
  45. package/cli/project-templates/plugin/shared-base/scripts/dev-runner.ts +52 -0
  46. package/cli/project-templates/plugin/shared-base/scripts/npmRun.ts +61 -0
  47. package/cli/project-templates/plugin/shared-base/scripts/release-runner.ts +18 -0
  48. package/cli/project-templates/plugin/shared-base/scripts/scriptRuntime.ts +10 -0
  49. package/cli/project-templates/plugin/shared-base/src/dev/hostApp.tsx.eta +1 -0
  50. package/cli/project-templates/plugin/shared-base/src/dev-release.tsx.eta +1 -0
  51. package/cli/project-templates/plugin/shared-base/src/dev.tsx.eta +1 -1
  52. package/cli/project-templates/shared/partials/plugin-dev-host-app-advanced.eta +93 -0
  53. package/cli/project-templates/shared/partials/plugin-dev-host-app-minimal.eta +54 -0
  54. package/cli/project-templates/shared/partials/plugin-dev-tsx-advanced.eta +3 -2
  55. package/cli/project-templates/shared/partials/plugin-dev-tsx-debug.eta +18 -0
  56. package/cli/project-templates/shared/partials/plugin-dev-tsx-release.eta +33 -0
  57. package/cli/project-templates/shared/partials/plugin-dev-tsx-runtime-helpers.eta +8 -8
  58. package/cli/project-templates/shared/partials/plugin-index-ts.eta +0 -1
  59. package/cli/project-templates/shared/partials/plugin-vite-dev-host.eta +9 -5
  60. package/cli/project-templates/shared/partials/plugin-vite-plugin-build.eta +7 -5
  61. package/cli/project-templates/shared/partials/plugin-vite-release-html.eta +12 -0
  62. package/cli/project-templates/shared/partials/plugin-vite-sandbox-build.eta +7 -5
  63. package/cli/project-templates/shared/partials/plugin-webpack-dev-host-legacy.eta +12 -5
  64. package/cli/project-templates/shared/partials/plugin-webpack-dev-host-modern.eta +13 -6
  65. package/cli/project-templates/shared/partials/plugin-webpack-release-html.eta +12 -0
  66. package/cli/project-templates/shared/partials/plugin-webpack-sandbox-build.eta +13 -3
  67. package/cli/project-templates/shared/partials/plugin-wp-legacy-module.eta +28 -10
  68. package/cli/project-templates/shared/partials/plugin-wp-legacy-umd.eta +28 -10
  69. package/cli/project-templates/shared/partials/plugin-wp-modern-module.eta +9 -4
  70. package/cli/project-templates/shared/partials/plugin-wp-modern-umd.eta +9 -4
  71. package/cli/project-templates/shared/partials/stand-dev-host-vite-memory.eta +3 -3
  72. package/cli/project-templates/shared/partials/stand-dev-host-vite-subpath.eta +8 -4
  73. package/cli/project-templates/shared/partials/stand-dev-host-vite-umd.eta +5 -5
  74. package/cli/project-templates/shared/partials/stand-dev-host-vite.eta +3 -3
  75. package/cli/project-templates/shared/partials/stand-dev-host-webpack-subpath.eta +8 -4
  76. package/cli/project-templates/shared/partials/stand-dev-host-webpack-umd.eta +9 -3
  77. package/cli/project-templates/shared/partials/stand-dev-host-webpack.eta +8 -4
  78. package/cli/project-templates/shared/partials/stand-dev-storage-middleware.eta +370 -0
  79. package/cli/project-templates/shared/stand-vite-base/config/lib/createViteStandConfig.ts +80 -0
  80. package/cli/project-templates/shared/stand-vite-base/scripts/devStorageMiddleware.ts.eta +1 -0
  81. package/cli/project-templates/shared/stand-webpack-base/config/lib/{createWebpackStandConfig.cjs → createWebpackStandConfig.ts} +31 -19
  82. package/cli/project-templates/{stand/advanced/umd/vite/config/lib/umdServeMiddleware.mjs → shared/stand-webpack-base/config/lib/umdServeMiddleware.ts} +19 -11
  83. package/cli/project-templates/shared/stand-webpack-base/scripts/devStorageMiddleware.ts.eta +1 -0
  84. package/cli/project-templates/stand/advanced/memory-usage/vite/config/lib/{createMemoryUsageStandConfig.mjs → createMemoryUsageStandConfig.ts} +25 -20
  85. package/cli/project-templates/stand/advanced/umd/vite/config/lib/umdServeMiddleware.ts +68 -0
  86. package/cli/project-templates/stand/react-adapter/webpack/README.md.eta +1 -0
  87. package/cli/project-templates/stand/react-adapter/webpack/config/dev-host.ts.eta +1 -0
  88. package/cli/project-templates/stand/react-adapter/webpack/package.json.eta +1 -0
  89. package/cli/project-templates/stand/react-adapter/webpack/public/index.html.eta +1 -0
  90. package/cli/project-templates/stand/react-adapter/webpack/src/dev/editorConfig.ts.eta +1 -0
  91. package/cli/project-templates/stand/react-adapter/webpack/src/dev/email.html.eta +1 -0
  92. package/cli/project-templates/stand/react-adapter/webpack/src/dev/getAuthToken.ts.eta +1 -0
  93. package/cli/project-templates/stand/react-adapter/webpack/src/dev/oauthCredentials.ts +9 -0
  94. package/cli/project-templates/stand/react-adapter/webpack/src/dev/storageProvider.ts.eta +1 -0
  95. package/cli/project-templates/stand/react-adapter/webpack/src/index.tsx.eta +1 -0
  96. package/cli/scripts/cli-matrix-smoke.ts +19 -10
  97. package/cli/scripts/verify-global-cli.ts +1 -1
  98. package/cli/scripts/vite-plugin-version-matrix.ts +299 -0
  99. package/cli/tsconfig.json +2 -2
  100. package/emailmaker-core.aa9efbce.js +1 -0
  101. package/emailmaker-esm.js +788 -153
  102. package/emailmaker.d.ts +32 -0
  103. package/emailmaker.js +4 -4
  104. package/iframe/js/amp.BGJMqoms.js +1 -1
  105. package/iframe/js/chunk.oX6nCJbK.js +1 -1
  106. package/iframe/js/iframe-eblock.js +1 -1
  107. package/iframe/js/iframe.js +1 -1
  108. package/iframe/js/rules.BSaCN7eK.js +1 -1
  109. package/iframe/js/sanitize-html.Dy7Uwo8P.js +1 -1
  110. package/images/integrations/activecampaign.svg +4 -0
  111. package/images/integrations/bento.svg +9 -0
  112. package/images/integrations/brevo.svg +7 -0
  113. package/images/integrations/campaign_monitor.svg +10 -0
  114. package/images/integrations/constant_contact.svg +24 -0
  115. package/images/integrations/dotdigital.svg +144 -0
  116. package/images/integrations/getresponse.svg +23 -0
  117. package/images/integrations/hubspot.svg +3 -0
  118. package/images/integrations/klaviyo.svg +10 -0
  119. package/images/integrations/mailchimp.svg +9 -0
  120. package/images/integrations/salesforce.svg +20 -0
  121. package/js/browser-image-compression.js +9 -0
  122. package/package.json +2 -5
  123. package/runtime/@ant-design/cssinjs/index.js +1 -1
  124. package/runtime/@ant-design/icons/index.js +1 -1
  125. package/runtime/@ant-design/pro-layout/index.js +1 -1
  126. package/runtime/README.md +13 -13
  127. package/runtime/antd/index.js +1 -1
  128. package/runtime/app-core/index.js +1 -2
  129. package/runtime/classnames/index.js +1 -1
  130. package/runtime/core/index.js +6 -6
  131. package/runtime/dayjs/index.js +1 -1
  132. package/runtime/di/index.js +1 -2
  133. package/runtime/disposable/index.js +1 -2
  134. package/runtime/errors-runtime/index.js +1 -2
  135. package/runtime/guid/index.js +1 -2
  136. package/runtime/index.js +2 -4
  137. package/runtime/package.json +2 -3
  138. package/runtime/prop-types/index.js +1 -1
  139. package/runtime/react/index.js +1 -1
  140. package/runtime/react/jsx-dev-runtime/index.js +1 -1
  141. package/runtime/react/jsx-runtime/index.js +1 -1
  142. package/runtime/react-dom/client/index.js +1 -1
  143. package/runtime/react-dom/index.js +1 -1
  144. package/runtime/react-router-dom/index.js +1 -1
  145. package/runtime/uuid/index.js +1 -1
  146. package/static/amd/{8fc2a596.js → 19aeb269.js} +88 -88
  147. package/static/core/192ec827.js +1 -0
  148. package/static/core/22c1de2e2.js +1 -0
  149. package/static/core/24faedf0.js +1 -0
  150. package/static/core/29231645.js +1 -0
  151. package/static/core/2a3177fc2.js +1 -0
  152. package/static/core/346aabd2.js +3 -0
  153. package/static/core/3b800ed6.js +1 -0
  154. package/static/core/3e840e90.js +1 -0
  155. package/static/core/40cc9fd7.js +1 -0
  156. package/static/core/421bdec22.js +1 -0
  157. package/static/core/4aaa358b2.js +903 -0
  158. package/static/core/50ff48bc.js +4 -0
  159. package/static/core/5282795d2.js +6 -0
  160. package/static/core/563a283d.js +1 -0
  161. package/static/core/5d47e095.js +47 -0
  162. package/static/core/5f574386.js +1 -0
  163. package/static/core/67a41193.js +1 -0
  164. package/static/core/698dace4.js +7 -0
  165. package/static/core/6b648e2d.js +1 -0
  166. package/static/core/7629adfd.js +1 -0
  167. package/static/core/7717f2932.js +3 -0
  168. package/static/core/776cb34a.js +1 -0
  169. package/static/core/78a1e31e.js +1 -0
  170. package/static/core/7d56d643.js +1 -0
  171. package/static/core/841752212.js +40 -0
  172. package/static/core/8477e97e.js +1 -0
  173. package/static/core/8756d562.js +1 -0
  174. package/static/core/91d328d8.js +1 -0
  175. package/static/core/9270dbb6.js +6 -0
  176. package/static/core/96371334.js +566 -0
  177. package/static/core/9b9ddaef2.js +168 -0
  178. package/static/core/af1da4b4.js +1 -0
  179. package/static/core/b5096b152.js +471 -0
  180. package/static/core/bde6775a.js +1 -0
  181. package/static/core/bf1b888c.js +4 -0
  182. package/static/core/cec8d739.js +11 -0
  183. package/static/core/cf45bf332.js +598 -0
  184. package/static/core/cfac3d32.js +1 -0
  185. package/static/core/d21c95cf2.js +1 -0
  186. package/static/core/dbd9ca52.js +1 -0
  187. package/static/core/dc590181.js +1 -0
  188. package/static/core/e0039d55.js +1 -0
  189. package/static/core/e4071c1a.js +4 -0
  190. package/static/core/ef87b75c.js +41 -0
  191. package/static/core/f47701f32.js +20 -0
  192. package/static/core/f83d7ac42.js +3 -0
  193. package/static/core/fcc67e6b.js +1 -0
  194. package/static/core/fd40d85c.js +1 -0
  195. package/static/core/fe638847.js +1 -0
  196. package/static/esm/{e8401d17.js → 203c9644.js} +3 -3
  197. package/static/esm/4b679053.js +27 -0
  198. package/static/esm/{b273a6c2.js → f31a26c6.js} +1 -1
  199. package/static/runtime/disposable-CD74igiJ.js +1 -0
  200. package/static/runtime/guid-C0wuVR8v.js +1 -0
  201. package/vite/index.d.ts +17 -6
  202. package/vite/index.js +315 -270
  203. package/vite/pluginDev/index.d.ts +10 -19
  204. package/vite/pluginDev/index.js +251 -204
  205. package/webpack/index.d.ts +24 -5
  206. package/webpack/index.js +168 -144
  207. package/webpack/pluginDev/index.d.ts +21 -22
  208. package/webpack/pluginDev/index.js +242 -177
  209. package/cli/dist/lib/template-engine/buildStandIndexHtml.test.d.ts +0 -2
  210. package/cli/dist/lib/template-engine/buildStandIndexHtml.test.js +0 -89
  211. package/cli/dist/lib/template-engine/emitEtaTree.test.d.ts +0 -2
  212. package/cli/dist/lib/template-engine/emitEtaTree.test.js +0 -34
  213. package/cli/dist/lib/template-engine/pluginEtaParity.test.d.ts +0 -2
  214. package/cli/dist/lib/template-engine/pluginEtaParity.test.js +0 -105
  215. package/cli/dist/lib/template-engine/resolveVariantDir.test.d.ts +0 -2
  216. package/cli/dist/lib/template-engine/resolveVariantDir.test.js +0 -52
  217. package/cli/dist/lib/template-engine/standAdvancedViteDevHostEta.test.d.ts +0 -2
  218. package/cli/dist/lib/template-engine/standAdvancedViteDevHostEta.test.js +0 -67
  219. package/cli/dist/lib/template-engine/standWebpackDevHostEta.test.d.ts +0 -2
  220. package/cli/dist/lib/template-engine/standWebpackDevHostEta.test.js +0 -83
  221. package/cli/dist/lib/template-engine/storageProviderEta.test.d.ts +0 -2
  222. package/cli/dist/lib/template-engine/storageProviderEta.test.js +0 -26
  223. package/cli/project-templates/plugin/shared-base/scripts/build-types.cjs +0 -8
  224. package/cli/project-templates/plugin/shared-base/scripts/clean.cjs +0 -6
  225. package/cli/project-templates/plugin/shared-base/scripts/dev-runner.cjs +0 -48
  226. package/cli/project-templates/plugin/shared-base/scripts/release-runner.cjs +0 -63
  227. package/cli/project-templates/shared/stand-vite-base/config/lib/createViteStandConfig.mjs +0 -80
  228. package/cli/project-templates/shared/stand-vite-base/scripts/devStorageMiddleware.cjs +0 -235
  229. package/cli/project-templates/shared/stand-webpack-base/config/lib/umdServeMiddleware.cjs +0 -38
  230. package/cli/project-templates/shared/stand-webpack-base/scripts/devStorageMiddleware.cjs +0 -235
  231. package/emailmaker-core.80d62b88.js +0 -569
  232. package/runtime/_core/app-core/index.js +0 -1
  233. package/runtime/_core/chunks/app-core-DphKKh8f.js +0 -1
  234. package/runtime/_core/chunks/chunk-oqAt0Dze.js +0 -1
  235. package/runtime/_core/chunks/di-BHUzE57z.js +0 -1
  236. package/runtime/_core/chunks/disposable-PhM3rJkj.js +0 -1
  237. package/runtime/_core/chunks/errors-runtime-VjCOXaQX.js +0 -1
  238. package/runtime/_core/chunks/guid-D2-FTZQG.js +0 -1
  239. package/runtime/_core/di/index.js +0 -1
  240. package/runtime/_core/disposable/index.js +0 -1
  241. package/runtime/_core/errors-runtime/index.js +0 -1
  242. package/runtime/_core/guid/index.js +0 -1
  243. package/runtime/_core/index.js +0 -1
  244. package/shared/hostBootstrap.js +0 -47
  245. package/shared/pluginDevOptions.js +0 -31
  246. package/shared/runtimeManifest.js +0 -72
  247. package/shared/stringCase.js +0 -16
  248. package/static/core/2360f32a.js +0 -3
  249. package/static/core/2687db56.js +0 -3
  250. package/static/core/2b250af6.js +0 -1261
  251. package/static/core/3469930c.js +0 -302
  252. package/static/core/34ce9042.js +0 -201
  253. package/static/core/4091ba5b.js +0 -25
  254. package/static/core/41ce3a6a.js +0 -173
  255. package/static/core/4ac4908c.js +0 -2213
  256. package/static/core/519096c1.js +0 -2597
  257. package/static/core/5fa1772b.js +0 -116550
  258. package/static/core/61312909.js +0 -3
  259. package/static/core/62a98c07.js +0 -75301
  260. package/static/core/6309c0f2.js +0 -3
  261. package/static/core/68d9f440.js +0 -3
  262. package/static/core/73b645ab.js +0 -2
  263. package/static/core/81019351.js +0 -280
  264. package/static/core/835b37ef.js +0 -591
  265. package/static/core/91242fb3.js +0 -3
  266. package/static/core/972b15b0.js +0 -92399
  267. package/static/core/974ef468.js +0 -493
  268. package/static/core/a17614422.js +0 -38078
  269. package/static/core/a2fa7b5b.js +0 -4232
  270. package/static/core/a513adfd.js +0 -89857
  271. package/static/core/a7c73a9b.js +0 -3813
  272. package/static/core/b64c7c90.js +0 -228
  273. package/static/core/cdc9ba92.js +0 -4711
  274. package/static/core/d1db685d.js +0 -2193
  275. package/static/core/d661febc.js +0 -3
  276. package/static/core/d6d2d2d0.js +0 -23
  277. package/static/core/df1a1225.js +0 -607
  278. package/static/core/e5bff179.js +0 -1302
  279. package/static/core/e5d602f5.js +0 -2
  280. package/static/core/eb029366.js +0 -1532
  281. package/static/core/f46c035a.js +0 -2
  282. package/static/core/f8b9d89a.js +0 -461
  283. package/static/core/fd897ad7.js +0 -3
  284. package/static/core/fdd890c7.js +0 -6168
  285. package/static/esm/29eb18ff.js +0 -164
  286. package/vite/mime-types.js +0 -179
  287. package/vite/utils.js +0 -44
  288. /package/cli/project-templates/plugin/bundler-vite/config/{dev-host.mjs.eta → dev-host.ts.eta} +0 -0
  289. /package/cli/project-templates/plugin/bundler-vite/config/{plugin-build.mjs.eta → plugin-build.ts.eta} +0 -0
  290. /package/cli/project-templates/plugin/bundler-vite/config/{sandbox-build.mjs.eta → sandbox-build.ts.eta} +0 -0
  291. /package/cli/project-templates/plugin/bundler-webpack/config/{dev-host.cjs.eta → dev-host.ts.eta} +0 -0
  292. /package/cli/project-templates/plugin/bundler-webpack/config/{plugin-build.cjs.eta → plugin-build.ts.eta} +0 -0
  293. /package/cli/project-templates/plugin/bundler-webpack/config/{sandbox-build.cjs.eta → sandbox-build.ts.eta} +0 -0
  294. /package/cli/project-templates/stand/advanced/memory-usage/vite/config/{dev-host.mjs.eta → dev-host.ts.eta} +0 -0
  295. /package/cli/project-templates/stand/advanced/shadow-dom/vite/config/{dev-host.mjs.eta → dev-host.ts.eta} +0 -0
  296. /package/cli/project-templates/stand/advanced/shadow-dom/webpack/config/{dev-host.cjs.eta → dev-host.ts.eta} +0 -0
  297. /package/cli/project-templates/stand/advanced/subpath/vite/config/{dev-host.mjs.eta → dev-host.ts.eta} +0 -0
  298. /package/cli/project-templates/stand/advanced/subpath/webpack/config/{dev-host.cjs.eta → dev-host.ts.eta} +0 -0
  299. /package/cli/project-templates/stand/advanced/umd/vite/config/{dev-host.mjs.eta → dev-host.ts.eta} +0 -0
  300. /package/cli/project-templates/stand/advanced/umd/webpack/config/{dev-host.cjs.eta → dev-host.ts.eta} +0 -0
  301. /package/cli/project-templates/stand/closed-loop/vite/config/{dev-host.mjs.eta → dev-host.ts.eta} +0 -0
  302. /package/cli/project-templates/stand/closed-loop/webpack/config/{dev-host.cjs.eta → dev-host.ts.eta} +0 -0
  303. /package/cli/project-templates/stand/oauth/vite/config/{dev-host.mjs.eta → dev-host.ts.eta} +0 -0
  304. /package/cli/project-templates/stand/oauth/webpack/config/{dev-host.cjs.eta → dev-host.ts.eta} +0 -0
  305. /package/cli/project-templates/stand/react-adapter/vite/config/{dev-host.mjs.eta → dev-host.ts.eta} +0 -0
  306. /package/iframe/{iframe-eblock.80d62b88.html → iframe-eblock.aa9efbce.html} +0 -0
  307. /package/iframe/{iframe.80d62b88.html → iframe.aa9efbce.html} +0 -0
  308. /package/{runtime/chunks → static/runtime}/DownloadOutlined-a2ZUz7zB.js +0 -0
  309. /package/{runtime/chunks → static/runtime}/chunk-D-iEO58U.js +0 -0
  310. /package/{runtime/chunks → static/runtime}/classnames-DBEldvch.js +0 -0
  311. /package/{runtime/chunks → static/runtime}/client-5XqXGmAI.js +0 -0
  312. /package/{runtime/chunks → static/runtime}/dayjs.min-CO3mzOeV.js +0 -0
  313. /package/{runtime/_core/chunks/defineProperty-BGJFuFMq.js → static/runtime/defineProperty-CGNmw-jw.js} +0 -0
  314. /package/{runtime/chunks → static/runtime}/dist-Cns8cA2n.js +0 -0
  315. /package/{runtime/chunks → static/runtime}/dist-Ct0xRt3Y.js +0 -0
  316. /package/{runtime/chunks → static/runtime}/es-0FFT3fCz.js +0 -0
  317. /package/{runtime/chunks → static/runtime}/es-BwJ3eGbx.js +0 -0
  318. /package/{runtime/chunks → static/runtime}/es-D8EsVtRL.js +0 -0
  319. /package/{runtime/chunks → static/runtime}/es-Da4O25Kw.js +0 -0
  320. /package/{runtime/chunks → static/runtime}/jsx-dev-runtime-V4_MuHNS.js +0 -0
  321. /package/{runtime/chunks → static/runtime}/jsx-runtime-DBeCoE0b.js +0 -0
  322. /package/{runtime/chunks → static/runtime}/objectWithoutProperties-Bk0EDksJ.js +0 -0
  323. /package/{runtime/chunks → static/runtime}/prop-types-DxD5wgQ0.js +0 -0
  324. /package/{runtime/chunks → static/runtime}/react-TEeeBWTl.js +0 -0
  325. /package/{runtime/chunks → static/runtime}/react-dom-BKKa1g6U.js +0 -0
@@ -1,302 +0,0 @@
1
- (function(){try{if(typeof document<`u`){var e=document.createElement(`style`);e.setAttribute(`data-emailmaker`,`true`),e.appendChild(document.createTextNode(`.blocks-app .ant-modal.premium-features-modal .ant-modal-content{border-radius:calc(var(--borderRadiusXL) * 2px);padding:20px 19px}.blocks-app .premium-features-modal .modal-title{text-align:center;margin-bottom:0;font-size:32px}.blocks-app .premium-features-modal .ant-carousel .slick-dots li button{opacity:.5;background:#fff}.blocks-app .premium-features-modal .ant-carousel .slick-dots li.slick-active button{opacity:1}.blocks-app .premium-features-modal .modal-subtitle{text-align:center;margin-bottom:20px;font-size:18px}.blocks-app .premium-features-modal .carousel-slider{margin-bottom:20px}.blocks-app .premium-features-modal .slick-list{border-radius:calc(var(--borderRadiusXL) * 1.5px)}.blocks-app .premium-features-modal .slick-slide{padding:0 5px}.blocks-app .premium-features-modal .carousel-slide{border-radius:calc(var(--borderRadiusXL) * 1.5px);justify-content:flex-end;align-items:center;height:480px;display:flex}.blocks-app .premium-features-modal .slide-item-image{width:50%;padding:24px 0 24px 32px}.blocks-app .premium-features-modal .slide-item-image img{border-radius:calc(var(--borderRadiusXL) * 1.3px);width:100%}.blocks-app .premium-features-modal .slide-item-content{width:50%;padding:48px}.blocks-app .premium-features-modal .slide-title{margin-bottom:48px;font-size:50px;font-weight:700;line-height:1}.blocks-app .premium-features-modal .slide-description{font-size:22px}.blocks-app .premium-features-modal .modal-buttons{justify-content:center;gap:10px;display:flex}.blocks-app .premium-features-modal .modal-buttons button{padding:0 30px}`)),document.head.appendChild(e)}}catch(e){console.error(`vite-plugin-css-injected-by-js`,e)}})();import { s as e } from "./d6d2d2d0.js";
2
- import { i as t } from "./4091ba5b.js";
3
- import { Bt as n, K as r, c as i, ct as a, r as o, vt as s, wt as c } from "./cdc9ba92.js";
4
- import { Ft as l, Ht as u, Rt as d, c as f, t as p } from "./4ac4908c.js";
5
- import { m, n as h } from "./a2fa7b5b.js";
6
- import { d as g, l as _ } from "./972b15b0.js";
7
- import { on as ee, sn as v } from "./5fa1772b.js";
8
- import { ut as y, v as b, xt as x } from "./df1a1225.js";
9
- //#region src/services/imageApi.ts
10
- var S = ee(), C = "https://api.unsplash.com", te = "https://api.giphy.com/v1/gifs", w = h({
11
- reducerPath: "imageApi",
12
- baseQuery: void 0,
13
- endpoints: (e) => ({
14
- getImageInfo: e.query({ queryFn: async function(e, t) {
15
- try {
16
- let n = t.getState().configSlice?.config?.imageInfoToolUrl || "https://scr.emcdn.ru/imageinfo";
17
- return { data: await (await fetch(`${n}?url=${encodeURIComponent(e)}`)).json() };
18
- } catch {}
19
- } }),
20
- getSearchImage: e.query({ queryFn: async function({ query: e, page: t }) {
21
- let n = e.keywords.replace(/[^\w\d\sа-яёА-ЯЁ]|_/g, "").replace(/[\s_-]+/g, " ");
22
- try {
23
- let r = "https://api.emailmaker.ru/services/stock_images"?.trim(), i;
24
- return i = r ? `${r.replace(/\/$/, "")}/search/photos?client_id=HX2_qqq3F3ljmtYtfmb9P6h0dn2u9mnnOl36IdV8el0&lang=ru&per_page=18&query=${encodeURIComponent(n)}&page=${t}` : `https://api.emailmaker.ru/services/agent/photos?client_id=HX2_qqq3F3ljmtYtfmb9P6h0dn2u9mnnOl36IdV8el0&lang=ru&per_page=18&query=${n}&page=${t}&proxy_url=${C}/search`, e.color !== "" && (i += `&color=${e.color}`), e.orientation !== "" && (i += `&orientation=${e.orientation}`), { data: await (await fetch(i)).json() };
25
- } catch {}
26
- } }),
27
- getUnsplashImage: e.query({ queryFn: async function(e) {
28
- try {
29
- let t = `${e}&client_id=HX2_qqq3F3ljmtYtfmb9P6h0dn2u9mnnOl36IdV8el0`, n = "https://api.emailmaker.ru/services/stock_images"?.trim();
30
- if (n) try {
31
- let r = new URL(e);
32
- if (r.origin === "https://api.unsplash.com") {
33
- let e = n.replace(/\/$/, ""), i = r.search ? r.search.slice(1) + "&" : "";
34
- t = `${e}${r.pathname}?${i}client_id=HX2_qqq3F3ljmtYtfmb9P6h0dn2u9mnnOl36IdV8el0`;
35
- }
36
- } catch {}
37
- return { data: await (await fetch(t)).json() };
38
- } catch {}
39
- } }),
40
- sendAiImageRequest: e.query({ queryFn: async function({ body: e }, t) {
41
- try {
42
- return await l(t).saveFile.ai_create(e, { type: c.FormData });
43
- } catch (e) {
44
- throw Error(e);
45
- }
46
- } }),
47
- getAiImage: e.query({ queryFn: async function(e, t) {
48
- try {
49
- return await l(t).saveFile.ai_status_list(e);
50
- } catch {}
51
- } }),
52
- getAiImageSSE: e.query({
53
- queryFn: (e) => ({ data: [] }),
54
- async onCacheEntryAdded({ task_id: e, entity_id: t, setError: n }, c) {
55
- let { updateCachedData: u, cacheEntryRemoved: f } = c, p = l(c), m;
56
- m = p.baseUrl.indexOf("dev-") >= 0 ? p.baseUrl : p.baseUrl.indexOf("emailmaker") >= 0 ? s(a.maker) : s(a.blocks);
57
- let h = r.isPlugin ? await d.getInstance(c, o) : v.get(i.em_token), g = h ? { Authorization: `Bearer ${h}` } : {}, _ = new S.EventSourcePolyfill(` ${m}/ai-generator/v1/ai-status?entity_id=${t}&stream=1&task_id=${e}`, { headers: g });
58
- _.onmessage = (e) => {
59
- let t = JSON.parse(e.data);
60
- u((e) => {
61
- e.push(t);
62
- }), t.progress === 100 && _.close();
63
- }, _.onerror = (e) => {
64
- _.close();
65
- }, await f, _.close();
66
- }
67
- }),
68
- getSearchGif: e.query({ queryFn: async function({ query: e, page: t }) {
69
- let n = e.keywords.replace(/[^\w\d\sа-яёА-ЯЁ]|_/g, "").replace(/[\s_-]+/g, " ");
70
- try {
71
- let e = `${te}/search?api_key=Nh77eBlPeMn1ed9MBAvL542NUGeNO26F&q=${n}&limit=25&offset=${t}&lang=en`;
72
- return { data: await (await fetch(e)).json() };
73
- } catch {}
74
- } })
75
- })
76
- }), { useLazyGetImageInfoQuery: ne, useGetImageInfoQuery: re, useGetSearchImageQuery: ie, useLazyGetSearchImageQuery: T, useSendAiImageRequestQuery: ae, useLazySendAiImageRequestQuery: E, useGetAiImageQuery: oe, useLazyGetAiImageQuery: se, useGetUnsplashImageQuery: ce, useLazyGetUnsplashImageQuery: D, useGetSearchGifQuery: le, useLazyGetSearchGifQuery: O, useGetAiImageSSEQuery: ue, useLazyGetAiImageSSEQuery: k } = w, A = new URLSearchParams(window.location.search), j = A.get("tag"), M = A.get("folder"), N = u({
77
- activeModal: "",
78
- secondModal: "",
79
- projectsTotal: "",
80
- projectsTotalPages: "",
81
- folders: [],
82
- activeTagId: j || null,
83
- activeFolderId: M || (j ? null : "all"),
84
- activeTab: null,
85
- activeIntegration: null
86
- }), P = "projectsPageSlice", F = m({
87
- name: P,
88
- initialState: N,
89
- reducers: {
90
- openModal(e, t) {
91
- e.activeModal = t.payload;
92
- },
93
- setActiveTab(e, t) {
94
- e.activeTab = t.payload;
95
- },
96
- closeModal(e) {
97
- e.activeModal = "", e.activeIntegration = null;
98
- },
99
- openSecondModal(e, t) {
100
- e.secondModal = t.payload;
101
- },
102
- closeSecondModal(e) {
103
- e.secondModal = "";
104
- },
105
- setFolders(e, { payload: t }) {
106
- e.folders = t;
107
- },
108
- setActiveTagId(e, { payload: t }) {
109
- e.activeTagId = t;
110
- },
111
- setActiveIntegration(e, t) {
112
- e.activeIntegration = t.payload;
113
- }
114
- },
115
- extraReducers: (e) => {
116
- e.addMatcher(f.endpoints.getProjects.matchFulfilled, (e, { meta: t }) => {
117
- let n = t.baseQueryMeta?.response.headers.get("X-WP-Total"), r = t.baseQueryMeta?.response.headers.get("X-WP-TotalPages");
118
- e.projectsTotal = n, e.projectsTotalPages = r;
119
- }), e.addMatcher(p.endpoints.getFolders.matchFulfilled, (e, { payload: t }) => {
120
- e.folders = t;
121
- });
122
- }
123
- }), { openModal: I, setActiveTab: L, closeModal: de, openSecondModal: R, closeSecondModal: z, setFolders: fe, setActiveTagId: pe, setActiveIntegration: me } = F.actions, B = (e) => e[P].activeTab, V = (e) => e[P].activeModal, H = (e) => e[P].secondModal, U = (e) => e[P].activeIntegration, W = "imageSlice", G = m({
124
- name: W,
125
- initialState: u({
126
- currentImage: "",
127
- currentBackground: "",
128
- currentImageName: ""
129
- }),
130
- reducers: {
131
- setCurrentImageName(e, t) {
132
- e.currentImageName = t.payload;
133
- },
134
- setCurrentImage(e, t) {
135
- e.currentImage = t.payload;
136
- },
137
- setCurrentBackground(e, t) {
138
- e.currentBackground = t.payload;
139
- },
140
- clearCurrentImages(e, t) {
141
- e.currentImage = "", e.currentBackground = "", e.currentImageName = "";
142
- }
143
- }
144
- }), { setCurrentImage: K, setCurrentImageName: q, setCurrentBackground: J, clearCurrentImages: Y } = G.actions, he = (e) => e[W].currentImage, ge = (e) => e[W].currentImageName, X = (e) => e[W].currentBackground, Z = /* @__PURE__ */ e(n()), Q = /* @__PURE__ */ e(g()), _e = x(), $ = _(), ve = ({ open: e, sideOnOk: t, onCancel: n, initialSlide: r = 0 }) => {
145
- let { __: i } = b(), a = (0, _e.useNavigate)(), [o, s] = (0, Z.useState)(r), c = (0, Z.useRef)(null), l = y(), u = () => {
146
- t && t(), a("/billing"), n(!1);
147
- };
148
- (0, Z.useEffect)(() => {
149
- e && c.current && (c.current.goTo(r, !0), s(r));
150
- }, [e, r]);
151
- let d = (0, Z.useMemo)(() => [
152
- {
153
- image: i("https://cdn.useblocks.io/1351/241017_18_1sGjUaZ.png"),
154
- backgroundColor: "var(--blue-2)",
155
- title: i("More editing features"),
156
- description: i("Use our visual editor to customize every element to your needs: change borders and their radius, box shadows, paddings, background, and much more.")
157
- },
158
- {
159
- image: i("https://cdn.useblocks.io/1351/241017_18_J7QtvZ3.png"),
160
- backgroundColor: "var(--purple-2)",
161
- title: i("Work with the HTML code"),
162
- description: i("Edit the HTML version of your email template in the Code mode and see the changes in real time. Builder has no code restrictions — you can create templates of any complexity!")
163
- },
164
- {
165
- image: i("https://cdn.useblocks.io/1351/241017_18_2fjDRfL.png"),
166
- backgroundColor: "var(--cyan-2)",
167
- title: i("AI image generation"),
168
- description: i("Generate stunning visuals for your emails with ease. We have trained our AI model to ensure the highest quality images.")
169
- },
170
- {
171
- image: i("https://cdn.useblocks.io/1351/241017_18_D5C25Zp.png"),
172
- backgroundColor: "var(--green-2)",
173
- title: i("Stock photos and GIFs"),
174
- description: i("Search the vast gallery of stock photos and GIFs to find visuals for any occasion. You can filter the results by image orientation, color scheme, and more.")
175
- },
176
- {
177
- image: i("https://cdn.useblocks.io/1351/241017_18_NDYloAO.png"),
178
- backgroundColor: "var(--magenta-2)",
179
- title: i("Version history"),
180
- description: i("Check who and when made changes to the email template and, if necessary, restore one of the previous versions.")
181
- },
182
- {
183
- image: i("https://cdn.useblocks.io/1351/241017_18_g5mVlmh.png"),
184
- backgroundColor: "var(--red-2)",
185
- title: i("Image editor"),
186
- description: i("Want to resize an image, add some text, or apply a filter? No need to leave builder! You can make all the basic changes in our image editor.")
187
- },
188
- {
189
- image: i("https://cdn.useblocks.io/1351/241017_18_ur8Lh3W.png"),
190
- backgroundColor: "var(--orange-2)",
191
- title: i("Email optimization"),
192
- description: i("Check your email against broken links, missing alt texts, large images, and other issues that might prevent your emails from hitting inboxes.")
193
- },
194
- {
195
- image: i("https://cdn.useblocks.io/1351/241017_18_S5Pld9p.png"),
196
- backgroundColor: "var(--volcano-2)",
197
- title: i("Team collaboration"),
198
- description: i("Share the project with your team and collaborate in real time. Add comments to individual email blocks and discuss necessary edits right in the builder.")
199
- },
200
- {
201
- image: i("https://cdn.useblocks.io/1351/241017_18_tGbb2j9.png"),
202
- backgroundColor: "var(--geekblue-2)",
203
- title: i("Email testing"),
204
- description: i("Check how your email appears across various devices and email clients.")
205
- },
206
- {
207
- image: i("https://cdn.useblocks.io/1351/241017_18_gDXi4uM.png"),
208
- backgroundColor: "var(--geekblue-2)",
209
- title: i("AI assistant"),
210
- description: i("Let our AI assistant enhance your email template! From creating subject lines and preheaders based on the email copy to generating the whole email with your website in mind!")
211
- }
212
- ], [i]);
213
- return (0, Z.useEffect)(() => {
214
- if (e && c.current) {
215
- c.current.goTo(r, !0), s(r);
216
- let e = d[r];
217
- l({
218
- event: "open_modal",
219
- action: "open_premium-features_modal",
220
- modal_id: "premium-features",
221
- offer_id: e.title
222
- });
223
- }
224
- }, [
225
- e,
226
- d,
227
- r,
228
- l
229
- ]), /* @__PURE__ */ (0, $.jsxs)(Q.Modal, {
230
- open: e,
231
- footer: null,
232
- onCancel: n,
233
- centered: !0,
234
- closable: !1,
235
- className: "premium-features-modal",
236
- classNames: { mask: "premium-features-modal-mask" },
237
- styles: { mask: { background: "rgba(0, 0, 0, 0.65)" } },
238
- width: 1100,
239
- style: { maxWidth: "80%" },
240
- children: [
241
- /* @__PURE__ */ (0, $.jsx)(Q.Carousel, {
242
- dots: !0,
243
- slidesToShow: 1,
244
- slidesToScroll: 1,
245
- autoplay: !0,
246
- className: "carousel-slider",
247
- draggable: !0,
248
- autoplaySpeed: 5e3,
249
- initialSlide: o,
250
- ref: c,
251
- children: d.map((e, t) => /* @__PURE__ */ (0, $.jsx)("div", { children: /* @__PURE__ */ (0, $.jsxs)("div", {
252
- className: "carousel-slide",
253
- style: { background: `${e.backgroundColor}` },
254
- children: [/* @__PURE__ */ (0, $.jsx)("div", {
255
- className: "slide-item-image",
256
- children: /* @__PURE__ */ (0, $.jsx)("img", {
257
- src: e.image,
258
- alt: `slide-${t}`
259
- })
260
- }), /* @__PURE__ */ (0, $.jsxs)("div", {
261
- className: "slide-item-content",
262
- children: [/* @__PURE__ */ (0, $.jsx)("h3", {
263
- className: "slide-title",
264
- children: e.title
265
- }), /* @__PURE__ */ (0, $.jsx)("p", {
266
- className: "slide-description",
267
- children: e.description
268
- })]
269
- })]
270
- }) }, t))
271
- }),
272
- /* @__PURE__ */ (0, $.jsx)("div", {
273
- className: "modal-subtitle",
274
- children: i("This and other features are available for you on any paid plan.")
275
- }),
276
- /* @__PURE__ */ (0, $.jsxs)("div", {
277
- className: "modal-buttons",
278
- children: [/* @__PURE__ */ (0, $.jsx)(Q.Button, {
279
- size: "large",
280
- onClick: () => n(!1),
281
- children: i("Cancel")
282
- }), /* @__PURE__ */ (0, $.jsx)(Q.Button, {
283
- type: "primary",
284
- size: "large",
285
- onClick: u,
286
- style: { padding: "0 30px" },
287
- children: i("Select plan")
288
- })]
289
- })
290
- ]
291
- });
292
- };
293
- //#endregion
294
- //#region src/helpers/utils/html.ts
295
- function ye(e) {
296
- return e = e.replace(/<script[^>]*>([\S\s]*?)<\/script>/gim, ""), e = e.replace(/<\/?(?:script|embed|object|frameset|frame|iframe|applet|meta)[^>]*>/gi, ""), e = e.replace(/ on\w+="[^"]*"/g, ""), e = e.replace(/ on\w+='[^']*'/g, ""), e;
297
- }
298
- //#endregion
299
- //#region src/helpers/cookieManager.ts
300
- var be = () => d.useInstance(t);
301
- //#endregion
302
- export { k as C, D, T as E, E as O, w as S, O as T, U as _, G as a, H as b, ge as c, q as d, de as f, F as g, R as h, Y as i, J as l, I as m, ye as n, X as o, z as p, ve as r, he as s, be as t, K as u, V as v, ne as w, L as x, B as y };
@@ -1,201 +0,0 @@
1
- import { Ht as e, c as t, d as n, t as r } from "./4ac4908c.js";
2
- import { m as i } from "./a2fa7b5b.js";
3
- //#region src/slices/emailSlice.ts
4
- var a = e({
5
- invalidateEmailId: null,
6
- editorThemeColor: "light",
7
- isSettingsDisabled: !1,
8
- emailAutosaveTimestamps: {},
9
- settings: {
10
- backgroundColor: "",
11
- backgroundImage: [{
12
- type: "url",
13
- value: ""
14
- }],
15
- backgroundPositionX: "",
16
- backgroundPositionY: "",
17
- backgroundRepeat: "",
18
- textStrong: !1,
19
- textItalic: !1,
20
- textUnderline: !1
21
- },
22
- elementSettings: {},
23
- searchFilters: {},
24
- emailCommonStyles: "",
25
- saveTime: null,
26
- mobileViewActive: {
27
- shutdown: !0,
28
- styles: !0
29
- },
30
- email: {
31
- id: void 0,
32
- is_inited: !1,
33
- isNew: !1,
34
- subject: void 0,
35
- preheader: void 0,
36
- description: "",
37
- html: "",
38
- project: void 0,
39
- project_author: "",
40
- project_title: "",
41
- tags: [],
42
- utm_parameters: {
43
- utm_source: "",
44
- utm_medium: "",
45
- utm_campaign: "",
46
- utm_term: "",
47
- utm_content: ""
48
- },
49
- parent_email: null,
50
- common_styles: "{}",
51
- title: null,
52
- emailtags: [],
53
- group: [],
54
- isAmp: !1
55
- },
56
- emailIsEdit: !1,
57
- isCodeMode: !1,
58
- codeModeDirection: void 0,
59
- emailViewType: void 0,
60
- changeKey: null,
61
- problemsList: [],
62
- activeProblemRange: null,
63
- emailGroups: {},
64
- parentGroupOfProject: null,
65
- projectGroups: [],
66
- isNeedUpdateAppearance: !1,
67
- isNeedUpdateContentAppearance: !1
68
- }), o = "emailSlice", s = i({
69
- name: o,
70
- initialState: a,
71
- reducers: {
72
- setEditorThemeColor: (e, t) => {
73
- e.editorThemeColor = t.payload;
74
- },
75
- setEmailFromHistory: (e, { payload: t }) => {
76
- let n = e.email, r = t?.preheader === void 0, i = t?.subject === void 0;
77
- e.email = {
78
- ...n,
79
- html: t?.html,
80
- preheader: r ? n.preheader : t?.preheader,
81
- subject: i ? n.subject : t?.subject,
82
- common_styles: typeof t?.common_styles == "string" && t?.common_styles.startsWith("{") ? t?.common_styles : n.common_styles || "{}"
83
- }, e.isNeedUpdateAppearance = !0, e.isNeedUpdateContentAppearance = !0;
84
- },
85
- setEmailSettings: (e, { payload: t }) => {
86
- Object.assign(e, {
87
- ...e,
88
- settings: { ...t },
89
- isSettingsDisabled: !1
90
- });
91
- },
92
- setEmailSettingsDisable: (e, t) => {
93
- e.isSettingsDisabled = t.payload;
94
- },
95
- setElementSettings: (e, { payload: t }) => {
96
- e.elementSettings = t;
97
- },
98
- setSearchFilters: (e, t) => {
99
- e.searchFilters = t.payload;
100
- },
101
- updateSearchFilters: (e, t) => {
102
- e.searchFilters = {
103
- ...e.searchFilters,
104
- ...t.payload
105
- };
106
- },
107
- setEmailHTML: (e, t) => {
108
- e.email.html = t.payload;
109
- },
110
- setEmailSubject: (e, t) => {
111
- (e.email.title === e.email.subject || !e.email.subject && !e.email.title) && (e.email.title = t.payload), e.email.subject = t.payload;
112
- },
113
- setEmailPreheader: (e, t) => {
114
- e.email.preheader = t.payload;
115
- },
116
- resetEmailSlice: (e) => {
117
- let t = e.emailAutosaveTimestamps;
118
- return {
119
- ...a,
120
- emailAutosaveTimestamps: t
121
- };
122
- },
123
- setEmailTitle: (e, t) => {
124
- e.email.title = t.payload;
125
- },
126
- setIsInited: (e, t) => {
127
- e.email.is_inited = t.payload;
128
- },
129
- setEmailIsAmp: (e, t) => {
130
- e.email.isAmp = t.payload;
131
- },
132
- setProblemsList: (e, t) => {
133
- e.problemsList = t.payload;
134
- },
135
- setActiveProblemRange: (e, t) => {
136
- e.activeProblemRange = t.payload;
137
- },
138
- setIsNeedUpdateContentAppearance: (e, t) => {
139
- e.isNeedUpdateContentAppearance = t.payload;
140
- },
141
- setIsNeedUpdateAppearance: (e, t) => {
142
- e.isNeedUpdateAppearance = t.payload;
143
- },
144
- setEmailGroups: (e, { payload: t }) => {
145
- let n = Object.keys(t)[0], r = e.emailGroups, i = e.parentGroupOfProject, a = e.projectGroups, o = {};
146
- i && a.length && (t[n]?.forEach((e) => {
147
- let t = a.find((e) => e.id === +n), r = t?.children.find((t) => t.id === +e);
148
- r ? (o.hasOwnProperty(t.id) || (o[t.id] = []), o[t.id].push({
149
- label: r.name,
150
- value: r.id
151
- })) : (o.hasOwnProperty(n) || (o[n] = []), o[n].push({
152
- label: e,
153
- value: null
154
- }));
155
- }), t[n].length === 0 && (o[n] = [])), e.emailGroups = {
156
- ...r,
157
- ...o
158
- };
159
- }
160
- },
161
- extraReducers: (e) => {
162
- e.addMatcher((e) => e.type === "emailsApi/queries/queryResultPatched", (e, t) => {
163
- let n = t.payload.queryCacheKey.match(/\("([0-9]+)"\)/), r = t.payload?.patches[0];
164
- r?.path?.[0] && (e.email[r?.path[0]] = r.value), n?.[1] && (e.invalidateEmailId = n[1]), e.emailIsEdit = !0;
165
- }), e.addMatcher((e) => e.type === "emailsApi/invalidateTags", (e, t) => {
166
- if (t.payload[0].id === +e.invalidateEmailId) return a;
167
- }), e.addMatcher(n.endpoints.editEmail.matchFulfilled, (e, { payload: t }) => {
168
- e.invalidateEmailId = null, e.email = {
169
- ...e.email,
170
- ...t,
171
- renderGuid: e.email.renderGuid
172
- };
173
- }), e.addMatcher(n.endpoints.autoSaveEmail.matchFulfilled, (e, t) => {
174
- e.email.id?.toString() === t.payload.parent?.toString() && (e.email.html = t.payload.html, t.payload.modified && (e.email.modified = t.payload.modified, e.emailAutosaveTimestamps[t.payload.parent] = t.payload.modified));
175
- }), e.addMatcher(n.endpoints.getEmail.matchFulfilled, (e, { payload: t }) => {
176
- e.email = {
177
- ...a.email,
178
- ...t,
179
- is_inited: t.is_inited || (t.id === e.email?.id ? e.email?.is_inited : a.email.is_inited),
180
- common_styles: typeof t?.common_styles == "string" && t?.common_styles.startsWith("{") ? t?.common_styles : "{}"
181
- }, e.emailIsEdit = !1;
182
- }), e.addMatcher(r.endpoints.getGroups.matchFulfilled, (e, { meta: t, payload: n }) => {
183
- let r = e.email.group, i = t.arg.originalArgs.parent, a = n;
184
- i && (e.parentGroupOfProject = i, a.length > 0 && (e.projectGroups = a));
185
- let o = {};
186
- i && r.length && a.length && r?.forEach((e) => {
187
- a?.forEach((t) => {
188
- let n = t.children.find((t) => t.id === e);
189
- n && (o.hasOwnProperty(t.id) || (o[t.id] = []), o[t.id].push({
190
- label: n.name,
191
- value: n.id
192
- }));
193
- });
194
- }), e.emailGroups = o;
195
- }), e.addMatcher(t.endpoints.getProject.matchFulfilled, (e, { meta: t, payload: n }) => {
196
- e.parentGroupOfProject = n.group?.[0] || null;
197
- });
198
- }
199
- }), { setEditorThemeColor: c, setEmailSettings: l, setElementSettings: u, setEmailSettingsDisable: d, setSearchFilters: f, updateSearchFilters: p, setEmailSubject: m, setEmailPreheader: h, setEmailHTML: g, resetEmailSlice: _, setEmailTitle: v, setEmailFromHistory: y, setIsInited: b, setEmailIsAmp: x, setProblemsList: S, setActiveProblemRange: C, setEmailGroups: w, setIsNeedUpdateAppearance: T, setIsNeedUpdateContentAppearance: E } = s.actions, D = (e) => e[o].isNeedUpdateContentAppearance, O = (e) => e[o].email, k = (e) => e[o].settings, A = (e) => e[o].emailGroups, j = (e) => e[o].problemsList, M = (e) => e[o].searchFilters, N = (e) => e[o].projectGroups, P = (e) => e[o].emailAutosaveTimestamps, F = (e) => e[o].elementSettings, I = (e) => e[o].editorThemeColor, L = (e) => e[o].invalidateEmailId, R = (e) => e[o].isSettingsDisabled, z = (e) => e[o].activeProblemRange, B = (e) => e[o].isNeedUpdateAppearance;
200
- //#endregion
201
- export { T as A, x as C, m as D, d as E, S as M, f as N, v as O, p as P, g as S, l as T, C as _, F as a, y as b, M as c, L as d, B as f, N as g, j as h, I as i, E as j, b as k, A as l, R as m, _ as n, O as o, D as p, z as r, P as s, s as t, k as u, c as v, h as w, w as x, u as y };
@@ -1,25 +0,0 @@
1
- import { t as e } from "./d6d2d2d0.js";
2
- //#region \0globals:di
3
- var t = /* @__PURE__ */ e(((e) => {
4
- var t = window.__emailmaker__.modules.Core;
5
- Object.keys(t).forEach(function(n) {
6
- n !== "default" && n !== "__esModule" && (e[n] = t[n]);
7
- }), e.__esModule = !0, e.default = t.default === void 0 ? t : t.default;
8
- })), n = t();
9
- function r(e) {
10
- return (0, n.createIdentifier)(e);
11
- }
12
- var i = (0, n.createIdentifier)(), a = r("HANDLE_ATOM_INSERT"), o = (0, n.createIdentifier)(), s = (0, n.createIdentifier)("MESSAGE_SERVICE"), c = r("SETTINGS_PANEL_EVENT"), l = r("MODAL_SHOW_EVENT"), u = r("MODAL_CLOSE_EVENT"), d = r("MODAL_UPDATE_EVENT"), f = (0, n.createIdentifier)("client"), p = (0, n.createIdentifier)("ai_client"), m = (0, n.createIdentifier)(), h = (0, n.createIdentifier)();
13
- (0, n.createIdentifier)("autosave-recovery");
14
- var g = (0, n.createIdentifier)("PluginRegistry"), _ = /* @__PURE__ */ e(((e) => {
15
- var t = window.__emailmaker__.modules.Core;
16
- Object.keys(t).forEach(function(n) {
17
- n !== "default" && n !== "__esModule" && (e[n] = t[n]);
18
- }), e.__esModule = !0, e.default = t.default === void 0 ? t : t.default;
19
- })), v = _();
20
- function y(e = n.DependencyResolver) {
21
- return e.getOrCreateInstance(g, () => new v.PluginRegistry());
22
- }
23
- var b = y();
24
- //#endregion
25
- export { g as a, i as c, u as d, l as f, t as g, c as h, m as i, a as l, o as m, _ as n, f as o, d as p, p as r, h as s, b as t, s as u };