@aswin.dev/editor 0.7.2 → 0.7.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 (157) hide show
  1. package/dist/{AccessibilityPanel-EmQ19wiS.js → AccessibilityPanel-COL6Wm7p.js} +1 -1
  2. package/dist/{AiChatSidebar-DeB0w_32.js → AiChatSidebar-DM2ri7KX.js} +9 -9
  3. package/dist/{AiFeatureMenu-DoLD5Cde.js → AiFeatureMenu-BrZBJ0R5.js} +5 -5
  4. package/dist/{BlockA11yBadge-DkNbDvJA.js → BlockA11yBadge-Qs6HtXid.js} +1 -1
  5. package/dist/{CloudEditor-zo9PjjvY.js → CloudEditor-BRpzzfQn.js} +327 -290
  6. package/dist/{CollaboratorBar-BsXMY-8e.js → CollaboratorBar-DsRXj3Kn.js} +2 -2
  7. package/dist/{CommentsSidebar-DIWIa4rS.js → CommentsSidebar-DE6ZsM4D.js} +15 -16
  8. package/dist/CountdownBlock-Ba3T-i2X.js +1536 -0
  9. package/dist/CountdownToolbar-B9IAZzeV.js +194 -0
  10. package/dist/{DesignReferenceSidebar-RDlnhL-6.js → DesignReferenceSidebar-B1iw3Bb7.js} +5 -5
  11. package/dist/{LoadingTrack-BJ59h9ok.js → LoadingTrack-Ba2pfF57.js} +1 -1
  12. package/dist/{ModuleBrowserModal-b7HbpByz.js → ModuleBrowserModal-DVnd1dqR.js} +7 -7
  13. package/dist/{ModulePreviewCanvas-D__YlOLS.js → ModulePreviewCanvas-D9jBAoBQ.js} +47 -42
  14. package/dist/{ParagraphEditor-B1aYPO-6.js → ParagraphEditor-CO3V0H_V.js} +25 -25
  15. package/dist/{RichTextEditorContent-BmEVMrkJ.js → RichTextEditorContent-CrqPQdnk.js} +1 -1
  16. package/dist/{SaveModuleDialog-ClovqI6h.js → SaveModuleDialog-CboNFwIA.js} +3 -3
  17. package/dist/{NumberWithSuffix-Ca3vNY84.js → SlidingPillSelect-DfcBdJqN.js} +123 -107
  18. package/dist/{SnapshotHistory-DoqtH0cw.js → SnapshotHistory-C26pvPre.js} +5 -5
  19. package/dist/{TemplateScoringPanel-DQv2ZAiL.js → TemplateScoringPanel-CS7o62zS.js} +7 -7
  20. package/dist/{TestEmailModal-iIeYJYsj.js → TestEmailModal-B4OoUWb_.js} +3 -3
  21. package/dist/{TitleEditor-CTDIwRF_.js → TitleEditor-DU_QWG_m.js} +7 -7
  22. package/dist/{TplModal-CBq1J1pG.js → TplModal-Dr6Do8oU.js} +1 -1
  23. package/dist/blockTypeIcons-cRDr36gk.js +189 -0
  24. package/dist/bundle-stats.json +7 -7
  25. package/dist/cdn/chunks/{AccessibilityPanel-BeU8nz7A.js → AccessibilityPanel-Csd47zqI.js} +9 -9
  26. package/dist/cdn/chunks/{AccessibilityPanel-BeU8nz7A.js.map → AccessibilityPanel-Csd47zqI.js.map} +1 -1
  27. package/dist/cdn/chunks/{AiFeatureMenu-B2mhscyP.js → AiFeatureMenu-BlnZF5pf.js} +6 -6
  28. package/dist/cdn/chunks/{AiFeatureMenu-B2mhscyP.js.map → AiFeatureMenu-BlnZF5pf.js.map} +1 -1
  29. package/dist/cdn/chunks/{BlockA11yBadge-C4g77gF0.js → BlockA11yBadge-VY8NqI9n.js} +3 -3
  30. package/dist/cdn/chunks/{BlockA11yBadge-C4g77gF0.js.map → BlockA11yBadge-VY8NqI9n.js.map} +1 -1
  31. package/dist/cdn/chunks/{CloudEditor-Btyr0b0_.js → CloudEditor-D0TrKlva.js} +250 -213
  32. package/dist/cdn/chunks/CloudEditor-D0TrKlva.js.map +1 -0
  33. package/dist/cdn/chunks/{CollaboratorBar-YBiIjiRh.js → CollaboratorBar-BhMNTI_h.js} +3 -3
  34. package/dist/cdn/chunks/{CollaboratorBar-YBiIjiRh.js.map → CollaboratorBar-BhMNTI_h.js.map} +1 -1
  35. package/dist/cdn/chunks/CountdownToolbar-DsP6O1fl.js +196 -0
  36. package/dist/cdn/chunks/CountdownToolbar-DsP6O1fl.js.map +1 -0
  37. package/dist/cdn/chunks/{ModuleBrowserModal-C2CDWKW6.js → ModuleBrowserModal-CpYPeiKv.js} +7 -7
  38. package/dist/cdn/chunks/{ModuleBrowserModal-C2CDWKW6.js.map → ModuleBrowserModal-CpYPeiKv.js.map} +1 -1
  39. package/dist/cdn/chunks/{ModulePreviewCanvas-Drt8Evai.js → ModulePreviewCanvas-BIYYnqUq.js} +51 -47
  40. package/dist/cdn/chunks/ModulePreviewCanvas-BIYYnqUq.js.map +1 -0
  41. package/dist/cdn/chunks/{ParagraphEditor-BA1WbHI7.js → ParagraphEditor-ZV5SYYw8.js} +47 -47
  42. package/dist/cdn/chunks/{ParagraphEditor-BA1WbHI7.js.map → ParagraphEditor-ZV5SYYw8.js.map} +1 -1
  43. package/dist/cdn/chunks/{RichTextEditorContent-BtWCA_Oc.js → RichTextEditorContent-Dx05ETtt.js} +4 -4
  44. package/dist/cdn/chunks/{RichTextEditorContent-BtWCA_Oc.js.map → RichTextEditorContent-Dx05ETtt.js.map} +1 -1
  45. package/dist/cdn/chunks/{SaveModuleDialog-AwL0tkCV.js → SaveModuleDialog-DJEEK7Wb.js} +23 -23
  46. package/dist/cdn/chunks/{SaveModuleDialog-AwL0tkCV.js.map → SaveModuleDialog-DJEEK7Wb.js.map} +1 -1
  47. package/dist/cdn/chunks/{NumberWithSuffix-Ty1bp9vB.js → SlidingPillSelect-BhPCkqVu.js} +132 -116
  48. package/dist/cdn/chunks/SlidingPillSelect-BhPCkqVu.js.map +1 -0
  49. package/dist/cdn/chunks/{TitleEditor-DbSyeixS.js → TitleEditor-fu1A87Ld.js} +21 -21
  50. package/dist/cdn/chunks/{TitleEditor-DbSyeixS.js.map → TitleEditor-fu1A87Ld.js.map} +1 -1
  51. package/dist/cdn/chunks/blockTypeIcons-CJirTS-q.js +25 -0
  52. package/dist/cdn/chunks/blockTypeIcons-CJirTS-q.js.map +1 -0
  53. package/dist/cdn/chunks/{de-RQrZR56a.js → de-BPHtelu7.js} +1 -1
  54. package/dist/cdn/chunks/{de-RQrZR56a.js.map → de-BPHtelu7.js.map} +1 -1
  55. package/dist/cdn/chunks/{de-Ce-LbJ2J.js → de-BRDqJwJe.js} +1 -1
  56. package/dist/cdn/chunks/{de-Ce-LbJ2J.js.map → de-BRDqJwJe.js.map} +1 -1
  57. package/dist/cdn/chunks/{de-_tooy3Q8.js → de-BsYijc0r.js} +120 -4
  58. package/dist/cdn/chunks/de-BsYijc0r.js.map +1 -0
  59. package/dist/cdn/chunks/{emojiData-EMFlj6FJ.js → emojiData-DUHzsh4j.js} +1 -1
  60. package/dist/cdn/chunks/{emojiData-EMFlj6FJ.js.map → emojiData-DUHzsh4j.js.map} +1 -1
  61. package/dist/cdn/chunks/{en-DiCWK5fG.js → en-Cdj_Ikl1.js} +1 -1
  62. package/dist/cdn/chunks/{en-DiCWK5fG.js.map → en-Cdj_Ikl1.js.map} +1 -1
  63. package/dist/cdn/chunks/{en-CNqLoIm9.js → en-DMu9hPIC.js} +120 -4
  64. package/dist/cdn/chunks/en-DMu9hPIC.js.map +1 -0
  65. package/dist/cdn/chunks/{en-Bl1ecfRF.js → en-DejwuJhw.js} +1 -1
  66. package/dist/cdn/chunks/{en-Bl1ecfRF.js.map → en-DejwuJhw.js.map} +1 -1
  67. package/dist/cdn/chunks/{extensions-BVKQw_sp.js → extensions-BbFKsjyT.js} +20 -20
  68. package/dist/cdn/chunks/{extensions-BVKQw_sp.js.map → extensions-BbFKsjyT.js.map} +1 -1
  69. package/dist/cdn/chunks/{features-DIBEo4xl.js → features-uApxwJMz.js} +3401 -1520
  70. package/dist/cdn/chunks/features-uApxwJMz.js.map +1 -0
  71. package/dist/cdn/chunks/{icons-C1Gg-ov-.js → icons-DZb4EX9m.js} +128 -60
  72. package/dist/cdn/chunks/icons-DZb4EX9m.js.map +1 -0
  73. package/dist/cdn/chunks/{liquid.browser-lQbkge2E.js → liquid.browser-CllF-us3.js} +1 -1
  74. package/dist/cdn/chunks/{liquid.browser-lQbkge2E.js.map → liquid.browser-CllF-us3.js.map} +1 -1
  75. package/dist/cdn/chunks/{media-library-BTF_Ko70.js → media-library-B3g52j8R.js} +838 -822
  76. package/dist/cdn/chunks/media-library-B3g52j8R.js.map +1 -0
  77. package/dist/cdn/chunks/{pusher-CDbNlZBE.js → pusher-i7-OBujc.js} +1 -1
  78. package/dist/cdn/chunks/{pusher-CDbNlZBE.js.map → pusher-i7-OBujc.js.map} +1 -1
  79. package/dist/cdn/chunks/{quality-C5AmotmP.js → quality-Ug5lFGHP.js} +301 -301
  80. package/dist/cdn/chunks/{quality-C5AmotmP.js.map → quality-Ug5lFGHP.js.map} +1 -1
  81. package/dist/cdn/chunks/{renderer-D0L44Vlp.js → renderer-jXCdXjV-.js} +12 -12
  82. package/dist/cdn/chunks/{renderer-D0L44Vlp.js.map → renderer-jXCdXjV-.js.map} +1 -1
  83. package/dist/cdn/chunks/{src-RKexlYjA.js → src-FMtH5ZvJ.js} +9 -9
  84. package/dist/cdn/chunks/{src-RKexlYjA.js.map → src-FMtH5ZvJ.js.map} +1 -1
  85. package/dist/cdn/chunks/{styleConstants-PgmvNBzQ.js → styleConstants-DfcU8u_r.js} +1 -1
  86. package/dist/cdn/chunks/{styleConstants-PgmvNBzQ.js.map → styleConstants-DfcU8u_r.js.map} +1 -1
  87. package/dist/cdn/chunks/{styles-CQR6ed13.js → styles-Co9vw4ag.js} +2401 -1339
  88. package/dist/cdn/chunks/styles-Co9vw4ag.js.map +1 -0
  89. package/dist/cdn/chunks/{tiptap-CDzAbF2j.js → tiptap-qXOh0vzV.js} +2 -2
  90. package/dist/cdn/chunks/{tiptap-CDzAbF2j.js.map → tiptap-qXOh0vzV.js.map} +1 -1
  91. package/dist/cdn/editor.css +1 -1
  92. package/dist/cdn/editor.js +93 -64
  93. package/dist/cdn/editor.js.map +1 -1
  94. package/dist/{cloud-DJG4tb4_.js → cloud-COUuu_KE.js} +1 -1
  95. package/dist/{de-2LEvILeZ.js → de-CR1qAkAm.js} +119 -3
  96. package/dist/{dist-BSJvAvH3.js → dist-BUzw1buG.js} +1 -1
  97. package/dist/{dist-b-XUqAoF.js → dist-BZyY-SS4.js} +1 -1
  98. package/dist/{dist-Df4ie7vZ.js → dist-BadNx4qo.js} +1 -1
  99. package/dist/{dist-wfAedlzi.js → dist-BesOh2mk.js} +1 -1
  100. package/dist/{dist-kZfaVUpW.js → dist-Bz3M4RXG.js} +3 -3
  101. package/dist/{dist-BvPgo-UK.js → dist-C3T2AKtB.js} +1 -1
  102. package/dist/{dist-CPVBKMmd.js → dist-C9ckKEZL.js} +1 -1
  103. package/dist/{dist-DxOoemkW.js → dist-CBItRG-Z.js} +1 -1
  104. package/dist/{dist-BeFnymxK.js → dist-COSzWQUs.js} +1 -1
  105. package/dist/{dist-Bmir0gYb.js → dist-DP82Y0rs.js} +254 -136
  106. package/dist/{dist-CivF9P8b.js → dist-Djgi0A6k.js} +92 -77
  107. package/dist/{dist-BHAeXaUY.js → dist-DtiDUrX-.js} +1 -1
  108. package/dist/{dist-HEQ52gTJ.js → dist-Dzt5foyL.js} +1 -1
  109. package/dist/{en-D2RU2Poj.js → en-jbnp1n6M.js} +119 -3
  110. package/dist/{extensions-BQ1xXx3d.js → extensions-Bg22D6c8.js} +12 -12
  111. package/dist/index.d.ts +10 -10
  112. package/dist/{pencil-BZJPNYWR.js → pencil-Bpimrzzw.js} +5 -2
  113. package/dist/style.css +1 -1
  114. package/dist/{styles-CavWjvol.js → styles-DgL0UYj0.js} +2321 -1236
  115. package/dist/templatical-editor.js +149 -120
  116. package/dist/{useEditorCore-BGnzcT7p.js → useEditorCore-CSlYQZWx.js} +3890 -3666
  117. package/dist/useMergeTag-BVL3A4OO.js +34 -0
  118. package/package.json +7 -7
  119. package/dist/CountdownBlock-BCi7-DAM.js +0 -92
  120. package/dist/CountdownToolbar-BuS8p5ju.js +0 -210
  121. package/dist/blockTypeIcons-QkC6f5UE.js +0 -140
  122. package/dist/cdn/chunks/CloudEditor-Btyr0b0_.js.map +0 -1
  123. package/dist/cdn/chunks/CountdownBlock-B06UZoWe.js +0 -93
  124. package/dist/cdn/chunks/CountdownBlock-B06UZoWe.js.map +0 -1
  125. package/dist/cdn/chunks/CountdownToolbar-C9XZr33O.js +0 -212
  126. package/dist/cdn/chunks/CountdownToolbar-C9XZr33O.js.map +0 -1
  127. package/dist/cdn/chunks/ModulePreviewCanvas-Drt8Evai.js.map +0 -1
  128. package/dist/cdn/chunks/NumberWithSuffix-Ty1bp9vB.js.map +0 -1
  129. package/dist/cdn/chunks/blockTypeIcons-pQIkxJzc.js +0 -23
  130. package/dist/cdn/chunks/blockTypeIcons-pQIkxJzc.js.map +0 -1
  131. package/dist/cdn/chunks/de-_tooy3Q8.js.map +0 -1
  132. package/dist/cdn/chunks/en-CNqLoIm9.js.map +0 -1
  133. package/dist/cdn/chunks/features-DIBEo4xl.js.map +0 -1
  134. package/dist/cdn/chunks/icons-C1Gg-ov-.js.map +0 -1
  135. package/dist/cdn/chunks/media-library-BTF_Ko70.js.map +0 -1
  136. package/dist/cdn/chunks/styles-CQR6ed13.js.map +0 -1
  137. package/dist/check-DJrpDKO_.js +0 -7
  138. package/dist/useMergeTag-CfuZq2fF.js +0 -34
  139. /package/dist/{_plugin-vue_export-helper-Bwh4ceeO.js → _plugin-vue_export-helper-BVAJ4lgT.js} +0 -0
  140. /package/dist/{clock-ik2pRJKG.js → clock-Ba4p3rJM.js} +0 -0
  141. /package/dist/{de-D2npYjrZ.js → de-GOtR9DwW.js} +0 -0
  142. /package/dist/{dist-DvHLtWVP.js → dist-DXa1uAMh.js} +0 -0
  143. /package/dist/{emojiData-DvQBBzmO.js → emojiData-DrBuvEoP.js} +0 -0
  144. /package/dist/{en-ib-4h3_o.js → en-dFFQVzNn.js} +0 -0
  145. /package/dist/{formatRelativeTime-CFDZnEIs.js → formatRelativeTime-BhhO8yCl.js} +0 -0
  146. /package/dist/{liquid.browser-7Rv0QDiO.js → liquid.browser-BvCyLQII.js} +0 -0
  147. /package/dist/{scan-line-DlghmhNf.js → scan-line-CzfFJO1o.js} +0 -0
  148. /package/dist/{send-DDdhIRj8.js → send-D2eSo4GH.js} +0 -0
  149. /package/dist/{shield-check-OSQ-JVTX.js → shield-check-jkpgcC0-.js} +0 -0
  150. /package/dist/{sparkles-BN4a-CoF.js → sparkles-Chm5CZfb.js} +0 -0
  151. /package/dist/{styleConstants-wWRbcuEK.js → styleConstants-34eUKPOZ.js} +0 -0
  152. /package/dist/{text-align-start-D1weisjS.js → text-align-start-CzBnJsW8.js} +0 -0
  153. /package/dist/{trash-2-CMWvQ5KX.js → trash-2-CtK2apEH.js} +0 -0
  154. /package/dist/{triangle-alert-DyidRNX_.js → triangle-alert-KpDVNbpn.js} +0 -0
  155. /package/dist/{undo-2-Cg8I7obC.js → undo-2-m1EUDbUg.js} +0 -0
  156. /package/dist/{useCloudI18n-BTTNBk5i.js → useCloudI18n-DOKSZql1.js} +0 -0
  157. /package/dist/{x-CgIhNcT9.js → x-BkaOMosX.js} +0 -0
@@ -695,7 +695,7 @@ var l = {
695
695
  fullHeight: 420,
696
696
  custom: 600
697
697
  };
698
- function u() {
698
+ function te() {
699
699
  return [{
700
700
  id: "schedule-slot-1",
701
701
  dayPreset: "everyday",
@@ -708,7 +708,7 @@ function u() {
708
708
  endTime: "23:59"
709
709
  }];
710
710
  }
711
- function te() {
711
+ function ne() {
712
712
  let e = a();
713
713
  return {
714
714
  triggers: {
@@ -753,7 +753,12 @@ function te() {
753
753
  },
754
754
  useOverlay: !0,
755
755
  overlayImage: !1,
756
+ overlayBlur: 8,
757
+ overlayImageOpacity: 1,
756
758
  backgroundImage: !1,
759
+ backgroundImageUrl: "",
760
+ backgroundImageFit: "cover",
761
+ backgroundImageOnly: !1,
757
762
  multiColumnEnabled: !0,
758
763
  multiColumnPreset: "two",
759
764
  rtl: !1,
@@ -768,21 +773,21 @@ function te() {
768
773
  startDate: "",
769
774
  endDate: "",
770
775
  detailedScheduleEnabled: !0,
771
- slots: u()
776
+ slots: te()
772
777
  }
773
778
  };
774
779
  }
775
- var ne = {
780
+ var re = {
776
781
  content: "<p>Enter your title</p>",
777
782
  level: 2,
778
783
  color: "#1a1a1a",
779
784
  textAlign: "left"
780
- }, d = { content: "<p>Enter your text here</p>" }, f = {
785
+ }, ie = { content: "<p>Enter your text here</p>" }, u = {
781
786
  src: "",
782
787
  alt: "",
783
788
  width: "full",
784
789
  align: "center"
785
- }, p = {
790
+ }, d = {
786
791
  text: "Click Here",
787
792
  url: "",
788
793
  backgroundColor: "#333333",
@@ -798,7 +803,7 @@ var ne = {
798
803
  borderWidth: 0,
799
804
  borderColor: "#000000",
800
805
  borderSides: "all"
801
- }, m = {
806
+ }, f = {
802
807
  inputType: "text",
803
808
  name: "field",
804
809
  label: "Label",
@@ -842,30 +847,30 @@ var ne = {
842
847
  inputBorderColor: "#d1d5db",
843
848
  inputBorderSides: "all",
844
849
  inputWidth: "full"
845
- }, re = {
850
+ }, ae = {
846
851
  lineStyle: "solid",
847
852
  color: "#e0e0e0",
848
853
  thickness: 1,
849
854
  width: "full"
850
- }, h = { columns: "1" }, g = {
855
+ }, oe = { columns: "1" }, p = {
851
856
  url: "",
852
857
  thumbnailUrl: "",
853
858
  alt: "Video",
854
859
  width: "full",
855
860
  align: "center"
856
- }, _ = {
861
+ }, m = {
857
862
  iconStyle: "solid",
858
863
  iconSize: "medium",
859
864
  spacing: 10,
860
865
  align: "center"
861
- }, v = { height: 24 }, y = { content: "" }, b = {
866
+ }, h = { height: 24 }, g = { content: "" }, _ = {
862
867
  fontSize: 15,
863
868
  color: "#1a1a1a",
864
869
  textAlign: "center",
865
870
  separator: "|",
866
871
  separatorColor: "#e0e0e0",
867
872
  spacing: 10
868
- }, x = {
873
+ }, v = {
869
874
  hasHeaderRow: !0,
870
875
  borderColor: "#e0e0e0",
871
876
  borderWidth: 1,
@@ -873,7 +878,50 @@ var ne = {
873
878
  fontSize: 15,
874
879
  color: "#1a1a1a",
875
880
  textAlign: "left"
876
- }, S = {
881
+ }, y = {
882
+ syncIntegrationId: null,
883
+ submitButtonText: "Sign up",
884
+ buttonAction: "next_step",
885
+ buttonLayout: "one_line",
886
+ buttonUrl: "",
887
+ termsContent: "By signing up, you agree to receive marketing emails. You can unsubscribe at any time.",
888
+ termsEnabled: !1,
889
+ inputBackgroundColor: "#ffffff",
890
+ inputTextColor: "#111827",
891
+ inputPlaceholderColor: "#9ca3af",
892
+ inputBorderColor: "#d1d5db",
893
+ inputBorderWidth: 1,
894
+ inputBorderRadius: 8,
895
+ inputFontSize: 14,
896
+ inputPadding: {
897
+ top: 12,
898
+ right: 14,
899
+ bottom: 12,
900
+ left: 14
901
+ },
902
+ inputSpacing: 12,
903
+ labelColor: "#374151",
904
+ labelFontSize: 13,
905
+ buttonBackgroundColor: "#111827",
906
+ buttonTextColor: "#ffffff",
907
+ buttonBorderRadius: 8,
908
+ buttonFontSize: 14
909
+ }, b = {
910
+ discountMode: "auto_code",
911
+ valueType: "fixed_amount",
912
+ valueAmount: 10,
913
+ currencyCode: "USD",
914
+ expirationEnabled: !0,
915
+ expirationDays: 1,
916
+ tagCustomerWithCode: !0,
917
+ combineProductDiscounts: !0,
918
+ combineOrderDiscounts: !0,
919
+ combineShippingDiscounts: !1,
920
+ manualDiscountCode: "",
921
+ copyConfirmationText: "Copied to clipboard",
922
+ afterCopyAction: "none",
923
+ afterCopyUrl: ""
924
+ }, x = {
877
925
  targetDate: "",
878
926
  timezone: "UTC",
879
927
  showDays: !0,
@@ -892,26 +940,34 @@ var ne = {
892
940
  labelSeconds: "Seconds",
893
941
  expiredMessage: "This offer has expired",
894
942
  expiredImageUrl: "",
895
- hideOnExpiry: !1
943
+ hideOnExpiry: !1,
944
+ style: "minimal",
945
+ layout: "horizontal",
946
+ animationSpeed: "normal",
947
+ accentColor: "#6366f1",
948
+ cardGap: 12,
949
+ cardRadius: 16,
950
+ enableParticles: !0,
951
+ enableHoverFx: !0
896
952
  };
897
- function C(e) {
953
+ function S(e) {
898
954
  return typeof e == "object" && !!e && !Array.isArray(e) && Object.getPrototypeOf(e) === Object.prototype;
899
955
  }
900
- function w(e, t) {
956
+ function C(e, t) {
901
957
  let n = { ...e };
902
958
  for (let r of Object.keys(t)) {
903
959
  let i = e[r], a = t[r];
904
- a !== void 0 && (C(i) && C(a) ? n[r] = w(i, a) : n[r] = a);
960
+ a !== void 0 && (S(i) && S(a) ? n[r] = C(i, a) : n[r] = a);
905
961
  }
906
962
  return n;
907
963
  }
908
- function T(e, t) {
909
- return !t || Object.keys(t).length === 0 ? e : w(e, t);
964
+ function w(e, t) {
965
+ return !t || Object.keys(t).length === 0 ? e : C(e, t);
910
966
  }
911
- function E() {
967
+ function T() {
912
968
  return crypto.randomUUID();
913
969
  }
914
- function D(e = 0) {
970
+ function E(e = 0) {
915
971
  return {
916
972
  top: e,
917
973
  right: e,
@@ -919,176 +975,238 @@ function D(e = 0) {
919
975
  left: e
920
976
  };
921
977
  }
922
- function O(e = 10) {
978
+ function D(e = 10) {
923
979
  return {
924
- padding: D(e),
925
- margin: D(0)
980
+ padding: E(e),
981
+ margin: E(0)
926
982
  };
927
983
  }
928
- function k(e = {}) {
929
- return T({
930
- id: E(),
984
+ function O(e = {}) {
985
+ return w({
986
+ id: T(),
931
987
  type: "title",
932
- ...ne,
933
- styles: O()
988
+ ...re,
989
+ styles: D()
934
990
  }, e);
935
991
  }
936
- function A(e = {}) {
937
- return T({
938
- id: E(),
992
+ function k(e = {}) {
993
+ return w({
994
+ id: T(),
939
995
  type: "paragraph",
940
- ...d,
941
- styles: O()
996
+ ...ie,
997
+ styles: D()
942
998
  }, e);
943
999
  }
944
- function j(e = {}) {
945
- return T({
946
- id: E(),
1000
+ function A(e = {}) {
1001
+ return w({
1002
+ id: T(),
947
1003
  type: "image",
948
- ...f,
949
- styles: O()
1004
+ ...u,
1005
+ styles: D()
950
1006
  }, e);
951
1007
  }
952
- function M(e = {}) {
953
- return T({
954
- id: E(),
1008
+ function j(e = {}) {
1009
+ return w({
1010
+ id: T(),
955
1011
  type: "button",
956
- ...p,
957
- styles: O()
1012
+ ...d,
1013
+ styles: D()
958
1014
  }, e);
959
1015
  }
960
- function N(e = {}) {
961
- return T({
962
- id: E(),
1016
+ function M(e = {}) {
1017
+ return w({
1018
+ id: T(),
963
1019
  type: "input",
964
- ...m,
965
- styles: O()
1020
+ ...f,
1021
+ styles: D()
966
1022
  }, e);
967
1023
  }
968
- function P(e = {}) {
969
- return T({
970
- id: E(),
1024
+ function N(e = {}) {
1025
+ return w({
1026
+ id: T(),
971
1027
  type: "divider",
972
- ...re,
973
- styles: O(20)
1028
+ ...ae,
1029
+ styles: D(20)
974
1030
  }, e);
975
1031
  }
976
- function F(e = {}) {
977
- return T({
978
- id: E(),
1032
+ function P(e = {}) {
1033
+ return w({
1034
+ id: T(),
979
1035
  type: "section",
980
- ...h,
1036
+ ...oe,
981
1037
  children: [[]],
982
- styles: O(20)
1038
+ styles: D(20)
983
1039
  }, e);
984
1040
  }
985
- function I(e = {}) {
986
- return T({
987
- id: E(),
1041
+ function F(e = {}) {
1042
+ return w({
1043
+ id: T(),
988
1044
  type: "video",
989
- ...g,
990
- styles: O()
1045
+ ...p,
1046
+ styles: D()
991
1047
  }, e);
992
1048
  }
993
- function L(e = {}) {
994
- return T({
995
- id: E(),
1049
+ function I(e = {}) {
1050
+ return w({
1051
+ id: T(),
996
1052
  type: "social",
997
1053
  icons: [],
998
- ..._,
999
- styles: O()
1054
+ ...m,
1055
+ styles: D()
1000
1056
  }, e);
1001
1057
  }
1002
- function R(e = {}) {
1003
- return T({
1004
- id: E(),
1058
+ function L(e = {}) {
1059
+ return w({
1060
+ id: T(),
1005
1061
  type: "spacer",
1006
- ...v,
1007
- styles: O(0)
1062
+ ...h,
1063
+ styles: D(0)
1008
1064
  }, e);
1009
1065
  }
1010
- function z(e = {}) {
1011
- return T({
1012
- id: E(),
1066
+ function R(e = {}) {
1067
+ return w({
1068
+ id: T(),
1013
1069
  type: "html",
1014
- ...y,
1015
- styles: O()
1070
+ ...g,
1071
+ styles: D()
1016
1072
  }, e);
1017
1073
  }
1018
- function B(e = {}) {
1019
- return T({
1020
- id: E(),
1074
+ function z(e = {}) {
1075
+ return w({
1076
+ id: T(),
1021
1077
  type: "menu",
1022
1078
  items: [],
1023
- ...b,
1024
- styles: O()
1079
+ ..._,
1080
+ styles: D()
1025
1081
  }, e);
1026
1082
  }
1027
- function V(e, t) {
1083
+ function B(e, t) {
1028
1084
  return Array.from({ length: t }, () => ({
1029
- id: E(),
1085
+ id: T(),
1030
1086
  cells: Array.from({ length: e }, () => ({
1031
- id: E(),
1087
+ id: T(),
1032
1088
  content: ""
1033
1089
  }))
1034
1090
  }));
1035
1091
  }
1036
- function H(e = {}) {
1037
- return T({
1038
- id: E(),
1092
+ function V(e = {}) {
1093
+ return w({
1094
+ id: T(),
1039
1095
  type: "table",
1040
- rows: V(3, 3),
1041
- ...x,
1042
- styles: O()
1096
+ rows: B(3, 3),
1097
+ ...v,
1098
+ styles: D()
1043
1099
  }, e);
1044
1100
  }
1045
- function U(e = {}) {
1046
- return T({
1047
- id: E(),
1101
+ function H(e = {}) {
1102
+ return w({
1103
+ id: T(),
1048
1104
  type: "countdown",
1049
- ...S,
1050
- styles: O()
1105
+ ...x,
1106
+ styles: D()
1051
1107
  }, e);
1052
1108
  }
1053
- function W(e) {
1109
+ var U = {
1110
+ firstName: {
1111
+ name: "first_name",
1112
+ label: "First name",
1113
+ placeholder: "Your first name"
1114
+ },
1115
+ lastName: {
1116
+ name: "last_name",
1117
+ label: "Last name",
1118
+ placeholder: "Your last name"
1119
+ },
1120
+ email: {
1121
+ name: "email",
1122
+ label: "Email",
1123
+ placeholder: "email@example.com"
1124
+ },
1125
+ phone: {
1126
+ name: "phone",
1127
+ label: "Phone",
1128
+ placeholder: "+1 555 123 4567"
1129
+ }
1130
+ };
1131
+ function W(e, t = {}) {
1132
+ let n = U[e];
1133
+ return {
1134
+ id: T(),
1135
+ type: e,
1136
+ name: n.name,
1137
+ label: n.label,
1138
+ placeholder: n.placeholder,
1139
+ required: e === "email",
1140
+ ...e === "email" ? {
1141
+ blockExisting: !1,
1142
+ blockExistingScope: "all_campaigns",
1143
+ blockExistingMessage: "Sorry, this email was already submitted."
1144
+ } : {},
1145
+ ...t
1146
+ };
1147
+ }
1148
+ function G(e = {}) {
1149
+ return w({
1150
+ id: T(),
1151
+ type: "discountCoupon",
1152
+ ...b,
1153
+ styles: D()
1154
+ }, e);
1155
+ }
1156
+ function K(e = {}) {
1157
+ let t = w({
1158
+ id: T(),
1159
+ type: "form",
1160
+ ...y,
1161
+ fields: [W("email")],
1162
+ styles: D()
1163
+ }, e);
1164
+ return t.fields?.length ? t : {
1165
+ ...t,
1166
+ fields: [W("email")]
1167
+ };
1168
+ }
1169
+ function q(e) {
1054
1170
  return e.type === "repeatable" ? e.default ?? [] : e.type === "boolean" ? e.default ?? !1 : e.type === "number" ? e.default ?? 0 : e.default ?? "";
1055
1171
  }
1056
- function G(e) {
1172
+ function se(e) {
1057
1173
  let t = {};
1058
- for (let n of e.fields) t[n.key] = W(n);
1174
+ for (let n of e.fields) t[n.key] = q(n);
1059
1175
  return {
1060
- id: E(),
1176
+ id: T(),
1061
1177
  type: "custom",
1062
1178
  customType: e.type,
1063
1179
  fieldValues: t,
1064
- styles: O(),
1180
+ styles: D(),
1065
1181
  ...e.dataSource ? { dataSourceFetched: !1 } : {}
1066
1182
  };
1067
1183
  }
1068
- function K(e, t) {
1184
+ function ce(e, t) {
1069
1185
  switch (e) {
1070
- case "section": return F(t?.section);
1071
- case "title": return k(t?.title);
1072
- case "paragraph": return A(t?.paragraph);
1073
- case "image": return j(t?.image);
1074
- case "button": return M(t?.button);
1075
- case "input": return N(t?.input);
1076
- case "divider": return P(t?.divider);
1077
- case "video": return I(t?.video);
1078
- case "social": return L(t?.social);
1079
- case "spacer": return R(t?.spacer);
1080
- case "html": return z(t?.html);
1081
- case "menu": return B(t?.menu);
1082
- case "table": return H(t?.table);
1083
- case "countdown": return U(t?.countdown);
1186
+ case "section": return P(t?.section);
1187
+ case "title": return O(t?.title);
1188
+ case "paragraph": return k(t?.paragraph);
1189
+ case "image": return A(t?.image);
1190
+ case "button": return j(t?.button);
1191
+ case "input": return M(t?.input);
1192
+ case "divider": return N(t?.divider);
1193
+ case "video": return F(t?.video);
1194
+ case "social": return I(t?.social);
1195
+ case "spacer": return L(t?.spacer);
1196
+ case "html": return R(t?.html);
1197
+ case "menu": return z(t?.menu);
1198
+ case "table": return V(t?.table);
1199
+ case "countdown": return H(t?.countdown);
1200
+ case "form": return K(t?.form);
1201
+ case "discountCoupon": return G(t?.discountCoupon);
1084
1202
  default: throw Error(`Unknown block type: ${e}`);
1085
1203
  }
1086
1204
  }
1087
- function q(e) {
1205
+ function J(e) {
1088
1206
  let t = JSON.parse(JSON.stringify(e));
1089
- return t.id = E(), t.type === "section" && (t.children = t.children.map((e) => e.map((e) => q(e)))), t;
1207
+ return t.id = T(), t.type === "section" && (t.children = t.children.map((e) => e.map((e) => J(e)))), t;
1090
1208
  }
1091
- var J = {
1209
+ var Y = {
1092
1210
  liquid: {
1093
1211
  value: /\{\{.+?\}\}/g,
1094
1212
  logic: /\{%-?\s*(\w+).*?-?%\}/g
@@ -1105,50 +1223,50 @@ var J = {
1105
1223
  value: /%%=.+?=%%/g,
1106
1224
  logic: /%%\[\s*(\w+).*?\]%%/g
1107
1225
  }
1108
- }, Y = {
1226
+ }, le = {
1109
1227
  liquid: "{{",
1110
1228
  handlebars: "{{",
1111
1229
  mailchimp: "*|",
1112
1230
  ampscript: "%%="
1113
1231
  };
1114
- function ie(e) {
1115
- for (let t of Object.keys(J)) if (J[t].value.source === e.value.source) return Y[t];
1232
+ function ue(e) {
1233
+ for (let t of Object.keys(Y)) if (Y[t].value.source === e.value.source) return le[t];
1116
1234
  return null;
1117
1235
  }
1118
- function X(e) {
1119
- return e ? typeof e == "string" ? J[e] ?? J.liquid : e : J.liquid;
1236
+ function de(e) {
1237
+ return e ? typeof e == "string" ? Y[e] ?? Y.liquid : e : Y.liquid;
1120
1238
  }
1121
- function Z(e) {
1239
+ function X(e) {
1122
1240
  let t = e.source, n = e.flags.replace("g", "");
1123
1241
  return RegExp(`^${t}$`, n);
1124
1242
  }
1125
- function ae(e, t) {
1243
+ function Z(e, t) {
1126
1244
  let n = e?.trim() || "";
1127
- return Z(t.logic).test(n) ? !1 : Z(t.value).test(n);
1245
+ return X(t.logic).test(n) ? !1 : X(t.value).test(n);
1128
1246
  }
1129
1247
  function Q(e, t) {
1130
1248
  let n = t.find((t) => t.value === e);
1131
1249
  return n ? n.label : e;
1132
1250
  }
1133
- function oe(e, t) {
1251
+ function fe(e, t) {
1134
1252
  return e.replace(/(<span[^>]*\sdata-merge-tag="([^"]*)"[^>]*>)(.*?)(<\/span>)/g, (e, n, r, i, a) => `${n}${Q(r, t)}${a}`);
1135
1253
  }
1136
- function se(e, t) {
1254
+ function pe(e, t) {
1137
1255
  if (!e) return !1;
1138
1256
  let n = new RegExp(t.value.source, t.value.flags), r = new RegExp(t.logic.source, t.logic.flags);
1139
1257
  return n.test(e) || r.test(e);
1140
1258
  }
1141
- function ce(e, t) {
1142
- return Z(t.logic).test(e?.trim() || "");
1259
+ function me(e, t) {
1260
+ return X(t.logic).test(e?.trim() || "");
1143
1261
  }
1144
1262
  function $(e, t) {
1145
1263
  let n = new RegExp(t.logic.source, t.logic.flags.replace("g", "")), r = e.match(n);
1146
1264
  return r && r[1] ? r[1].toUpperCase() : e;
1147
1265
  }
1148
- function le(e, t) {
1266
+ function he(e, t) {
1149
1267
  return e.replace(/(<span[^>]*\sdata-logic-merge-tag="([^"]*)"[^>]*>)(.*?)(<\/span>)/g, (e, n, r, i, a) => `${n}${$(r, t)}${a}`);
1150
1268
  }
1151
- var ue = class extends Error {
1269
+ var ge = class extends Error {
1152
1270
  constructor(e, t) {
1153
1271
  super(e), this.statusCode = t, this.name = "SdkError";
1154
1272
  }
@@ -1164,4 +1282,4 @@ var ue = class extends Error {
1164
1282
  }
1165
1283
  };
1166
1284
  //#endregion
1167
- export { ie as A, ee as B, R as C, E as D, I as E, n as F, o as I, le as L, ce as M, ae as N, $ as O, c as P, oe as R, L as S, k as T, j as _, ue as a, A as b, K as c, G as d, te as f, z as g, P as h, J as i, t as j, Q as k, M as l, a as m, i as n, q as o, r as p, l as r, se as s, e as t, U as u, N as v, H as w, F as x, B as y, X as z };
1285
+ export { $ as A, fe as B, P as C, O as D, V as E, Z as F, ee as H, c as I, n as L, ue as M, t as N, F as O, me as P, o as R, k as S, L as T, de as V, W as _, ge as a, M as b, ce as c, se as d, ne as f, N as g, G as h, Y as i, Q as j, T as k, j as l, a as m, i as n, J as o, r as p, l as r, pe as s, e as t, H as u, R as v, I as w, z as x, A as y, he as z };