!function(t){function e(e){for(var r,u,c=e[0],a=e[1],f=e[2],s=0,p=[];st.length)&&(e=t.length);for(var n=0,r=new Array(e);n2&&void 0!==arguments[2]?arguments[2]:{},r=n.onSuccess,a=void 0===r?d:r,s=n.onFailure,p=void 0===s?d:s,v=n.onFinish,x=void 0===v?d:v,f=n.getAutoRunArgs,g=void 0===f?function(){return null}:f,m=Object(i.useState)(null),b=Object(o.a)(m,2),w=b[0],h=b[1],O=Object(i.useState)(null),C=Object(o.a)(O,2),y=C[0],P=C[1],E=Object(i.useMemo)(g,[]),I=Object(i.useState)(!!E),j=Object(o.a)(I,2),A=j[0],S=j[1],k=Object(i.useCallback)(t,e),L=Object(i.useCallback)(function(){var t=Object(u.a)(c.a.mark((function t(){var e,n=arguments;return c.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return P(null),S(!0),t.prev=2,t.next=5,k.apply(void 0,n);case 5:return e=t.sent,h(e),P(null),a(e),t.abrupt("return",e);case 12:return t.prev=12,t.t0=t.catch(2),P(t.t0),h(null),p(t.t0),t.abrupt("return",t.t0);case 18:return t.prev=18,S(!1),x(),t.finish(18);case 22:case"end":return t.stop()}}),t,null,[[2,12,18,22]])})));return function(){return t.apply(this,arguments)}}(),[k,p,x,a]);return Object(i.useEffect)((function(){E&&L.apply(void 0,Object(l.a)(E))}),[E,L]),[L,{value:w,error:y,loading:A}]},v=n(13),x=Object(i.createContext)(null),f=function(){var t=Object(i.useContext)(x);if(!t)throw new Error('"useProfile" must be inside a Provider');return t.profile},g=function(t){var e,n,l=t.children,s=t.useLoadingState,c=Object(i.useContext)(x),u=p((function(){return Object(a.a)()}),[],{getAutoRunArgs:function(){return c?null:[]}}),d=Object(o.a)(u,2)[1],f=d.value,g=d.loading,m=null!==(e=null==c?void 0:c.profile)&&void 0!==e?e:f,b=null!==(n=null==c?void 0:c.loading)&&void 0!==n?n:g;return s&&b?r.a.createElement("div",{"data-testid":"loading-session"},r.a.createElement(v.a,null)):r.a.createElement(x.Provider,{value:{profile:m,loading:b}},l)}},20:function(t,e,n){"use strict";n.r(e),n.d(e,"LoginSchema",(function(){return o}));var o={type:"object",properties:{optionsTitle:{title:"admin/editor.login.optionsTitle",type:"string",widget:{"ui:widget":"textarea"}},emailAndPasswordTitle:{title:"admin/editor.login.emailAndPasswordTitle",type:"string",widget:{"ui:widget":"textarea"}},accessCodeTitle:{title:"admin/editor.login.accessCodeTitle",type:"string",widget:{"ui:widget":"textarea"}},emailPlaceholder:{title:"admin/editor.login.emailPlaceholder",type:"string"},passwordPlaceholder:{title:"admin/editor.login.passwordPlaceholder",type:"string"},showPasswordVerificationIntoTooltip:{title:"admin/editor.login.showPasswordVerificationIntoTooltip.title",type:"boolean",isLayout:!0},accessCodePlaceholder:{title:"admin/editor.login.accessCodePlaceholder",type:"string"},showIconProfile:{title:"admin/editor.login.showIconProfile",type:"boolean"},iconLabel:{title:"admin/editor.login.iconLabel",type:"string"},providerPasswordButtonLabel:{title:"admin/editor.login.providerPasswordButtonLabel",type:"string"},hasIdentifierExtension:{title:"admin/editor.login.hasIdentifierExtension",type:"boolean"},termsAndConditions:{title:"admin/editor.login.termsAndConditions",type:"string",widget:{"ui:widget":"textarea"}}},dependencies:{hasIdentifierExtension:{oneOf:[{properties:{hasIdentifierExtension:{enum:[!0]},identifierPlaceholder:{title:"admin/editor.login.identifierPlaceholder",type:"string"},invalidIdentifierError:{title:"admin/editor.login.invalidIdentifierError",type:"string"}}}]}}}},3:function(t,e,n){"use strict";n.d(e,"a",(function(){return o}));var o=function(t,e){return e.formatMessage({id:"".concat(t)})}},38:function(t,e,n){"use strict";n.d(e,"a",(function(){return a}));var o=n(21),i=n(69),r=n.n(i),a=function(t){var e=Object(o.compose)(o.fromPairs,Object(o.map)(Object(o.split)("=")),Object(o.split)("&"),o.tail)(t),n=e.accountAuthCookieName,i=e.accountAuthCookieValue;if(n&&i){r.a.set(n,i,{expires:1,path:"/",secure:!0});var a=t.substring(0,t.indexOf("?"));window.history.replaceState({},document.title,a),window.location.assign(window.location.origin)}}},41:function(t,e,n){"use strict";var o=n(11),i=n.n(o),r=n(17),a=function(t){var e=(null!=t?t:{}).namespaces,n=(null!=e?e:{}).profile;if(!n)return null;var o=n.email,i=(o=void 0===o?{value:null}:o).value,r=n.firstName,a=(r=void 0===r?{value:null}:r).value,l=n.isAuthenticated,s="true"===(l=void 0===l?{value:"false"}:l).value;return s&&!i?null:{email:i,firstName:a,isAuthenticated:s}},l=function(){var t=Object(r.a)(i.a.mark((function t(){var e,n;return i.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,o=void 0,(null===(o=null===window||void 0===window?void 0:window.__RENDER_8_SESSION__)||void 0===o?void 0:o.sessionPromise)?window.__RENDER_8_SESSION__.sessionPromise:Promise.resolve(null);case 2:return e=t.sent,n=(null!=e?e:{}).response,t.abrupt("return",a(n));case 5:case"end":return t.stop()}var o}),t)})));return function(){return t.apply(this,arguments)}}();e.a=l},5:function(t,e,n){"use strict";n.d(e,"d",(function(){return o})),n.d(e,"c",(function(){return i})),n.d(e,"a",(function(){return r})),n.d(e,"b",(function(){return a})),n.d(e,"e",(function(){return l})),n.d(e,"f",(function(){return c}));var o="user-identifier",i="vtex.login@2.66.0",r={POPOVER:"popover",LINK:"link"},a={RIGHT:"Right",LEFT:"Left"},l=function(){var t;return(null===(t=null===window||void 0===window?void 0:window.__RUNTIME__)||void 0===t?void 0:t.rootPath)||""},s=["fastshopbrqa1","fastshopbrqa2","fastshopbr","rubimstore"],c=function(t){return s.includes(t)}},69:function(t,e,n){!function(e){if("function"==typeof define&&define.amd&&(define(e),!0),t.exports=e(),!!0){var n=window.Cookies,o=window.Cookies=e();o.noConflict=function(){return window.Cookies=n,o}}}((function(){function t(){for(var t=0,e={};t=0||e.indexOf("Firefox")>=0}()&&window.location?i.a.createElement(a.Suspense,{fallback:null},i.a.createElement(R.a,{skip:!0,scope:"STORE",parentAppId:l.c},i.a.createElement(S,Object(b.a)({},e,{page:t})))):null},I=function(){window&&(window.localStorage&&localStorage.setItem("gsi_auto","false"),y()&&window.google.accounts.id.disableAutoSelect())},k=n(4),M=n(26),B=n.n(M),A=n(3),D=function(){var e,t=null===(e=null===window||void 0===window?void 0:window.location)||void 0===e?void 0:e.search;return t&&URLSearchParams?new URLSearchParams(t).get("__bindingAddress"):null},U=n(12),z=n.n(U),G=n(71),F=n.n(G),H=function(e){var t=e.iconSize,n=e.labelClasses,o=e.classes;return Boolean(Object(w.useChildBlock)({id:"icon-profile"}))?i.a.createElement("div",{className:z()(n,o)},i.a.createElement(w.ExtensionPoint,{id:"icon-profile",size:t})):i.a.createElement("div",{className:z()(n,o)},i.a.createElement(F.a,{size:t}))},K=function(e){var t,n,o=e.iconSize,a=e.iconLabel,r=e.hideIconLabel,c=e.labelClasses,l=e.loginButtonAsLink,s=e.onProfileIconClick,u=e.sessionProfile,d=e.showIconProfile,p=Object(k.useIntl)(),m=Object(w.useRuntime)(),v=m.history,g=m.navigate,f=null!=u?u:{},E=f.isAuthenticated,b=f.firstName,_=f.email,h=null===(t=null==v?void 0:v.location)||void 0===t?void 0:t.pathname,x=null===(n=null==v?void 0:v.location)||void 0===n?void 0:n.search,N="flex items-center ".concat(r?"nr4":""),R=a||Object(A.a)("store/login.signIn",p),C=r?i.a.createElement(i.a.Fragment,null):E?i.a.createElement("span",{className:"".concat(O.a.profile," truncate t-action--small order-1 pl4 ").concat(c," dn db-l")},Object(A.a)("store/login.hello",p)," ",null!=b?b:_):i.a.createElement("span",{className:"".concat(O.a.label," t-action--small pl4 ").concat(c," dn db-l")},R);if(l){var T=E?"store.account":"store.login";return i.a.createElement("div",{className:O.a.buttonLink},i.a.createElement(B.a,{variation:"tertiary",icon:d&&i.a.createElement(H,{iconSize:o,labelClasses:c,classes:N}),iconPosition:d?"left":"right",onClick:function(){if(window&&URLSearchParams){var e=!E&&encodeURIComponent("".concat(h).concat(x)),t=D();return g({page:T,query:new URLSearchParams(Object.assign(Object.assign({},e&&{returnUrl:e}),t&&{bindingAddress:t})).toString()})}}},C))}return i.a.createElement(B.a,{variation:"tertiary",icon:d&&i.a.createElement(H,{iconSize:o,labelClasses:c,classes:N}),iconPosition:d?"left":"right",onClick:s},i.a.createElement("div",{className:"flex pv2 items-center"},C))},V=n(72),W=n.n(V),J=n(13),q=function(e){var t=e.children,n=e.mirrorTooltipToRight;return i.a.createElement("div",{className:"".concat(O.a.box," z-max absolute"),style:n?{left:50}:{right:-50}},i.a.createElement("div",{className:"".concat(O.a.arrowUp," absolute top-0 ").concat(n?"left-0 ml3":"right-0 mr3"," shadow-3 bg-base rotate-45 h2 w2")}),i.a.createElement("div",{className:"".concat(O.a.contentContainer," shadow-3 mt3")},t))},X=n(39),Q=n(40),Y=n(27),Z=n(42),$=n(43),ee=n(28);function te(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,o=Object(ee.a)(e);if(t){var a=Object(ee.a)(this).constructor;n=Reflect.construct(o,arguments,a)}else n=o.apply(this,arguments);return Object($.a)(this,n)}}var ne={BLOCK:"block",FLEX:"flex",INLINE:"inline",INLINE_BLOCK:"inline-block",CONTENTS:"contents"},oe={disabled:!1,useCapture:!0,display:ne.BLOCK},ae=function(e){Object(Z.a)(n,e);var t=te(n);function n(){var e;Object(X.a)(this,n);for(var o=arguments.length,a=new Array(o),i=0;i0}),[t]),c=Object(a.useMemo)((function(){return(null!=t?t:[]).map((function(e){return e.cssClass})).filter((function(e){return e}))}),[t]),s=ue()(c),u=le()({onSuccess:Object(a.useCallback)((function(){var e;return null===(e=null===window||void 0===window?void 0:window.location)||void 0===e?void 0:e.reload()}),[]),parentAppId:l.c,scope:"STORE"}),d=Object(o.a)(u,2),p=d[0],m=d[1].loading;return i.a.createElement("div",{className:"".concat(O.a.content," ").concat(O.a.content,"--accountOptions flex relative bg-base justify-around overflow-visible pa4 center items-baseline-ns items-baseline")},i.a.createElement("div",{className:"".concat(O.a.contentForm," dn ph4 ").concat(O.a.contentFormVisible," db")},i.a.createElement("div",null,i.a.createElement("div",{className:"".concat(O.a.accountOptions," items-center w-100")},i.a.createElement("div",{className:"mv4 min-h-2 b--muted-4"},r?i.a.createElement(i.a.Fragment,null,i.a.createElement("div",{className:"".concat(O.a.accountOptionsSectionTitle," t-small b mb3")},Object(A.a)("store/login.myAccount",n)),null==t?void 0:t.map((function(e,t){var n=e.label,o=e.path,a=e.cssClass,r=new URL(o||"/",window.location.href);return i.a.createElement(w.Link,{className:"".concat(s[a]||""," db no-underline t-small c-muted-1 hover-c-action-primary pv3"),key:t,to:"".concat(r.pathname).concat(r.search).concat(r.hash)},n)}))):i.a.createElement(w.Link,{page:"store.account"},i.a.createElement("button",{className:"".concat(O.a.button," bw1 ba ttu br2 t-action--small v-mid relative pv3 ph5 t-heading-5 bg-base b--transparent c-action-primary hover-c-action-primary pointer")},i.a.createElement("span",{className:"t-action--small"},Object(A.a)("store/login.myAccount",n))))),i.a.createElement("hr",{className:"mv2 o-30"}),i.a.createElement("div",{className:"mv4 min-h-2 b--muted-4"},r?i.a.createElement(me,{className:O.a.logoutButton,onClick:function(){I(),p()},loading:m},Object(A.a)("store/login.logoutLabel",n)):i.a.createElement(re.a,{variation:"tertiary",size:"small",onClick:function(){I(),p()},isLoading:m},i.a.createElement("span",{className:"t-action--small"},Object(A.a)("store/login.logoutLabel",n))))))))},ge=i.a.lazy((function(){return Promise.all([n.e(0),n.e(2)]).then(n.bind(null,68))})),fe=function(e){var t=e.isBoxOpen,n=e.onOutSideBoxClick,o=d(),r=o.mirrorTooltipToRight,c=o.accountOptionLinks,l=Object(m.b)(),s=Object(v.b)(),u=(null!=s?s:{}).isAuthenticated;return t?i.a.createElement(W.a,null,i.a.createElement(ae,{onOutsideClick:n},i.a.createElement(q,{mirrorTooltipToRight:r},i.a.createElement(a.Suspense,{fallback:i.a.createElement(J.a,null)},u?i.a.createElement(ve,{optionLinks:c}):i.a.createElement(ge,Object(b.a)({},l,{isInitialScreenOptionOnly:!0,isHeaderLogin:!0})))))):i.a.createElement(i.a.Fragment,null)},Oe=function(){var e=d(),t=e.hideIconLabel,n=e.iconLabel,r=e.iconSize,c=e.showIconProfile,s=e.hasGoogleOneTap,u=e.googleOneTapAlignment,p=e.googleOneTapMarginTop,m=e.accountOptionsButtonBehavior,g=e.labelClasses,f=e.logInButtonBehavior,b=Object(a.useState)(!1),_=Object(o.a)(b,2),h=_[0],x=_[1],w=Object(a.useState)(!1),N=Object(o.a)(w,2),R=N[0],C=N[1],T=Object(v.b)(),P=Object(a.useCallback)((function(){window.innerWidth<640?C(!0):C(!1)}),[]);Object(a.useEffect)((function(){return window.addEventListener("resize",P),P(),function(){window.removeEventListener("resize",P)}}),[P]),Object(a.useEffect)((function(){window.location.href.indexOf("accountAuthCookieName")>0&&Object(E.a)(window.location.href)}),[]);var L=Object(a.useCallback)((function(){return x((function(e){return!e}))}),[]),y=Object(a.useCallback)((function(){return x(!1)}),[]),S=l.a.LINK,I=(null!=T?T:{}).isAuthenticated,k=R||(I?m===S:f===S);return i.a.createElement("div",{className:"".concat(O.a.container," flex items-center fr")},i.a.createElement("div",{className:"relative"},i.a.createElement(K,{onProfileIconClick:L,sessionProfile:T,hideIconLabel:t,iconLabel:n,iconSize:r,labelClasses:g,loginButtonAsLink:k,showIconProfile:c}),s&&i.a.createElement(j,{alignment:u,marginTop:p,shouldOpen:!I}),i.a.createElement(fe,{isBoxOpen:h,onOutSideBoxClick:y})))},Ee=function(e){var t=e.accountOptionsButtonBehavior,n=e.googleOneTapAlignment,o=e.googleOneTapMarginTop,a=e.hasGoogleOneTap,r=e.hideIconLabel,l=e.iconLabel,s=e.iconSize,u=e.labelClasses,d=e.logInButtonBehavior,g=e.mirrorTooltipToRight,f=e.showIconProfile,O=e.defaultOption,E=e.accessCodePlaceholder,b=e.accessCodeTitle,_=e.disabledEmailInputs,h=e.accountOptionLinks,x=e.emailAndPasswordTitle,w=e.emailPlaceholder,N=e.identifierPlaceholder,R=e.invalidIdentifierError,C=e.isInitialScreenOptionOnly,T=e.optionsTitle,P=e.passwordPlaceholder,L=e.providerPasswordButtonLabel,y=e.showPasswordVerificationIntoTooltip,S=e.termsAndConditions,j=e.blockOAuthAutoRedirect;return i.a.createElement(c.a,null,i.a.createElement(v.a,null,i.a.createElement(p,{value:{accountOptionsButtonBehavior:t,googleOneTapAlignment:n,googleOneTapMarginTop:o,hasGoogleOneTap:a,hideIconLabel:r,iconLabel:l,iconSize:s,labelClasses:u,logInButtonBehavior:d,mirrorTooltipToRight:g,showIconProfile:f,accountOptionLinks:h}},i.a.createElement(m.a,{value:{defaultOption:O,accessCodePlaceholder:E,accessCodeTitle:b,disabledEmailInputs:_,emailAndPasswordTitle:x,emailPlaceholder:w,identifierPlaceholder:N,invalidIdentifierError:R,isInitialScreenOptionOnly:C,optionsTitle:T,passwordPlaceholder:P,providerPasswordButtonLabel:L,showPasswordVerificationIntoTooltip:y,termsAndConditions:S,blockOAuthAutoRedirect:j}},i.a.createElement(Oe,null)))))};Ee.getSchema=function(){return Object.assign(Object.assign({title:"admin/editor.login.title"},g.LoginSchema),{properties:Object.assign(Object.assign({},g.LoginSchema.properties),{mirrorTooltipToRight:{title:"admin/editor.login.mirrorTooltipToRightTitle",type:"boolean",default:!1},logInButtonBehavior:{title:"admin/editor.login.logInButtonBehavior",type:"string",enum:[l.a.POPOVER,l.a.LINK],default:l.a.POPOVER},accountOptionsButtonBehavior:{title:"admin/editor.login.accountOptionsButtonBehavior",type:"string",enum:[l.a.POPOVER,l.a.LINK],default:l.a.POPOVER},accountOptionLinks:{title:"admin/editor.login.accountOptionLinks",type:"array",items:{type:"object",properties:{label:{title:"admin/editor.login.accountOptionLabelTitle",type:"string"},path:{title:"admin/editor.login.accountOptionPathTitle",type:"string"},cssClass:{title:"admin/editor.login.accountOptionCssClassTitle",type:"string"}}}},hasGoogleOneTap:{title:"admin/editor.login.googleOneTap.title",type:"boolean"},hideIconLabel:{title:"admin/editor.login.hideIconLabel",type:"boolean",default:!1}}),dependencies:Object.assign(Object.assign({},g.LoginSchema.dependencies),{hasGoogleOneTap:{oneOf:[{properties:{hasGoogleOneTap:{enum:[!0]},googleOneTapAlignment:{title:"admin/editor.login.googleOneTap.alignment",type:"string",enum:[l.b.RIGHT,l.b.LEFT],default:l.b.RIGHT},googleOneTapMarginTop:{title:"admin/editor.login.googleOneTap.marginTop",type:"string",default:"3rem"}}}]}})})},Ee.uiSchema={"ui:order":["*","hasIdentifierExtension","identifierPlaceholder","invalidIdentifierError","accountOptionLinks","hasGoogleOneTap","googleOneTapAlignment","googleOneTapMarginTop"]};var be=Ee},19:function(e,t){e.exports=__RENDER_8_COMPONENTS__["vtex.react-vtexid@4.x/validations"]},21:function(e,t){e.exports=R},22:function(e,t){e.exports=__RENDER_8_COMPONENTS__["vtex.styleguide@9.x/Spinner"]},25:function(e,t){e.exports=__RENDER_8_COMPONENTS__["vtex.react-vtexid@4.x/AuthStateLazy"]},26:function(e,t){e.exports=__RENDER_8_COMPONENTS__["vtex.styleguide@9.x/ButtonWithIcon"]},29:function(e,t){e.exports=__RENDER_8_COMPONENTS__["vtex.react-vtexid@4.x/RecaptchaProvider"]},30:function(e,t){e.exports=__RENDER_8_COMPONENTS__["vtex.react-vtexid@4.x/useRedirectAfterLogin"]},31:function(e,t){e.exports=__RENDER_8_COMPONENTS__["vtex.react-vtexid@4.x/useSendAccessCode"]},32:function(e,t){e.exports=__RENDER_8_COMPONENTS__["vtex.react-vtexid@4.x/AuthServiceLazy"]},4:function(e,t){e.exports=ReactIntl},49:function(e,t){e.exports=__RENDER_8_COMPONENTS__["vtex.react-vtexid@4.x/useGetPhoneNumberByEmail"]},50:function(e,t){e.exports=__RENDER_8_COMPONENTS__["vtex.store-icons@0.x/IconArrowBack"]},51:function(e,t){e.exports=__RENDER_8_COMPONENTS__["vtex.react-vtexid@4.x/useLogInWithAccessKey"]},52:function(e,t){e.exports=__RENDER_8_COMPONENTS__["vtex.react-vtexid@4.x/useSetPassword"]},53:function(e,t){e.exports=__RENDER_8_COMPONENTS__["vtex.store-icons@0.x/IconEyeSight"]},54:function(e,t){e.exports=__RENDER_8_COMPONENTS__["vtex.react-vtexid@4.x/useLogInWithPassword"]},55:function(e,t){e.exports=__RENDER_8_COMPONENTS__["vtex.styleguide@9.x/RadioGroup"]},56:function(e,t){e.exports=__RENDER_8_COMPONENTS__["vtex.react-vtexid@4.x/useSendAccessKey"]},57:function(e,t){e.exports=__RENDER_8_COMPONENTS__["vtex.react-vtexid@4.x/getAbsReturnUrl"]},58:function(e,t){e.exports=regeneratorRuntime},6:function(e,t){e.exports=__RENDER_8_RUNTIME__},67:function(e,t){e.exports=PropTypes},70:function(e,t){e.exports=__RENDER_8_COMPONENTS__["vtex.react-vtexid@4.x/useStartLoginAttempt"]},71:function(e,t){e.exports=__RENDER_8_COMPONENTS__["vtex.store-icons@0.x/IconProfile"]},72:function(e,t){e.exports=__RENDER_8_COMPONENTS__["vtex.react-portal@0.x/Overlay"]},73:function(e,t){e.exports=__RENDER_8_COMPONENTS__["vtex.react-vtexid@4.x/useLogOut"]},74:function(e,t){e.exports=__RENDER_8_COMPONENTS__["vtex.css-handles@0.x/useCssHandles"]},77:function(e,t,n){"use strict";n.r(t),function(e){var t=n(15);n.p=Object(t.getPublicPath)("vtex.login@2.66.0");var o=Object(t.register)((function(){return n(163)}),e,"vtex.login@2.66.0","vtex.login@2.x","Login");o.renderHotReload,o.setupHMR}.call(this,n(34)(e))},8:function(e,t){e.exports=__RENDER_8_COMPONENTS__["vtex.styleguide@9.x/Button"]}},[[77,"common",1]]]);; (window.webpackJsonpvtex_login_2_66_0=window.webpackJsonpvtex_login_2_66_0||[]).push([["Wrapper"],{0:function(n,t){n.exports=React},164:function(n,t,e){"use strict";e.r(t),e.d(t,"default",(function(){return i}));var r=e(0),o=e.n(r),i=function(n){var t=n.children;return o.a.createElement(o.a.Fragment,null,t)}},78:function(n,t,e){"use strict";e.r(t),function(n){var t=e(15);e.p=Object(t.getPublicPath)("vtex.login@2.66.0");var r=Object(t.register)((function(){return e(164)}),n,"vtex.login@2.66.0","vtex.login@2.x","Wrapper");r.renderHotReload,r.setupHMR}.call(this,e(34)(n))}},[[78,"common"]]]);; !function(e){function t(t){for(var n,u,a=t[0],c=t[1],l=t[2],s=0,d=[];se.length)&&(t=e.length);for(var r=0,n=new Array(t);r1&&void 0!==arguments[1]?arguments[1]:{},t=e.bailOut,n=void 0!==t&&t,l=Object(a.useState)(!1),r=Object(o.a)(l,2),d=r[0],m=r[1];return Object(a.useEffect)((function(){if(!n){var e=i.current;if(e){if(!e.complete){var t=function(){m(!0)};return e.addEventListener("load",t),function(){e.removeEventListener("load",t)}}m(!0)}}}),[i,n]),d}(X,{bailOut:!F}),Z=Object(c.useIntl)(),ii=s()(f,{migrationFrom:"vtex.store-components@3.x",classes:U}).handles,ei={minWidth:I,minHeight:k,maxWidth:O,maxHeight:P},ti=Object.assign(Object.assign({},ei),{height:j,width:E}),ni=null!==(r=null!==(t=null!==(e=null!=N?N:j)&&void 0!==e?e:P)&&void 0!==t?t:k)&&void 0!==r?r:"auto",oi=/(auto|inherit|initial|unset)|[^\d]/g,ai=function(i){return""!==i&&i?i.toString().replace(oi,"$1"):null},li=ai(E),ri=null!==(g=null!==(m=ai(N))&&void 0!==m?m:ai(j))&&void 0!==g?g:ai(P),di=function(i){return null==i?void 0:i.toString().includes("%")},mi=!(!E||!N&&!P&&!j||di(E)||di(N)&&di(P)&&di(j)),si=u()({id:b,intl:Z}),ci=u()({id:x,intl:Z}),gi=l.a.createElement("img",Object(n.a)({title:D,sizes:_,srcSet:L,src:"string"==typeof si?si:"",alt:"string"==typeof ci?ci:"",ref:X,className:ii.imageElement,loading:B,fetchpriority:K},W&&mi?{width:null!==(h=null!=li?li:E)&&void 0!==h?h:"auto",height:null!=ri?ri:"auto",style:ei}:{style:ti},$?{"data-vtex-preload":"true"}:{})),ui=null!==(y=null==H?void 0:H.newTab)&&void 0!==y?y:null==H?void 0:H.openNewTab,pi=v()().push,hi="provide"===z?{id:C,name:J,creative:si,position:V,products:[{productId:A,productName:R}]}:void 0,vi=u()({id:null==H?void 0:H.url,intl:Z}),fi=u()({id:null==H?void 0:H.attributeTitle,intl:Z}),yi=(null==H?void 0:H.url)?l.a.createElement(p.Link,{to:"string"==typeof vi?vi:"",title:"string"==typeof fi?fi:"",rel:H.attributeNofollow?"nofollow":"",target:ui?"_blank":void 0,className:ii.imageElementLink,onClick:function(){"none"!==z&&pi({event:"promotionClick",promotions:[hi]})}},gi):l.a.createElement(a.Fragment,null,gi);return d()({ref:X,onView:function(){"none"===z||Q||pi({event:"promoView",promotions:[hi]})},once:!0}),F?l.a.createElement("span",{className:"dib",style:{height:Y?"auto":ni}},yi):yi}var b=Object(c.defineMessages)({title:{id:"admin/editor.store-image.title"}});y.schema={title:b.title.id},y.cssHandles=f,e.default=y},13:function(i,e,t){"use strict";t.d(e,"a",(function(){return a}));var n=t(2),o=Object(n.defineMessages)({title:{id:"admin/editor.image-list.title"},description:{id:"admin/editor.image-list.description"},imagesImageTitle:{id:"admin/editor.image-list.images.image.title"},imagesMobileImageTitle:{id:"admin/editor.image-list.images.mobileImage.title"},imagesImageDescription:{id:"admin/editor.image-list.images.description.title"},imagesImageAttributeTitle:{id:"admin/editor.image-list.images.title.title"},imagesImageLinkUrl:{id:"admin/editor.image-list.images.link.url.title"},imagesImageLinkOpenNewTab:{id:"admin/editor.image-list.images.link.openNewTab.title"},imagesImageLinkNoFollow:{id:"admin/editor.image-list.images.link.noFollow.title"},imagesImageLinkTitle:{id:"admin/editor.image-list.images.link.title.title"},imagesTitle:{id:"admin/editor.image-list.images.title"},heightTitle:{id:"admin/editor.image-list.height.title"},widthTitle:{id:"admin/editor.image-list.images.width.title"},widthDescription:{id:"admin/editor.image-list.images.width.description"},analyticsTitle:{id:"admin/editor.image.analytics.title"},analyticsNone:{id:"admin/editor.image.analytics.none"},analyticsProvide:{id:"admin/editor.image.analytics.provide"},analyticsPromotionId:{id:"admin/editor.image.analytics.promotionId"},analyticsPromotionName:{id:"admin/editor.image.analytics.promotionName"},analyticsPromotionPosition:{id:"admin/editor.image.analytics.promotionPosition"},analyticspromotionProductId:{id:"admin/editor.image.analytics.promotionProductId"},analyticspromotionProductName:{id:"admin/editor.image.analytics.promotionProductName"}}),a={title:o.title.id,description:o.description.id,type:"object",properties:{height:{default:"420",isLayout:!1,title:o.heightTitle.id,type:"string"}}}},14:function(i,e,t){"use strict";t.d(e,"a",(function(){return d}));var n=t(4),o=t(0),a=t.n(o),l=t(10),r=function(i,e){var t={};for(var n in i)Object.prototype.hasOwnProperty.call(i,n)&&e.indexOf(n)<0&&(t[n]=i[n]);if(null!=i&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(i);o1&&void 0!==arguments[1]?arguments[1]:{},i=t.bailOut,n=void 0!==i&&i,a=Object(l.useState)(!1),r=Object(o.a)(a,2),s=r[0],u=r[1];return Object(l.useEffect)((function(){if(!n){var t=e.current;if(t){if(!t.complete){var i=function(){u(!0)};return t.addEventListener("load",i),function(){t.removeEventListener("load",i)}}u(!0)}}}),[e,n]),s}(X,{bailOut:!C}),Z=Object(d.useIntl)(),ee=c()(f,{migrationFrom:"vtex.store-components@3.x",classes:$}).handles,te={minWidth:w,minHeight:R,maxWidth:b,maxHeight:N},ie=Object.assign(Object.assign({},te),{height:P,width:y}),ne=null!==(r=null!==(i=null!==(t=null!=j?j:P)&&void 0!==t?t:N)&&void 0!==i?i:R)&&void 0!==r?r:"auto",oe=/(auto|inherit|initial|unset)|[^\d]/g,le=function(e){return""!==e&&e?e.toString().replace(oe,"$1"):null},ae=le(y),re=null!==(m=null!==(u=le(j))&&void 0!==u?u:le(P))&&void 0!==m?m:le(N),se=function(e){return null==e?void 0:e.toString().includes("%")},ue=!(!y||!j&&!N&&!P||se(y)||se(j)&&se(N)&&se(P)),ce=v()({id:h,intl:Z}),de=v()({id:O,intl:Z}),me=a.a.createElement("img",Object(n.a)({title:T,sizes:I,srcSet:k,src:"string"==typeof ce?ce:"",alt:"string"==typeof de?de:"",ref:X,className:ee.imageElement,loading:B,fetchpriority:K},D&&ue?{width:null!==(g=null!=ae?ae:y)&&void 0!==g?g:"auto",height:null!=re?re:"auto",style:te}:{style:ie},q?{"data-vtex-preload":"true"}:{})),ve=null!==(x=null==M?void 0:M.newTab)&&void 0!==x?x:null==M?void 0:M.openNewTab,pe=_()().push,ge="provide"===W?{id:V,name:z,creative:ce,position:F,products:[{productId:J,productName:U}]}:void 0,_e=v()({id:null==M?void 0:M.url,intl:Z}),fe=v()({id:null==M?void 0:M.attributeTitle,intl:Z}),xe=(null==M?void 0:M.url)?a.a.createElement(p.Link,{to:"string"==typeof _e?_e:"",title:"string"==typeof fe?fe:"",rel:M.attributeNofollow?"nofollow":"",target:ve?"_blank":void 0,className:ee.imageElementLink,onClick:function(){"none"!==W&&pe({event:"promotionClick",promotions:[ge]})}},me):a.a.createElement(l.Fragment,null,me);return s()({ref:X,onView:function(){"none"===W||Q||pe({event:"promoView",promotions:[ge]})},once:!0}),C?a.a.createElement("span",{className:"dib",style:{height:Y?"auto":ne}},xe):xe}var h=Object(d.defineMessages)({title:{id:"admin/editor.store-image.title"}});x.schema={title:h.title.id},x.cssHandles=f,t.default=x},,,,,,,,function(e,t,i){"use strict";i.r(t),function(e){var t=i(3);i.p=Object(t.getPublicPath)("vtex.store-image@0.23.1");var n=Object(t.register)((function(){return i(10)}),e,"vtex.store-image@0.23.1","vtex.store-image@0.x","Image");n.renderHotReload,n.setupHMR}.call(this,i(12)(e))}],[[18,"common"]]]);; !function(e){var t={};function n(r){if(t[r])return t[r].exports;var i=t[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)n.d(r,i,function(t){return e[t]}.bind(null,i));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=15)}([function(e,t){e.exports=React},function(e,t,n){!function(t){"use strict";var n={newline:/^\n+/,code:/^( {4}[^\n]+\n*)+/,fences:b,hr:/^ {0,3}((?:- *){3,}|(?:_ *){3,}|(?:\* *){3,})(?:\n+|$)/,heading:/^ *(#{1,6}) *([^\n]+?) *(?:#+ *)?(?:\n+|$)/,nptable:b,blockquote:/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/,list:/^( {0,3})(bull) [\s\S]+?(?:hr|def|\n{2,}(?! )(?!\1bull )\n*|\s*$)/,html:"^ {0,3}(?:<(script|pre|style)[\\s>][\\s\\S]*?(?:[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?\\?>\\n*|\\n*|\\n*|)[\\s\\S]*?(?:\\n{2,}|$)|<(?!script|pre|style)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:\\n{2,}|$)|(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:\\n{2,}|$))",def:/^ {0,3}\[(label)\]: *\n? *]+)>?(?:(?: +\n? *| *\n *)(title))? *(?:\n+|$)/,table:b,lheading:/^([^\n]+)\n {0,3}(=|-){2,} *(?:\n+|$)/,paragraph:/^([^\n]+(?:\n(?!hr|heading|lheading| {0,3}>|<\/?(?:tag)(?: +|\n|\/?>)|<(?:script|pre|style|!--))[^\n]+)*)/,text:/^[^\n]+/};function r(e){this.tokens=[],this.tokens.links=Object.create(null),this.options=e||k.defaults,this.rules=n.normal,this.options.pedantic?this.rules=n.pedantic:this.options.gfm&&(this.options.tables?this.rules=n.tables:this.rules=n.gfm)}n._label=/(?!\s*\])(?:\\[\[\]]|[^\[\]])+/,n._title=/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/,n.def=p(n.def).replace("label",n._label).replace("title",n._title).getRegex(),n.bullet=/(?:[*+-]|\d{1,9}\.)/,n.item=/^( *)(bull) ?[^\n]*(?:\n(?!\1bull ?)[^\n]*)*/,n.item=p(n.item,"gm").replace(/bull/g,n.bullet).getRegex(),n.list=p(n.list).replace(/bull/g,n.bullet).replace("hr","\\n+(?=\\1?(?:(?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$))").replace("def","\\n+(?="+n.def.source+")").getRegex(),n._tag="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|section|source|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",n._comment=//,n.html=p(n.html,"i").replace("comment",n._comment).replace("tag",n._tag).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),n.paragraph=p(n.paragraph).replace("hr",n.hr).replace("heading",n.heading).replace("lheading",n.lheading).replace("tag",n._tag).getRegex(),n.blockquote=p(n.blockquote).replace("paragraph",n.paragraph).getRegex(),n.normal=m({},n),n.gfm=m({},n.normal,{fences:/^ {0,3}(`{3,}|~{3,})([^`\n]*)\n(?:|([\s\S]*?)\n)(?: {0,3}\1[~`]* *(?:\n+|$)|$)/,paragraph:/^/,heading:/^ *(#{1,6}) +([^\n]+?) *#* *(?:\n+|$)/}),n.gfm.paragraph=p(n.paragraph).replace("(?!","(?!"+n.gfm.fences.source.replace("\\1","\\2")+"|"+n.list.source.replace("\\1","\\3")+"|").getRegex(),n.tables=m({},n.gfm,{nptable:/^ *([^|\n ].*\|.*)\n *([-:]+ *\|[-| :]*)(?:\n((?:.*[^>\n ].*(?:\n|$))*)\n*|$)/,table:/^ *\|(.+)\n *\|?( *[-:]+[-| :]*)(?:\n((?: *[^>\n ].*(?:\n|$))*)\n*|$)/}),n.pedantic=m({},n.normal,{html:p("^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+? *(?:\\n{2,}|\\s*$)|\\s]*)*?/?> *(?:\\n{2,}|\\s*$))").replace("comment",n._comment).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/}),r.rules=n,r.lex=function(e,t){return new r(t).lex(e)},r.prototype.lex=function(e){return e=e.replace(/\r\n|\r/g,"\n").replace(/\t/g," ").replace(/\u00a0/g," ").replace(/\u2424/g,"\n"),this.token(e,!0)},r.prototype.token=function(e,t){var r,i,s,a,o,l,c,u,h,p,g,d,f,b,m,v;for(e=e.replace(/^ +$/gm,"");e;)if((s=this.rules.newline.exec(e))&&(e=e.substring(s[0].length),s[0].length>1&&this.tokens.push({type:"space"})),s=this.rules.code.exec(e)){var k=this.tokens[this.tokens.length-1];e=e.substring(s[0].length),k&&"paragraph"===k.type?k.text+="\n"+s[0].trimRight():(s=s[0].replace(/^ {4}/gm,""),this.tokens.push({type:"code",codeBlockStyle:"indented",text:this.options.pedantic?s:_(s,"\n")}))}else if(s=this.rules.fences.exec(e))e=e.substring(s[0].length),this.tokens.push({type:"code",lang:s[2]?s[2].trim():s[2],text:s[3]||""});else if(s=this.rules.heading.exec(e))e=e.substring(s[0].length),this.tokens.push({type:"heading",depth:s[1].length,text:s[2]});else if((s=this.rules.nptable.exec(e))&&(l={type:"table",header:x(s[1].replace(/^ *| *\| *$/g,"")),align:s[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:s[3]?s[3].replace(/\n$/,"").split("\n"):[]}).header.length===l.align.length){for(e=e.substring(s[0].length),g=0;g ?/gm,""),this.token(s,t),this.tokens.push({type:"blockquote_end"});else if(s=this.rules.list.exec(e)){for(e=e.substring(s[0].length),c={type:"list_start",ordered:b=(a=s[2]).length>1,start:b?+a:"",loose:!1},this.tokens.push(c),u=[],r=!1,f=(s=s[0].match(this.rules.item)).length,g=0;g1?1===o.length:o.length>1||this.options.smartLists&&o!==a)&&(e=s.slice(g+1).join("\n")+e,g=f-1)),i=r||/\n\n(?!\s*$)/.test(l),g!==f-1&&(r="\n"===l.charAt(l.length-1),i||(i=r)),i&&(c.loose=!0),v=void 0,(m=/^\[[ xX]\] /.test(l))&&(v=" "!==l[1],l=l.replace(/^\[[ xX]\] +/,"")),h={type:"list_item_start",task:m,checked:v,loose:i},u.push(h),this.tokens.push(h),this.token(l,!1),this.tokens.push({type:"list_item_end"});if(c.loose)for(f=u.length,g=0;g?@\[\]\\^_`{|}~])/,autolink:/^<(scheme:[^\s\x00-\x1f<>]*|email)>/,url:b,tag:"^comment|^|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^|^",link:/^!?\[(label)\]\(href(?:\s+(title))?\s*\)/,reflink:/^!?\[(label)\]\[(?!\s*\])((?:\\[\[\]]?|[^\[\]\\])+)\]/,nolink:/^!?\[(?!\s*\])((?:\[[^\[\]]*\]|\\[\[\]]|[^\[\]])*)\](?:\[\])?/,strong:/^__([^\s_])__(?!_)|^\*\*([^\s*])\*\*(?!\*)|^__([^\s][\s\S]*?[^\s])__(?!_)|^\*\*([^\s][\s\S]*?[^\s])\*\*(?!\*)/,em:/^_([^\s_])_(?!_)|^\*([^\s*<\[])\*(?!\*)|^_([^\s<][\s\S]*?[^\s_])_(?!_|[^\spunctuation])|^_([^\s_<][\s\S]*?[^\s])_(?!_|[^\spunctuation])|^\*([^\s<"][\s\S]*?[^\s\*])\*(?!\*|[^\spunctuation])|^\*([^\s*"<\[][\s\S]*?[^\s])\*(?!\*)/,code:/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,br:/^( {2,}|\\)\n(?!\s*$)/,del:b,text:/^(`+|[^`])(?:[\s\S]*?(?:(?=[\\?@\\[^_{|}~",i.em=p(i.em).replace(/punctuation/g,i._punctuation).getRegex(),i._escapes=/\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/g,i._scheme=/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/,i._email=/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/,i.autolink=p(i.autolink).replace("scheme",i._scheme).replace("email",i._email).getRegex(),i._attribute=/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/,i.tag=p(i.tag).replace("comment",n._comment).replace("attribute",i._attribute).getRegex(),i._label=/(?:\[[^\[\]]*\]|\\[\[\]]?|`[^`]*`|`(?!`)|[^\[\]\\`])*?/,i._href=/\s*(<(?:\\[<>]?|[^\s<>\\])*>|[^\s\x00-\x1f]*)/,i._title=/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/,i.link=p(i.link).replace("label",i._label).replace("href",i._href).replace("title",i._title).getRegex(),i.reflink=p(i.reflink).replace("label",i._label).getRegex(),i.normal=m({},i),i.pedantic=m({},i.normal,{strong:/^__(?=\S)([\s\S]*?\S)__(?!_)|^\*\*(?=\S)([\s\S]*?\S)\*\*(?!\*)/,em:/^_(?=\S)([\s\S]*?\S)_(?!_)|^\*(?=\S)([\s\S]*?\S)\*(?!\*)/,link:p(/^!?\[(label)\]\((.*?)\)/).replace("label",i._label).getRegex(),reflink:p(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",i._label).getRegex()}),i.gfm=m({},i.normal,{escape:p(i.escape).replace("])","~|])").getRegex(),_extended_email:/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/,url:/^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/,_backpedal:/(?:[^?!.,:;*_~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_~)]+(?!$))+/,del:/^~+(?=\S)([\s\S]*?\S)~+/,text:/^(`+|[^`])(?:[\s\S]*?(?:(?=[\\/i.test(a[0])&&(this.inLink=!1),!this.inRawBlock&&/^<(pre|code|kbd|script)(\s|>)/i.test(a[0])?this.inRawBlock=!0:this.inRawBlock&&/^<\/(pre|code|kbd|script)(\s|>)/i.test(a[0])&&(this.inRawBlock=!1),e=e.substring(a[0].length),l+=this.options.sanitize?this.options.sanitizer?this.options.sanitizer(a[0]):u(a[0]):a[0];else if(a=this.rules.link.exec(e)){var c=v(a[2],"()");if(c>-1){var h=a[0].length-(a[2].length-c)-(a[3]||"").length;a[2]=a[2].substring(0,c),a[0]=a[0].substring(0,h).trim(),a[3]=""}e=e.substring(a[0].length),this.inLink=!0,r=a[2],this.options.pedantic?(t=/^([^'"]*[^\s])\s+(['"])(.*)\2/.exec(r))?(r=t[1],i=t[3]):i="":i=a[3]?a[3].slice(1,-1):"",r=r.trim().replace(/^<([\s\S]*)>$/,"$1"),l+=this.outputLink(a,{href:s.escapes(r),title:s.escapes(i)}),this.inLink=!1}else if((a=this.rules.reflink.exec(e))||(a=this.rules.nolink.exec(e))){if(e=e.substring(a[0].length),t=(a[2]||a[1]).replace(/\s+/g," "),!(t=this.links[t.toLowerCase()])||!t.href){l+=a[0].charAt(0),e=a[0].substring(1)+e;continue}this.inLink=!0,l+=this.outputLink(a,t),this.inLink=!1}else if(a=this.rules.strong.exec(e))e=e.substring(a[0].length),l+=this.renderer.strong(this.output(a[4]||a[3]||a[2]||a[1]));else if(a=this.rules.em.exec(e))e=e.substring(a[0].length),l+=this.renderer.em(this.output(a[6]||a[5]||a[4]||a[3]||a[2]||a[1]));else if(a=this.rules.code.exec(e))e=e.substring(a[0].length),l+=this.renderer.codespan(u(a[2].trim(),!0));else if(a=this.rules.br.exec(e))e=e.substring(a[0].length),l+=this.renderer.br();else if(a=this.rules.del.exec(e))e=e.substring(a[0].length),l+=this.renderer.del(this.output(a[1]));else if(a=this.rules.autolink.exec(e))e=e.substring(a[0].length),r="@"===a[2]?"mailto:"+(n=u(this.mangle(a[1]))):n=u(a[1]),l+=this.renderer.link(r,null,n);else if(this.inLink||!(a=this.rules.url.exec(e))){if(a=this.rules.text.exec(e))e=e.substring(a[0].length),this.inRawBlock?l+=this.renderer.text(a[0]):l+=this.renderer.text(u(this.smartypants(a[0])));else if(e)throw new Error("Infinite loop on byte: "+e.charCodeAt(0))}else{if("@"===a[2])r="mailto:"+(n=u(a[0]));else{do{o=a[0],a[0]=this.rules._backpedal.exec(a[0])[0]}while(o!==a[0]);n=u(a[0]),r="www."===a[1]?"http://"+n:n}e=e.substring(a[0].length),l+=this.renderer.link(r,null,n)}return l},s.escapes=function(e){return e?e.replace(s.rules._escapes,"$1"):e},s.prototype.outputLink=function(e,t){var n=t.href,r=t.title?u(t.title):null;return"!"!==e[0].charAt(0)?this.renderer.link(n,r,this.output(e[1])):this.renderer.image(n,r,u(e[1]))},s.prototype.smartypants=function(e){return this.options.smartypants?e.replace(/---/g,"—").replace(/--/g,"–").replace(/(^|[-\u2014/(\[{"\s])'/g,"$1‘").replace(/'/g,"’").replace(/(^|[-\u2014/(\[{\u2018\s])"/g,"$1“").replace(/"/g,"”").replace(/\.{3}/g,"…"):e},s.prototype.mangle=function(e){if(!this.options.mangle)return e;for(var t,n="",r=e.length,i=0;i.5&&(t="x"+t.toString(16)),n+="&#"+t+";";return n},a.prototype.code=function(e,t,n){var r=(t||"").match(/\S*/)[0];if(this.options.highlight){var i=this.options.highlight(e,r);null!=i&&i!==e&&(n=!0,e=i)}return r?'
'+(n?e:u(e,!0))+"
\n":"
"+(n?e:u(e,!0))+"
"},a.prototype.blockquote=function(e){return"
\n"+e+"
\n"},a.prototype.html=function(e){return e},a.prototype.heading=function(e,t,n,r){return this.options.headerIds?"'+e+"\n":""+e+"\n"},a.prototype.hr=function(){return this.options.xhtml?"
\n":"
\n"},a.prototype.list=function(e,t,n){var r=t?"ol":"ul";return"<"+r+(t&&1!==n?' start="'+n+'"':"")+">\n"+e+"\n"},a.prototype.listitem=function(e){return"
  • "+e+"
  • \n"},a.prototype.checkbox=function(e){return" "},a.prototype.paragraph=function(e){return"

    "+e+"

    \n"},a.prototype.table=function(e,t){return t&&(t=""+t+""),"\n\n"+e+"\n"+t+"
    \n"},a.prototype.tablerow=function(e){return"\n"+e+"\n"},a.prototype.tablecell=function(e,t){var n=t.header?"th":"td";return(t.align?"<"+n+' align="'+t.align+'">':"<"+n+">")+e+"\n"},a.prototype.strong=function(e){return""+e+""},a.prototype.em=function(e){return""+e+""},a.prototype.codespan=function(e){return""+e+""},a.prototype.br=function(){return this.options.xhtml?"
    ":"
    "},a.prototype.del=function(e){return""+e+""},a.prototype.link=function(e,t,n){if(null===(e=g(this.options.sanitize,this.options.baseUrl,e)))return n;var r='"},a.prototype.image=function(e,t,n){if(null===(e=g(this.options.sanitize,this.options.baseUrl,e)))return n;var r=''+n+'":">"},a.prototype.text=function(e){return e},o.prototype.strong=o.prototype.em=o.prototype.codespan=o.prototype.del=o.prototype.text=function(e){return e},o.prototype.link=o.prototype.image=function(e,t,n){return""+n},o.prototype.br=function(){return""},l.parse=function(e,t){return new l(t).parse(e)},l.prototype.parse=function(e){this.inline=new s(e.links,this.options),this.inlineText=new s(e.links,m({},this.options,{renderer:new o})),this.tokens=e.reverse();for(var t="";this.next();)t+=this.tok();return t},l.prototype.next=function(){return this.token=this.tokens.pop(),this.token},l.prototype.peek=function(){return this.tokens[this.tokens.length-1]||0},l.prototype.parseText=function(){for(var e=this.token.text;"text"===this.peek().type;)e+="\n"+this.next().text;return this.inline.output(e)},l.prototype.tok=function(){switch(this.token.type){case"space":return"";case"hr":return this.renderer.hr();case"heading":return this.renderer.heading(this.inline.output(this.token.text),this.token.depth,h(this.inlineText.output(this.token.text)),this.slugger);case"code":return this.renderer.code(this.token.text,this.token.lang,this.token.escaped);case"table":var e,t,n,r,i="",s="";for(n="",e=0;e?@[\]^`{|}~]/g,"").replace(/\s/g,"-");if(this.seen.hasOwnProperty(t)){var n=t;do{this.seen[n]++,t=n+"-"+this.seen[n]}while(this.seen.hasOwnProperty(t))}return this.seen[t]=0,t},u.escapeTest=/[&<>"']/,u.escapeReplace=/[&<>"']/g,u.replacements={"&":"&","<":"<",">":">",'"':""","'":"'"},u.escapeTestNoEncode=/[<>"']|&(?!#?\w+;)/,u.escapeReplaceNoEncode=/[<>"']|&(?!#?\w+;)/g;var d={},f=/^$|^[a-z][a-z0-9+.-]*:|^[?#]/i;function b(){}function m(e){for(var t,n,r=1;r=0&&"\\"===n[i];)r=!r;return r?"|":" |"})).split(/ \|/),r=0;if(n.length>t)n.splice(t);else for(;n.lengthAn error occurred:

    "+u(e.message+"",!0)+"
    ";throw e}}b.exec=b,k.options=k.setOptions=function(e){return m(k.defaults,e),k},k.getDefaults=function(){return{baseUrl:null,breaks:!1,gfm:!0,headerIds:!0,headerPrefix:"",highlight:null,langPrefix:"language-",mangle:!0,pedantic:!1,renderer:new a,sanitize:!1,sanitizer:null,silent:!1,smartLists:!1,smartypants:!1,tables:!0,xhtml:!1}},k.defaults=k.getDefaults(),k.Parser=l,k.parser=l.parse,k.Renderer=a,k.TextRenderer=o,k.Lexer=r,k.lexer=r.lex,k.InlineLexer=s,k.inlineLexer=s.output,k.Slugger=c,k.parse=k,e.exports=k}(this||("undefined"!=typeof window?window:global))},function(e,t,n){"use strict";var r={"&":"&","<":"<",">":">",'"':""","'":"'"},i={"&":"&","<":"<",">":">",""":'"',"'":"'"},s=/(&|<|>|"|')/g,a=/[&<>"']/g;function o(e){return r[e]}function l(e){return i[e]}function c(e){return null==e?"":String(e).replace(a,o)}function u(e){return null==e?"":String(e).replace(s,l)}c.options=u.options={},e.exports={encode:c,escape:c,decode:u,unescape:u,version:"1.0.0-browser"}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getPublicPath=t.register=void 0;var r="__RENDER_8_RUNTIME__",i="__RENDER_8_COMPONENTS__",s=!("undefined"==typeof window||!window.document);s&&!window.global&&(window.global=window),window[i]=window[i]||{},t.register=function(e,t,n,s,a){var o="".concat(n,"/").concat(a),l="".concat(s,"/").concat(a),c=function(){return function(e,t){try{var n=e();return n.__esModule?n.default:n.default||n}catch(e){throw new Error("An error happened while requiring the app ".concat(t,", please check your app's code.\\n").concat(e.stack))}}(e,o)};if(window[r]&&window[r].registerComponent){var u=!!window.__RENDER_LAZY__;window[r].registerComponent(t,u?c:c(),n,a,u)}else{var h=c();window[r]&&window[r].withHMR?window[i][o]=window[i][l]=window[r].withHMR(t,h):window[i][o]=window[i][l]=h}return{}},t.getPublicPath=function(e){var t=window.__hostname__,n="/_v/public/assets/v1/published/";return s&&window.__RUNTIME__&&(t=__RUNTIME__.assetServerPublishedHost||window.location.hostname,n=__RUNTIME__.assetServerPublishedPath||"/_v/public/assets/v1/published/"),"https://"+t+n+"".concat(e,"/public/react/")}},function(e,t,n){"use strict";e.exports=function(e){return"string"==typeof e?e.toLowerCase():e}},function(e,t,n){"use strict";var r=n(6);e.exports={uris:r(["background","base","cite","href","longdesc","src","usemap"])}},function(e,t,n){"use strict";function r(e,t){return e[t]=!0,e}e.exports=function(e){return e.reduce(r,{})}},function(e,t,n){"use strict";var r=n(6);e.exports={voids:r(["area","br","col","hr","img","wbr","input","base","basefont","link","meta"])}},function(e,t){e.exports=ReactIntl},function(e,t,n){"use strict";var r=/["'&<>]/;e.exports=function(e){var t,n=""+e,i=r.exec(n);if(!i)return n;var s="",a=0,o=0;for(a=i.index;a\s]+))?)*)\s*(\/?)\s*>/,o=/^<\s*\/\s*([\w:-]+)[^>]*>/,l=/([\w:-]+)(?:\s*=\s*(?:(?:"((?:[^"])*)")|(?:'((?:[^'])*)')|([^>\s]+)))?/g,c=/^/i,h=/^<\s*\//;e.exports=function(e,t){for(var n,p=function(){var e=[];return e.lastItem=function(){return e[e.length-1]},e}(),g=e;e;)d();function d(){n=!0,function(){"\x3c!--"===e.substr(0,4)?(i=e.indexOf("--\x3e"))>=0&&(t.comment&&t.comment(e.substring(4,i)),e=e.substring(i+3),n=!1):u.test(e)?(r=e.match(u),n=!1,e=e.substring(r[0].length)):h.test(e)?f(o,m):c.test(e)&&f(a,b);var r;var i;!function(){if(!n)return;var r,i=e.indexOf("<");i>=0?(r=e.substring(0,i),e=e.substring(i)):(r=e,e="");t.chars&&t.chars(r)}()}();var r=e===g;g=e,r&&(e="")}function f(t,r){var i=e.match(t);i&&(e=e.substring(i[0].length),i[0].replace(t,r),n=!1)}function b(e,n,a,o){var c={},u=i(n),h=s.voids[u]||!!o;a.replace(l,(function(e,t,n,i,s){c[t]=void 0===n&&void 0===i&&void 0===s?void 0:r.decode(n||i||s||"")})),h||p.push(u),t.start&&t.start(u,c,h)}function m(e,n){var r,s=0,a=i(n);if(a)for(s=p.length-1;s>=0&&p[s]!==a;s--);if(s>=0){for(r=p.length-1;r>=s;r--)t.end&&t.end(p[r]);p.length=s}}m()}},function(e,t,n){"use strict";var r=n(2),i=n(4),s=n(5),a=n(7);e.exports=function(e,t){var n,o=t||{};return h(),{start:function(e,t,a){var u=i(e);if(n.ignoring)return void c(u);if(-1===(o.allowedTags||[]).indexOf(u))return void c(u);if(o.filter&&!o.filter({tag:u,attrs:t}))return void c(u);l("<"),l(u),Object.keys(t).forEach((function(e){var n=t[e],a=(o.allowedClasses||{})[u]||[],c=(o.allowedAttributes||{})[u]||[];c=c.concat((o.allowedAttributes||{})["*"]||[]);var h=i(e);("class"===h&&-1===c.indexOf(h)?(n=n.split(" ").filter((function(e){return a&&-1!==a.indexOf(e)})).join(" ").trim()).length:-1!==c.indexOf(h)&&(!0!==s.uris[h]||function(e){var t=e[0];if("#"===t||"/"===t)return!0;var n=e.indexOf(":");if(-1===n)return!0;var r=e.indexOf("?");if(-1!==r&&n>r)return!0;var i=e.indexOf("#");if(-1!==i&&n>i)return!0;return o.allowedSchemes.some((function(t){return 0===e.indexOf(t+":")}))}(n)))&&(l(" "),l(e),"string"==typeof n&&(l('="'),l(r.encode(n)),l('"')))})),l(a?"/>":">")},end:function(e){var t=i(e);-1!==(o.allowedTags||[]).indexOf(t)&&!1===n.ignoring?(l("")):u(t)},chars:function(e){!1===n.ignoring&&l(o.transformText?o.transformText(e):e)}};function l(t){e.push(t)}function c(e){a.voids[e]||(!1===n.ignoring?n={ignoring:e,depth:1}:n.ignoring===e&&n.depth++)}function u(e){n.ignoring===e&&--n.depth<=0&&h()}function h(){n={ignoring:!1,depth:0}}}},function(e,t,n){"use strict";e.exports={allowedAttributes:{"*":["title","accesskey"],a:["href","name","target","aria-label"],iframe:["allowfullscreen","frameborder","src"],img:["src","alt","title","aria-label"]},allowedClasses:{},allowedSchemes:["http","https","mailto"],allowedTags:["a","abbr","article","b","blockquote","br","caption","code","del","details","div","em","h1","h2","h3","h4","h5","h6","hr","i","img","ins","kbd","li","main","mark","ol","p","pre","section","span","strike","strong","sub","summary","sup","table","tbody","td","th","thead","tr","u","ul"],filter:null}},function(e,t,n){"use strict";function r(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n').concat(e,"

    ")},I.current.strong=function(e){return'').concat(e,"")},I.current.em=function(e){return'').concat(e,"")},I.current.heading=function(e){return function(t,n){var r=function(e){return e>0&&e<=6?e:6}(n),i="".concat(e.heading," t-heading-").concat(r," ").concat(function(e,t){return 1===t?e.headingLevel1:2===t?e.headingLevel2:3===t?e.headingLevel3:4===t?e.headingLevel4:5===t?e.headingLevel5:6===t?e.headingLevel6:""}(e,r)," ").concat(A.a["heading-level-".concat(r)]);return"').concat(t,"")}}(E),I.current.link=function(e,t,n){var r,s=(r=e.split("?")).length<2?"":i(r,2)[1].includes("target=_blank")?"target=_blank":"",a=(s?e.replace(/target=_blank/,"").replace(/\?&/,"?"):e).replace(/(\?|&)$/,""),o=t?'title="'.concat(t,'"'):"",l='
    ")},I.current.html=function(e){return d()(e)},I.current.table=function(e,t){return'\n \n \n ').concat(e,'\n \n \n ').concat(t,"\n \n
    ")},I.current.tablerow=function(e){return"\n").concat(e,"\n")},I.current.tablecell=function(e,t){var n=t.header?"th":"td",r="<".concat(n,' class="').concat("th"===n?E.tableTh:E.tableTd,'"\n ').concat(t.align?' align="'.concat(t.align,'"'):"",">");return"".concat(r+e,"\n")},I.current.image=function(e,t,n){return'').concat(n,'")},I.current.list=function(e,t){var n=t?"ol":"ul";return"<".concat(n,' class="').concat(E.list," ").concat(t?E.listOrdered:"",'">').concat(e,"")},I.current.listitem=function(e){return'
  • ').concat(e,"
  • ")});var H=C(N,f,"textAlignment"),F=C(P,o,"textPosition"),G=C(L,o,"textPosition"),D=Object(l.useMemo)((function(){return p.a.setOptions({gfm:!0,breaks:!0,sanitize:!1,smartLists:!0,renderer:I.current}),b()(p()(y()({id:s,intl:T})),z)}),[s,T]);return c.a.createElement("div",{id:k,className:"".concat(E.container," flex ").concat(H," ").concat(F," ").concat(G," ").concat(M(q)," ").concat(Z(_))},c.a.createElement("div",{className:E.wrapper,dangerouslySetInnerHTML:{__html:D}}))}var H=Object(l.memo)(q);H.schema={title:"admin/editor.rich-text.title"};t.default=H}]);; !function(t){function e(e){for(var r,u,c=e[0],a=e[1],f=e[2],s=0,p=[];st.length)&&(e=t.length);for(var n=0,r=new Array(e);n-1?"submenu.accordion":"submenu"},b=n(9),h={x:null,y:null},O={x:null,y:null},g=0,k=0,j=0,E=function(e){if(O.x=e.pageX,O.y=e.pageY,null!=h.x&&null!=h.y){var t=e.timeStamp,n=Math.sqrt(Math.pow(O.x-h.x,2)+Math.pow(O.y-h.y,2)),i=t-k;j=Math.round(n/i*1e3),k=t}h.x=O.x,h.y=O.y},x=function(e,t){var n=t.delay,i=void 0===n?200:n,a=t.maxSpeed,o=void 0===a?450:a,l=Object(r.useRef)(null),c=(Object(r.useEffect)((function(){return 0===g&&window.addEventListener("mousemove",E),g+=1,function(){(g-=1)>0||(h.x=null,h.y=null,O.x=null,O.y=null,window.removeEventListener("mousemove",E))}}),[]),{getMouseSpeed:function(){return j||0}}).getMouseSpeed;return function(){for(var t=arguments.length,n=new Array(t),a=0;ao?e.apply(void 0,n):null!=r&&r===a||(l.current=window.setTimeout(t,i)),r=a}),i)}},w=function(e,t){var n={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.indexOf(i)<0&&(n[i]=e[i]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var a=0;for(i=Object.getOwnPropertySymbols(e);a0;){var c=l;l=new Set,c.forEach((function(e){o.has(e)||(o.add(e),(i[e]||new Set).forEach((function(e){l.add(e)})))}))}return o.forEach((function(t){var i=a(e,t);i&&n.definitions.push(i)})),n}(n,"category")},8:function(e,t,n){"use strict";var i=n(4),a=n(6),r=n.n(a),o=n(0),l=n.n(o),c=n(1),u=n.n(c),s=n(2),d=n(16),m=n.n(d),f=n(11),p=n(9),v=function(e,t){var n={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.indexOf(i)<0&&(n[i]=e[i]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var a=0;for(i=Object.getOwnPropertySymbols(e);a0;){var l=o;o=new Set,l.forEach((function(e){d.has(e)||(d.add(e),(t[e]||new Set).forEach((function(e){o.add(e)})))}))}return d.forEach((function(n){var t=a(e,n);t&&i.definitions.push(t)})),i}(i,"categoryWithChildren")},,,,,,,,,,function(e,n,i){"use strict";i.r(n),function(e){var n=i(3);i.p=Object(n.getPublicPath)("vtex.menu@2.35.3");var t=Object(n.register)((function(){return i(35)}),e,"vtex.menu@2.35.3","vtex.menu@2.x","Menu");t.renderHotReload,t.setupHMR}.call(this,i(7)(e))},,,function(e,n,i){"use strict";i.r(n);var t,a=i(4),r=i(0),d=i.n(r),o=i(6),l=i.n(o),c=i(5),m=i(1),u=i.n(m),s=i(2),v=i(10),f=i(22),g=i.n(f),h=i(8),p=function(e){var n=e.href,i=e.titleTag,t=e.isTitle,a=e.name;return d.a.createElement(h.a,{title:i,to:n,isTitle:t},a)},k=function(e){var n=e.categoryId;return null==n?null:d.a.createElement(v.Query,{query:g.a,variables:{id:n}},(function(e){var n=e.data,i=e.loading;if(e.error||i)return null;var t=n.category,r=n.category.children;return d.a.createElement(d.a.Fragment,null,d.a.createElement(p,Object(a.a)({},t,{isTitle:!0})),null==r?void 0:r.map((function(e){return d.a.createElement("li",{key:e.id},d.a.createElement(p,e))})))}))},y=i(13),b=i(11),_=i(9),N=i(17),x=function(e,n){var i={};for(var t in e)Object.prototype.hasOwnProperty.call(e,t)&&n.indexOf(t)<0&&(i[t]=e[t]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var a=0;for(t=Object.getOwnPropertySymbols(e);a11?(n&&console.warn("Invalid ".concat(n," value. It should be an integer between 0 and ").concat(11,".")),0):t},b=function(e){var n=e.isOpen,t=e.width,a=e.children,u=e.classes,r=e.orientation,c=void 0===r?i.horizontal:r,b=e.paddingTop,p=void 0===b?4:b,v=e.paddingBottom,f=void 0===v?4:v,h=l()(d,{classes:u}),x=h.handles,w=h.withModifiers;return s.a.createElement("div",{className:"".concat(x.submenuContainer," ").concat("100%"===t?"":"relative")},s.a.createElement("div",{className:o()(w("submenuWrapper",n?"isOpen":"isClosed"),"absolute left-0 bg-base pt".concat(m(p,"paddingTop")," pb").concat(m(f,"paddingBottom")," bw1 bb b--muted-3 z-2"),n?"flex":"dn",{"100%":"w-100",auto:"w-auto ml6"}[t])},s.a.createElement("section",{className:o()(x.submenu,"w-100 flex justify-center",c===i.vertical&&"flex-column")},a)))};!function(e){e.horizontal="horizontal",e.vertical="vertical"}(i||(i={}));var p=Object(r.defineMessages)({submenuTitle:{id:"admin/editor.menu.submenu.title"},submenuWidthTitle:{id:"admin/editor.menu.item.submenuWidth.title"}});b.getSchema=function(){return{title:p.submenuTitle.id}},n.default=b},5:function(e,n){e.exports=ReactIntl},6:function(e,n){e.exports=Classnames}},[[29,"common"]]]);; !function(e){function t(t){for(var r,u,c=t[0],a=t[1],l=t[2],s=0,d=[];se.length)&&(t=e.length);for(var n=0,r=new Array(t);nvoid 0===e,a=e=>null===e||s(e),c=e=>Array.isArray(e);const u=e=>"object"==typeof e;var o=e=>!a(e)&&!c(e)&&u(e),l=e=>o(e)&&e.nodeType===Node.ELEMENT_NODE;const d={onBlur:"onBlur",onChange:"onChange",onSubmit:"onSubmit"},m="blur",f="change",p="input",g="max",b="min",h="maxLength",v="minLength",O="pattern",y="required",j="validate",S=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,x=/^\w*$/,_=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,w=/\\(\\)?/g;var V=e=>!c(e)&&(x.test(e)||!S.test(e)),E=e=>{const t=[];return e.replace(_,(e,r,n,i)=>{t.push(n?i.replace(w,"$1"):r||e)}),t};function k(e,t,r){let n=-1;const i=V(t)?[t]:E(t),s=i.length,a=s-1;for(;++nObject.entries(e).reduce((e,[t,r])=>V(t)?Object.assign(Object.assign({},e),{[t]:r}):(k(e,t,r),e),{}),L=(e,t,r)=>{const n=t.split(/[,[\].]+?/).filter(Boolean).reduce((e,t)=>a(e)?e:e[t],e);return s(n)||n===e?e[t]||r:n},P=(e,t)=>{l(e)&&e.removeEventListener&&(e.removeEventListener(p,t),e.removeEventListener(f,t),e.removeEventListener(m,t))},N=e=>!!e&&"radio"===e.type,I=e=>!!e&&"checkbox"===e.type;function q(e){return!e||e instanceof HTMLElement&&e.nodeType!==Node.DOCUMENT_NODE&&q(e.parentNode)}var F=e=>o(e)&&!Object.keys(e).length;function C(e){return c(e)?e:E(e)}function M(e,t){return 1==t.length?e:function(e,t){const r=V(t)?[t]:C(t),n=t.length;let i=0;for(;ii?0:i+t),(r=r>i?i:r)<0&&(r+=i),i=t>r?0:r-t;const s=Array(i);for(;++n{!function(e,t){const r=V(t)?[t]:C(t),n=M(e,r),i=r[r.length-1],s=!(null!=n)||delete n[i];let a=void 0;for(let t=0;t0&&(a=e);++no(e)&&!F(e)).length&&delete a[t]),a=i}}}(e,t)}),e}const $={isValid:!1,value:""};var A=e=>c(e)?e.reduce((e,{ref:{checked:t,value:r}})=>t?{isValid:!0,value:r}:e,$):$,D=e=>!!e&&"file"===e.type,J=e=>!!e&&"select-multiple"===e.type,W=e=>""===e;const T={value:!1,isValid:!1},z={value:!0,isValid:!0};var U=e=>{if(c(e)){if(e.length>1){const t=e.filter(({ref:{checked:e}})=>e).map(({ref:{value:e}})=>e);return{value:t,isValid:!!t.length}}const{checked:t,value:r,attributes:n}=e[0].ref;return t?n&&!s(n.value)?s(r)||W(r)?z:{value:r,isValid:!0}:z:T}return T};function H(e,t){const{name:r,value:n}=t,i=e[r];return D(t)?t.files:N(t)?i?A(i.options).value:"":J(t)?(s=t.options,[...s].filter(({selected:e})=>e).map(({value:e})=>e)):I(t)?!!i&&U(i.options).value:n;var s}var G=e=>"string"==typeof e,K=(e,t)=>{const r={},n=G(t),i=c(t),a=t&&t.nest;for(const c in e)(s(t)||a||n&&c.startsWith(t)||i&&t.find(e=>c.startsWith(e)))&&(r[c]=H(e,e[c].ref));return r},Q=(e,{type:t,types:r,message:n})=>o(e)&&e.type===t&&e.message===n&&((e={},t={})=>Object.entries(e).reduce((e,[r,n])=>!!e&&(t[r]&&t[r]===n),!0))(e.types,r);var X=e=>e instanceof RegExp,Y=e=>{const t=o(e)&&!X(e);return{value:t?e.value:e,message:t?e.message:""}},Z=e=>"function"==typeof e,ee=e=>"boolean"==typeof e;function te(e,t,r="validate"){const n=G(e);if(n||ee(e)&&!e){return{type:r,message:n?e:"",ref:t}}}var re=(e,t,r,n,i)=>{if(!t)return{};const s=r[e];return Object.assign(Object.assign({},s),{types:Object.assign(Object.assign({},s&&s.types?s.types:{}),{[n]:i||!0})})},ne=async(e,t,{ref:r,ref:{type:n,value:i,name:s},options:c,required:u,maxLength:l,minLength:d,min:m,max:f,pattern:p,validate:S})=>{const x=e.current,_={},w=N(r),V=I(r),E=w||V,k=W(i),R=re.bind(null,s,t,_),L=(e,n,i,a=h,c=v)=>{const u=e?n:i;if(_[s]=Object.assign({type:e?a:c,message:u,ref:r},R(e?a:c,u)),!t)return _};if(u&&(!w&&!V&&(k||a(i))||ee(i)&&!i||V&&!U(c).isValid||w&&!A(c).isValid)){const{value:e,message:n}=G(u)?{value:!!u,message:u}:Y(u);if(e&&(_[s]=Object.assign({type:y,message:n,ref:E?x[s].options[0].ref:r},R(y,n)),!t))return _}if(!a(m)||!a(f)){let e,s;const{value:c,message:u}=Y(f),{value:o,message:l}=Y(m);if("number"===n||!n&&!isNaN(i)){const t=r.valueAsNumber||parseFloat(i);a(c)||(e=t>c),a(o)||(s=tnew Date(c)),G(o)&&(s=te,u=d&&a{r.reduce(async(a,[c,u],o)=>{if(!F(await a)&&!t||!Z(u))return i(a);let l;const d=te(await u(e),n,c);return d?(l=Object.assign(Object.assign({},d),R(c,d.message)),t&&(_[s]=l)):l=a,r.length-1===o?i(l):l},{})});if(!F(i)&&(_[s]=Object.assign({ref:n},i),!t))return _}}return _};const ie=(e,t)=>c(e.inner)?e.inner.reduce((e,{path:r,message:n,type:i})=>Object.assign(Object.assign({},e),e[r]&&t?{[r]:re(r,t,e,i,n)}:{[r]:e[r]||Object.assign({message:n,type:i},t?{types:{[i]:n||!0}}:{})}),{}):{[e.path]:{message:e.message,type:e.type}};async function se(e,t,r,n,i){if(n)return n(r,i);try{return{values:await e.validate(r,{abortEarly:!1,context:i}),errors:{}}}catch(e){return{values:{},errors:R(ie(e,t))}}}var ae=(e,t,r)=>s(e[t])?L(e,t,r):e[t];var ce=e=>a(e)||!u(e);const ue=(e,t)=>{const r=(t,r,n)=>{const i=n?`${e}.${r}`:`${e}[${r}]`;return ce(t)?i:ue(i,t)};return c(t)?t.map((e,t)=>r(e,t)):Object.entries(t).map(([e,t])=>r(t,e,!0))};var oe=(e,t)=>function e(t){return t.reduce((t,r)=>t.concat(c(r)?e(r):r),[])}(ue(e,t)),le=(e,t,r,n,i)=>{let a;return r.add(t),F(e)?a=i||void 0:s(e[t])?(a=L(R(e),t),c(i)&&c(a)&&a.length!==i.length&&(a=i),s(a)||oe(t,a).forEach(e=>r.add(e))):(a=e[t],r.add(t)),s(a)?o(n)?ae(n,t):n:a},de=({hasError:e,isBlurEvent:t,isOnSubmit:r,isReValidateOnSubmit:n,isOnBlur:i,isReValidateOnBlur:s,isSubmitted:a})=>r&&n||r&&!a||i&&!t&&!e||s&&!t&&e||n&&a,me=(e,t)=>{const r=R(K(e));return t?L(r,t,r):r};function fe(e,t){let r=!1;if(!c(e)||!c(t)||e.length!==t.length)return!0;for(let n=0;ne.startsWith(t+"[");var ge=(e,t)=>[...e].reduce((e,r)=>!!pe(t,r)||e,!1);var be=e=>({isOnSubmit:!e||e===d.onSubmit,isOnBlur:e===d.onBlur,isOnChange:e===d.onChange});const{useRef:he,useState:ve,useCallback:Oe,useEffect:ye}=n;function je({mode:e=d.onSubmit,reValidateMode:t=d.onChange,validationSchema:r,validationResolver:n,validationContext:i,defaultValues:u={},submitFocusError:g=!0,validateCriteriaMode:b}={}){const h=he({}),v="all"===b,O=he({}),y=he({}),j=he({}),S=he(new Set),x=he(new Set),_=he(new Set),w=he(new Set),E=he(!0),C=he({}),M=he(u),$=he(!1),A=he(!1),T=he(!1),z=he(!1),U=he(0),X=he(!1),Y=he(),te=he({}),re=he(i),ie=he(new Set),[,ue]=ve(),{isOnBlur:oe,isOnSubmit:pe}=he(be(e)).current,je="undefined"==typeof window,Se=!(!r&&!n),xe="undefined"!=typeof document&&!je&&!s(window.HTMLElement),_e=xe&&"Proxy"in window,we=he({dirty:!_e,dirtyFields:!_e,isSubmitted:pe,submitCount:!_e,touched:!_e,isSubmitting:!_e,isValid:!_e}),{isOnBlur:Ve,isOnSubmit:Ee}=he(be(t)).current,ke=Oe(()=>{$.current||ue({})},[]),Re=Oe((e,t,r,n)=>{let i=r||function({errors:e,name:t,error:r,validFields:n,fieldsWithValidation:i}){const s=F(r),a=F(e),c=L(r,t),u=L(e,t);return!(s&&n.has(t)||u&&u.isManual)&&(!!(a!==s||!a&&!u||s&&i.has(t)&&!n.has(t))||c&&!Q(u,c))}({errors:O.current,error:t,name:e,validFields:w.current,fieldsWithValidation:_.current});if(F(t)?((_.current.has(e)||Se)&&(w.current.add(e),i=i||L(O.current,e)),O.current=B(O.current,[e])):(w.current.delete(e),i=i||!L(O.current,e),k(O.current,e,t[e])),i&&!n)return ke(),!0},[ke,Se]),Le=Oe((e,t)=>{const r=e.ref,n=e.options,{type:i}=r,s=xe&&l(r)&&a(t)?"":t;var c;return N(r)&&n?n.forEach(({ref:e})=>e.checked=e.value===s):D(r)?W(s)||(c=s,"undefined"!=typeof FileList&&c instanceof FileList)?r.files=s:r.value=s:J(r)?[...r.options].forEach(e=>e.selected=s.includes(e.value)):I(r)&&n?n.length>1?n.forEach(({ref:e})=>e.checked=s.includes(e.value)):n[0].ref.checked=!!s:r.value=s,!!i},[xe]),Pe=e=>{if(!h.current[e]||!we.current.dirty&&!we.current.dirtyFields)return!1;const t=ge(ie.current,e),r=x.current.size;let n=C.current[e]!==H(h.current,h.current[e].ref);if(t){const t=e.substring(0,e.indexOf("["));n=fe(me(h.current,t),L(M.current,t))}const i=(t?z.current:x.current.has(e))!==n;return n?x.current.add(e):x.current.delete(e),z.current=t?n:!!x.current.size,we.current.dirty?i:r!==x.current.size},Ne=Oe(e=>{if(Pe(e)||!L(y.current,e)&&we.current.touched)return!!k(y.current,e,!0)},[]),Ie=Oe((e,t,r)=>{const n=c(t);for(const i in t){const s=`${r||e}${n?`[${i}]`:"."+i}`;o(t[i])&&Ie(e,t[i],s);const a=h.current[s];a&&(Le(a,t[i]),Ne(s))}},[Le,Ne]),qe=Oe((e,t)=>{const r=h.current[e];if(r){Le(r,t);const n=Ne(e);if(ee(n))return n}else ce(t)||Ie(e,t)},[Ne,Le,Ie]),Fe=Oe(async(e,t)=>{const r=h.current[e];if(!r)return!1;const n=await ne(h,v,r);return Re(e,n,!1,t),F(n)},[Re,v]),Ce=Oe(async e=>{const{errors:t}=await se(r,v,me(h.current),n,re.current),i=E.current;return E.current=F(t),c(e)?(e.forEach(e=>{const r=L(t,e);r?k(O.current,e,r):B(O.current,[e])}),ke()):Re(e,L(t,e)?{[e]:L(t,e)}:{},i!==E.current),F(O.current)},[ke,Re,v,n,r]),Me=Oe(async e=>{const t=e||Object.keys(h.current);if(Se)return Ce(t);if(c(t)){const e=await Promise.all(t.map(async e=>await Fe(e,!0)));return ke(),e.every(Boolean)}return await Fe(t)},[Ce,Fe,ke,Se]),Be=e=>{const t=(e.match(/\w+/)||[])[0];return A.current||S.current.has(e)||S.current.has(t)&&!V(e)&&ie.current.has(t)};function $e(e,t,r){let n=!1;const i=c(e);(i?e:[e]).forEach(e=>{const r=G(e);n=!(!qe(r?e:Object.keys(e)[0],r?t:Object.values(e)[0])&&!i)||Be(e)}),(n||i)&&ke(),(r||i&&t)&&Me(i?void 0:e)}Y.current=Y.current?Y.current:async({type:e,target:t})=>{const i=t?t.name:"",s=h.current,a=O.current,c=s[i],u=L(a,i);let o;if(!c)return;const l=e===m,d=de({hasError:!!u,isBlurEvent:l,isOnSubmit:pe,isReValidateOnSubmit:Ee,isOnBlur:oe,isReValidateOnBlur:Ve,isSubmitted:T.current}),f=Pe(i);let p=Be(i)||f;if(l&&!L(y.current,i)&&we.current.touched&&(k(y.current,i,!0),p=!0),d)return p&&ke();if(Se){const{errors:e}=await se(r,v,me(s),n,re.current),t=E.current;E.current=F(e),o=L(e,i)?{[i]:L(e,i)}:{},t!==E.current&&(p=!0)}else o=await ne(h,v,c);!Re(i,o)&&p&&ke()};const Ae=Oe((e={})=>{const t=F(M.current)?K(h.current):M.current;se(r,v,R(Object.assign(Object.assign({},t),e)),n,re.current).then(({errors:e})=>{const t=E.current;E.current=F(e),t!==E.current&&ke()})},[ke,v,n]),De=(e,t)=>{!s(Y.current)&&e&&function(e,t,r,n){if(!r)return;const{ref:i,ref:{name:s,type:a},mutationWatcher:u}=r;if(!a)return void delete e[s];const o=e[s];if((N(i)||I(i))&&o){const{options:r}=o;c(r)&&r.length?(r.forEach(({ref:e,mutationWatcher:i},s)=>{(e&&q(e)||n)&&(P(e,t),i&&i.disconnect(),B(r,[`[${s}]`]))}),r&&!r.filter(Boolean).length&&delete e[s]):delete e[s]}else(q(i)||n)&&(P(i,t),u&&u.disconnect(),delete e[s])}(h.current,Y.current,e,t)},Je=Oe((e,t)=>{if(!e||e&&ge(ie.current,e.ref.name)&&!t)return;De(e,t);const{name:r}=e.ref;O.current=B(O.current,[r]),y.current=B(y.current,[r]),C.current=B(C.current,[r]),[x,_,w,S].forEach(e=>e.current.delete(r)),(we.current.isValid||we.current.touched)&&(ke(),Se&&Ae())},[ke,Se,Ae]);const We=({name:e,type:t,types:r,message:n,preventRender:i})=>{const s=h.current[e];Q(O.current[e],{type:t,message:n,types:r})||(k(O.current,e,{type:t,types:r,message:n,ref:s?s.ref:{},isManual:!0}),i||ke())};function Te(e){F(h.current)||(c(e)?e:[e]).forEach(e=>Je(h.current[e],!0))}function ze(e,t={}){if(!e.name)return console.warn("Missing name @",e);const{name:r,type:n,value:i}=e,a=Object.assign({ref:e},t),u=h.current,o=N(e)||I(e);let d,g=u[r],b=!0,O=!1;if(o?g&&c(g.options)&&g.options.find(({ref:e})=>i===e.value):g)return void(u[r]=Object.assign(Object.assign({},g),t));if(n){const i=function(e,t){const r=new MutationObserver(()=>{q(e)&&(r.disconnect(),t())});return r.observe(window.document,{childList:!0,subtree:!0}),r}(e,()=>Je(a));g=o?Object.assign({options:[...g&&g.options||[],{ref:e,mutationWatcher:i}],ref:{type:n,name:r}},t):Object.assign(Object.assign({},a),{mutationWatcher:i})}else g=a;if(u[r]=g,F(M.current)||(d=ae(M.current,r),b=s(d),O=ge(ie.current,r),b||O||Le(g,d)),Se&&!O&&we.current.isValid?Ae():F(t)||(_.current.add(r),!pe&&we.current.isValid&&ne(h,v,g).then(e=>{const t=E.current;F(e)?w.current.add(r):E.current=!1,t!==E.current&&ke()})),C.current[r]||O&&b||(C.current[r]=b?H(u,g.ref):d),!n)return;!function({field:e,handleChange:t,isRadioOrCheckbox:r}){const{ref:n}=e;l(n)&&n.addEventListener&&t&&(n.addEventListener(r?f:p,t),n.addEventListener(m,t))}({field:o&&g.options?g.options[g.options.length-1]:g,isRadioOrCheckbox:o,handleChange:Y.current})}function Ue(e,t){if(!je)if(G(e))ze({name:e},t);else{if(!o(e)||!("name"in e))return t=>t&&ze(t,e);ze(e,t)}}const He=Oe(e=>async t=>{let i,s;t&&(t.preventDefault(),t.persist());const a=h.current;we.current.isSubmitting&&(X.current=!0,ke());try{if(Se){s=K(a);const{errors:e,values:t}=await se(r,v,R(s),n,re.current);O.current=e,i=e,s=t}else{const{errors:e,values:t}=await Object.values(a).reduce(async(e,t)=>{if(!t)return e;const r=await e,{ref:n,ref:{name:i}}=t;if(!a[i])return Promise.resolve(r);const s=await ne(h,v,t);return s[i]?(k(r.errors,i,s[i]),w.current.delete(i),Promise.resolve(r)):(_.current.has(i)&&w.current.add(i),r.values[i]=H(a,n),Promise.resolve(r))},Promise.resolve({errors:{},values:{}}));i=e,s=t}F(i)?(O.current={},await e(R(s),t)):(g&&xe&&((e,t)=>{for(const r in e)if(L(t,r)){const t=e[r];if(t){if(l(t.ref)&&t.ref.focus){t.ref.focus();break}if(t.options){t.options[0].ref.focus();break}}}})(a,i),O.current=i)}finally{T.current=!0,X.current=!1,U.current=U.current+1,ke()}},[xe,ke,Se,g,v,n,r]),Ge=e=>{const t=K(h.current),r=F(t)?M.current:t;return e&&e.nest?R(r):r};ye(()=>()=>{$.current=!0,h.current&&Object.values(h.current).forEach(e=>Je(e,!0))},[Je]),Se||(E.current=w.current.size>=_.current.size&&F(O.current));const Ke={dirty:z.current,dirtyFields:x.current,isSubmitted:T.current,submitCount:U.current,touched:y.current,isSubmitting:X.current,isValid:pe?T.current&&F(O.current):E.current};return{watch:function(e,t){const r=s(t)?s(M.current)?{}:M.current:t,n=K(h.current,e),i=S.current;if(G(e))return le(n,e,i,r,ie.current.has(e)?j.current[e]:void 0);if(c(e))return e.reduce((e,t)=>{let s;return s=F(h.current)&&o(r)?ae(r,t):le(n,t,i,r),Object.assign(Object.assign({},e),{[t]:s})},{});A.current=!0;const a=!F(n)&&n||t||M.current;return e&&e.nest?R(a):a},control:Object.assign(Object.assign({register:Ue,unregister:Te,removeFieldEventListener:De,getValues:Ge,setValue:$e,reRender:ke,triggerValidation:Me},Se?{validateSchemaIsValid:Ae}:{}),{formState:Ke,mode:{isOnBlur:oe,isOnSubmit:pe},reValidateMode:{isReValidateOnBlur:Ve,isReValidateOnSubmit:Ee},errorsRef:O,touchedFieldsRef:y,fieldsRef:h,resetFieldArrayFunctionRef:te,validFieldsRef:w,fieldsWithValidationRef:_,watchFieldArrayRef:j,fieldArrayNamesRef:ie,isDirtyRef:z,readFormStateRef:we,defaultValuesRef:M}),handleSubmit:He,setValue:Oe($e,[ke,qe,Me]),triggerValidation:Me,getValues:Oe(Ge,[]),reset:Oe(e=>{if(xe)for(const e of Object.values(h.current))if(e&&l(e.ref)&&e.ref.closest)try{e.ref.closest("form").reset();break}catch(e){}e&&(M.current=e),Object.values(te.current).forEach(e=>Z(e)&&e()),O.current={},h.current={},y.current={},w.current=new Set,_.current=new Set,C.current={},S.current=new Set,x.current=new Set,A.current=!1,T.current=!1,z.current=!1,E.current=!0,U.current=0,ke()},[]),register:Oe(Ue,[M.current,C.current,j.current]),unregister:Oe(Te,[]),clearError:Oe((function(e){s(e)?O.current={}:B(O.current,c(e)?e:[e]),ke()}),[]),setError:Oe((function(e,t="",r){G(e)?We(Object.assign({name:e},o(t)?{types:t,type:""}:{type:t,message:r})):c(e)&&(e.forEach(e=>We(Object.assign(Object.assign({},e),{preventRender:!0}))),ke())}),[]),errors:O.current,formState:_e?new Proxy(Ke,{get:(e,t)=>t in e?(we.current[t]=!0,e[t]):{}}):Ke}}function Se(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(n=Object.getOwnPropertySymbols(e);i{var{name:t,rules:r,as:i,onBlur:a,onChange:c,onChangeName:u=d.onChange,onBlurName:l=d.onBlur,valueName:m,defaultValue:f,control:p}=e,g=Se(e,["name","rules","as","onBlur","onChange","onChangeName","onBlurName","valueName","defaultValue","control"]);const b=_e(),{defaultValuesRef:h,setValue:v,register:O,unregister:y,errorsRef:j,removeFieldEventListener:S,triggerValidation:x,mode:{isOnSubmit:_,isOnBlur:w},reValidateMode:{isReValidateOnBlur:V,isReValidateOnSubmit:E},formState:{isSubmitted:k},fieldsRef:R,fieldArrayNamesRef:P}=p||b.control,[N,I]=Object(n.useState)(s(f)?L(h.current,t):f),q=Object(n.useRef)(N),F=ee(N),C=()=>!de({hasError:!!L(j.current,t),isOnBlur:w,isOnSubmit:_,isReValidateOnBlur:V,isReValidateOnSubmit:E,isSubmitted:k}),M=e=>{const t=((e,t)=>ce(e)||!o(e.target)||o(e.target)&&!e.type?e:t||s(e.target.value)?e.target.checked:e.target.value)(e,F);return I(t),q.current=t,t},B=()=>{ge(P.current,t)&&R.current[t]&&S(R.current[t],!0),O(Object.defineProperty({name:t},"value",{set(e){I(e),q.current=e},get:()=>q.current}),Object.assign({},r))};Object(n.useEffect)(()=>{R.current[t]||(B(),I(s(f)?L(h.current,t):f))}),Object(n.useEffect)(()=>(B(),()=>{ge(P.current,t)||y(t)}),[t]);const $=w||V,A=Object.assign(Object.assign(Object.assign(Object.assign({name:t},g),c?{[u]:(D=c,(...e)=>v(t,M(D(e)),C()))}:{[u]:e=>{const r=M(e);v(t,r,C())}}),a||$?{[l]:(...e)=>{a&&a(e),$&&x(t)}}:{}),{[m||(F?"checked":"value")]:N});var D;return Object(n.isValidElement)(i)?Object(n.cloneElement)(i,A):Object(n.createElement)(i,A)},Le=(e,t)=>e+"/"+t,Pe=e=>{const t=e.split("/");return"#"===t[0]&&t.shift(),t},Ne=/^[a-z][a-z0-9+.-]*:/i,Ie=e=>Ne.test(e),qe=/^#(\/(([^#/~])|(~[01]))*)*/i,Fe=(e,t,r)=>{if(Ie(e)){const r=new URL(e);if(r.hash)return Fe(r.hash,t,t[`${r.origin}${r.pathname}`])}else if(n=e,qe.test(n)&&r)return Pe(e).reduce((e,t)=>{if(e)return e[t]},r);var n;return t[e]},Ce=(e,t,r)=>{let n={};if(e.$ref){const i=e.$ref;if(r.indexOf(i)>-1)return n;r.push(i),n=Object.assign({},Fe(i,t))}else n=Object.assign({},e);return Object.keys(n).reduce((e,n)=>("object"!=typeof e[n]||null===e[n]||Array.isArray(e[n])||r.indexOf(e[n].$ref)>-1||(e[n]=Ce(e[n],t,r.slice())),e),n)},Me={integer:e=>parseInt(e),number:e=>parseFloat(e),boolean:e=>"true"===e},Be=(e,t)=>Object.keys(t).sort().reduce((r,n)=>{const i=Pe(n);return i&&t[n]?(i.reduce((e,r,i,s)=>{var a;return e.currentSubSchema=e.currentSubSchema?e.currentSubSchema[r]:void 0,"properties"!==r||e.insideProperties?(i===s.length-1&&e.currentSubSchema?e.currentJSON[r]=e.currentSubSchema.type&&Me[e.currentSubSchema.type]?Me[e.currentSubSchema.type](t[n]):null!==(a=e.targetData)&&void 0!==a?a:{}:!e.currentJSON[r]&&e.currentSubSchema&&(e.currentJSON[r]={}),e.currentJSON=e.currentJSON[r],Object.assign(Object.assign({},e),{insideProperties:!1})):Object.assign(Object.assign({},e),{insideProperties:!0})},{currentJSON:r,currentSubSchema:e,insideProperties:!1,targetData:t[n]}),r):r},{}),$e=(e,t,r)=>{var n;const{schema:i}=r,s=Pe(e).reduce((e,t)=>{var r;const{JSONSchema:n,currentData:i}=e;if(!(n&&"object"===n.type||e.insideProperties))return Object.assign(Object.assign({},e),{JSONSchema:void 0,invalidPointer:!0});if("properties"===t&&!e.insideProperties){const i=e.isRequired;return Object.assign(Object.assign({},e),{JSONSchema:n.properties,fatherIsRequired:i,pointer:Le(e.pointer,t),insideProperties:!0,currentRequiredField:null!==(r=n.required)&&void 0!==r?r:[]})}const s=!!i,a=i?i[t]:i,c=e.currentRequiredField.indexOf(t)>-1;return Object.assign(Object.assign({},e),{JSONSchema:n[t],currentData:a,fatherExists:s,isRequired:c,invalidPointer:!1,objectName:t,pointer:Le(e.pointer,t),insideProperties:!1})},{JSONSchema:i,currentData:t,fatherExists:!0,fatherIsRequired:!0,invalidPointer:!1,isRequired:!0,objectName:"",pointer:"#",insideProperties:!1,currentRequiredField:null!==(n=i.required)&&void 0!==n?n:[]});return{JSONSchema:s.JSONSchema,invalidPointer:s.invalidPointer,isRequired:s.fatherIsRequired&&s.isRequired||!s.fatherIsRequired&&s.isRequired&&s.fatherExists,objectName:s.objectName,pointer:s.pointer}},Ae=Object(n.createContext)(null);function De(){return Object(n.useContext)(Ae)}const Je=e=>{const{formProps:t,onChange:r,validationMode:s="onSubmit",revalidateMode:a="onChange",submitFocusError:c=!0,defaultValues:u}=e,o=je({defaultValues:u,mode:s,reValidateMode:a,submitFocusError:c}),l=i.a.useRef(!0);if("function"==typeof r){const t=o.watch();!1===l.current&&r(Be(e.schema,t))}const d=Object(n.useMemo)(()=>(e=>{const t=(e,r,n)=>Object.keys(r).reduce((i,s)=>{if("object"==typeof r[s]&&null!==r[s]&&!Array.isArray(r[s]))return Object.assign(Object.assign({},t(Le(e,s),r[s],n)),i);const a=r[s];if("$id"===s&&a&&(i[a]=r,!Ie(a)))try{i[new URL(a,n).href]=r}catch(e){if(!(e instanceof TypeError))throw e}return i},{[e]:r});let r=void 0;if(e.$id&&Ie(e.$id))try{r=new URL(e.$id)}catch(e){if(r=void 0,!(e instanceof TypeError))throw e}return r?Object.assign({[r.href]:e},t("#",e,r)):t("#",e,r)})(e.schema),[e.schema]),m=Object(n.useMemo)(()=>Ce(e.schema,d,[]),[e.schema,d]),f=Object(n.useMemo)(()=>Object.assign(Object.assign({},o),{schema:m,idMap:d,customValidators:e.customValidators}),[o,m,d,e.customValidators]),p=Object.assign({},t);return p.onSubmit=o.handleSubmit(async(t,r)=>{if(e.onSubmit)return e.onSubmit({data:Be(e.schema,t),event:r,methods:f})}),e.noNativeValidate&&(p.noValidate=e.noNativeValidate),!0===l.current&&(l.current=!1),i.a.createElement(Ae.Provider,{value:f},i.a.createElement("form",Object.assign({},p),e.children))};var We,Te,ze,Ue;(Ue=We||(We={})).generic="generic",Ue.radio="radio",Ue.select="select",Ue.input="input",Ue.textArea="textArea",Ue.checkbox="checkbox",function(e){e.default="default",e.radio="radio",e.select="select",e.input="input",e.hidden="hidden",e.password="password",e.textArea="textArea",e.checkbox="checkbox"}(Te||(Te={})),function(e){e.required="__form_error_required__",e.maxLength="__form_error_maxLength__",e.minLength="__form_error_minLength__",e.maxValue="__form_error_maxValue__",e.minValue="__form_error_minValue__",e.pattern="__form_error_pattern__",e.notInteger="__form_error_notInteger__",e.notFloat="__form_error_notFloat__",e.multipleOf="__form_error_multipleOf__",e.notInEnum="__form_error_notInEnum",e.undefinedError="__form_error_undefinedError__"}(ze||(ze={}));const He=(e,t)=>{const r=Math.pow(10,t||0);return String(Math.round(e*r)/r)},Ge=e=>{const t=void 0!==e.multipleOf?"integer"===e.type?parseInt(e.multipleOf):parseFloat(e.multipleOf):"integer"===e.type?1:"any";let r=void 0;if(e.multipleOf){const t=e.multipleOf.toString().split(".")[1];r=t?t.length:0}return[t,r]},Ke=e=>{const[t]=Ge(e);let r=void 0!==e.exclusiveMinimum?e.exclusiveMinimum:void 0!==e.minimum?e.minimum:void 0;return void 0!==r&&void 0!==e.exclusiveMinimum&&(r+=t&&"any"!=t?t:1e-4),r},Qe=e=>{const[t]=Ge(e);let r=void 0!==e.exclusiveMaximum?parseFloat(e.exclusiveMaximum):void 0!==e.maximum?parseFloat(e.maximum):void 0;return void 0!==r&&void 0!==e.exclusiveMaximum&&(r-=t&&"any"!=t?t:1e-4),r};function Xe(e,t){return Object.keys(e).reduce((r,n)=>(r[n]=r=>e[n](r,t),r),{})}const Ye=(e,t)=>{const{JSONSchema:r,isRequired:n}=e,i=Object.keys(t).length>0||r.enum,s=Object.assign({},i?{validate:Object.assign(Object.assign({},Xe(t,e)),r.enum?{enumValidator:e=>{if(!r.enum||!e)return!0;for(const t of r.enum)if(t==e)return!0;return ze.notInEnum}}:void 0)}:void 0);switch(n&&(s.required=ze.required),r.type){case"integer":case"number":return((e,t)=>{const r=Ke(e),n=Qe(e);return t.validate=Object.assign(Object.assign({},t.validate),{multipleOf:t=>"integer"!==e.type||!t||e.multipleOf&&(parseInt(t)%parseInt(e.multipleOf)==0||ze.multipleOf)}),"integer"===e.type?t.pattern={value:/^([+-]?[1-9]\d*|0)$/,message:ze.notInteger}:t.pattern={value:/^([+-]?[0-9]+([.][0-9]+))?$/,message:ze.notFloat},(r||0===r)&&(t.min={value:r,message:ze.minValue}),(n||0===n)&&(t.max={value:n,message:ze.maxValue}),t})(r,s);case"string":return c=s,(a=r).minLength&&(c.minLength={value:a.minLength,message:ze.minLength}),a.maxLength&&(c.maxLength={value:a.maxLength,message:ze.maxLength}),a.pattern&&(c.pattern={value:new RegExp(a.pattern),message:ze.pattern}),c;case"boolean":return s;default:return{}}var a,c},Ze=(e,t)=>$e(e,t,De()),et=(e,t)=>{var r;const n=Pe(e);let i=!1;return null===(r=n.reduce((e,t)=>"properties"!==t||i?(i=!1,{currentData:e.currentData?e.currentData[t]:void 0,insideProperties:!0}):(i=!0,Object.assign(Object.assign({},e),{insideProperties:!0})),{currentData:t,insideProperties:!1}).currentData)||void 0===r?void 0:r.toString()},tt=(e,t,r)=>{var n;const{JSONSchema:i,isRequired:s,objectName:a}=t;let c,u,o;if("number"===i.type||"integer"===i.type){const e=Ge(i);o=e[0],c=Ke(i),u=Qe(i)}return{name:a,pointer:r,isRequired:s,formContext:e,type:We.generic,validator:Ye(t,null!==(n=e.customValidators)&&void 0!==n?n:{}),getError:()=>((e,t,r,n,i,s,a,c)=>{if("array"===t.type){const e=n.getValues({nest:!0})[i];if(e){const r=e.filter(e=>!1!==e).length||0;if(t.minItems&&rt.maxItems)return{message:ze.maxLength,expected:t.maxItems}}}if(!e)return;const u={message:"string"==typeof e.message?e.message:ze.undefinedError,expected:void 0};switch(e.message){case ze.required:u.message=ze.required,u.expected=r;break;case ze.maxLength:u.message=ze.maxLength,u.expected=t.maxLength;break;case ze.minLength:u.message=ze.minLength,u.expected=t.minLength;break;case ze.maxValue:u.message=ze.maxValue,u.expected=a;break;case ze.minValue:u.message=ze.minValue,u.expected=s;break;case ze.multipleOf:u.message=ze.multipleOf,u.expected=c;break;case ze.pattern:u.message=ze.pattern,u.expected=t.pattern;break;case ze.notInEnum:u.message=ze.notInEnum,u.expected=t.enum}return u})(e.errors[r]?e.errors[r]:void 0,i,s,e,r,c,u,o),getObject:()=>i,getCurrentValue:()=>e.getValues()[r]}},rt=e=>{const t=De(),r=Be(t.schema,t.getValues()),n=Ze(e,r);return tt(t,n,e)},nt=e=>e?e.toString():"",it=e=>e.enum?e.enum.map(nt):[],st=(e,t,r)=>e+"-checkbox-input-"+(r[t]?r[t]:""),at=e=>{const{register:t}=e.formContext,{validator:r}=e,n=e.getObject();let i,s,a,c,u=[];if("array"===n.type){if(n.items.enum)u=it(n.items);else if("string"===n.items.type)u=it(n);else if("number"===n.items.type||"integer"===n.items.type){const e=Ge(n);if(a=e[0],c=e[1],i=Ke(n),s=Qe(n),void 0!==i&&void 0!==s&&"any"!=a)for(let e=i;e<=s;e+=a)u.push(He(e,c||0))}n.uniqueItems&&(u=[...new Set(u)])}else"boolean"===n.type&&(u=["true"]);return Object.assign(Object.assign({},e),{type:We.checkbox,isSingle:"boolean"===n.type,getItemInputProps:i=>{const s={key:""};return s.name="array"===n.type?`${e.pointer}[${i}]`:e.pointer,s.ref=t(r),s.type="checkbox",s.id=st(e.pointer,i,u),s.value=u[i],s},getItemLabelProps:t=>{const r={};return r.id=((e,t,r)=>e+"-checkbox-label-"+(r[t]?r[t]:""))(e.pointer,t,u),r.htmlFor=st(e.pointer,t,u),r},getItems:()=>u})},ct=e=>at(rt(e)),ut=(e,t)=>e+"-"+t+"-input",ot=(e,t)=>{const{register:r}=e.formContext,{validator:n}=e,i=e.getObject();let s,a,c,u;const o={key:""};if("string"===i.type)o.pattern=i.pattern,o.minLength=i.minLength,o.maxLength=i.maxLength;else if("number"===i.type||"integer"===i.type){const e=Ge(i);c=e[0],u=e[1],s=Ke(i),a=Qe(i),o.min=""+s,o.max=""+a,o.step="any"===c?"any":He(c,u||0)}return Object.assign(Object.assign({},e),{type:We.input,getLabelProps:()=>{const r={};return r.id=((e,t)=>e+"-"+t+"-label")(e.pointer,t),r.htmlFor=ut(e.pointer,t),r},getInputProps:()=>(o.name=e.pointer,o.ref=r(n),o.type=t,o.required=e.isRequired,o.id=ut(e.pointer,t),o)})},lt=()=>({}),dt=e=>Object.assign(Object.assign({},ot(e,"hidden")),{isRequired:!1,getLabelProps:lt}),mt=e=>dt(rt(e)),ft=e=>{const t=e.getObject();let r="text";if("string"===t.type)switch(t.format){case"date":r="date";break;case"date-time":r="datetime-local";break;case"email":r="email";break;case"hostname":case"uri":r="url"}else"integer"!==t.type&&"number"!==t.type||(r="number");return ot(e,r)},pt=e=>ft(rt(e)),gt=(e,t,r)=>e+"-radio-input-"+(r[t]?r[t]:""),bt=e=>{const{register:t}=e.formContext,{validator:r}=e,n=e.getObject();let i,s,a,c,u=[];if("string"===n.type)u=it(n);else if("number"===n.type||"integer"===n.type){const e=Ge(n);if(a=e[0],c=e[1],i=Ke(n),s=Qe(n),void 0!==i&&void 0!==s&&"any"!=a)for(let e=i;e<=s;e+=a)u.push(He(e,c||0))}else"boolean"===n.type&&(u=["true","false"]);return Object.assign(Object.assign({},e),{type:We.radio,getLabelProps:()=>{const t={};return t.id=e.pointer+"-label",t.htmlFor=void 0!==n.title?n.title:e.pointer,t},getItemInputProps:n=>{const i={key:""};return i.name=e.pointer,i.ref=t(r),i.type="radio",i.required=e.isRequired,i.id=gt(e.pointer,n,u),i.value=u[n],i},getItemLabelProps:t=>{const r={};return r.id=((e,t,r)=>e+"-radio-label-"+(r[t]?r[t]:""))(e.pointer,t,u),r.htmlFor=gt(e.pointer,t,u),r},getItems:()=>u})},ht=e=>bt(rt(e)),vt=e=>e+"-select",Ot=e=>{const{register:t}=e.formContext,{validator:r}=e,n=e.getObject();let i,s,a,c,u=[""];if("string"===n.type)u=u.concat(it(n));else if("number"===n.type||"integer"===n.type){const e=Ge(n);if(a=e[0],c=e[1],i=Ke(n),s=Qe(n),void 0!==i&&void 0!==s&&"any"!=a)for(let e=i;e<=s;e+=a)u.push(He(e,c||0))}else"boolean"===n.type&&(u=["true","false"]);return Object.assign(Object.assign({},e),{type:We.select,validator:r,getLabelProps:()=>{const t={};return t.id=e.pointer+"-label",t.htmlFor=vt(e.pointer),t},getSelectProps:()=>{const n={};return n.name=e.pointer,n.ref=t(r),n.required=e.isRequired,n.id=vt(e.pointer),n},getItemOptionProps:t=>{const r={};return r.id=((e,t,r)=>e+"-select-option-"+(r[t]?r[t]:""))(e.pointer,t,u),r.value=u[t],r},getItems:()=>u})},yt=e=>Ot(rt(e)),jt=e=>ot(e,"password"),St=e=>jt(rt(e)),xt=e=>e+"-textarea-input",_t=e=>{const{register:t}=e.formContext,{validator:r}=e,n=e.getObject(),i={};return"string"===n.type&&(i.minLength=n.minLength,i.maxLength=n.maxLength),Object.assign(Object.assign({},e),{type:We.textArea,getLabelProps:()=>{const t={};return t.id=e.pointer+"-textarea-label",t.htmlFor=xt(e.pointer),t},getTextAreaProps:()=>(i.name=e.pointer,i.ref=t(r),i.required=e.isRequired,i.id=xt(e.pointer),i)})},wt=e=>_t(rt(e));function Vt(e){const t=e.getObject(),r=[];switch(t.type){case"string":t.enum?r.push(Ot(e)):r.push(ft(e));break;case"integer":case"number":r.push(ft(e));break;case"array":case"boolean":r.push(at(e))}return r}const Et=e=>{const t=De(),r=Be(t.schema,t.getValues());return function e(t,r,n,i,s){let a=[];const{JSONSchema:c}=r,u=tt(t,r,n);if("object"===c.type)return Object.keys(c.properties).reduce(function(t,r,n,i){return(s,a)=>{const c=r&&r.properties?r.properties[a]:void 0,u=Le(Le(t,"properties"),a),o=$e(u,i,n),l=e(n,o,u,c,i);return s.concat(l)}}(n,i,t,s),[]);if(!i)return a.concat(Vt(u));switch(i.type){case Te.default:a=a.concat(Vt(u));break;case Te.checkbox:a.push(at(u));break;case Te.hidden:a.push(dt(u));break;case Te.input:a.push(ft(u));break;case Te.password:a.push(jt(u));break;case Te.radio:a.push(bt(u));break;case Te.select:a.push(Ot(u));break;case Te.textArea:a.push(_t(u))}return a}(t,Ze(e.pointer,r),e.pointer,e.UISchema,r)}}]]);; (window.webpackJsonpvtex_store_form_0_10_1=window.webpackJsonpvtex_store_form_0_10_1||[]).push([[1],{11:function(e,t,r){"use strict";r.d(t,"a",(function(){return s})),r.d(t,"c",(function(){return m})),r.d(t,"d",(function(){return b})),r.d(t,"b",(function(){return d}));var n=r(4),a=r(0),o=r.n(a),c=r(10),l=r.n(c),u=r(1),i=r(5),s=function(e){var t=e.pointer,r=e.value,a=Object(u.g)(t);return o.a.createElement("input",Object(n.a)({},a.getInputProps(),{value:r}))},m=function(e){var t=e.pointer,r=e.label,n=e.placeholder,a=Object(u.j)(t);return o.a.createElement(d,{inputObject:a,label:r,placeholder:n})},b=function(e){var t=e.pointer,r=e.label,n=e.placeholder,a=Object(u.h)(t);return o.a.createElement(d,{inputObject:a,label:r,placeholder:n})},d=function(e){var t,r,a=e.inputObject,c=e.placeholder,u=a.getError(),s=a.getObject(),m=null!==(r=null!==(t=e.label)&&void 0!==t?t:s.title)&&void 0!==r?r:a.name;return o.a.createElement(l.a,Object(n.a)({},a.getInputProps(),{label:m,error:!!u,errorMessage:Object(i.a)(u),placeholder:c}))}},22:function(e,t,r){"use strict";r.d(t,"b",(function(){return s})),r.d(t,"a",(function(){return m}));var n=r(4),a=r(0),o=r.n(a),c=r(18),l=r.n(c),u=r(1),i=r(5),s=function(e){var t=Object(u.m)(e.pointer);return o.a.createElement(m,{textAreaObject:t,label:e.label,placeholder:e.placeholder})},m=function(e){var t,r,a=e.textAreaObject,c=e.placeholder,u=a.getError(),s=a.getObject(),m=null!==(r=null!==(t=e.label)&&void 0!==t?t:s.title)&&void 0!==r?r:a.name;return o.a.createElement(l.a,Object(n.a)({},a.getTextAreaProps(),{label:m,error:!!u,errorMessage:Object(i.a)(u),placeholder:c}))}},23:function(e,t,r){"use strict";r.d(t,"b",(function(){return i})),r.d(t,"a",(function(){return s}));var n=r(0),a=r.n(n),o=r(19),c=r.n(o),l=r(1),u=r(5),i=function(e){var t=e.pointer,r=e.label,n=Object(l.k)(t);return a.a.createElement(s,{radioObject:n,label:r})},s=function(e){var t,r,n=e.radioObject,o=n.getError(),i=n.getObject(),s=null!==(r=null!==(t=e.label)&&void 0!==t?t:i.title)&&void 0!==r?r:n.name;return a.a.createElement(l.a,{name:n.pointer,control:n.formContext.control,rules:n.validator,as:a.a.createElement(c.a,{name:s,required:n.isRequired,hideBorder:!0,label:s,options:n.getItems().map((function(e){return{value:e,label:e}})),error:!!o,errorMessage:Object(u.a)(o)})})}},24:function(e,t,r){"use strict";r.d(t,"b",(function(){return i})),r.d(t,"a",(function(){return s}));var n=r(0),a=r.n(n),o=r(20),c=r.n(o),l=r(1),u=r(5),i=function(e){var t=Object(l.l)(e.pointer);return a.a.createElement(s,{selectObject:t,label:e.label})},s=function(e){var t,r,o=e.selectObject,i=o.getError(),s=o.getObject(),m=null!==(r=null!==(t=e.label)&&void 0!==t?t:s.title)&&void 0!==r?r:o.name,b=o.getItems(),d=Object(n.useMemo)((function(){return b.map((function(e){return{value:e,label:e}}))}),[b]);return a.a.createElement(a.a.Fragment,null,a.a.createElement(l.a,{name:o.pointer,control:o.formContext.control,rules:o.validator,as:a.a.createElement(c.a,{name:m,multi:!1,label:m,options:d,error:!!i,errorMessage:Object(u.a)(i)})}))}},25:function(e,t,r){"use strict";r.d(t,"b",(function(){return i})),r.d(t,"a",(function(){return s}));var n=r(4),a=r(0),o=r.n(a),c=r(14),l=r.n(c),u=r(1),i=function(e){var t=Object(u.f)(e.pointer);return o.a.createElement(s,{checkboxObject:t,label:e.label})},s=function(e){var t,r,a=e.checkboxObject,c=a.getObject(),u=null!==(r=null!==(t=e.label)&&void 0!==t?t:c.title)&&void 0!==r?r:a.name;if(a.isSingle){var i=a.formContext.watch(a.pointer);return o.a.createElement(o.a.Fragment,null,o.a.createElement(l.a,Object(n.a)({},a.getItemInputProps(0),{label:u,required:a.isRequired,checked:Boolean(i),value:"true",onChange:function(){var e=a.pointer;a.formContext.setValue(e,!i)}})))}return o.a.createElement(o.a.Fragment,null,a.getItems().map((function(e,t){var r=a.formContext.watch("".concat(a.pointer,"[").concat(t,"]"));return o.a.createElement(l.a,Object(n.a)({},a.getItemInputProps(t),{key:"".concat(e).concat(t),label:u,required:a.isRequired,value:e},r?{checked:!0}:{checked:!1},{onChange:function(){var e=a.pointer;a.formContext.setValue(e,!r)},checked:Boolean(r)}))})))}},28:function(e,t,r){"use strict";r.d(t,"a",(function(){return b}));var n=r(0),a=r.n(n),o=r(1),c=r(11),l=r(22),u=r(23),i=r(24),s=r(25),m=function(e){switch(e.baseObject.type){case o.d.input:var t=e.baseObject;return a.a.createElement(c.b,{inputObject:t});case o.d.radio:var r=e.baseObject;return a.a.createElement(u.a,{radioObject:r});case o.d.select:var n=e.baseObject;return a.a.createElement(i.a,{selectObject:n});case o.d.textArea:var m=e.baseObject;return a.a.createElement(l.a,{textAreaObject:m});case o.d.checkbox:var b=e.baseObject;return a.a.createElement(s.a,{checkboxObject:b});default:return a.a.createElement(a.a.Fragment,null)}},b=function(e){var t=e.pointer,r=e.uiSchema,n=Object(o.i)({pointer:t,UISchema:r});return a.a.createElement(a.a.Fragment,null,n.map((function(e){return a.a.createElement("div",{key:"".concat(e.type).concat(e.pointer)},a.a.createElement(m,{baseObject:e}))})))}},5:function(e,t,r){"use strict";r.d(t,"a",(function(){return c}));var n=r(2),a=r(1),o=Object(n.defineMessages)({required:{id:"store/form.error.required"},maxLength:{id:"store/form.error.maxLength"},minLength:{id:"store/form.error.minLength"},maxValue:{id:"store/form.error.maxValue"},minValue:{id:"store/form.error.minValue"},notFloat:{id:"store/form.error.notFloat"},notInteger:{id:"store/form.error.notInteger"},pattern:{id:"store/form.error.pattern"},notInEnum:{id:"store/form.error.notInEnum"},multipleOf:{id:"store/form.error.multipleOf"},genericError:{id:"store/form.error.undefinedError"}}),c=function(e){var t,r,c,l,u,i=Object(n.useIntl)();if(!e)return"";switch(e.message){case a.b.required:return i.formatMessage(o.required);case a.b.maxLength:return i.formatMessage(o.maxLength,{value:null===(t=e.expected)||void 0===t?void 0:t.toString()});case a.b.minLength:return i.formatMessage(o.minLength,{value:null===(r=e.expected)||void 0===r?void 0:r.toString()});case a.b.maxValue:return i.formatMessage(o.maxValue,{value:null===(c=e.expected)||void 0===c?void 0:c.toString()});case a.b.minValue:return i.formatMessage(o.minValue,{value:null===(l=e.expected)||void 0===l?void 0:l.toString()});case a.b.notFloat:return i.formatMessage(o.notFloat);case a.b.notInteger:return i.formatMessage(o.notInteger);case a.b.notInEnum:return i.formatMessage(o.notInEnum);case a.b.pattern:return i.formatMessage(o.pattern);case a.b.multipleOf:return i.formatMessage(o.multipleOf,{value:null===(u=e.expected)||void 0===u?void 0:u.toString()});default:return i.formatMessage(o.genericError)}}}}]);; (window.webpackJsonpvtex_store_form_0_10_1=window.webpackJsonpvtex_store_form_0_10_1||[]).push([["Form"],[function(e,n){e.exports=React},,function(e,n){e.exports=ReactIntl},,,,,function(e,n){e.exports=__RENDER_8_COMPONENTS__["vtex.native-types@0.x/IOMessage"]},,,function(e,n){e.exports=__RENDER_8_COMPONENTS__["vtex.styleguide@9.x/Input"]},,function(e,n){e.exports=__RENDER_8_COMPONENTS__["vtex.styleguide@9.x/Alert"]},function(e,n){e.exports=__RENDER_8_COMPONENTS__["vtex.styleguide@9.x/Button"]},function(e,n){e.exports=__RENDER_8_COMPONENTS__["vtex.styleguide@9.x/Checkbox"]},function(e,n,t){"use strict";t.d(n,"b",(function(){return o})),t.d(n,"a",(function(){return u}));var r=t(0),a={loading:!1,userInputError:null,serverError:null,success:null};function i(e,n){switch(n.type){case"SET_LOADING":return{loading:!0,userInputError:null,serverError:null,success:null};case"SET_SUCCESS":return{loading:!1,userInputError:!1,serverError:null,success:!0};case"SET_USER_INPUT_ERROR":return Object.assign(Object.assign({},e),{loading:!1,userInputError:!0,success:!1});case"SET_SERVER_INTERNAL_ERROR":return Object.assign(Object.assign({},e),{loading:!1,serverError:!0,success:!1});default:return e}}var o=function(){return Object(r.useReducer)(i,a)},u=t.n(r).a.createContext(a)},,function(e,n){e.exports=ReactApollo},function(e,n){e.exports=__RENDER_8_COMPONENTS__["vtex.styleguide@9.x/Textarea"]},function(e,n){e.exports=__RENDER_8_COMPONENTS__["vtex.styleguide@9.x/RadioGroup"]},function(e,n){e.exports=__RENDER_8_COMPONENTS__["vtex.styleguide@9.x/Dropdown"]},,,,,,function(e,n){e.exports=__RENDER_8_COMPONENTS__["vtex.css-handles@0.x/useCssHandles"]},function(e,n,t){"use strict";t.r(n),t.d(n,"default",(function(){return b}));var r=t(0),a=t.n(r),i=t(2),o=t(13),u=t.n(o),c=t(12),s=t.n(c),d=t(26),m=t.n(d),l=t(7),f=t.n(l),v=t(15),p=["formSubmitContainer","formSubmitButton","formErrorServer","formErrorUserInput"],E=Object(i.defineMessages)({submitButton:{id:"store/form.submit.buttonLabel"},userInputError:{id:"store/form.submit.error.userInputError"},serverError:{id:"store/form.submit.error.serverError"}});function b(e){var n=e.label,t=void 0===n?E.submitButton.id:n,i=Object(r.useContext)(v.a),o=i.loading,c=i.userInputError,d=i.serverError,l=m()(p);return a.a.createElement("div",{className:l.formSubmitContainer},a.a.createElement("div",{className:l.formSubmitButton},a.a.createElement(u.a,{type:"submit",isLoading:o},a.a.createElement(f.a,{id:t}))),a.a.createElement("div",{className:l.formErrorUserInput},c&&a.a.createElement(s.a,{type:"error"},a.a.createElement(f.a,{id:E.userInputError.id}))),a.a.createElement("div",{className:l.formErrorServer},d&&a.a.createElement(s.a,{type:"error"},a.a.createElement(f.a,{id:E.serverError.id}))))}},,,function(e,n){e.exports=regeneratorRuntime},function(e,n){var t={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"getPublicSchema"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"dataEntity"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"schema"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}},directives:[]}],directives:[{kind:"Directive",name:{kind:"Name",value:"context"},arguments:[{kind:"Argument",name:{kind:"Name",value:"sender"},value:{kind:"StringValue",value:"vtex.store-form@0.10.1",block:!1}}]}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"documentPublicSchema"},arguments:[{kind:"Argument",name:{kind:"Name",value:"dataEntity"},value:{kind:"Variable",name:{kind:"Name",value:"dataEntity"}}},{kind:"Argument",name:{kind:"Name",value:"schema"},value:{kind:"Variable",name:{kind:"Name",value:"schema"}}}],directives:[{kind:"Directive",name:{kind:"Name",value:"context"},arguments:[{kind:"Argument",name:{kind:"Name",value:"provider"},value:{kind:"StringValue",value:"vtex.store-graphql",block:!1}}]},{kind:"Directive",name:{kind:"Name",value:"runtimeMeta"},arguments:[{kind:"Argument",name:{kind:"Name",value:"hash"},value:{kind:"StringValue",value:"f3722824087d2db9766a00227bb44916dfa425060002028aba80d740d8bb31fe",block:!1}}]}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"schema"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"__typename"},arguments:[],directives:[]}]}}]}}],loc:{start:0,end:334}};t.loc.source={body:'query getPublicSchema($dataEntity: String!, $schema: String!) @context(sender: "vtex.store-form@0.10.1") {\n documentPublicSchema(dataEntity: $dataEntity, schema: $schema) @context(provider: "vtex.store-graphql") @runtimeMeta(hash: "f3722824087d2db9766a00227bb44916dfa425060002028aba80d740d8bb31fe") {\n schema\n __typename\n }\n}\n',name:"GraphQL request",locationOffset:{line:1,column:1}};var r={};function a(e,n){for(var t=0;t0;){var c=u;u=new Set,c.forEach((function(e){o.has(e)||(o.add(e),(r[e]||new Set).forEach((function(e){u.add(e)})))}))}return o.forEach((function(n){var r=a(e,n);r&&t.definitions.push(r)})),t}(t,"getPublicSchema")},function(e,n){e.exports=__RENDER_8_RUNTIME__},function(e,n){var t={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"createDocument"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"dataEntity"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"document"}},type:{kind:"NamedType",name:{kind:"Name",value:"DocumentInputV2"}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"schema"}},type:{kind:"NamedType",name:{kind:"Name",value:"String"}},directives:[]}],directives:[{kind:"Directive",name:{kind:"Name",value:"context"},arguments:[{kind:"Argument",name:{kind:"Name",value:"sender"},value:{kind:"StringValue",value:"vtex.store-form@0.10.1",block:!1}}]},{kind:"Directive",name:{kind:"Name",value:"runtimeMeta"},arguments:[{kind:"Argument",name:{kind:"Name",value:"hash"},value:{kind:"StringValue",value:"9a7fad14a6c8d79d3df1d4064732f32b732d3379365246f93502e86f26628f2f",block:!1}}]}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"createDocumentV2"},arguments:[{kind:"Argument",name:{kind:"Name",value:"dataEntity"},value:{kind:"Variable",name:{kind:"Name",value:"dataEntity"}}},{kind:"Argument",name:{kind:"Name",value:"document"},value:{kind:"Variable",name:{kind:"Name",value:"document"}}},{kind:"Argument",name:{kind:"Name",value:"schema"},value:{kind:"Variable",name:{kind:"Name",value:"schema"}}}],directives:[{kind:"Directive",name:{kind:"Name",value:"context"},arguments:[{kind:"Argument",name:{kind:"Name",value:"provider"},value:{kind:"StringValue",value:"vtex.store-graphql",block:!1}}]}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"cacheId"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"href"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"documentId"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"__typename"},arguments:[],directives:[]}]}}]}}],loc:{start:0,end:412}};t.loc.source={body:'mutation createDocument($dataEntity: String!, $document: DocumentInputV2, $schema: String) @context(sender: "vtex.store-form@0.10.1") @runtimeMeta(hash: "9a7fad14a6c8d79d3df1d4064732f32b732d3379365246f93502e86f26628f2f") {\n createDocumentV2(dataEntity: $dataEntity, document: $document, schema: $schema) @context(provider: "vtex.store-graphql") {\n cacheId\n id\n href\n documentId\n __typename\n }\n}\n',name:"GraphQL request",locationOffset:{line:1,column:1}};var r={};function a(e,n){for(var t=0;t0;){var c=u;u=new Set,c.forEach((function(e){o.has(e)||(o.add(e),(r[e]||new Set).forEach((function(e){u.add(e)})))}))}return o.forEach((function(n){var r=a(e,n);r&&t.definitions.push(r)})),t}(t,"createDocument")},,,,,,,,,function(e,n,t){"use strict";t.r(n),function(e){var n=t(3);t.p=Object(n.getPublicPath)("vtex.store-form@0.10.1");var r=Object(n.register)((function(){return t(62)}),e,"vtex.store-form@0.10.1","vtex.store-form@0.x","Form");r.renderHotReload,r.setupHMR}.call(this,t(9)(e))},,,,,,,,,,,,,,,,,,,,function(e,n,t){"use strict";t.r(n);var r=t(0),a=t.n(r),i=t(17),o=t(2),u=t(12),c=t.n(u),s=t(28),d=t(27),m=t(31),l=t.n(m),f=t(21),v=t.n(f),p=t(29),E=t(8),b=t(1),k=t(32),h=t(33),g=t.n(h),S=function(e,n){return"".concat(e,"/").concat(n)},N=function(e,n){return n.errors?e.concat(n.errors):e},y=function(e,n){var t,r,a,i;return(null===(i=null===(a=null===(r=null===(t=null==n?void 0:n.extensions)||void 0===t?void 0:t.exception)||void 0===r?void 0:r.response)||void 0===a?void 0:a.data)||void 0===i?void 0:i.errors)?e.concat(n.extensions.exception.response.data.errors.reduce(N,[])):e},_=function(e,n,t){e[n]?e[n].push(t):e[n]=[t]},x=function(e,n){var t=S(S(e.schemaId,"properties"),n);return _(e.nodes,t,b.b.required),{nodes:e.nodes,schemaId:e.schemaId}},O=function(e,n){switch(n.ErrorType){case"required":Array.isArray(n.Value)&&(e=n.Value.reduce(x,{nodes:e,schemaId:n.SchemaId}).nodes);break;case"format":case"type":_(e,n.SchemaId,b.b.pattern);break;case"maximum":_(e,n.SchemaId,b.b.maxValue);break;case"minimum":_(e,n.SchemaId,b.b.minValue);break;case"enum":_(e,n.SchemaId,b.b.notInEnum);break;case"minLength":_(e,n.SchemaId,b.b.minLength);break;case"maxLength":_(e,n.SchemaId,b.b.maxLength)}return e},R=t(15),D=function(e){var n=e.data,t=e.properties,r=Object.assign({},n);return Object.entries(t).forEach((function(e){var n,t=Object(E.a)(e,2),a=t[0];"date-time"===(null===(n=t[1])||void 0===n?void 0:n.format)&&r[a]&&(r[a]=new Date(r[a]).toISOString())})),r};function I(e,n){var t;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(t=function(e,n){if(!e)return;if("string"==typeof e)return T(e,n);var t=Object.prototype.toString.call(e).slice(8,-1);"Object"===t&&e.constructor&&(t=e.constructor.name);if("Map"===t||"Set"===t)return Array.from(e);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return T(e,n)}(e))||n&&e&&"number"==typeof e.length){t&&(e=t);var r=0,a=function(){};return{s:a,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:a}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,o=!0,u=!1;return{s:function(){t=e[Symbol.iterator]()},n:function(){var e=t.next();return o=e.done,e},e:function(e){u=!0,i=e},f:function(){try{o||null==t.return||t.return()}finally{if(u)throw i}}}}function T(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=new Array(n);te.length)&&(t=e.length);for(var r=0,n=new Array(t);r