useblocks 1.3.11-dev.1 → 1.3.11-dev.3

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 (68) hide show
  1. package/README.md +3 -3
  2. package/iframe/.vite/manifest.json +4 -4
  3. package/iframe/{iframe-eblock.c5a8ebf9.html → iframe-eblock.5751e42b.html} +2 -2
  4. package/iframe/{iframe.c5a8ebf9.html → iframe.5751e42b.html} +2 -2
  5. package/iframe/js/elMarkupHelper.BpDXO-hq.js +279 -0
  6. package/iframe/js/{iframe-eblock.body.c5a8ebf9.js → iframe-eblock.body.5751e42b.js} +1 -1
  7. package/iframe/js/iframe-eblock.js +2 -2
  8. package/iframe/js/{iframe.body.c5a8ebf9.js → iframe.body.5751e42b.js} +1 -1
  9. package/iframe/js/iframe.js +2 -2
  10. package/package.json +1 -1
  11. package/runtime/react/index.js +1 -1
  12. package/static/core/{bf6cd7cc.js → 11009bdf.js} +1 -1
  13. package/static/core/{3f1b20ee.js → 11dadbc0.js} +1 -1
  14. package/static/core/{d3ae23fa.js → 1c06cdb7.js} +1 -1
  15. package/static/core/{2aa29959.js → 1c3a16fc.js} +1 -1
  16. package/static/core/{2a8276a7.js → 1c7a6d45.js} +1 -1
  17. package/static/core/{490ecf9b.js → 257745eb.js} +1 -1
  18. package/static/core/{1155fc70.js → 261a3a42.js} +1 -1
  19. package/static/core/2bed6a18.js +7 -0
  20. package/static/core/347b0a0b.js +1 -0
  21. package/static/core/{f3eb0f57.js → 3b65bc50.js} +1 -1
  22. package/static/core/{1d3606c0.js → 3d8e2478.js} +1 -1
  23. package/static/core/{1c0ad4e2.js → 3eeb4445.js} +1 -1
  24. package/static/core/{d8b648e9.js → 467344d4.js} +1 -1
  25. package/static/core/{8c5662da.js → 513e36bd.js} +1 -1
  26. package/static/core/{bfa8fbcd.js → 516f59e7.js} +1 -1
  27. package/static/core/{203f8a09.js → 58dca22f.js} +1 -1
  28. package/static/core/{4430410a.js → 5da33486.js} +1 -1
  29. package/static/core/{a636d084.js → 6172f09a.js} +1 -1
  30. package/static/core/{9689c25e.js → 62855b97.js} +1 -1
  31. package/static/core/{e4a8dec2.js → 66113a18.js} +1 -1
  32. package/static/core/{35a1d850.js → 71727873.js} +1 -1
  33. package/static/core/{e6bcae1a.js → 76543cb2.js} +1 -1
  34. package/static/core/{81908794.js → 7e329493.js} +1 -1
  35. package/static/core/{2b3023ec.js → 8406bab5.js} +1 -1
  36. package/static/core/{6b521a88.js → 8845436d.js} +2 -2
  37. package/static/core/{b90b0517.js → 94f9492b.js} +1 -1
  38. package/static/core/{6a4c653c.js → aee84e3d.js} +1 -1
  39. package/static/core/{62abaa0c.js → b55ae539.js} +1 -1
  40. package/static/core/{1c94aa95.js → b59c63d2.js} +1 -1
  41. package/static/core/{c96e8d1f.js → b9f553d7.js} +1 -1
  42. package/static/core/{f10baea7.js → bda2d9d5.js} +1 -1
  43. package/static/core/{8b0eaa20.js → c0a3f7d0.js} +2 -2
  44. package/static/core/{880187e3.js → c13b3d4f.js} +1 -1
  45. package/static/core/{411823ad.js → d2cf6b4b.js} +1 -1
  46. package/static/core/{3b0fc21e.js → d343e46e.js} +1 -1
  47. package/static/core/{14819724.js → d9d5b376.js} +1 -1
  48. package/static/core/{b8e2e735.js → dd008ec2.js} +1 -1
  49. package/static/core/{dbf8654f.js → e037a420.js} +1 -1
  50. package/static/core/{e5cae5a9.js → e698ec22.js} +1 -1
  51. package/static/core/{ebf996e0.js → e7e888c1.js} +1 -1
  52. package/static/core/ed65b5c3.js +19 -0
  53. package/static/core/{2f369eab.js → ef035f6b.js} +1 -1
  54. package/static/core/{6c84f3aa.js → f1b8515a.js} +1 -1
  55. package/static/core/{e955189e.js → f8585ce6.js} +1 -1
  56. package/static/esm/{f97f42d1.js → c5372168.js} +1 -1
  57. package/static/umd-runtime/{runtime.CtmO-sKr.js → runtime.Lgfb59e0.js} +1 -1
  58. package/useblocks-core.5751e42b.js +875 -0
  59. package/useblocks-esm.js +6 -6
  60. package/{useblocks-po.c5a8ebf9.js → useblocks-po.5751e42b.js} +1 -1
  61. package/useblocks.d.ts +4 -4
  62. package/useblocks.js +12 -12
  63. package/vendor/useblocks-ui-kit/package.json +1 -1
  64. package/iframe/js/elMarkupHelper.DjmNMeRr.js +0 -279
  65. package/static/core/a5cf594a.js +0 -1
  66. package/static/core/cff76b3c.js +0 -7
  67. package/static/core/ed99afa7.js +0 -19
  68. package/useblocks-core.c5a8ebf9.js +0 -875
@@ -1 +1 @@
1
- __useblocks__.define("static/core/e4a8dec2.js",["require","exports","module","static/core/2ff39ddf.js","static/core/82dfd28b.js","static/core/bf6cd7cc.js"],function(f,M,it){const D=f("./2ff39ddf.js"),s=f("./82dfd28b.js"),h=f("./bf6cd7cc.js");var F=1.25,O=80,$=3,k=1,p=16,L="p, div, td, th";function d(t){if(!t)return;const e=parseFloat(t);if(Number.isFinite(e))return t.trim().endsWith("pt")?e*4/3:e}function A(t){return t.style}function l(t){const e=A(t);if(!e)return!1;if(e.display==="none"||e.visibility==="hidden"||e.opacity==="0")return!0;const r=d(e.fontSize);return r!==void 0&&r<=k&&N(t)<=k?!0:d(e.maxHeight)===0}function u(t){for(let e=t;e;e=e.parentElement){const r=d(A(e)?.fontSize);if(r!==void 0)return r}return p}function w(t,e){for(const r of Array.from(t.childNodes)){if(s.isTextNode(r)){const n=r.data.trim().length;if(n){const i=u(r.parentElement);e.set(i,(e.get(i)??0)+n)}continue}!s.isElement(r)||l(r)||w(r,e)}}function b(t){const e=new Map;w(t,e);let r=p,n=0;for(const[i,o]of e)o>n&&(r=i,n=o);return r}function N(t){let e=u(t);for(const r of Array.from(t.querySelectorAll("*")))r.textContent?.trim()&&(e=Math.max(e,u(r)));return e}function j(t,e){return t.querySelector("a")?.textContent?.trim()===e}function q(t){return Array.from(t.querySelectorAll(L)).some(e=>e.textContent?.trim())}function G(t){const e=b(t),r=[];for(const o of Array.from(t.querySelectorAll(L))){if(l(o)||q(o))continue;const a=o.textContent?.trim()??"";if(!a||a.length>O||j(o,a))continue;const c=N(o);c>=e*F&&r.push({elem:o,size:c})}const n=[...new Set(r.map(o=>o.size))].sort((o,a)=>a-o),i=new Map;for(const{elem:o,size:a}of r)i.set(o,Math.min(n.indexOf(a)+1,$));return{headingLevels:i}}var R=D.__exportAll({markdownAnchor:()=>Y,markdownBlock:()=>X,markdownImage:()=>Q,markdownInline:()=>J,markdownOrderedList:()=>Z,markdownStrong:()=>K,markdownUnorderedList:()=>U}),E=h.formatList,_=20;function W(t){return!t||t.includes("%")?NaN:parseFloat(t)}function m(t,e){const r=t.style,n=e==="width"?"maxWidth":"maxHeight";for(const i of[t.getAttribute(e),r?.[e],r?.[n]]){const o=W(i);if(Number.isFinite(o))return o}return NaN}function x(t){return(t.getAttribute("alt")??"").trim()?!1:m(t,"width")<=_||m(t,"height")<=_}function S(t){return t.replace(/ /g,"%20").replace(/\(/g,"%28").replace(/\)/g,"%29")}function B(t){const e=t.getAttribute("href");return!e||e.startsWith("#")?"":e}function g(t){for(const e of Array.from(t.childNodes)){if(s.isTextNode(e)){if(/\S/.test(e.data))return!0;continue}if(!s.isElement(e))continue;const r=e.tagName.toLowerCase();if(r==="img"){if(e.getAttribute("src")&&!x(e))return!0;continue}if(r==="hr"||r==="a"&&B(e)&&v(e)||g(e))return!0}return!1}function v(t){const e=(t.getAttribute("title")??"").trim();if(e)return e;const r=t.querySelector("img");return r?(r.getAttribute("title")??"").trim():""}function y(t,e,r){r.addLiteral("["),e(),r.addLiteral(`](${S(t)})`)}function I(t,e){return t.parentElement?.tagName.toLowerCase()!=="li"?e:{...e,leadingLineBreaks:1,trailingLineBreaks:1}}var U=(t,e,r,n)=>{E(t,e,r,I(t,n),()=>"- ")},Z=(t,e,r,n)=>{let i=Number(t.getAttribute("start")??"1")||1;E(t,e,r,I(t,n),()=>`${i++}. `)},V={h1:1,h2:2,h3:3,h4:4,h5:5,h6:6};function z(t,e){return V[t.tagName.toLowerCase()]??e.metadata?.headingLevels.get(t)}var X=(t,e,r,n)=>{if(l(t)||!g(t))return;const i=z(t,r);r.openBlock({leadingLineBreaks:i?2:n.leadingLineBreaks}),i&&r.addLiteral(`${"#".repeat(i)} `),e(Array.from(t.childNodes),r),r.closeBlock({trailingLineBreaks:i?2:n.trailingLineBreaks})};function P(t,e){for(let r=t.parentElement;r;r=r.parentElement)if(z(r,e))return!0;return!1}function C(t){return s.isTextNode(t)?!/\S/.test(t.data):s.isElement(t)&&t.tagName.toLowerCase()==="br"}var K=(t,e,r)=>{const n=Array.from(t.childNodes);if(P(t,r)){e(n,r);return}let i=0,o=n.length;for(;i<o&&C(n[i]);)i++;for(;o>i&&C(n[o-1]);)o--;const a=n.slice(i,o),c=a.map(nt=>nt.textContent??"").join("");if(!a.length||c!==c.trim()){e(n,r);return}e(n.slice(0,i),r),r.addLiteral("**"),e(a,r),r.addLiteral("**"),e(n.slice(o),r)},J=(t,e,r)=>{l(t)||e(Array.from(t.childNodes),r)};function T(t){return t.replace(/&/g,"&amp;").replace(/"/g,"&quot;").replace(/</g,"&lt;").replace(/>/g,"&gt;")}function H(t,e){const r=m(t,e);return Number.isFinite(r)?` ${e}="${Math.round(r)}"`:""}var Q=(t,e,r)=>{const n=t.getAttribute("src");if(!n||x(t))return;const i=t.getAttribute("alt")??"",o=H(t,"width"),a=H(t,"height");if(o||a){r.addLiteral(`<img src="${T(n)}" alt="${T(i)}"${o}${a}>`);return}r.addLiteral("!["),r.addInline(i),r.addLiteral(`](${S(n)})`)},Y=(t,e,r)=>{const n=B(t);if(!n){e(Array.from(t.childNodes),r);return}if(g(t)){y(n,()=>e(Array.from(t.childNodes),r),r);return}const i=v(t);i&&y(n,()=>r.addInline(i),r)},tt={"\\":"\\\\","`":"\\`","*":"\\*",_:"\\_","[":"\\[","]":"\\]","#":"\\#",">":"\\>"},et={wordwrap:!1,encodeCharacters:tt,baseElements:{selectors:["body"]},formatters:R,selectors:[{selector:"*",format:"markdownInline"},{selector:"p",format:"markdownBlock",options:{leadingLineBreaks:2,trailingLineBreaks:2}},{selector:"div",format:"markdownBlock",options:{leadingLineBreaks:1,trailingLineBreaks:1}},{selector:"td",format:"markdownBlock",options:{leadingLineBreaks:1,trailingLineBreaks:1}},{selector:"table",format:"markdownBlock",options:{leadingLineBreaks:2,trailingLineBreaks:2}},{selector:"th",format:"markdownBlock",options:{leadingLineBreaks:1,trailingLineBreaks:1}},...["h1","h2","h3","h4","h5","h6"].map(t=>({selector:t,format:"markdownBlock"})),{selector:"a",format:"markdownAnchor"},{selector:"img",format:"markdownImage"},{selector:"ul",format:"markdownUnorderedList"},{selector:"ol",format:"markdownOrderedList"},{selector:"hr",format:"blockString",options:{string:"---",leadingLineBreaks:2,trailingLineBreaks:2}},{selector:"b",format:"markdownStrong"},{selector:"strong",format:"markdownStrong"},{selector:"i",format:"inlineSurround",options:{prefix:"*",suffix:"*"}},{selector:"em",format:"inlineSurround",options:{prefix:"*",suffix:"*"}}]};function rt(t){return h.convert(t,et,G(t))}M.htmlToMarkdown=rt});
1
+ __useblocks__.define("static/core/66113a18.js",["require","exports","module","static/core/2ff39ddf.js","static/core/a42ab03f.js","static/core/11009bdf.js"],function(f,M,it){const D=f("./2ff39ddf.js"),s=f("./a42ab03f.js"),h=f("./11009bdf.js");var F=1.25,O=80,$=3,k=1,p=16,L="p, div, td, th";function d(t){if(!t)return;const e=parseFloat(t);if(Number.isFinite(e))return t.trim().endsWith("pt")?e*4/3:e}function A(t){return t.style}function l(t){const e=A(t);if(!e)return!1;if(e.display==="none"||e.visibility==="hidden"||e.opacity==="0")return!0;const r=d(e.fontSize);return r!==void 0&&r<=k&&N(t)<=k?!0:d(e.maxHeight)===0}function u(t){for(let e=t;e;e=e.parentElement){const r=d(A(e)?.fontSize);if(r!==void 0)return r}return p}function w(t,e){for(const r of Array.from(t.childNodes)){if(s.isTextNode(r)){const n=r.data.trim().length;if(n){const i=u(r.parentElement);e.set(i,(e.get(i)??0)+n)}continue}!s.isElement(r)||l(r)||w(r,e)}}function b(t){const e=new Map;w(t,e);let r=p,n=0;for(const[i,o]of e)o>n&&(r=i,n=o);return r}function N(t){let e=u(t);for(const r of Array.from(t.querySelectorAll("*")))r.textContent?.trim()&&(e=Math.max(e,u(r)));return e}function j(t,e){return t.querySelector("a")?.textContent?.trim()===e}function q(t){return Array.from(t.querySelectorAll(L)).some(e=>e.textContent?.trim())}function G(t){const e=b(t),r=[];for(const o of Array.from(t.querySelectorAll(L))){if(l(o)||q(o))continue;const a=o.textContent?.trim()??"";if(!a||a.length>O||j(o,a))continue;const c=N(o);c>=e*F&&r.push({elem:o,size:c})}const n=[...new Set(r.map(o=>o.size))].sort((o,a)=>a-o),i=new Map;for(const{elem:o,size:a}of r)i.set(o,Math.min(n.indexOf(a)+1,$));return{headingLevels:i}}var R=D.__exportAll({markdownAnchor:()=>Y,markdownBlock:()=>X,markdownImage:()=>Q,markdownInline:()=>J,markdownOrderedList:()=>Z,markdownStrong:()=>K,markdownUnorderedList:()=>U}),E=h.formatList,_=20;function W(t){return!t||t.includes("%")?NaN:parseFloat(t)}function m(t,e){const r=t.style,n=e==="width"?"maxWidth":"maxHeight";for(const i of[t.getAttribute(e),r?.[e],r?.[n]]){const o=W(i);if(Number.isFinite(o))return o}return NaN}function x(t){return(t.getAttribute("alt")??"").trim()?!1:m(t,"width")<=_||m(t,"height")<=_}function S(t){return t.replace(/ /g,"%20").replace(/\(/g,"%28").replace(/\)/g,"%29")}function B(t){const e=t.getAttribute("href");return!e||e.startsWith("#")?"":e}function g(t){for(const e of Array.from(t.childNodes)){if(s.isTextNode(e)){if(/\S/.test(e.data))return!0;continue}if(!s.isElement(e))continue;const r=e.tagName.toLowerCase();if(r==="img"){if(e.getAttribute("src")&&!x(e))return!0;continue}if(r==="hr"||r==="a"&&B(e)&&v(e)||g(e))return!0}return!1}function v(t){const e=(t.getAttribute("title")??"").trim();if(e)return e;const r=t.querySelector("img");return r?(r.getAttribute("title")??"").trim():""}function y(t,e,r){r.addLiteral("["),e(),r.addLiteral(`](${S(t)})`)}function I(t,e){return t.parentElement?.tagName.toLowerCase()!=="li"?e:{...e,leadingLineBreaks:1,trailingLineBreaks:1}}var U=(t,e,r,n)=>{E(t,e,r,I(t,n),()=>"- ")},Z=(t,e,r,n)=>{let i=Number(t.getAttribute("start")??"1")||1;E(t,e,r,I(t,n),()=>`${i++}. `)},V={h1:1,h2:2,h3:3,h4:4,h5:5,h6:6};function z(t,e){return V[t.tagName.toLowerCase()]??e.metadata?.headingLevels.get(t)}var X=(t,e,r,n)=>{if(l(t)||!g(t))return;const i=z(t,r);r.openBlock({leadingLineBreaks:i?2:n.leadingLineBreaks}),i&&r.addLiteral(`${"#".repeat(i)} `),e(Array.from(t.childNodes),r),r.closeBlock({trailingLineBreaks:i?2:n.trailingLineBreaks})};function P(t,e){for(let r=t.parentElement;r;r=r.parentElement)if(z(r,e))return!0;return!1}function C(t){return s.isTextNode(t)?!/\S/.test(t.data):s.isElement(t)&&t.tagName.toLowerCase()==="br"}var K=(t,e,r)=>{const n=Array.from(t.childNodes);if(P(t,r)){e(n,r);return}let i=0,o=n.length;for(;i<o&&C(n[i]);)i++;for(;o>i&&C(n[o-1]);)o--;const a=n.slice(i,o),c=a.map(nt=>nt.textContent??"").join("");if(!a.length||c!==c.trim()){e(n,r);return}e(n.slice(0,i),r),r.addLiteral("**"),e(a,r),r.addLiteral("**"),e(n.slice(o),r)},J=(t,e,r)=>{l(t)||e(Array.from(t.childNodes),r)};function T(t){return t.replace(/&/g,"&amp;").replace(/"/g,"&quot;").replace(/</g,"&lt;").replace(/>/g,"&gt;")}function H(t,e){const r=m(t,e);return Number.isFinite(r)?` ${e}="${Math.round(r)}"`:""}var Q=(t,e,r)=>{const n=t.getAttribute("src");if(!n||x(t))return;const i=t.getAttribute("alt")??"",o=H(t,"width"),a=H(t,"height");if(o||a){r.addLiteral(`<img src="${T(n)}" alt="${T(i)}"${o}${a}>`);return}r.addLiteral("!["),r.addInline(i),r.addLiteral(`](${S(n)})`)},Y=(t,e,r)=>{const n=B(t);if(!n){e(Array.from(t.childNodes),r);return}if(g(t)){y(n,()=>e(Array.from(t.childNodes),r),r);return}const i=v(t);i&&y(n,()=>r.addInline(i),r)},tt={"\\":"\\\\","`":"\\`","*":"\\*",_:"\\_","[":"\\[","]":"\\]","#":"\\#",">":"\\>"},et={wordwrap:!1,encodeCharacters:tt,baseElements:{selectors:["body"]},formatters:R,selectors:[{selector:"*",format:"markdownInline"},{selector:"p",format:"markdownBlock",options:{leadingLineBreaks:2,trailingLineBreaks:2}},{selector:"div",format:"markdownBlock",options:{leadingLineBreaks:1,trailingLineBreaks:1}},{selector:"td",format:"markdownBlock",options:{leadingLineBreaks:1,trailingLineBreaks:1}},{selector:"table",format:"markdownBlock",options:{leadingLineBreaks:2,trailingLineBreaks:2}},{selector:"th",format:"markdownBlock",options:{leadingLineBreaks:1,trailingLineBreaks:1}},...["h1","h2","h3","h4","h5","h6"].map(t=>({selector:t,format:"markdownBlock"})),{selector:"a",format:"markdownAnchor"},{selector:"img",format:"markdownImage"},{selector:"ul",format:"markdownUnorderedList"},{selector:"ol",format:"markdownOrderedList"},{selector:"hr",format:"blockString",options:{string:"---",leadingLineBreaks:2,trailingLineBreaks:2}},{selector:"b",format:"markdownStrong"},{selector:"strong",format:"markdownStrong"},{selector:"i",format:"inlineSurround",options:{prefix:"*",suffix:"*"}},{selector:"em",format:"inlineSurround",options:{prefix:"*",suffix:"*"}}]};function rt(t){return h.convert(t,et,G(t))}M.htmlToMarkdown=rt});
@@ -1,4 +1,4 @@
1
- __useblocks__.define("static/core/35a1d850.js",["require","exports","module","static/core/2ff39ddf.js","static/core/82dfd28b.js","static/core/e6bcae1a.js","static/core/81908794.js","static/core/bfa8fbcd.js"],function(h,k,Y){const X=h("./2ff39ddf.js"),a=h("./82dfd28b.js"),R=h("./e6bcae1a.js"),u=h("./81908794.js"),b=h("./bfa8fbcd.js");var S=["# Rows of an email",'You add rows to the open email with row.insertHtml. Send only rows: an optional <style em="styles"> with the @media rules for every em-mob-* class the rows use, then one or more <tr em="block">.','The document shell, TR em="group" and table.em-narrow-table already exist in the email: never send <html>, <head>, <body>, em="group" or em-narrow-table.',"Make the rows as wide as the email: take the width from document.getSettings (660 px when it is not set).","Design the rows freely and richly: backgrounds, cards, columns, images, buttons, dividers, footers. Write all copy yourself in the language of the user.","Images: use real https addresses; for an illustration without a source use https://placehold.co/WIDTHxHEIGHT with the real pixel size.","row.insertHtml checks the rows against the rules below and answers invalidMarkup with a list of problems: fix them and send the rows again.","The rules below come from the converter of whole emails; where they speak of a source email, read them as the design you make."].join(`
1
+ __useblocks__.define("static/core/71727873.js",["require","exports","module","static/core/2ff39ddf.js","static/core/a42ab03f.js","static/core/76543cb2.js","static/core/7e329493.js","static/core/516f59e7.js"],function(h,k,Y){const X=h("./2ff39ddf.js"),a=h("./a42ab03f.js"),R=h("./76543cb2.js"),u=h("./7e329493.js"),b=h("./516f59e7.js");var S=["# Rows of an email",'You add rows to the open email with row.insertHtml. Send only rows: an optional <style em="styles"> with the @media rules for every em-mob-* class the rows use, then one or more <tr em="block">.','The document shell, TR em="group" and table.em-narrow-table already exist in the email: never send <html>, <head>, <body>, em="group" or em-narrow-table.',"Make the rows as wide as the email: take the width from document.getSettings (660 px when it is not set).","Design the rows freely and richly: backgrounds, cards, columns, images, buttons, dividers, footers. Write all copy yourself in the language of the user.","Images: use real https addresses; for an illustration without a source use https://placehold.co/WIDTHxHEIGHT with the real pixel size.","row.insertHtml checks the rows against the rules below and answers invalidMarkup with a list of problems: fix them and send the rows again.","The rules below come from the converter of whole emails; where they speak of a source email, read them as the design you make."].join(`
2
2
  `),O=[`## EmailMaker document architecture (mandatory hierarchy)
3
3
  Build from the outside in (ASCII tree):
4
4
 
@@ -1 +1 @@
1
- __useblocks__.define("static/core/e6bcae1a.js",["require","exports","module","static/core/82dfd28b.js"],function(d,i,g){const r=d("./82dfd28b.js");function l(t){return t?Date.parse(t):NaN}function f(t){return r.isBlocksV2Enabled()&&t.id!=null&&r.isBlockAutosaveInFlight(String(t.id))}function s(t,e){if(!r.isBlocksV2Enabled()||e.id==null)return e.html;const n=String(e.id);if(r.isBlockAutosaveInFlight(n))return;const u=r.blocksApi.endpoints.getBlock.select(n)(t());if(u.data?.html===void 0)return e.html;const c=l(e.modified);return Number.isNaN(c)||l(u.data.modified)>c?u.data.html:e.html}async function a(t,e){return await new Promise(n=>r.whenBlockAutosaveSettledWithin(String(e.id),r.getSaveTimeoutMs(),n))?s(t,e):void 0}var o=new Set;function m(t,e){const n=String(e.id);return o.has(n)?null:(o.add(n),a(t,e).finally(()=>o.delete(n)))}Object.defineProperty(i,"blockHtmlForInsert",{enumerable:!0,get:function(){return a}}),Object.defineProperty(i,"blockHtmlForInsertOnce",{enumerable:!0,get:function(){return m}}),Object.defineProperty(i,"freshBlockHtml",{enumerable:!0,get:function(){return s}}),Object.defineProperty(i,"waitsForWrite",{enumerable:!0,get:function(){return f}})});
1
+ __useblocks__.define("static/core/76543cb2.js",["require","exports","module","static/core/a42ab03f.js"],function(d,i,g){const r=d("./a42ab03f.js");function l(t){return t?Date.parse(t):NaN}function f(t){return r.isBlocksV2Enabled()&&t.id!=null&&r.isBlockAutosaveInFlight(String(t.id))}function s(t,e){if(!r.isBlocksV2Enabled()||e.id==null)return e.html;const n=String(e.id);if(r.isBlockAutosaveInFlight(n))return;const u=r.blocksApi.endpoints.getBlock.select(n)(t());if(u.data?.html===void 0)return e.html;const c=l(e.modified);return Number.isNaN(c)||l(u.data.modified)>c?u.data.html:e.html}async function a(t,e){return await new Promise(n=>r.whenBlockAutosaveSettledWithin(String(e.id),r.getSaveTimeoutMs(),n))?s(t,e):void 0}var o=new Set;function m(t,e){const n=String(e.id);return o.has(n)?null:(o.add(n),a(t,e).finally(()=>o.delete(n)))}Object.defineProperty(i,"blockHtmlForInsert",{enumerable:!0,get:function(){return a}}),Object.defineProperty(i,"blockHtmlForInsertOnce",{enumerable:!0,get:function(){return m}}),Object.defineProperty(i,"freshBlockHtml",{enumerable:!0,get:function(){return s}}),Object.defineProperty(i,"waitsForWrite",{enumerable:!0,get:function(){return f}})});
@@ -1 +1 @@
1
- __useblocks__.define("static/core/81908794.js",["require","exports","module","static/core/82dfd28b.js"],function(S,d,V){const s=S("./82dfd28b.js");var h=[{fields:["border","mobileBorder"],plan:"block_border"},{fields:["borderRadius"],plan:"block_radius",types:["img","countdown","video","td","structure","group","column","table","button","div","carousel"]},{fields:["mobileBorderRadius","outlookRounding"],plan:"block_radius"},{fields:["boxShadow","mobileBoxShadow"],plan:"block_shadow"},{fields:["show","direction","mobileDirection"],plan:"block_visibility"},{fields:["ampShow"],plan:"export_amp"},{fields:["exportAsPicture","isContrastBlock"],plan:"block_to_image"},{fields:["mobileAlign","mobileBackgroundColor","mobileBackgroundImage","mobileBackgroundPositionX","mobileBackgroundPositionY","mobileBackgroundRepeat","mobileBackgroundSize","mobileBorder","mobileBorderRadius","mobileBoxShadow","mobileContentWidth","mobileDirection","mobileFontSize","mobileHeight","mobileLineHeight","mobilePadding","mobileTextAlign","mobileVerticalAlign","mobileWidth"],plan:"mobile_props"},{fields:["imgReplacer"],plan:"variables"}],A=[{parent:"carouselImages",fields:["imgReplacer"],plan:"variables"}],j=[{parent:"buttons",fields:["border"],plan:"block_border"},{parent:"buttons",fields:["borderRadius"],plan:"block_radius"},{parent:"cards",fields:["border"],plan:"block_border"},{parent:"cards",fields:["borderRadius"],plan:"block_radius"}],g={backgroundColor:!0,backgroundImage:!0,backgroundPositionX:!0,backgroundPositionY:!0,backgroundRepeat:!0,backgroundSize:!0,backgroundColorContent:!0,width:!0,responsive:!0},m={text:!0,headings:!0,links:!0,buttons:!0,block:!0,cards:!0},E=/fontfamily$/i,p=/[<>"{};\\]/,w="Safe Fonts",F="Google Fonts",P="Project Fonts";function y(e,t,r){for(const n of t){const i=n.fields.find(o=>o in r),a=i&&s.featureRefusal(e,n.plan,`the "${i}" field`);if(a)return a}}var f=e=>typeof e=="object"&&e!==null;function B(e,t,r){const n=Array.isArray(t)?t:[],i=e.some(a=>f(a)&&a.slideIndex!==void 0);return e.some((a,o)=>{const u=f(a)?a:{},l=n[i?u.slideIndex:o];return(u[r]??"")!==((f(l)?l[r]:void 0)??"")})}async function T(e,t,r){const n=A.filter(o=>Array.isArray(r[o.parent])).flatMap(o=>o.fields.flatMap(u=>{const l=s.featureRefusal(e,o.plan,`the "${o.parent}[].${u}" field`);return l?[{parent:o.parent,field:u,refusal:l}]:[]}));if(n.length===0)return;const i=await s.askCanvasElement(e,{op:"get",element:t});if(i.ok===!1)return i;const a=i.value?.settings??{};return n.find(({parent:o,field:u})=>B(r[o],a[o],u))?.refusal}function N(e,t,r){for(const n of t){const i=r[n.parent],a=f(i)?n.fields.find(u=>u in i):void 0,o=a&&s.featureRefusal(e,n.plan,`the "${n.parent}.${a}" field`);if(o)return o}}function c(e){return f(e)?Object.entries(e).flatMap(([t,r])=>E.test(t)?[r]:c(r)):[]}function C(e){return Array.isArray(e)&&e[0]===F&&e[1]!==P}function b(e,t,r){const n=c(t).filter(C),i=n.length?s.featureRefusal(e,"google_fonts","Google fonts"):void 0;if(!i)return;const a=c(r).map(o=>JSON.stringify(o));return n.every(o=>a.includes(JSON.stringify(o)))?void 0:i}var L=e=>!p.test(e)&&!e.includes("'");function v(e){return!p.test(e)&&e.split(",").every(t=>{const r=t.trim();return!r.includes("'")||/^'[^']*'$/.test(r)})}function $(e){return typeof e=="string"?v(e):Array.isArray(e)&&e.every((t,r)=>typeof t=="string"&&(r===1&&e[0]===w?v(t):L(t)))}function k(e){return c(e).every($)?void 0:s.err("invalidArgs",'A font must be a string or an array of strings; a font name must not hold < > " { } ; or \\, and a single quote only around a whole family name.')}function G(e,t){return t?s.featureRefusal(e,"preheader_editing","the preheader"):void 0}var I=["href","link","linkHref","src","iconSrc"],U=["backgroundImage","mobileBackgroundImage"],D=/--!?>|</;function R(e){return typeof e!="string"||s.isExecutableUrl(e)||D.test(e)}function x(e,t){if(!(!U.includes(e)||!Array.isArray(t)))return t.some(r=>r?.value!==void 0&&r.value!==null&&R(r.value))?`${e}[].value`:void 0}function O(e){if(f(e))for(const[t,r]of Object.entries(e)){if(I.includes(t)&&r!==null&&R(r))return t;const n=x(t,r)??O(r);if(n)return n}}function _(e){const t=O(e);return t?s.err("invalidArgs",`"${t}" must be a string, must not be a javascript:, vbscript: or data:text/html address and must not hold "<" or "-->".`):void 0}function M(e){return Object.fromEntries(Object.entries(e).filter(([t])=>Object.hasOwn(g,t)))}function Y(e){const t=Object.keys(e).find(r=>!Object.hasOwn(g,r));return t?s.err("invalidArgs",`"${t}" is not an email layout setting; take the fields from document.getSettings. Common styles go to document.setContentStyles.`):_(e)}function K(e){const t=Object.keys(m).join(", "),r=Object.entries(e).find(([n,i])=>!Object.hasOwn(m,n)||!f(i)||Array.isArray(i));return r?s.err("invalidArgs",`"${r[0]}" must be a group of common styles, an object; the groups are ${t}.`):void 0}function q(e,t,r){return K(t)??k(t)??N(e,j,t)??b(e,t,r)}async function z(e,t,r){if(!b(e,r,void 0))return;const n=await s.askCanvasElement(e,{op:"get",element:t});return n.ok===!1?n:b(e,r,n.value?.settings)}async function H(e,t,r){const n=h.filter(l=>l.fields.some(J=>J in r)),i=y(e,n.filter(l=>!l.types),r)??await T(e,t,r)??await z(e,t,r),a=n.filter(l=>l.types);if(i||a.length===0)return i;const o=await s.askCanvasElement(e,{op:"get",element:t});if(o.ok===!1)return o;const u=o.value?.type??"";return y(e,a.filter(l=>l.types?.includes(u)),r)}Object.defineProperty(d,"closedFieldRefusal",{enumerable:!0,get:function(){return H}}),Object.defineProperty(d,"contentStylesRefusal",{enumerable:!0,get:function(){return q}}),Object.defineProperty(d,"editableLayoutSettings",{enumerable:!0,get:function(){return M}}),Object.defineProperty(d,"fontNameRefusal",{enumerable:!0,get:function(){return k}}),Object.defineProperty(d,"layoutSettingsRefusal",{enumerable:!0,get:function(){return Y}}),Object.defineProperty(d,"preheaderRefusal",{enumerable:!0,get:function(){return G}}),Object.defineProperty(d,"unsafeUrlRefusal",{enumerable:!0,get:function(){return _}})});
1
+ __useblocks__.define("static/core/7e329493.js",["require","exports","module","static/core/a42ab03f.js"],function(S,d,V){const s=S("./a42ab03f.js");var h=[{fields:["border","mobileBorder"],plan:"block_border"},{fields:["borderRadius"],plan:"block_radius",types:["img","countdown","video","td","structure","group","column","table","button","div","carousel"]},{fields:["mobileBorderRadius","outlookRounding"],plan:"block_radius"},{fields:["boxShadow","mobileBoxShadow"],plan:"block_shadow"},{fields:["show","direction","mobileDirection"],plan:"block_visibility"},{fields:["ampShow"],plan:"export_amp"},{fields:["exportAsPicture","isContrastBlock"],plan:"block_to_image"},{fields:["mobileAlign","mobileBackgroundColor","mobileBackgroundImage","mobileBackgroundPositionX","mobileBackgroundPositionY","mobileBackgroundRepeat","mobileBackgroundSize","mobileBorder","mobileBorderRadius","mobileBoxShadow","mobileContentWidth","mobileDirection","mobileFontSize","mobileHeight","mobileLineHeight","mobilePadding","mobileTextAlign","mobileVerticalAlign","mobileWidth"],plan:"mobile_props"},{fields:["imgReplacer"],plan:"variables"}],A=[{parent:"carouselImages",fields:["imgReplacer"],plan:"variables"}],j=[{parent:"buttons",fields:["border"],plan:"block_border"},{parent:"buttons",fields:["borderRadius"],plan:"block_radius"},{parent:"cards",fields:["border"],plan:"block_border"},{parent:"cards",fields:["borderRadius"],plan:"block_radius"}],g={backgroundColor:!0,backgroundImage:!0,backgroundPositionX:!0,backgroundPositionY:!0,backgroundRepeat:!0,backgroundSize:!0,backgroundColorContent:!0,width:!0,responsive:!0},m={text:!0,headings:!0,links:!0,buttons:!0,block:!0,cards:!0},E=/fontfamily$/i,p=/[<>"{};\\]/,w="Safe Fonts",F="Google Fonts",P="Project Fonts";function y(e,t,r){for(const n of t){const i=n.fields.find(o=>o in r),a=i&&s.featureRefusal(e,n.plan,`the "${i}" field`);if(a)return a}}var f=e=>typeof e=="object"&&e!==null;function B(e,t,r){const n=Array.isArray(t)?t:[],i=e.some(a=>f(a)&&a.slideIndex!==void 0);return e.some((a,o)=>{const u=f(a)?a:{},l=n[i?u.slideIndex:o];return(u[r]??"")!==((f(l)?l[r]:void 0)??"")})}async function T(e,t,r){const n=A.filter(o=>Array.isArray(r[o.parent])).flatMap(o=>o.fields.flatMap(u=>{const l=s.featureRefusal(e,o.plan,`the "${o.parent}[].${u}" field`);return l?[{parent:o.parent,field:u,refusal:l}]:[]}));if(n.length===0)return;const i=await s.askCanvasElement(e,{op:"get",element:t});if(i.ok===!1)return i;const a=i.value?.settings??{};return n.find(({parent:o,field:u})=>B(r[o],a[o],u))?.refusal}function N(e,t,r){for(const n of t){const i=r[n.parent],a=f(i)?n.fields.find(u=>u in i):void 0,o=a&&s.featureRefusal(e,n.plan,`the "${n.parent}.${a}" field`);if(o)return o}}function c(e){return f(e)?Object.entries(e).flatMap(([t,r])=>E.test(t)?[r]:c(r)):[]}function C(e){return Array.isArray(e)&&e[0]===F&&e[1]!==P}function b(e,t,r){const n=c(t).filter(C),i=n.length?s.featureRefusal(e,"google_fonts","Google fonts"):void 0;if(!i)return;const a=c(r).map(o=>JSON.stringify(o));return n.every(o=>a.includes(JSON.stringify(o)))?void 0:i}var L=e=>!p.test(e)&&!e.includes("'");function v(e){return!p.test(e)&&e.split(",").every(t=>{const r=t.trim();return!r.includes("'")||/^'[^']*'$/.test(r)})}function $(e){return typeof e=="string"?v(e):Array.isArray(e)&&e.every((t,r)=>typeof t=="string"&&(r===1&&e[0]===w?v(t):L(t)))}function k(e){return c(e).every($)?void 0:s.err("invalidArgs",'A font must be a string or an array of strings; a font name must not hold < > " { } ; or \\, and a single quote only around a whole family name.')}function G(e,t){return t?s.featureRefusal(e,"preheader_editing","the preheader"):void 0}var I=["href","link","linkHref","src","iconSrc"],U=["backgroundImage","mobileBackgroundImage"],D=/--!?>|</;function R(e){return typeof e!="string"||s.isExecutableUrl(e)||D.test(e)}function x(e,t){if(!(!U.includes(e)||!Array.isArray(t)))return t.some(r=>r?.value!==void 0&&r.value!==null&&R(r.value))?`${e}[].value`:void 0}function O(e){if(f(e))for(const[t,r]of Object.entries(e)){if(I.includes(t)&&r!==null&&R(r))return t;const n=x(t,r)??O(r);if(n)return n}}function _(e){const t=O(e);return t?s.err("invalidArgs",`"${t}" must be a string, must not be a javascript:, vbscript: or data:text/html address and must not hold "<" or "-->".`):void 0}function M(e){return Object.fromEntries(Object.entries(e).filter(([t])=>Object.hasOwn(g,t)))}function Y(e){const t=Object.keys(e).find(r=>!Object.hasOwn(g,r));return t?s.err("invalidArgs",`"${t}" is not an email layout setting; take the fields from document.getSettings. Common styles go to document.setContentStyles.`):_(e)}function K(e){const t=Object.keys(m).join(", "),r=Object.entries(e).find(([n,i])=>!Object.hasOwn(m,n)||!f(i)||Array.isArray(i));return r?s.err("invalidArgs",`"${r[0]}" must be a group of common styles, an object; the groups are ${t}.`):void 0}function q(e,t,r){return K(t)??k(t)??N(e,j,t)??b(e,t,r)}async function z(e,t,r){if(!b(e,r,void 0))return;const n=await s.askCanvasElement(e,{op:"get",element:t});return n.ok===!1?n:b(e,r,n.value?.settings)}async function H(e,t,r){const n=h.filter(l=>l.fields.some(J=>J in r)),i=y(e,n.filter(l=>!l.types),r)??await T(e,t,r)??await z(e,t,r),a=n.filter(l=>l.types);if(i||a.length===0)return i;const o=await s.askCanvasElement(e,{op:"get",element:t});if(o.ok===!1)return o;const u=o.value?.type??"";return y(e,a.filter(l=>l.types?.includes(u)),r)}Object.defineProperty(d,"closedFieldRefusal",{enumerable:!0,get:function(){return H}}),Object.defineProperty(d,"contentStylesRefusal",{enumerable:!0,get:function(){return q}}),Object.defineProperty(d,"editableLayoutSettings",{enumerable:!0,get:function(){return M}}),Object.defineProperty(d,"fontNameRefusal",{enumerable:!0,get:function(){return k}}),Object.defineProperty(d,"layoutSettingsRefusal",{enumerable:!0,get:function(){return Y}}),Object.defineProperty(d,"preheaderRefusal",{enumerable:!0,get:function(){return G}}),Object.defineProperty(d,"unsafeUrlRefusal",{enumerable:!0,get:function(){return _}})});
@@ -1 +1 @@
1
- __useblocks__.define("static/core/2b3023ec.js",["require","exports","module","static/core/2ff39ddf.js","static/core/82dfd28b.js","static/core/bfa8fbcd.js"],function(i,u,h){const g=i("./2ff39ddf.js"),e=i("./82dfd28b.js");i("./bfa8fbcd.js");var c=()=>e.err("unavailable","The template gallery is not available in the plugin.");function m(t){return e.peekEmailDocuments(t)?.current()?e.isReadOnly(t)?e.readOnlyError():c():e.noDocument()}function d(t,l){return e.resolveEmailPort(t).readEmail(l).catch(()=>{})}var p=t=>e.err("notFound",`There is no template "${t}" in the gallery; take an id from gallery.listTemplates.`);function y(t){const l=new WeakMap,o=r=>{const a=l.get(r)??d(t,r.template);return l.set(r,a),a};return{"document.applyTemplate":{precheck:async r=>{const a=m(t);if(a)return a;const n=await o(r);return n===void 0||n?.is_template?void 0:p(r.template)},consent:async r=>{const{__:a}=e.agentTranslator(t),n=await o(r);return{title:a("Replace the email content with a gallery template"),...e.detailsOf({label:a("Template").trim(),value:e.clip(n?.title??"")})}}}}}function f(t){return{"gallery.listTemplates":async({page:l})=>c(),"document.applyTemplate":async({template:l},o)=>{const r=m(t);if(r)return r;const a=e.peekEmailDocuments(t),n=a?.current();if(!a||!n)return e.noDocument();const s=await d(t,l);return o.signal.aborted?e.cancelledError():e.isReadOnly(t)?e.readOnlyError():s===void 0?e.err("unavailable","The template could not be loaded."):s?.is_template?e.peekEmailDocuments(t)?.current()!==n?e.err("unavailable","The open document changed while the template was loading."):s.html?(e.replaceDocumentContent(n,a.history(),s.html,{undoable:!0}),e.ok()):e.err("unavailable","The template has no content."):p(l)},"project.getStyles":async()=>e.err("unavailable","Project styles are not available in the plugin.")}}u.agentGalleryGates=y,u.agentGalleryHandlers=f});
1
+ __useblocks__.define("static/core/8406bab5.js",["require","exports","module","static/core/2ff39ddf.js","static/core/a42ab03f.js","static/core/516f59e7.js"],function(i,u,h){const g=i("./2ff39ddf.js"),e=i("./a42ab03f.js");i("./516f59e7.js");var c=()=>e.err("unavailable","The template gallery is not available in the plugin.");function m(t){return e.peekEmailDocuments(t)?.current()?e.isReadOnly(t)?e.readOnlyError():c():e.noDocument()}function d(t,l){return e.resolveEmailPort(t).readEmail(l).catch(()=>{})}var p=t=>e.err("notFound",`There is no template "${t}" in the gallery; take an id from gallery.listTemplates.`);function y(t){const l=new WeakMap,o=r=>{const a=l.get(r)??d(t,r.template);return l.set(r,a),a};return{"document.applyTemplate":{precheck:async r=>{const a=m(t);if(a)return a;const n=await o(r);return n===void 0||n?.is_template?void 0:p(r.template)},consent:async r=>{const{__:a}=e.agentTranslator(t),n=await o(r);return{title:a("Replace the email content with a gallery template"),...e.detailsOf({label:a("Template").trim(),value:e.clip(n?.title??"")})}}}}}function f(t){return{"gallery.listTemplates":async({page:l})=>c(),"document.applyTemplate":async({template:l},o)=>{const r=m(t);if(r)return r;const a=e.peekEmailDocuments(t),n=a?.current();if(!a||!n)return e.noDocument();const s=await d(t,l);return o.signal.aborted?e.cancelledError():e.isReadOnly(t)?e.readOnlyError():s===void 0?e.err("unavailable","The template could not be loaded."):s?.is_template?e.peekEmailDocuments(t)?.current()!==n?e.err("unavailable","The open document changed while the template was loading."):s.html?(e.replaceDocumentContent(n,a.history(),s.html,{undoable:!0}),e.ok()):e.err("unavailable","The template has no content."):p(l)},"project.getStyles":async()=>e.err("unavailable","Project styles are not available in the plugin.")}}u.agentGalleryGates=y,u.agentGalleryHandlers=f});