@spaceandtimelabs/makeinfinite-ui 0.66.0 → 0.66.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.
@@ -89260,8 +89260,10 @@ const cke = (e) => {
89260
89260
  }
89261
89261
  }),
89262
89262
  getProjectViewsHistory: async (B, V, G, Y = "day", H = 500) => {
89263
- const ee = new URL(`${t}/analytics/project_views/history/${encodeURIComponent(B)}`);
89264
- return V && ee.searchParams.append("start", V.toISOString()), G && ee.searchParams.append("end", G.toISOString()), ee.searchParams.append("granularity", Y), ee.searchParams.append("limit", H.toString()), await fetch(ee.toString(), {
89263
+ const ee = new URLSearchParams();
89264
+ V && ee.append("start", V.toISOString()), G && ee.append("end", G.toISOString()), ee.append("granularity", Y), ee.append("limit", H.toString());
89265
+ const le = `${t}/analytics/project_views/history/${encodeURIComponent(B)}?${ee.toString()}`;
89266
+ return await fetch(le, {
89265
89267
  method: "GET",
89266
89268
  headers: {
89267
89269
  "Content-Type": "application/json"
@@ -8072,7 +8072,7 @@ object-assign
8072
8072
  */var Mr=typeof Symbol=="function"&&Symbol.for,_Q=Mr?Symbol.for("react.element"):60103,wQ=Mr?Symbol.for("react.portal"):60106,mj=Mr?Symbol.for("react.fragment"):60107,_j=Mr?Symbol.for("react.strict_mode"):60108,wj=Mr?Symbol.for("react.profiler"):60114,bj=Mr?Symbol.for("react.provider"):60109,kj=Mr?Symbol.for("react.context"):60110,bQ=Mr?Symbol.for("react.async_mode"):60111,xj=Mr?Symbol.for("react.concurrent_mode"):60111,Sj=Mr?Symbol.for("react.forward_ref"):60112,Mj=Mr?Symbol.for("react.suspense"):60113,Git=Mr?Symbol.for("react.suspense_list"):60120,Cj=Mr?Symbol.for("react.memo"):60115,Nj=Mr?Symbol.for("react.lazy"):60116,Wit=Mr?Symbol.for("react.block"):60121,Uit=Mr?Symbol.for("react.fundamental"):60117,Yit=Mr?Symbol.for("react.responder"):60118,Xit=Mr?Symbol.for("react.scope"):60119;function Ja(e){if(typeof e=="object"&&e!==null){var t=e.$$typeof;switch(t){case _Q:switch(e=e.type,e){case bQ:case xj:case mj:case wj:case _j:case Mj:return e;default:switch(e=e&&e.$$typeof,e){case kj:case Sj:case Nj:case Cj:case bj:return e;default:return t}}case wQ:return t}}}function R_e(e){return Ja(e)===xj}pn.AsyncMode=bQ,pn.ConcurrentMode=xj,pn.ContextConsumer=kj,pn.ContextProvider=bj,pn.Element=_Q,pn.ForwardRef=Sj,pn.Fragment=mj,pn.Lazy=Nj,pn.Memo=Cj,pn.Portal=wQ,pn.Profiler=wj,pn.StrictMode=_j,pn.Suspense=Mj,pn.isAsyncMode=function(e){return R_e(e)||Ja(e)===bQ},pn.isConcurrentMode=R_e,pn.isContextConsumer=function(e){return Ja(e)===kj},pn.isContextProvider=function(e){return Ja(e)===bj},pn.isElement=function(e){return typeof e=="object"&&e!==null&&e.$$typeof===_Q},pn.isForwardRef=function(e){return Ja(e)===Sj},pn.isFragment=function(e){return Ja(e)===mj},pn.isLazy=function(e){return Ja(e)===Nj},pn.isMemo=function(e){return Ja(e)===Cj},pn.isPortal=function(e){return Ja(e)===wQ},pn.isProfiler=function(e){return Ja(e)===wj},pn.isStrictMode=function(e){return Ja(e)===_j},pn.isSuspense=function(e){return Ja(e)===Mj},pn.isValidElementType=function(e){return typeof e=="string"||typeof e=="function"||e===mj||e===xj||e===wj||e===_j||e===Mj||e===Git||typeof e=="object"&&e!==null&&(e.$$typeof===Nj||e.$$typeof===Cj||e.$$typeof===bj||e.$$typeof===kj||e.$$typeof===Sj||e.$$typeof===Uit||e.$$typeof===Yit||e.$$typeof===Xit||e.$$typeof===Wit)},pn.typeOf=Ja,P_e.exports=pn;var kQ=P_e.exports;function Zit(e){function t(X,q,te,ce,ee){for(var he=0,K=0,se=0,fe=0,oe,ae,Z=0,U=0,le,me=le=oe=0,_e=0,Y=0,ie=0,de=0,Ie=te.length,ye=Ie-1,xe,Le="",Fe="",Tt="",G="",E;_e<Ie;){if(ae=te.charCodeAt(_e),_e===ye&&K+fe+se+he!==0&&(K!==0&&(ae=K===47?10:47),fe=se=he=0,Ie++,ye++),K+fe+se+he===0){if(_e===ye&&(0<Y&&(Le=Le.replace(h,"")),0<Le.trim().length)){switch(ae){case 32:case 9:case 59:case 13:case 10:break;default:Le+=te.charAt(_e)}ae=59}switch(ae){case 123:for(Le=Le.trim(),oe=Le.charCodeAt(0),le=1,de=++_e;_e<Ie;){switch(ae=te.charCodeAt(_e)){case 123:le++;break;case 125:le--;break;case 47:switch(ae=te.charCodeAt(_e+1)){case 42:case 47:e:{for(me=_e+1;me<ye;++me)switch(te.charCodeAt(me)){case 47:if(ae===42&&te.charCodeAt(me-1)===42&&_e+2!==me){_e=me+1;break e}break;case 10:if(ae===47){_e=me+1;break e}}_e=me}}break;case 91:ae++;case 40:ae++;case 34:case 39:for(;_e++<ye&&te.charCodeAt(_e)!==ae;);}if(le===0)break;_e++}switch(le=te.substring(de,_e),oe===0&&(oe=(Le=Le.replace(d,"").trim()).charCodeAt(0)),oe){case 64:switch(0<Y&&(Le=Le.replace(h,"")),ae=Le.charCodeAt(1),ae){case 100:case 109:case 115:case 45:Y=q;break;default:Y=F}if(le=t(q,Y,le,ae,ee+1),de=le.length,0<B&&(Y=n(F,Le,ie),E=s(3,le,Y,q,T,P,de,ae,ee,ce),Le=Y.join(""),E!==void 0&&(de=(le=E.trim()).length)===0&&(ae=0,le="")),0<de)switch(ae){case 115:Le=Le.replace(x,o);case 100:case 109:case 45:le=Le+"{"+le+"}";break;case 107:Le=Le.replace(m,"$1 $2"),le=Le+"{"+le+"}",le=O===1||O===2&&i("@"+le,3)?"@-webkit-"+le+"@"+le:"@"+le;break;default:le=Le+le,ce===112&&(le=(Fe+=le,""))}else le="";break;default:le=t(q,n(q,Le,ie),le,ce,ee+1)}Tt+=le,le=ie=Y=me=oe=0,Le="",ae=te.charCodeAt(++_e);break;case 125:case 59:if(Le=(0<Y?Le.replace(h,""):Le).trim(),1<(de=Le.length))switch(me===0&&(oe=Le.charCodeAt(0),oe===45||96<oe&&123>oe)&&(de=(Le=Le.replace(" ",":")).length),0<B&&(E=s(1,Le,q,X,T,P,Fe.length,ce,ee,ce))!==void 0&&(de=(Le=E.trim()).length)===0&&(Le="\0\0"),oe=Le.charCodeAt(0),ae=Le.charCodeAt(1),oe){case 0:break;case 64:if(ae===105||ae===99){G+=Le+te.charAt(_e);break}default:Le.charCodeAt(de-1)!==58&&(Fe+=a(Le,oe,ae,Le.charCodeAt(2)))}ie=Y=me=oe=0,Le="",ae=te.charCodeAt(++_e)}}switch(ae){case 13:case 10:K===47?K=0:1+oe===0&&ce!==107&&0<Le.length&&(Y=1,Le+="\0"),0<B*j&&s(0,Le,q,X,T,P,Fe.length,ce,ee,ce),P=1,T++;break;case 59:case 125:if(K+fe+se+he===0){P++;break}default:switch(P++,xe=te.charAt(_e),ae){case 9:case 32:if(fe+he+K===0)switch(Z){case 44:case 58:case 9:case 32:xe="";break;default:ae!==32&&(xe=" ")}break;case 0:xe="\\0";break;case 12:xe="\\f";break;case 11:xe="\\v";break;case 38:fe+K+he===0&&(Y=ie=1,xe="\f"+xe);break;case 108:if(fe+K+he+$===0&&0<me)switch(_e-me){case 2:Z===112&&te.charCodeAt(_e-3)===58&&($=Z);case 8:U===111&&($=U)}break;case 58:fe+K+he===0&&(me=_e);break;case 44:K+se+fe+he===0&&(Y=1,xe+="\r");break;case 34:case 39:K===0&&(fe=fe===ae?0:fe===0?ae:fe);break;case 91:fe+K+se===0&&he++;break;case 93:fe+K+se===0&&he--;break;case 41:fe+K+he===0&&se--;break;case 40:if(fe+K+he===0){if(oe===0)switch(2*Z+3*U){case 533:break;default:oe=1}se++}break;case 64:K+se+fe+he+me+le===0&&(le=1);break;case 42:case 47:if(!(0<fe+he+se))switch(K){case 0:switch(2*ae+3*te.charCodeAt(_e+1)){case 235:K=47;break;case 220:de=_e,K=42}break;case 42:ae===47&&Z===42&&de+2!==_e&&(te.charCodeAt(de+2)===33&&(Fe+=te.substring(de,_e+1)),xe="",K=0)}}K===0&&(Le+=xe)}U=Z,Z=ae,_e++}if(de=Fe.length,0<de){if(Y=q,0<B&&(E=s(2,Fe,Y,X,T,P,de,ce,ee,ce),E!==void 0&&(Fe=E).length===0))return G+Fe+Tt;if(Fe=Y.join(",")+"{"+Fe+"}",O*$!==0){switch(O!==2||i(Fe,2)||($=0),$){case 111:Fe=Fe.replace(b,":-moz-$1")+Fe;break;case 112:Fe=Fe.replace(_,"::-webkit-input-$1")+Fe.replace(_,"::-moz-$1")+Fe.replace(_,":-ms-input-$1")+Fe}$=0}}return G+Fe+Tt}function n(X,q,te){var ce=q.trim().split(y);q=ce;var ee=ce.length,he=X.length;switch(he){case 0:case 1:var K=0;for(X=he===0?"":X[0]+" ";K<ee;++K)q[K]=r(X,q[K],te).trim();break;default:var se=K=0;for(q=[];K<ee;++K)for(var fe=0;fe<he;++fe)q[se++]=r(X[fe]+" ",ce[K],te).trim()}return q}function r(X,q,te){var ce=q.charCodeAt(0);switch(33>ce&&(ce=(q=q.trim()).charCodeAt(0)),ce){case 38:return q.replace(g,"$1"+X.trim());case 58:return X.trim()+q.replace(g,"$1"+X.trim());default:if(0<1*te&&0<q.indexOf("\f"))return q.replace(g,(X.charCodeAt(0)===58?"":"$1")+X.trim())}return X+q}function a(X,q,te,ce){var ee=X+";",he=2*q+3*te+4*ce;if(he===944){X=ee.indexOf(":",9)+1;var K=ee.substring(X,ee.length-1).trim();return K=ee.substring(0,X).trim()+K+";",O===1||O===2&&i(K,1)?"-webkit-"+K+K:K}if(O===0||O===2&&!i(ee,1))return ee;switch(he){case 1015:return ee.charCodeAt(10)===97?"-webkit-"+ee+ee:ee;case 951:return ee.charCodeAt(3)===116?"-webkit-"+ee+ee:ee;case 963:return ee.charCodeAt(5)===110?"-webkit-"+ee+ee:ee;case 1009:if(ee.charCodeAt(4)!==100)break;case 969:case 942:return"-webkit-"+ee+ee;case 978:return"-webkit-"+ee+"-moz-"+ee+ee;case 1019:case 983:return"-webkit-"+ee+"-moz-"+ee+"-ms-"+ee+ee;case 883:if(ee.charCodeAt(8)===45)return"-webkit-"+ee+ee;if(0<ee.indexOf("image-set(",11))return ee.replace(A,"$1-webkit-$2")+ee;break;case 932:if(ee.charCodeAt(4)===45)switch(ee.charCodeAt(5)){case 103:return"-webkit-box-"+ee.replace("-grow","")+"-webkit-"+ee+"-ms-"+ee.replace("grow","positive")+ee;case 115:return"-webkit-"+ee+"-ms-"+ee.replace("shrink","negative")+ee;case 98:return"-webkit-"+ee+"-ms-"+ee.replace("basis","preferred-size")+ee}return"-webkit-"+ee+"-ms-"+ee+ee;case 964:return"-webkit-"+ee+"-ms-flex-"+ee+ee;case 1023:if(ee.charCodeAt(8)!==99)break;return K=ee.substring(ee.indexOf(":",15)).replace("flex-","").replace("space-between","justify"),"-webkit-box-pack"+K+"-webkit-"+ee+"-ms-flex-pack"+K+ee;case 1005:return p.test(ee)?ee.replace(f,":-webkit-")+ee.replace(f,":-moz-")+ee:ee;case 1e3:switch(K=ee.substring(13).trim(),q=K.indexOf("-")+1,K.charCodeAt(0)+K.charCodeAt(q)){case 226:K=ee.replace(k,"tb");break;case 232:K=ee.replace(k,"tb-rl");break;case 220:K=ee.replace(k,"lr");break;default:return ee}return"-webkit-"+ee+"-ms-"+K+ee;case 1017:if(ee.indexOf("sticky",9)===-1)break;case 975:switch(q=(ee=X).length-10,K=(ee.charCodeAt(q)===33?ee.substring(0,q):ee).substring(X.indexOf(":",7)+1).trim(),he=K.charCodeAt(0)+(K.charCodeAt(7)|0)){case 203:if(111>K.charCodeAt(8))break;case 115:ee=ee.replace(K,"-webkit-"+K)+";"+ee;break;case 207:case 102:ee=ee.replace(K,"-webkit-"+(102<he?"inline-":"")+"box")+";"+ee.replace(K,"-webkit-"+K)+";"+ee.replace(K,"-ms-"+K+"box")+";"+ee}return ee+";";case 938:if(ee.charCodeAt(5)===45)switch(ee.charCodeAt(6)){case 105:return K=ee.replace("-items",""),"-webkit-"+ee+"-webkit-box-"+K+"-ms-flex-"+K+ee;case 115:return"-webkit-"+ee+"-ms-flex-item-"+ee.replace(C,"")+ee;default:return"-webkit-"+ee+"-ms-flex-line-pack"+ee.replace("align-content","").replace(C,"")+ee}break;case 973:case 989:if(ee.charCodeAt(3)!==45||ee.charCodeAt(4)===122)break;case 931:case 953:if(L.test(X)===!0)return(K=X.substring(X.indexOf(":")+1)).charCodeAt(0)===115?a(X.replace("stretch","fill-available"),q,te,ce).replace(":fill-available",":stretch"):ee.replace(K,"-webkit-"+K)+ee.replace(K,"-moz-"+K.replace("fill-",""))+ee;break;case 962:if(ee="-webkit-"+ee+(ee.charCodeAt(5)===102?"-ms-"+ee:"")+ee,te+ce===211&&ee.charCodeAt(13)===105&&0<ee.indexOf("transform",10))return ee.substring(0,ee.indexOf(";",27)+1).replace(v,"$1-webkit-$2")+ee}return ee}function i(X,q){var te=X.indexOf(q===1?":":"{"),ce=X.substring(0,q!==3?te:10);return te=X.substring(te+1,X.length-1),V(q!==2?ce:ce.replace(N,"$1"),te,q)}function o(X,q){var te=a(q,q.charCodeAt(0),q.charCodeAt(1),q.charCodeAt(2));return te!==q+";"?te.replace(S," or ($1)").substring(4):"("+q+")"}function s(X,q,te,ce,ee,he,K,se,fe,oe){for(var ae=0,Z=q,U;ae<B;++ae)switch(U=H[ae].call(u,X,Z,te,ce,ee,he,K,se,fe,oe)){case void 0:case!1:case!0:case null:break;default:Z=U}if(Z!==q)return Z}function c(X){switch(X){case void 0:case null:B=H.length=0;break;default:if(typeof X=="function")H[B++]=X;else if(typeof X=="object")for(var q=0,te=X.length;q<te;++q)c(X[q]);else j=!!X|0}return c}function l(X){return X=X.prefix,X!==void 0&&(V=null,X?typeof X!="function"?O=1:(O=2,V=X):O=0),l}function u(X,q){var te=X;if(33>te.charCodeAt(0)&&(te=te.trim()),W=te,te=[W],0<B){var ce=s(-1,q,te,te,T,P,0,0,0,0);ce!==void 0&&typeof ce=="string"&&(q=ce)}var ee=t(F,te,q,0,0);return 0<B&&(ce=s(-2,ee,te,te,T,P,ee.length,0,0,0),ce!==void 0&&(ee=ce)),W="",$=0,P=T=1,ee}var d=/^\0+/g,h=/[\0\r\f]/g,f=/: */g,p=/zoo|gra/,v=/([,: ])(transform)/g,y=/,\r+?/g,g=/([\t\r\n ])*\f?&/g,m=/@(k\w+)\s*(\S*)\s*/,_=/::(place)/g,b=/:(read-only)/g,k=/[svh]\w+-[tblr]{2}/,x=/\(\s*(.*)\s*\)/g,S=/([\s\S]*?);/g,C=/-self|flex-/g,N=/[^]*?(:[rp][el]a[\w-]+)[^]*/,L=/stretch|:\s*\w+\-(?:conte|avail)/,A=/([^-])(image-set\()/,P=1,T=1,$=0,O=1,F=[],H=[],B=0,V=null,j=0,W="";return u.use=c,u.set=l,e!==void 0&&l(e),u}var Kit={animationIterationCount:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1};function Jit(e){var t=Object.create(null);return function(n){return t[n]===void 0&&(t[n]=e(n)),t[n]}}var Qit=/^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|abbr|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|disableRemotePlayback|download|draggable|encType|enterKeyHint|fetchpriority|fetchPriority|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|translate|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|incremental|fallback|inert|itemProp|itemScope|itemType|itemID|itemRef|on|option|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/,$_e=Jit(function(e){return Qit.test(e)||e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)<91}),xQ=kQ,eot={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},tot={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},not={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},O_e={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},SQ={};SQ[xQ.ForwardRef]=not,SQ[xQ.Memo]=O_e;function z_e(e){return xQ.isMemo(e)?O_e:SQ[e.$$typeof]||eot}var rot=Object.defineProperty,aot=Object.getOwnPropertyNames,F_e=Object.getOwnPropertySymbols,iot=Object.getOwnPropertyDescriptor,oot=Object.getPrototypeOf,B_e=Object.prototype;function V_e(e,t,n){if(typeof t!="string"){if(B_e){var r=oot(t);r&&r!==B_e&&V_e(e,r,n)}var a=aot(t);F_e&&(a=a.concat(F_e(t)));for(var i=z_e(e),o=z_e(t),s=0;s<a.length;++s){var c=a[s];if(!tot[c]&&!(n&&n[c])&&!(o&&o[c])&&!(i&&i[c])){var l=iot(t,c);try{rot(e,c,l)}catch{}}}}return e}var sot=V_e;const cot=Py(sot);function gc(){return(gc=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}var j_e=function(e,t){for(var n=[e[0]],r=0,a=t.length;r<a;r+=1)n.push(t[r],e[r+1]);return n},MQ=function(e){return e!==null&&typeof e=="object"&&(e.toString?e.toString():Object.prototype.toString.call(e))==="[object Object]"&&!kQ.typeOf(e)},Ij=Object.freeze([]),Al=Object.freeze({});function pm(e){return typeof e=="function"}function H_e(e){return e.displayName||e.name||"Component"}function CQ(e){return e&&typeof e.styledComponentId=="string"}var E0=typeof process<"u"&&process.env!==void 0&&(process.env.REACT_APP_SC_ATTR||process.env.SC_ATTR)||"data-styled",NQ=typeof window<"u"&&"HTMLElement"in window,lot=!!(typeof SC_DISABLE_SPEEDY=="boolean"?SC_DISABLE_SPEEDY:typeof process<"u"&&process.env!==void 0&&(process.env.REACT_APP_SC_DISABLE_SPEEDY!==void 0&&process.env.REACT_APP_SC_DISABLE_SPEEDY!==""?process.env.REACT_APP_SC_DISABLE_SPEEDY!=="false"&&process.env.REACT_APP_SC_DISABLE_SPEEDY:process.env.SC_DISABLE_SPEEDY!==void 0&&process.env.SC_DISABLE_SPEEDY!==""&&process.env.SC_DISABLE_SPEEDY!=="false"&&process.env.SC_DISABLE_SPEEDY));function vm(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];throw new Error("An error occurred. See https://git.io/JUIaE#"+e+" for more information."+(n.length>0?" Args: "+n.join(", "):""))}var uot=function(){function e(n){this.groupSizes=new Uint32Array(512),this.length=512,this.tag=n}var t=e.prototype;return t.indexOfGroup=function(n){for(var r=0,a=0;a<n;a++)r+=this.groupSizes[a];return r},t.insertRules=function(n,r){if(n>=this.groupSizes.length){for(var a=this.groupSizes,i=a.length,o=i;n>=o;)(o<<=1)<0&&vm(16,""+n);this.groupSizes=new Uint32Array(o),this.groupSizes.set(a),this.length=o;for(var s=i;s<o;s++)this.groupSizes[s]=0}for(var c=this.indexOfGroup(n+1),l=0,u=r.length;l<u;l++)this.tag.insertRule(c,r[l])&&(this.groupSizes[n]++,c++)},t.clearGroup=function(n){if(n<this.length){var r=this.groupSizes[n],a=this.indexOfGroup(n),i=a+r;this.groupSizes[n]=0;for(var o=a;o<i;o++)this.tag.deleteRule(a)}},t.getGroup=function(n){var r="";if(n>=this.length||this.groupSizes[n]===0)return r;for(var a=this.groupSizes[n],i=this.indexOfGroup(n),o=i+a,s=i;s<o;s++)r+=this.tag.getRule(s)+`/*!sc*/
8073
8073
  `;return r},e}(),Lj=new Map,Aj=new Map,ym=1,Tj=function(e){if(Lj.has(e))return Lj.get(e);for(;Aj.has(ym);)ym++;var t=ym++;return Lj.set(e,t),Aj.set(t,e),t},dot=function(e){return Aj.get(e)},hot=function(e,t){t>=ym&&(ym=t+1),Lj.set(e,t),Aj.set(t,e)},fot="style["+E0+'][data-styled-version="5.3.11"]',pot=new RegExp("^"+E0+'\\.g(\\d+)\\[id="([\\w\\d-]+)"\\].*?"([^"]*)'),vot=function(e,t,n){for(var r,a=n.split(","),i=0,o=a.length;i<o;i++)(r=a[i])&&e.registerName(t,r)},yot=function(e,t){for(var n=(t.textContent||"").split(`/*!sc*/
8074
8074
  `),r=[],a=0,i=n.length;a<i;a++){var o=n[a].trim();if(o){var s=o.match(pot);if(s){var c=0|parseInt(s[1],10),l=s[2];c!==0&&(hot(l,c),vot(e,l,s[3]),e.getTag().insertRules(c,r)),r.length=0}else r.push(o)}}},got=function(){return typeof __webpack_nonce__<"u"?__webpack_nonce__:null},q_e=function(e){var t=document.head,n=e||t,r=document.createElement("style"),a=function(s){for(var c=s.childNodes,l=c.length;l>=0;l--){var u=c[l];if(u&&u.nodeType===1&&u.hasAttribute(E0))return u}}(n),i=a!==void 0?a.nextSibling:null;r.setAttribute(E0,"active"),r.setAttribute("data-styled-version","5.3.11");var o=got();return o&&r.setAttribute("nonce",o),n.insertBefore(r,i),r},mot=function(){function e(n){var r=this.element=q_e(n);r.appendChild(document.createTextNode("")),this.sheet=function(a){if(a.sheet)return a.sheet;for(var i=document.styleSheets,o=0,s=i.length;o<s;o++){var c=i[o];if(c.ownerNode===a)return c}vm(17)}(r),this.length=0}var t=e.prototype;return t.insertRule=function(n,r){try{return this.sheet.insertRule(r,n),this.length++,!0}catch{return!1}},t.deleteRule=function(n){this.sheet.deleteRule(n),this.length--},t.getRule=function(n){var r=this.sheet.cssRules[n];return r!==void 0&&typeof r.cssText=="string"?r.cssText:""},e}(),_ot=function(){function e(n){var r=this.element=q_e(n);this.nodes=r.childNodes,this.length=0}var t=e.prototype;return t.insertRule=function(n,r){if(n<=this.length&&n>=0){var a=document.createTextNode(r),i=this.nodes[n];return this.element.insertBefore(a,i||null),this.length++,!0}return!1},t.deleteRule=function(n){this.element.removeChild(this.nodes[n]),this.length--},t.getRule=function(n){return n<this.length?this.nodes[n].textContent:""},e}(),wot=function(){function e(n){this.rules=[],this.length=0}var t=e.prototype;return t.insertRule=function(n,r){return n<=this.length&&(this.rules.splice(n,0,r),this.length++,!0)},t.deleteRule=function(n){this.rules.splice(n,1),this.length--},t.getRule=function(n){return n<this.length?this.rules[n]:""},e}(),G_e=NQ,bot={isServer:!NQ,useCSSOMInjection:!lot},W_e=function(){function e(n,r,a){n===void 0&&(n=Al),r===void 0&&(r={}),this.options=gc({},bot,{},n),this.gs=r,this.names=new Map(a),this.server=!!n.isServer,!this.server&&NQ&&G_e&&(G_e=!1,function(i){for(var o=document.querySelectorAll(fot),s=0,c=o.length;s<c;s++){var l=o[s];l&&l.getAttribute(E0)!=="active"&&(yot(i,l),l.parentNode&&l.parentNode.removeChild(l))}}(this))}e.registerId=function(n){return Tj(n)};var t=e.prototype;return t.reconstructWithOptions=function(n,r){return r===void 0&&(r=!0),new e(gc({},this.options,{},n),this.gs,r&&this.names||void 0)},t.allocateGSInstance=function(n){return this.gs[n]=(this.gs[n]||0)+1},t.getTag=function(){return this.tag||(this.tag=(a=(r=this.options).isServer,i=r.useCSSOMInjection,o=r.target,n=a?new wot(o):i?new mot(o):new _ot(o),new uot(n)));var n,r,a,i,o},t.hasNameForId=function(n,r){return this.names.has(n)&&this.names.get(n).has(r)},t.registerName=function(n,r){if(Tj(n),this.names.has(n))this.names.get(n).add(r);else{var a=new Set;a.add(r),this.names.set(n,a)}},t.insertRules=function(n,r,a){this.registerName(n,r),this.getTag().insertRules(Tj(n),a)},t.clearNames=function(n){this.names.has(n)&&this.names.get(n).clear()},t.clearRules=function(n){this.getTag().clearGroup(Tj(n)),this.clearNames(n)},t.clearTag=function(){this.tag=void 0},t.toString=function(){return function(n){for(var r=n.getTag(),a=r.length,i="",o=0;o<a;o++){var s=dot(o);if(s!==void 0){var c=n.names.get(s),l=r.getGroup(o);if(c&&l&&c.size){var u=E0+".g"+o+'[id="'+s+'"]',d="";c!==void 0&&c.forEach(function(h){h.length>0&&(d+=h+",")}),i+=""+l+u+'{content:"'+d+`"}/*!sc*/
8075
- `}}}return i}(this)},e}(),kot=/(a)(d)/gi,U_e=function(e){return String.fromCharCode(e+(e>25?39:97))};function IQ(e){var t,n="";for(t=Math.abs(e);t>52;t=t/52|0)n=U_e(t%52)+n;return(U_e(t%52)+n).replace(kot,"$1-$2")}var D0=function(e,t){for(var n=t.length;n;)e=33*e^t.charCodeAt(--n);return e},Y_e=function(e){return D0(5381,e)};function xot(e){for(var t=0;t<e.length;t+=1){var n=e[t];if(pm(n)&&!CQ(n))return!1}return!0}var Sot=Y_e("5.3.11"),Mot=function(){function e(t,n,r){this.rules=t,this.staticRulesId="",this.isStatic=(r===void 0||r.isStatic)&&xot(t),this.componentId=n,this.baseHash=D0(Sot,n),this.baseStyle=r,W_e.registerId(n)}return e.prototype.generateAndInjectStyles=function(t,n,r){var a=this.componentId,i=[];if(this.baseStyle&&i.push(this.baseStyle.generateAndInjectStyles(t,n,r)),this.isStatic&&!r.hash)if(this.staticRulesId&&n.hasNameForId(a,this.staticRulesId))i.push(this.staticRulesId);else{var o=P0(this.rules,t,n,r).join(""),s=IQ(D0(this.baseHash,o)>>>0);if(!n.hasNameForId(a,s)){var c=r(o,"."+s,void 0,a);n.insertRules(a,s,c)}i.push(s),this.staticRulesId=s}else{for(var l=this.rules.length,u=D0(this.baseHash,r.hash),d="",h=0;h<l;h++){var f=this.rules[h];if(typeof f=="string")d+=f;else if(f){var p=P0(f,t,n,r),v=Array.isArray(p)?p.join(""):p;u=D0(u,v+h),d+=v}}if(d){var y=IQ(u>>>0);if(!n.hasNameForId(a,y)){var g=r(d,"."+y,void 0,a);n.insertRules(a,y,g)}i.push(y)}}return i.join(" ")},e}(),Cot=/^\s*\/\/.*$/gm,Not=[":","[",".","#"];function Iot(e){var t,n,r,a,i=Al,o=i.options,s=o===void 0?Al:o,c=i.plugins,l=c===void 0?Ij:c,u=new Zit(s),d=[],h=function(v){function y(g){if(g)try{v(g+"}")}catch{}}return function(g,m,_,b,k,x,S,C,N,L){switch(g){case 1:if(N===0&&m.charCodeAt(0)===64)return v(m+";"),"";break;case 2:if(C===0)return m+"/*|*/";break;case 3:switch(C){case 102:case 112:return v(_[0]+m),"";default:return m+(L===0?"/*|*/":"")}case-2:m.split("/*|*/}").forEach(y)}}}(function(v){d.push(v)}),f=function(v,y,g){return y===0&&Not.indexOf(g[n.length])!==-1||g.match(a)?v:"."+t};function p(v,y,g,m){m===void 0&&(m="&");var _=v.replace(Cot,""),b=y&&g?g+" "+y+" { "+_+" }":_;return t=m,n=y,r=new RegExp("\\"+n+"\\b","g"),a=new RegExp("(\\"+n+"\\b){2,}"),u(g||!y?"":y,b)}return u.use([].concat(l,[function(v,y,g){v===2&&g.length&&g[0].lastIndexOf(n)>0&&(g[0]=g[0].replace(r,f))},h,function(v){if(v===-2){var y=d;return d=[],y}}])),p.hash=l.length?l.reduce(function(v,y){return y.name||vm(15),D0(v,y.name)},5381).toString():"",p}var X_e=D.createContext();X_e.Consumer;var Z_e=D.createContext(),Lot=(Z_e.Consumer,new W_e),LQ=Iot();function Aot(){return D.useContext(X_e)||Lot}function Tot(){return D.useContext(Z_e)||LQ}var Eot=function(){function e(t,n){var r=this;this.inject=function(a,i){i===void 0&&(i=LQ);var o=r.name+i.hash;a.hasNameForId(r.id,o)||a.insertRules(r.id,o,i(r.rules,o,"@keyframes"))},this.toString=function(){return vm(12,String(r.name))},this.name=t,this.id="sc-keyframes-"+t,this.rules=n}return e.prototype.getName=function(t){return t===void 0&&(t=LQ),this.name+t.hash},e}(),Dot=/([A-Z])/,Pot=/([A-Z])/g,Rot=/^ms-/,$ot=function(e){return"-"+e.toLowerCase()};function K_e(e){return Dot.test(e)?e.replace(Pot,$ot).replace(Rot,"-ms-"):e}var J_e=function(e){return e==null||e===!1||e===""};function P0(e,t,n,r){if(Array.isArray(e)){for(var a,i=[],o=0,s=e.length;o<s;o+=1)(a=P0(e[o],t,n,r))!==""&&(Array.isArray(a)?i.push.apply(i,a):i.push(a));return i}if(J_e(e))return"";if(CQ(e))return"."+e.styledComponentId;if(pm(e)){if(typeof(l=e)!="function"||l.prototype&&l.prototype.isReactComponent||!t)return e;var c=e(t);return P0(c,t,n,r)}var l;return e instanceof Eot?n?(e.inject(n,r),e.getName(r)):e:MQ(e)?function u(d,h){var f,p,v=[];for(var y in d)d.hasOwnProperty(y)&&!J_e(d[y])&&(Array.isArray(d[y])&&d[y].isCss||pm(d[y])?v.push(K_e(y)+":",d[y],";"):MQ(d[y])?v.push.apply(v,u(d[y],y)):v.push(K_e(y)+": "+(f=y,(p=d[y])==null||typeof p=="boolean"||p===""?"":typeof p!="number"||p===0||f in Kit||f.startsWith("--")?String(p).trim():p+"px")+";"));return h?[h+" {"].concat(v,["}"]):v}(e):e.toString()}var Q_e=function(e){return Array.isArray(e)&&(e.isCss=!0),e};function Oot(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return pm(e)||MQ(e)?Q_e(P0(j_e(Ij,[e].concat(n)))):n.length===0&&e.length===1&&typeof e[0]=="string"?e:Q_e(P0(j_e(e,n)))}var zot=function(e,t,n){return n===void 0&&(n=Al),e.theme!==n.theme&&e.theme||t||n.theme},Fot=/[!"#$%&'()*+,./:;<=>?@[\\\]^`{|}~-]+/g,Bot=/(^-|-$)/g;function AQ(e){return e.replace(Fot,"-").replace(Bot,"")}var Vot=function(e){return IQ(Y_e(e)>>>0)};function Ej(e){return typeof e=="string"&&!0}var TQ=function(e){return typeof e=="function"||typeof e=="object"&&e!==null&&!Array.isArray(e)},jot=function(e){return e!=="__proto__"&&e!=="constructor"&&e!=="prototype"};function Hot(e,t,n){var r=e[n];TQ(t)&&TQ(r)?ewe(r,t):e[n]=t}function ewe(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];for(var a=0,i=n;a<i.length;a++){var o=i[a];if(TQ(o))for(var s in o)jot(s)&&Hot(e,o[s],s)}return e}var twe=D.createContext();twe.Consumer;var EQ={};function nwe(e,t,n){var r=CQ(e),a=!Ej(e),i=t.attrs,o=i===void 0?Ij:i,s=t.componentId,c=s===void 0?function(m,_){var b=typeof m!="string"?"sc":AQ(m);EQ[b]=(EQ[b]||0)+1;var k=b+"-"+Vot("5.3.11"+b+EQ[b]);return _?_+"-"+k:k}(t.displayName,t.parentComponentId):s,l=t.displayName,u=l===void 0?function(m){return Ej(m)?"styled."+m:"Styled("+H_e(m)+")"}(e):l,d=t.displayName&&t.componentId?AQ(t.displayName)+"-"+t.componentId:t.componentId||c,h=r&&e.attrs?Array.prototype.concat(e.attrs,o).filter(Boolean):o,f=t.shouldForwardProp;r&&e.shouldForwardProp&&(f=t.shouldForwardProp?function(m,_,b){return e.shouldForwardProp(m,_,b)&&t.shouldForwardProp(m,_,b)}:e.shouldForwardProp);var p,v=new Mot(n,d,r?e.componentStyle:void 0),y=v.isStatic&&o.length===0,g=function(m,_){return function(b,k,x,S){var C=b.attrs,N=b.componentStyle,L=b.defaultProps,A=b.foldedComponentIds,P=b.shouldForwardProp,T=b.styledComponentId,$=b.target,O=function(ce,ee,he){ce===void 0&&(ce=Al);var K=gc({},ee,{theme:ce}),se={};return he.forEach(function(fe){var oe,ae,Z,U=fe;for(oe in pm(U)&&(U=U(K)),U)K[oe]=se[oe]=oe==="className"?(ae=se[oe],Z=U[oe],ae&&Z?ae+" "+Z:ae||Z):U[oe]}),[K,se]}(zot(k,D.useContext(twe),L)||Al,k,C),F=O[0],H=O[1],B=function(ce,ee,he,K){var se=Aot(),fe=Tot(),oe=ee?ce.generateAndInjectStyles(Al,se,fe):ce.generateAndInjectStyles(he,se,fe);return oe}(N,S,F),V=x,j=H.$as||k.$as||H.as||k.as||$,W=Ej(j),X=H!==k?gc({},k,{},H):k,q={};for(var te in X)te[0]!=="$"&&te!=="as"&&(te==="forwardedAs"?q.as=X[te]:(P?P(te,$_e,j):!W||$_e(te))&&(q[te]=X[te]));return k.style&&H.style!==k.style&&(q.style=gc({},k.style,{},H.style)),q.className=Array.prototype.concat(A,T,B!==T?B:null,k.className,H.className).filter(Boolean).join(" "),q.ref=V,D.createElement(j,q)}(p,m,_,y)};return g.displayName=u,(p=D.forwardRef(g)).attrs=h,p.componentStyle=v,p.displayName=u,p.shouldForwardProp=f,p.foldedComponentIds=r?Array.prototype.concat(e.foldedComponentIds,e.styledComponentId):Ij,p.styledComponentId=d,p.target=r?e.target:e,p.withComponent=function(m){var _=t.componentId,b=function(x,S){if(x==null)return{};var C,N,L={},A=Object.keys(x);for(N=0;N<A.length;N++)C=A[N],S.indexOf(C)>=0||(L[C]=x[C]);return L}(t,["componentId"]),k=_&&_+"-"+(Ej(m)?m:AQ(H_e(m)));return nwe(m,gc({},b,{attrs:h,componentId:k}),n)},Object.defineProperty(p,"defaultProps",{get:function(){return this._foldedDefaultProps},set:function(m){this._foldedDefaultProps=r?ewe({},e.defaultProps,m):m}}),Object.defineProperty(p,"toString",{value:function(){return"."+p.styledComponentId}}),a&&cot(p,e,{attrs:!0,componentStyle:!0,displayName:!0,foldedComponentIds:!0,shouldForwardProp:!0,styledComponentId:!0,target:!0,withComponent:!0}),p}var Tl=function(e){return function t(n,r,a){if(a===void 0&&(a=Al),!kQ.isValidElementType(r))return vm(1,String(r));var i=function(){return n(r,a,Oot.apply(void 0,arguments))};return i.withConfig=function(o){return t(n,r,gc({},a,{},o))},i.attrs=function(o){return t(n,r,gc({},a,{attrs:Array.prototype.concat(a.attrs,o).filter(Boolean)}))},i}(nwe,e)};["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","big","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","marquee","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","title","tr","track","u","ul","var","video","wbr","circle","clipPath","defs","ellipse","foreignObject","g","image","line","linearGradient","marker","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","text","textPath","tspan"].forEach(function(e){Tl[e]=Tl(e)});const rwe=D.createContext(null),awe=()=>{const e=D.useContext(rwe);if(!e)throw new Error("useAPI must be used within an APIProvider");return e},qot=({children:e})=>{const[t,n]=D.useState(0),r=D.useCallback(async i=>{n(o=>o+1);try{return await i}finally{n(o=>Math.max(0,o-1))}},[]),a=D.useCallback(async(i,o)=>(n(s=>s+1),new Promise((s,c)=>{const l=i(),u=()=>{n(d=>Math.max(0,d-1))};l.addEventListener("load",()=>{if(u(),l.status>=200&&l.status<300)try{const d=o(l);s(d)}catch(d){c(d)}else c(new Error(`Request failed with status ${l.status}`))}),l.addEventListener("error",()=>{u(),c(new Error("Network error occurred"))}),l.addEventListener("abort",()=>{u(),c(new Error("Request cancelled"))})})),[]);return M.jsx(rwe.Provider,{value:{isLoading:t>0,wrapAPICall:r,wrapXHRCall:a},children:e})},iwe=D.createContext(null),DQ=()=>{const e=D.useContext(iwe);if(!e)throw new Error("useRGContext must be used within a RGProvider");return e},owe=e=>{const{children:t}=e,[n,r]=D.useState({w:1,h:1}),a=o=>{r(o)},i=()=>{r({w:1,h:1})};return M.jsx(iwe.Provider,{value:{activeCompDimension:n,onDragStart:a,onDragStop:i},children:t})};for(var zr=[],PQ=0;PQ<256;++PQ)zr.push((PQ+256).toString(16).slice(1));function Got(e,t=0){return(zr[e[t+0]]+zr[e[t+1]]+zr[e[t+2]]+zr[e[t+3]]+"-"+zr[e[t+4]]+zr[e[t+5]]+"-"+zr[e[t+6]]+zr[e[t+7]]+"-"+zr[e[t+8]]+zr[e[t+9]]+"-"+zr[e[t+10]]+zr[e[t+11]]+zr[e[t+12]]+zr[e[t+13]]+zr[e[t+14]]+zr[e[t+15]]).toLowerCase()}var Dj,Wot=new Uint8Array(16);function Uot(){if(!Dj&&(Dj=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!Dj))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return Dj(Wot)}var Yot=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto);const swe={randomUUID:Yot};function cwe(e,t,n){if(swe.randomUUID&&!e)return swe.randomUUID();e=e||{};var r=e.random||(e.rng||Uot)();return r[6]=r[6]&15|64,r[8]=r[8]&63|128,Got(r)}const RQ=e=>{const t=e;return{createProject:async(V,j,W,X=[])=>{const q=new FormData;q.append("description",V),q.append("theme",j),W&&q.append("background_image",W);const te=Array.isArray(X)?X:[X];for(const ce of te)q.append("secret_references",ce);return await fetch(`${t}/create_project`,{method:"POST",body:q})},createBlankProject:async(V,j,W,X=[])=>{const q=new FormData;q.append("description",V),q.append("theme",j),W&&q.append("background_image",W);const te=Array.isArray(X)?X:[X];for(const ce of te)q.append("secret_references",ce);return await fetch(`${t}/create_blank_project`,{method:"POST",body:q})},getProjects:async(V=!1)=>{let j=`${t}/fetch_projects`;return V&&(j+="?include_published_info=true"),await fetch(j,{method:"GET",headers:{"Content-Type":"application/json"}})},getProjectMetadata:async V=>await fetch(`${t}/project/${V}`,{method:"GET",headers:{"Content-Type":"application/json"}}),getSubdomains:async V=>await fetch(`${t}/subdomains?project_name=${V}`,{method:"GET",headers:{"Content-Type":"application/json"}}),allocateSubdomain:async(V,j)=>{const W={project_name:V,subdomain:j};return await fetch(`${t}/allocate_subdomain`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(W)})},updateSubdomain:async(V,j)=>{const W={project_name:V,subdomain:j};return await fetch(`${t}/update_subdomain`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(W)})},releaseSubdomain:async(V,j)=>{const W={project_name:V,subdomain:j};return await fetch(`${t}/release_subdomain`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(W)})},publishProject:async(V,j)=>{const W={project_name:V,git_ref:j};return await fetch(`${t}/publish_project`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(W)})},unpublishProject:async V=>{const j={project_name:V};return await fetch(`${t}/unpublish_project`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(j)})},tagCommit:async(V,j,W)=>{const X={project_name:V,commit_hash:j,tag_name:W};return await fetch(`${t}/tag_project_commit`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(X)})},getComponentLibrary:async()=>await fetch(`${t}/library_components?namespaces=example`,{method:"GET",headers:{"Content-Type":"application/json"}}),addProjectComponent:async(V,j,W,X)=>{const q={project_name:V,component_namespace:j,component_name:W,layout_metadata:X};return await fetch(`${t}/add_project_component`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(q)})},addProjectChart:async(V,j,W)=>{const X={project_name:V,visual_id:j,layout_metadata:W};return await fetch(`${t}/add_project_chart`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(X)})},updateProjectComponentLayoutMetadata:async(V,j,W)=>{const X={project_name:V,component_id:j,layout_metadata:W};return await fetch(`${t}/update_project_component_layout_metadata`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(X)})},updateProjectComponentSourceCode:async(V,j,W)=>{const X={project_name:V,component_id:j,source_code:W};return await fetch(`${t}/update_project_component_source_code`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(X)})},updateApplicationMetadata:async(V,j,W,X)=>{const q={project_name:V,application_name:j,application_description:W,application_category:X};return await fetch(`${t}/update_application_metadata`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(q)})},updateApplicationSettings:async(V,j=null,W=null)=>{const X={project_name:V,application_login_enabled:j,default_deployment_chain_reference:W};return await fetch(`${t}/update_application_settings`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(X)})},updateProjectFile:async(V,j,W,X)=>{const q={file_path:V,project_name:j,source_code:W};return await fetch(`${t}/update_project_file`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(q),signal:X})},updateProjectFiles:async(V,j)=>{const W=V.map(X=>({project_name:X.projectName,file_path:X.filePath,source_code:X.fileContent}));return await fetch(`${t}/update_project_files`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(W),signal:j})},deleteProjectComponent:async(V,j)=>{const W={project_name:V,file_path:j};return await fetch(`${t}/delete_project_component`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(W)})},deleteProjectFile:async(V,j)=>{const W={project_name:V,file_path:j};return await fetch(`${t}/delete_project_file`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(W)})},resetProjectFile:async(V,j,W,X,q)=>{let te={project_name:V,file_path:j,git_ref:W};return X&&(te.prune=X),q&&(te.extra_metadata=q),await fetch(`${t}/reset_project_file`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(te)})},deleteProject:async V=>{const j={projects:[V]};return await fetch(`${t}/delete_projects`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(j)})},requestErrorCorrection:async(V,j,W)=>{const X={project_name:V,component_id:j,error_message:W};return await fetch(`${t}/error_correction`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(X)})},addImage:async V=>await fetch(`${t}/add_image`,{method:"POST",body:V}),editElement:async V=>{const j={project_name:V.projectName,component_id:V.componentId,element_xpath:V.elementXPath,style_request:V.styleRequest||null,text_request:V.textRequest||null,background_image_request:V.backgroundImageRequest||null,dom_tree_repr:V.domTreeRepr};return await fetch(`${t}/edit_element`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(j)})},initializeProject:async V=>await fetch(`${t}/initialize_project/${V}`,{method:"POST",headers:{"Content-Type":"application/json"}}),getUserSpendAnalytics:async()=>await fetch(`${t}/analytics/user_spend`,{method:"GET",headers:{"Content-Type":"application/json"}}),getCreatorPointsSum:async V=>{let j=`${t}/analytics/creator_points/sum`;return V&&(j+=`?project_name=${encodeURIComponent(V)}`),await fetch(j,{method:"GET",headers:{"Content-Type":"application/json"}})},getCreatorPointsTop:async(V=20)=>await fetch(`${t}/analytics/creator_points/top?n=${V}`,{method:"GET",headers:{"Content-Type":"application/json"}}),getProjectViewsHistory:async(V,j,W,X="day",q=500)=>{const te=new URL(`${t}/analytics/project_views/history/${encodeURIComponent(V)}`);return j&&te.searchParams.append("start",j.toISOString()),W&&te.searchParams.append("end",W.toISOString()),te.searchParams.append("granularity",X),te.searchParams.append("limit",q.toString()),await fetch(te.toString(),{method:"GET",headers:{"Content-Type":"application/json"}})},getProjectViewsTop:async(V=20)=>await fetch(`${t}/analytics/project_views/top?n=${V}`,{method:"GET",headers:{"Content-Type":"application/json"}})}},lwe=e=>{const t=e;return{getQueryContent:async i=>await fetch(`${t}/v1/public/sql/content-queries`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({queryId:i,biscuits:[]})}),getVisuals:async(i,o,s,c,l,u,d,h)=>{const f=new URLSearchParams({pageNo:i.toString(),pageSize:o.toString(),scope:s,searchPattern:c,sortBy:l,sortOrder:u,visibility:d,visualType:h}).toString();return await fetch(`${t}/v2/content/visuals?${f}`,{method:"GET",headers:{"Content-Type":"application/json"}})},getSubscription:async()=>await fetch(`${t}/v1/subscription`,{method:"GET",headers:{"Content-Type":"application/json"}})}},$Q=(e,t)=>{const n=e,r=(C=!1,N)=>{const L={"Content-Type":"application/json"};if(C){const A=N||t;A&&(L["x-sxt-project-hmac"]=A)}return L};return{getSecrets:async()=>await fetch(`${n}/config/secrets`,{method:"GET",headers:r(!1)}),putSecret:async(C,N)=>await fetch(`${n}/config/secrets/${C}`,{method:"PUT",headers:r(!1),body:JSON.stringify(N)}),patchSecret:async(C,N)=>await fetch(`${n}/config/secrets/${C}`,{method:"PATCH",headers:r(!1),body:JSON.stringify(N)}),getSecret:async C=>await fetch(`${n}/config/secrets/${C}`,{method:"GET",headers:r(!1)}),deleteSecret:async C=>await fetch(`${n}/config/secrets/${C}`,{method:"DELETE",headers:r(!1)}),getAllTierKeyMaps:async()=>await fetch(`${n}/config/miniapps/*/tier-key-map`,{method:"GET",headers:r(!1)}),getTierKeyMap:async(C,N)=>await fetch(`${n}/config/miniapps/${C}/tier-key-map`,{method:"GET",headers:r(!0,N)}),putTierKeyMap:async(C,N,L,A)=>await fetch(`${n}/config/miniapps/${C}/tier-key-map/${N}`,{method:"PUT",headers:r(!0,A),body:JSON.stringify({secret_reference:L})}),getTierKeyMapForTier:async(C,N,L)=>await fetch(`${n}/config/miniapps/${C}/tier-key-map/${N}`,{method:"GET",headers:r(!0,L)}),deleteTierKeyMap:async(C,N,L,A)=>await fetch(`${n}/config/miniapps/${C}/tier-key-map/${N}/${L}`,{method:"DELETE",headers:r(!0,A)}),getTierAssignments:async(C,N)=>await fetch(`${n}/config/miniapps/${C}/assignments`,{method:"GET",headers:r(!0,N)}),putTierAssignment:async(C,N,L,A)=>await fetch(`${n}/config/miniapps/${C}/assignments/${N}`,{method:"PUT",headers:r(!0,A),body:JSON.stringify({tier:L})}),getTierAssignment:async(C,N,L)=>await fetch(`${n}/config/miniapps/${C}/assignments/${N}`,{method:"GET",headers:r(!0,L)}),deleteTierAssignment:async(C,N,L)=>await fetch(`${n}/config/miniapps/${C}/assignments/${N}`,{method:"DELETE",headers:r(!0,L)}),getRateLimits:async(C,N)=>await fetch(`${n}/config/miniapps/${C}/rate-limits`,{method:"GET",headers:r(!0,N)}),putRateLimit:async(C,N,L,A,P)=>await fetch(`${n}/config/miniapps/${C}/rate-limits/${N}/${L}`,{method:"PUT",headers:r(!0,P),body:JSON.stringify(A)}),getRateLimit:async(C,N,L,A)=>await fetch(`${n}/config/miniapps/${C}/rate-limits/${N}/${L}`,{method:"GET",headers:r(!0,A)}),deleteRateLimit:async(C,N,L,A)=>await fetch(`${n}/config/miniapps/${C}/rate-limits/${N}/${L}`,{method:"DELETE",headers:r(!0,A)}),createProxyFetch:C=>async(N,L)=>{const A=N instanceof URL?N:new URL(N.toString());return await fetch(`${n}/proxy/${C.miniappName}/${A.host}${A.pathname}${A.search}${A.hash}`,L)},createProxyGetView:C=>{const N=new URL(C.gwProxyUrl).hostname;return async(L,A,P={})=>{let T=`SELECT * FROM ${L}.${A}`;P&&Object.keys(P).length>0&&(T+=`(${Object.entries(P).map(([F,H])=>`'${F}=${H}'`).join(",")})`);const $=await fetch(`${n}/proxy/${C.miniappName}/${N}/v1/sql/no-injected-authz`,{method:"POST",headers:r(!1),body:JSON.stringify({sqlText:T})});if(!$.ok)throw new Error(`Failed to fetch view: ${$.statusText}`);return await $.json()}}}};function Xot(e){return typeof e=="function"}const Zot=e=>{const{wrapAPICall:t}=awe(),n=RQ(e);return new Proxy(n,{get:(a,i)=>{const o=a[i];return Xot(o)?(...s)=>t(o.apply(a,s)):o}})},OQ=D.createContext(null);OQ.Consumer;const Kot=e=>{const[t,n]=D.useState({projectName:null,projectURL:null,extraMeta:{}}),[r,a]=D.useState({API_BASE_URL:null,WS_BASE_URL:null,GW_BASE_URL:null,GW_PROXY_URL:null,PROXY_API_BASE_URL:null}),[i,o]=D.useState(()=>lwe(e.config.GW_BASE_URL||"")),[s,c]=D.useState(!1),[l,u]=D.useState(""),[d,h]=D.useState(""),[f,p]=D.useState(""),[v,y]=D.useState(cwe()),g=Zot(e.config.API_BASE_URL||""),m=RQ(e.config.API_BASE_URL||""),_=g||m,[b,k]=D.useState(()=>$Q(e.config.PROXY_API_BASE_URL||"",t==null?void 0:t.projectHmac)),[x,S]=D.useState(null),[C,N]=D.useState(null),L=()=>{y(cwe())};return D.useEffect(()=>{a(e==null?void 0:e.config)},[e.config]),D.useEffect(()=>{e!=null&&e.metadata&&n(e.metadata)},[e.metadata]),D.useEffect(()=>{if(!(r!=null&&r.PROXY_API_BASE_URL)||!(r!=null&&r.GW_PROXY_URL)||!(t!=null&&t.projectName)){console.log("Missing required config for proxy setup");return}o(lwe(r.GW_BASE_URL||"")),k(A=>{const P=$Q(r.PROXY_API_BASE_URL||"",t==null?void 0:t.projectHmac),T=P.createProxyFetch({miniappName:t.projectName||""}),$=async(H,B)=>T(H,B);S(()=>$);const O=P.createProxyGetView({miniappName:t.projectName||"",gwProxyUrl:r.GW_PROXY_URL||""}),F=async(H,B,V={})=>{if(typeof H!="string"||typeof B!="string")throw new Error(`Invalid parameters: schema and viewName must be strings. Got schema: ${typeof H}, viewName: ${typeof B}`);return O(H,B,V)};return N(()=>F),P})},[r,t]),M.jsx(OQ.Provider,{value:{config:r,projectMetadata:t,setProjectMetadata:n,syncToken:v,setSyncToken:L,selectedComponentId:l,setSelectedComponentId:u,selectedComponentXPath:d,setSelectedComponentXPath:h,selectedComponentHTML:f,setSelectedComponentHTML:p,isComponentSubselected:s,setIsComponentSubselected:c,APIHandler:_,gwAPIHandler:i,proxyHandler:b,proxyFetch:x,proxyGetView:C},children:e.children})},Jot=e=>M.jsx(qot,{children:M.jsx(owe,{children:M.jsx(Kot,{...e})})}),zQ=()=>{const e=D.useContext(OQ);if(e===null)throw new Error("Invalid project context.");return e},Qot=Tl.div`
8075
+ `}}}return i}(this)},e}(),kot=/(a)(d)/gi,U_e=function(e){return String.fromCharCode(e+(e>25?39:97))};function IQ(e){var t,n="";for(t=Math.abs(e);t>52;t=t/52|0)n=U_e(t%52)+n;return(U_e(t%52)+n).replace(kot,"$1-$2")}var D0=function(e,t){for(var n=t.length;n;)e=33*e^t.charCodeAt(--n);return e},Y_e=function(e){return D0(5381,e)};function xot(e){for(var t=0;t<e.length;t+=1){var n=e[t];if(pm(n)&&!CQ(n))return!1}return!0}var Sot=Y_e("5.3.11"),Mot=function(){function e(t,n,r){this.rules=t,this.staticRulesId="",this.isStatic=(r===void 0||r.isStatic)&&xot(t),this.componentId=n,this.baseHash=D0(Sot,n),this.baseStyle=r,W_e.registerId(n)}return e.prototype.generateAndInjectStyles=function(t,n,r){var a=this.componentId,i=[];if(this.baseStyle&&i.push(this.baseStyle.generateAndInjectStyles(t,n,r)),this.isStatic&&!r.hash)if(this.staticRulesId&&n.hasNameForId(a,this.staticRulesId))i.push(this.staticRulesId);else{var o=P0(this.rules,t,n,r).join(""),s=IQ(D0(this.baseHash,o)>>>0);if(!n.hasNameForId(a,s)){var c=r(o,"."+s,void 0,a);n.insertRules(a,s,c)}i.push(s),this.staticRulesId=s}else{for(var l=this.rules.length,u=D0(this.baseHash,r.hash),d="",h=0;h<l;h++){var f=this.rules[h];if(typeof f=="string")d+=f;else if(f){var p=P0(f,t,n,r),v=Array.isArray(p)?p.join(""):p;u=D0(u,v+h),d+=v}}if(d){var y=IQ(u>>>0);if(!n.hasNameForId(a,y)){var g=r(d,"."+y,void 0,a);n.insertRules(a,y,g)}i.push(y)}}return i.join(" ")},e}(),Cot=/^\s*\/\/.*$/gm,Not=[":","[",".","#"];function Iot(e){var t,n,r,a,i=Al,o=i.options,s=o===void 0?Al:o,c=i.plugins,l=c===void 0?Ij:c,u=new Zit(s),d=[],h=function(v){function y(g){if(g)try{v(g+"}")}catch{}}return function(g,m,_,b,k,x,S,C,N,L){switch(g){case 1:if(N===0&&m.charCodeAt(0)===64)return v(m+";"),"";break;case 2:if(C===0)return m+"/*|*/";break;case 3:switch(C){case 102:case 112:return v(_[0]+m),"";default:return m+(L===0?"/*|*/":"")}case-2:m.split("/*|*/}").forEach(y)}}}(function(v){d.push(v)}),f=function(v,y,g){return y===0&&Not.indexOf(g[n.length])!==-1||g.match(a)?v:"."+t};function p(v,y,g,m){m===void 0&&(m="&");var _=v.replace(Cot,""),b=y&&g?g+" "+y+" { "+_+" }":_;return t=m,n=y,r=new RegExp("\\"+n+"\\b","g"),a=new RegExp("(\\"+n+"\\b){2,}"),u(g||!y?"":y,b)}return u.use([].concat(l,[function(v,y,g){v===2&&g.length&&g[0].lastIndexOf(n)>0&&(g[0]=g[0].replace(r,f))},h,function(v){if(v===-2){var y=d;return d=[],y}}])),p.hash=l.length?l.reduce(function(v,y){return y.name||vm(15),D0(v,y.name)},5381).toString():"",p}var X_e=D.createContext();X_e.Consumer;var Z_e=D.createContext(),Lot=(Z_e.Consumer,new W_e),LQ=Iot();function Aot(){return D.useContext(X_e)||Lot}function Tot(){return D.useContext(Z_e)||LQ}var Eot=function(){function e(t,n){var r=this;this.inject=function(a,i){i===void 0&&(i=LQ);var o=r.name+i.hash;a.hasNameForId(r.id,o)||a.insertRules(r.id,o,i(r.rules,o,"@keyframes"))},this.toString=function(){return vm(12,String(r.name))},this.name=t,this.id="sc-keyframes-"+t,this.rules=n}return e.prototype.getName=function(t){return t===void 0&&(t=LQ),this.name+t.hash},e}(),Dot=/([A-Z])/,Pot=/([A-Z])/g,Rot=/^ms-/,$ot=function(e){return"-"+e.toLowerCase()};function K_e(e){return Dot.test(e)?e.replace(Pot,$ot).replace(Rot,"-ms-"):e}var J_e=function(e){return e==null||e===!1||e===""};function P0(e,t,n,r){if(Array.isArray(e)){for(var a,i=[],o=0,s=e.length;o<s;o+=1)(a=P0(e[o],t,n,r))!==""&&(Array.isArray(a)?i.push.apply(i,a):i.push(a));return i}if(J_e(e))return"";if(CQ(e))return"."+e.styledComponentId;if(pm(e)){if(typeof(l=e)!="function"||l.prototype&&l.prototype.isReactComponent||!t)return e;var c=e(t);return P0(c,t,n,r)}var l;return e instanceof Eot?n?(e.inject(n,r),e.getName(r)):e:MQ(e)?function u(d,h){var f,p,v=[];for(var y in d)d.hasOwnProperty(y)&&!J_e(d[y])&&(Array.isArray(d[y])&&d[y].isCss||pm(d[y])?v.push(K_e(y)+":",d[y],";"):MQ(d[y])?v.push.apply(v,u(d[y],y)):v.push(K_e(y)+": "+(f=y,(p=d[y])==null||typeof p=="boolean"||p===""?"":typeof p!="number"||p===0||f in Kit||f.startsWith("--")?String(p).trim():p+"px")+";"));return h?[h+" {"].concat(v,["}"]):v}(e):e.toString()}var Q_e=function(e){return Array.isArray(e)&&(e.isCss=!0),e};function Oot(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return pm(e)||MQ(e)?Q_e(P0(j_e(Ij,[e].concat(n)))):n.length===0&&e.length===1&&typeof e[0]=="string"?e:Q_e(P0(j_e(e,n)))}var zot=function(e,t,n){return n===void 0&&(n=Al),e.theme!==n.theme&&e.theme||t||n.theme},Fot=/[!"#$%&'()*+,./:;<=>?@[\\\]^`{|}~-]+/g,Bot=/(^-|-$)/g;function AQ(e){return e.replace(Fot,"-").replace(Bot,"")}var Vot=function(e){return IQ(Y_e(e)>>>0)};function Ej(e){return typeof e=="string"&&!0}var TQ=function(e){return typeof e=="function"||typeof e=="object"&&e!==null&&!Array.isArray(e)},jot=function(e){return e!=="__proto__"&&e!=="constructor"&&e!=="prototype"};function Hot(e,t,n){var r=e[n];TQ(t)&&TQ(r)?ewe(r,t):e[n]=t}function ewe(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];for(var a=0,i=n;a<i.length;a++){var o=i[a];if(TQ(o))for(var s in o)jot(s)&&Hot(e,o[s],s)}return e}var twe=D.createContext();twe.Consumer;var EQ={};function nwe(e,t,n){var r=CQ(e),a=!Ej(e),i=t.attrs,o=i===void 0?Ij:i,s=t.componentId,c=s===void 0?function(m,_){var b=typeof m!="string"?"sc":AQ(m);EQ[b]=(EQ[b]||0)+1;var k=b+"-"+Vot("5.3.11"+b+EQ[b]);return _?_+"-"+k:k}(t.displayName,t.parentComponentId):s,l=t.displayName,u=l===void 0?function(m){return Ej(m)?"styled."+m:"Styled("+H_e(m)+")"}(e):l,d=t.displayName&&t.componentId?AQ(t.displayName)+"-"+t.componentId:t.componentId||c,h=r&&e.attrs?Array.prototype.concat(e.attrs,o).filter(Boolean):o,f=t.shouldForwardProp;r&&e.shouldForwardProp&&(f=t.shouldForwardProp?function(m,_,b){return e.shouldForwardProp(m,_,b)&&t.shouldForwardProp(m,_,b)}:e.shouldForwardProp);var p,v=new Mot(n,d,r?e.componentStyle:void 0),y=v.isStatic&&o.length===0,g=function(m,_){return function(b,k,x,S){var C=b.attrs,N=b.componentStyle,L=b.defaultProps,A=b.foldedComponentIds,P=b.shouldForwardProp,T=b.styledComponentId,$=b.target,O=function(ce,ee,he){ce===void 0&&(ce=Al);var K=gc({},ee,{theme:ce}),se={};return he.forEach(function(fe){var oe,ae,Z,U=fe;for(oe in pm(U)&&(U=U(K)),U)K[oe]=se[oe]=oe==="className"?(ae=se[oe],Z=U[oe],ae&&Z?ae+" "+Z:ae||Z):U[oe]}),[K,se]}(zot(k,D.useContext(twe),L)||Al,k,C),F=O[0],H=O[1],B=function(ce,ee,he,K){var se=Aot(),fe=Tot(),oe=ee?ce.generateAndInjectStyles(Al,se,fe):ce.generateAndInjectStyles(he,se,fe);return oe}(N,S,F),V=x,j=H.$as||k.$as||H.as||k.as||$,W=Ej(j),X=H!==k?gc({},k,{},H):k,q={};for(var te in X)te[0]!=="$"&&te!=="as"&&(te==="forwardedAs"?q.as=X[te]:(P?P(te,$_e,j):!W||$_e(te))&&(q[te]=X[te]));return k.style&&H.style!==k.style&&(q.style=gc({},k.style,{},H.style)),q.className=Array.prototype.concat(A,T,B!==T?B:null,k.className,H.className).filter(Boolean).join(" "),q.ref=V,D.createElement(j,q)}(p,m,_,y)};return g.displayName=u,(p=D.forwardRef(g)).attrs=h,p.componentStyle=v,p.displayName=u,p.shouldForwardProp=f,p.foldedComponentIds=r?Array.prototype.concat(e.foldedComponentIds,e.styledComponentId):Ij,p.styledComponentId=d,p.target=r?e.target:e,p.withComponent=function(m){var _=t.componentId,b=function(x,S){if(x==null)return{};var C,N,L={},A=Object.keys(x);for(N=0;N<A.length;N++)C=A[N],S.indexOf(C)>=0||(L[C]=x[C]);return L}(t,["componentId"]),k=_&&_+"-"+(Ej(m)?m:AQ(H_e(m)));return nwe(m,gc({},b,{attrs:h,componentId:k}),n)},Object.defineProperty(p,"defaultProps",{get:function(){return this._foldedDefaultProps},set:function(m){this._foldedDefaultProps=r?ewe({},e.defaultProps,m):m}}),Object.defineProperty(p,"toString",{value:function(){return"."+p.styledComponentId}}),a&&cot(p,e,{attrs:!0,componentStyle:!0,displayName:!0,foldedComponentIds:!0,shouldForwardProp:!0,styledComponentId:!0,target:!0,withComponent:!0}),p}var Tl=function(e){return function t(n,r,a){if(a===void 0&&(a=Al),!kQ.isValidElementType(r))return vm(1,String(r));var i=function(){return n(r,a,Oot.apply(void 0,arguments))};return i.withConfig=function(o){return t(n,r,gc({},a,{},o))},i.attrs=function(o){return t(n,r,gc({},a,{attrs:Array.prototype.concat(a.attrs,o).filter(Boolean)}))},i}(nwe,e)};["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","big","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","marquee","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","title","tr","track","u","ul","var","video","wbr","circle","clipPath","defs","ellipse","foreignObject","g","image","line","linearGradient","marker","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","text","textPath","tspan"].forEach(function(e){Tl[e]=Tl(e)});const rwe=D.createContext(null),awe=()=>{const e=D.useContext(rwe);if(!e)throw new Error("useAPI must be used within an APIProvider");return e},qot=({children:e})=>{const[t,n]=D.useState(0),r=D.useCallback(async i=>{n(o=>o+1);try{return await i}finally{n(o=>Math.max(0,o-1))}},[]),a=D.useCallback(async(i,o)=>(n(s=>s+1),new Promise((s,c)=>{const l=i(),u=()=>{n(d=>Math.max(0,d-1))};l.addEventListener("load",()=>{if(u(),l.status>=200&&l.status<300)try{const d=o(l);s(d)}catch(d){c(d)}else c(new Error(`Request failed with status ${l.status}`))}),l.addEventListener("error",()=>{u(),c(new Error("Network error occurred"))}),l.addEventListener("abort",()=>{u(),c(new Error("Request cancelled"))})})),[]);return M.jsx(rwe.Provider,{value:{isLoading:t>0,wrapAPICall:r,wrapXHRCall:a},children:e})},iwe=D.createContext(null),DQ=()=>{const e=D.useContext(iwe);if(!e)throw new Error("useRGContext must be used within a RGProvider");return e},owe=e=>{const{children:t}=e,[n,r]=D.useState({w:1,h:1}),a=o=>{r(o)},i=()=>{r({w:1,h:1})};return M.jsx(iwe.Provider,{value:{activeCompDimension:n,onDragStart:a,onDragStop:i},children:t})};for(var zr=[],PQ=0;PQ<256;++PQ)zr.push((PQ+256).toString(16).slice(1));function Got(e,t=0){return(zr[e[t+0]]+zr[e[t+1]]+zr[e[t+2]]+zr[e[t+3]]+"-"+zr[e[t+4]]+zr[e[t+5]]+"-"+zr[e[t+6]]+zr[e[t+7]]+"-"+zr[e[t+8]]+zr[e[t+9]]+"-"+zr[e[t+10]]+zr[e[t+11]]+zr[e[t+12]]+zr[e[t+13]]+zr[e[t+14]]+zr[e[t+15]]).toLowerCase()}var Dj,Wot=new Uint8Array(16);function Uot(){if(!Dj&&(Dj=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!Dj))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return Dj(Wot)}var Yot=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto);const swe={randomUUID:Yot};function cwe(e,t,n){if(swe.randomUUID&&!e)return swe.randomUUID();e=e||{};var r=e.random||(e.rng||Uot)();return r[6]=r[6]&15|64,r[8]=r[8]&63|128,Got(r)}const RQ=e=>{const t=e;return{createProject:async(V,j,W,X=[])=>{const q=new FormData;q.append("description",V),q.append("theme",j),W&&q.append("background_image",W);const te=Array.isArray(X)?X:[X];for(const ce of te)q.append("secret_references",ce);return await fetch(`${t}/create_project`,{method:"POST",body:q})},createBlankProject:async(V,j,W,X=[])=>{const q=new FormData;q.append("description",V),q.append("theme",j),W&&q.append("background_image",W);const te=Array.isArray(X)?X:[X];for(const ce of te)q.append("secret_references",ce);return await fetch(`${t}/create_blank_project`,{method:"POST",body:q})},getProjects:async(V=!1)=>{let j=`${t}/fetch_projects`;return V&&(j+="?include_published_info=true"),await fetch(j,{method:"GET",headers:{"Content-Type":"application/json"}})},getProjectMetadata:async V=>await fetch(`${t}/project/${V}`,{method:"GET",headers:{"Content-Type":"application/json"}}),getSubdomains:async V=>await fetch(`${t}/subdomains?project_name=${V}`,{method:"GET",headers:{"Content-Type":"application/json"}}),allocateSubdomain:async(V,j)=>{const W={project_name:V,subdomain:j};return await fetch(`${t}/allocate_subdomain`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(W)})},updateSubdomain:async(V,j)=>{const W={project_name:V,subdomain:j};return await fetch(`${t}/update_subdomain`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(W)})},releaseSubdomain:async(V,j)=>{const W={project_name:V,subdomain:j};return await fetch(`${t}/release_subdomain`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(W)})},publishProject:async(V,j)=>{const W={project_name:V,git_ref:j};return await fetch(`${t}/publish_project`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(W)})},unpublishProject:async V=>{const j={project_name:V};return await fetch(`${t}/unpublish_project`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(j)})},tagCommit:async(V,j,W)=>{const X={project_name:V,commit_hash:j,tag_name:W};return await fetch(`${t}/tag_project_commit`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(X)})},getComponentLibrary:async()=>await fetch(`${t}/library_components?namespaces=example`,{method:"GET",headers:{"Content-Type":"application/json"}}),addProjectComponent:async(V,j,W,X)=>{const q={project_name:V,component_namespace:j,component_name:W,layout_metadata:X};return await fetch(`${t}/add_project_component`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(q)})},addProjectChart:async(V,j,W)=>{const X={project_name:V,visual_id:j,layout_metadata:W};return await fetch(`${t}/add_project_chart`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(X)})},updateProjectComponentLayoutMetadata:async(V,j,W)=>{const X={project_name:V,component_id:j,layout_metadata:W};return await fetch(`${t}/update_project_component_layout_metadata`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(X)})},updateProjectComponentSourceCode:async(V,j,W)=>{const X={project_name:V,component_id:j,source_code:W};return await fetch(`${t}/update_project_component_source_code`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(X)})},updateApplicationMetadata:async(V,j,W,X)=>{const q={project_name:V,application_name:j,application_description:W,application_category:X};return await fetch(`${t}/update_application_metadata`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(q)})},updateApplicationSettings:async(V,j=null,W=null)=>{const X={project_name:V,application_login_enabled:j,default_deployment_chain_reference:W};return await fetch(`${t}/update_application_settings`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(X)})},updateProjectFile:async(V,j,W,X)=>{const q={file_path:V,project_name:j,source_code:W};return await fetch(`${t}/update_project_file`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(q),signal:X})},updateProjectFiles:async(V,j)=>{const W=V.map(X=>({project_name:X.projectName,file_path:X.filePath,source_code:X.fileContent}));return await fetch(`${t}/update_project_files`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(W),signal:j})},deleteProjectComponent:async(V,j)=>{const W={project_name:V,file_path:j};return await fetch(`${t}/delete_project_component`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(W)})},deleteProjectFile:async(V,j)=>{const W={project_name:V,file_path:j};return await fetch(`${t}/delete_project_file`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(W)})},resetProjectFile:async(V,j,W,X,q)=>{let te={project_name:V,file_path:j,git_ref:W};return X&&(te.prune=X),q&&(te.extra_metadata=q),await fetch(`${t}/reset_project_file`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(te)})},deleteProject:async V=>{const j={projects:[V]};return await fetch(`${t}/delete_projects`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(j)})},requestErrorCorrection:async(V,j,W)=>{const X={project_name:V,component_id:j,error_message:W};return await fetch(`${t}/error_correction`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(X)})},addImage:async V=>await fetch(`${t}/add_image`,{method:"POST",body:V}),editElement:async V=>{const j={project_name:V.projectName,component_id:V.componentId,element_xpath:V.elementXPath,style_request:V.styleRequest||null,text_request:V.textRequest||null,background_image_request:V.backgroundImageRequest||null,dom_tree_repr:V.domTreeRepr};return await fetch(`${t}/edit_element`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(j)})},initializeProject:async V=>await fetch(`${t}/initialize_project/${V}`,{method:"POST",headers:{"Content-Type":"application/json"}}),getUserSpendAnalytics:async()=>await fetch(`${t}/analytics/user_spend`,{method:"GET",headers:{"Content-Type":"application/json"}}),getCreatorPointsSum:async V=>{let j=`${t}/analytics/creator_points/sum`;return V&&(j+=`?project_name=${encodeURIComponent(V)}`),await fetch(j,{method:"GET",headers:{"Content-Type":"application/json"}})},getCreatorPointsTop:async(V=20)=>await fetch(`${t}/analytics/creator_points/top?n=${V}`,{method:"GET",headers:{"Content-Type":"application/json"}}),getProjectViewsHistory:async(V,j,W,X="day",q=500)=>{const te=new URLSearchParams;j&&te.append("start",j.toISOString()),W&&te.append("end",W.toISOString()),te.append("granularity",X),te.append("limit",q.toString());const ce=`${t}/analytics/project_views/history/${encodeURIComponent(V)}?${te.toString()}`;return await fetch(ce,{method:"GET",headers:{"Content-Type":"application/json"}})},getProjectViewsTop:async(V=20)=>await fetch(`${t}/analytics/project_views/top?n=${V}`,{method:"GET",headers:{"Content-Type":"application/json"}})}},lwe=e=>{const t=e;return{getQueryContent:async i=>await fetch(`${t}/v1/public/sql/content-queries`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({queryId:i,biscuits:[]})}),getVisuals:async(i,o,s,c,l,u,d,h)=>{const f=new URLSearchParams({pageNo:i.toString(),pageSize:o.toString(),scope:s,searchPattern:c,sortBy:l,sortOrder:u,visibility:d,visualType:h}).toString();return await fetch(`${t}/v2/content/visuals?${f}`,{method:"GET",headers:{"Content-Type":"application/json"}})},getSubscription:async()=>await fetch(`${t}/v1/subscription`,{method:"GET",headers:{"Content-Type":"application/json"}})}},$Q=(e,t)=>{const n=e,r=(C=!1,N)=>{const L={"Content-Type":"application/json"};if(C){const A=N||t;A&&(L["x-sxt-project-hmac"]=A)}return L};return{getSecrets:async()=>await fetch(`${n}/config/secrets`,{method:"GET",headers:r(!1)}),putSecret:async(C,N)=>await fetch(`${n}/config/secrets/${C}`,{method:"PUT",headers:r(!1),body:JSON.stringify(N)}),patchSecret:async(C,N)=>await fetch(`${n}/config/secrets/${C}`,{method:"PATCH",headers:r(!1),body:JSON.stringify(N)}),getSecret:async C=>await fetch(`${n}/config/secrets/${C}`,{method:"GET",headers:r(!1)}),deleteSecret:async C=>await fetch(`${n}/config/secrets/${C}`,{method:"DELETE",headers:r(!1)}),getAllTierKeyMaps:async()=>await fetch(`${n}/config/miniapps/*/tier-key-map`,{method:"GET",headers:r(!1)}),getTierKeyMap:async(C,N)=>await fetch(`${n}/config/miniapps/${C}/tier-key-map`,{method:"GET",headers:r(!0,N)}),putTierKeyMap:async(C,N,L,A)=>await fetch(`${n}/config/miniapps/${C}/tier-key-map/${N}`,{method:"PUT",headers:r(!0,A),body:JSON.stringify({secret_reference:L})}),getTierKeyMapForTier:async(C,N,L)=>await fetch(`${n}/config/miniapps/${C}/tier-key-map/${N}`,{method:"GET",headers:r(!0,L)}),deleteTierKeyMap:async(C,N,L,A)=>await fetch(`${n}/config/miniapps/${C}/tier-key-map/${N}/${L}`,{method:"DELETE",headers:r(!0,A)}),getTierAssignments:async(C,N)=>await fetch(`${n}/config/miniapps/${C}/assignments`,{method:"GET",headers:r(!0,N)}),putTierAssignment:async(C,N,L,A)=>await fetch(`${n}/config/miniapps/${C}/assignments/${N}`,{method:"PUT",headers:r(!0,A),body:JSON.stringify({tier:L})}),getTierAssignment:async(C,N,L)=>await fetch(`${n}/config/miniapps/${C}/assignments/${N}`,{method:"GET",headers:r(!0,L)}),deleteTierAssignment:async(C,N,L)=>await fetch(`${n}/config/miniapps/${C}/assignments/${N}`,{method:"DELETE",headers:r(!0,L)}),getRateLimits:async(C,N)=>await fetch(`${n}/config/miniapps/${C}/rate-limits`,{method:"GET",headers:r(!0,N)}),putRateLimit:async(C,N,L,A,P)=>await fetch(`${n}/config/miniapps/${C}/rate-limits/${N}/${L}`,{method:"PUT",headers:r(!0,P),body:JSON.stringify(A)}),getRateLimit:async(C,N,L,A)=>await fetch(`${n}/config/miniapps/${C}/rate-limits/${N}/${L}`,{method:"GET",headers:r(!0,A)}),deleteRateLimit:async(C,N,L,A)=>await fetch(`${n}/config/miniapps/${C}/rate-limits/${N}/${L}`,{method:"DELETE",headers:r(!0,A)}),createProxyFetch:C=>async(N,L)=>{const A=N instanceof URL?N:new URL(N.toString());return await fetch(`${n}/proxy/${C.miniappName}/${A.host}${A.pathname}${A.search}${A.hash}`,L)},createProxyGetView:C=>{const N=new URL(C.gwProxyUrl).hostname;return async(L,A,P={})=>{let T=`SELECT * FROM ${L}.${A}`;P&&Object.keys(P).length>0&&(T+=`(${Object.entries(P).map(([F,H])=>`'${F}=${H}'`).join(",")})`);const $=await fetch(`${n}/proxy/${C.miniappName}/${N}/v1/sql/no-injected-authz`,{method:"POST",headers:r(!1),body:JSON.stringify({sqlText:T})});if(!$.ok)throw new Error(`Failed to fetch view: ${$.statusText}`);return await $.json()}}}};function Xot(e){return typeof e=="function"}const Zot=e=>{const{wrapAPICall:t}=awe(),n=RQ(e);return new Proxy(n,{get:(a,i)=>{const o=a[i];return Xot(o)?(...s)=>t(o.apply(a,s)):o}})},OQ=D.createContext(null);OQ.Consumer;const Kot=e=>{const[t,n]=D.useState({projectName:null,projectURL:null,extraMeta:{}}),[r,a]=D.useState({API_BASE_URL:null,WS_BASE_URL:null,GW_BASE_URL:null,GW_PROXY_URL:null,PROXY_API_BASE_URL:null}),[i,o]=D.useState(()=>lwe(e.config.GW_BASE_URL||"")),[s,c]=D.useState(!1),[l,u]=D.useState(""),[d,h]=D.useState(""),[f,p]=D.useState(""),[v,y]=D.useState(cwe()),g=Zot(e.config.API_BASE_URL||""),m=RQ(e.config.API_BASE_URL||""),_=g||m,[b,k]=D.useState(()=>$Q(e.config.PROXY_API_BASE_URL||"",t==null?void 0:t.projectHmac)),[x,S]=D.useState(null),[C,N]=D.useState(null),L=()=>{y(cwe())};return D.useEffect(()=>{a(e==null?void 0:e.config)},[e.config]),D.useEffect(()=>{e!=null&&e.metadata&&n(e.metadata)},[e.metadata]),D.useEffect(()=>{if(!(r!=null&&r.PROXY_API_BASE_URL)||!(r!=null&&r.GW_PROXY_URL)||!(t!=null&&t.projectName)){console.log("Missing required config for proxy setup");return}o(lwe(r.GW_BASE_URL||"")),k(A=>{const P=$Q(r.PROXY_API_BASE_URL||"",t==null?void 0:t.projectHmac),T=P.createProxyFetch({miniappName:t.projectName||""}),$=async(H,B)=>T(H,B);S(()=>$);const O=P.createProxyGetView({miniappName:t.projectName||"",gwProxyUrl:r.GW_PROXY_URL||""}),F=async(H,B,V={})=>{if(typeof H!="string"||typeof B!="string")throw new Error(`Invalid parameters: schema and viewName must be strings. Got schema: ${typeof H}, viewName: ${typeof B}`);return O(H,B,V)};return N(()=>F),P})},[r,t]),M.jsx(OQ.Provider,{value:{config:r,projectMetadata:t,setProjectMetadata:n,syncToken:v,setSyncToken:L,selectedComponentId:l,setSelectedComponentId:u,selectedComponentXPath:d,setSelectedComponentXPath:h,selectedComponentHTML:f,setSelectedComponentHTML:p,isComponentSubselected:s,setIsComponentSubselected:c,APIHandler:_,gwAPIHandler:i,proxyHandler:b,proxyFetch:x,proxyGetView:C},children:e.children})},Jot=e=>M.jsx(qot,{children:M.jsx(owe,{children:M.jsx(Kot,{...e})})}),zQ=()=>{const e=D.useContext(OQ);if(e===null)throw new Error("Invalid project context.");return e},Qot=Tl.div`
8076
8076
  position: fixed;
8077
8077
  top: 0;
8078
8078
  left: 0;
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@spaceandtimelabs/makeinfinite-ui",
3
3
  "author": "aw-sxt",
4
4
  "private": false,
5
- "version": "0.66.0",
5
+ "version": "0.66.1",
6
6
  "type": "module",
7
7
  "exports": {
8
8
  ".": {