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,4 +1,4 @@
1
- __useblocks__.define("js/iframe-eblock.js",["require","exports","module","js/elMarkupHelper.DjmNMeRr.js"],function(h,w,M){const t=h("./elMarkupHelper.DjmNMeRr.js");var R=t.require_iframeResizer_contentWindow_min();function k(o){const s=new Map,e=[],c=[],l=[];for(const n of o)if(n instanceof HTMLLinkElement)n.getAttribute("em-class")?.startsWith("em-font-")&&c.push(n);else if(n instanceof HTMLStyleElement){const r=n.getAttribute("em")||"",d=s.get(r);d?d.push(n):s.set(r,[n])}else if(n instanceof Element)if(n.getAttribute("em")==="block")e.push(n);else{const r=n.querySelector("[em='block']");r&&e.push(r)}else n.textContent===`
1
+ __useblocks__.define("js/iframe-eblock.js",["require","exports","module","js/elMarkupHelper.BpDXO-hq.js"],function(h,w,M){const t=h("./elMarkupHelper.BpDXO-hq.js");var R=t.require_iframeResizer_contentWindow_min();function k(o){const s=new Map,e=[],c=[],l=[];for(const n of o)if(n instanceof HTMLLinkElement)n.getAttribute("em-class")?.startsWith("em-font-")&&c.push(n);else if(n instanceof HTMLStyleElement){const r=n.getAttribute("em")||"",d=s.get(r);d?d.push(n):s.set(r,[n])}else if(n instanceof Element)if(n.getAttribute("em")==="block")e.push(n);else{const r=n.querySelector("[em='block']");r&&e.push(r)}else n.textContent===`
2
2
  `&&l.push(n);const a=[];for(const n of c)a.push(n);for(const[n,r]of s)if(r.length>1){let d=t.minifyStylesheet(r.map(m=>m.innerHTML).join(`
3
3
  `),{restructure:!0,forceMediaMerge:!0}).css;if(d=cssbeautify(d,{indent:" ",autosemicolon:!0}),d){const m=document.createElement("style");m.innerHTML=`
4
4
  ${d}
@@ -1,7 +1,7 @@
1
1
  var e=window.__useblocks__||(window.__useblocks__={});(function(){"use strict";if(e!==void 0&&e.define)return;e===void 0&&(window.__amdEnv={});var t={},n={},r={},i={},a={},o=null,s={},c={},l=0;function u(e,t){l+=1;try{return e.factory.apply(null,t)}finally{--l}}var d=`./`,f={},p=60,m=`emailmaker:diagnostics`,h=[],g;function _(){if(g!==void 0)return g;g=!1;try{var e=/[?&]diagnostics(?:=([^&]*))?/.exec(window.location.search||``);if(e)return g=e[1]!==`0`,g;if(typeof window.__DIAGNOSTICS__==`boolean`)return g=!!window.__DIAGNOSTICS__,g;g=window.localStorage.getItem(m)===`1`}catch{g=!1}return g}function v(e,t){if(_()){var n={phase:e,at:performance.timeOrigin+performance.now(),kind:`wait`};t&&(n.parent=String(t)),h.push(n)}}function y(e){if(!e||e.__amdLogged)return e;try{Object.defineProperty(e,"__amdLogged",{value:!0,enumerable:!1})}catch{try{e.__amdLogged=!0}catch{}}try{var t=e&&e.message||`loader error`;console.error(`[AMD] `+(t.indexOf(`[AMD]`)===0?t.slice(6):t),e)}catch{}return e}function b(){try{if(e!==void 0&&e&&e.publicPath)return String(e.publicPath)}catch{}return`(not set)`}function x(){var e=b();return String(e).indexOf(`file:`)===0?` The page appears to be opened as a local file (file://) or publicPath was not configured. Serve the host app over HTTP(S) and set publicPath to the origin that serves editor assets (host bundler plugin or __amdEnv.setPublicPath). Current runtime publicPath=`+e+`.`:` Host bundler publicPath may be misconfigured (Vite/Webpack host plugin). In dev, set publicPath to the absolute origin that serves editor assets (for example http://localhost:3001/<outputFolder>/). Current runtime publicPath=`+e+`.`}function S(e){if(typeof fetch!=`function`)return Promise.resolve(``);function t(e){var t=(e.headers.get(`content-type`)||``).toLowerCase();try{e.body&&typeof e.body.cancel==`function`&&e.body.cancel()}catch{}return t.indexOf(`text/html`)>=0?` The URL returned HTML (Content-Type: text/html), not JavaScript — often a SPA fallback when asset paths are wrong.`:e.ok?``:` HTTP status `+e.status+` — the asset URL may be wrong or blocked by the server.`}return fetch(e,{method:`HEAD`,credentials:`omit`,headers:{Accept:`application/javascript,*/*`}}).then(function(n){return n.status===405||n.status===501?fetch(e,{method:`GET`,credentials:`omit`,headers:{Accept:`application/javascript,*/*`}}).then(t):t(n)}).catch(function(){return fetch(e,{method:`GET`,credentials:`omit`,headers:{Accept:`application/javascript,*/*`}}).then(t).catch(function(){return``})})}function C(e,t){var n=Error(`[AMD] Failed to load module "`+e+`"`+(t?`: `+t.message:``));return n.moduleId=e,n.cause=t,n}function w(e,t,n){var r=Error(`[AMD] Failed to resolve dependency "`+t+`" for module "`+e+`"`+(n?`: `+n.message:``));return r.moduleId=e,r.dependencyId=t,r.cause=n,r}function T(e){for(var t=String(e||``).split(`/`),n=[],r=0;r<t.length;r++){var i=t[r];if(i&&i!==`.`){if(i===`..`){n.length>0&&n.pop();continue}n.push(i)}}return n.join(`/`)}function E(e){var t=String(e||``).replace(/\\/g,`/`),n=String(d||`./`).replace(/\\/g,`/`);return n=n.replace(/^\.\/+/,``),n=n.replace(/^\/+/,``),n&&n.slice(-1)!==`/`&&(n+=`/`),n&&t.indexOf(n)===0&&(t=t.slice(n.length)),t.indexOf(`./`)===0&&(t=t.slice(2)),t}function D(e){return{then:function(t,n){return e.then(t,n)},catch:function(t){return e.catch(t)},finally:function(t){return e.finally(t)}}}function O(e,t){var n=String(e||``);if(!n)return n;if(n.indexOf(`./`)!==0&&n.indexOf(`../`)!==0)return E(T(n));var r=t||``;if(Object.prototype.hasOwnProperty.call(f,r)){var i=String(f[r]||``);i&&!k(i)&&i.charAt(0)!==`/`&&(r=i)}var a=T(r),o=a?a.split(`/`):[];o.length>0&&o.pop();for(var s=n.split(`/`),c=0;c<s.length;c++){var l=s[c];if(l&&l!==`.`){if(l===`..`){o.length>0&&o.pop();continue}o.push(l)}}return E(o.join(`/`))}function k(e){return/^[a-zA-Z][a-zA-Z\d+\-.]*:/.test(e)||e.indexOf(`//`)===0}function A(e){var t=String(e||``);if(!t||k(t))return t;try{var n=typeof document<`u`&&document.baseURI?document.baseURI:typeof window<`u`&&window.location?window.location.href:``;return n?new URL(t,n).href:t}catch{return t}}function j(){var t=String(d||`./`);if(t.slice(-1)!==`/`&&(t+=`/`),k(t)||t.charAt(0)===`/`)return t;if(e!==void 0&&e&&e.publicPath)try{return new URL(t,A(e.publicPath)).href}catch{}return A(t)}function M(e,t){var n=O(e,t),r=j(),i=Object.prototype.hasOwnProperty.call(f,n)?String(f[n]||``):n;i.slice(-3)!==`.js`&&(i+=`.js`);try{return new URL(i,r).href}catch{return r+i}}function N(){if(typeof document>`u`)return``;var e=document.currentScript;if(e){var t=e.getAttribute(`data-amd-module-id`);if(t)return t}return``}function P(e,n,r){if(Array.isArray(e)?(r=n,n=e,e=N()):typeof e==`function`?(r=e,n=[],e=N()):typeof n==`function`&&(r=n,n=[]),!e)throw Error(`[AMD] Anonymous define() could not be associated with a module id`);e in t||(t[e]={deps:n||[],factory:r})}P.amd={async:!0};function F(e){var t=new Event(`vite:preloadError`,{cancelable:!0});if(t.payload=e,window.dispatchEvent(t),!t.defaultPrevented)throw e}P(`vite/preload-helper`,[`exports`],function(e){e.__vitePreload=function(e){return Promise.resolve().then(function(){return e().catch(F)})}});function I(){return function(){}}function L(e,t){return{id:e,exports:t,uri:M(e)}}function R(e,t,n,r){if(Array.isArray(e)){var i=Promise.all(e.map(function(e){return V(e,r)})).then(function(e){return t&&t.apply(null,e),e});return n&&i.catch(n),i}return V(e,r)}function z(e,o){if(Array.isArray(e))throw Error(`[AMD] syncRequire does not support dependency arrays`);var s=O(e,o);if(s in a)throw y(a[s]);if(s in n)return n[s];if(s in r||s in i)throw y(C(s,Error(`Module is still loading asynchronously`)));if(!(s in t))throw y(C(s,Error(`Module is not available for syncRequire`)));return U(s)}function B(e,i){if(o&&e in o){var s={},c=[e];for(s[e]=!0;c.length>0;){var l=o[c.shift()];if(l)for(var u=0;u<l.length;u++){var d=l[u];s[d]||(s[d]=!0,c.push(d),!(d in n||d in a||d in r)&&(d in o?d in t||K(d,i).catch(function(){}):d in t&&V(d).catch(function(){})))}}}}function V(e,i){var o=O(e,i);if(o in a)return Promise.reject(y(a[o]));if(o in n)return Promise.resolve(n[o]);if(o in r)return r[o];if(v(`core:module:`+o+`:ask`,i),o in t)r[o]=H(o);else{var s=M(o);r[o]=K(o).then(function(){return v(`core:module:`+o+`:loaded`,i),o in t?H(o):S(s).then(function(e){var t=C(o,Error(`Module not defined after script load from "`+s+`".`+e+x()));throw a[o]=t,y(t)})}).catch(function(e){delete r[o];var t=e&&e.moduleId===o?e:C(o,e);throw a[o]=t,y(t)})}return B(o),r[o]}function H(e){var i=t[e],o=W(e),s=I(),l=L(e,s);c[e]=s;function d(t){return n[e]=t,delete r[e],delete c[e],n[e]}return Promise.all(i.deps.map(function(t){return t===`exports`?s:t===`require`?o:t===`module`?l:V(t,e).catch(function(n){throw w(e,t,n)})})).then(function(t){v(`core:module:`+e+`:deps`);var n=u(i,t);return n&&typeof n.then==`function`?n.then(function(t){return v(`core:module:`+e+`:ready`),d(t===void 0?l.exports:t)}):(v(`core:module:`+e+`:ready`),d(n===void 0?l.exports:n))}).catch(function(t){throw delete r[e],delete c[e],a[e]=t,y(t)})}function U(e){var r=t[e],i=W(e),o=I(),s=L(e,o);try{var c=u(r,r.deps.map(function(t){if(t===`exports`)return o;if(t===`require`)return i;if(t===`module`)return s;try{return z(t,e)}catch(n){throw w(e,t,n)}}));if(c&&typeof c.then==`function`)throw C(e,Error(`Module resolved asynchronously and cannot be syncRequired`));return n[e]=c===void 0?s.exports:c,n[e]}catch(t){throw a[e]=t,y(t)}}function W(e){var o=function(o,s,u){if(Array.isArray(o))return R(o,s,u,e);var d=O(o,e);if(d in a)throw y(a[d]);return d in n?n[d]:d in c&&l>0?c[d]:d in r||d in i?D(V(o,e)):d in t?z(o,e):D(V(o,e))};return o.resolve=function(t){return O(t,e)},o.toUrl=function(t){return M(t,e)},o.sync=function(t){return z(t,e)},o}function G(t,n){var r=e!==void 0&&e?e.moduleTransport:null;if(typeof r!=`function`||e.blobBlocked)return null;try{var i=r(t,n);return i&&typeof i.then==`function`?i:null}catch{return null}}function K(t,n){if(t in i)return i[t];if(s[t]&&s[t]!==t)return i[t]=K(s[t],n),i[t];var r=M(t);if(document.querySelector(`script[src="`+r+`"]`))return i[t]=Promise.resolve(),i[t];var a=performance.now();function o(e){return J(t,r,!1,n).then(function(n){return q(t,e,a),n})}var c=G(r,t);return c?(i[t]=c.then(function(r){return r?J(t,URL.createObjectURL(r),!0,n).then(function(e){return q(t,`transport`,a),e},function(){return e.blobBlocked=!0,o(`network-after-blob`)}):o(`network-fallback`)},function(){return o(`network-after-transport-error`)}),i[t]):(i[t]=o(`network`),i[t])}function q(t,n,r){_()&&((e.loaderTimings||=[]).push({id:t,via:n,ms:Math.round((performance.now()-r)*10)/10}),typeof e.onLoaderTiming==`function`&&e.onLoaderTiming())}function J(e,t,n,r){return new Promise(function(a,o){var s=!1,c=document.createElement(`script`);c.src=t,c.setAttribute(`data-amd-module-id`,e),c.async=!0,r===`low`&&(c.fetchPriority=`low`);var l=p>0?p*1e3:0,u=null;function d(){u!=null&&(clearTimeout(u),u=null),c.onload=null,c.onerror=null,n&&typeof URL<`u`&&URL.revokeObjectURL&&URL.revokeObjectURL(t)}function f(e){s||(s=!0,d(),e())}l>0&&(u=setTimeout(function(){f(function(){delete i[e],o(y(C(e,Error(`Timed out after `+l+`ms loading script: `+t+`.`+x()))))})},l)),c.onload=function(){f(function(){a()})},c.onerror=function(){f(function(){delete i[e],o(y(C(e,Error(`Failed to load script: `+t+`.`+x()))))})},document.head.appendChild(c)})}R.config=function(e){if(e.baseUrl&&(d=e.baseUrl),e.paths)for(var t in e.paths)Object.prototype.hasOwnProperty.call(e.paths,t)&&(f[t]=e.paths[t]);if(e.bundles){for(var n in e.bundles)if(Object.prototype.hasOwnProperty.call(e.bundles,n))for(var r=0;r<e.bundles[n].length;r++)s[e.bundles[n][r]]=n}if(e.graph)for(var i in o||={},e.graph)Object.prototype.hasOwnProperty.call(e.graph,i)&&(o[i]=e.graph[i]);typeof e.waitSeconds==`number`&&e.waitSeconds>=0&&(p=e.waitSeconds)},R.warm=function(e,r){var i=r&&r.priority;return Promise.all((e||[]).map(function(e){var r=O(e);if(r in a)return Promise.reject(a[r]);var o=r in t||r in n?Promise.resolve():K(r,i);return B(r,i),o})).then(function(){})},R.modules=t,R.resolved=n,R.errors=a,R.toUrl=M,R.sync=z,e.define=P,e.require=R,e.syncRequire=z,e.diagnosticsBuffer=h})(),e.require.config({baseUrl:`./`});
2
2
 
3
- __useblocks__.require.config({ paths: {"js/iframe-eblock.js":"js/iframe-eblock.body.c5a8ebf9.js"} });
3
+ __useblocks__.require.config({ paths: {"js/iframe-eblock.js":"js/iframe-eblock.body.5751e42b.js"} });
4
4
 
5
- __useblocks__.require.config({"graph":{"js/iframe-eblock.js":["js/elMarkupHelper.DjmNMeRr.js"],"js/iframe.js":["js/elMarkupHelper.DjmNMeRr.js"],"js/darkreader.CyLMh7_H.js":[],"js/elMarkupHelper.DjmNMeRr.js":[],"js/rules.CL_BitCE.js":[],"js/typograf.all.CGEpDoct.js":[]}});
5
+ __useblocks__.require.config({"graph":{"js/iframe-eblock.js":["js/elMarkupHelper.BpDXO-hq.js"],"js/iframe.js":["js/elMarkupHelper.BpDXO-hq.js"],"js/darkreader.CyLMh7_H.js":[],"js/elMarkupHelper.BpDXO-hq.js":[],"js/rules.CL_BitCE.js":[],"js/typograf.all.CGEpDoct.js":[]}});
6
6
 
7
7
  __useblocks__.require("js/iframe-eblock.js");
@@ -1,4 +1,4 @@
1
- __useblocks__.define("js/iframe.js",["require","exports","module","js/elMarkupHelper.DjmNMeRr.js"],function($,Ke,Ze){const s=$("./elMarkupHelper.DjmNMeRr.js");var z="confetti:open-settings",U="confetti:start",j="confetti:stop",G="confetti:complete",Y=class{constructor(e){s._defineProperty(this,"_app",void 0),s._defineProperty(this,"_state","idle"),s._defineProperty(this,"_activeEffects",new Map),s._defineProperty(this,"_onDocumentClick",r=>{const i=r.target;if(!i)return;const n=i.closest(".confetti-placeholder");if(!n)return;const l=n.getAttribute("data-confetti-preset")||void 0;this._app.use("MessageService").send(z,{preset:l})}),this._app=e}init(){const e=this._app.use("MessageService");e.addListener(U,r=>this._handleStart(r.id,r.options)),e.addListener(j,r=>this._handleStop(r.id)),document.addEventListener("click",this._onDocumentClick,!0)}_handleStart(e,r){const i={id:e,options:r,startTime:Date.now()};this._activeEffects.set(e,i),this._state="running",this.onEffectStart(e,r),this.renderConfetti(e,r);const n=r.duration||3e3;setTimeout(()=>{this._completeEffect(e)},n)}_handleStop(e){if(this._state="stopping",e==="all")for(const r of this._activeEffects.keys())this._completeEffect(r,!0);else this._completeEffect(e,!0)}_completeEffect(e,r=!1){this._activeEffects.get(e)&&(this._activeEffects.delete(e),this.clearConfetti(e,r),this.onEffectComplete(e),this._activeEffects.size===0&&(this._state="idle"),this._app.use("MessageService").send(G,{id:e}))}onEffectStart(e,r){}onEffectComplete(e){}getState(){return this._state}isRunning(){return this._state==="running"}dispose(){document.removeEventListener("click",this._onDocumentClick,!0),this._handleStop("all"),this._activeEffects.clear()}},X=class extends Y{constructor(e){super(e),s._defineProperty(this,"_containers",new Map)}renderConfetti(e,r){const i=this._getRenderBounds(),n=document.createElement("div");n.id=`confetti-${e}`,n.setAttribute("data-confetti-overlay","true"),n.style.cssText=`
1
+ __useblocks__.define("js/iframe.js",["require","exports","module","js/elMarkupHelper.BpDXO-hq.js"],function($,Ke,Ze){const s=$("./elMarkupHelper.BpDXO-hq.js");var z="confetti:open-settings",U="confetti:start",j="confetti:stop",G="confetti:complete",Y=class{constructor(e){s._defineProperty(this,"_app",void 0),s._defineProperty(this,"_state","idle"),s._defineProperty(this,"_activeEffects",new Map),s._defineProperty(this,"_onDocumentClick",r=>{const i=r.target;if(!i)return;const n=i.closest(".confetti-placeholder");if(!n)return;const l=n.getAttribute("data-confetti-preset")||void 0;this._app.use("MessageService").send(z,{preset:l})}),this._app=e}init(){const e=this._app.use("MessageService");e.addListener(U,r=>this._handleStart(r.id,r.options)),e.addListener(j,r=>this._handleStop(r.id)),document.addEventListener("click",this._onDocumentClick,!0)}_handleStart(e,r){const i={id:e,options:r,startTime:Date.now()};this._activeEffects.set(e,i),this._state="running",this.onEffectStart(e,r),this.renderConfetti(e,r);const n=r.duration||3e3;setTimeout(()=>{this._completeEffect(e)},n)}_handleStop(e){if(this._state="stopping",e==="all")for(const r of this._activeEffects.keys())this._completeEffect(r,!0);else this._completeEffect(e,!0)}_completeEffect(e,r=!1){this._activeEffects.get(e)&&(this._activeEffects.delete(e),this.clearConfetti(e,r),this.onEffectComplete(e),this._activeEffects.size===0&&(this._state="idle"),this._app.use("MessageService").send(G,{id:e}))}onEffectStart(e,r){}onEffectComplete(e){}getState(){return this._state}isRunning(){return this._state==="running"}dispose(){document.removeEventListener("click",this._onDocumentClick,!0),this._handleStop("all"),this._activeEffects.clear()}},X=class extends Y{constructor(e){super(e),s._defineProperty(this,"_containers",new Map)}renderConfetti(e,r){const i=this._getRenderBounds(),n=document.createElement("div");n.id=`confetti-${e}`,n.setAttribute("data-confetti-overlay","true"),n.style.cssText=`
2
2
  position: absolute;
3
3
  top: ${i.top}px;
4
4
  left: ${i.left}px;
@@ -1,7 +1,7 @@
1
1
  var e=window.__useblocks__||(window.__useblocks__={});(function(){"use strict";if(e!==void 0&&e.define)return;e===void 0&&(window.__amdEnv={});var t={},n={},r={},i={},a={},o=null,s={},c={},l=0;function u(e,t){l+=1;try{return e.factory.apply(null,t)}finally{--l}}var d=`./`,f={},p=60,m=`emailmaker:diagnostics`,h=[],g;function _(){if(g!==void 0)return g;g=!1;try{var e=/[?&]diagnostics(?:=([^&]*))?/.exec(window.location.search||``);if(e)return g=e[1]!==`0`,g;if(typeof window.__DIAGNOSTICS__==`boolean`)return g=!!window.__DIAGNOSTICS__,g;g=window.localStorage.getItem(m)===`1`}catch{g=!1}return g}function v(e,t){if(_()){var n={phase:e,at:performance.timeOrigin+performance.now(),kind:`wait`};t&&(n.parent=String(t)),h.push(n)}}function y(e){if(!e||e.__amdLogged)return e;try{Object.defineProperty(e,"__amdLogged",{value:!0,enumerable:!1})}catch{try{e.__amdLogged=!0}catch{}}try{var t=e&&e.message||`loader error`;console.error(`[AMD] `+(t.indexOf(`[AMD]`)===0?t.slice(6):t),e)}catch{}return e}function b(){try{if(e!==void 0&&e&&e.publicPath)return String(e.publicPath)}catch{}return`(not set)`}function x(){var e=b();return String(e).indexOf(`file:`)===0?` The page appears to be opened as a local file (file://) or publicPath was not configured. Serve the host app over HTTP(S) and set publicPath to the origin that serves editor assets (host bundler plugin or __amdEnv.setPublicPath). Current runtime publicPath=`+e+`.`:` Host bundler publicPath may be misconfigured (Vite/Webpack host plugin). In dev, set publicPath to the absolute origin that serves editor assets (for example http://localhost:3001/<outputFolder>/). Current runtime publicPath=`+e+`.`}function S(e){if(typeof fetch!=`function`)return Promise.resolve(``);function t(e){var t=(e.headers.get(`content-type`)||``).toLowerCase();try{e.body&&typeof e.body.cancel==`function`&&e.body.cancel()}catch{}return t.indexOf(`text/html`)>=0?` The URL returned HTML (Content-Type: text/html), not JavaScript — often a SPA fallback when asset paths are wrong.`:e.ok?``:` HTTP status `+e.status+` — the asset URL may be wrong or blocked by the server.`}return fetch(e,{method:`HEAD`,credentials:`omit`,headers:{Accept:`application/javascript,*/*`}}).then(function(n){return n.status===405||n.status===501?fetch(e,{method:`GET`,credentials:`omit`,headers:{Accept:`application/javascript,*/*`}}).then(t):t(n)}).catch(function(){return fetch(e,{method:`GET`,credentials:`omit`,headers:{Accept:`application/javascript,*/*`}}).then(t).catch(function(){return``})})}function C(e,t){var n=Error(`[AMD] Failed to load module "`+e+`"`+(t?`: `+t.message:``));return n.moduleId=e,n.cause=t,n}function w(e,t,n){var r=Error(`[AMD] Failed to resolve dependency "`+t+`" for module "`+e+`"`+(n?`: `+n.message:``));return r.moduleId=e,r.dependencyId=t,r.cause=n,r}function T(e){for(var t=String(e||``).split(`/`),n=[],r=0;r<t.length;r++){var i=t[r];if(i&&i!==`.`){if(i===`..`){n.length>0&&n.pop();continue}n.push(i)}}return n.join(`/`)}function E(e){var t=String(e||``).replace(/\\/g,`/`),n=String(d||`./`).replace(/\\/g,`/`);return n=n.replace(/^\.\/+/,``),n=n.replace(/^\/+/,``),n&&n.slice(-1)!==`/`&&(n+=`/`),n&&t.indexOf(n)===0&&(t=t.slice(n.length)),t.indexOf(`./`)===0&&(t=t.slice(2)),t}function D(e){return{then:function(t,n){return e.then(t,n)},catch:function(t){return e.catch(t)},finally:function(t){return e.finally(t)}}}function O(e,t){var n=String(e||``);if(!n)return n;if(n.indexOf(`./`)!==0&&n.indexOf(`../`)!==0)return E(T(n));var r=t||``;if(Object.prototype.hasOwnProperty.call(f,r)){var i=String(f[r]||``);i&&!k(i)&&i.charAt(0)!==`/`&&(r=i)}var a=T(r),o=a?a.split(`/`):[];o.length>0&&o.pop();for(var s=n.split(`/`),c=0;c<s.length;c++){var l=s[c];if(l&&l!==`.`){if(l===`..`){o.length>0&&o.pop();continue}o.push(l)}}return E(o.join(`/`))}function k(e){return/^[a-zA-Z][a-zA-Z\d+\-.]*:/.test(e)||e.indexOf(`//`)===0}function A(e){var t=String(e||``);if(!t||k(t))return t;try{var n=typeof document<`u`&&document.baseURI?document.baseURI:typeof window<`u`&&window.location?window.location.href:``;return n?new URL(t,n).href:t}catch{return t}}function j(){var t=String(d||`./`);if(t.slice(-1)!==`/`&&(t+=`/`),k(t)||t.charAt(0)===`/`)return t;if(e!==void 0&&e&&e.publicPath)try{return new URL(t,A(e.publicPath)).href}catch{}return A(t)}function M(e,t){var n=O(e,t),r=j(),i=Object.prototype.hasOwnProperty.call(f,n)?String(f[n]||``):n;i.slice(-3)!==`.js`&&(i+=`.js`);try{return new URL(i,r).href}catch{return r+i}}function N(){if(typeof document>`u`)return``;var e=document.currentScript;if(e){var t=e.getAttribute(`data-amd-module-id`);if(t)return t}return``}function P(e,n,r){if(Array.isArray(e)?(r=n,n=e,e=N()):typeof e==`function`?(r=e,n=[],e=N()):typeof n==`function`&&(r=n,n=[]),!e)throw Error(`[AMD] Anonymous define() could not be associated with a module id`);e in t||(t[e]={deps:n||[],factory:r})}P.amd={async:!0};function F(e){var t=new Event(`vite:preloadError`,{cancelable:!0});if(t.payload=e,window.dispatchEvent(t),!t.defaultPrevented)throw e}P(`vite/preload-helper`,[`exports`],function(e){e.__vitePreload=function(e){return Promise.resolve().then(function(){return e().catch(F)})}});function I(){return function(){}}function L(e,t){return{id:e,exports:t,uri:M(e)}}function R(e,t,n,r){if(Array.isArray(e)){var i=Promise.all(e.map(function(e){return V(e,r)})).then(function(e){return t&&t.apply(null,e),e});return n&&i.catch(n),i}return V(e,r)}function z(e,o){if(Array.isArray(e))throw Error(`[AMD] syncRequire does not support dependency arrays`);var s=O(e,o);if(s in a)throw y(a[s]);if(s in n)return n[s];if(s in r||s in i)throw y(C(s,Error(`Module is still loading asynchronously`)));if(!(s in t))throw y(C(s,Error(`Module is not available for syncRequire`)));return U(s)}function B(e,i){if(o&&e in o){var s={},c=[e];for(s[e]=!0;c.length>0;){var l=o[c.shift()];if(l)for(var u=0;u<l.length;u++){var d=l[u];s[d]||(s[d]=!0,c.push(d),!(d in n||d in a||d in r)&&(d in o?d in t||K(d,i).catch(function(){}):d in t&&V(d).catch(function(){})))}}}}function V(e,i){var o=O(e,i);if(o in a)return Promise.reject(y(a[o]));if(o in n)return Promise.resolve(n[o]);if(o in r)return r[o];if(v(`core:module:`+o+`:ask`,i),o in t)r[o]=H(o);else{var s=M(o);r[o]=K(o).then(function(){return v(`core:module:`+o+`:loaded`,i),o in t?H(o):S(s).then(function(e){var t=C(o,Error(`Module not defined after script load from "`+s+`".`+e+x()));throw a[o]=t,y(t)})}).catch(function(e){delete r[o];var t=e&&e.moduleId===o?e:C(o,e);throw a[o]=t,y(t)})}return B(o),r[o]}function H(e){var i=t[e],o=W(e),s=I(),l=L(e,s);c[e]=s;function d(t){return n[e]=t,delete r[e],delete c[e],n[e]}return Promise.all(i.deps.map(function(t){return t===`exports`?s:t===`require`?o:t===`module`?l:V(t,e).catch(function(n){throw w(e,t,n)})})).then(function(t){v(`core:module:`+e+`:deps`);var n=u(i,t);return n&&typeof n.then==`function`?n.then(function(t){return v(`core:module:`+e+`:ready`),d(t===void 0?l.exports:t)}):(v(`core:module:`+e+`:ready`),d(n===void 0?l.exports:n))}).catch(function(t){throw delete r[e],delete c[e],a[e]=t,y(t)})}function U(e){var r=t[e],i=W(e),o=I(),s=L(e,o);try{var c=u(r,r.deps.map(function(t){if(t===`exports`)return o;if(t===`require`)return i;if(t===`module`)return s;try{return z(t,e)}catch(n){throw w(e,t,n)}}));if(c&&typeof c.then==`function`)throw C(e,Error(`Module resolved asynchronously and cannot be syncRequired`));return n[e]=c===void 0?s.exports:c,n[e]}catch(t){throw a[e]=t,y(t)}}function W(e){var o=function(o,s,u){if(Array.isArray(o))return R(o,s,u,e);var d=O(o,e);if(d in a)throw y(a[d]);return d in n?n[d]:d in c&&l>0?c[d]:d in r||d in i?D(V(o,e)):d in t?z(o,e):D(V(o,e))};return o.resolve=function(t){return O(t,e)},o.toUrl=function(t){return M(t,e)},o.sync=function(t){return z(t,e)},o}function G(t,n){var r=e!==void 0&&e?e.moduleTransport:null;if(typeof r!=`function`||e.blobBlocked)return null;try{var i=r(t,n);return i&&typeof i.then==`function`?i:null}catch{return null}}function K(t,n){if(t in i)return i[t];if(s[t]&&s[t]!==t)return i[t]=K(s[t],n),i[t];var r=M(t);if(document.querySelector(`script[src="`+r+`"]`))return i[t]=Promise.resolve(),i[t];var a=performance.now();function o(e){return J(t,r,!1,n).then(function(n){return q(t,e,a),n})}var c=G(r,t);return c?(i[t]=c.then(function(r){return r?J(t,URL.createObjectURL(r),!0,n).then(function(e){return q(t,`transport`,a),e},function(){return e.blobBlocked=!0,o(`network-after-blob`)}):o(`network-fallback`)},function(){return o(`network-after-transport-error`)}),i[t]):(i[t]=o(`network`),i[t])}function q(t,n,r){_()&&((e.loaderTimings||=[]).push({id:t,via:n,ms:Math.round((performance.now()-r)*10)/10}),typeof e.onLoaderTiming==`function`&&e.onLoaderTiming())}function J(e,t,n,r){return new Promise(function(a,o){var s=!1,c=document.createElement(`script`);c.src=t,c.setAttribute(`data-amd-module-id`,e),c.async=!0,r===`low`&&(c.fetchPriority=`low`);var l=p>0?p*1e3:0,u=null;function d(){u!=null&&(clearTimeout(u),u=null),c.onload=null,c.onerror=null,n&&typeof URL<`u`&&URL.revokeObjectURL&&URL.revokeObjectURL(t)}function f(e){s||(s=!0,d(),e())}l>0&&(u=setTimeout(function(){f(function(){delete i[e],o(y(C(e,Error(`Timed out after `+l+`ms loading script: `+t+`.`+x()))))})},l)),c.onload=function(){f(function(){a()})},c.onerror=function(){f(function(){delete i[e],o(y(C(e,Error(`Failed to load script: `+t+`.`+x()))))})},document.head.appendChild(c)})}R.config=function(e){if(e.baseUrl&&(d=e.baseUrl),e.paths)for(var t in e.paths)Object.prototype.hasOwnProperty.call(e.paths,t)&&(f[t]=e.paths[t]);if(e.bundles){for(var n in e.bundles)if(Object.prototype.hasOwnProperty.call(e.bundles,n))for(var r=0;r<e.bundles[n].length;r++)s[e.bundles[n][r]]=n}if(e.graph)for(var i in o||={},e.graph)Object.prototype.hasOwnProperty.call(e.graph,i)&&(o[i]=e.graph[i]);typeof e.waitSeconds==`number`&&e.waitSeconds>=0&&(p=e.waitSeconds)},R.warm=function(e,r){var i=r&&r.priority;return Promise.all((e||[]).map(function(e){var r=O(e);if(r in a)return Promise.reject(a[r]);var o=r in t||r in n?Promise.resolve():K(r,i);return B(r,i),o})).then(function(){})},R.modules=t,R.resolved=n,R.errors=a,R.toUrl=M,R.sync=z,e.define=P,e.require=R,e.syncRequire=z,e.diagnosticsBuffer=h})(),e.require.config({baseUrl:`./`});
2
2
 
3
- __useblocks__.require.config({ paths: {"js/iframe.js":"js/iframe.body.c5a8ebf9.js"} });
3
+ __useblocks__.require.config({ paths: {"js/iframe.js":"js/iframe.body.5751e42b.js"} });
4
4
 
5
- __useblocks__.require.config({"graph":{"js/iframe-eblock.js":["js/elMarkupHelper.DjmNMeRr.js"],"js/iframe.js":["js/elMarkupHelper.DjmNMeRr.js"],"js/darkreader.CyLMh7_H.js":[],"js/elMarkupHelper.DjmNMeRr.js":[],"js/rules.CL_BitCE.js":[],"js/typograf.all.CGEpDoct.js":[]}});
5
+ __useblocks__.require.config({"graph":{"js/iframe-eblock.js":["js/elMarkupHelper.BpDXO-hq.js"],"js/iframe.js":["js/elMarkupHelper.BpDXO-hq.js"],"js/darkreader.CyLMh7_H.js":[],"js/elMarkupHelper.BpDXO-hq.js":[],"js/rules.CL_BitCE.js":[],"js/typograf.all.CGEpDoct.js":[]}});
6
6
 
7
7
  __useblocks__.require("js/iframe.js");
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "useblocks",
3
- "version": "1.3.11-dev.1",
3
+ "version": "1.3.11-dev.3",
4
4
  "private": false,
5
5
  "main": "useblocks.js",
6
6
  "module": "useblocks-esm.js",
@@ -1 +1 @@
1
- import e from"../../vendor/react/index.js";var i=e&&e.default?e.default:e,{Activity:n,Children:o,Component:c,Fragment:m,Profiler:v,PureComponent:E,StrictMode:d,Suspense:R,__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE:S,__COMPILER_RUNTIME:h,cache:T,cacheSignal:b,cloneElement:g,createContext:N,createElement:_,createRef:A,forwardRef:O,isValidElement:k,lazy:I,memo:D,startTransition:L,unstable_useCacheRefresh:M,use:P,useActionState:U,useCallback:V,useContext:x,useDebugValue:H,useDeferredValue:z,useEffect:F,useEffectEvent:G,useId:W,useImperativeHandle:Y,useInsertionEffect:j,useLayoutEffect:p,useMemo:q,useOptimistic:w,useReducer:B,useRef:J,useState:Q,useSyncExternalStore:X,useTransition:Z,version:$}=e;try{var u=Symbol.for("editor-runtime.react.copies"),t=globalThis[u];t||(t=[],globalThis[u]=t);for(var r=!1,s=0;s<t.length;s++){var a=t[s];a&&a.react===e&&a.package==="useblocks"&&a.version==="1.3.11-dev.1"&&(r=!0)}r||t.push({package:"useblocks",version:"1.3.11-dev.1",react:e})}catch{}export{n as Activity,o as Children,c as Component,m as Fragment,v as Profiler,E as PureComponent,d as StrictMode,R as Suspense,S as __CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,h as __COMPILER_RUNTIME,T as cache,b as cacheSignal,g as cloneElement,N as createContext,_ as createElement,A as createRef,i as default,O as forwardRef,k as isValidElement,I as lazy,D as memo,L as startTransition,M as unstable_useCacheRefresh,P as use,U as useActionState,V as useCallback,x as useContext,H as useDebugValue,z as useDeferredValue,F as useEffect,G as useEffectEvent,W as useId,Y as useImperativeHandle,j as useInsertionEffect,p as useLayoutEffect,q as useMemo,w as useOptimistic,B as useReducer,J as useRef,Q as useState,X as useSyncExternalStore,Z as useTransition,$ as version};
1
+ import e from"../../vendor/react/index.js";var i=e&&e.default?e.default:e,{Activity:n,Children:o,Component:c,Fragment:m,Profiler:v,PureComponent:E,StrictMode:d,Suspense:R,__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE:S,__COMPILER_RUNTIME:h,cache:T,cacheSignal:b,cloneElement:g,createContext:N,createElement:_,createRef:A,forwardRef:O,isValidElement:k,lazy:I,memo:D,startTransition:L,unstable_useCacheRefresh:M,use:P,useActionState:U,useCallback:V,useContext:x,useDebugValue:H,useDeferredValue:z,useEffect:F,useEffectEvent:G,useId:W,useImperativeHandle:Y,useInsertionEffect:j,useLayoutEffect:p,useMemo:q,useOptimistic:w,useReducer:B,useRef:J,useState:Q,useSyncExternalStore:X,useTransition:Z,version:$}=e;try{var u=Symbol.for("editor-runtime.react.copies"),t=globalThis[u];t||(t=[],globalThis[u]=t);for(var r=!1,s=0;s<t.length;s++){var a=t[s];a&&a.react===e&&a.package==="useblocks"&&a.version==="1.3.11-dev.3"&&(r=!0)}r||t.push({package:"useblocks",version:"1.3.11-dev.3",react:e})}catch{}export{n as Activity,o as Children,c as Component,m as Fragment,v as Profiler,E as PureComponent,d as StrictMode,R as Suspense,S as __CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,h as __COMPILER_RUNTIME,T as cache,b as cacheSignal,g as cloneElement,N as createContext,_ as createElement,A as createRef,i as default,O as forwardRef,k as isValidElement,I as lazy,D as memo,L as startTransition,M as unstable_useCacheRefresh,P as use,U as useActionState,V as useCallback,x as useContext,H as useDebugValue,z as useDeferredValue,F as useEffect,G as useEffectEvent,W as useId,Y as useImperativeHandle,j as useInsertionEffect,p as useLayoutEffect,q as useMemo,w as useOptimistic,B as useReducer,J as useRef,Q as useState,X as useSyncExternalStore,Z as useTransition,$ as version};
@@ -1,4 +1,4 @@
1
- __useblocks__.define("static/core/bf6cd7cc.js",["require","exports","module","static/core/2ff39ddf.js","static/core/82dfd28b.js"],function(me,O,hr){const H=me("./2ff39ddf.js"),N=me("./82dfd28b.js");var it=/\n/g;function at(e){const n=[...e.matchAll(it)].map((r=>r.index||0));n.unshift(-1);const t=ee(n,0,n.length);return r=>de(t,r)}function ee(e,n,t){if(t-n==1)return{offset:e[n],index:n+1};const r=Math.ceil((n+t)/2),s=ee(e,n,r),i=ee(e,r,t);return{offset:s.offset,low:s,high:i}}function de(e,n){return(function(t){return Object.prototype.hasOwnProperty.call(t,"index")})(e)?{line:e.index,column:n-e.offset}:de(e.high.offset<n?e.high:e.low,n)}function ge(e,n="",t={}){const r=typeof n!="string"?n:t,s=typeof n=="string"?n:"",i=e.map(ot),a=!!r.lineNumbers;return function(o,c=0){const l=a?at(o):()=>({line:0,column:0});let h=c;const g=[];e:for(;h<o.length;){let y=!1;for(const p of i){p.regex.lastIndex=h;const k=p.regex.exec(o);if(k&&k[0].length>0){if(!p.discard){const v=l(h),B=typeof p.replace=="string"?k[0].replace(new RegExp(p.regex.source,p.regex.flags),p.replace):k[0];g.push({state:s,name:p.name,text:B,offset:h,len:k[0].length,line:v.line,column:v.column})}if(h=p.regex.lastIndex,y=!0,p.push){const v=p.push(o,h);g.push(...v.tokens),h=v.offset}if(p.pop)break e;break}}if(!y)break}return{tokens:g,offset:h,complete:o.length<=h}}}function ot(e,n){return{...e,regex:ct(e,n)}}function ct(e,n){if(e.name.length===0)throw new Error(`Rule #${n} has empty name, which is not allowed.`);if((function(t){return Object.prototype.hasOwnProperty.call(t,"regex")})(e))return(function(t){if(t.global)throw new Error(`Regular expression /${t.source}/${t.flags} contains the global flag, which is not allowed.`);return t.sticky?t:new RegExp(t.source,t.flags+"y")})(e.regex);if((function(t){return Object.prototype.hasOwnProperty.call(t,"str")})(e)){if(e.str.length===0)throw new Error(`Rule #${n} ("${e.name}") has empty "str" property, which is not allowed.`);return new RegExp(ke(e.str),"y")}return new RegExp(ke(e.name),"y")}function ke(e){return e.replace(/[-[\]{}()*+!<=:?./\\^$|#\s,]/g,"\\$&")}function I(e,n){return(t,r)=>{let s=r,i;return r<t.tokens.length?(i=e(t.tokens[r],t,r),i!==void 0&&s++):n?.(t,r),i===void 0?{matched:!1}:{matched:!0,position:s,value:i}}}function te(e,n){return e.matched?{matched:!0,position:e.position,value:n(e.value,e.position)}:e}function U(e,n){return e.matched?n(e):e}function L(e,n){return(t,r)=>te(e(t,r),(s,i)=>n(s,t,r,i))}function q(e,n){return(t,r)=>{const s=e(t,r);return s.matched?s:{matched:!0,position:r,value:n}}}function F(...e){return(n,t)=>{for(const r of e){const s=r(n,t);if(s.matched)return s}return{matched:!1}}}function W(e,n){return(t,r)=>{const s=e(t,r);return s.matched?s:n(t,r)}}function lt(e,n){return(t,r)=>{const s=[];let i=!0;do{const a=e(t,r);a.matched&&n(a.value,s.length+1,t,r,a.position)?(s.push(a.value),r=a.position):i=!1}while(i);return{matched:!0,position:r,value:s}}}function ne(e){return lt(e,()=>!0)}function ut(e){return w(e,ne(e),(n,t)=>[n,...t])}function w(e,n,t){return(r,s)=>U(e(r,s),i=>te(n(r,i.position),(a,o)=>t(i.value,a,r,s,o)))}function ft(e,n){return w(e,n,t=>t)}function Le(e,n){return w(e,n,(t,r)=>r)}function re(e,n,t,r){return(s,i)=>U(e(s,i),a=>U(n(s,a.position),o=>te(t(s,o.position),(c,l)=>r(a.value,o.value,c,s,i,l))))}function we(e,n,t){return re(e,n,t,(r,s)=>s)}function ht(...e){return(n,t)=>{const r=[];let s=t;for(const i of e){const a=i(n,s);if(a.matched)r.push(a.value),s=a.position;else return{matched:!1}}return{matched:!0,position:s,value:r}}}function pt(...e){return mt(ht(...e))}function mt(e){return L(e,n=>n.flatMap(t=>t))}function dt(e,n){return(t,r)=>{let s=!0,i=e,a=r;do{const o=n(i,t,a)(t,a);o.matched?(i=o.value,a=o.position):s=!1}while(s);return{matched:!0,position:a,value:i}}}function gt(e,n,t){return dt(e,r=>L(n,(s,i,a,o)=>t(r,s,i,a,o)))}function xe(e,n,t){return kt(e,r=>gt(r,w(n,t,(s,i)=>[s,i]),(s,[i,a])=>i(s,a)))}function kt(e,n){return(t,r)=>U(e(t,r),s=>n(s.value,t,r,s.position)(t,s.position))}var Lt="(?:[ \\t\\r\\n\\f]*)",ve="(?:\\n|\\r\\n|\\r|\\f)",K="[^\\x00-\\x7F]",M="(?:\\\\[0-9a-f]{1,6}(?:\\r\\n|[ \\n\\r\\t\\f])?)",j="(?:\\\\[^\\n\\r\\f0-9a-f])",wt=`(?:[_a-z]|${K}|${M}|${j})`,ye=`(?:[_a-z0-9-]|${K}|${M}|${j})`,xt=`(?:${ye}+)`,vt=`(?:[-]?${wt}${ye}*)`,yt=`'([^\\n\\r\\f\\\\']|\\\\${ve}|${K}|${M}|${j})*'`,Bt=`"([^\\n\\r\\f\\\\"]|\\\\${ve}|${K}|${M}|${j})*"`,_t=ge([{name:"ws",regex:new RegExp(Lt)},{name:"hash",regex:new RegExp(`#${xt}`,"i")},{name:"ident",regex:new RegExp(vt,"i")},{name:"str1",regex:new RegExp(yt,"i")},{name:"str2",regex:new RegExp(Bt,"i")},{name:"*"},{name:"."},{name:","},{name:"["},{name:"]"},{name:"="},{name:">"},{name:"|"},{name:"+"},{name:"~"},{name:"^"},{name:"$"}]),bt=ge([{name:"unicode",regex:new RegExp(M,"i")},{name:"escape",regex:new RegExp(j,"i")},{name:"any",regex:new RegExp("[\\s\\S]","i")}]);function Be([e,n,t],[r,s,i]){return[e+r,n+s,t+i]}function St(e){return e.reduce(Be,[0,0,0])}var It=I(e=>e.name==="unicode"?String.fromCodePoint(parseInt(e.text.slice(1),16)):void 0),Nt=I(e=>e.name==="escape"?e.text.slice(1):void 0),Wt=I(e=>e.name==="any"?e.text:void 0),Et=L(ne(F(It,Nt,Wt)),e=>e.join(""));function se(e){const n=bt(e);return Et({tokens:n.tokens,options:void 0},0).value}function d(e){return I(n=>n.name===e?!0:void 0)}var ie=I(e=>e.name==="ws"?null:void 0),ae=q(ie,null);function A(e){return we(ae,e,ae)}var D=I(e=>e.name==="ident"?se(e.text):void 0),Tt=I(e=>e.name==="hash"?se(e.text.slice(1)):void 0),Ct=I(e=>e.name.startsWith("str")?se(e.text.slice(1,-1)):void 0),_e=ft(q(D,""),d("|")),oe=W(w(_e,D,(e,n)=>({name:n,namespace:e})),L(D,e=>({name:e,namespace:null}))),At=W(w(_e,d("*"),e=>({type:"universal",namespace:e,specificity:[0,0,0]})),L(d("*"),()=>({type:"universal",namespace:null,specificity:[0,0,0]}))),Pt=L(oe,({name:e,namespace:n})=>({type:"tag",name:e,namespace:n,specificity:[0,0,1]})),$t=w(d("."),D,(e,n)=>({type:"class",name:n,specificity:[0,1,0]})),Rt=L(Tt,e=>({type:"id",name:e,specificity:[1,0,0]})),be=I(e=>{if(e.name==="ident"){if(e.text==="i"||e.text==="I")return"i";if(e.text==="s"||e.text==="S")return"s"}}),Ot=W(w(Ct,q(Le(ae,be),null),(e,n)=>({value:e,modifier:n})),w(D,q(Le(ie,be),null),(e,n)=>({value:e,modifier:n}))),Mt=F(L(d("="),()=>"="),w(d("~"),d("="),()=>"~="),w(d("|"),d("="),()=>"|="),w(d("^"),d("="),()=>"^="),w(d("$"),d("="),()=>"$="),w(d("*"),d("="),()=>"*=")),jt=re(d("["),A(oe),d("]"),(e,{name:n,namespace:t})=>({type:"attrPresence",name:n,namespace:t,specificity:[0,1,0]})),Dt=we(d("["),re(A(oe),Mt,A(Ot),({name:e,namespace:n},t,{value:r,modifier:s})=>({type:"attrValue",name:e,namespace:n,matcher:t,value:r,modifier:s,specificity:[0,1,0]})),d("]")),Vt=W(jt,Dt),Ht=W(At,Pt),Se=F(Rt,$t,Vt),Ie=L(W(pt(Ht,ne(Se)),ut(Se)),e=>({type:"compound",list:e,specificity:St(e.map(n=>n.specificity))})),Ut=F(L(d(">"),()=>">"),L(d("+"),()=>"+"),L(d("~"),()=>"~"),w(d("|"),d("|"),()=>"||")),qt=W(A(Ut),L(ie,()=>" ")),ce=xe(Ie,L(qt,e=>(n,t)=>({type:"compound",list:[...t.list,{type:"combinator",combinator:e,left:n,specificity:n.specificity}],specificity:Be(n.specificity,t.specificity)})),Ie),pr=xe(L(ce,e=>({type:"list",list:[e]})),L(A(d(",")),()=>(e,n)=>({type:"list",list:[...e.list,n]})),ce);function Ft(e,n){if(!(typeof n=="string"||n instanceof String))throw new Error("Expected a selector string. Actual input is not a string!");const t=_t(n);if(!t.complete)throw new Error(`The input "${n}" was only partially tokenized, stopped at offset ${t.offset}!
1
+ __useblocks__.define("static/core/11009bdf.js",["require","exports","module","static/core/2ff39ddf.js","static/core/a42ab03f.js"],function(me,O,hr){const H=me("./2ff39ddf.js"),N=me("./a42ab03f.js");var it=/\n/g;function at(e){const n=[...e.matchAll(it)].map((r=>r.index||0));n.unshift(-1);const t=ee(n,0,n.length);return r=>de(t,r)}function ee(e,n,t){if(t-n==1)return{offset:e[n],index:n+1};const r=Math.ceil((n+t)/2),s=ee(e,n,r),i=ee(e,r,t);return{offset:s.offset,low:s,high:i}}function de(e,n){return(function(t){return Object.prototype.hasOwnProperty.call(t,"index")})(e)?{line:e.index,column:n-e.offset}:de(e.high.offset<n?e.high:e.low,n)}function ge(e,n="",t={}){const r=typeof n!="string"?n:t,s=typeof n=="string"?n:"",i=e.map(ot),a=!!r.lineNumbers;return function(o,c=0){const l=a?at(o):()=>({line:0,column:0});let h=c;const g=[];e:for(;h<o.length;){let y=!1;for(const p of i){p.regex.lastIndex=h;const k=p.regex.exec(o);if(k&&k[0].length>0){if(!p.discard){const v=l(h),B=typeof p.replace=="string"?k[0].replace(new RegExp(p.regex.source,p.regex.flags),p.replace):k[0];g.push({state:s,name:p.name,text:B,offset:h,len:k[0].length,line:v.line,column:v.column})}if(h=p.regex.lastIndex,y=!0,p.push){const v=p.push(o,h);g.push(...v.tokens),h=v.offset}if(p.pop)break e;break}}if(!y)break}return{tokens:g,offset:h,complete:o.length<=h}}}function ot(e,n){return{...e,regex:ct(e,n)}}function ct(e,n){if(e.name.length===0)throw new Error(`Rule #${n} has empty name, which is not allowed.`);if((function(t){return Object.prototype.hasOwnProperty.call(t,"regex")})(e))return(function(t){if(t.global)throw new Error(`Regular expression /${t.source}/${t.flags} contains the global flag, which is not allowed.`);return t.sticky?t:new RegExp(t.source,t.flags+"y")})(e.regex);if((function(t){return Object.prototype.hasOwnProperty.call(t,"str")})(e)){if(e.str.length===0)throw new Error(`Rule #${n} ("${e.name}") has empty "str" property, which is not allowed.`);return new RegExp(ke(e.str),"y")}return new RegExp(ke(e.name),"y")}function ke(e){return e.replace(/[-[\]{}()*+!<=:?./\\^$|#\s,]/g,"\\$&")}function I(e,n){return(t,r)=>{let s=r,i;return r<t.tokens.length?(i=e(t.tokens[r],t,r),i!==void 0&&s++):n?.(t,r),i===void 0?{matched:!1}:{matched:!0,position:s,value:i}}}function te(e,n){return e.matched?{matched:!0,position:e.position,value:n(e.value,e.position)}:e}function U(e,n){return e.matched?n(e):e}function L(e,n){return(t,r)=>te(e(t,r),(s,i)=>n(s,t,r,i))}function q(e,n){return(t,r)=>{const s=e(t,r);return s.matched?s:{matched:!0,position:r,value:n}}}function F(...e){return(n,t)=>{for(const r of e){const s=r(n,t);if(s.matched)return s}return{matched:!1}}}function W(e,n){return(t,r)=>{const s=e(t,r);return s.matched?s:n(t,r)}}function lt(e,n){return(t,r)=>{const s=[];let i=!0;do{const a=e(t,r);a.matched&&n(a.value,s.length+1,t,r,a.position)?(s.push(a.value),r=a.position):i=!1}while(i);return{matched:!0,position:r,value:s}}}function ne(e){return lt(e,()=>!0)}function ut(e){return w(e,ne(e),(n,t)=>[n,...t])}function w(e,n,t){return(r,s)=>U(e(r,s),i=>te(n(r,i.position),(a,o)=>t(i.value,a,r,s,o)))}function ft(e,n){return w(e,n,t=>t)}function Le(e,n){return w(e,n,(t,r)=>r)}function re(e,n,t,r){return(s,i)=>U(e(s,i),a=>U(n(s,a.position),o=>te(t(s,o.position),(c,l)=>r(a.value,o.value,c,s,i,l))))}function we(e,n,t){return re(e,n,t,(r,s)=>s)}function ht(...e){return(n,t)=>{const r=[];let s=t;for(const i of e){const a=i(n,s);if(a.matched)r.push(a.value),s=a.position;else return{matched:!1}}return{matched:!0,position:s,value:r}}}function pt(...e){return mt(ht(...e))}function mt(e){return L(e,n=>n.flatMap(t=>t))}function dt(e,n){return(t,r)=>{let s=!0,i=e,a=r;do{const o=n(i,t,a)(t,a);o.matched?(i=o.value,a=o.position):s=!1}while(s);return{matched:!0,position:a,value:i}}}function gt(e,n,t){return dt(e,r=>L(n,(s,i,a,o)=>t(r,s,i,a,o)))}function xe(e,n,t){return kt(e,r=>gt(r,w(n,t,(s,i)=>[s,i]),(s,[i,a])=>i(s,a)))}function kt(e,n){return(t,r)=>U(e(t,r),s=>n(s.value,t,r,s.position)(t,s.position))}var Lt="(?:[ \\t\\r\\n\\f]*)",ve="(?:\\n|\\r\\n|\\r|\\f)",K="[^\\x00-\\x7F]",M="(?:\\\\[0-9a-f]{1,6}(?:\\r\\n|[ \\n\\r\\t\\f])?)",j="(?:\\\\[^\\n\\r\\f0-9a-f])",wt=`(?:[_a-z]|${K}|${M}|${j})`,ye=`(?:[_a-z0-9-]|${K}|${M}|${j})`,xt=`(?:${ye}+)`,vt=`(?:[-]?${wt}${ye}*)`,yt=`'([^\\n\\r\\f\\\\']|\\\\${ve}|${K}|${M}|${j})*'`,Bt=`"([^\\n\\r\\f\\\\"]|\\\\${ve}|${K}|${M}|${j})*"`,_t=ge([{name:"ws",regex:new RegExp(Lt)},{name:"hash",regex:new RegExp(`#${xt}`,"i")},{name:"ident",regex:new RegExp(vt,"i")},{name:"str1",regex:new RegExp(yt,"i")},{name:"str2",regex:new RegExp(Bt,"i")},{name:"*"},{name:"."},{name:","},{name:"["},{name:"]"},{name:"="},{name:">"},{name:"|"},{name:"+"},{name:"~"},{name:"^"},{name:"$"}]),bt=ge([{name:"unicode",regex:new RegExp(M,"i")},{name:"escape",regex:new RegExp(j,"i")},{name:"any",regex:new RegExp("[\\s\\S]","i")}]);function Be([e,n,t],[r,s,i]){return[e+r,n+s,t+i]}function St(e){return e.reduce(Be,[0,0,0])}var It=I(e=>e.name==="unicode"?String.fromCodePoint(parseInt(e.text.slice(1),16)):void 0),Nt=I(e=>e.name==="escape"?e.text.slice(1):void 0),Wt=I(e=>e.name==="any"?e.text:void 0),Et=L(ne(F(It,Nt,Wt)),e=>e.join(""));function se(e){const n=bt(e);return Et({tokens:n.tokens,options:void 0},0).value}function d(e){return I(n=>n.name===e?!0:void 0)}var ie=I(e=>e.name==="ws"?null:void 0),ae=q(ie,null);function A(e){return we(ae,e,ae)}var D=I(e=>e.name==="ident"?se(e.text):void 0),Tt=I(e=>e.name==="hash"?se(e.text.slice(1)):void 0),Ct=I(e=>e.name.startsWith("str")?se(e.text.slice(1,-1)):void 0),_e=ft(q(D,""),d("|")),oe=W(w(_e,D,(e,n)=>({name:n,namespace:e})),L(D,e=>({name:e,namespace:null}))),At=W(w(_e,d("*"),e=>({type:"universal",namespace:e,specificity:[0,0,0]})),L(d("*"),()=>({type:"universal",namespace:null,specificity:[0,0,0]}))),Pt=L(oe,({name:e,namespace:n})=>({type:"tag",name:e,namespace:n,specificity:[0,0,1]})),$t=w(d("."),D,(e,n)=>({type:"class",name:n,specificity:[0,1,0]})),Rt=L(Tt,e=>({type:"id",name:e,specificity:[1,0,0]})),be=I(e=>{if(e.name==="ident"){if(e.text==="i"||e.text==="I")return"i";if(e.text==="s"||e.text==="S")return"s"}}),Ot=W(w(Ct,q(Le(ae,be),null),(e,n)=>({value:e,modifier:n})),w(D,q(Le(ie,be),null),(e,n)=>({value:e,modifier:n}))),Mt=F(L(d("="),()=>"="),w(d("~"),d("="),()=>"~="),w(d("|"),d("="),()=>"|="),w(d("^"),d("="),()=>"^="),w(d("$"),d("="),()=>"$="),w(d("*"),d("="),()=>"*=")),jt=re(d("["),A(oe),d("]"),(e,{name:n,namespace:t})=>({type:"attrPresence",name:n,namespace:t,specificity:[0,1,0]})),Dt=we(d("["),re(A(oe),Mt,A(Ot),({name:e,namespace:n},t,{value:r,modifier:s})=>({type:"attrValue",name:e,namespace:n,matcher:t,value:r,modifier:s,specificity:[0,1,0]})),d("]")),Vt=W(jt,Dt),Ht=W(At,Pt),Se=F(Rt,$t,Vt),Ie=L(W(pt(Ht,ne(Se)),ut(Se)),e=>({type:"compound",list:e,specificity:St(e.map(n=>n.specificity))})),Ut=F(L(d(">"),()=>">"),L(d("+"),()=>"+"),L(d("~"),()=>"~"),w(d("|"),d("|"),()=>"||")),qt=W(A(Ut),L(ie,()=>" ")),ce=xe(Ie,L(qt,e=>(n,t)=>({type:"compound",list:[...t.list,{type:"combinator",combinator:e,left:n,specificity:n.specificity}],specificity:Be(n.specificity,t.specificity)})),Ie),pr=xe(L(ce,e=>({type:"list",list:[e]})),L(A(d(",")),()=>(e,n)=>({type:"list",list:[...e.list,n]})),ce);function Ft(e,n){if(!(typeof n=="string"||n instanceof String))throw new Error("Expected a selector string. Actual input is not a string!");const t=_t(n);if(!t.complete)throw new Error(`The input "${n}" was only partially tokenized, stopped at offset ${t.offset}!
2
2
  `+Ne(n,t.offset));const r=A(e)({tokens:t.tokens,options:void 0},0);if(!r.matched)throw new Error(`No match for "${n}" input!`);if(r.position<t.tokens.length){const s=t.tokens[r.position];throw new Error(`The input "${n}" was only partially parsed, stopped at offset ${s.offset}!
3
3
  `+Ne(n,s.offset,s.len))}return r.value}function Ne(e,n,t=1){return`${e.replace(/(\t)|(\r)|(\n)/g,(r,s,i)=>s?"␉":i?"␍":"␊")}
4
4
  ${"".padEnd(n)}${"^".repeat(t)}`}function Kt(e){return Ft(ce,e)}function b(e){if(!e.type)throw new Error("This is not an AST node.");switch(e.type){case"universal":return z(e.namespace)+"*";case"tag":return z(e.namespace)+P(e.name);case"class":return"."+P(e.name);case"id":return"#"+P(e.name);case"attrPresence":return`[${z(e.namespace)}${P(e.name)}]`;case"attrValue":return`[${z(e.namespace)}${P(e.name)}${e.matcher}"${zt(e.value)}"${e.modifier?e.modifier:""}]`;case"combinator":return b(e.left)+e.combinator;case"compound":return e.list.reduce((n,t)=>t.type==="combinator"?b(t)+n:n+b(t),"");case"list":return e.list.map(b).join(",")}}function z(e){return e||e===""?P(e)+"|":""}function X(e){return`\\${e.codePointAt(0).toString(16)} `}function P(e){return e.replace(/(^[0-9])|(^-[0-9])|(^-$)|([-0-9a-zA-Z_]|[^\x00-\x7F])|(\x00)|([\x01-\x1f]|\x7f)|([\s\S])/g,(n,t,r,s,i,a,o,c)=>t?X(t):r?"-"+X(r.slice(1)):s?"\\-":i||(a?"�":o?X(o):"\\"+c))}function zt(e){return e.replace(/(")|(\\)|(\x00)|([\x01-\x1f]|\x7f)/g,(n,t,r,s,i)=>t?'\\"':r?"\\\\":s?"�":X(i))}function G(e){if(!e.type)throw new Error("This is not an AST node.");switch(e.type){case"compound":e.list.forEach(G),e.list.sort((n,t)=>Te(We(n),We(t)));break;case"combinator":G(e.left);break;case"list":e.list.forEach(G),e.list.sort((n,t)=>b(n)<b(t)?-1:1)}return e}function We(e){switch(e.type){case"universal":return[1];case"tag":return[1];case"id":return[2];case"class":return[3,e.name];case"attrPresence":return[4,b(e)];case"attrValue":return[5,b(e)];case"combinator":return[15,b(e)]}}function Ee(e,n){return Te(e,n)}function Te(e,n){if(!Array.isArray(e)||!Array.isArray(n))throw new Error("Arguments must be arrays.");const t=e.length<n.length?e.length:n.length;for(let r=0;r<t;r++)if(e[r]!==n[r])return e[r]<n[r]?-1:1;return e.length-n.length}var Ce=class{constructor(e){this.branches=$(Xt(e))}build(e){return e(this.branches)}};function Xt(e){const n=e.length,t=new Array(n);for(let r=0;r<n;r++){const[s,i]=e[r],a=Gt(Kt(s));t[r]={ast:a,terminal:{type:"terminal",valueContainer:{index:r,value:i,specificity:a.specificity}}}}return t}function Gt(e){return Ae(e),G(e),e}function Ae(e){const n=[];e.list.forEach(t=>{switch(t.type){case"class":n.push({matcher:"~=",modifier:null,name:"class",namespace:null,specificity:t.specificity,type:"attrValue",value:t.name});break;case"id":n.push({matcher:"=",modifier:null,name:"id",namespace:null,specificity:t.specificity,type:"attrValue",value:t.name});break;case"combinator":Ae(t.left),n.push(t);break;case"universal":break;default:n.push(t)}}),e.list=n}function $(e){const n=[];for(;e.length;){const t=Oe(e,a=>!0,Pe),{matches:r,nonmatches:s,empty:i}=Yt(e,t);e=s,r.length&&n.push(Zt(t,r)),i.length&&n.push(...Jt(i))}return n}function Jt(e){const n=[];for(const t of e){const r=t.terminal;if(r.type==="terminal")n.push(r);else{const{matches:s,rest:i}=rn(r.cont,a=>a.type==="terminal");s.forEach(a=>n.push(a)),i.length&&(r.cont=i,n.push(r))}}return n}function Yt(e,n){const t=[],r=[],s=[];for(const i of e){const a=i.ast.list;a.length?(a.some(o=>Pe(o)===n)?t:r).push(i):s.push(i)}return{matches:t,nonmatches:r,empty:s}}function Pe(e){switch(e.type){case"attrPresence":return`attrPresence ${e.name}`;case"attrValue":return`attrValue ${e.name}`;case"combinator":return`combinator ${e.combinator}`;default:return e.type}}function Zt(e,n){if(e==="tag")return Qt(n);if(e.startsWith("attrValue "))return tn(e.substring(10),n);if(e.startsWith("attrPresence "))return en(e.substring(13),n);if(e==="combinator >")return $e(">",n);if(e==="combinator +")return $e("+",n);throw new Error(`Unsupported selector kind: ${e}`)}function Qt(e){const n=le(e,t=>t.type==="tag",t=>t.name);return{type:"tagName",variants:Object.entries(n).map(([t,r])=>({type:"variant",value:t,cont:$(r.items)}))}}function en(e,n){for(const t of n)Re(t,r=>r.type==="attrPresence"&&r.name===e);return{type:"attrPresence",name:e,cont:$(n)}}function tn(e,n){const t=le(n,s=>s.type==="attrValue"&&s.name===e,s=>`${s.matcher} ${s.modifier||""} ${s.value}`),r=[];for(const s of Object.values(t)){const i=s.oneSimpleSelector,a=nn(i),o=$(s.items);r.push({type:"matcher",matcher:i.matcher,modifier:i.modifier,value:i.value,predicate:a,cont:o})}return{type:"attrValue",name:e,matchers:r}}function nn(e){if(e.modifier==="i"){const n=e.value.toLowerCase();switch(e.matcher){case"=":return t=>n===t.toLowerCase();case"~=":return t=>t.toLowerCase().split(/[ \t]+/).includes(n);case"^=":return t=>t.toLowerCase().startsWith(n);case"$=":return t=>t.toLowerCase().endsWith(n);case"*=":return t=>t.toLowerCase().includes(n);case"|=":return t=>{const r=t.toLowerCase();return n===r||r.startsWith(n)&&r[n.length]==="-"}}}else{const n=e.value;switch(e.matcher){case"=":return t=>n===t;case"~=":return t=>t.split(/[ \t]+/).includes(n);case"^=":return t=>t.startsWith(n);case"$=":return t=>t.endsWith(n);case"*=":return t=>t.includes(n);case"|=":return t=>n===t||t.startsWith(n)&&t[n.length]==="-"}}}function $e(e,n){const t=le(n,s=>s.type==="combinator"&&s.combinator===e,s=>b(s.left)),r=[];for(const s of Object.values(t)){const i=$(s.items),a=s.oneSimpleSelector.left;r.push({ast:a,terminal:{type:"popElement",cont:i}})}return{type:"pushElement",combinator:e,cont:$(r)}}function le(e,n,t){const r={};for(;e.length;){const s=Oe(e,n,t),i=h=>n(h)&&t(h)===s,a=h=>h.ast.list.some(i),{matches:o,rest:c}=sn(e,a);let l=null;for(const h of o){const g=Re(h,i);l||(l=g)}if(l==null)throw new Error("No simple selector is found.");r[s]={oneSimpleSelector:l,items:o},e=c}return r}function Re(e,n){const t=e.ast.list,r=new Array(t.length);let s=-1;for(let a=t.length;a-- >0;)n(t[a])&&(r[a]=!0,s=a);if(s==-1)throw new Error("Couldn't find the required simple selector.");const i=t[s];return e.ast.list=t.filter((a,o)=>!r[o]),i}function Oe(e,n,t){const r={};for(const a of e){const o={};for(const c of a.ast.list.filter(n))o[t(c)]=!0;for(const c of Object.keys(o))r[c]?r[c]++:r[c]=1}let s="",i=0;for(const a of Object.entries(r))a[1]>i&&(s=a[0],i=a[1]);return s}function rn(e,n){const t=[],r=[];for(const s of e)n(s)?t.push(s):r.push(s);return{matches:t,rest:r}}function sn(e,n){const t=[],r=[];for(const s of e)n(s)?t.push(s):r.push(s);return{matches:t,rest:r}}var an=class{constructor(e){this.f=e}pickAll(e){return this.f(e)}pick1(e,n=!1){const t=this.f(e),r=t.length;if(r===0)return null;if(r===1)return t[0].value;const s=n?on:cn;let i=t[0];for(let a=1;a<r;a++){const o=t[a];s(i,o)&&(i=o)}return i.value}};function on(e,n){const t=Ee(n.specificity,e.specificity);return t>0||t===0&&n.index<e.index}function cn(e,n){const t=Ee(n.specificity,e.specificity);return t>0||t===0&&n.index>e.index}function Me(e){return new an(R(e))}function R(e){const n=e.map(ln);return(t,...r)=>n.flatMap(s=>s(t,...r))}function ln(e){switch(e.type){case"terminal":return()=>[e.valueContainer];case"tagName":return un(e);case"attrValue":return hn(e);case"attrPresence":return fn(e);case"pushElement":return pn(e);case"popElement":return mn(e);default:return()=>[]}}function un(e){const n={};for(const t of e.variants)n[t.value.toLowerCase()]=R(t.cont);return(t,...r)=>{const s=t.tagName?.toLowerCase(),i=s&&n[s];return i?i(t,...r):[]}}function fn(e){const n=e.name,t=R(e.cont);return(r,...s)=>r.hasAttribute(n)?t(r,...s):[]}function hn(e){const n=[];for(const r of e.matchers){const s=r.predicate,i=R(r.cont);n.push((a,o,...c)=>s(a)?i(o,...c):[])}const t=e.name;return(r,...s)=>{const i=r.getAttribute(t);return i!==null?n.flatMap(a=>a(i,r,...s)):[]}}function pn(e){const n=R(e.cont),t=e.combinator==="+"?dn:gn;return(r,...s)=>{const i=t(r);return i?n(i,r,...s):[]}}function mn(e){const n=R(e.cont);return(t,r,...s)=>n(r,...s)}function dn(e){let n=e.previousSibling;for(;n&&n.nodeType!==Node.ELEMENT_NODE;)n=n.previousSibling;return n}function gn(e){return e.parentElement}var kn=H.__commonJSMin(((e,n)=>{var t=function(f){return r(f)&&!s(f)};function r(u){return!!u&&typeof u=="object"}function s(u){var f=Object.prototype.toString.call(u);return f==="[object RegExp]"||f==="[object Date]"||a(u)}var i=typeof Symbol=="function"&&Symbol.for?Symbol.for("react.element"):60103;function a(u){return u.$$typeof===i}function o(u){return Array.isArray(u)?[]:{}}function c(u,f){return f.clone!==!1&&f.isMergeableObject(u)?B(o(u),u,f):u}function l(u,f,m){return u.concat(f).map(function(_){return c(_,m)})}function h(u,f){if(!f.customMerge)return B;var m=f.customMerge(u);return typeof m=="function"?m:B}function g(u){return Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(u).filter(function(f){return Object.propertyIsEnumerable.call(u,f)}):[]}function y(u){return Object.keys(u).concat(g(u))}function p(u,f){try{return f in u}catch{return!1}}function k(u,f){return p(u,f)&&!(Object.hasOwnProperty.call(u,f)&&Object.propertyIsEnumerable.call(u,f))}function v(u,f,m){var _={};return m.isMergeableObject(u)&&y(u).forEach(function(x){_[x]=c(u[x],m)}),y(f).forEach(function(x){k(u,x)||(p(u,x)&&m.isMergeableObject(f[x])?_[x]=h(x,m)(u[x],f[x],m):_[x]=c(f[x],m))}),_}function B(u,f,m){m=m||{},m.arrayMerge=m.arrayMerge||l,m.isMergeableObject=m.isMergeableObject||t,m.cloneUnlessOtherwiseSpecified=c;var _=Array.isArray(f);return _!==Array.isArray(u)?c(f,m):_?m.arrayMerge(u,f,m):v(u,f,m)}B.all=function(f,m){if(!Array.isArray(f))throw new Error("first argument should be an array");return f.reduce(function(_,x){return B(_,x,m)},{})};var fr=B;n.exports=fr})),je=H.__toESM(kn());function ue(e,n,t=()=>{}){if(e===void 0){const r=function(...s){return n(r,...s)};return r}return e>=0?function(...r){return n(ue(e-1,n,t),...r)}:t}function De(e,n){let t=0,r=e.length;for(;t<r&&e[t]===n;)++t;for(;r>t&&e[r-1]===n;)--r;return t>0||r<e.length?e.substring(t,r):e}function Ln(e,n){let t=e.length;for(;t>0&&e[t-1]===n;)--t;return t<e.length?e.substring(0,t):e}function wn(e){return e.replace(/[\s\S]/g,n=>"\\u"+n.charCodeAt().toString(16).padStart(4,"0"))}function Ve(e,n){const t=new Map;for(let r=e.length;r-- >0;){const s=e[r],i=n(s);t.set(i,t.has(i)?(0,je.default)(s,t.get(i),{arrayMerge:xn}):s)}return[...t.values()].reverse()}var xn=(e,n,t)=>[...n];function J(e,n){for(const t of n){if(!e)return;e=e[t]}return e}function He(e,n="a",t=26){const r=[];do e-=1,r.push(e%t),e=e/t>>0;while(e>0);const s=n.charCodeAt(0);return r.reverse().map(i=>String.fromCharCode(s+i)).join("")}var fe=["I","X","C","M"],Ue=["V","L","D"];function qe(e){return[...e+""].map(n=>+n).reverse().map((n,t)=>n%5<4?(n<5?"":Ue[t])+fe[t].repeat(n%5):fe[t]+(n<5?Ue[t]:fe[t+1])).reverse().join("")}var Fe=class{constructor(e,n=void 0){this.lines=[],this.nextLineWords=[],this.maxLineLength=n||e.wordwrap||Number.MAX_VALUE,this.nextLineAvailableChars=this.maxLineLength,this.wrapCharacters=J(e,["longWordSplit","wrapCharacters"])||[],this.forceWrapOnLimit=J(e,["longWordSplit","forceWrapOnLimit"])||!1,this.stashedSpace=!1,this.wordBreakOpportunity=!1}pushWord(e,n=!1){this.nextLineAvailableChars<=0&&!n&&this.startNewLine();const t=this.nextLineWords.length===0,r=e.length+(t?0:1);if(r<=this.nextLineAvailableChars||n)this.nextLineWords.push(e),this.nextLineAvailableChars-=r;else{const[s,...i]=this.splitLongWord(e);t||this.startNewLine(),this.nextLineWords.push(s),this.nextLineAvailableChars-=s.length;for(const a of i)this.startNewLine(),this.nextLineWords.push(a),this.nextLineAvailableChars-=a.length}}popWord(){const e=this.nextLineWords.pop();if(e!==void 0){const n=this.nextLineWords.length===0,t=e.length+(n?0:1);this.nextLineAvailableChars+=t}return e}concatWord(e,n=!1){if(this.wordBreakOpportunity&&e.length>this.nextLineAvailableChars)this.pushWord(e,n),this.wordBreakOpportunity=!1;else{const t=this.popWord();this.pushWord(t?t.concat(e):e,n)}}startNewLine(e=1){this.lines.push(this.nextLineWords),e>1&&this.lines.push(...Array.from({length:e-1},()=>[])),this.nextLineWords=[],this.nextLineAvailableChars=this.maxLineLength}isEmpty(){return this.lines.length===0&&this.nextLineWords.length===0}clear(){this.lines.length=0,this.nextLineWords.length=0,this.nextLineAvailableChars=this.maxLineLength}toString(){return[...this.lines,this.nextLineWords].map(e=>e.join(" ")).join(`
@@ -1 +1 @@
1
- __useblocks__.define("static/core/3f1b20ee.js",["require","exports","module","static/core/2ff39ddf.js","static/core/cf7d1dd7.js","static/core/82dfd28b.js","static/core/2aa29959.js"],function(c,f,P){const j=c("./2ff39ddf.js"),n=c("./cf7d1dd7.js"),t=c("./82dfd28b.js"),p=c("./2aa29959.js");var I=["image/jpeg","image/png","image/jpg","image/webp","image/gif","image/svg+xml"],d=(e,i)=>({code:e,message:i}),E=e=>typeof e!="string";function _(e,i){const a=t.decodeFileNameFromUrl(i)??"image",o=p.normalizeImageFormatForDisplay(e.type);return new File([e],!o||a.includes(".")?a:`${a}.${o}`,{type:e.type||"application/octet-stream"})}async function v(e,i,a){const o=p.getImageBlobResolver(e),g=t.getEmitter(e,n.events.FILE_PROXY_EVENT_ID),r=t.getEmitter(e,n.events.PROXY_URL_EVENT_ID),u=p.canonicalImageUrlKey(i);return _(await o.resolve(u,void 0,(l,m)=>p.fetchEditorImageBlobByUrl(l,{appConfig:t.getAppConfig(e),isStandalone:t.isStandaloneRuntime(e),fireFileProxy:s=>g.fire({url:s,project:a}),fireProxyUrl:s=>r.fire({url:s,project:a})},m)),u)}async function F(e,i){const a=t.getCurrentProjectId(e),o=a===void 0?"":String(a);let g;try{g=await v(e,i,o)}catch(r){return d("downloadFailed",r instanceof Error&&r.message?r.message:"The image could not be downloaded from the URL.")}if(!I.includes(g.type))return d("unsupportedType","Only JPG, PNG, WEBP, GIF and SVG images can be uploaded.");try{const r=t.getAppConfig(e),u=await t.prepareImageForEditorUpload(g,r),l=await t.fireUploadImageEvent(t.getEmitter(e,n.events.UPLOAD_EVENT_ID),{file:u,project:o});if(l.url)return l.url;const m=t.isStandaloneRuntime(e),s=t.getCurrentUser(e).profile?.id,{dataProvider:y,usesBuiltInStorage:U}=t.buildResolvedFileManagerProviders({storageProvider:e.getInstance(n.STORAGE_PROVIDER_ID),projectId:o,restApi:n.getApi(e,t.EM_FILES_MODULES),restApiV2:t.createRestClientV2(e),i18n:t.defaultI18nContext,pathPostfix:s!==void 0&&String(s)!=="0"?String(s):"",appConfig:r,isStandalone:m,onIndexingStateChange:()=>{}});return t.shouldFallbackToBuiltInUpload(l,{isStandalone:m,targetIsOurBackend:U})?(await t.uploadFileViaDataProvider(u,y))?.url??d("uploadFailed","The image could not be uploaded."):d("uploadRejected",t.toUploadImageError(l).message)}catch(r){return d("uploadFailed",r instanceof Error&&r.message?r.message:"The image could not be uploaded.")}}f.isUploadFailure=E,f.saveImageFromUrl=F});
1
+ __useblocks__.define("static/core/11dadbc0.js",["require","exports","module","static/core/2ff39ddf.js","static/core/cf7d1dd7.js","static/core/a42ab03f.js","static/core/1c3a16fc.js"],function(c,f,P){const j=c("./2ff39ddf.js"),n=c("./cf7d1dd7.js"),t=c("./a42ab03f.js"),p=c("./1c3a16fc.js");var I=["image/jpeg","image/png","image/jpg","image/webp","image/gif","image/svg+xml"],d=(e,i)=>({code:e,message:i}),E=e=>typeof e!="string";function _(e,i){const a=t.decodeFileNameFromUrl(i)??"image",o=p.normalizeImageFormatForDisplay(e.type);return new File([e],!o||a.includes(".")?a:`${a}.${o}`,{type:e.type||"application/octet-stream"})}async function v(e,i,a){const o=p.getImageBlobResolver(e),g=t.getEmitter(e,n.events.FILE_PROXY_EVENT_ID),r=t.getEmitter(e,n.events.PROXY_URL_EVENT_ID),u=p.canonicalImageUrlKey(i);return _(await o.resolve(u,void 0,(l,m)=>p.fetchEditorImageBlobByUrl(l,{appConfig:t.getAppConfig(e),isStandalone:t.isStandaloneRuntime(e),fireFileProxy:s=>g.fire({url:s,project:a}),fireProxyUrl:s=>r.fire({url:s,project:a})},m)),u)}async function F(e,i){const a=t.getCurrentProjectId(e),o=a===void 0?"":String(a);let g;try{g=await v(e,i,o)}catch(r){return d("downloadFailed",r instanceof Error&&r.message?r.message:"The image could not be downloaded from the URL.")}if(!I.includes(g.type))return d("unsupportedType","Only JPG, PNG, WEBP, GIF and SVG images can be uploaded.");try{const r=t.getAppConfig(e),u=await t.prepareImageForEditorUpload(g,r),l=await t.fireUploadImageEvent(t.getEmitter(e,n.events.UPLOAD_EVENT_ID),{file:u,project:o});if(l.url)return l.url;const m=t.isStandaloneRuntime(e),s=t.getCurrentUser(e).profile?.id,{dataProvider:y,usesBuiltInStorage:U}=t.buildResolvedFileManagerProviders({storageProvider:e.getInstance(n.STORAGE_PROVIDER_ID),projectId:o,restApi:n.getApi(e,t.EM_FILES_MODULES),restApiV2:t.createRestClientV2(e),i18n:t.defaultI18nContext,pathPostfix:s!==void 0&&String(s)!=="0"?String(s):"",appConfig:r,isStandalone:m,onIndexingStateChange:()=>{}});return t.shouldFallbackToBuiltInUpload(l,{isStandalone:m,targetIsOurBackend:U})?(await t.uploadFileViaDataProvider(u,y))?.url??d("uploadFailed","The image could not be uploaded."):d("uploadRejected",t.toUploadImageError(l).message)}catch(r){return d("uploadFailed",r instanceof Error&&r.message?r.message:"The image could not be uploaded.")}}f.isUploadFailure=E,f.saveImageFromUrl=F});
@@ -1,4 +1,4 @@
1
- __useblocks__.define("static/core/d3ae23fa.js",["require","exports","module","static/core/2ff39ddf.js","static/core/cf7d1dd7.js","static/core/82dfd28b.js","dayjs"],function(E,s,Ce){const z=E("./2ff39ddf.js"),I=E("./cf7d1dd7.js"),T=E("./82dfd28b.js");let l=E("dayjs");l=z.__toESM(l);var o={PRODUCT_CAROUSEL:"productCarousel",SINGLE_IMAGE_PREVIEW:"singleImagePreview",DEAL_ANNOTATION:"dealAnnotation",DEAL_CARD:"dealCard"},x="emailmaker-gmail-annotations";function b(e){return/^[A-Za-z]{3}$/.test((e??"").trim())}function K(e){return typeof e=="object"&&e!==null}function P(e,n){const t=e[n];return typeof t=="string"?t:""}var B=new Set(["PromotionCard","DiscountOffer","Organization"]);function N(e){let n;try{n=JSON.parse(e)}catch{return!1}const t=Array.isArray(n)?n:[n];return t.length===0?!1:t.every(r=>typeof r=="object"&&r!==null&&B.has(String(r["@type"])))}function V(){let e=new Date().getTime(),n=typeof performance<"u"&&performance.now&&performance.now()*1e3||0;return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,t=>{let r=Math.random()*16;return e>0?(r=(e+r)%16|0,e=Math.floor(e/16)):(r=(n+r)%16|0,n=Math.floor(n/16)),(t==="x"?r:r&3|8).toString(16)})}function C(e){return e.annotationType||o.PRODUCT_CAROUSEL}function f(e){return!!(e?.image||e?.url||e?.headline||e?.price||e?.priceCurrency||e?.discountValue)}function h(e){return!e.description&&!e.discountCode&&!e.availabilityStarts&&!e.availabilityEnds}function O(e){return typeof e=="string"&&e.trim().length>0}function S(e){return O(e)?/^https?:\/\//i.test(e.trim()):!1}function L(e){return O(e?.image)&&S(e?.url)}function $(e){switch(C(e)){case o.SINGLE_IMAGE_PREVIEW:return L(e.cards?.[0]);case o.DEAL_ANNOTATION:return!h(e);case o.DEAL_CARD:return O(e.description)&&(S(e.offerPageUrl)||S(e.merchantHomepageUrl));case o.PRODUCT_CAROUSEL:default:return!!e.cards?.some(L)}}function Y(e){switch(C(e)){case o.SINGLE_IMAGE_PREVIEW:return!f(e.cards?.[0])&&!O(e.discountCode);case o.DEAL_ANNOTATION:return h(e);case o.DEAL_CARD:return h(e)&&!e.offerPageUrl&&!e.merchantHomepageUrl;case o.PRODUCT_CAROUSEL:default:return!e.cards?.some(f)}}function Z(e){switch(C(e)){case o.DEAL_ANNOTATION:case o.DEAL_CARD:return!!(e.description||e.discountCode||e.availabilityStarts||e.availabilityEnds||e.offerPageUrl||e.merchantHomepageUrl);case o.SINGLE_IMAGE_PREVIEW:return f(e.cards?.[0]);case o.PRODUCT_CAROUSEL:default:return e.logo?!0:!!e.cards?.some(f)}}function q(e){let n=typeof e.price=="string"||typeof e.price=="number"?String(e.price):"",t=typeof e.discountValue=="string"||typeof e.discountValue=="number"?String(e.discountValue):"";const r=typeof e.em_regularPrice=="string"||typeof e.em_regularPrice=="number"?String(e.em_regularPrice):"",i=typeof e.em_price=="string"||typeof e.em_price=="number"?String(e.em_price):"";if(!n&&r&&(n=r),!t&&n&&i){const u=parseFloat(n),c=parseFloat(i);!isNaN(u)&&!isNaN(c)&&u>=c&&(t=String(u-c))}return{id:V(),image:typeof e.image=="string"?e.image:"",url:typeof e.url=="string"?e.url:"",headline:typeof e.headline=="string"?e.headline:"",price:n,priceCurrency:typeof e.priceCurrency=="string"?e.priceCurrency:"",discountValue:t}}function v(e,n){const t={"@context":"http://schema.org/","@type":"PromotionCard",image:e.image};if(e.url&&(t.url=e.url),e.headline&&(t.headline=e.headline),e.price&&(t.price=e.price),e.priceCurrency){const r=e.priceCurrency.trim();t.priceCurrency=b(r)?r.toUpperCase():r}return e.discountValue&&(t.discountValue=e.discountValue),n&&(t.position=n),t}function D(e){const n={"@context":"http://schema.org/","@type":"DiscountOffer"};for(const t of["description","discountCode","availabilityStarts","availabilityEnds","offerPageUrl","merchantHomepageUrl"]){const r=e[t];r&&(n[t]=r)}return n}function j(e){return{"@context":"http://schema.org/","@type":"Organization",logo:e}}function X(e){const n=C(e),t=[];if(n===o.DEAL_CARD)return[D(e)];if(n===o.DEAL_ANNOTATION){const r=[];return e.logo&&r.push(j(e.logo)),r.push(D(e)),r}if(e.logo&&t.push(j(e.logo)),n===o.SINGLE_IMAGE_PREVIEW){const r=e.cards?.[0];return e.discountCode?.trim()&&t.push(D(e)),r&&f(r)&&t.push(v(r)),t}return(e.cards||[]).filter(f).forEach((r,i)=>{t.push(v(r,i+1))}),t}function Q(e){return e.replace(/</g,"\\u003c").replace(/>/g,"\\u003e").replace(/&/g,"\\u0026").replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")}function ee(e){if(Y(e))return null;const n=Q(JSON.stringify(X(e),null,2));return`<script type="application/ld+json" id="${x}">
1
+ __useblocks__.define("static/core/1c06cdb7.js",["require","exports","module","static/core/2ff39ddf.js","static/core/cf7d1dd7.js","static/core/a42ab03f.js","dayjs"],function(E,s,Ce){const z=E("./2ff39ddf.js"),I=E("./cf7d1dd7.js"),T=E("./a42ab03f.js");let l=E("dayjs");l=z.__toESM(l);var o={PRODUCT_CAROUSEL:"productCarousel",SINGLE_IMAGE_PREVIEW:"singleImagePreview",DEAL_ANNOTATION:"dealAnnotation",DEAL_CARD:"dealCard"},x="emailmaker-gmail-annotations";function b(e){return/^[A-Za-z]{3}$/.test((e??"").trim())}function K(e){return typeof e=="object"&&e!==null}function P(e,n){const t=e[n];return typeof t=="string"?t:""}var B=new Set(["PromotionCard","DiscountOffer","Organization"]);function N(e){let n;try{n=JSON.parse(e)}catch{return!1}const t=Array.isArray(n)?n:[n];return t.length===0?!1:t.every(r=>typeof r=="object"&&r!==null&&B.has(String(r["@type"])))}function V(){let e=new Date().getTime(),n=typeof performance<"u"&&performance.now&&performance.now()*1e3||0;return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,t=>{let r=Math.random()*16;return e>0?(r=(e+r)%16|0,e=Math.floor(e/16)):(r=(n+r)%16|0,n=Math.floor(n/16)),(t==="x"?r:r&3|8).toString(16)})}function C(e){return e.annotationType||o.PRODUCT_CAROUSEL}function f(e){return!!(e?.image||e?.url||e?.headline||e?.price||e?.priceCurrency||e?.discountValue)}function h(e){return!e.description&&!e.discountCode&&!e.availabilityStarts&&!e.availabilityEnds}function O(e){return typeof e=="string"&&e.trim().length>0}function S(e){return O(e)?/^https?:\/\//i.test(e.trim()):!1}function L(e){return O(e?.image)&&S(e?.url)}function $(e){switch(C(e)){case o.SINGLE_IMAGE_PREVIEW:return L(e.cards?.[0]);case o.DEAL_ANNOTATION:return!h(e);case o.DEAL_CARD:return O(e.description)&&(S(e.offerPageUrl)||S(e.merchantHomepageUrl));case o.PRODUCT_CAROUSEL:default:return!!e.cards?.some(L)}}function Y(e){switch(C(e)){case o.SINGLE_IMAGE_PREVIEW:return!f(e.cards?.[0])&&!O(e.discountCode);case o.DEAL_ANNOTATION:return h(e);case o.DEAL_CARD:return h(e)&&!e.offerPageUrl&&!e.merchantHomepageUrl;case o.PRODUCT_CAROUSEL:default:return!e.cards?.some(f)}}function Z(e){switch(C(e)){case o.DEAL_ANNOTATION:case o.DEAL_CARD:return!!(e.description||e.discountCode||e.availabilityStarts||e.availabilityEnds||e.offerPageUrl||e.merchantHomepageUrl);case o.SINGLE_IMAGE_PREVIEW:return f(e.cards?.[0]);case o.PRODUCT_CAROUSEL:default:return e.logo?!0:!!e.cards?.some(f)}}function q(e){let n=typeof e.price=="string"||typeof e.price=="number"?String(e.price):"",t=typeof e.discountValue=="string"||typeof e.discountValue=="number"?String(e.discountValue):"";const r=typeof e.em_regularPrice=="string"||typeof e.em_regularPrice=="number"?String(e.em_regularPrice):"",i=typeof e.em_price=="string"||typeof e.em_price=="number"?String(e.em_price):"";if(!n&&r&&(n=r),!t&&n&&i){const u=parseFloat(n),c=parseFloat(i);!isNaN(u)&&!isNaN(c)&&u>=c&&(t=String(u-c))}return{id:V(),image:typeof e.image=="string"?e.image:"",url:typeof e.url=="string"?e.url:"",headline:typeof e.headline=="string"?e.headline:"",price:n,priceCurrency:typeof e.priceCurrency=="string"?e.priceCurrency:"",discountValue:t}}function v(e,n){const t={"@context":"http://schema.org/","@type":"PromotionCard",image:e.image};if(e.url&&(t.url=e.url),e.headline&&(t.headline=e.headline),e.price&&(t.price=e.price),e.priceCurrency){const r=e.priceCurrency.trim();t.priceCurrency=b(r)?r.toUpperCase():r}return e.discountValue&&(t.discountValue=e.discountValue),n&&(t.position=n),t}function D(e){const n={"@context":"http://schema.org/","@type":"DiscountOffer"};for(const t of["description","discountCode","availabilityStarts","availabilityEnds","offerPageUrl","merchantHomepageUrl"]){const r=e[t];r&&(n[t]=r)}return n}function j(e){return{"@context":"http://schema.org/","@type":"Organization",logo:e}}function X(e){const n=C(e),t=[];if(n===o.DEAL_CARD)return[D(e)];if(n===o.DEAL_ANNOTATION){const r=[];return e.logo&&r.push(j(e.logo)),r.push(D(e)),r}if(e.logo&&t.push(j(e.logo)),n===o.SINGLE_IMAGE_PREVIEW){const r=e.cards?.[0];return e.discountCode?.trim()&&t.push(D(e)),r&&f(r)&&t.push(v(r)),t}return(e.cards||[]).filter(f).forEach((r,i)=>{t.push(v(r,i+1))}),t}function Q(e){return e.replace(/</g,"\\u003c").replace(/>/g,"\\u003e").replace(/&/g,"\\u0026").replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")}function ee(e){if(Y(e))return null;const n=Q(JSON.stringify(X(e),null,2));return`<script type="application/ld+json" id="${x}">
2
2
  ${n}
3
3
  <\/script>`}function G(e,n){const t=e.toLowerCase().indexOf("<\/script>",n);return t===-1?-1:t+9}function w(e,n,t,r){return{range:{start:n,end:r},contentRange:{start:t,end:r-9}}}function R(e){const n=new RegExp(`<script\\b[^>]*\\bid=["']${x}["']`,"i").exec(e);if(n?.index!==void 0){const i=e.indexOf(">",n.index)+1;if(i<=0)return null;const u=G(e,i);if(u!==-1)return w(e,n.index,i,u)}const t=/<script\b[^>]*type=["']application\/ld\+json["'][^>]*>/gi;let r;for(;(r=t.exec(e))!==null;){const i=r.index+r[0].length,u=G(e,i);if(u!==-1&&N(e.slice(i,u-9)))return w(e,r.index,i,u)}return null}function ne(e){const n=e.indexOf(">")+1,t=e.toLowerCase().lastIndexOf("<\/script>");return n<=0||t===-1?e:e.slice(n,t)}function te(e){const n=/<\/head>/i.exec(e);if(n?.index!==void 0)return n.index;const t=/<head\b[^>]*>/i.exec(e);if(t?.index!==void 0)return t.index+t[0].length;const r=/<body\b[^>]*>/i.exec(e);return r?.index!==void 0?r.index:e.length}function H(e,n){let{start:t,end:r}=n;return t>0&&e[t-1]===`
4
4
  `?t-=1:r<e.length&&e[r]===`
@@ -1 +1 @@
1
- __useblocks__.define("static/core/2aa29959.js",["require","exports","module","static/core/cf7d1dd7.js","static/core/82dfd28b.js","react"],function(h,d,K){const w=h("./cf7d1dd7.js"),f=h("./82dfd28b.js");let P=h("react");function p(t){return t.trim()}var T=67108864,O=2e3;function b(t){t.abandonTimer!==void 0&&(clearTimeout(t.abandonTimer),t.abandonTimer=void 0)}function A(t,n){return n?new Promise((c,i)=>{if(n.aborted){i(new DOMException("Aborted","AbortError"));return}const o=()=>{i(new DOMException("Aborted","AbortError"))};n.addEventListener("abort",o,{once:!0}),t.then(a=>{n.removeEventListener("abort",o),c(a)},a=>{n.removeEventListener("abort",o),i(a)})}):t}function x(t={}){const n=t.maxCacheBytes??T,c=t.abandonDelayMs??O,i=new Map,o=new Map;let a=0;function u(r){const e=i.get(r);e&&(a-=e.size,i.delete(r))}function y(r,e){if(u(r),!(e.size>n)){i.set(r,e),a+=e.size;for(const l of i.keys()){if(a<=n)break;u(l)}}}function m(r){const e=o.get(r);e&&(b(e),o.delete(r))}function _(r,e){e.waiters-=1,!(e.waiters>0||e.abandonTimer!==void 0||o.get(r)!==e)&&(e.abandonTimer=setTimeout(()=>{e.abandonTimer=void 0,!(o.get(r)!==e||e.waiters>0)&&(o.delete(r),e.controller.abort())},c))}function F(r,e,l){return e.waiters+=1,b(e),l.then(()=>_(r,e),()=>_(r,e)),l}async function j(r,e,l){const s=p(r);if(!s)throw new Error("Empty image URL");const v=i.get(s);if(v){if(e?.aborted)throw new DOMException("Aborted","AbortError");return i.delete(s),i.set(s,v),v}const E=o.get(s);if(E)return F(s,E,A(E.promise,e));const I=new AbortController,B={promise:l(s,I.signal).then(g=>(m(s),y(s,g),g)).catch(g=>{throw m(s),g}),controller:I,waiters:0,abandonTimer:void 0};return o.set(s,B),F(s,B,A(B.promise,e))}function W(r){const e=p(r);if(!e)return;const l=o.get(e);l&&(b(l),l.controller.abort(),o.delete(e)),u(e)}function z(){for(const[,r]of o)b(r),r.controller.abort();o.clear(),i.clear(),a=0}return{resolve:j,abandonKey:W,invalidateAll:z}}function C(t){if(!(t instanceof Blob)||t.size===0)throw new f.e("Failed to download file from the URL.","UploadUrlDownloadFailed");const n=t.type?.split(";")[0]?.trim()||"image/png";if(!n.startsWith("image/"))throw new f.e("Content type at the URL is not allowed.","UploadUrlContentTypeNotAllowed");return{blob:t,mimeType:n}}async function D(t,n){const c=await fetch(t,n);if(!c.ok)throw new Error(`Server returned ${c.status}`);return c.blob()}async function R(t,n,c){const i=c?{signal:c}:void 0,{blob:o}=await f.ue(t,{handleFileProxy:async a=>{const u=await n.fireFileProxy(a);return f.pickFileProxyBlobFromFireResults(u)??null},handleProxyUrl:async a=>{const u=await n.fireProxyUrl(a);return f.pickProxyUrlOverrideFromFireResults(u,a)},fetchWithProxy:(a,u,y)=>w.fetchWithResourceProxy(a,{config:n.appConfig,standalone:n.isStandalone,intent:y?.intent||"downloadBlob",validateBlob:async m=>!m.type||m.type.startsWith("image/"),init:u})},a=>D(a,i),C,{fetchInit:i});return o}function U(t){return w.getContainer(t).getOrCreateInstance(w.IMAGE_BLOB_RESOLVER_ID,()=>x())}function L(){const t=f.useStore();return(0,P.useMemo)(()=>U(t),[t])}function M(t){const n=String(t??"").split(";")[0].trim();if(!n)return"";const c=n.toLowerCase(),i=c.indexOf("/");if(i===-1)return c;const o=c.slice(i+1);return o==="svg+xml"?"svg":o}Object.defineProperty(d,"canonicalImageUrlKey",{enumerable:!0,get:function(){return p}}),Object.defineProperty(d,"fetchEditorImageBlobByUrl",{enumerable:!0,get:function(){return R}}),Object.defineProperty(d,"getImageBlobResolver",{enumerable:!0,get:function(){return U}}),Object.defineProperty(d,"normalizeImageFormatForDisplay",{enumerable:!0,get:function(){return M}}),Object.defineProperty(d,"useImageBlobResolver",{enumerable:!0,get:function(){return L}})});
1
+ __useblocks__.define("static/core/1c3a16fc.js",["require","exports","module","static/core/cf7d1dd7.js","static/core/a42ab03f.js","react"],function(h,d,K){const w=h("./cf7d1dd7.js"),f=h("./a42ab03f.js");let P=h("react");function p(t){return t.trim()}var T=67108864,O=2e3;function b(t){t.abandonTimer!==void 0&&(clearTimeout(t.abandonTimer),t.abandonTimer=void 0)}function A(t,n){return n?new Promise((c,i)=>{if(n.aborted){i(new DOMException("Aborted","AbortError"));return}const o=()=>{i(new DOMException("Aborted","AbortError"))};n.addEventListener("abort",o,{once:!0}),t.then(a=>{n.removeEventListener("abort",o),c(a)},a=>{n.removeEventListener("abort",o),i(a)})}):t}function x(t={}){const n=t.maxCacheBytes??T,c=t.abandonDelayMs??O,i=new Map,o=new Map;let a=0;function u(r){const e=i.get(r);e&&(a-=e.size,i.delete(r))}function y(r,e){if(u(r),!(e.size>n)){i.set(r,e),a+=e.size;for(const l of i.keys()){if(a<=n)break;u(l)}}}function m(r){const e=o.get(r);e&&(b(e),o.delete(r))}function _(r,e){e.waiters-=1,!(e.waiters>0||e.abandonTimer!==void 0||o.get(r)!==e)&&(e.abandonTimer=setTimeout(()=>{e.abandonTimer=void 0,!(o.get(r)!==e||e.waiters>0)&&(o.delete(r),e.controller.abort())},c))}function F(r,e,l){return e.waiters+=1,b(e),l.then(()=>_(r,e),()=>_(r,e)),l}async function j(r,e,l){const s=p(r);if(!s)throw new Error("Empty image URL");const v=i.get(s);if(v){if(e?.aborted)throw new DOMException("Aborted","AbortError");return i.delete(s),i.set(s,v),v}const E=o.get(s);if(E)return F(s,E,A(E.promise,e));const I=new AbortController,B={promise:l(s,I.signal).then(g=>(m(s),y(s,g),g)).catch(g=>{throw m(s),g}),controller:I,waiters:0,abandonTimer:void 0};return o.set(s,B),F(s,B,A(B.promise,e))}function W(r){const e=p(r);if(!e)return;const l=o.get(e);l&&(b(l),l.controller.abort(),o.delete(e)),u(e)}function z(){for(const[,r]of o)b(r),r.controller.abort();o.clear(),i.clear(),a=0}return{resolve:j,abandonKey:W,invalidateAll:z}}function C(t){if(!(t instanceof Blob)||t.size===0)throw new f.e("Failed to download file from the URL.","UploadUrlDownloadFailed");const n=t.type?.split(";")[0]?.trim()||"image/png";if(!n.startsWith("image/"))throw new f.e("Content type at the URL is not allowed.","UploadUrlContentTypeNotAllowed");return{blob:t,mimeType:n}}async function D(t,n){const c=await fetch(t,n);if(!c.ok)throw new Error(`Server returned ${c.status}`);return c.blob()}async function R(t,n,c){const i=c?{signal:c}:void 0,{blob:o}=await f.ue(t,{handleFileProxy:async a=>{const u=await n.fireFileProxy(a);return f.pickFileProxyBlobFromFireResults(u)??null},handleProxyUrl:async a=>{const u=await n.fireProxyUrl(a);return f.pickProxyUrlOverrideFromFireResults(u,a)},fetchWithProxy:(a,u,y)=>w.fetchWithResourceProxy(a,{config:n.appConfig,standalone:n.isStandalone,intent:y?.intent||"downloadBlob",validateBlob:async m=>!m.type||m.type.startsWith("image/"),init:u})},a=>D(a,i),C,{fetchInit:i});return o}function U(t){return w.getContainer(t).getOrCreateInstance(w.IMAGE_BLOB_RESOLVER_ID,()=>x())}function L(){const t=f.useStore();return(0,P.useMemo)(()=>U(t),[t])}function M(t){const n=String(t??"").split(";")[0].trim();if(!n)return"";const c=n.toLowerCase(),i=c.indexOf("/");if(i===-1)return c;const o=c.slice(i+1);return o==="svg+xml"?"svg":o}Object.defineProperty(d,"canonicalImageUrlKey",{enumerable:!0,get:function(){return p}}),Object.defineProperty(d,"fetchEditorImageBlobByUrl",{enumerable:!0,get:function(){return R}}),Object.defineProperty(d,"getImageBlobResolver",{enumerable:!0,get:function(){return U}}),Object.defineProperty(d,"normalizeImageFormatForDisplay",{enumerable:!0,get:function(){return M}}),Object.defineProperty(d,"useImageBlobResolver",{enumerable:!0,get:function(){return L}})});