@builder.io/sdk-react 1.0.19-dev-0 → 1.0.19-dev-1
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.
- package/lib/browser/init.cjs +1 -0
- package/lib/browser/init.mjs +13 -0
- package/lib/edge/{blocks-87a3568e.cjs → blocks-0397d1b3.cjs} +5 -5
- package/lib/edge/{blocks-03aafa4f.js → blocks-055d1c68.js} +34 -35
- package/lib/edge/blocks-exports.cjs +1 -1
- package/lib/edge/blocks-exports.mjs +1 -1
- package/lib/edge/{columns-d2f7e212.js → columns-41560f8a.js} +1 -1
- package/lib/edge/{columns-f98bd830.cjs → columns-88c413d0.cjs} +1 -1
- package/lib/edge/{content-variants-ad9f707f.js → content-variants-8d6bee85.js} +3 -3
- package/lib/edge/{content-variants-7e661199.cjs → content-variants-b0cbabea.cjs} +1 -1
- package/lib/edge/{form-e83f7b7a.cjs → form-489500da.cjs} +1 -1
- package/lib/edge/{form-04cf10db.js → form-56a68fe5.js} +1 -1
- package/lib/edge/init.cjs +1 -0
- package/lib/edge/init.mjs +13 -0
- package/lib/edge/{slot-bb84f342.cjs → slot-6546a4c9.cjs} +1 -1
- package/lib/edge/{slot-8fa7f242.js → slot-6b53b8c4.js} +1 -1
- package/lib/node/blocks-exports.cjs +1 -1
- package/lib/node/index.cjs +1 -1
- package/lib/node/init.cjs +1 -1
- package/lib/node/init.mjs +6 -5
- package/lib/node/{node-runtime-56212f7c.cjs → node-runtime-87cf9b13.cjs} +2 -2
- package/package.json +2 -2
- package/types/functions/evaluate/node-runtime/init.d.ts +10 -2
- package/types/functions/evaluate/node-runtime/node-runtime.d.ts +5 -0
- package/types/functions/get-content/types.d.ts +3 -3
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";var a=Object.create;var r=Object.defineProperty;var c=Object.getOwnPropertyDescriptor;var s=Object.getOwnPropertyNames;var u=Object.getPrototypeOf,l=Object.prototype.hasOwnProperty;var m=(e,i,t,n)=>{if(i&&typeof i=="object"||typeof i=="function")for(let o of s(i))!l.call(e,o)&&o!==t&&r(e,o,{get:()=>i[o],enumerable:!(n=c(i,o))||n.enumerable});return e};var p=(e,i,t)=>(t=e!=null?a(u(e)):{},m(i||!e||!e.__esModule?r(t,"default",{value:e,enumerable:!0}):t,e));Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const noop=()=>{};let safeDynamicRequire=noop;try{safeDynamicRequire=eval("require")}catch(e){}const initializeNodeRuntime=async()=>{await import("isolated-vm")};exports.initializeNodeRuntime=initializeNodeRuntime;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";var Sn=Object.defineProperty;var wn=(e,t,n)=>t in e?Sn(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var Rt=(e,t,n)=>(wn(e,typeof t!="symbol"?t+"":t,n),n);const k=require("react/jsx-runtime"),Oe=require("react"),_r=require("./blocks-exports.cjs"),D=require("./server-entry-00891f33.cjs"),kn=require("./get-class-prop-name-f1301669.cjs"),En=require("./dynamic-renderer-1c9f24c0.cjs"),
|
|
1
|
+
"use strict";var Sn=Object.defineProperty;var wn=(e,t,n)=>t in e?Sn(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var Rt=(e,t,n)=>(wn(e,typeof t!="symbol"?t+"":t,n),n);const k=require("react/jsx-runtime"),Oe=require("react"),_r=require("./blocks-exports.cjs"),D=require("./server-entry-00891f33.cjs"),kn=require("./get-class-prop-name-f1301669.cjs"),En=require("./dynamic-renderer-1c9f24c0.cjs"),Lt=(e,t,n)=>{if(Object(e)!==e)return e;const r=Array.isArray(t)?t:t.toString().match(/[^.[\]]+/g);return r.slice(0,-1).reduce((o,s,a)=>Object(o[s])===o[s]?o[s]:o[s]=Math.abs(Number(r[a+1]))>>0===+r[a+1]?[]:{},e)[r[r.length-1]]=n,e},Wr=({builder:e,context:t,event:n,state:r})=>Object.entries({state:r,Builder:e,builder:e,context:t,event:n}),Cn=()=>({isEditing:D.isEditing(),isBrowser:D.isBrowser(),isServer:!D.isBrowser(),getUserAttributes:()=>D.getUserAttributes()}),jn=(e,{isExpression:t=!0})=>t&&!(e.includes(";")||e.includes(" return ")||e.trim().startsWith("return "))?`return (${e});`:e,$r=Oe.createContext({registeredComponents:{}});function On(e){var t;return{...(t=e.component)==null?void 0:t.options,...e.options,builderBlock:e}}const An=({code:e,builder:t,context:n,event:r,localState:o,rootSetState:s,rootState:a})=>{const f=Wr({builder:t,context:n,event:r,state:Gr({rootState:a,localState:o,rootSetState:s})});return new Function(...f.map(([g])=>g),e)(...f.map(([,g])=>g))};function Gr({rootState:e,localState:t,rootSetState:n}){return new Proxy(e,{get:(r,o)=>{if(t&&o in t)return t[o];const s=r[o];return typeof s=="object"&&s!==null?Gr({rootState:s,localState:void 0,rootSetState:n?a=>{r[o]=a,n(r)}:void 0}):s},set:(r,o,s)=>{if(t&&o in t)throw new Error("Writing to local state is not allowed as it is read-only.");return r[o]=s,n==null||n(r),!0}})}var T,In=function(e){function t(i){return 48>i?i===36:58>i?!0:65>i?!1:91>i?!0:97>i?i===95:123>i?!0:170<=i&&mn.test(String.fromCharCode(i))}function n(i){return 65>i?i===36:91>i?!0:97>i?i===95:123>i?!0:170<=i&&Nr.test(String.fromCharCode(i))}function r(i,l){for(var u=d,p=1,w=0;;){it.lastIndex=w;var F=it.exec(u);if(F&&F.index<i)++p,w=F.index+F[0].length;else break}throw u={line:p,ab:i-w},l+=" ("+u.line+":"+u.ab+")",l=new SyntaxError(l),l.j=i,l.X=u,l.o=c,l}function o(i){i=i.split(" ");for(var l=Object.create(null),u=0;u<i.length;u++)l[i[u]]=!0;return function(p){return l[p]||!1}}function s(){this.line=ge,this.ab=c-ee}function a(i,l){xe=c,C.C&&(xt=new s),S=i,g(),J=l,Me=i.m}function f(){for(var i=c,l=C.va&&C.C&&new s,u=d.charCodeAt(c+=2);c<me&&u!==10&&u!==13&&u!==8232&&u!==8233;)++c,u=d.charCodeAt(c);C.va&&C.va(!1,d.slice(i+2,c),i,c,l,C.C&&new s)}function g(){for(;c<me;){var i=d.charCodeAt(c);if(i===32)++c;else if(i===13)++c,i=d.charCodeAt(c),i===10&&++c,C.C&&(++ge,ee=c);else if(i===10||i===8232||i===8233)++c,C.C&&(++ge,ee=c);else if(8<i&&14>i)++c;else if(i===47)if(i=d.charCodeAt(c+1),i===42){i=void 0;var l=C.va&&C.C&&new s,u=c,p=d.indexOf("*/",c+=2);if(p===-1&&r(c-2,"Unterminated comment"),c=p+2,C.C)for(it.lastIndex=u;(i=it.exec(d))&&i.index<c;)++ge,ee=i.index+i[0].length;C.va&&C.va(!0,d.slice(u+2,p),u,c,l,C.C&&new s)}else if(i===47)f();else break;else if(i===160)++c;else if(5760<=i&&vn.test(String.fromCharCode(i)))++c;else break}}function j(i){switch(i){case 46:i=d.charCodeAt(c+1),48<=i&&57>=i?b(!0):(++c,a(Er));return;case 40:return++c,a(te);case 41:return++c,a(Z);case 59:return++c,a(re);case 44:return++c,a(ce);case 91:return++c,a(bt);case 93:return++c,a(Tt);case 123:return++c,a(Fe);case 125:return++c,a(we);case 58:return++c,a(Le);case 63:return++c,a(Cr);case 48:if(i=d.charCodeAt(c+1),i===120||i===88){c+=2,i=P(16),i===null&&r(U+2,"Expected hexadecimal number"),n(d.charCodeAt(c))&&r(c,"Identifier directly after number"),a(Ue,i);return}case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:return b(!1);case 34:case 39:c++;for(var l="";;){c>=me&&r(U,"Unterminated string constant");var u=d.charCodeAt(c);if(u===i){++c,a(tt,l);break}if(u===92){u=d.charCodeAt(++c);var p=/^[0-7]+/.exec(d.slice(c,c+3));for(p&&(p=p[0]);p&&255<parseInt(p,8);)p=p.slice(0,-1);if(p==="0"&&(p=null),++c,p)K&&r(c-2,"Octal literal in strict mode"),l+=String.fromCharCode(parseInt(p,8)),c+=p.length-1;else switch(u){case 110:l+=`
|
|
2
2
|
`;break;case 114:l+="\r";break;case 120:l+=String.fromCharCode($(2));break;case 117:l+=String.fromCharCode($(4));break;case 85:l+=String.fromCharCode($(8));break;case 116:l+=" ";break;case 98:l+="\b";break;case 118:l+="\v";break;case 102:l+="\f";break;case 48:l+="\0";break;case 13:d.charCodeAt(c)===10&&++c;case 10:C.C&&(ee=c,++ge);break;default:l+=String.fromCharCode(u)}}else u!==13&&u!==10&&u!==8232&&u!==8233||r(U,"Unterminated string constant"),l+=String.fromCharCode(u),++c}return;case 47:i=d.charCodeAt(c+1),Me?(++c,N()):i===61?x(de,2):x(jr,1);return;case 37:case 42:d.charCodeAt(c+1)===61?x(de,2):x(gn,1);return;case 124:case 38:l=d.charCodeAt(c+1),l===i?x(i===124?Ir:br,2):l===61?x(de,2):x(i===124?an:un,1);return;case 94:d.charCodeAt(c+1)===61?x(de,2):x(ln,1);return;case 43:case 45:l=d.charCodeAt(c+1),l===i?l===45&&d.charCodeAt(c+2)===62&&ot.test(d.slice(ue,c))?(c+=3,f(),g(),O()):x(sn,2):l===61?x(de,2):x(hn,1);return;case 60:case 62:l=d.charCodeAt(c+1),u=1,l===i?(u=i===62&&d.charCodeAt(c+2)===62?3:2,d.charCodeAt(c+u)===61?x(de,u+1):x(pn,u)):l===33&&i===60&&d.charCodeAt(c+2)===45&&d.charCodeAt(c+3)===45?(c+=4,f(),g(),O()):(l===61&&(u=d.charCodeAt(c+2)===61?3:2),x(fn,u));return;case 61:case 33:d.charCodeAt(c+1)===61?x(cn,d.charCodeAt(c+2)===61?3:2):x(i===61?Or:Ar,1);return;case 126:return x(Ar,1)}return!1}function O(i){if(i?c=U+1:U=c,C.C&&(mt=new s),i)return N();if(c>=me)return a(kt);if(i=d.charCodeAt(c),n(i)||i===92)return pe();if(j(i)===!1){if(i=String.fromCharCode(i),i==="\\"||Nr.test(i))return pe();r(c,"Unexpected character '"+i+"'")}}function x(i,l){var u=d.slice(c,c+l);c+=l,a(i,u)}function N(){for(var i,l,u=c;;){c>=me&&r(u,"Unterminated regexp");var p=d.charAt(c);if(ot.test(p)&&r(u,"Unterminated regexp"),i)i=!1;else{if(p==="[")l=!0;else if(p==="]"&&l)l=!1;else if(p==="/"&&!l)break;i=p==="\\"}++c}i=d.slice(u,c),++c,(l=z())&&!/^[gmi]*$/.test(l)&&r(u,"Invalid regexp flag");try{var w=new RegExp(i,l)}catch(F){throw F instanceof SyntaxError&&r(u,F.message),F}a(or,w)}function P(i,l){for(var u=c,p=0,w=l===void 0?1/0:l,F=0;F<w;++F){var V=d.charCodeAt(c);if(V=97<=V?V-97+10:65<=V?V-65+10:48<=V&&57>=V?V-48:1/0,V>=i)break;++c,p=p*i+V}return c===u||l!==void 0&&c-u!==l?null:p}function b(i){var l=c,u=!1,p=d.charCodeAt(c)===48;i||P(10)!==null||r(l,"Invalid number"),d.charCodeAt(c)===46&&(++c,P(10),u=!0),i=d.charCodeAt(c),(i===69||i===101)&&(i=d.charCodeAt(++c),i!==43&&i!==45||++c,P(10)===null&&r(l,"Invalid number"),u=!0),n(d.charCodeAt(c))&&r(c,"Identifier directly after number"),i=d.slice(l,c);var w;u?w=parseFloat(i):p&&i.length!==1?/[89]/.test(i)||K?r(l,"Invalid number"):w=parseInt(i,8):w=parseInt(i,10),a(Ue,w)}function $(i){return i=P(16,i),i===null&&r(U,"Bad character escape sequence"),i}function z(){ke=!1;for(var i,l=!0,u=c;;){var p=d.charCodeAt(c);if(t(p))ke&&(i+=d.charAt(c)),++c;else if(p===92){ke||(i=d.slice(u,c)),ke=!0,d.charCodeAt(++c)!==117&&r(c,"Expecting Unicode escape sequence \\uXXXX"),++c,p=$(4);var w=String.fromCharCode(p);w||r(c-1,"Invalid Unicode escape"),(l?n(p):t(p))||r(c-4,"Invalid Unicode escape"),i+=w}else break;l=!1}return ke?i:d.slice(u,c)}function pe(){var i=z(),l=Se;!ke&&yn(i)&&(l=on[i]),a(l,i)}function A(){St=U,ue=xe,wt=xt,O()}function ve(i){if(K=i,c=U,C.C)for(;c<ee;)ee=d.lastIndexOf(`
|
|
3
3
|
`,ee-2)+1,--ge;g(),O()}function Te(){this.type=null,this.start=U,this.end=null}function Ne(){this.start=mt,this.end=null,vt&&(this.source=vt)}function _(){var i=new Te;return C.C&&(i.X=new Ne),C.vb&&(i.sourceFile=C.vb),C.Xa&&(i.j=[U,0]),i}function le(i){var l=new Te;return l.start=i.start,C.C&&(l.X=new Ne,l.X.start=i.X.start),C.Xa&&(l.j=[i.j[0],0]),l}function E(i,l){return i.type=l,i.end=ue,C.C&&(i.X.end=wt),C.Xa&&(i.j[1]=ue),i}function ct(i){return i.type==="ExpressionStatement"&&i.la.type==="Literal"&&i.la.value==="use strict"}function R(i){return S===i?(A(),!0):!1}function qe(){return!C.fc&&(S===kt||S===we||ot.test(d.slice(ue,U)))}function he(){R(re)||qe()||q()}function B(i){S===i?A():q()}function q(){r(U,"Unexpected token")}function Qe(i){i.type!=="Identifier"&&i.type!=="MemberExpression"&&r(i.start,"Assigning to rvalue"),K&&i.type==="Identifier"&&nt(i.name)&&r(i.start,"Assigning to "+i.name+" in strict mode")}function Y(){(S===jr||S===de&&J==="/=")&&O(!0);var i=S,l=_();switch(i){case Et:case sr:A();var u=i===Et;R(re)||qe()?l.label=null:S!==Se?q():(l.label=Q(),he());for(var p=0;p<M.length;++p){var w=M[p];if((l.label===null||w.name===l.label.name)&&(w.kind!==null&&(u||w.kind==="loop")||l.label&&u))break}return p===M.length&&r(l.start,"Unsyntactic "+i.l),E(l,u?"BreakStatement":"ContinueStatement");case ar:return A(),he(),E(l,"DebuggerStatement");case ur:return A(),M.push(Nt),l.body=Y(),M.pop(),B(It),l.test=Pe(),he(),E(l,"DoWhileStatement");case pr:return A(),M.push(Nt),B(te),S===re?ft(l,null):S===At?(i=_(),A(),rr(i,!0),E(i,"VariableDeclaration"),i.fa.length===1&&R(rt)?tr(l,i):ft(l,i)):(i=G(!1,!0),R(rt)?(Qe(i),tr(l,i)):ft(l,i));case jt:return A(),dt(l,!0);case hr:return A(),l.test=Pe(),l.da=Y(),l.alternate=R(cr)?Y():null,E(l,"IfStatement");case gr:return De||C.Ib||r(U,"'return' outside of function"),A(),R(re)||qe()?l.K=null:(l.K=G(),he()),E(l,"ReturnStatement");case Ot:for(A(),l.Qb=Pe(),l.tb=[],B(Fe),M.push(xn);S!==we;)S===Ct||S===lr?(i=S===Ct,p&&E(p,"SwitchCase"),l.tb.push(p=_()),p.da=[],A(),i?p.test=G():(u&&r(St,"Multiple default clauses"),u=!0,p.test=null),B(Le)):(p||q(),p.da.push(Y()));return p&&E(p,"SwitchCase"),A(),M.pop(),E(l,"SwitchStatement");case dr:return A(),ot.test(d.slice(ue,U))&&r(ue,"Illegal newline after throw"),l.K=G(),he(),E(l,"ThrowStatement");case yr:return A(),l.block=Re(),l.Ea=null,S===ir&&(i=_(),A(),B(te),i.Ua=Q(),K&&nt(i.Ua.name)&&r(i.Ua.start,"Binding "+i.Ua.name+" in strict mode"),B(Z),i.body=Re(),l.Ea=E(i,"CatchClause")),l.fb=R(fr)?Re():null,l.Ea||l.fb||r(l.start,"Missing catch or finally clause"),E(l,"TryStatement");case At:return A(),rr(l),he(),E(l,"VariableDeclaration");case It:return A(),l.test=Pe(),M.push(Nt),l.body=Y(),M.pop(),E(l,"WhileStatement");case vr:return K&&r(U,"'with' in strict mode"),A(),l.object=Pe(),l.body=Y(),E(l,"WithStatement");case Fe:return Re();case re:return A(),E(l,"EmptyStatement");default:if(u=J,w=G(),i===Se&&w.type==="Identifier"&&R(Le)){for(p=0;p<M.length;++p)M[p].name===u&&r(w.start,"Label '"+u+"' is already declared");return M.push({name:u,kind:S.W?"loop":S===Ot?"switch":null}),l.body=Y(),M.pop(),l.label=w,E(l,"LabeledStatement")}return l.la=w,he(),E(l,"ExpressionStatement")}}function Pe(){B(te);var i=G();return B(Z),i}function Re(i){var l=_(),u=!0,p=!1;for(l.body=[],B(Fe);!R(we);){var w=Y();if(l.body.push(w),u&&i&&ct(w)){var F=p;ve(p=!0)}u=!1}return p&&!F&&ve(!1),E(l,"BlockStatement")}function ft(i,l){return i.ua=l,B(re),i.test=S===re?null:G(),B(re),i.update=S===Z?null:G(),B(Z),i.body=Y(),M.pop(),E(i,"ForStatement")}function tr(i,l){return i.left=l,i.right=G(),B(Z),i.body=Y(),M.pop(),E(i,"ForInStatement")}function rr(i,l){for(i.fa=[],i.kind="var";;){var u=_();if(u.id=Q(),K&&nt(u.id.name)&&r(u.id.start,"Binding "+u.id.name+" in strict mode"),u.ua=R(Or)?G(!0,l):null,i.fa.push(E(u,"VariableDeclarator")),!R(ce))break}}function G(i,l){var u=pt(l);if(!i&&S===ce){for(i=le(u),i.xb=[u];R(ce);)i.xb.push(pt(l));return E(i,"SequenceExpression")}return u}function pt(i){var l=ht(gt(),-1,i);if(R(Cr)){var u=le(l);u.test=l,u.da=G(!0),B(Le),u.alternate=G(!0,i),l=E(u,"ConditionalExpression")}return S.Cb?(u=le(l),u.operator=J,u.left=l,A(),u.right=pt(i),Qe(l),E(u,"AssignmentExpression")):l}function ht(i,l,u){var p=S.L;if(p!==null&&(!u||S!==rt)&&p>l){var w=le(i);return w.left=i,w.operator=J,i=S,A(),w.right=ht(gt(),p,u),p=E(w,i===Ir||i===br?"LogicalExpression":"BinaryExpression"),ht(p,l,u)}return i}function gt(){if(S.prefix){var i=_(),l=S.$b;return i.operator=J,Me=i.prefix=!0,A(),i.K=gt(),l?Qe(i.K):K&&i.operator==="delete"&&i.K.type==="Identifier"&&r(i.start,"Deleting local variable in strict mode"),E(i,l?"UpdateExpression":"UnaryExpression")}for(l=Be(et());S.cc&&!qe();)i=le(l),i.operator=J,i.prefix=!1,i.K=l,Qe(l),A(),l=E(i,"UpdateExpression");return l}function Be(i,l){if(R(Er)){var u=le(i);return u.object=i,u.Wa=Q(!0),u.bb=!1,Be(E(u,"MemberExpression"),l)}return R(bt)?(u=le(i),u.object=i,u.Wa=G(),u.bb=!0,B(Tt),Be(E(u,"MemberExpression"),l)):!l&&R(te)?(u=le(i),u.callee=i,u.arguments=yt(Z,!1),Be(E(u,"CallExpression"),l)):i}function et(){switch(S){case xr:var i=_();return A(),E(i,"ThisExpression");case Se:return Q();case Ue:case tt:case or:return i=_(),i.value=J,i.raw=d.slice(U,xe),A(),E(i,"Literal");case Sr:case wr:case kr:return i=_(),i.value=S.$a,i.raw=S.l,A(),E(i,"Literal");case te:i=mt;var l=U;A();var u=G();return u.start=l,u.end=xe,C.C&&(u.X.start=i,u.X.end=xt),C.Xa&&(u.j=[l,xe]),B(Z),u;case bt:return i=_(),A(),i.elements=yt(Tt,!0,!0),E(i,"ArrayExpression");case Fe:for(i=_(),l=!0,u=!1,i.h=[],A();!R(we);){if(l)l=!1;else if(B(ce),C.sb&&R(we))break;var p={key:S===Ue||S===tt?et():Q(!0)},w=!1;if(R(Le)){p.value=G(!0);var F=p.kind="init"}else p.key.type!=="Identifier"||p.key.name!=="get"&&p.key.name!=="set"?q():(w=u=!0,F=p.kind=p.key.name,p.key=S===Ue||S===tt?et():Q(!0),S!==te&&q(),p.value=dt(_(),!1));if(p.key.type==="Identifier"&&(K||u))for(var V=0;V<i.h.length;++V){var Ee=i.h[V];if(Ee.key.name===p.key.name){var Pt=F===Ee.kind||w&&Ee.kind==="init"||F==="init"&&(Ee.kind==="get"||Ee.kind==="set");Pt&&!K&&F==="init"&&Ee.kind==="init"&&(Pt=!1),Pt&&r(p.key.start,"Redefinition of property")}}i.h.push(p)}return E(i,"ObjectExpression");case jt:return i=_(),A(),dt(i,!1);case mr:return i=_(),A(),i.callee=Be(et(),!0),i.arguments=R(te)?yt(Z,!1):nn,E(i,"NewExpression")}q()}function dt(i,l){S===Se?i.id=Q():l?q():i.id=null,i.oa=[];var u=!0;for(B(te);!R(Z);)u?u=!1:B(ce),i.oa.push(Q());u=De;var p=M;if(De=!0,M=[],i.body=Re(!0),De=u,M=p,K||i.body.body.length&&ct(i.body.body[0])){for(u=i.id?-1:0;u<i.oa.length;++u)if(p=0>u?i.id:i.oa[u],(Tr(p.name)||nt(p.name))&&r(p.start,"Defining '"+p.name+"' in strict mode"),0<=u)for(var w=0;w<u;++w)p.name===i.oa[w].name&&r(p.start,"Argument name clash in strict mode")}return E(i,l?"FunctionDeclaration":"FunctionExpression")}function yt(i,l,u){for(var p=[],w=!0;!R(i);){if(w)w=!1;else if(B(ce),l&&C.sb&&R(i))break;p.push(u&&S===ce?null:G(!0))}return p}function Q(i){var l=_();return i&&C.yb==="everywhere"&&(i=!1),S===Se?(!i&&(C.yb&&dn(J)||K&&Tr(J))&&d.slice(U,xe).indexOf("\\")===-1&&r(U,"The keyword '"+J+"' is reserved"),l.name=J):i&&S.l?l.name=S.l:q(),Me=!1,A(),E(l,"Identifier")}e.version="0.5.0";var C,d="",me,vt;e.parse=function(i,l){d=String(i),me=d.length,C=l||{};for(var u in nr)Object.prototype.hasOwnProperty.call(C,u)||(C[u]=nr[u]);for(vt=C.sourceFile,ge=1,c=ee=0,Me=!0,g(),u=C.dc,St=ue=c,C.C&&(wt=new s),De=K=!1,M=[],O(),i=u||_(),l=!0,u||(i.body=[]);S!==kt;)u=Y(),i.body.push(u),l&&ct(u)&&ve(!0),l=!1;return E(i,"Program")};var nr={fc:!1,sb:!0,yb:!1,Ib:!1,C:!1,va:null,Xa:!1,dc:null,sourceFile:null,vb:null},c=0,U=0,xe=0,mt,xt,S,J,Me,ge,ee,St=0,ue=0,wt,De,M,K,nn=[],Ue={type:"num"},or={type:"regexp"},tt={type:"string"},Se={type:"name"},kt={type:"eof"},Et={l:"break"},Ct={l:"case",m:!0},ir={l:"catch"},sr={l:"continue"},ar={l:"debugger"},lr={l:"default"},ur={l:"do",W:!0},cr={l:"else",m:!0},fr={l:"finally"},pr={l:"for",W:!0},jt={l:"function"},hr={l:"if"},gr={l:"return",m:!0},Ot={l:"switch"},dr={l:"throw",m:!0},yr={l:"try"},At={l:"var"},It={l:"while",W:!0},vr={l:"with"},mr={l:"new",m:!0},xr={l:"this"},Sr={l:"null",$a:null},wr={l:"true",$a:!0},kr={l:"false",$a:!1},rt={l:"in",L:7,m:!0},on={break:Et,case:Ct,catch:ir,continue:sr,debugger:ar,default:lr,do:ur,else:cr,finally:fr,for:pr,function:jt,if:hr,return:gr,switch:Ot,throw:dr,try:yr,var:At,while:It,with:vr,null:Sr,true:wr,false:kr,new:mr,in:rt,instanceof:{l:"instanceof",L:7,m:!0},this:xr,typeof:{l:"typeof",prefix:!0,m:!0},void:{l:"void",prefix:!0,m:!0},delete:{l:"delete",prefix:!0,m:!0}},bt={type:"[",m:!0},Tt={type:"]"},Fe={type:"{",m:!0},we={type:"}"},te={type:"(",m:!0},Z={type:")"},ce={type:",",m:!0},re={type:";",m:!0},Le={type:":",m:!0},Er={type:"."},Cr={type:"?",m:!0},jr={L:10,m:!0},Or={Cb:!0,m:!0},de={Cb:!0,m:!0},sn={cc:!0,prefix:!0,$b:!0},Ar={prefix:!0,m:!0},Ir={L:1,m:!0},br={L:2,m:!0},an={L:3,m:!0},ln={L:4,m:!0},un={L:5,m:!0},cn={L:6,m:!0},fn={L:7,m:!0},pn={L:8,m:!0},hn={L:9,prefix:!0,m:!0},gn={L:10,m:!0},dn=o("class enum extends super const export import"),Tr=o("implements interface let package private protected public static yield"),nt=o("eval arguments"),yn=o("break case catch continue debugger default do else finally for function if return switch throw try var while with null true false instanceof typeof void delete new in this"),vn=/[\u1680\u180e\u2000-\u200a\u202f\u205f\u3000\ufeff]/,Nr=RegExp("[ªµºÀ-ÖØ-öø-ˁˆ-ˑˠ-ˤˬˮͰ-ʹͶͷͺ-ͽΆΈ-ΊΌΎ-ΡΣ-ϵϷ-ҁҊ-ԧԱ-Ֆՙա-ևא-תװ-ײؠ-يٮٯٱ-ۓەۥۦۮۯۺ-ۼۿܐܒ-ܯݍ-ޥޱߊ-ߪߴߵߺࠀ-ࠕࠚࠤࠨࡀ-ࡘࢠࢢ-ࢬऄ-हऽॐक़-ॡॱ-ॷॹ-ॿঅ-ঌএঐও-নপ-রলশ-হঽৎড়ঢ়য়-ৡৰৱਅ-ਊਏਐਓ-ਨਪ-ਰਲਲ਼ਵਸ਼ਸਹਖ਼-ੜਫ਼ੲ-ੴઅ-ઍએ-ઑઓ-નપ-રલળવ-હઽૐૠૡଅ-ଌଏଐଓ-ନପ-ରଲଳଵ-ହଽଡ଼ଢ଼ୟ-ୡୱஃஅ-ஊஎ-ஐஒ-கஙசஜஞடணதந-பம-ஹௐఅ-ఌఎ-ఐఒ-నప-ళవ-హఽౘౙౠౡಅ-ಌಎ-ಐಒ-ನಪ-ಳವ-ಹಽೞೠೡೱೲഅ-ഌഎ-ഐഒ-ഺഽൎൠൡൺ-ൿඅ-ඖක-නඳ-රලව-ෆก-ะาำเ-ๆກຂຄງຈຊຍດ-ທນ-ຟມ-ຣລວສຫອ-ະາຳຽເ-ໄໆໜ-ໟༀཀ-ཇཉ-ཬྈ-ྌက-ဪဿၐ-ၕၚ-ၝၡၥၦၮ-ၰၵ-ႁႎႠ-ჅჇჍა-ჺჼ-ቈቊ-ቍቐ-ቖቘቚ-ቝበ-ኈኊ-ኍነ-ኰኲ-ኵኸ-ኾዀዂ-ዅወ-ዖዘ-ጐጒ-ጕጘ-ፚᎀ-ᎏᎠ-Ᏼᐁ-ᙬᙯ-ᙿᚁ-ᚚᚠ-ᛪᛮ-ᛰᜀ-ᜌᜎ-ᜑᜠ-ᜱᝀ-ᝑᝠ-ᝬᝮ-ᝰក-ឳៗៜᠠ-ᡷᢀ-ᢨᢪᢰ-ᣵᤀ-ᤜᥐ-ᥭᥰ-ᥴᦀ-ᦫᧁ-ᧇᨀ-ᨖᨠ-ᩔᪧᬅ-ᬳᭅ-ᭋᮃ-ᮠᮮᮯᮺ-ᯥᰀ-ᰣᱍ-ᱏᱚ-ᱽᳩ-ᳬᳮ-ᳱᳵᳶᴀ-ᶿḀ-ἕἘ-Ἕἠ-ὅὈ-Ὅὐ-ὗὙὛὝὟ-ώᾀ-ᾴᾶ-ᾼιῂ-ῄῆ-ῌῐ-ΐῖ-Ίῠ-Ῥῲ-ῴῶ-ῼⁱⁿₐ-ₜℂℇℊ-ℓℕℙ-ℝℤΩℨK-ℭℯ-ℹℼ-ℿⅅ-ⅉⅎⅠ-ↈⰀ-Ⱞⰰ-ⱞⱠ-ⳤⳫ-ⳮⳲⳳⴀ-ⴥⴧⴭⴰ-ⵧⵯⶀ-ⶖⶠ-ⶦⶨ-ⶮⶰ-ⶶⶸ-ⶾⷀ-ⷆⷈ-ⷎⷐ-ⷖⷘ-ⷞⸯ々-〇〡-〩〱-〵〸-〼ぁ-ゖゝ-ゟァ-ヺー-ヿㄅ-ㄭㄱ-ㆎㆠ-ㆺㇰ-ㇿ㐀-䶵一-鿌ꀀ-ꒌꓐ-ꓽꔀ-ꘌꘐ-ꘟꘪꘫꙀ-ꙮꙿ-ꚗꚠ-ꛯꜗ-ꜟꜢ-ꞈꞋ-ꞎꞐ-ꞓꞠ-Ɦꟸ-ꠁꠃ-ꠅꠇ-ꠊꠌ-ꠢꡀ-ꡳꢂ-ꢳꣲ-ꣷꣻꤊ-ꤥꤰ-ꥆꥠ-ꥼꦄ-ꦲꧏꨀ-ꨨꩀ-ꩂꩄ-ꩋꩠ-ꩶꩺꪀ-ꪯꪱꪵꪶꪹ-ꪽꫀꫂꫛ-ꫝꫠ-ꫪꫲ-ꫴꬁ-ꬆꬉ-ꬎꬑ-ꬖꬠ-ꬦꬨ-ꬮꯀ-ꯢ가-힣ힰ-ퟆퟋ-ퟻ豈-舘並-龎ff-stﬓ-ﬗיִײַ-ﬨשׁ-זּטּ-לּמּנּסּףּפּצּ-ﮱﯓ-ﴽﵐ-ﶏﶒ-ﷇﷰ-ﷻﹰ-ﹴﹶ-ﻼA-Za-zヲ-하-ᅦᅧ-ᅬᅭ-ᅲᅳ-ᅵ]"),mn=RegExp("[ªµºÀ-ÖØ-öø-ˁˆ-ˑˠ-ˤˬˮͰ-ʹͶͷͺ-ͽΆΈ-ΊΌΎ-ΡΣ-ϵϷ-ҁҊ-ԧԱ-Ֆՙա-ևא-תװ-ײؠ-يٮٯٱ-ۓەۥۦۮۯۺ-ۼۿܐܒ-ܯݍ-ޥޱߊ-ߪߴߵߺࠀ-ࠕࠚࠤࠨࡀ-ࡘࢠࢢ-ࢬऄ-हऽॐक़-ॡॱ-ॷॹ-ॿঅ-ঌএঐও-নপ-রলশ-হঽৎড়ঢ়য়-ৡৰৱਅ-ਊਏਐਓ-ਨਪ-ਰਲਲ਼ਵਸ਼ਸਹਖ਼-ੜਫ਼ੲ-ੴઅ-ઍએ-ઑઓ-નપ-રલળવ-હઽૐૠૡଅ-ଌଏଐଓ-ନପ-ରଲଳଵ-ହଽଡ଼ଢ଼ୟ-ୡୱஃஅ-ஊஎ-ஐஒ-கஙசஜஞடணதந-பம-ஹௐఅ-ఌఎ-ఐఒ-నప-ళవ-హఽౘౙౠౡಅ-ಌಎ-ಐಒ-ನಪ-ಳವ-ಹಽೞೠೡೱೲഅ-ഌഎ-ഐഒ-ഺഽൎൠൡൺ-ൿඅ-ඖක-නඳ-රලව-ෆก-ะาำเ-ๆກຂຄງຈຊຍດ-ທນ-ຟມ-ຣລວສຫອ-ະາຳຽເ-ໄໆໜ-ໟༀཀ-ཇཉ-ཬྈ-ྌက-ဪဿၐ-ၕၚ-ၝၡၥၦၮ-ၰၵ-ႁႎႠ-ჅჇჍა-ჺჼ-ቈቊ-ቍቐ-ቖቘቚ-ቝበ-ኈኊ-ኍነ-ኰኲ-ኵኸ-ኾዀዂ-ዅወ-ዖዘ-ጐጒ-ጕጘ-ፚᎀ-ᎏᎠ-Ᏼᐁ-ᙬᙯ-ᙿᚁ-ᚚᚠ-ᛪᛮ-ᛰᜀ-ᜌᜎ-ᜑᜠ-ᜱᝀ-ᝑᝠ-ᝬᝮ-ᝰក-ឳៗៜᠠ-ᡷᢀ-ᢨᢪᢰ-ᣵᤀ-ᤜᥐ-ᥭᥰ-ᥴᦀ-ᦫᧁ-ᧇᨀ-ᨖᨠ-ᩔᪧᬅ-ᬳᭅ-ᭋᮃ-ᮠᮮᮯᮺ-ᯥᰀ-ᰣᱍ-ᱏᱚ-ᱽᳩ-ᳬᳮ-ᳱᳵᳶᴀ-ᶿḀ-ἕἘ-Ἕἠ-ὅὈ-Ὅὐ-ὗὙὛὝὟ-ώᾀ-ᾴᾶ-ᾼιῂ-ῄῆ-ῌῐ-ΐῖ-Ίῠ-Ῥῲ-ῴῶ-ῼⁱⁿₐ-ₜℂℇℊ-ℓℕℙ-ℝℤΩℨK-ℭℯ-ℹℼ-ℿⅅ-ⅉⅎⅠ-ↈⰀ-Ⱞⰰ-ⱞⱠ-ⳤⳫ-ⳮⳲⳳⴀ-ⴥⴧⴭⴰ-ⵧⵯⶀ-ⶖⶠ-ⶦⶨ-ⶮⶰ-ⶶⶸ-ⶾⷀ-ⷆⷈ-ⷎⷐ-ⷖⷘ-ⷞⸯ々-〇〡-〩〱-〵〸-〼ぁ-ゖゝ-ゟァ-ヺー-ヿㄅ-ㄭㄱ-ㆎㆠ-ㆺㇰ-ㇿ㐀-䶵一-鿌ꀀ-ꒌꓐ-ꓽꔀ-ꘌꘐ-ꘟꘪꘫꙀ-ꙮꙿ-ꚗꚠ-ꛯꜗ-ꜟꜢ-ꞈꞋ-ꞎꞐ-ꞓꞠ-Ɦꟸ-ꠁꠃ-ꠅꠇ-ꠊꠌ-ꠢꡀ-ꡳꢂ-ꢳꣲ-ꣷꣻꤊ-ꤥꤰ-ꥆꥠ-ꥼꦄ-ꦲꧏꨀ-ꨨꩀ-ꩂꩄ-ꩋꩠ-ꩶꩺꪀ-ꪯꪱꪵꪶꪹ-ꪽꫀꫂꫛ-ꫝꫠ-ꫪꫲ-ꫴꬁ-ꬆꬉ-ꬎꬑ-ꬖꬠ-ꬦꬨ-ꬮꯀ-ꯢ가-힣ힰ-ퟆퟋ-ퟻ豈-舘並-龎ff-stﬓ-ﬗיִײַ-ﬨשׁ-זּטּ-לּמּנּסּףּפּצּ-ﮱﯓ-ﴽﵐ-ﶏﶒ-ﷇﷰ-ﷻﹰ-ﹴﹶ-ﻼA-Za-zヲ-하-ᅦᅧ-ᅬᅭ-ᅲᅳ-ᅵ̀-ͯ҃-֑҇-ׇֽֿׁׂׅׄؐ-ؚؠ-ىٲ-ۓۧ-ۨۻ-ۼܰ-݊ࠀ-ࠔࠛ-ࠣࠥ-ࠧࠩ-࠭ࡀ-ࡗࣤ-ࣾऀ-ःऺ-़ा-ॏ॑-ॗॢ-ॣ०-९ঁ-ঃ়া-ৄেৈৗয়-ৠਁ-ਃ਼ਾ-ੂੇੈੋ-੍ੑ੦-ੱੵઁ-ઃ઼ા-ૅે-ૉો-્ૢ-ૣ૦-૯ଁ-ଃ଼ା-ୄେୈୋ-୍ୖୗୟ-ୠ୦-୯ஂா-ூெ-ைொ-்ௗ௦-௯ఁ-ఃె-ైొ-్ౕౖౢ-ౣ౦-౯ಂಃ಼ಾ-ೄೆ-ೈೊ-್ೕೖೢ-ೣ೦-೯ംഃെ-ൈൗൢ-ൣ൦-൯ංඃ්ා-ුූෘ-ෟෲෳิ-ฺเ-ๅ๐-๙ິ-ູ່-ໍ໐-໙༘༙༠-༩༹༵༷ཁ-ཇཱ-྄྆-྇ྍ-ྗྙ-ྼ࿆က-ဩ၀-၉ၧ-ၭၱ-ၴႂ-ႍႏ-ႝ፝-፟ᜎ-ᜐᜠ-ᜰᝀ-ᝐᝲᝳក-ឲ៝០-៩᠋-᠍᠐-᠙ᤠ-ᤫᤰ-᤻ᥑ-ᥭᦰ-ᧀᧈ-ᧉ᧐-᧙ᨀ-ᨕᨠ-ᩓ᩠-᩿᩼-᪉᪐-᪙ᭆ-ᭋ᭐-᭙᭫-᭳᮰-᮹᯦-᯳ᰀ-ᰢ᱀-᱉ᱛ-ᱽ᳐-᳒ᴀ-ᶾḁ-ἕ‿⁀⁔⃐-⃥⃜⃡-⃰ⶁ-ⶖⷠ-ⷿ〡-〨゙゚Ꙁ-ꙭꙴ-꙽ꚟ꛰-꛱ꟸ-ꠀ꠆ꠋꠣ-ꠧꢀ-ꢁꢴ-꣄꣐-꣙ꣳ-ꣷ꤀-꤉ꤦ-꤭ꤰ-ꥅꦀ-ꦃ꦳-꧀ꨀ-ꨧꩀ-ꩁꩌ-ꩍ꩐-꩙ꩻꫠ-ꫩꫲ-ꫳꯀ-ꯡ꯬꯭꯰-꯹ﬠ-ﬨ︀-️︠-︦︳︴﹍-﹏0-9_]"),ot=/[\n\r\u2028\u2029]/,it=/\r\n|[\n\r\u2028\u2029]/g,ke,Nt={kind:"loop"},xn={kind:"switch"}},Dt=Dt=typeof globalThis=="undefined"?void 0:globalThis;In(Dt.j||(Dt.j={}));function h(e,t){typeof e=="string"&&(e=Ae(e,"code"));var n=e.constructor;this.ya=function(){return new n({options:{}})};var r=this.ya(),o;for(o in e)r[o]=o==="body"?e[o].slice():e[o];this.ra=r,this.ca=[],this.qb=t,this.za=!1,this.ba=[],this.Ya=0,this.rb=Object.create(null),e=/^step([A-Z]\w*)$/;var s,a;for(a in this)typeof this[a]=="function"&&(s=a.match(e))&&(this.rb[s[1]]=this[a].bind(this));this.N=Ft(this,this.ra,null),this.Na=this.N.object,this.ra=Ae(this.ba.join(`
|
|
4
4
|
`),"polyfills"),this.ba=void 0,at(this.ra),s=new v(this.ra,this.N),s.done=!1,this.o=[s],this.Eb(),this.value=void 0,this.ra=r,s=new v(this.ra,this.N),s.done=!1,this.o.length=0,this.o[0]=s}var Pr={C:!0,kc:5},_t={configurable:!0,enumerable:!0,writable:!1},y={configurable:!0,enumerable:!1,writable:!0},X={configurable:!0,enumerable:!1,writable:!1},_e={configurable:!1,enumerable:!1,writable:!1},Rr={configurable:!1,enumerable:!0,writable:!0},Vr={STEP_ERROR:!0},be={SCOPE_REFERENCE:!0},Ke={VALUE_IN_DESCRIPTOR:!0},Ce={REGEXP_TIMEOUT:!0},Br=[],ie=null,He=null,fe=typeof globalThis=="undefined"?void 0:globalThis,bn=["onmessage = function(e) {","var result;","var data = e.data;","switch (data[0]) {","case 'split':","result = data[1].split(data[2], data[3]);","break;","case 'match':","result = data[1].match(data[2]);","break;","case 'search':","result = data[1].search(data[2]);","break;","case 'replace':","result = data[1].replace(data[2], data[3]);","break;","case 'exec':","var regexp = data[1];","regexp.lastIndex = data[2];","result = [regexp.exec(data[3]), data[1].lastIndex];","break;","default:","throw Error('Unknown RegExp operation: ' + data[0]);","}","postMessage(result);","close();","};"];function Wt(e){var t=e>>>0;return t===Number(e)?t:NaN}function Xe(e){var t=e>>>0;return String(t)===String(e)&&t!==4294967295?t:NaN}function at(e,t,n){t?e.start=t:delete e.start,n?e.end=n:delete e.end;for(var r in e)if(r!=="loc"&&e.hasOwnProperty(r)){var o=e[r];o&&typeof o=="object"&&at(o,t,n)}}h.prototype.REGEXP_MODE=2;h.prototype.REGEXP_THREAD_TIMEOUT=1e3;h.prototype.POLYFILL_TIMEOUT=1e3;T=h.prototype;T.P=!1;T.Ka=!1;T.Kb=0;T.ic=0;function Ae(e,t){var n={},r;for(r in Pr)n[r]=Pr[r];return n.sourceFile=t,fe.j.parse(e,n)}T.Jb=function(e){var t=this.o[0];if(!t||t.node.type!=="Program")throw Error("Expecting original AST to start with a Program node");if(typeof e=="string"&&(e=Ae(e,"appendCode"+this.Kb++)),!e||e.type!=="Program")throw Error("Expecting new AST to start with a Program node");Je(this,e,t.scope),Array.prototype.push.apply(t.node.body,e.body),t.node.body.jb=null,t.done=!1};T.lb=function(){var e=this.o,t;do{var n=e[e.length-1];if(this.za)break;if(!n||n.node.type==="Program"&&n.done){if(!this.ca.length)return!1;if(n=this.ca[0],!n||n.time>Date.now())n=null;else{this.ca.shift(),0<=n.interval&&Kr(this,n,n.interval);var r=new v(n.node,n.scope);n.zb&&(r.ia=2,r.B=this.Na,r.U=n.zb,r.Qa=!0,r.F=n.Lb),n=r}if(!n)break}r=n.node;var o=He;He=this;try{var s=this.rb[r.type](e,n,r)}catch(a){if(a!==Vr)throw this.value!==a&&(this.value=void 0),a}finally{He=o}if(s&&e.push(s),this.P)throw this.value=void 0,Error("Getter not supported in this context");if(this.Ka)throw this.value=void 0,Error("Setter not supported in this context");t||r.end||(t=Date.now()+this.POLYFILL_TIMEOUT)}while(!r.end&&t>Date.now());return!0};T.Eb=function(){for(;!this.za&&this.lb(););return this.za};function Tn(e,t){e.g(t,"NaN",NaN,_e),e.g(t,"Infinity",1/0,_e),e.g(t,"undefined",void 0,_e),e.g(t,"window",t,_t),e.g(t,"this",t,_e),e.g(t,"self",t),e.M=new I(null),e.Z=new I(e.M),Nn(e,t),Pn(e,t),t.xa=e.M,e.g(t,"constructor",e.v,y),Rn(e,t),Bn(e,t),Mn(e,t),Dn(e,t),Un(e,t),Fn(e,t),Ln(e,t),_n(e,t),Wn(e,t);var n=e.i(function(){throw EvalError("Can't happen")},!1);n.eval=!0,e.g(t,"eval",n,y),e.g(t,"parseInt",e.i(parseInt,!1),y),e.g(t,"parseFloat",e.i(parseFloat,!1),y),e.g(t,"isNaN",e.i(isNaN,!1),y),e.g(t,"isFinite",e.i(isFinite,!1),y);for(var r=[[escape,"escape"],[unescape,"unescape"],[decodeURI,"decodeURI"],[decodeURIComponent,"decodeURIComponent"],[encodeURI,"encodeURI"],[encodeURIComponent,"encodeURIComponent"]],o=0;o<r.length;o++)n=function(s){return function(a){try{return s(a)}catch(f){m(e,e.Gb,f.message)}}}(r[o][0]),e.g(t,r[o][1],e.i(n,!1),y);n=function(s){return Mr(e,!1,arguments)},e.g(t,"setTimeout",e.i(n,!1),y),n=function(s){return Mr(e,!0,arguments)},e.g(t,"setInterval",e.i(n,!1),y),n=function(s){Dr(e,s)},e.g(t,"clearTimeout",e.i(n,!1),y),n=function(s){Dr(e,s)},e.g(t,"clearInterval",e.i(n,!1),y),e.OBJECT=e.v,e.OBJECT_PROTO=e.M,e.FUNCTION=e.O,e.FUNCTION_PROTO=e.Z,e.ARRAY=e.qa,e.ARRAY_PROTO=e.La,e.REGEXP=e.I,e.REGEXP_PROTO=e.Ma,e.DATE=e.$,e.DATE_PROTO=e.nb,e.qb&&e.qb(e,t)}T.Wb=0;function Nn(e,t){var n=/^[A-Za-z_$][\w$]*$/,r=function(o){var s=arguments.length?String(arguments[arguments.length-1]):"",a=Array.prototype.slice.call(arguments,0,-1).join(",").trim();if(a){a=a.split(/\s*,\s*/);for(var f=0;f<a.length;f++){var g=a[f];n.test(g)||m(e,e.T,"Invalid function argument: "+g)}a=a.join(", ")}try{var j=Ae("(function("+a+") {"+s+"})","function"+e.Wb++)}catch(O){m(e,e.T,"Invalid code: "+O.message)}return j.body.length!==1&&m(e,e.T,"Invalid code in function body"),Vt(e,j.body[0].la,e.N,"anonymous")};e.O=e.i(r,!0),e.g(t,"Function",e.O,y),e.g(e.O,"prototype",e.Z,y),e.g(e.Z,"constructor",e.O,y),e.Z.Ta=function(){},e.Z.Ta.id=e.Ya++,e.Z.Ab=!0,e.g(e.Z,"length",0,X),e.Z.H="Function",r=function(o,s){var a=e.o[e.o.length-1];a.U=this,a.B=o,a.F=[],s!=null&&(s instanceof I?a.F=Hr(e,s):m(e,e.j,"CreateListFromArrayLike called on non-object")),a.eb=!1},L(e,e.O,"apply",r),r=function(o){var s=e.o[e.o.length-1];s.U=this,s.B=o,s.F=[];for(var a=1;a<arguments.length;a++)s.F.push(arguments[a]);s.eb=!1},L(e,e.O,"call",r),e.ba.push("Object.defineProperty(Function.prototype, 'bind',","{configurable: true, writable: true, value:","function bind(oThis) {","if (typeof this !== 'function') {","throw TypeError('What is trying to be bound is not callable');","}","var aArgs = Array.prototype.slice.call(arguments, 1),","fToBind = this,","fNOP = function() {},","fBound = function() {","return fToBind.apply(this instanceof fNOP","? this",": oThis,","aArgs.concat(Array.prototype.slice.call(arguments)));","};","if (this.prototype) {","fNOP.prototype = this.prototype;","}","fBound.prototype = new fNOP();","return fBound;","}","});",""),r=function(){return String(this)},L(e,e.O,"toString",r),e.g(e.O,"toString",e.i(r,!1),y),r=function(){return this.valueOf()},L(e,e.O,"valueOf",r),e.g(e.O,"valueOf",e.i(r,!1),y)}function Pn(e,t){function n(o){o!=null||m(e,e.j,"Cannot convert '"+o+"' to object")}var r=function(o){if(o==null)return ae(e)?this:e.s(e.M);if(!(o instanceof I)){var s=e.s(se(e,o));return s.data=o,s}return o};e.v=e.i(r,!0),e.g(e.v,"prototype",e.M,y),e.g(e.M,"constructor",e.v,y),e.g(t,"Object",e.v,y),r=function(o){return n(o),oe(e,Object.getOwnPropertyNames(o instanceof I?o.h:o))},e.g(e.v,"getOwnPropertyNames",e.i(r,!1),y),r=function(o){return n(o),o instanceof I&&(o=o.h),oe(e,Object.keys(o))},e.g(e.v,"keys",e.i(r,!1),y),r=function(o){return o===null?e.s(null):(o instanceof I||m(e,e.j,"Object prototype may only be an Object or null, not "+o),e.s(o))},e.g(e.v,"create",e.i(r,!1),y),e.ba.push("(function() {","var create_ = Object.create;","Object.create = function create(proto, props) {","var obj = create_(proto);","props && Object.defineProperties(obj, props);","return obj;","};","})();",""),r=function(o,s,a){return s=String(s),o instanceof I||m(e,e.j,"Object.defineProperty called on non-object: "+o),a instanceof I||m(e,e.j,"Property description must be an object"),!o.preventExtensions||s in o.h||m(e,e.j,"Can't define property '"+s+"', object is not extensible"),e.g(o,s,Ke,a.h),o},e.g(e.v,"defineProperty",e.i(r,!1),y),e.ba.push("(function() {","var defineProperty_ = Object.defineProperty;","Object.defineProperty = function defineProperty(obj, prop, d1) {","var d2 = {};","if ('configurable' in d1) d2.configurable = d1.configurable;","if ('enumerable' in d1) d2.enumerable = d1.enumerable;","if ('writable' in d1) d2.writable = d1.writable;","if ('value' in d1) d2.value = d1.value;","if ('get' in d1) d2.get = d1.get;","if ('set' in d1) d2.set = d1.set;","return defineProperty_(obj, prop, d2);","};","})();","Object.defineProperty(Object, 'defineProperties',","{configurable: true, writable: true, value:","function defineProperties(obj, props) {","var keys = Object.keys(props);","for (var i = 0; i < keys.length; i++) {","Object.defineProperty(obj, keys[i], props[keys[i]]);","}","return obj;","}","});",""),r=function(o,s){if(o instanceof I||m(e,e.j,"Object.getOwnPropertyDescriptor called on non-object: "+o),s=String(s),s in o.h){var a=Object.getOwnPropertyDescriptor(o.h,s),f=o.V[s];return o=o.Y[s],s=e.s(e.M),f||o?(e.g(s,"get",f),e.g(s,"set",o)):(e.g(s,"value",a.value),e.g(s,"writable",a.writable)),e.g(s,"configurable",a.configurable),e.g(s,"enumerable",a.enumerable),s}},e.g(e.v,"getOwnPropertyDescriptor",e.i(r,!1),y),r=function(o){return n(o),se(e,o)},e.g(e.v,"getPrototypeOf",e.i(r,!1),y),r=function(o){return!!o&&!o.preventExtensions},e.g(e.v,"isExtensible",e.i(r,!1),y),r=function(o){return o instanceof I&&(o.preventExtensions=!0),o},e.g(e.v,"preventExtensions",e.i(r,!1),y),L(e,e.v,"toString",I.prototype.toString),L(e,e.v,"toLocaleString",I.prototype.toString),L(e,e.v,"valueOf",I.prototype.valueOf),r=function(o){return n(this),this instanceof I?String(o)in this.h:this.hasOwnProperty(o)},L(e,e.v,"hasOwnProperty",r),r=function(o){return n(this),this instanceof I?Object.prototype.propertyIsEnumerable.call(this.h,o):this.propertyIsEnumerable(o)},L(e,e.v,"propertyIsEnumerable",r),r=function(o){for(;;){if(o=se(e,o),!o)return!1;if(o===this)return!0}},L(e,e.v,"isPrototypeOf",r)}function Rn(e,t){var n=function(r){var o=ae(e)?this:Ie(e),s=arguments[0];if(arguments.length===1&&typeof s=="number")isNaN(Wt(s))&&m(e,e.ob,"Invalid array length: "+s),o.h.length=s;else{for(s=0;s<arguments.length;s++)o.h[s]=arguments[s];o.h.length=s}return o};e.qa=e.i(n,!0),e.La=e.qa.h.prototype,e.g(t,"Array",e.qa,y),n=function(r){return r&&r.H==="Array"},e.g(e.qa,"isArray",e.i(n,!1),y),e.g(e.La,"length",0,{configurable:!1,enumerable:!1,writable:!0}),e.La.H="Array",e.ba.push("(function() {","function createArrayMethod_(f) {","Object.defineProperty(Array.prototype, f.name,","{configurable: true, writable: true, value: f});","}","createArrayMethod_(","function pop() {","if (!this) throw TypeError();","var o = Object(this), len = o.length >>> 0;","if (!len || len < 0) {","o.length = 0;","return undefined;","}","len--;","var x = o[len];","delete o[len];","o.length = len;","return x;","}",");","createArrayMethod_(","function push(var_args) {","if (!this) throw TypeError();","var o = Object(this), len = o.length >>> 0;","for (var i = 0; i < arguments.length; i++) {","o[len] = arguments[i];","len++;","}","o.length = len;","return len;","}",");","createArrayMethod_(","function shift() {","if (!this) throw TypeError();","var o = Object(this), len = o.length >>> 0;","if (!len || len < 0) {","o.length = 0;","return undefined;","}","var value = o[0];","for (var i = 0; i < len - 1; i++) {","if ((i + 1) in o) {","o[i] = o[i + 1];","} else {","delete o[i];","}","}","delete o[i];","o.length = len - 1;","return value;","}",");","createArrayMethod_(","function unshift(var_args) {","if (!this) throw TypeError();","var o = Object(this), len = o.length >>> 0;","if (!len || len < 0) {","len = 0;","}","for (var i = len - 1; i >= 0; i--) {","if (i in o) {","o[i + arguments.length] = o[i];","} else {","delete o[i + arguments.length];","}","}","for (var i = 0; i < arguments.length; i++) {","o[i] = arguments[i];","}","return (o.length = len + arguments.length);","}",");","createArrayMethod_(","function reverse() {","if (!this) throw TypeError();","var o = Object(this), len = o.length >>> 0;","if (!len || len < 2) {","return o;","}","for (var i = 0; i < len / 2 - 0.5; i++) {","var x = o[i];","var hasX = i in o;","if ((len - i - 1) in o) {","o[i] = o[len - i - 1];","} else {","delete o[i];","}","if (hasX) {","o[len - i - 1] = x;","} else {","delete o[len - i - 1];","}","}","return o;","}",");","createArrayMethod_(","function indexOf(searchElement, fromIndex) {","if (!this) throw TypeError();","var o = Object(this), len = o.length >>> 0;","var n = fromIndex | 0;","if (!len || n >= len) {","return -1;","}","var i = Math.max(n >= 0 ? n : len - Math.abs(n), 0);","while (i < len) {","if (i in o && o[i] === searchElement) {","return i;","}","i++;","}","return -1;","}",");","createArrayMethod_(","function lastIndexOf(searchElement, fromIndex) {","if (!this) throw TypeError();","var o = Object(this), len = o.length >>> 0;","if (!len) {","return -1;","}","var n = len - 1;","if (arguments.length > 1) {","n = fromIndex | 0;","if (n) {","n = (n > 0 || -1) * Math.floor(Math.abs(n));","}","}","var i = n >= 0 ? Math.min(n, len - 1) : len - Math.abs(n);","while (i >= 0) {","if (i in o && o[i] === searchElement) {","return i;","}","i--;","}","return -1;","}",");","createArrayMethod_(","function slice(start, end) {","if (!this) throw TypeError();","var o = Object(this), len = o.length >>> 0;","start |= 0;","start = (start >= 0) ? start : Math.max(0, len + start);","if (typeof end !== 'undefined') {","if (end !== Infinity) {","end |= 0;","}","if (end < 0) {","end = len + end;","} else {","end = Math.min(end, len);","}","} else {","end = len;","}","var size = end - start;","var cloned = new Array(size);","for (var i = 0; i < size; i++) {","if ((start + i) in o) {","cloned[i] = o[start + i];","}","}","return cloned;","}",");","createArrayMethod_(","function splice(start, deleteCount, var_args) {","if (!this) throw TypeError();","var o = Object(this), len = o.length >>> 0;","start |= 0;","if (start < 0) {","start = Math.max(len + start, 0);","} else {","start = Math.min(start, len);","}","if (arguments.length < 1) {","deleteCount = len - start;","} else {","deleteCount |= 0;","deleteCount = Math.max(0, Math.min(deleteCount, len - start));","}","var removed = [];","for (var i = start; i < start + deleteCount; i++) {","if (i in o) {","removed.push(o[i]);","} else {","removed.length++;","}","if ((i + deleteCount) in o) {","o[i] = o[i + deleteCount];","} else {","delete o[i];","}","}","for (var i = start + deleteCount; i < len - deleteCount; i++) {","if ((i + deleteCount) in o) {","o[i] = o[i + deleteCount];","} else {","delete o[i];","}","}","for (var i = len - deleteCount; i < len; i++) {","delete o[i];","}","len -= deleteCount;","var arl = arguments.length - 2;","for (var i = len - 1; i >= start; i--) {","if (i in o) {","o[i + arl] = o[i];","} else {","delete o[i + arl];","}","}","len += arl;","for (var i = 2; i < arguments.length; i++) {","o[start + i - 2] = arguments[i];","}","o.length = len;","return removed;","}",");","createArrayMethod_(","function concat(var_args) {","if (!this) throw TypeError();","var o = Object(this);","var cloned = [];","for (var i = -1; i < arguments.length; i++) {","var value = (i === -1) ? o : arguments[i];","if (Array.isArray(value)) {","for (var j = 0, l = value.length; j < l; j++) {","if (j in value) {","cloned.push(value[j]);","} else {","cloned.length++;","}","}","} else {","cloned.push(value);","}","}","return cloned;","}",");","createArrayMethod_(","function join(opt_separator) {","if (!this) throw TypeError();","var o = Object(this), len = o.length >>> 0;","var sep = typeof opt_separator === 'undefined' ?","',' : ('' + opt_separator);","var str = '';","for (var i = 0; i < len; i++) {","if (i && sep) str += sep;","str += (o[i] === null || o[i] === undefined) ? '' : o[i];","}","return str;","}",");","createArrayMethod_(","function every(callbackfn, thisArg) {","if (!this || typeof callbackfn !== 'function') throw TypeError();","var t, k = 0;","var o = Object(this), len = o.length >>> 0;","if (arguments.length > 1) t = thisArg;","while (k < len) {","if (k in o && !callbackfn.call(t, o[k], k, o)) return false;","k++;","}","return true;","}",");","createArrayMethod_(","function filter(fun, var_args) {","if (this === void 0 || this === null || typeof fun !== 'function') throw TypeError();","var o = Object(this), len = o.length >>> 0;","var res = [];","var thisArg = arguments.length >= 2 ? arguments[1] : void 0;","for (var i = 0; i < len; i++) {","if (i in o) {","var val = o[i];","if (fun.call(thisArg, val, i, o)) res.push(val);","}","}","return res;","}",");","createArrayMethod_(","function forEach(callback, thisArg) {","if (!this || typeof callback !== 'function') throw TypeError();","var t, k = 0;","var o = Object(this), len = o.length >>> 0;","if (arguments.length > 1) t = thisArg;","while (k < len) {","if (k in o) callback.call(t, o[k], k, o);","k++;","}","}",");","createArrayMethod_(","function map(callback, thisArg) {","if (!this || typeof callback !== 'function') throw TypeError();","var t, k = 0;","var o = Object(this), len = o.length >>> 0;","if (arguments.length > 1) t = thisArg;","var a = new Array(len);","while (k < len) {","if (k in o) a[k] = callback.call(t, o[k], k, o);","k++;","}","return a;","}",");","createArrayMethod_(","function reduce(callback /*, initialValue*/) {","if (!this || typeof callback !== 'function') throw TypeError();","var o = Object(this), len = o.length >>> 0;","var k = 0, value;","if (arguments.length === 2) {","value = arguments[1];","} else {","while (k < len && !(k in o)) k++;","if (k >= len) {","throw TypeError('Reduce of empty array with no initial value');","}","value = o[k++];","}","for (; k < len; k++) {","if (k in o) value = callback(value, o[k], k, o);","}","return value;","}",");","createArrayMethod_(","function reduceRight(callback /*, initialValue*/) {","if (null === this || 'undefined' === typeof this || 'function' !== typeof callback) throw TypeError();","var o = Object(this), len = o.length >>> 0;","var k = len - 1, value;","if (arguments.length >= 2) {","value = arguments[1];","} else {","while (k >= 0 && !(k in o)) k--;","if (k < 0) {","throw TypeError('Reduce of empty array with no initial value');","}","value = o[k--];","}","for (; k >= 0; k--) {","if (k in o) value = callback(value, o[k], k, o);","}","return value;","}",");","createArrayMethod_(","function some(fun/*, thisArg*/) {","if (!this || typeof fun !== 'function') throw TypeError();","var o = Object(this), len = o.length >>> 0;","var thisArg = arguments.length >= 2 ? arguments[1] : void 0;","for (var i = 0; i < len; i++) {","if (i in o && fun.call(thisArg, o[i], i, o)) return true;","}","return false;","}",");","createArrayMethod_(","function sort(opt_comp) {","if (!this) throw TypeError();","if (typeof opt_comp !== 'function') {","opt_comp = undefined;","}","for (var i = 0; i < this.length; i++) {","var changes = 0;","for (var j = 0; j < this.length - i - 1; j++) {","if (opt_comp ? (opt_comp(this[j], this[j + 1]) > 0) :","(String(this[j]) > String(this[j + 1]))) {","var swap = this[j];","var hasSwap = j in this;","if ((j + 1) in this) {","this[j] = this[j + 1];","} else {","delete this[j];","}","if (hasSwap) {","this[j + 1] = swap;","} else {","delete this[j + 1];","}","changes++;","}","}","if (!changes) break;","}","return this;","}",");","createArrayMethod_(","function toLocaleString() {","if (!this) throw TypeError();","var o = Object(this), len = o.length >>> 0;","var out = [];","for (var i = 0; i < len; i++) {","out[i] = (o[i] === null || o[i] === undefined) ? '' : o[i].toLocaleString();","}","return out.join(',');","}",");","})();","")}function Bn(e,t){var n=function(r){return r=arguments.length?fe.String(r):"",ae(e)?(this.data=r,this):r};for(e.J=e.i(n,!0),e.g(t,"String",e.J,y),e.g(e.J,"fromCharCode",e.i(String.fromCharCode,!1),y),t="charAt charCodeAt concat indexOf lastIndexOf slice substr substring toLocaleLowerCase toLocaleUpperCase toLowerCase toUpperCase trim".split(" "),n=0;n<t.length;n++)L(e,e.J,t[n],String.prototype[t[n]]);n=function(r,o,s){o=e.R(o),s=e.R(s);try{return String(this).localeCompare(r,o,s)}catch(a){m(e,e.D,"localeCompare: "+a.message)}},L(e,e.J,"localeCompare",n),n=function(r,o,s){var a=String(this);if(o=o?Number(o):void 0,W(e,r,e.I)&&(r=r.data,$e(e,r,s),e.REGEXP_MODE===2)){if(ie)r=We(e,"string.split(separator, limit)",{string:a,separator:r,limit:o},r,s),r!==Ce&&s(oe(e,r));else{var f=e.ha(),g=Ge(e,r,f,s);f.onmessage=function(j){clearTimeout(g),s(oe(e,j.data))},f.postMessage(["split",a,r,o])}return}r=a.split(r,o),s(oe(e,r))},Ve(e,e.J,"split",n),n=function(r,o){var s=String(this);if(r=W(e,r,e.I)?r.data:new RegExp(r),$e(e,r,o),e.REGEXP_MODE===2)if(ie)r=We(e,"string.match(regexp)",{string:s,regexp:r},r,o),r!==Ce&&o(r&&oe(e,r));else{var a=e.ha(),f=Ge(e,r,a,o);a.onmessage=function(g){clearTimeout(f),o(g.data&&oe(e,g.data))},a.postMessage(["match",s,r])}else r=s.match(r),o(r&&oe(e,r))},Ve(e,e.J,"match",n),n=function(r,o){var s=String(this);if(W(e,r,e.I)?r=r.data:r=new RegExp(r),$e(e,r,o),e.REGEXP_MODE===2)if(ie)r=We(e,"string.search(regexp)",{string:s,regexp:r},r,o),r!==Ce&&o(r);else{var a=e.ha(),f=Ge(e,r,a,o);a.onmessage=function(g){clearTimeout(f),o(g.data)},a.postMessage(["search",s,r])}else o(s.search(r))},Ve(e,e.J,"search",n),n=function(r,o,s){var a=String(this);if(o=String(o),W(e,r,e.I)&&(r=r.data,$e(e,r,s),e.REGEXP_MODE===2)){if(ie)r=We(e,"string.replace(substr, newSubstr)",{string:a,substr:r,newSubstr:o},r,s),r!==Ce&&s(r);else{var f=e.ha(),g=Ge(e,r,f,s);f.onmessage=function(j){clearTimeout(g),s(j.data)},f.postMessage(["replace",a,r,o])}return}s(a.replace(r,o))},Ve(e,e.J,"replace",n),e.ba.push("(function() {","var replace_ = String.prototype.replace;","String.prototype.replace = function replace(substr, newSubstr) {","if (typeof newSubstr !== 'function') {","return replace_.call(this, substr, newSubstr);","}","var str = this;","if (substr instanceof RegExp) {","var subs = [];","var m = substr.exec(str);","while (m) {","m.push(m.index, str);","var inject = newSubstr.apply(null, m);","subs.push([m.index, m[0].length, inject]);","m = substr.global ? substr.exec(str) : null;","}","for (var i = subs.length - 1; i >= 0; i--) {","str = str.substring(0, subs[i][0]) + subs[i][2] + str.substring(subs[i][0] + subs[i][1]);","}","} else {","var i = str.indexOf(substr);","if (i !== -1) {","var inject = newSubstr(str.substr(i, substr.length), i, str);","str = str.substring(0, i) + inject + str.substring(i + substr.length);","}","}","return str;","};","})();","")}function Mn(e,t){e.mb=e.i(function(n){return n=fe.Boolean(n),ae(e)?(this.data=n,this):n},!0),e.g(t,"Boolean",e.mb,y)}function Dn(e,t){var n=function(r){return r=arguments.length?fe.Number(r):0,ae(e)?(this.data=r,this):r};for(e.aa=e.i(n,!0),e.g(t,"Number",e.aa,y),t=["MAX_VALUE","MIN_VALUE","NaN","NEGATIVE_INFINITY","POSITIVE_INFINITY"],n=0;n<t.length;n++)e.g(e.aa,t[n],Number[t[n]],_e);n=function(r){try{return Number(this).toExponential(r)}catch(o){m(e,e.D,o.message)}},L(e,e.aa,"toExponential",n),n=function(r){try{return Number(this).toFixed(r)}catch(o){m(e,e.D,o.message)}},L(e,e.aa,"toFixed",n),n=function(r){try{return Number(this).toPrecision(r)}catch(o){m(e,e.D,o.message)}},L(e,e.aa,"toPrecision",n),n=function(r){try{return Number(this).toString(r)}catch(o){m(e,e.D,o.message)}},L(e,e.aa,"toString",n),n=function(r,o){r=r?e.R(r):void 0,o=o?e.R(o):void 0;try{return Number(this).toLocaleString(r,o)}catch(s){m(e,e.D,"toLocaleString: "+s.message)}},L(e,e.aa,"toLocaleString",n)}function Un(e,t){var n=function(o,s){if(!ae(e))return fe.Date();var a=[null].concat(Array.from(arguments));return this.data=new(Function.prototype.bind.apply(fe.Date,a)),this};e.$=e.i(n,!0),e.nb=e.$.h.prototype,e.g(t,"Date",e.$,y),e.g(e.$,"now",e.i(Date.now,!1),y),e.g(e.$,"parse",e.i(Date.parse,!1),y),e.g(e.$,"UTC",e.i(Date.UTC,!1),y),t="getDate getDay getFullYear getHours getMilliseconds getMinutes getMonth getSeconds getTime getTimezoneOffset getUTCDate getUTCDay getUTCFullYear getUTCHours getUTCMilliseconds getUTCMinutes getUTCMonth getUTCSeconds getYear setDate setFullYear setHours setMilliseconds setMinutes setMonth setSeconds setTime setUTCDate setUTCFullYear setUTCHours setUTCMilliseconds setUTCMinutes setUTCMonth setUTCSeconds setYear toDateString toISOString toJSON toGMTString toLocaleDateString toLocaleString toLocaleTimeString toTimeString toUTCString".split(" ");for(var r=0;r<t.length;r++)n=function(o){return function(s){var a=this.data;a instanceof Date||m(e,e.j,o+" not called on a Date");for(var f=[],g=0;g<arguments.length;g++)f[g]=e.R(arguments[g]);return a[o].apply(a,f)}}(t[r]),L(e,e.$,t[r],n)}function Fn(e,t){var n=function(r,o){if(ae(e))var s=this;else{if(o===void 0&&W(e,r,e.I))return r;s=e.s(e.Ma)}r=r===void 0?"":String(r),o=o?String(o):"",/^[gmi]*$/.test(o)||m(e,e.T,"Invalid regexp flag: "+o);try{var a=new fe.RegExp(r,o)}catch(f){m(e,e.T,f.message)}return $t(e,s,a),s};e.I=e.i(n,!0),e.Ma=e.I.h.prototype,e.g(t,"RegExp",e.I,y),e.g(e.I.h.prototype,"global",void 0,X),e.g(e.I.h.prototype,"ignoreCase",void 0,X),e.g(e.I.h.prototype,"multiline",void 0,X),e.g(e.I.h.prototype,"source","(?:)",X),e.ba.push("Object.defineProperty(RegExp.prototype, 'test',","{configurable: true, writable: true, value:","function test(str) {","return !!this.exec(str);","}","});"),n=function(r,o){function s(O){if(O){var x=oe(e,O);return e.g(x,"index",O.index),e.g(x,"input",O.input),x}return null}var a=this.data;if(r=String(r),a.lastIndex=Number(e.G(this,"lastIndex")),$e(e,a,o),e.REGEXP_MODE===2)if(ie)r=We(e,"regexp.exec(string)",{string:r,regexp:a},a,o),r!==Ce&&(e.g(this,"lastIndex",a.lastIndex),o(s(r)));else{var f=e.ha(),g=Ge(e,a,f,o),j=this;f.onmessage=function(O){clearTimeout(g),e.g(j,"lastIndex",O.data[1]),o(s(O.data[0]))},f.postMessage(["exec",a,a.lastIndex,r])}else r=a.exec(r),e.g(this,"lastIndex",a.lastIndex),o(s(r))},Ve(e,e.I,"exec",n)}function Ln(e,t){function n(r){var o=e.i(function(s){var a=ae(e)?this:e.Aa(o);return Ut(e,a,s),a},!0);return e.g(o,"prototype",e.Aa(e.D),y),e.g(o.h.prototype,"name",r,y),e.g(t,r,o,y),o}e.D=e.i(function(r){var o=ae(e)?this:e.Aa(e.D);return Ut(e,o,r),o},!0),e.g(t,"Error",e.D,y),e.g(e.D.h.prototype,"message","",y),e.g(e.D.h.prototype,"name","Error",y),n("EvalError"),e.ob=n("RangeError"),e.pb=n("ReferenceError"),e.T=n("SyntaxError"),e.j=n("TypeError"),e.Gb=n("URIError")}function _n(e,t){var n=e.s(e.M);e.g(t,"Math",n,y);var r="E LN2 LN10 LOG2E LOG10E PI SQRT1_2 SQRT2".split(" ");for(t=0;t<r.length;t++)e.g(n,r[t],Math[r[t]],X);for(r="abs acos asin atan atan2 ceil cos exp floor log max min pow random round sin sqrt tan".split(" "),t=0;t<r.length;t++)e.g(n,r[t],e.i(Math[r[t]],!1),y)}function Wn(e,t){var n=e.s(e.M);e.g(t,"JSON",n,y),t=function(r){try{var o=JSON.parse(String(r))}catch(s){m(e,e.T,s.message)}return e.Ia(o)},e.g(n,"parse",e.i(t,!1)),t=function(r,o,s){o&&o.H==="Function"?m(e,e.j,"Function replacer on JSON.stringify not supported"):o&&o.H==="Array"?(o=Hr(e,o),o=o.filter(function(f){return typeof f=="string"||typeof f=="number"})):o=null,typeof s!="string"&&typeof s!="number"&&(s=void 0),r=e.R(r);try{var a=JSON.stringify(r,o,s)}catch(f){m(e,e.j,f.message)}return a},e.g(n,"stringify",e.i(t,!1))}function W(e,t,n){if(t==null||!n)return!1;if(n=n.h.prototype,t===n)return!0;for(t=se(e,t);t;){if(t===n)return!0;t=t.xa}return!1}function $t(e,t,n){t.data=new RegExp(n.source,n.flags),e.g(t,"lastIndex",n.lastIndex,y),e.g(t,"source",n.source,X),e.g(t,"global",n.global,X),e.g(t,"ignoreCase",n.ignoreCase,X),e.g(t,"multiline",n.multiline,X)}function Ut(e,t,n){n&&e.g(t,"message",String(n),y),n=[];for(var r=e.o.length-1;0<=r;r--){var o=e.o[r],s=o.node;s.type==="CallExpression"&&(o=o.U)&&n.length&&(n[n.length-1].Ob=e.G(o,"name")),!s.X||n.length&&s.type!=="CallExpression"||n.push({Nb:s.X})}for(r=String(e.G(t,"name")),s=String(e.G(t,"message")),s=r+": "+s+`
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
${t}
|
|
11
11
|
${f}
|
|
12
12
|
`}).filter(Boolean).join(`
|
|
13
|
-
`),Ur=e=>e+"JSON",Hn=({builder:e,context:t,event:n,rootState:r,localState:o,rootSetState:s,code:a})=>{const f={...r,...o},g
|
|
13
|
+
`),Ur=e=>e+"JSON",Hn=({builder:e,context:t,event:n,rootState:r,localState:o,rootSetState:s,code:a})=>{const f={...r,...o},g=Wr({builder:e,context:t,event:n,state:f}),j=g.map(([b])=>{const $=Ur(b);return`var ${b} = ${$} === undefined ? undefined : JSON.parse(${$});`}).join(`
|
|
14
14
|
`),O=Vn(a);if(O===""){D.logger.warn("Skipping evaluation of empty code block.");return}const x=`
|
|
15
15
|
function theFunction() {
|
|
16
16
|
${j}
|
|
@@ -18,15 +18,15 @@ function theFunction() {
|
|
|
18
18
|
${O}
|
|
19
19
|
}
|
|
20
20
|
theFunction();
|
|
21
|
-
`,N=(b,$)=>{const z=Lt(f,b,$);s==null||s(z)},P=function(b,$){g.forEach(([z,pe])=>{const A=JSON.stringify(pe);b.setProperty($,Ur(z),A)}),b.setProperty($,"setRootState",b.createNativeFunction(N))};try{const b=new h(x,P);return b.run(),b.pseudoToNative(b.value)}catch(b){D.logger.warn("Custom code error in edge runtime. NOTE: your code must be ES5 JavaScript.",{e:b});return}};function Xn(){var e;return typeof process!="undefined"&&D.checkIsDefined((e=process==null?void 0:process.versions)==null?void 0:e.node)}const Kn=()=>{var r;if(!Xn())return!1;const e=process.arch==="arm64",t=process.version.startsWith("v20"),n=(r=process.env.NODE_OPTIONS)==null?void 0:r.includes("--no-node-snapshot");return e&&t&&!n?(D.logger.log("Skipping usage of `isolated-vm` to avoid crashes in Node v20 on an arm64 machine.\n If you would like to use the `isolated-vm` package on this machine, please provide the `NODE_OPTIONS=--no-node-snapshot` config to your Node process.\n See https://github.com/BuilderIO/builder/blob/main/packages/sdks/README.md#node-v20--m1-macs-apple-silicon-support for more information.\n "),!0):!1},Jn=e=>D.isBrowser()||Kn()?An(e):Hn(e),ne=class ne{static getCacheKey(t){return JSON.stringify({...t,event:t.event?Math.random():void 0})}static getCachedValue(t){return ne.cache.get(t)}static setCachedValue(t,n){ne.cache.size>20&&ne.cache.delete(ne.cache.keys().next().value),ne.cache.set(t,{value:n})}};Rt(ne,"cacheLimit",20),Rt(ne,"cache",new Map);let je=ne;function ut({code:e,context:t,localState:n,rootState:r,rootSetState:o,event:s,isExpression:a=!0,enableCache:f}){if(e===""){D.logger.warn("Skipping evaluation of empty code block.");return}const g={code:
|
|
21
|
+
`,N=(b,$)=>{const z=Lt(f,b,$);s==null||s(z)},P=function(b,$){g.forEach(([z,pe])=>{const A=JSON.stringify(pe);b.setProperty($,Ur(z),A)}),b.setProperty($,"setRootState",b.createNativeFunction(N))};try{const b=new h(x,P);return b.run(),b.pseudoToNative(b.value)}catch(b){D.logger.warn("Custom code error in edge runtime. NOTE: your code must be ES5 JavaScript.",{e:b});return}};function Xn(){var e;return typeof process!="undefined"&&D.checkIsDefined((e=process==null?void 0:process.versions)==null?void 0:e.node)}const Kn=()=>{var r;if(!Xn())return!1;const e=process.arch==="arm64",t=process.version.startsWith("v20"),n=(r=process.env.NODE_OPTIONS)==null?void 0:r.includes("--no-node-snapshot");return e&&t&&!n?(D.logger.log("Skipping usage of `isolated-vm` to avoid crashes in Node v20 on an arm64 machine.\n If you would like to use the `isolated-vm` package on this machine, please provide the `NODE_OPTIONS=--no-node-snapshot` config to your Node process.\n See https://github.com/BuilderIO/builder/blob/main/packages/sdks/README.md#node-v20--m1-macs-apple-silicon-support for more information.\n "),!0):!1},Jn=e=>D.isBrowser()||Kn()?An(e):Hn(e),ne=class ne{static getCacheKey(t){return JSON.stringify({...t,event:t.event?Math.random():void 0})}static getCachedValue(t){return ne.cache.get(t)}static setCachedValue(t,n){ne.cache.size>20&&ne.cache.delete(ne.cache.keys().next().value),ne.cache.set(t,{value:n})}};Rt(ne,"cacheLimit",20),Rt(ne,"cache",new Map);let je=ne;function ut({code:e,context:t,localState:n,rootState:r,rootSetState:o,event:s,isExpression:a=!0,enableCache:f}){if(e===""){D.logger.warn("Skipping evaluation of empty code block.");return}const g={code:jn(e,{isExpression:a}),builder:Cn(),context:t,event:s,rootSetState:o,rootState:r,localState:n};if(f){const j=je.getCacheKey(g),O=je.getCachedValue(j);if(O)return O.value}try{const j=Jn(g);if(f){const O=je.getCacheKey(g);je.setCachedValue(O,j)}return j}catch(j){D.logger.error("Failed code evaluation: "+j.message,{code:e});return}}const Yn=({block:e,context:t,localState:n,rootState:r,rootSetState:o})=>{if(!e.bindings)return e;const s=D.fastClone(e),a={...s,properties:{...s.properties},actions:{...s.actions}};for(const f in e.bindings){const g=e.bindings[f],j=ut({code:g,localState:n,rootState:r,rootSetState:o,context:t,enableCache:!0});Lt(a,f,j)}return a};function st({block:e,context:t,shouldEvaluateBindings:n,localState:r,rootState:o,rootSetState:s}){const a=e;return n?Yn({block:a,localState:r,rootState:o,rootSetState:s,context:t}):a}function Zn(e,t,n={}){let r,o,s,a=null,f=0;const g=function(){f=n.leading===!1?0:Date.now(),a=null,s=e.apply(r,o),a||(r=o=null)};return function(){const j=Date.now();!f&&n.leading===!1&&(f=j);const O=t-(j-f);return r=this,o=arguments,O<=0||O>t?(a&&(clearTimeout(a),a=null),f=j,s=e.apply(r,o),a||(r=o=null)):!a&&n.trailing!==!1&&(a=setTimeout(g,O)),s}}function ye(e,...t){const n=Object(e);for(let r=1;r<arguments.length;r++){const o=arguments[r];if(o!=null)for(const s in o)Object.prototype.hasOwnProperty.call(o,s)&&(n[s]=o[s])}return n}const zt=e=>e?e.replace(/([A-Z])/g,t=>`-${t[0].toLowerCase()}`):"";function zn(e){for(const t of e)switch(t.trigger){case"pageLoad":Yr(t);break;case"hover":Qn(t);break;case"scrollInView":eo(t);break}}function qt(e){console.warn(`Cannot animate element: element with ID ${e} not found!`)}function Qt(e,t){const n=qn(e),r=getComputedStyle(t),o=e.steps[0].styles,s=e.steps[e.steps.length-1].styles,a=[o,s];for(const f of a)for(const g of n)g in f||(f[g]=r[g])}function qn(e){const t=[];for(const n of e.steps)for(const r in n.styles)t.indexOf(r)===-1&&t.push(r);return t}function Yr(e){const t=Array.prototype.slice.call(document.getElementsByClassName(e.elementId||e.id||""));if(!t.length){qt(e.elementId||e.id||"");return}Array.from(t).forEach(n=>{Qt(e,n),n.style.transition="none",n.style.transitionDelay="0",ye(n.style,e.steps[0].styles),setTimeout(()=>{n.style.transition=`all ${e.duration}s ${zt(e.easing)}`,e.delay&&(n.style.transitionDelay=e.delay+"s"),ye(n.style,e.steps[1].styles),setTimeout(()=>{n.style.transition="",n.style.transitionDelay=""},(e.delay||0)*1e3+e.duration*1e3+100)})})}function Qn(e){const t=Array.prototype.slice.call(document.getElementsByClassName(e.elementId||e.id||""));if(!t.length){qt(e.elementId||e.id||"");return}Array.from(t).forEach(n=>{Qt(e,n);const r=e.steps[0].styles,o=e.steps[1].styles;function s(){ye(n.style,r)}function a(){ye(n.style,o)}s(),n.addEventListener("mouseenter",a),n.addEventListener("mouseleave",s),setTimeout(()=>{n.style.transition=`all ${e.duration}s ${zt(e.easing)}`,e.delay&&(n.style.transitionDelay=e.delay+"s")})})}function eo(e){const t=Array.prototype.slice.call(document.getElementsByClassName(e.elementId||e.id||""));if(!t.length){qt(e.elementId||e.id||"");return}Array.from(t).forEach(n=>{Qt(e,n);let r=!1,o=!1;function s(){!r&&f(n)?(r=!0,o=!0,setTimeout(()=>{ye(n.style,e.steps[1].styles),e.repeat||document.removeEventListener("scroll",a),setTimeout(()=>{o=!1,e.repeat||(n.style.transition="",n.style.transitionDelay="")},(e.duration+(e.delay||0))*1e3+100)})):e.repeat&&r&&!o&&!f(n)&&(r=!1,ye(n.style,e.steps[0].styles))}const a=Zn(s,200,{leading:!1});function f(O){const x=O.getBoundingClientRect(),N=window.innerHeight,b=(e.thresholdPercent||0)/100*N;return x.bottom>b&&x.top<N-b}const g=e.steps[0].styles;function j(){ye(n.style,g)}j(),setTimeout(()=>{n.style.transition=`all ${e.duration}s ${zt(e.easing)}`,e.delay&&(n.style.transitionDelay=e.delay+"s")}),document.addEventListener("scroll",a,{capture:!0,passive:!0}),s()})}const to=e=>e.replace(/([a-z0-9]|(?=[A-Z]))([A-Z])/g,"$1-$2").toLowerCase(),Zr=e=>Object.entries(e).map(([n,r])=>{if(typeof r=="string")return`${to(n)}: ${r};`}).filter(D.checkIsDefined),ro=e=>Zr(e).join(`
|
|
22
22
|
`),Mt=({mediaQuery:e,className:t,styles:n})=>{const r=`.${t} {
|
|
23
23
|
${ro(n)}
|
|
24
24
|
}`;return e?`${e} {
|
|
25
25
|
${r}
|
|
26
26
|
}`:r};function no({style:e}){return e}const oo=({block:e,context:t})=>zr(no({style:e.style||{},context:t,block:e}));function zr(e){switch(D.TARGET){case"svelte":case"vue":case"solid":return Zr(e).join(" ");case"qwik":case"reactNative":case"react":case"rsc":return e}}const io=({block:e,context:t,registeredComponents:n})=>{var s;const r=(s=st({block:e,localState:t.localState,rootState:t.rootState,rootSetState:t.rootSetState,context:t.context,shouldEvaluateBindings:!1}).component)==null?void 0:s.name;if(!r)return null;const o=n[r];if(o)return o;console.warn(`
|
|
27
27
|
Could not find a registered component named "${r}".
|
|
28
|
-
If you registered it, is the file that registered it imported by the file that needs to render it?`)},so=({block:e,context:t})=>{const{repeat:n,...r}=e;if(!(n!=null&&n.collection))return;const o=ut({code:n.collection,localState:t.localState,rootState:t.rootState,rootSetState:t.rootSetState,context:t.context,enableCache:!0});if(!Array.isArray(o))return;const s=n.collection.split(".").pop(),a=n.itemName||(s?s+"Item":"item");return o.map((g,j)=>({context:{...t,localState:{...t.localState,$index:j,$item:g,[a]:g,[`$${a}Index`]:j}},block:r}))},qr={small:{min:320,default:321,max:640},medium:{min:641,default:642,max:991},large:{min:990,default:991,max:1200}},Fr=(e,t=qr)=>`@media (max-width: ${t[e].max}px)`,Qr=({small:e,medium:t})=>{const n=D.fastClone(qr);if(!e||!t)return n;const r=Math.floor(e/2);n.small={max:e,min:r,default:r+1};const o=n.small.max+1;n.medium={max:t,min:o,default:o+1};const s=n.medium.max+1;return n.large={max:2e3,min:s,default:s+1},n};function en(e){return k.jsx("style",{dangerouslySetInnerHTML:{__html:e.styles},"data-id":e.id})}function ao(e){function t(){const r=st({block:e.block,localState:e.context.localState,rootState:e.context.rootState,rootSetState:e.context.rootSetState,context:e.context.context,shouldEvaluateBindings:!0});return D.checkIsDefined(r.hide)?!r.hide:D.checkIsDefined(r.show)?r.show:!0}function n(){var b;const r=st({block:e.block,localState:e.context.localState,rootState:e.context.rootState,rootSetState:e.context.rootSetState,context:e.context.context,shouldEvaluateBindings:!0}),o=r.responsiveStyles,s=e.context.content,a=Qr(((b=s==null?void 0:s.meta)==null?void 0:b.breakpoints)||{}),f=o==null?void 0:o.large,g=o==null?void 0:o.medium,j=o==null?void 0:o.small,O=r.id;if(!O)return"";const x=f?Mt({className:O,styles:f}):"",N=g?Mt({className:O,styles:g,mediaQuery:Fr("medium",a)}):"",P=j?Mt({className:O,styles:j,mediaQuery:Fr("small",a)}):"";return[x,N,P].join(" ")}return k.jsx(k.Fragment,{children:n()&&t()?k.jsx(k.Fragment,{children:k.jsx(en,{id:"builderio-block",styles:n()})}):null})}function lo(e){return e.charAt(0).toUpperCase()+e.slice(1)}const uo=e=>`on${lo(e)}`,co=(e,t)=>n=>ut({code:e,context:t.context,localState:t.localState,rootState:t.rootState,rootSetState:t.rootSetState,event:n,isExpression:!1,enableCache:!0});function tn(e){var r;const t={},n=(r=e.block.actions)!=null?r:{};for(const o in n){if(!n.hasOwnProperty(o))continue;const s=n[o];let a=uo(o);if(e.stripPrefix)switch(D.TARGET){case"vue":a=a.replace("v-on:","");break;case"svelte":a=a.replace("on:","");break}t[a]=co(s,e)}return t}function fo({properties:e}){return e}const po=e=>({href:e.href});function er({block:e,context:t}){var r;const n={...po(e),...e.properties,"builder-id":e.id,style:oo({block:e,context:t}),[kn.getClassPropName()]:[e.id,"builder-block",e.class,(r=e.properties)==null?void 0:r.class].filter(Boolean).join(" ")};return fo({properties:n,context:t,block:e})}function ho(e){return k.jsx(En.DynamicRenderer,{TagName:e.Wrapper,attributes:er({block:e.block,context:e.context}),actionAttributes:tn({block:e.block,rootState:e.context.rootState,rootSetState:e.context.rootSetState,localState:e.context.localState,context:e.context.context,stripPrefix:!0}),children:e.children})}function go(e){return k.jsx(e.Wrapper,{...e.wrapperProps,attributes:e.includeBlockProps?{...er({block:e.block,context:e.context}),...tn({block:e.block,rootState:e.context.rootState,rootSetState:e.context.rootSetState,localState:e.context.localState,context:e.context.context})}:{},children:e.children})}const yo=({componentOptions:e,builderBlock:t,context:n,componentRef:r,includeBlockProps:o,isInteractive:s,contextValue:a})=>{const f={...e,...o?{attributes:er({block:t,context:a})}:{}};return s?{Wrapper:r,block:t,context:n,wrapperProps:e,includeBlockProps:o}:f};function Lr(e){var r;const[t,n]=Oe.useState(()=>e.isInteractive?go:e.componentRef);return k.jsx(k.Fragment,{children:e.componentRef?k.jsx(k.Fragment,{children:k.jsx(t,{...yo({componentOptions:e.componentOptions,builderBlock:e.builderBlock,context:e.context,componentRef:e.componentRef,linkComponent:e.linkComponent,includeBlockProps:e.includeBlockProps,isInteractive:e.isInteractive,contextValue:e.context}),children:(r=e.blockChildren)==null?void 0:r.map(o=>k.jsx(ze,{block:o,context:e.context,registeredComponents:e.registeredComponents,linkComponent:e.linkComponent},o.id))})}):null})}function vo(e){const[t,n]=Oe.useState(()=>e.repeatContext);return k.jsx(_r.BuilderContext.Provider,{value:t,children:k.jsx(ze,{block:e.block,context:t,registeredComponents:e.registeredComponents,linkComponent:e.linkComponent})})}function ze(e){var g,j,O;function t(){return io({block:e.block,context:e.context,registeredComponents:e.registeredComponents})}function n(){return so({block:e.block,context:e.context})}function r(){var x;return(x=e.block.repeat)!=null&&x.collection?e.block:st({block:e.block,localState:e.context.localState,rootState:e.context.rootState,rootSetState:e.context.rootSetState,context:e.context.context,shouldEvaluateBindings:!0})}function o(){var N;return e.block.tagName==="a"||((N=r().properties)==null?void 0:N.href)||r().href?e.linkComponent||"a":e.block.tagName||"div"}function s(){var P,b;if((P=e.block.repeat)!=null&&P.collection)return!!((b=n==null?void 0:n())!=null&&b.length);const x="hide"in r()?r().hide:!1;return("show"in r()?r().show:!0)&&!x}function a(){var N,P;return!((N=t==null?void 0:t())!=null&&N.component)&&!n()?(P=r().children)!=null?P:[]:[]}function f(){var x,N,P,b,$,z,pe,A,ve,Te,Ne;return{blockChildren:(x=r().children)!=null?x:[],componentRef:(N=t==null?void 0:t())==null?void 0:N.component,componentOptions:{...
|
|
28
|
+
If you registered it, is the file that registered it imported by the file that needs to render it?`)},so=({block:e,context:t})=>{const{repeat:n,...r}=e;if(!(n!=null&&n.collection))return;const o=ut({code:n.collection,localState:t.localState,rootState:t.rootState,rootSetState:t.rootSetState,context:t.context,enableCache:!0});if(!Array.isArray(o))return;const s=n.collection.split(".").pop(),a=n.itemName||(s?s+"Item":"item");return o.map((g,j)=>({context:{...t,localState:{...t.localState,$index:j,$item:g,[a]:g,[`$${a}Index`]:j}},block:r}))},qr={small:{min:320,default:321,max:640},medium:{min:641,default:642,max:991},large:{min:990,default:991,max:1200}},Fr=(e,t=qr)=>`@media (max-width: ${t[e].max}px)`,Qr=({small:e,medium:t})=>{const n=D.fastClone(qr);if(!e||!t)return n;const r=Math.floor(e/2);n.small={max:e,min:r,default:r+1};const o=n.small.max+1;n.medium={max:t,min:o,default:o+1};const s=n.medium.max+1;return n.large={max:2e3,min:s,default:s+1},n};function en(e){return k.jsx("style",{dangerouslySetInnerHTML:{__html:e.styles},"data-id":e.id})}function ao(e){function t(){const r=st({block:e.block,localState:e.context.localState,rootState:e.context.rootState,rootSetState:e.context.rootSetState,context:e.context.context,shouldEvaluateBindings:!0});return D.checkIsDefined(r.hide)?!r.hide:D.checkIsDefined(r.show)?r.show:!0}function n(){var b;const r=st({block:e.block,localState:e.context.localState,rootState:e.context.rootState,rootSetState:e.context.rootSetState,context:e.context.context,shouldEvaluateBindings:!0}),o=r.responsiveStyles,s=e.context.content,a=Qr(((b=s==null?void 0:s.meta)==null?void 0:b.breakpoints)||{}),f=o==null?void 0:o.large,g=o==null?void 0:o.medium,j=o==null?void 0:o.small,O=r.id;if(!O)return"";const x=f?Mt({className:O,styles:f}):"",N=g?Mt({className:O,styles:g,mediaQuery:Fr("medium",a)}):"",P=j?Mt({className:O,styles:j,mediaQuery:Fr("small",a)}):"";return[x,N,P].join(" ")}return k.jsx(k.Fragment,{children:n()&&t()?k.jsx(k.Fragment,{children:k.jsx(en,{id:"builderio-block",styles:n()})}):null})}function lo(e){return e.charAt(0).toUpperCase()+e.slice(1)}const uo=e=>`on${lo(e)}`,co=(e,t)=>n=>ut({code:e,context:t.context,localState:t.localState,rootState:t.rootState,rootSetState:t.rootSetState,event:n,isExpression:!1,enableCache:!0});function tn(e){var r;const t={},n=(r=e.block.actions)!=null?r:{};for(const o in n){if(!n.hasOwnProperty(o))continue;const s=n[o];let a=uo(o);if(e.stripPrefix)switch(D.TARGET){case"vue":a=a.replace("v-on:","");break;case"svelte":a=a.replace("on:","");break}t[a]=co(s,e)}return t}function fo({properties:e}){return e}const po=e=>({href:e.href});function er({block:e,context:t}){var r;const n={...po(e),...e.properties,"builder-id":e.id,style:oo({block:e,context:t}),[kn.getClassPropName()]:[e.id,"builder-block",e.class,(r=e.properties)==null?void 0:r.class].filter(Boolean).join(" ")};return fo({properties:n,context:t,block:e})}function ho(e){return k.jsx(En.DynamicRenderer,{TagName:e.Wrapper,attributes:er({block:e.block,context:e.context}),actionAttributes:tn({block:e.block,rootState:e.context.rootState,rootSetState:e.context.rootSetState,localState:e.context.localState,context:e.context.context,stripPrefix:!0}),children:e.children})}function go(e){return k.jsx(e.Wrapper,{...e.wrapperProps,attributes:e.includeBlockProps?{...er({block:e.block,context:e.context}),...tn({block:e.block,rootState:e.context.rootState,rootSetState:e.context.rootSetState,localState:e.context.localState,context:e.context.context})}:{},children:e.children})}const yo=({componentOptions:e,builderBlock:t,context:n,componentRef:r,includeBlockProps:o,isInteractive:s,contextValue:a})=>{const f={...e,...o?{attributes:er({block:t,context:a})}:{}};return s?{Wrapper:r,block:t,context:n,wrapperProps:e,includeBlockProps:o}:f};function Lr(e){var r;const[t,n]=Oe.useState(()=>e.isInteractive?go:e.componentRef);return k.jsx(k.Fragment,{children:e.componentRef?k.jsx(k.Fragment,{children:k.jsx(t,{...yo({componentOptions:e.componentOptions,builderBlock:e.builderBlock,context:e.context,componentRef:e.componentRef,linkComponent:e.linkComponent,includeBlockProps:e.includeBlockProps,isInteractive:e.isInteractive,contextValue:e.context}),children:(r=e.blockChildren)==null?void 0:r.map(o=>k.jsx(ze,{block:o,context:e.context,registeredComponents:e.registeredComponents,linkComponent:e.linkComponent},o.id))})}):null})}function vo(e){const[t,n]=Oe.useState(()=>e.repeatContext);return k.jsx(_r.BuilderContext.Provider,{value:t,children:k.jsx(ze,{block:e.block,context:t,registeredComponents:e.registeredComponents,linkComponent:e.linkComponent})})}function ze(e){var g,j,O;function t(){return io({block:e.block,context:e.context,registeredComponents:e.registeredComponents})}function n(){return so({block:e.block,context:e.context})}function r(){var x;return(x=e.block.repeat)!=null&&x.collection?e.block:st({block:e.block,localState:e.context.localState,rootState:e.context.rootState,rootSetState:e.context.rootSetState,context:e.context.context,shouldEvaluateBindings:!0})}function o(){var N;return e.block.tagName==="a"||((N=r().properties)==null?void 0:N.href)||r().href?e.linkComponent||"a":e.block.tagName||"div"}function s(){var P,b;if((P=e.block.repeat)!=null&&P.collection)return!!((b=n==null?void 0:n())!=null&&b.length);const x="hide"in r()?r().hide:!1;return("show"in r()?r().show:!0)&&!x}function a(){var N,P;return!((N=t==null?void 0:t())!=null&&N.component)&&!n()?(P=r().children)!=null?P:[]:[]}function f(){var x,N,P,b,$,z,pe,A,ve,Te,Ne;return{blockChildren:(x=r().children)!=null?x:[],componentRef:(N=t==null?void 0:t())==null?void 0:N.component,componentOptions:{...On(r()),builderContext:e.context,...((P=t==null?void 0:t())==null?void 0:P.name)==="Core:Button"||((b=t==null?void 0:t())==null?void 0:b.name)==="Symbol"||(($=t==null?void 0:t())==null?void 0:$.name)==="Columns"||((z=t==null?void 0:t())==null?void 0:z.name)==="Form:Form"?{builderLinkComponent:e.linkComponent}:{},...((pe=t==null?void 0:t())==null?void 0:pe.name)==="Symbol"||((A=t==null?void 0:t())==null?void 0:A.name)==="Columns"||((ve=t==null?void 0:t())==null?void 0:ve.name)==="Form:Form"?{builderComponents:e.registeredComponents}:{}},context:e.context,linkComponent:e.linkComponent,registeredComponents:e.registeredComponents,builderBlock:r(),includeBlockProps:((Te=t==null?void 0:t())==null?void 0:Te.noWrap)===!0,isInteractive:!((Ne=t==null?void 0:t())!=null&&Ne.isRSC)}}return Oe.useEffect(()=>{const x=r().id,N=r().animations;N&&x&&zn(N.filter(P=>P.trigger!=="hover").map(P=>({...P,elementId:x})))},[]),k.jsx(k.Fragment,{children:s()?k.jsxs(k.Fragment,{children:[k.jsx(ao,{block:e.block,context:e.context}),(g=t==null?void 0:t())!=null&&g.noWrap?k.jsx(k.Fragment,{children:k.jsx(Lr,{componentRef:f().componentRef,componentOptions:f().componentOptions,blockChildren:f().blockChildren,context:f().context,registeredComponents:f().registeredComponents,linkComponent:f().linkComponent,builderBlock:f().builderBlock,includeBlockProps:f().includeBlockProps,isInteractive:f().isInteractive})}):k.jsx(k.Fragment,{children:n()?k.jsx(k.Fragment,{children:(O=n())==null?void 0:O.map((x,N)=>k.jsx(vo,{repeatContext:x.context,block:x.block,registeredComponents:e.registeredComponents,linkComponent:e.linkComponent},N))}):k.jsx(k.Fragment,{children:k.jsxs(ho,{Wrapper:o(),block:r(),context:e.context,linkComponent:e.linkComponent,children:[k.jsx(Lr,{componentRef:f().componentRef,componentOptions:f().componentOptions,blockChildren:f().blockChildren,context:f().context,registeredComponents:f().registeredComponents,linkComponent:f().linkComponent,builderBlock:f().builderBlock,includeBlockProps:f().includeBlockProps,isInteractive:f().isInteractive}),(j=a())==null?void 0:j.map(x=>k.jsx(ze,{block:x,registeredComponents:e.registeredComponents,linkComponent:e.linkComponent,context:e.context},x.id))]})})})]}):null})}function mo(e){function t(){var o;return"builder-blocks"+((o=e.blocks)!=null&&o.length?"":" no-blocks")}function n(){var o,s;D.isEditing()&&!((o=e.blocks)!=null&&o.length)&&((s=window.parent)==null||s.postMessage({type:"builder.clickEmptyBlocks",data:{parentElementId:e.parent,dataPath:e.path}},"*"))}function r(){var o,s;D.isEditing()&&!((o=e.blocks)!=null&&o.length)&&((s=window.parent)==null||s.postMessage({type:"builder.hoverEmptyBlocks",data:{parentElementId:e.parent,dataPath:e.path}},"*"))}return k.jsxs(k.Fragment,{children:[k.jsx(e.BlocksWrapper,{className:t()+" props-blocks-wrapper-7354e098","builder-path":e.path,"builder-parent-id":e.parent,style:e.styleProp,onClick:o=>n(),onMouseEnter:o=>r(),onKeyPress:o=>n(),...e.BlocksWrapperProps,children:e.children}),k.jsx("style",{children:`.props-blocks-wrapper-7354e098 {
|
|
29
29
|
display: flex;
|
|
30
30
|
flex-direction: column;
|
|
31
31
|
align-items: stretch;
|
|
32
|
-
}`})]})}function rn(e){var r,o,s;const t=Oe.useContext(_r.BuilderContext),n=Oe.useContext(
|
|
32
|
+
}`})]})}function rn(e){var r,o,s;const t=Oe.useContext(_r.BuilderContext),n=Oe.useContext($r);return k.jsx(mo,{blocks:e.blocks,parent:e.parent,path:e.path,styleProp:e.styleProp,BlocksWrapper:((r=e.context)==null?void 0:r.BlocksWrapper)||t.BlocksWrapper,BlocksWrapperProps:((o=e.context)==null?void 0:o.BlocksWrapperProps)||t.BlocksWrapperProps,children:e.blocks?k.jsx(k.Fragment,{children:(s=e.blocks)==null?void 0:s.map(a=>k.jsx(ze,{block:a,linkComponent:e.linkComponent,context:e.context||t,registeredComponents:e.registeredComponents||n.registeredComponents},a.id))}):null})}const xo=Object.freeze(Object.defineProperty({__proto__:null,default:rn},Symbol.toStringTag,{value:"Module"}));exports.Block=ze;exports.Blocks=rn;exports.ComponentsContext=$r;exports.InlinedStyles=en;exports.blocks=xo;exports.evaluate=ut;exports.getSizesForBreakpoints=Qr;exports.mapStyleObjToStrIfNeeded=zr;exports.set=Lt;exports.triggerAnimation=Yr;
|
|
@@ -7,19 +7,12 @@ import { BuilderContext as Hr } from "./blocks-exports.mjs";
|
|
|
7
7
|
import { isEditing as Ut, isBrowser as Ft, getUserAttributes as On, logger as Xe, checkIsDefined as it, fastClone as Xr, TARGET as Kr } from "./server-entry-d46a218d.js";
|
|
8
8
|
import { getClassPropName as An } from "./get-class-prop-name-859a7f60.js";
|
|
9
9
|
import { DynamicRenderer as In } from "./dynamic-renderer-96ba4e48.js";
|
|
10
|
-
const
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
/**
|
|
17
|
-
* Our built-in components frequently make use of the block, so we provide all of it under `builderBlock`
|
|
18
|
-
*/
|
|
19
|
-
builderBlock: e
|
|
20
|
-
};
|
|
21
|
-
}
|
|
22
|
-
const Jr = ({
|
|
10
|
+
const Jr = (e, t, n) => {
|
|
11
|
+
if (Object(e) !== e)
|
|
12
|
+
return e;
|
|
13
|
+
const r = Array.isArray(t) ? t : t.toString().match(/[^.[\]]+/g);
|
|
14
|
+
return r.slice(0, -1).reduce((o, s, a) => Object(o[s]) === o[s] ? o[s] : o[s] = Math.abs(Number(r[a + 1])) >> 0 === +r[a + 1] ? [] : {}, e)[r[r.length - 1]] = n, e;
|
|
15
|
+
}, Yr = ({
|
|
23
16
|
builder: e,
|
|
24
17
|
context: t,
|
|
25
18
|
event: n,
|
|
@@ -31,14 +24,26 @@ const Jr = ({
|
|
|
31
24
|
builder: e,
|
|
32
25
|
context: t,
|
|
33
26
|
event: n
|
|
34
|
-
}),
|
|
27
|
+
}), bn = () => ({
|
|
35
28
|
isEditing: Ut(),
|
|
36
29
|
isBrowser: Ft(),
|
|
37
30
|
isServer: !Ft(),
|
|
38
31
|
getUserAttributes: () => On()
|
|
39
|
-
}),
|
|
32
|
+
}), Tn = (e, {
|
|
40
33
|
isExpression: t = !0
|
|
41
|
-
}) => /* we disable this for cases where we definitely don't want a return */ t && !(e.includes(";") || e.includes(" return ") || e.trim().startsWith("return ")) ? `return (${e});` : e,
|
|
34
|
+
}) => /* we disable this for cases where we definitely don't want a return */ t && !(e.includes(";") || e.includes(" return ") || e.trim().startsWith("return ")) ? `return (${e});` : e, Nn = Cn({ registeredComponents: {} });
|
|
35
|
+
function Pn(e) {
|
|
36
|
+
var t;
|
|
37
|
+
return {
|
|
38
|
+
...(t = e.component) == null ? void 0 : t.options,
|
|
39
|
+
...e.options,
|
|
40
|
+
/**
|
|
41
|
+
* Our built-in components frequently make use of the block, so we provide all of it under `builderBlock`
|
|
42
|
+
*/
|
|
43
|
+
builderBlock: e
|
|
44
|
+
};
|
|
45
|
+
}
|
|
46
|
+
const Rn = ({
|
|
42
47
|
code: e,
|
|
43
48
|
builder: t,
|
|
44
49
|
context: n,
|
|
@@ -47,11 +52,11 @@ const Jr = ({
|
|
|
47
52
|
rootSetState: s,
|
|
48
53
|
rootState: a
|
|
49
54
|
}) => {
|
|
50
|
-
const f =
|
|
55
|
+
const f = Yr({
|
|
51
56
|
builder: t,
|
|
52
57
|
context: n,
|
|
53
58
|
event: r,
|
|
54
|
-
state:
|
|
59
|
+
state: Zr({
|
|
55
60
|
rootState: a,
|
|
56
61
|
localState: o,
|
|
57
62
|
rootSetState: s
|
|
@@ -59,7 +64,7 @@ const Jr = ({
|
|
|
59
64
|
});
|
|
60
65
|
return new Function(...f.map(([g]) => g), e)(...f.map(([, g]) => g));
|
|
61
66
|
};
|
|
62
|
-
function
|
|
67
|
+
function Zr({
|
|
63
68
|
rootState: e,
|
|
64
69
|
localState: t,
|
|
65
70
|
rootSetState: n
|
|
@@ -69,7 +74,7 @@ function Yr({
|
|
|
69
74
|
if (t && o in t)
|
|
70
75
|
return t[o];
|
|
71
76
|
const s = r[o];
|
|
72
|
-
return typeof s == "object" && s !== null ?
|
|
77
|
+
return typeof s == "object" && s !== null ? Zr({
|
|
73
78
|
rootState: s,
|
|
74
79
|
localState: void 0,
|
|
75
80
|
rootSetState: n ? (a) => {
|
|
@@ -84,12 +89,6 @@ function Yr({
|
|
|
84
89
|
}
|
|
85
90
|
});
|
|
86
91
|
}
|
|
87
|
-
const Zr = (e, t, n) => {
|
|
88
|
-
if (Object(e) !== e)
|
|
89
|
-
return e;
|
|
90
|
-
const r = Array.isArray(t) ? t : t.toString().match(/[^.[\]]+/g);
|
|
91
|
-
return r.slice(0, -1).reduce((o, s, a) => Object(o[s]) === o[s] ? o[s] : o[s] = Math.abs(Number(r[a + 1])) >> 0 === +r[a + 1] ? [] : {}, e)[r[r.length - 1]] = n, e;
|
|
92
|
-
};
|
|
93
92
|
var b, Mn = function(e) {
|
|
94
93
|
function t(i) {
|
|
95
94
|
return 48 > i ? i === 36 : 58 > i ? !0 : 65 > i ? !1 : 91 > i ? !0 : 97 > i ? i === 95 : 123 > i ? !0 : 170 <= i && Sn.test(String.fromCharCode(i));
|
|
@@ -2523,7 +2522,7 @@ const Zn = (e) => e.split(`
|
|
|
2523
2522
|
const f = {
|
|
2524
2523
|
...r,
|
|
2525
2524
|
...o
|
|
2526
|
-
}, g =
|
|
2525
|
+
}, g = Yr({
|
|
2527
2526
|
builder: e,
|
|
2528
2527
|
context: t,
|
|
2529
2528
|
event: n,
|
|
@@ -2545,7 +2544,7 @@ function theFunction() {
|
|
|
2545
2544
|
}
|
|
2546
2545
|
theFunction();
|
|
2547
2546
|
`, N = (I, W) => {
|
|
2548
|
-
const z =
|
|
2547
|
+
const z = Jr(f, I, W);
|
|
2549
2548
|
s == null || s(z);
|
|
2550
2549
|
}, P = function(I, W) {
|
|
2551
2550
|
g.forEach(([z, pe]) => {
|
|
@@ -2608,10 +2607,10 @@ function qt({
|
|
|
2608
2607
|
return;
|
|
2609
2608
|
}
|
|
2610
2609
|
const g = {
|
|
2611
|
-
code:
|
|
2610
|
+
code: Tn(e, {
|
|
2612
2611
|
isExpression: a
|
|
2613
2612
|
}),
|
|
2614
|
-
builder:
|
|
2613
|
+
builder: bn(),
|
|
2615
2614
|
context: t,
|
|
2616
2615
|
event: s,
|
|
2617
2616
|
rootSetState: o,
|
|
@@ -2664,7 +2663,7 @@ const to = ({
|
|
|
2664
2663
|
context: t,
|
|
2665
2664
|
enableCache: !0
|
|
2666
2665
|
});
|
|
2667
|
-
|
|
2666
|
+
Jr(a, f, C);
|
|
2668
2667
|
}
|
|
2669
2668
|
return a;
|
|
2670
2669
|
};
|
|
@@ -3231,7 +3230,7 @@ function ut(e) {
|
|
|
3231
3230
|
blockChildren: (w = r().children) != null ? w : [],
|
|
3232
3231
|
componentRef: (N = t == null ? void 0 : t()) == null ? void 0 : N.component,
|
|
3233
3232
|
componentOptions: {
|
|
3234
|
-
...
|
|
3233
|
+
...Pn(r()),
|
|
3235
3234
|
builderContext: e.context,
|
|
3236
3235
|
...((P = t == null ? void 0 : t()) == null ? void 0 : P.name) === "Core:Button" || ((I = t == null ? void 0 : t()) == null ? void 0 : I.name) === "Symbol" || ((W = t == null ? void 0 : t()) == null ? void 0 : W.name) === "Columns" || ((z = t == null ? void 0 : t()) == null ? void 0 : z.name) === "Form:Form" ? {
|
|
3237
3236
|
builderLinkComponent: e.linkComponent
|
|
@@ -3372,7 +3371,7 @@ function Io(e) {
|
|
|
3372
3371
|
}
|
|
3373
3372
|
function bo(e) {
|
|
3374
3373
|
var r, o, s;
|
|
3375
|
-
const t = Br(Hr), n = Br(
|
|
3374
|
+
const t = Br(Hr), n = Br(Nn);
|
|
3376
3375
|
return /* @__PURE__ */ T(
|
|
3377
3376
|
Io,
|
|
3378
3377
|
{
|
|
@@ -3402,12 +3401,12 @@ const Uo = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
3402
3401
|
export {
|
|
3403
3402
|
ut as Block,
|
|
3404
3403
|
bo as Blocks,
|
|
3405
|
-
|
|
3404
|
+
Nn as ComponentsContext,
|
|
3406
3405
|
vo as InlinedStyles,
|
|
3407
3406
|
Uo as blocks,
|
|
3408
3407
|
qt as evaluate,
|
|
3409
3408
|
yo as getSizesForBreakpoints,
|
|
3410
3409
|
po as mapStyleObjToStrIfNeeded,
|
|
3411
|
-
|
|
3410
|
+
Jr as set,
|
|
3412
3411
|
io as triggerAnimation
|
|
3413
3412
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react");require("./server-entry-00891f33.cjs");const t=e.lazy(()=>Promise.resolve().then(()=>require("./button-58695538.cjs"))),r=e.lazy(()=>Promise.resolve().then(()=>require("./columns-
|
|
1
|
+
"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react");require("./server-entry-00891f33.cjs");const t=e.lazy(()=>Promise.resolve().then(()=>require("./button-58695538.cjs"))),r=e.lazy(()=>Promise.resolve().then(()=>require("./columns-88c413d0.cjs"))),n=e.lazy(()=>Promise.resolve().then(()=>require("./fragment-b6e3a326.cjs"))),s=e.lazy(()=>Promise.resolve().then(()=>require("./image-7e1361ce.cjs"))),i=e.lazy(()=>Promise.resolve().then(()=>require("./section-d655ea14.cjs"))),l=e.lazy(()=>Promise.resolve().then(()=>require("./symbol-636383eb.cjs"))),c=e.lazy(()=>Promise.resolve().then(()=>require("./text-e6dbb721.cjs"))),a=e.lazy(()=>Promise.resolve().then(()=>require("./video-64014cc4.cjs"))),u=e.lazy(()=>Promise.resolve().then(()=>require("./blocks-0397d1b3.cjs")).then(o=>o.blocks)),m=e.lazy(()=>Promise.resolve().then(()=>require("./content-variants-b0cbabea.cjs"))),y=e.createContext({content:null,context:{},localState:void 0,rootSetState(){},rootState:{},apiKey:null,apiVersion:void 0,componentInfos:{},inheritedStyles:{},BlocksWrapper:"div",BlocksWrapperProps:{}});exports.Blocks=u;exports.BuilderContext=y;exports.Button=t;exports.Columns=r;exports.Content=m;exports.Fragment=n;exports.Image=s;exports.Section=i;exports.Symbol=l;exports.Text=c;exports.Video=a;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { lazy as t, createContext as n } from "react";
|
|
3
3
|
import "./server-entry-d46a218d.js";
|
|
4
|
-
const i = t(() => import("./button-14d13356.js")), r = t(() => import("./columns-
|
|
4
|
+
const i = t(() => import("./button-14d13356.js")), r = t(() => import("./columns-41560f8a.js")), a = t(() => import("./fragment-1492bc7f.js")), c = t(() => import("./image-2cc909d9.js")), m = t(() => import("./section-d83e2dd3.js")), p = t(() => import("./symbol-324dadc8.js")), l = t(() => import("./text-5915f038.js")), u = t(() => import("./video-d02ff89b.js")), d = t(() => import("./blocks-055d1c68.js").then((o) => o.blocks)), x = t(() => import("./content-variants-8d6bee85.js")), S = n({
|
|
5
5
|
content: null,
|
|
6
6
|
context: {},
|
|
7
7
|
localState: void 0,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsxs as g, Fragment as y, jsx as o } from "react/jsx-runtime";
|
|
2
2
|
import { useState as a } from "react";
|
|
3
|
-
import { InlinedStyles as w, mapStyleObjToStrIfNeeded as $, Blocks as B, getSizesForBreakpoints as z } from "./blocks-
|
|
3
|
+
import { InlinedStyles as w, mapStyleObjToStrIfNeeded as $, Blocks as B, getSizesForBreakpoints as z } from "./blocks-055d1c68.js";
|
|
4
4
|
import { DynamicRenderer as L } from "./dynamic-renderer-96ba4e48.js";
|
|
5
5
|
import { getClassPropName as W } from "./get-class-prop-name-859a7f60.js";
|
|
6
6
|
import "./blocks-exports.mjs";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("react/jsx-runtime"),s=require("react"),a=require("./blocks-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("react/jsx-runtime"),s=require("react"),a=require("./blocks-0397d1b3.cjs"),w=require("./dynamic-renderer-1c9f24c0.cjs"),$=require("./get-class-prop-name-f1301669.cjs");require("./blocks-exports.cjs");require("./server-entry-00891f33.cjs");function j(e){var f;const[u,p]=s.useState(()=>typeof e.space=="number"?e.space||0:20),[o,B]=s.useState(()=>e.columns||[]),[d,q]=s.useState(()=>e.stackColumnsAt||"tablet");function S(t){var n;return((n=o[t])==null?void 0:n.width)||100/o.length}function y(t){const n=u*(o.length-1)/o.length;return`calc(${S(t)}% - ${n}px)`}function c({stackedStyle:t,desktopStyle:n}){return d==="tablet"?t:n}function m({stackedStyle:t,desktopStyle:n}){return d==="never"?n:t}const[b,z]=s.useState(()=>e.stackColumnsAt==="never"?"row":e.reverseColumnsWhenStacked?"column-reverse":"column");function x(){return{"--flex-dir":b,"--flex-dir-tablet":c({stackedStyle:b,desktopStyle:"row"})}}function C(t){const n=t===0?0:u,l=y(t),r=`${n}px`,g="100%",h=0;return{...{display:"flex",flexDirection:"column",alignItems:"stretch"},width:l,["marginLeft"]:r,"--column-width-mobile":m({stackedStyle:g,desktopStyle:l}),"--column-margin-left-mobile":m({stackedStyle:h,desktopStyle:r}),"--column-width-tablet":c({stackedStyle:g,desktopStyle:l}),"--column-margin-left-tablet":c({stackedStyle:h,desktopStyle:r})}}function k(t){var l,r;return a.getSizesForBreakpoints(((r=(l=e.builderContext.content)==null?void 0:l.meta)==null?void 0:r.breakpoints)||{})[t].max}function v(){return`
|
|
2
2
|
@media (max-width: ${k("medium")}px) {
|
|
3
3
|
.${e.builderBlock.id}-breakpoints {
|
|
4
4
|
flex-direction: var(--flex-dir-tablet);
|
|
@@ -2,7 +2,7 @@ import { jsx as g, Fragment as R, jsxs as U } from "react/jsx-runtime";
|
|
|
2
2
|
import { lazy as C, useRef as ne, useState as I, useEffect as S } from "react";
|
|
3
3
|
import { isBrowser as $, TARGET as Q, isEditing as P, registerInsertMenu as ae, setupBrowserForEditing as ie, createRegisterComponentMessage as oe, getDefaultCanTrack as A, _track as B, isPreviewing as re, fetchOneEntry as se, logger as le, createEditorListener as de, fetch as ce, fastClone as ue, serializeComponentInfo as _, handleABTestingSync as me } from "./server-entry-d46a218d.js";
|
|
4
4
|
import { Video as pe, Button as ge, Columns as fe, Fragment as he, Image as be, Section as ye, Symbol as xe, Text as ve, BuilderContext as Se } from "./blocks-exports.mjs";
|
|
5
|
-
import { triggerAnimation as Ie, evaluate as M, InlinedStyles as G, ComponentsContext as ke, Blocks as Te } from "./blocks-
|
|
5
|
+
import { triggerAnimation as Ie, evaluate as M, InlinedStyles as G, ComponentsContext as ke, Blocks as Te } from "./blocks-055d1c68.js";
|
|
6
6
|
import "./get-class-prop-name-859a7f60.js";
|
|
7
7
|
import "./dynamic-renderer-96ba4e48.js";
|
|
8
8
|
const Ce = {
|
|
@@ -397,7 +397,7 @@ const Ce = {
|
|
|
397
397
|
required: !0,
|
|
398
398
|
defaultValue: "children"
|
|
399
399
|
}]
|
|
400
|
-
}, We = C(() => import("./slot-
|
|
400
|
+
}, We = C(() => import("./slot-6b53b8c4.js")), Ae = {
|
|
401
401
|
name: "Symbol",
|
|
402
402
|
noWrap: !0,
|
|
403
403
|
static: !0,
|
|
@@ -726,7 +726,7 @@ const Ce = {
|
|
|
726
726
|
}
|
|
727
727
|
}
|
|
728
728
|
}]
|
|
729
|
-
}, qe = C(() => import("./form-
|
|
729
|
+
}, qe = C(() => import("./form-56a68fe5.js")), Ne = {
|
|
730
730
|
name: "Form:Input",
|
|
731
731
|
image: "https://cdn.builder.io/api/v1/image/assets%2FIsxPKMo2gPRRKeakUztj1D6uqed2%2Fad6f37889d9e40bbbbc72cdb5875d6ca",
|
|
732
732
|
inputs: [
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const d=require("react/jsx-runtime"),r=require("react"),l=require("./server-entry-00891f33.cjs"),k=require("./blocks-exports.cjs"),w=require("./blocks-87a3568e.cjs");require("./get-class-prop-name-f1301669.cjs");require("./dynamic-renderer-1c9f24c0.cjs");const O={name:"Core:Button",image:"https://cdn.builder.io/api/v1/image/assets%2FIsxPKMo2gPRRKeakUztj1D6uqed2%2F81a15681c3e74df09677dfc57a615b13",defaultStyles:{appearance:"none",paddingTop:"15px",paddingBottom:"15px",paddingLeft:"25px",paddingRight:"25px",backgroundColor:"#000000",color:"white",borderRadius:"4px",textAlign:"center",cursor:"pointer"},inputs:[{name:"text",type:"text",defaultValue:"Click me!",bubble:!0},{name:"link",type:"url",bubble:!0},{name:"openLinkInNewTab",type:"boolean",defaultValue:!1,friendlyName:"Open link in new tab"}],static:!0,noWrap:!0},J={name:"Columns",isRSC:!0,inputs:[{name:"columns",type:"array",broadcast:!0,subFields:[{name:"blocks",type:"array",hideFromUI:!0,defaultValue:[{"@type":"@builder.io/sdk:Element",responsiveStyles:{large:{display:"flex",flexDirection:"column",alignItems:"stretch",flexShrink:"0",position:"relative",marginTop:"30px",textAlign:"center",lineHeight:"normal",height:"auto",minHeight:"20px",minWidth:"20px",overflow:"hidden"}},component:{name:"Image",options:{image:"https://builder.io/api/v1/image/assets%2Fpwgjf0RoYWbdnJSbpBAjXNRMe9F2%2Ffb27a7c790324294af8be1c35fe30f4d",backgroundPosition:"center",backgroundSize:"cover",aspectRatio:.7004048582995948}}},{"@type":"@builder.io/sdk:Element",responsiveStyles:{large:{display:"flex",flexDirection:"column",alignItems:"stretch",flexShrink:"0",position:"relative",marginTop:"30px",textAlign:"center",lineHeight:"normal",height:"auto"}},component:{name:"Text",options:{text:"<p>Enter some text...</p>"}}}]},{name:"width",type:"number",hideFromUI:!0,helperText:"Width %, e.g. set to 50 to fill half of the space"},{name:"link",type:"url",helperText:"Optionally set a url that clicking this column will link to"}],defaultValue:[{blocks:[{"@type":"@builder.io/sdk:Element",responsiveStyles:{large:{display:"flex",flexDirection:"column",alignItems:"stretch",flexShrink:"0",position:"relative",marginTop:"30px",textAlign:"center",lineHeight:"normal",height:"auto",minHeight:"20px",minWidth:"20px",overflow:"hidden"}},component:{name:"Image",options:{image:"https://builder.io/api/v1/image/assets%2Fpwgjf0RoYWbdnJSbpBAjXNRMe9F2%2Ffb27a7c790324294af8be1c35fe30f4d",backgroundPosition:"center",backgroundSize:"cover",aspectRatio:.7004048582995948}}},{"@type":"@builder.io/sdk:Element",responsiveStyles:{large:{display:"flex",flexDirection:"column",alignItems:"stretch",flexShrink:"0",position:"relative",marginTop:"30px",textAlign:"center",lineHeight:"normal",height:"auto"}},component:{name:"Text",options:{text:"<p>Enter some text...</p>"}}}]},{blocks:[{"@type":"@builder.io/sdk:Element",responsiveStyles:{large:{display:"flex",flexDirection:"column",alignItems:"stretch",flexShrink:"0",position:"relative",marginTop:"30px",textAlign:"center",lineHeight:"normal",height:"auto",minHeight:"20px",minWidth:"20px",overflow:"hidden"}},component:{name:"Image",options:{image:"https://builder.io/api/v1/image/assets%2Fpwgjf0RoYWbdnJSbpBAjXNRMe9F2%2Ffb27a7c790324294af8be1c35fe30f4d",backgroundPosition:"center",backgroundSize:"cover",aspectRatio:.7004048582995948}}},{"@type":"@builder.io/sdk:Element",responsiveStyles:{large:{display:"flex",flexDirection:"column",alignItems:"stretch",flexShrink:"0",position:"relative",marginTop:"30px",textAlign:"center",lineHeight:"normal",height:"auto"}},component:{name:"Text",options:{text:"<p>Enter some text...</p>"}}}]}],onChange:e=>{function t(){n.forEach(a=>{a.delete("width")})}const n=e.get("columns");Array.isArray(n)&&n.find(m=>m.get("width"))&&(n.find(h=>!h.get("width"))||n.reduce((o,g)=>o+g.get("width"),0)!==100)&&t()}},{name:"space",type:"number",defaultValue:20,helperText:"Size of gap between columns",advanced:!0},{name:"stackColumnsAt",type:"string",defaultValue:"tablet",helperText:"Convert horizontal columns to vertical at what device size",enum:["tablet","mobile","never"],advanced:!0},{name:"reverseColumnsWhenStacked",type:"boolean",defaultValue:!1,helperText:"When stacking columns for mobile devices, reverse the ordering",advanced:!0}]},Y={name:"Fragment",static:!0,hidden:!0,canHaveChildren:!0,noWrap:!0},G={name:"Image",static:!0,image:"https://firebasestorage.googleapis.com/v0/b/builder-3b0a2.appspot.com/o/images%2Fbaseline-insert_photo-24px.svg?alt=media&token=4e5d0ef4-f5e8-4e57-b3a9-38d63a9b9dc4",defaultStyles:{position:"relative",minHeight:"20px",minWidth:"20px",overflow:"hidden"},canHaveChildren:!0,inputs:[{name:"image",type:"file",bubble:!0,allowedFileTypes:["jpeg","jpg","png","svg"],required:!0,defaultValue:"https://cdn.builder.io/api/v1/image/assets%2FYJIGb4i01jvw0SRdL5Bt%2F72c80f114dc149019051b6852a9e3b7a",onChange:e=>{e.delete("srcset"),e.delete("noWebp");function n(i,o=6e4){return new Promise((g,I)=>{const x=document.createElement("img");let V=!1;x.onload=()=>{V=!0,g(x)},x.addEventListener("error",T=>{console.warn("Image load failed",T.error),I(T.error)}),x.src=i,setTimeout(()=>{V||I(new Error("Image load timed out"))},o)})}function a(i){return Math.round(i*1e3)/1e3}const m=e.get("image"),h=e.get("aspectRatio");if(fetch(m).then(i=>i.blob()).then(i=>{i.type.includes("svg")&&e.set("noWebp",!0)}),m&&(!h||h===.7041))return n(m).then(i=>{const o=e.get("aspectRatio");e.get("image")===m&&(!o||o===.7041)&&i.width&&i.height&&(e.set("aspectRatio",a(i.height/i.width)),e.set("height",i.height),e.set("width",i.width))})}},{name:"backgroundSize",type:"text",defaultValue:"cover",enum:[{label:"contain",value:"contain",helperText:"The image should never get cropped"},{label:"cover",value:"cover",helperText:"The image should fill it's box, cropping when needed"}]},{name:"backgroundPosition",type:"text",defaultValue:"center",enum:["center","top","left","right","bottom","top left","top right","bottom left","bottom right"]},{name:"altText",type:"string",helperText:"Text to display when the user has images off"},{name:"height",type:"number",hideFromUI:!0},{name:"width",type:"number",hideFromUI:!0},{name:"sizes",type:"string",hideFromUI:!0},{name:"srcset",type:"string",hideFromUI:!0},{name:"lazy",type:"boolean",defaultValue:!0,hideFromUI:!0},{name:"fitContent",type:"boolean",helperText:"When child blocks are provided, fit to them instead of using the image's aspect ratio",defaultValue:!0},{name:"aspectRatio",type:"number",helperText:"This is the ratio of height/width, e.g. set to 1.5 for a 300px wide and 200px tall photo. Set to 0 to not force the image to maintain it's aspect ratio",advanced:!0,defaultValue:.7041}]},Q={name:"Core:Section",static:!0,image:"https://cdn.builder.io/api/v1/image/assets%2FIsxPKMo2gPRRKeakUztj1D6uqed2%2F682efef23ace49afac61748dd305c70a",inputs:[{name:"maxWidth",type:"number",defaultValue:1200},{name:"lazyLoad",type:"boolean",defaultValue:!1,advanced:!0,description:"Only render this section when in view"}],defaultStyles:{paddingLeft:"20px",paddingRight:"20px",paddingTop:"50px",paddingBottom:"50px",marginTop:"0px",width:"100vw",marginLeft:"calc(50% - 50vw)"},canHaveChildren:!0,defaultChildren:[{"@type":"@builder.io/sdk:Element",responsiveStyles:{large:{textAlign:"center"}},component:{name:"Text",options:{text:"<p><b>I am a section! My content keeps from getting too wide, so that it's easy to read even on big screens.</b></p><p>Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur</p>"}}}]},X={name:"Slot",isRSC:!0,description:"Allow child blocks to be inserted into this content when used as a Symbol",docsLink:"https://www.builder.io/c/docs/symbols-with-blocks",image:"https://cdn.builder.io/api/v1/image/assets%2FYJIGb4i01jvw0SRdL5Bt%2F3aad6de36eae43b59b52c85190fdef56",inputs:[{name:"name",type:"string",required:!0,defaultValue:"children"}]},Z=r.lazy(()=>Promise.resolve().then(()=>require("./slot-bb84f342.cjs"))),ee={name:"Symbol",noWrap:!0,static:!0,isRSC:!0,inputs:[{name:"symbol",type:"uiSymbol"},{name:"dataOnly",helperText:"Make this a data symbol that doesn't display any UI",type:"boolean",defaultValue:!1,advanced:!0,hideFromUI:!0},{name:"inheritState",helperText:"Inherit the parent component state and data",type:"boolean",defaultValue:!1,advanced:!0},{name:"renderToLiquid",helperText:"Render this symbols contents to liquid. Turn off to fetch with javascript and use custom targeting",type:"boolean",defaultValue:!1,advanced:!0,hideFromUI:!0},{name:"useChildren",hideFromUI:!0,type:"boolean"}]},te={name:"Text",static:!0,isRSC:!0,image:"https://firebasestorage.googleapis.com/v0/b/builder-3b0a2.appspot.com/o/images%2Fbaseline-text_fields-24px%20(1).svg?alt=media&token=12177b73-0ee3-42ca-98c6-0dd003de1929",inputs:[{name:"text",type:"html",required:!0,autoFocus:!0,bubble:!0,defaultValue:"Enter some text..."}],defaultStyles:{lineHeight:"normal",height:"auto",textAlign:"center"}},ne={name:"Custom Code",static:!0,requiredPermissions:["editCode"],inputs:[{name:"code",type:"html",required:!0,defaultValue:"<p>Hello there, I am custom HTML code!</p>",code:!0},{name:"replaceNodes",type:"boolean",helperText:"Preserve server rendered dom nodes",advanced:!0},{name:"scriptsClientOnly",type:"boolean",defaultValue:!1,helperText:"Only print and run scripts on the client. Important when scripts influence DOM that could be replaced when client loads",advanced:!0}]},ae=r.lazy(()=>Promise.resolve().then(()=>require("./custom-code-6d9730ff.cjs"))),ie={name:"Embed",static:!0,inputs:[{name:"url",type:"url",required:!0,defaultValue:"",helperText:"e.g. enter a youtube url, google map, etc",onChange:e=>{const t=e.get("url");if(t)return e.set("content","Loading..."),fetch(`https://iframe.ly/api/iframely?url=${t}&api_key=ae0e60e78201a3f2b0de4b`).then(a=>a.json()).then(a=>{e.get("url")===t&&(a.html?e.set("content",a.html):e.set("content","Invalid url, please try another"))}).catch(a=>{e.set("content","There was an error embedding this URL, please try again or another URL")});e.delete("content")}},{name:"content",type:"html",defaultValue:'<div style="padding: 20px; text-align: center">(Choose an embed URL)<div>',hideFromUI:!0}]},oe=r.lazy(()=>Promise.resolve().then(()=>require("./embed-32bdd007.cjs"))),re={name:"Form:Form",defaults:{responsiveStyles:{large:{marginTop:"15px",paddingBottom:"15px"}}},image:"https://cdn.builder.io/api/v1/image/assets%2FIsxPKMo2gPRRKeakUztj1D6uqed2%2Fef36d2a846134910b64b88e6d18c5ca5",inputs:[{name:"sendSubmissionsTo",type:"string",enum:[{label:"Send to email",value:"email",helperText:"Send form submissions to the email address of your choosing"},{label:"Custom",value:"custom",helperText:"Handle where the form requests go manually with a little code, e.g. to your own custom backend"}],defaultValue:"email"},{name:"sendSubmissionsToEmail",type:"string",required:!0,defaultValue:"your@email.com",showIf:'options.get("sendSubmissionsTo") === "email"'},{name:"sendWithJs",type:"boolean",helperText:"Set to false to use basic html form action",defaultValue:!0,showIf:'options.get("sendSubmissionsTo") === "custom"'},{name:"name",type:"string",defaultValue:"My form"},{name:"action",type:"string",helperText:"URL to send the form data to",showIf:'options.get("sendSubmissionsTo") === "custom"'},{name:"contentType",type:"string",defaultValue:"application/json",advanced:!0,enum:["application/json","multipart/form-data","application/x-www-form-urlencoded"],showIf:'options.get("sendSubmissionsTo") === "custom" && options.get("sendWithJs") === true'},{name:"method",type:"string",showIf:'options.get("sendSubmissionsTo") === "custom"',defaultValue:"POST",advanced:!0},{name:"previewState",type:"string",enum:["unsubmitted","sending","success","error"],defaultValue:"unsubmitted",helperText:'Choose a state to edit, e.g. choose "success" to show what users see on success and edit the message',showIf:'options.get("sendSubmissionsTo") !== "zapier" && options.get("sendWithJs") === true'},{name:"successUrl",type:"url",helperText:"Optional URL to redirect the user to on form submission success",showIf:'options.get("sendSubmissionsTo") !== "zapier" && options.get("sendWithJs") === true'},{name:"resetFormOnSubmit",type:"boolean",showIf:"options.get('sendSubmissionsTo') === 'custom' && options.get('sendWithJs') === true",advanced:!0},{name:"successMessage",type:"uiBlocks",hideFromUI:!0,defaultValue:[{"@type":"@builder.io/sdk:Element",responsiveStyles:{large:{marginTop:"10px"}},component:{name:"Text",options:{text:"<span>Thanks!</span>"}}}]},{name:"validate",type:"boolean",defaultValue:!0,advanced:!0},{name:"errorMessagePath",type:"text",advanced:!0,helperText:'Path to where to get the error message from in a JSON response to display to the user, e.g. "error.message" for a response like { "error": { "message": "this username is taken" }}'},{name:"errorMessage",type:"uiBlocks",hideFromUI:!0,defaultValue:[{"@type":"@builder.io/sdk:Element",responsiveStyles:{large:{marginTop:"10px"}},bindings:{"component.options.text":"state.formErrorMessage || block.component.options.text"},component:{name:"Text",options:{text:"<span>Form submission error :( Please check your answers and try again</span>"}}}]},{name:"sendingMessage",type:"uiBlocks",hideFromUI:!0,defaultValue:[{"@type":"@builder.io/sdk:Element",responsiveStyles:{large:{marginTop:"10px"}},component:{name:"Text",options:{text:"<span>Sending...</span>"}}}]},{name:"customHeaders",type:"map",valueType:{type:"string"},advanced:!0,showIf:'options.get("sendSubmissionsTo") === "custom" && options.get("sendWithJs") === true'}],noWrap:!0,canHaveChildren:!0,defaultChildren:[{"@type":"@builder.io/sdk:Element",responsiveStyles:{large:{marginTop:"10px"}},component:{name:"Text",options:{text:"<span>Enter your name</span>"}}},{"@type":"@builder.io/sdk:Element",responsiveStyles:{large:{marginTop:"10px"}},component:{name:"Form:Input",options:{name:"name",placeholder:"Jane Doe"}}},{"@type":"@builder.io/sdk:Element",responsiveStyles:{large:{marginTop:"10px"}},component:{name:"Text",options:{text:"<span>Enter your email</span>"}}},{"@type":"@builder.io/sdk:Element",responsiveStyles:{large:{marginTop:"10px"}},component:{name:"Form:Input",options:{name:"email",placeholder:"jane@doe.com"}}},{"@type":"@builder.io/sdk:Element",responsiveStyles:{large:{marginTop:"10px"}},component:{name:"Form:SubmitButton",options:{text:"Submit"}}}]},se=r.lazy(()=>Promise.resolve().then(()=>require("./form-e83f7b7a.cjs"))),le={name:"Form:Input",image:"https://cdn.builder.io/api/v1/image/assets%2FIsxPKMo2gPRRKeakUztj1D6uqed2%2Fad6f37889d9e40bbbbc72cdb5875d6ca",inputs:[{name:"type",type:"text",enum:["text","number","email","url","checkbox","radio","range","date","datetime-local","search","tel","time","file","month","week","password","color","hidden"],defaultValue:"text"},{name:"name",type:"string",required:!0,helperText:'Every input in a form needs a unique name describing what it takes, e.g. "email"'},{name:"placeholder",type:"string",defaultValue:"Hello there",helperText:"Text to display when there is no value"},{name:"defaultValue",type:"string"},{name:"value",type:"string",advanced:!0},{name:"required",type:"boolean",helperText:"Is this input required to be filled out to submit a form",defaultValue:!1}],noWrap:!0,static:!0,defaultStyles:{paddingTop:"10px",paddingBottom:"10px",paddingLeft:"10px",paddingRight:"10px",borderRadius:"3px",borderWidth:"1px",borderStyle:"solid",borderColor:"#ccc"}},de=r.lazy(()=>Promise.resolve().then(()=>require("./input-2103da14.cjs"))),ce={name:"Form:Select",image:"https://cdn.builder.io/api/v1/image/assets%2FIsxPKMo2gPRRKeakUztj1D6uqed2%2F83acca093fb24aaf94dee136e9a4b045",defaultStyles:{alignSelf:"flex-start"},inputs:[{name:"options",type:"list",required:!0,subFields:[{name:"value",type:"text",required:!0},{name:"name",type:"text"}],defaultValue:[{value:"option 1"},{value:"option 2"}]},{name:"name",type:"string",required:!0,helperText:'Every select in a form needs a unique name describing what it gets, e.g. "email"'},{name:"defaultValue",type:"string"},{name:"value",type:"string",advanced:!0},{name:"required",type:"boolean",defaultValue:!1}],static:!0,noWrap:!0},ue=r.lazy(()=>Promise.resolve().then(()=>require("./select-b8ad0a4c.cjs"))),me={name:"Form:SubmitButton",image:"https://cdn.builder.io/api/v1/image/assets%2FIsxPKMo2gPRRKeakUztj1D6uqed2%2Fdf2820ffed1f4349a94c40b3221f5b98",defaultStyles:{appearance:"none",paddingTop:"15px",paddingBottom:"15px",paddingLeft:"25px",paddingRight:"25px",backgroundColor:"#3898EC",color:"white",borderRadius:"4px",cursor:"pointer"},inputs:[{name:"text",type:"text",defaultValue:"Click me"}],static:!0,noWrap:!0},pe=r.lazy(()=>Promise.resolve().then(()=>require("./submit-button-b363e0ed.cjs"))),ge={name:"Raw:Img",hideFromInsertMenu:!0,image:"https://firebasestorage.googleapis.com/v0/b/builder-3b0a2.appspot.com/o/images%2Fbaseline-insert_photo-24px.svg?alt=media&token=4e5d0ef4-f5e8-4e57-b3a9-38d63a9b9dc4",inputs:[{name:"image",bubble:!0,type:"file",allowedFileTypes:["jpeg","jpg","png","svg","gif","webp"],required:!0}],noWrap:!0,static:!0},fe=r.lazy(()=>Promise.resolve().then(()=>require("./img-0c1e53c0.cjs"))),he={name:"Video",canHaveChildren:!0,defaultStyles:{minHeight:"20px",minWidth:"20px"},image:"https://firebasestorage.googleapis.com/v0/b/builder-3b0a2.appspot.com/o/images%2Fbaseline-videocam-24px%20(1).svg?alt=media&token=49a84e4a-b20e-4977-a650-047f986874bb",inputs:[{name:"video",type:"file",allowedFileTypes:["mp4"],bubble:!0,defaultValue:"https://cdn.builder.io/o/assets%2FYJIGb4i01jvw0SRdL5Bt%2Fd27731a526464deba0016216f5f9e570%2Fcompressed?apiKey=YJIGb4i01jvw0SRdL5Bt&token=d27731a526464deba0016216f5f9e570&alt=media&optimized=true",required:!0},{name:"posterImage",type:"file",allowedFileTypes:["jpeg","png"],helperText:"Image to show before the video plays"},{name:"autoPlay",type:"boolean",defaultValue:!0},{name:"controls",type:"boolean",defaultValue:!1},{name:"muted",type:"boolean",defaultValue:!0},{name:"loop",type:"boolean",defaultValue:!0},{name:"playsInline",type:"boolean",defaultValue:!0},{name:"fit",type:"text",defaultValue:"cover",enum:["contain","cover","fill","auto"]},{name:"preload",type:"text",defaultValue:"metadata",enum:["auto","metadata","none"]},{name:"fitContent",type:"boolean",helperText:"When child blocks are provided, fit to them instead of using the aspect ratio",defaultValue:!0,advanced:!0},{name:"position",type:"text",defaultValue:"center",enum:["center","top","left","right","bottom","top left","top right","bottom left","bottom right"]},{name:"height",type:"number",advanced:!0},{name:"width",type:"number",advanced:!0},{name:"aspectRatio",type:"number",advanced:!0,defaultValue:.7004048582995948},{name:"lazyLoad",type:"boolean",helperText:'Load this video "lazily" - as in only when a user scrolls near the video. Recommended for optmized performance and bandwidth consumption',defaultValue:!0,advanced:!0}]},be=()=>[{component:ae,...ne},{component:oe,...ie},{component:se,...re},{component:de,...le},{component:pe,...me},{component:ue,...ce},{component:fe,...ge},{component:k.Video,...he}],$=()=>[{component:k.Button,...O},{component:k.Columns,...J},{component:k.Fragment,...Y},{component:k.Image,...G},{component:k.Section,...Q},{component:Z,...X},{component:k.Symbol,...ee},{component:k.Text,...te},...be()],ye=`function updateCookiesAndStyles(contentId, variants, isHydrationTarget) {
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const d=require("react/jsx-runtime"),r=require("react"),l=require("./server-entry-00891f33.cjs"),k=require("./blocks-exports.cjs"),w=require("./blocks-0397d1b3.cjs");require("./get-class-prop-name-f1301669.cjs");require("./dynamic-renderer-1c9f24c0.cjs");const O={name:"Core:Button",image:"https://cdn.builder.io/api/v1/image/assets%2FIsxPKMo2gPRRKeakUztj1D6uqed2%2F81a15681c3e74df09677dfc57a615b13",defaultStyles:{appearance:"none",paddingTop:"15px",paddingBottom:"15px",paddingLeft:"25px",paddingRight:"25px",backgroundColor:"#000000",color:"white",borderRadius:"4px",textAlign:"center",cursor:"pointer"},inputs:[{name:"text",type:"text",defaultValue:"Click me!",bubble:!0},{name:"link",type:"url",bubble:!0},{name:"openLinkInNewTab",type:"boolean",defaultValue:!1,friendlyName:"Open link in new tab"}],static:!0,noWrap:!0},J={name:"Columns",isRSC:!0,inputs:[{name:"columns",type:"array",broadcast:!0,subFields:[{name:"blocks",type:"array",hideFromUI:!0,defaultValue:[{"@type":"@builder.io/sdk:Element",responsiveStyles:{large:{display:"flex",flexDirection:"column",alignItems:"stretch",flexShrink:"0",position:"relative",marginTop:"30px",textAlign:"center",lineHeight:"normal",height:"auto",minHeight:"20px",minWidth:"20px",overflow:"hidden"}},component:{name:"Image",options:{image:"https://builder.io/api/v1/image/assets%2Fpwgjf0RoYWbdnJSbpBAjXNRMe9F2%2Ffb27a7c790324294af8be1c35fe30f4d",backgroundPosition:"center",backgroundSize:"cover",aspectRatio:.7004048582995948}}},{"@type":"@builder.io/sdk:Element",responsiveStyles:{large:{display:"flex",flexDirection:"column",alignItems:"stretch",flexShrink:"0",position:"relative",marginTop:"30px",textAlign:"center",lineHeight:"normal",height:"auto"}},component:{name:"Text",options:{text:"<p>Enter some text...</p>"}}}]},{name:"width",type:"number",hideFromUI:!0,helperText:"Width %, e.g. set to 50 to fill half of the space"},{name:"link",type:"url",helperText:"Optionally set a url that clicking this column will link to"}],defaultValue:[{blocks:[{"@type":"@builder.io/sdk:Element",responsiveStyles:{large:{display:"flex",flexDirection:"column",alignItems:"stretch",flexShrink:"0",position:"relative",marginTop:"30px",textAlign:"center",lineHeight:"normal",height:"auto",minHeight:"20px",minWidth:"20px",overflow:"hidden"}},component:{name:"Image",options:{image:"https://builder.io/api/v1/image/assets%2Fpwgjf0RoYWbdnJSbpBAjXNRMe9F2%2Ffb27a7c790324294af8be1c35fe30f4d",backgroundPosition:"center",backgroundSize:"cover",aspectRatio:.7004048582995948}}},{"@type":"@builder.io/sdk:Element",responsiveStyles:{large:{display:"flex",flexDirection:"column",alignItems:"stretch",flexShrink:"0",position:"relative",marginTop:"30px",textAlign:"center",lineHeight:"normal",height:"auto"}},component:{name:"Text",options:{text:"<p>Enter some text...</p>"}}}]},{blocks:[{"@type":"@builder.io/sdk:Element",responsiveStyles:{large:{display:"flex",flexDirection:"column",alignItems:"stretch",flexShrink:"0",position:"relative",marginTop:"30px",textAlign:"center",lineHeight:"normal",height:"auto",minHeight:"20px",minWidth:"20px",overflow:"hidden"}},component:{name:"Image",options:{image:"https://builder.io/api/v1/image/assets%2Fpwgjf0RoYWbdnJSbpBAjXNRMe9F2%2Ffb27a7c790324294af8be1c35fe30f4d",backgroundPosition:"center",backgroundSize:"cover",aspectRatio:.7004048582995948}}},{"@type":"@builder.io/sdk:Element",responsiveStyles:{large:{display:"flex",flexDirection:"column",alignItems:"stretch",flexShrink:"0",position:"relative",marginTop:"30px",textAlign:"center",lineHeight:"normal",height:"auto"}},component:{name:"Text",options:{text:"<p>Enter some text...</p>"}}}]}],onChange:e=>{function t(){n.forEach(a=>{a.delete("width")})}const n=e.get("columns");Array.isArray(n)&&n.find(m=>m.get("width"))&&(n.find(h=>!h.get("width"))||n.reduce((o,g)=>o+g.get("width"),0)!==100)&&t()}},{name:"space",type:"number",defaultValue:20,helperText:"Size of gap between columns",advanced:!0},{name:"stackColumnsAt",type:"string",defaultValue:"tablet",helperText:"Convert horizontal columns to vertical at what device size",enum:["tablet","mobile","never"],advanced:!0},{name:"reverseColumnsWhenStacked",type:"boolean",defaultValue:!1,helperText:"When stacking columns for mobile devices, reverse the ordering",advanced:!0}]},Y={name:"Fragment",static:!0,hidden:!0,canHaveChildren:!0,noWrap:!0},G={name:"Image",static:!0,image:"https://firebasestorage.googleapis.com/v0/b/builder-3b0a2.appspot.com/o/images%2Fbaseline-insert_photo-24px.svg?alt=media&token=4e5d0ef4-f5e8-4e57-b3a9-38d63a9b9dc4",defaultStyles:{position:"relative",minHeight:"20px",minWidth:"20px",overflow:"hidden"},canHaveChildren:!0,inputs:[{name:"image",type:"file",bubble:!0,allowedFileTypes:["jpeg","jpg","png","svg"],required:!0,defaultValue:"https://cdn.builder.io/api/v1/image/assets%2FYJIGb4i01jvw0SRdL5Bt%2F72c80f114dc149019051b6852a9e3b7a",onChange:e=>{e.delete("srcset"),e.delete("noWebp");function n(i,o=6e4){return new Promise((g,I)=>{const x=document.createElement("img");let V=!1;x.onload=()=>{V=!0,g(x)},x.addEventListener("error",T=>{console.warn("Image load failed",T.error),I(T.error)}),x.src=i,setTimeout(()=>{V||I(new Error("Image load timed out"))},o)})}function a(i){return Math.round(i*1e3)/1e3}const m=e.get("image"),h=e.get("aspectRatio");if(fetch(m).then(i=>i.blob()).then(i=>{i.type.includes("svg")&&e.set("noWebp",!0)}),m&&(!h||h===.7041))return n(m).then(i=>{const o=e.get("aspectRatio");e.get("image")===m&&(!o||o===.7041)&&i.width&&i.height&&(e.set("aspectRatio",a(i.height/i.width)),e.set("height",i.height),e.set("width",i.width))})}},{name:"backgroundSize",type:"text",defaultValue:"cover",enum:[{label:"contain",value:"contain",helperText:"The image should never get cropped"},{label:"cover",value:"cover",helperText:"The image should fill it's box, cropping when needed"}]},{name:"backgroundPosition",type:"text",defaultValue:"center",enum:["center","top","left","right","bottom","top left","top right","bottom left","bottom right"]},{name:"altText",type:"string",helperText:"Text to display when the user has images off"},{name:"height",type:"number",hideFromUI:!0},{name:"width",type:"number",hideFromUI:!0},{name:"sizes",type:"string",hideFromUI:!0},{name:"srcset",type:"string",hideFromUI:!0},{name:"lazy",type:"boolean",defaultValue:!0,hideFromUI:!0},{name:"fitContent",type:"boolean",helperText:"When child blocks are provided, fit to them instead of using the image's aspect ratio",defaultValue:!0},{name:"aspectRatio",type:"number",helperText:"This is the ratio of height/width, e.g. set to 1.5 for a 300px wide and 200px tall photo. Set to 0 to not force the image to maintain it's aspect ratio",advanced:!0,defaultValue:.7041}]},Q={name:"Core:Section",static:!0,image:"https://cdn.builder.io/api/v1/image/assets%2FIsxPKMo2gPRRKeakUztj1D6uqed2%2F682efef23ace49afac61748dd305c70a",inputs:[{name:"maxWidth",type:"number",defaultValue:1200},{name:"lazyLoad",type:"boolean",defaultValue:!1,advanced:!0,description:"Only render this section when in view"}],defaultStyles:{paddingLeft:"20px",paddingRight:"20px",paddingTop:"50px",paddingBottom:"50px",marginTop:"0px",width:"100vw",marginLeft:"calc(50% - 50vw)"},canHaveChildren:!0,defaultChildren:[{"@type":"@builder.io/sdk:Element",responsiveStyles:{large:{textAlign:"center"}},component:{name:"Text",options:{text:"<p><b>I am a section! My content keeps from getting too wide, so that it's easy to read even on big screens.</b></p><p>Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur</p>"}}}]},X={name:"Slot",isRSC:!0,description:"Allow child blocks to be inserted into this content when used as a Symbol",docsLink:"https://www.builder.io/c/docs/symbols-with-blocks",image:"https://cdn.builder.io/api/v1/image/assets%2FYJIGb4i01jvw0SRdL5Bt%2F3aad6de36eae43b59b52c85190fdef56",inputs:[{name:"name",type:"string",required:!0,defaultValue:"children"}]},Z=r.lazy(()=>Promise.resolve().then(()=>require("./slot-6546a4c9.cjs"))),ee={name:"Symbol",noWrap:!0,static:!0,isRSC:!0,inputs:[{name:"symbol",type:"uiSymbol"},{name:"dataOnly",helperText:"Make this a data symbol that doesn't display any UI",type:"boolean",defaultValue:!1,advanced:!0,hideFromUI:!0},{name:"inheritState",helperText:"Inherit the parent component state and data",type:"boolean",defaultValue:!1,advanced:!0},{name:"renderToLiquid",helperText:"Render this symbols contents to liquid. Turn off to fetch with javascript and use custom targeting",type:"boolean",defaultValue:!1,advanced:!0,hideFromUI:!0},{name:"useChildren",hideFromUI:!0,type:"boolean"}]},te={name:"Text",static:!0,isRSC:!0,image:"https://firebasestorage.googleapis.com/v0/b/builder-3b0a2.appspot.com/o/images%2Fbaseline-text_fields-24px%20(1).svg?alt=media&token=12177b73-0ee3-42ca-98c6-0dd003de1929",inputs:[{name:"text",type:"html",required:!0,autoFocus:!0,bubble:!0,defaultValue:"Enter some text..."}],defaultStyles:{lineHeight:"normal",height:"auto",textAlign:"center"}},ne={name:"Custom Code",static:!0,requiredPermissions:["editCode"],inputs:[{name:"code",type:"html",required:!0,defaultValue:"<p>Hello there, I am custom HTML code!</p>",code:!0},{name:"replaceNodes",type:"boolean",helperText:"Preserve server rendered dom nodes",advanced:!0},{name:"scriptsClientOnly",type:"boolean",defaultValue:!1,helperText:"Only print and run scripts on the client. Important when scripts influence DOM that could be replaced when client loads",advanced:!0}]},ae=r.lazy(()=>Promise.resolve().then(()=>require("./custom-code-6d9730ff.cjs"))),ie={name:"Embed",static:!0,inputs:[{name:"url",type:"url",required:!0,defaultValue:"",helperText:"e.g. enter a youtube url, google map, etc",onChange:e=>{const t=e.get("url");if(t)return e.set("content","Loading..."),fetch(`https://iframe.ly/api/iframely?url=${t}&api_key=ae0e60e78201a3f2b0de4b`).then(a=>a.json()).then(a=>{e.get("url")===t&&(a.html?e.set("content",a.html):e.set("content","Invalid url, please try another"))}).catch(a=>{e.set("content","There was an error embedding this URL, please try again or another URL")});e.delete("content")}},{name:"content",type:"html",defaultValue:'<div style="padding: 20px; text-align: center">(Choose an embed URL)<div>',hideFromUI:!0}]},oe=r.lazy(()=>Promise.resolve().then(()=>require("./embed-32bdd007.cjs"))),re={name:"Form:Form",defaults:{responsiveStyles:{large:{marginTop:"15px",paddingBottom:"15px"}}},image:"https://cdn.builder.io/api/v1/image/assets%2FIsxPKMo2gPRRKeakUztj1D6uqed2%2Fef36d2a846134910b64b88e6d18c5ca5",inputs:[{name:"sendSubmissionsTo",type:"string",enum:[{label:"Send to email",value:"email",helperText:"Send form submissions to the email address of your choosing"},{label:"Custom",value:"custom",helperText:"Handle where the form requests go manually with a little code, e.g. to your own custom backend"}],defaultValue:"email"},{name:"sendSubmissionsToEmail",type:"string",required:!0,defaultValue:"your@email.com",showIf:'options.get("sendSubmissionsTo") === "email"'},{name:"sendWithJs",type:"boolean",helperText:"Set to false to use basic html form action",defaultValue:!0,showIf:'options.get("sendSubmissionsTo") === "custom"'},{name:"name",type:"string",defaultValue:"My form"},{name:"action",type:"string",helperText:"URL to send the form data to",showIf:'options.get("sendSubmissionsTo") === "custom"'},{name:"contentType",type:"string",defaultValue:"application/json",advanced:!0,enum:["application/json","multipart/form-data","application/x-www-form-urlencoded"],showIf:'options.get("sendSubmissionsTo") === "custom" && options.get("sendWithJs") === true'},{name:"method",type:"string",showIf:'options.get("sendSubmissionsTo") === "custom"',defaultValue:"POST",advanced:!0},{name:"previewState",type:"string",enum:["unsubmitted","sending","success","error"],defaultValue:"unsubmitted",helperText:'Choose a state to edit, e.g. choose "success" to show what users see on success and edit the message',showIf:'options.get("sendSubmissionsTo") !== "zapier" && options.get("sendWithJs") === true'},{name:"successUrl",type:"url",helperText:"Optional URL to redirect the user to on form submission success",showIf:'options.get("sendSubmissionsTo") !== "zapier" && options.get("sendWithJs") === true'},{name:"resetFormOnSubmit",type:"boolean",showIf:"options.get('sendSubmissionsTo') === 'custom' && options.get('sendWithJs') === true",advanced:!0},{name:"successMessage",type:"uiBlocks",hideFromUI:!0,defaultValue:[{"@type":"@builder.io/sdk:Element",responsiveStyles:{large:{marginTop:"10px"}},component:{name:"Text",options:{text:"<span>Thanks!</span>"}}}]},{name:"validate",type:"boolean",defaultValue:!0,advanced:!0},{name:"errorMessagePath",type:"text",advanced:!0,helperText:'Path to where to get the error message from in a JSON response to display to the user, e.g. "error.message" for a response like { "error": { "message": "this username is taken" }}'},{name:"errorMessage",type:"uiBlocks",hideFromUI:!0,defaultValue:[{"@type":"@builder.io/sdk:Element",responsiveStyles:{large:{marginTop:"10px"}},bindings:{"component.options.text":"state.formErrorMessage || block.component.options.text"},component:{name:"Text",options:{text:"<span>Form submission error :( Please check your answers and try again</span>"}}}]},{name:"sendingMessage",type:"uiBlocks",hideFromUI:!0,defaultValue:[{"@type":"@builder.io/sdk:Element",responsiveStyles:{large:{marginTop:"10px"}},component:{name:"Text",options:{text:"<span>Sending...</span>"}}}]},{name:"customHeaders",type:"map",valueType:{type:"string"},advanced:!0,showIf:'options.get("sendSubmissionsTo") === "custom" && options.get("sendWithJs") === true'}],noWrap:!0,canHaveChildren:!0,defaultChildren:[{"@type":"@builder.io/sdk:Element",responsiveStyles:{large:{marginTop:"10px"}},component:{name:"Text",options:{text:"<span>Enter your name</span>"}}},{"@type":"@builder.io/sdk:Element",responsiveStyles:{large:{marginTop:"10px"}},component:{name:"Form:Input",options:{name:"name",placeholder:"Jane Doe"}}},{"@type":"@builder.io/sdk:Element",responsiveStyles:{large:{marginTop:"10px"}},component:{name:"Text",options:{text:"<span>Enter your email</span>"}}},{"@type":"@builder.io/sdk:Element",responsiveStyles:{large:{marginTop:"10px"}},component:{name:"Form:Input",options:{name:"email",placeholder:"jane@doe.com"}}},{"@type":"@builder.io/sdk:Element",responsiveStyles:{large:{marginTop:"10px"}},component:{name:"Form:SubmitButton",options:{text:"Submit"}}}]},se=r.lazy(()=>Promise.resolve().then(()=>require("./form-489500da.cjs"))),le={name:"Form:Input",image:"https://cdn.builder.io/api/v1/image/assets%2FIsxPKMo2gPRRKeakUztj1D6uqed2%2Fad6f37889d9e40bbbbc72cdb5875d6ca",inputs:[{name:"type",type:"text",enum:["text","number","email","url","checkbox","radio","range","date","datetime-local","search","tel","time","file","month","week","password","color","hidden"],defaultValue:"text"},{name:"name",type:"string",required:!0,helperText:'Every input in a form needs a unique name describing what it takes, e.g. "email"'},{name:"placeholder",type:"string",defaultValue:"Hello there",helperText:"Text to display when there is no value"},{name:"defaultValue",type:"string"},{name:"value",type:"string",advanced:!0},{name:"required",type:"boolean",helperText:"Is this input required to be filled out to submit a form",defaultValue:!1}],noWrap:!0,static:!0,defaultStyles:{paddingTop:"10px",paddingBottom:"10px",paddingLeft:"10px",paddingRight:"10px",borderRadius:"3px",borderWidth:"1px",borderStyle:"solid",borderColor:"#ccc"}},de=r.lazy(()=>Promise.resolve().then(()=>require("./input-2103da14.cjs"))),ce={name:"Form:Select",image:"https://cdn.builder.io/api/v1/image/assets%2FIsxPKMo2gPRRKeakUztj1D6uqed2%2F83acca093fb24aaf94dee136e9a4b045",defaultStyles:{alignSelf:"flex-start"},inputs:[{name:"options",type:"list",required:!0,subFields:[{name:"value",type:"text",required:!0},{name:"name",type:"text"}],defaultValue:[{value:"option 1"},{value:"option 2"}]},{name:"name",type:"string",required:!0,helperText:'Every select in a form needs a unique name describing what it gets, e.g. "email"'},{name:"defaultValue",type:"string"},{name:"value",type:"string",advanced:!0},{name:"required",type:"boolean",defaultValue:!1}],static:!0,noWrap:!0},ue=r.lazy(()=>Promise.resolve().then(()=>require("./select-b8ad0a4c.cjs"))),me={name:"Form:SubmitButton",image:"https://cdn.builder.io/api/v1/image/assets%2FIsxPKMo2gPRRKeakUztj1D6uqed2%2Fdf2820ffed1f4349a94c40b3221f5b98",defaultStyles:{appearance:"none",paddingTop:"15px",paddingBottom:"15px",paddingLeft:"25px",paddingRight:"25px",backgroundColor:"#3898EC",color:"white",borderRadius:"4px",cursor:"pointer"},inputs:[{name:"text",type:"text",defaultValue:"Click me"}],static:!0,noWrap:!0},pe=r.lazy(()=>Promise.resolve().then(()=>require("./submit-button-b363e0ed.cjs"))),ge={name:"Raw:Img",hideFromInsertMenu:!0,image:"https://firebasestorage.googleapis.com/v0/b/builder-3b0a2.appspot.com/o/images%2Fbaseline-insert_photo-24px.svg?alt=media&token=4e5d0ef4-f5e8-4e57-b3a9-38d63a9b9dc4",inputs:[{name:"image",bubble:!0,type:"file",allowedFileTypes:["jpeg","jpg","png","svg","gif","webp"],required:!0}],noWrap:!0,static:!0},fe=r.lazy(()=>Promise.resolve().then(()=>require("./img-0c1e53c0.cjs"))),he={name:"Video",canHaveChildren:!0,defaultStyles:{minHeight:"20px",minWidth:"20px"},image:"https://firebasestorage.googleapis.com/v0/b/builder-3b0a2.appspot.com/o/images%2Fbaseline-videocam-24px%20(1).svg?alt=media&token=49a84e4a-b20e-4977-a650-047f986874bb",inputs:[{name:"video",type:"file",allowedFileTypes:["mp4"],bubble:!0,defaultValue:"https://cdn.builder.io/o/assets%2FYJIGb4i01jvw0SRdL5Bt%2Fd27731a526464deba0016216f5f9e570%2Fcompressed?apiKey=YJIGb4i01jvw0SRdL5Bt&token=d27731a526464deba0016216f5f9e570&alt=media&optimized=true",required:!0},{name:"posterImage",type:"file",allowedFileTypes:["jpeg","png"],helperText:"Image to show before the video plays"},{name:"autoPlay",type:"boolean",defaultValue:!0},{name:"controls",type:"boolean",defaultValue:!1},{name:"muted",type:"boolean",defaultValue:!0},{name:"loop",type:"boolean",defaultValue:!0},{name:"playsInline",type:"boolean",defaultValue:!0},{name:"fit",type:"text",defaultValue:"cover",enum:["contain","cover","fill","auto"]},{name:"preload",type:"text",defaultValue:"metadata",enum:["auto","metadata","none"]},{name:"fitContent",type:"boolean",helperText:"When child blocks are provided, fit to them instead of using the aspect ratio",defaultValue:!0,advanced:!0},{name:"position",type:"text",defaultValue:"center",enum:["center","top","left","right","bottom","top left","top right","bottom left","bottom right"]},{name:"height",type:"number",advanced:!0},{name:"width",type:"number",advanced:!0},{name:"aspectRatio",type:"number",advanced:!0,defaultValue:.7004048582995948},{name:"lazyLoad",type:"boolean",helperText:'Load this video "lazily" - as in only when a user scrolls near the video. Recommended for optmized performance and bandwidth consumption',defaultValue:!0,advanced:!0}]},be=()=>[{component:ae,...ne},{component:oe,...ie},{component:se,...re},{component:de,...le},{component:pe,...me},{component:ue,...ce},{component:fe,...ge},{component:k.Video,...he}],$=()=>[{component:k.Button,...O},{component:k.Columns,...J},{component:k.Fragment,...Y},{component:k.Image,...G},{component:k.Section,...Q},{component:Z,...X},{component:k.Symbol,...ee},{component:k.Text,...te},...be()],ye=`function updateCookiesAndStyles(contentId, variants, isHydrationTarget) {
|
|
2
2
|
function getAndSetVariantId() {
|
|
3
3
|
function setCookie(name, value, days) {
|
|
4
4
|
let expires = '';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("react/jsx-runtime"),v=require("react"),f=require("./blocks-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("react/jsx-runtime"),v=require("react"),f=require("./blocks-0397d1b3.cjs"),P=require("./server-entry-00891f33.cjs");require("./blocks-exports.cjs");require("./get-class-prop-name-f1301669.cjs");require("./dynamic-renderer-1c9f24c0.cjs");const B=["production","qa","test","development","dev","cdn-qa","cloud","fast","cdn2","cdn-prod"],D=()=>{const e=process.env.NODE_ENV||"production";return B.includes(e)?e:"production"},A=(e,i,y)=>{const a=String.prototype.split.call(i,/[,[\].]+?/).filter(Boolean).reduce((c,b)=>c!=null?c[b]:c,e);return a===void 0||a===e?y:a};function O(e){var S,E;const i=v.useRef(null),[y,a]=v.useState(()=>"unsubmitted"),[c,b]=v.useState(()=>null),[J,M]=v.useState(()=>"");function T(o){var m,g;const u={...e.builderContext.rootState,...o};e.builderContext.rootSetState?(g=(m=e.builderContext).rootSetState)==null||g.call(m,u):e.builderContext.rootState=u}function h(){return P.isEditing()&&e.previewState||y}function q(o){var m;const u=e.sendWithJs||e.sendSubmissionsTo==="email";if(e.sendSubmissionsTo==="zapier")o.preventDefault();else if(u){if(!(e.action||e.sendSubmissionsTo==="email")){o.preventDefault();return}o.preventDefault();const g=o.currentTarget,k=e.customHeaders||{};let x;const N=new FormData(g),C=Array.from(o.currentTarget.querySelectorAll("input,select,textarea")).filter(t=>!!t.name).map(t=>{let n;const l=t.name;if(t instanceof HTMLInputElement)if(t.type==="radio"){if(t.checked)return n=t.name,{key:l,value:n}}else if(t.type==="checkbox")n=t.checked;else if(t.type==="number"||t.type==="range"){const s=t.valueAsNumber;isNaN(s)||(n=s)}else t.type==="file"?n=t.files:n=t.value;else n=t.value;return{key:l,value:n}});let d=e.contentType;if(e.sendSubmissionsTo==="email"&&(d="multipart/form-data"),Array.from(C).forEach(({value:t})=>{(t instanceof File||Array.isArray(t)&&t[0]instanceof File||t instanceof FileList)&&(d="multipart/form-data")}),d!=="application/json")x=N;else{const t={};Array.from(C).forEach(({value:n,key:l})=>{f.set(t,l,n)}),x=JSON.stringify(t)}d&&d!=="multipart/form-data"&&(u&&((m=e.action)!=null&&m.includes("zapier.com"))||(k["content-type"]=d));const j=new CustomEvent("presubmit",{detail:{body:x}});if(i.current&&(i.current.dispatchEvent(j),j.defaultPrevented))return;a("sending");const w=`${D()==="dev"?"http://localhost:5000":"https://builder.io"}/api/v1/form-submit?apiKey=${e.builderContext.apiKey}&to=${btoa(e.sendSubmissionsToEmail||"")}&name=${encodeURIComponent(e.name||"")}`;fetch(e.sendSubmissionsTo==="email"?w:e.action,{body:x,headers:k,method:e.method||"post"}).then(async t=>{let n;const l=t.headers.get("content-type");if(l&&l.indexOf("application/json")!==-1?n=await t.json():n=await t.text(),!t.ok&&e.errorMessagePath){let s=A(n,e.errorMessagePath);s&&(typeof s!="string"&&(s=JSON.stringify(s)),M(s),T({formErrorMessage:s}))}if(b(n),a(t.ok?"success":"error"),t.ok){const s=new CustomEvent("submit:success",{detail:{res:t,body:n}});if(i.current){if(i.current.dispatchEvent(s),s.defaultPrevented)return;e.resetFormOnSubmit!==!1&&i.current.reset()}if(e.successUrl)if(i.current){const F=new CustomEvent("route",{detail:{url:e.successUrl}});i.current.dispatchEvent(F),F.defaultPrevented||(location.href=e.successUrl)}else location.href=e.successUrl}},t=>{const n=new CustomEvent("submit:error",{detail:{error:t}});i.current&&(i.current.dispatchEvent(n),n.defaultPrevented)||(b(t),a("error"))})}}return r.jsxs(r.Fragment,{children:[" ",r.jsxs("form",{validate:e.validate,ref:i,action:!e.sendWithJs&&e.action,method:e.method,name:e.name,onSubmit:o=>q(o),...e.attributes,children:[" ",e.builderBlock&&e.builderBlock.children?r.jsx(r.Fragment,{children:(E=(S=e.builderBlock)==null?void 0:S.children)==null?void 0:E.map((o,u)=>r.jsx(f.Block,{block:o,context:e.builderContext,registeredComponents:e.builderComponents,linkComponent:e.builderLinkComponent},`form-block-${u}`))}):null," ",h()==="error"?r.jsx(r.Fragment,{children:r.jsx(f.Blocks,{path:"errorMessage",blocks:e.errorMessage,context:e.builderContext})}):null," ",h()==="sending"?r.jsx(r.Fragment,{children:r.jsx(f.Blocks,{path:"sendingMessage",blocks:e.sendingMessage,context:e.builderContext})}):null," ",h()==="error"&&c?r.jsx(r.Fragment,{children:r.jsxs("pre",{className:"builder-form-error-text pre-25b9edf0",children:[" ",JSON.stringify(c,null,2)," "]})}):null," ",h()==="success"?r.jsx(r.Fragment,{children:r.jsx(f.Blocks,{path:"successMessage",blocks:e.successMessage,context:e.builderContext})}):null," "]})," ",r.jsx("style",{children:".pre-25b9edf0 { padding: 10px; color: red; text-align: center; }"})," "]})}exports.default=O;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsxs as S, Fragment as m, jsx as s } from "react/jsx-runtime";
|
|
2
2
|
import { useRef as J, useState as E } from "react";
|
|
3
|
-
import { Block as O, Blocks as x, set as U } from "./blocks-
|
|
3
|
+
import { Block as O, Blocks as x, set as U } from "./blocks-055d1c68.js";
|
|
4
4
|
import { isEditing as j } from "./server-entry-d46a218d.js";
|
|
5
5
|
import "./blocks-exports.mjs";
|
|
6
6
|
import "./get-class-prop-name-859a7f60.js";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";var a=Object.create;var r=Object.defineProperty;var c=Object.getOwnPropertyDescriptor;var s=Object.getOwnPropertyNames;var u=Object.getPrototypeOf,l=Object.prototype.hasOwnProperty;var m=(e,i,t,n)=>{if(i&&typeof i=="object"||typeof i=="function")for(let o of s(i))!l.call(e,o)&&o!==t&&r(e,o,{get:()=>i[o],enumerable:!(n=c(i,o))||n.enumerable});return e};var p=(e,i,t)=>(t=e!=null?a(u(e)):{},m(i||!e||!e.__esModule?r(t,"default",{value:e,enumerable:!0}):t,e));Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const noop=()=>{};let safeDynamicRequire=noop;try{safeDynamicRequire=eval("require")}catch(e){}const initializeNodeRuntime=async()=>{await import("isolated-vm")};exports.initializeNodeRuntime=initializeNodeRuntime;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("react/jsx-runtime"),o=require("./blocks-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("react/jsx-runtime"),o=require("./blocks-0397d1b3.cjs");require("react");require("./blocks-exports.cjs");require("./server-entry-00891f33.cjs");require("./get-class-prop-name-f1301669.cjs");require("./dynamic-renderer-1c9f24c0.cjs");function u(e){var t,r,n;return i.jsx("div",{style:{pointerEvents:"auto"},...!((t=e.builderContext.context)!=null&&t.symbolId)&&{"builder-slot":e.name},children:i.jsx(o.Blocks,{parent:(r=e.builderContext.context)==null?void 0:r.symbolId,path:`symbol.data.${e.name}`,context:e.builderContext,blocks:(n=e.builderContext.rootState)==null?void 0:n[e.name]})})}exports.default=u;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use client";"use strict";var Fe=Object.defineProperty;var Pe=(e,t,n)=>t in e?Fe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var z=(e,t,n)=>(Pe(e,typeof t!="symbol"?t+"":t,n),n);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("react/jsx-runtime"),h=require("./server-entry-ff6fc2b4.cjs"),f=require("react"),L=require("./node-runtime-
|
|
1
|
+
"use client";"use strict";var Fe=Object.defineProperty;var Pe=(e,t,n)=>t in e?Fe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var z=(e,t,n)=>(Pe(e,typeof t!="symbol"?t+"":t,n),n);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("react/jsx-runtime"),h=require("./server-entry-ff6fc2b4.cjs"),f=require("react"),L=require("./node-runtime-87cf9b13.cjs"),Ve=new Set(["area","base","br","col","embed","hr","img","input","keygen","link","meta","param","source","track","wbr"]),Be=e=>typeof e=="string"&&Ve.has(e.toLowerCase());function Q(e){return a.jsx(a.Fragment,{children:Be(e.TagName)?a.jsx(a.Fragment,{children:a.jsx(e.TagName,{...e.attributes,...e.actionAttributes})}):a.jsx(a.Fragment,{children:typeof e.TagName=="string"?a.jsx(a.Fragment,{children:a.jsx(e.TagName,{...e.attributes,...e.actionAttributes,children:e.children})}):a.jsx(a.Fragment,{children:a.jsx(e.TagName,{...e.attributes,...e.actionAttributes,children:e.children})})})})}const M=()=>{switch(h.TARGET){case"react":case"reactNative":case"rsc":return"className";case"svelte":case"vue":case"solid":case"qwik":return"class"}};function ce(e){return a.jsx(Q,{attributes:{...e.attributes,[M()]:`${e.link?"":"builder-button"} ${e.attributes[M()]||""}`,...e.link?{href:e.link,target:e.openLinkInNewTab?"_blank":void 0,role:"link"}:{role:"button"}},TagName:e.link?e.builderLinkComponent||"a":"button",actionAttributes:{},children:e.text})}const q=f.createContext({content:null,context:{},localState:void 0,rootSetState(){},rootState:{},apiKey:null,apiVersion:void 0,componentInfos:{},inheritedStyles:{},BlocksWrapper:"div",BlocksWrapperProps:{}}),de=f.createContext({registeredComponents:{}});function Ae(e){var t;return{...(t=e.component)==null?void 0:t.options,...e.options,builderBlock:e}}const We=({code:e,builder:t,context:n,event:i,localState:o,rootSetState:s,rootState:r})=>{const l=L.getFunctionArguments({builder:t,context:n,event:i,state:ue({rootState:r,localState:o,rootSetState:s})});return new Function(...l.map(([d])=>d),e)(...l.map(([,d])=>d))};function ue({rootState:e,localState:t,rootSetState:n}){return new Proxy(e,{get:(i,o)=>{if(t&&o in t)return t[o];const s=i[o];return typeof s=="object"&&s!==null?ue({rootState:s,localState:void 0,rootSetState:n?r=>{i[o]=r,n(i)}:void 0}):s},set:(i,o,s)=>{if(t&&o in t)throw new Error("Writing to local state is not allowed as it is read-only.");return i[o]=s,n==null||n(i),!0}})}function Ne(){var e;return typeof process!="undefined"&&h.checkIsDefined((e=process==null?void 0:process.versions)==null?void 0:e.node)}const $e=()=>{var i;if(!Ne())return!1;const e=process.arch==="arm64",t=process.version.startsWith("v20"),n=(i=process.env.NODE_OPTIONS)==null?void 0:i.includes("--no-node-snapshot");return e&&t&&!n?(h.logger.log("Skipping usage of `isolated-vm` to avoid crashes in Node v20 on an arm64 machine.\n If you would like to use the `isolated-vm` package on this machine, please provide the `NODE_OPTIONS=--no-node-snapshot` config to your Node process.\n See https://github.com/BuilderIO/builder/blob/main/packages/sdks/README.md#node-v20--m1-macs-apple-silicon-support for more information.\n "),!0):!1},De=e=>h.isBrowser()||$e()?We(e):L.runInNode(e),V=class V{static getCacheKey(t){return JSON.stringify({...t,event:t.event?Math.random():void 0})}static getCachedValue(t){return V.cache.get(t)}static setCachedValue(t,n){V.cache.size>20&&V.cache.delete(V.cache.keys().next().value),V.cache.set(t,{value:n})}};z(V,"cacheLimit",20),z(V,"cache",new Map);let D=V;function O({code:e,context:t,localState:n,rootState:i,rootSetState:o,event:s,isExpression:r=!0,enableCache:l}){if(e===""){h.logger.warn("Skipping evaluation of empty code block.");return}const d={code:L.parseCode(e,{isExpression:r}),builder:L.getBuilderGlobals(),context:t,event:s,rootSetState:o,rootState:i,localState:n};if(l){const c=D.getCacheKey(d),m=D.getCachedValue(c);if(m)return m.value}try{const c=De(d);if(l){const m=D.getCacheKey(d);D.setCachedValue(m,c)}return c}catch(c){h.logger.error("Failed code evaluation: "+c.message,{code:e});return}}const Le=({block:e,context:t,localState:n,rootState:i,rootSetState:o})=>{if(!e.bindings)return e;const s=h.fastClone(e),r={...s,properties:{...s.properties},actions:{...s.actions}};for(const l in e.bindings){const d=e.bindings[l],c=O({code:d,localState:n,rootState:i,rootSetState:o,context:t,enableCache:!0});L.set(r,l,c)}return r};function K({block:e,context:t,shouldEvaluateBindings:n,localState:i,rootState:o,rootSetState:s}){const r=e;return n?Le({block:r,localState:i,rootState:o,rootSetState:s,context:t}):r}function Me(e,t,n={}){let i,o,s,r=null,l=0;const d=function(){l=n.leading===!1?0:Date.now(),r=null,s=e.apply(i,o),r||(i=o=null)};return function(){const c=Date.now();!l&&n.leading===!1&&(l=c);const m=t-(c-l);return i=this,o=arguments,m<=0||m>t?(r&&(clearTimeout(r),r=null),l=c,s=e.apply(i,o),r||(i=o=null)):!r&&n.trailing!==!1&&(r=setTimeout(d,m)),s}}function W(e,...t){const n=Object(e);for(let i=1;i<arguments.length;i++){const o=arguments[i];if(o!=null)for(const s in o)Object.prototype.hasOwnProperty.call(o,s)&&(n[s]=o[s])}return n}const X=e=>e?e.replace(/([A-Z])/g,t=>`-${t[0].toLowerCase()}`):"";function Oe(e){for(const t of e)switch(t.trigger){case"pageLoad":me(t);break;case"hover":He(t);break;case"scrollInView":Ke(t);break}}function Z(e){console.warn(`Cannot animate element: element with ID ${e} not found!`)}function ee(e,t){const n=Ue(e),i=getComputedStyle(t),o=e.steps[0].styles,s=e.steps[e.steps.length-1].styles,r=[o,s];for(const l of r)for(const d of n)d in l||(l[d]=i[d])}function Ue(e){const t=[];for(const n of e.steps)for(const i in n.styles)t.indexOf(i)===-1&&t.push(i);return t}function me(e){const t=Array.prototype.slice.call(document.getElementsByClassName(e.elementId||e.id||""));if(!t.length){Z(e.elementId||e.id||"");return}Array.from(t).forEach(n=>{ee(e,n),n.style.transition="none",n.style.transitionDelay="0",W(n.style,e.steps[0].styles),setTimeout(()=>{n.style.transition=`all ${e.duration}s ${X(e.easing)}`,e.delay&&(n.style.transitionDelay=e.delay+"s"),W(n.style,e.steps[1].styles),setTimeout(()=>{n.style.transition="",n.style.transitionDelay=""},(e.delay||0)*1e3+e.duration*1e3+100)})})}function He(e){const t=Array.prototype.slice.call(document.getElementsByClassName(e.elementId||e.id||""));if(!t.length){Z(e.elementId||e.id||"");return}Array.from(t).forEach(n=>{ee(e,n);const i=e.steps[0].styles,o=e.steps[1].styles;function s(){W(n.style,i)}function r(){W(n.style,o)}s(),n.addEventListener("mouseenter",r),n.addEventListener("mouseleave",s),setTimeout(()=>{n.style.transition=`all ${e.duration}s ${X(e.easing)}`,e.delay&&(n.style.transitionDelay=e.delay+"s")})})}function Ke(e){const t=Array.prototype.slice.call(document.getElementsByClassName(e.elementId||e.id||""));if(!t.length){Z(e.elementId||e.id||"");return}Array.from(t).forEach(n=>{ee(e,n);let i=!1,o=!1;function s(){!i&&l(n)?(i=!0,o=!0,setTimeout(()=>{W(n.style,e.steps[1].styles),e.repeat||document.removeEventListener("scroll",r),setTimeout(()=>{o=!1,e.repeat||(n.style.transition="",n.style.transitionDelay="")},(e.duration+(e.delay||0))*1e3+100)})):e.repeat&&i&&!o&&!l(n)&&(i=!1,W(n.style,e.steps[0].styles))}const r=Me(s,200,{leading:!1});function l(m){const g=m.getBoundingClientRect(),x=window.innerHeight,k=(e.thresholdPercent||0)/100*x;return g.bottom>k&&g.top<x-k}const d=e.steps[0].styles;function c(){W(n.style,d)}c(),setTimeout(()=>{n.style.transition=`all ${e.duration}s ${X(e.easing)}`,e.delay&&(n.style.transitionDelay=e.delay+"s")}),document.addEventListener("scroll",r,{capture:!0,passive:!0}),s()})}const qe=e=>e.replace(/([a-z0-9]|(?=[A-Z]))([A-Z])/g,"$1-$2").toLowerCase(),fe=e=>Object.entries(e).map(([n,i])=>{if(typeof i=="string")return`${qe(n)}: ${i};`}).filter(h.checkIsDefined),_e=e=>fe(e).join(`
|
|
2
2
|
`),J=({mediaQuery:e,className:t,styles:n})=>{const i=`.${t} {
|
|
3
3
|
${_e(n)}
|
|
4
4
|
}`;return e?`${e} {
|
package/lib/node/index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("./blocks-exports.cjs"),e=require("./server-entry-ff6fc2b4.cjs");require("react/jsx-runtime");require("react");require("./node-runtime-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("./blocks-exports.cjs"),e=require("./server-entry-ff6fc2b4.cjs");require("react/jsx-runtime");require("react");require("./node-runtime-87cf9b13.cjs");exports.Blocks=t.Blocks;exports.BuilderContext=t.BuilderContext;exports.Button=t.Button;exports.Columns=t.Columns;exports.Content=t.Content;exports.Fragment=t.Fragment;exports.Image=t.Image;exports.Section=t.Section;exports.Symbol=t.Symbol;exports.Text=t.Text;exports.Video=t.Video;exports._processContentResult=e._processContentResult;exports.createRegisterComponentMessage=e.createRegisterComponentMessage;exports.fetchBuilderProps=e.fetchBuilderProps;exports.fetchEntries=e.fetchEntries;exports.fetchOneEntry=e.fetchOneEntry;exports.getBuilderSearchParams=e.getBuilderSearchParams;exports.isEditing=e.isEditing;exports.isPreviewing=e.isPreviewing;exports.register=e.register;exports.setEditorSettings=e.setEditorSettings;exports.subscribeToEditor=e.subscribeToEditor;exports.track=e.track;
|
package/lib/node/init.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
1
|
+
"use strict";var u=Object.create;var r=Object.defineProperty;var a=Object.getOwnPropertyDescriptor;var m=Object.getOwnPropertyNames;var s=Object.getPrototypeOf,c=Object.prototype.hasOwnProperty;var d=(e,i,t,o)=>{if(i&&typeof i=="object"||typeof i=="function")for(let n of m(i))!c.call(e,n)&&n!==t&&r(e,n,{get:()=>i[n],enumerable:!(o=a(i,n))||o.enumerable});return e};var l=(e,i,t)=>(t=e!=null?u(s(e)):{},d(i||!e||!e.__esModule?r(t,"default",{value:e,enumerable:!0}):t,e));Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const v=require("./node-runtime-87cf9b13.cjs");require("./server-entry-ff6fc2b4.cjs");const y=async()=>{const e=await import("isolated-vm");v.setIvm(e)};exports.initializeNodeRuntime=y;
|
package/lib/node/init.mjs
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { default as e } from "isolated-vm";
|
|
3
|
-
import { setIvm as o } from "./node-runtime-1ca09d03.js";
|
|
1
|
+
import { setIvm as t } from "./node-runtime-1ca09d03.js";
|
|
4
2
|
import "./server-entry-8c84ddbd.js";
|
|
5
|
-
|
|
3
|
+
const e = async () => {
|
|
4
|
+
const i = await import("isolated-vm");
|
|
5
|
+
t(i);
|
|
6
|
+
};
|
|
6
7
|
export {
|
|
7
|
-
e as
|
|
8
|
+
e as initializeNodeRuntime
|
|
8
9
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";const serverEntry=require("./server-entry-ff6fc2b4.cjs"),getFunctionArguments=({builder:e,context:r,event:n,state:t})=>Object.entries({state:t,Builder:e,builder:e,context:r,event:n}),getBuilderGlobals=()=>({isEditing:serverEntry.isEditing(),isBrowser:serverEntry.isBrowser(),isServer:!serverEntry.isBrowser(),getUserAttributes:()=>serverEntry.getUserAttributes()}),parseCode=(e,{isExpression:r=!0})=>r&&!(e.includes(";")||e.includes(" return ")||e.trim().startsWith("return "))?`return (${e});`:e,set=(e,r,n)=>{if(Object(e)!==e)return e;const t=Array.isArray(r)?r:r.toString().match(/[^.[\]]+/g);return t.slice(0,-1).reduce((
|
|
1
|
+
"use strict";const serverEntry=require("./server-entry-ff6fc2b4.cjs"),getFunctionArguments=({builder:e,context:r,event:n,state:t})=>Object.entries({state:t,Builder:e,builder:e,context:r,event:n}),getBuilderGlobals=()=>({isEditing:serverEntry.isEditing(),isBrowser:serverEntry.isBrowser(),isServer:!serverEntry.isBrowser(),getUserAttributes:()=>serverEntry.getUserAttributes()}),parseCode=(e,{isExpression:r=!0})=>r&&!(e.includes(";")||e.includes(" return ")||e.trim().startsWith("return "))?`return (${e});`:e,set=(e,r,n)=>{if(Object(e)!==e)return e;const t=Array.isArray(r)?r:r.toString().match(/[^.[\]]+/g);return t.slice(0,-1).reduce((u,s,c)=>Object(u[s])===u[s]?u[s]:u[s]=Math.abs(Number(t[c+1]))>>0===+t[c+1]?[]:{},e)[t[t.length-1]]=n,e},noop=()=>{};let safeDynamicRequire=noop;try{safeDynamicRequire=eval("require")}catch(e){}const getSyncValName=e=>`bldr_${e}_sync`,BUILDER_SET_STATE_NAME="BUILDER_SET_STATE",INJECTED_IVM_GLOBAL="BUILDER_IVM",REF_TO_PROXY_FN=`
|
|
2
2
|
var refToProxy = (obj) => {
|
|
3
3
|
if (typeof obj !== 'object' || obj === null) {
|
|
4
4
|
return obj;
|
|
@@ -38,4 +38,4 @@ if (typeof output === 'object' && output !== null) {
|
|
|
38
38
|
}
|
|
39
39
|
|
|
40
40
|
output;
|
|
41
|
-
`};let IVM_INSTANCE=null;const setIvm=e=>{IVM_INSTANCE=e},getIvm=()=>IVM_INSTANCE||safeDynamicRequire("isolated-vm"),getIsolateContext=()=>{const e=getIvm();return new e.Isolate({memoryLimit:128}).createContextSync()},runInNode=({code:e,builder:r,context:n,event:t,localState:
|
|
41
|
+
`};let IVM_INSTANCE=null;const setIvm=e=>{IVM_INSTANCE=e},getIvm=()=>IVM_INSTANCE||safeDynamicRequire("isolated-vm"),getIsolateContext=()=>{const e=getIvm();return new e.Isolate({memoryLimit:128}).createContextSync()},runInNode=({code:e,builder:r,context:n,event:t,localState:u,rootSetState:s,rootState:c})=>{const y=getIvm(),v=serverEntry.fastClone({...c,...u}),a=getFunctionArguments({builder:r,context:n,event:t,state:v}),g=getIsolateContext(),i=g.global;i.setSync("global",i.derefInto()),i.setSync("log",function(...o){console.log(...o)}),i.setSync(BUILDER_SET_STATE_NAME,function(o,l){set(c,o,l),s==null||s(c)}),a.forEach(([o,l])=>{const p=typeof l=="object"?new y.Reference(o==="builder"?{...l,getUserAttributes:()=>l.getUserAttributes()}:l):null;i.setSync(getSyncValName(o),p)}),i.setSync(INJECTED_IVM_GLOBAL,y);const I=processCode({code:e,args:a}),E=g.evalSync(I);try{return JSON.parse(E)}catch{return E}};exports.getBuilderGlobals=getBuilderGlobals;exports.getFunctionArguments=getFunctionArguments;exports.parseCode=parseCode;exports.runInNode=runInNode;exports.set=set;exports.setIvm=setIvm;
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@builder.io/sdk-react",
|
|
3
3
|
"description": "Builder.io SDK for React",
|
|
4
|
-
"version": "1.0.19-dev-
|
|
4
|
+
"version": "1.0.19-dev-1",
|
|
5
5
|
"homepage": "https://github.com/BuilderIO/builder/tree/main/packages/sdks/output/react",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"repository": {
|
|
@@ -79,7 +79,7 @@
|
|
|
79
79
|
"require": "./lib/browser/index.cjs"
|
|
80
80
|
}
|
|
81
81
|
},
|
|
82
|
-
"./init": {
|
|
82
|
+
"./node/init": {
|
|
83
83
|
"types": "./types/index.d.ts",
|
|
84
84
|
"import": "./lib/node/init.mjs",
|
|
85
85
|
"require": "./lib/node/init.cjs"
|
|
@@ -1,2 +1,10 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
/**
|
|
2
|
+
* This function initializes the SDK on a Node server. It handles importing the
|
|
3
|
+
* `isolated-vm` package which is needed for dynamic bindings.
|
|
4
|
+
*
|
|
5
|
+
* NOTE: this function cannot be called on the client. You must call this function
|
|
6
|
+
* from a server-only location, such as:
|
|
7
|
+
* - The NextJS Pages router's `_document.tsx`
|
|
8
|
+
* - Your Remix route's `loader`
|
|
9
|
+
*/
|
|
10
|
+
export declare const initializeNodeRuntime: () => Promise<void>;
|
|
@@ -1,3 +1,8 @@
|
|
|
1
1
|
import type { ExecutorArgs } from '../helpers.js';
|
|
2
|
+
/**
|
|
3
|
+
* Set the `isolated-vm` instance to be used by the node runtime.
|
|
4
|
+
* This is useful for environments that are not able to rely on our
|
|
5
|
+
* `safeDynamicRequire` trick to import the `isolated-vm` package.
|
|
6
|
+
*/
|
|
2
7
|
export declare const setIvm: (ivm: typeof import('isolated-vm')) => void;
|
|
3
8
|
export declare const runInNode: ({ code, builder, context, event, localState, rootSetState, rootState }: ExecutorArgs) => any;
|
|
@@ -131,9 +131,9 @@ export interface GetContentOptions {
|
|
|
131
131
|
/**
|
|
132
132
|
* Optional override of the `fetch` function. (Defaults to global `fetch`)
|
|
133
133
|
*/
|
|
134
|
-
fetch?:
|
|
134
|
+
fetch?: (input: string, init?: object) => Promise<any>;
|
|
135
135
|
/**
|
|
136
|
-
* Optional fetch options to be passed to the `fetch` function.
|
|
136
|
+
* Optional fetch options to be passed as the second argument to the `fetch` function.
|
|
137
137
|
*/
|
|
138
|
-
fetchOptions?:
|
|
138
|
+
fetchOptions?: object;
|
|
139
139
|
}
|