;/*FB_PKG_DELIM*/ __d("WAWebBusinessAdvertiseOutlineIcon.react",["WAWebSvgComponentBase","react","stylex"],(function(t,n,r,o,a,i,l){var e=["height","iconXstyle","name","viewBox","width"],s,u,c=s||(s=r("react")),d="business-advertise-outline";function m(t){var n=t.height,a=t.iconXstyle,i=t.name,l=t.viewBox,s=t.width,m=babelHelpers.objectWithoutPropertiesLoose(t,e),p;if(l){var _=l.height,f=_===void 0?0:_,g=l.width,h=g===void 0?0:g,y=l.x,C=y===void 0?0:y,b=l.y,v=b===void 0?0:b;p=[C,v,h,f].join(" ")}var S=24,R=24;return(n!=null||s!=null)&&(S=n,R=s),c.jsx(o("WAWebSvgComponentBase").BaseSvgSpan,babelHelpers.extends({name:i!=null?i:d},m,{children:c.jsxs("svg",{viewBox:p!=null?p:"0 0 24 24",height:S,width:R,preserveAspectRatio:"xMidYMid meet",className:(u||(u=r("stylex")))(a),fill:"none",children:[c.jsx("title",{children:i!=null?i:d}),c.jsxs("g",{clipPath:"url(#clip0_49_15701)",children:[c.jsx("path",{d:"M18.9999 11C18.4476 11 18 11.4477 18 12C18 12.5523 18.4476 13 18.9999 13C19.6495 13 20.342 13 21.0001 13C21.5523 13 22 12.5523 22 12C22 11.4477 21.5523 11 21.0001 11C20.342 11 19.6495 11 18.9999 11Z",fill:"currentColor"}),c.jsx("path",{d:"M16.6011 16.8072C16.2704 17.2516 16.3632 17.8787 16.8073 18.2099C17.326 18.5966 17.8786 19.0107 18.4032 19.4036C18.8437 19.7336 19.4676 19.6446 19.7972 19.2037C20.129 18.7599 20.0392 18.1303 19.5958 17.7979C19.0715 17.4049 18.5194 16.9903 18.0014 16.6014C17.5596 16.2697 16.931 16.364 16.6011 16.8072Z",fill:"currentColor"}),c.jsx("path",{d:"M19.6005 6.20285C20.0429 5.87049 20.1305 5.24205 19.7992 4.79887C19.4685 4.35657 18.8426 4.2672 18.4007 4.59844C17.8751 4.99242 17.3215 5.40811 16.8021 5.79802C16.3595 6.13031 16.2704 6.75915 16.6018 7.20242C16.9318 7.6438 17.5567 7.73263 17.998 7.4026C18.5185 7.01339 19.0735 6.59866 19.6005 6.20285Z",fill:"currentColor"}),c.jsx("path",{d:"M4 9C2.9 9 2 9.9 2 11V13C2 14.1 2.9 15 4 15H5V19C5 19.5523 5.44772 20 6 20C6.55228 20 7 19.5523 7 19V15H8L13 18V6L8 9H4ZM9.03 10.71L11 9.53V14.47L9.03 13.29L8.55 13H8H4V11H8H8.55L9.03 10.71Z",fill:"currentColor"}),c.jsx("path",{d:"M15.5 11.9999C15.5 10.6699 14.92 9.4699 14 8.6499V15.3399C14.92 14.5299 15.5 13.3299 15.5 11.9999Z",fill:"currentColor"})]}),c.jsx("defs",{children:c.jsx("clipPath",{id:"clip0_49_15701",children:c.jsx("rect",{width:24,height:24,fill:"white"})})})]})}))}m.displayName=m.name+" [from "+i.id+"]",l.BusinessAdvertiseOutlineIcon=m}),98); __d("WAWebAdvertisePill.react",["fbt","WAWebAdCreationLogger","WAWebBusinessAdvertiseOutlineIcon.react","WAWebChatlistUtils","WAWebListFilterButton.react","WDSIconIcCampaignMegaphone.react","react"],(function(t,n,r,o,a,i,l,s){var e,u,c=u||(u=r("react")),d=(e||(e=o("react"))).useEffect;function m(e){var t=e.adCreationUrlInput,n=e.ctaText,a=e.disabled,i=e.lwiEntryPoint,l=t.activeAccountInfo;d(function(){o("WAWebAdCreationLogger").logAdCreationImpression(i,l!=="not-linked"&&l.hasFacebookPage)},[l,i]);var u=c.jsx(o("WAWebBusinessAdvertiseOutlineIcon.react").BusinessAdvertiseOutlineIcon,{}),m=n!=null?n:s._(/*BTDS*/"Promocionar"),p=function(){o("WAWebChatlistUtils").handleAdCreation({adCreationUrlInput:t,lwiEntryPoint:i})};return c.jsx(r("WAWebListFilterButton.react"),{label:m,selected:!1,disabled:a,onClick:p,startIcon:u,startWDSIcon:r("WDSIconIcCampaignMegaphone.react"),theme:"drawer-header"})}m.displayName=m.name+" [from "+i.id+"]",l.default=m}),226); __d("WAWebProductCollectionLogEvents",["WAWebBizCatalogUtils","WAWebCatalogBizWamEvent","WAWebProductCatalogContext","WAWebProductCatalogEventUtils","WAWebWamEnumCatalogBizAction"],(function(t,n,r,o,a,i,l){function e(e){var t=e.catalogContext,n=e.catalogOwnerJid,r=e.collectionId,a=o("WAWebBizCatalogUtils").getProductStatsInFetched(n,r),i=a==null?void 0:a.productIndex,l=a==null?void 0:a.collectionIndex;o("WAWebProductCatalogEventUtils").logCatalogViewOrBizEvent(babelHelpers.extends({isOwner:o("WAWebProductCatalogEventUtils").isCatalogOwner({catalogOwnerJid:n}),productIndex:i,collectionIndex:l},o("WAWebProductCatalogContext").toDataForCatalogViewEvents(t),{catalogOwnerJid:n}))}function s(e){var t=e.addedCount,n=e.catalogContext,r=e.collectionId,a=e.removedCount;t>0&&new(o("WAWebCatalogBizWamEvent")).CatalogBizWamEvent({catalogBizAction:o("WAWebWamEnumCatalogBizAction").CATALOG_BIZ_ACTION.ACTION_COLLECTION_ASSIGN_ITEMS,catalogEntryPoint:n.entryPoint,catalogSessionId:n.session.toString(),productCount:t,collectionId:r}).commit(),a>0&&new(o("WAWebCatalogBizWamEvent")).CatalogBizWamEvent({catalogBizAction:o("WAWebWamEnumCatalogBizAction").CATALOG_BIZ_ACTION.ACTION_COLLECTION_UNASSIGN_ITEMS,catalogEntryPoint:n.entryPoint,catalogSessionId:n.session.toString(),productCount:a,collectionId:r}).commit()}function u(e){var t=e.catalogContext,n=e.collectionId;new(o("WAWebCatalogBizWamEvent")).CatalogBizWamEvent({catalogBizAction:o("WAWebWamEnumCatalogBizAction").CATALOG_BIZ_ACTION.ACTION_COLLECTION_DELETED,catalogEntryPoint:t.entryPoint,catalogSessionId:t.session.toString(),collectionId:n}).commit()}function c(e){var t=e.catalogContext,n=e.collectionId;new(o("WAWebCatalogBizWamEvent")).CatalogBizWamEvent({catalogBizAction:o("WAWebWamEnumCatalogBizAction").CATALOG_BIZ_ACTION.ACTION_COLLECTION_DELETED,catalogEntryPoint:t.entryPoint,catalogSessionId:t.session.toString(),collectionId:n}).commit()}function d(e){new(o("WAWebCatalogBizWamEvent")).CatalogBizWamEvent({catalogBizAction:o("WAWebWamEnumCatalogBizAction").CATALOG_BIZ_ACTION.ACTION_MENU_COLLECTIONS_CLICK,catalogEntryPoint:e.entryPoint,catalogSessionId:e.session.toString()}).commit()}function m(e){var t=e.catalogContext,n=e.collectionId,r=e.productCount;new(o("WAWebCatalogBizWamEvent")).CatalogBizWamEvent({catalogBizAction:o("WAWebWamEnumCatalogBizAction").CATALOG_BIZ_ACTION.ACTION_COLLECTION_CREATED,catalogEntryPoint:t.entryPoint,catalogSessionId:t.session.toString(),productCount:r}).commit()}function p(e){new(o("WAWebCatalogBizWamEvent")).CatalogBizWamEvent({catalogBizAction:o("WAWebWamEnumCatalogBizAction").CATALOG_BIZ_ACTION.ACTION_COLLECTION_CREATE_CLICKED,catalogEntryPoint:e.entryPoint,catalogSessionId:e.session.toString()}).commit()}function _(e){var t=e.catalogContext,n=e.movesCount;new(o("WAWebCatalogBizWamEvent")).CatalogBizWamEvent({catalogBizAction:o("WAWebWamEnumCatalogBizAction").CATALOG_BIZ_ACTION.ACTION_COLLECTION_CHANGE_ORDER,catalogEntryPoint:t.entryPoint,catalogSessionId:t.session.toString(),productCount:n}).commit()}l.logCollectionSeeAllView=e,l.logCollectionItemsAssignment=s,l.logCollectionDeleted=u,l.logCollectionRenamed=c,l.logCollectionMenuClicked=d,l.logCollectionCreated=m,l.logCollectionCreateClicked=p,l.logCollectionReorder=_}),98); __d("WAWebBizCatalogManagementAppealCollectionMutation_facebookRelayOperation",[],(function(t,n,r,o,a,i){a.exports="9971242039605207"}),null); __d("WAWebBizCatalogManagementAppealCollectionMutation.graphql",["WAWebBizCatalogManagementAppealCollectionMutation_facebookRelayOperation"],(function(t,n,r,o,a,i){"use strict";var e=(function(){var e=[{defaultValue:null,kind:"LocalArgument",name:"input"}],t=[{alias:null,args:[{kind:"Variable",name:"request",variableName:"input"}],concreteType:"XFBWhatsAppCatalogAppealCollectionResponse",kind:"LinkedField",name:"xfb_whatsapp_catalog_appeal_collection",plural:!1,selections:[{alias:null,args:null,kind:"ScalarField",name:"success",storageKey:null}],storageKey:null}];return{fragment:{argumentDefinitions:e,kind:"Fragment",metadata:null,name:"WAWebBizCatalogManagementAppealCollectionMutation",selections:t,type:"Mutation",abstractKey:null},kind:"Request",operation:{argumentDefinitions:e,kind:"Operation",name:"WAWebBizCatalogManagementAppealCollectionMutation",selections:t},params:{id:n("WAWebBizCatalogManagementAppealCollectionMutation_facebookRelayOperation"),metadata:{},name:"WAWebBizCatalogManagementAppealCollectionMutation",operationKind:"mutation",text:null}}})();a.exports=e}),null); __d("WAWebBizCatalogManagementAppealCollection",["Promise","WALogger","WAWebBizCatalogManagementAppealCollectionMutation.graphql","WAWebBizGatingUtils","WAWebFetchAdAccountToken","WAWebGraphQLServerError","WAWebNetworkStatus","WAWebRelayClient"],(function(t,n,r,o,a,i,l){var e,s,u,c,d,m={type:"error"},p=e!==void 0?e:e=n("WAWebBizCatalogManagementAppealCollectionMutation.graphql");function _(e){return o("WAWebBizGatingUtils").graphQLForAppealCollectionEnabled()?f(e).then(function(e){return e.type==="success"?(o("WALogger").LOG(s||(s=babelHelpers.taggedTemplateLiteralLoose(["appealCollection: success"]))),e):(e.type,o("WALogger").LOG(u||(u=babelHelpers.taggedTemplateLiteralLoose(['appealCollection: failed as "','"'])),e.type),e)}):(d||(d=n("Promise"))).resolve({type:"not-enabled"})}function f(e){return o("WAWebFetchAdAccountToken").fetchToken().then(function(t){return t.type==="success"?g(t.token,e).then(function(e){return e.type!=="success"&&e.type==="auth-failure"?o("WAWebFetchAdAccountToken").markTokenAsInvalid():e.type,e}):(t.type,t)})}function g(e,t){return r("WAWebNetworkStatus").waitIfOffline().then(function(){return o("WAWebRelayClient").commitMutation(p,{input:t},{environmentType:"facebook",accessToken:e})}).then(function(e){if(e==null)return m;var t=e.xfb_whatsapp_catalog_appeal_collection;if(t==null)return m;var n=t.success;return n==null?m:{type:"success",result:n}}).catch(function(e){return o("WALogger").LOG(c||(c=babelHelpers.taggedTemplateLiteralLoose(["appealCollectionWithToken: failed with error"]))),o("WAWebFetchAdAccountToken").hasGraphQLAuthError(e)?{type:"auth-failure"}:e instanceof o("WAWebGraphQLServerError").GraphQLServerError?{type:"graphql-error",error:e}:m})}l.appealCollection=_}),98); __d("WAWebBizCatalogManagementCreateCollectionMutation_facebookRelayOperation",[],(function(t,n,r,o,a,i){a.exports="29361942130088470"}),null); __d("WAWebBizCatalogManagementCreateCollectionMutation.graphql",["WAWebBizCatalogManagementCreateCollectionMutation_facebookRelayOperation"],(function(t,n,r,o,a,i){"use strict";var e=(function(){var e=[{defaultValue:null,kind:"LocalArgument",name:"input"}],t=[{alias:null,args:[{kind:"Variable",name:"request",variableName:"input"}],concreteType:"XFBWhatsAppCatalogCreateCollectionResponse",kind:"LinkedField",name:"xfb_whatsapp_catalog_create_collection",plural:!1,selections:[{alias:null,args:null,concreteType:"XFBWhatsAppCatalogCreateCollectionResponseFields",kind:"LinkedField",name:"collection",plural:!1,selections:[{alias:null,args:null,kind:"ScalarField",name:"id",storageKey:null},{alias:null,args:null,concreteType:"WhatsAppCatalogCreateCollectionStatusInfo",kind:"LinkedField",name:"status_info",plural:!1,selections:[{alias:null,args:null,kind:"ScalarField",name:"status",storageKey:null}],storageKey:null}],storageKey:null}],storageKey:null}];return{fragment:{argumentDefinitions:e,kind:"Fragment",metadata:null,name:"WAWebBizCatalogManagementCreateCollectionMutation",selections:t,type:"Mutation",abstractKey:null},kind:"Request",operation:{argumentDefinitions:e,kind:"Operation",name:"WAWebBizCatalogManagementCreateCollectionMutation",selections:t},params:{id:n("WAWebBizCatalogManagementCreateCollectionMutation_facebookRelayOperation"),metadata:{},name:"WAWebBizCatalogManagementCreateCollectionMutation",operationKind:"mutation",text:null}}})();a.exports=e}),null); __d("WAWebBizCatalogManagementCreateCollection",["WALogger","WAWebBizCatalogManagementCreateCollectionMutation.graphql","WAWebFetchAdAccountToken","WAWebGraphQLServerError","WAWebNetworkStatus","WAWebProductTypes.flow","WAWebRelayClient"],(function(t,n,r,o,a,i,l){var e,s,u,c,d={type:"error"},m=e!==void 0?e:e=n("WAWebBizCatalogManagementCreateCollectionMutation.graphql");function p(e){return _(e).then(function(e){return e.type==="success"?(o("WALogger").LOG(s||(s=babelHelpers.taggedTemplateLiteralLoose(["createCollection: success"]))),e):(e.type,o("WALogger").LOG(u||(u=babelHelpers.taggedTemplateLiteralLoose(['createCollection: failed as "','"'])),e.type),e)})}function _(e){return o("WAWebFetchAdAccountToken").fetchToken().then(function(t){return t.type==="success"?f(t.token,e).then(function(e){return e.type!=="success"&&e.type==="auth-failure"?o("WAWebFetchAdAccountToken").markTokenAsInvalid():e.type,e}):(t.type,t)})}function f(e,t){return r("WAWebNetworkStatus").waitIfOffline().then(function(){return o("WAWebRelayClient").commitMutation(m,{input:t},{environmentType:"facebook",accessToken:e})}).then(function(e){if(e==null)return d;var t=e.xfb_whatsapp_catalog_create_collection;if(t==null)return d;var n=t.collection;if(n==null)return d;var r=n.id,a=n.status_info;if(r==null||a==null)return d;var i=a.status,l=o("WAWebProductTypes.flow").mapCollectionReviewStatusToWASchema(i);return l==null?d:{type:"success",collectionResult:{id:r,reviewStatus:l}}}).catch(function(e){return o("WALogger").LOG(c||(c=babelHelpers.taggedTemplateLiteralLoose(["createCollectionWithToken: failed with error"]))),o("WAWebFetchAdAccountToken").hasGraphQLAuthError(e)?{type:"auth-failure"}:e instanceof o("WAWebGraphQLServerError").GraphQLServerError?{type:"graphql-error",error:e}:d})}l.createCollection=p}),98); __d("WAWebBizCatalogManagementDeleteCollectionsMutation_facebookRelayOperation",[],(function(t,n,r,o,a,i){a.exports="29970196299234260"}),null); __d("WAWebBizCatalogManagementDeleteCollectionsMutation.graphql",["WAWebBizCatalogManagementDeleteCollectionsMutation_facebookRelayOperation"],(function(t,n,r,o,a,i){"use strict";var e=(function(){var e=[{defaultValue:null,kind:"LocalArgument",name:"input"}],t=[{alias:null,args:[{kind:"Variable",name:"request",variableName:"input"}],concreteType:"XFBWhatsAppCatalogDeleteCollectionsResponse",kind:"LinkedField",name:"xfb_whatsapp_catalog_delete_collections",plural:!1,selections:[{alias:null,args:null,kind:"ScalarField",name:"success",storageKey:null}],storageKey:null}];return{fragment:{argumentDefinitions:e,kind:"Fragment",metadata:null,name:"WAWebBizCatalogManagementDeleteCollectionsMutation",selections:t,type:"Mutation",abstractKey:null},kind:"Request",operation:{argumentDefinitions:e,kind:"Operation",name:"WAWebBizCatalogManagementDeleteCollectionsMutation",selections:t},params:{id:n("WAWebBizCatalogManagementDeleteCollectionsMutation_facebookRelayOperation"),metadata:{},name:"WAWebBizCatalogManagementDeleteCollectionsMutation",operationKind:"mutation",text:null}}})();a.exports=e}),null); __d("WAWebBizCatalogManagementDeleteCollections",["Promise","WALogger","WAWebBizCatalogManagementDeleteCollectionsMutation.graphql","WAWebBizGatingUtils","WAWebFetchAdAccountToken","WAWebGraphQLServerError","WAWebNetworkStatus","WAWebRelayClient"],(function(t,n,r,o,a,i,l){var e,s,u,c,d,m={type:"error"},p=e!==void 0?e:e=n("WAWebBizCatalogManagementDeleteCollectionsMutation.graphql");function _(e){return o("WAWebBizGatingUtils").graphQLForDeleteCollectionEnabled()?f(e).then(function(e){return e.type==="success"?(o("WALogger").LOG(s||(s=babelHelpers.taggedTemplateLiteralLoose(["deleteCollections: success"]))),e):(e.type,o("WALogger").LOG(u||(u=babelHelpers.taggedTemplateLiteralLoose(['deleteCollections: failed as "','"'])),e.type),e)}):(d||(d=n("Promise"))).resolve({type:"not-enabled"})}function f(e){return o("WAWebFetchAdAccountToken").fetchToken().then(function(t){return t.type==="success"?g(t.token,e).then(function(e){return e.type!=="success"&&e.type==="auth-failure"?o("WAWebFetchAdAccountToken").markTokenAsInvalid():e.type,e}):(t.type,t)})}function g(e,t){return r("WAWebNetworkStatus").waitIfOffline().then(function(){return o("WAWebRelayClient").commitMutation(p,{input:t},{environmentType:"facebook",accessToken:e})}).then(function(e){if(e==null)return m;var t=e.xfb_whatsapp_catalog_delete_collections;return t==null?m:t.success===!0?{type:"success"}:m}).catch(function(e){return o("WALogger").LOG(c||(c=babelHelpers.taggedTemplateLiteralLoose(["deleteCollectionsWithToken: failed with error"]))),o("WAWebFetchAdAccountToken").hasGraphQLAuthError(e)?{type:"auth-failure"}:e instanceof o("WAWebGraphQLServerError").GraphQLServerError?{type:"graphql-error",error:e}:m})}l.deleteCollections=_}),98); __d("WAWebBizCatalogManagementUpdateCollectionMutation_facebookRelayOperation",[],(function(t,n,r,o,a,i){a.exports="24486970300891371"}),null); __d("WAWebBizCatalogManagementUpdateCollectionMutation.graphql",["WAWebBizCatalogManagementUpdateCollectionMutation_facebookRelayOperation"],(function(t,n,r,o,a,i){"use strict";var e=(function(){var e=[{defaultValue:null,kind:"LocalArgument",name:"input"}],t=[{alias:null,args:[{kind:"Variable",name:"request",variableName:"input"}],concreteType:"XFBWhatsAppCatalogUpdateCollectionResponse",kind:"LinkedField",name:"xfb_whatsapp_catalog_update_collection",plural:!1,selections:[{alias:null,args:null,concreteType:"XFBWhatsAppCatalogUpdateCollectionResponseAttributes",kind:"LinkedField",name:"collection",plural:!1,selections:[{alias:null,args:null,kind:"ScalarField",name:"id",storageKey:null},{alias:null,args:null,concreteType:"XFBWhatsAppCatalogStatusInfo",kind:"LinkedField",name:"status_info",plural:!1,selections:[{alias:null,args:null,kind:"ScalarField",name:"status",storageKey:null}],storageKey:null}],storageKey:null}],storageKey:null}];return{fragment:{argumentDefinitions:e,kind:"Fragment",metadata:null,name:"WAWebBizCatalogManagementUpdateCollectionMutation",selections:t,type:"Mutation",abstractKey:null},kind:"Request",operation:{argumentDefinitions:e,kind:"Operation",name:"WAWebBizCatalogManagementUpdateCollectionMutation",selections:t},params:{id:n("WAWebBizCatalogManagementUpdateCollectionMutation_facebookRelayOperation"),metadata:{},name:"WAWebBizCatalogManagementUpdateCollectionMutation",operationKind:"mutation",text:null}}})();a.exports=e}),null); __d("WAWebBizCatalogManagementUpdateCollection",["WALogger","WAWebBizCatalogManagementUpdateCollectionMutation.graphql","WAWebFetchAdAccountToken","WAWebGraphQLServerError","WAWebNetworkStatus","WAWebProductTypes.flow","WAWebRelayClient"],(function(t,n,r,o,a,i,l){var e,s,u,c,d={type:"error"},m=e!==void 0?e:e=n("WAWebBizCatalogManagementUpdateCollectionMutation.graphql");function p(e){return _(e).then(function(e){return e.type==="success"?(o("WALogger").LOG(s||(s=babelHelpers.taggedTemplateLiteralLoose(["updateCollection: success"]))),e):(e.type,o("WALogger").LOG(u||(u=babelHelpers.taggedTemplateLiteralLoose(['updateCollection: failed as "','"'])),e.type),e)})}function _(e){return o("WAWebFetchAdAccountToken").fetchToken().then(function(t){return t.type==="success"?f(t.token,e).then(function(e){return e.type!=="success"&&e.type==="auth-failure"?o("WAWebFetchAdAccountToken").markTokenAsInvalid():e.type,e}):(t.type,t)})}function f(e,t){return r("WAWebNetworkStatus").waitIfOffline().then(function(){return o("WAWebRelayClient").commitMutation(m,{input:t},{environmentType:"facebook",accessToken:e})}).then(function(e){if(e==null)return d;var t=e.xfb_whatsapp_catalog_update_collection;if(t==null)return d;var n=t.collection;if(n==null)return d;var r=n.id,a=n.status_info;if(r==null||a==null)return d;var i=a.status;if(i==null)return d;var l=o("WAWebProductTypes.flow").asProductReviewType(i);return l==null?d:{type:"success",collectionResult:{id:r,reviewStatus:l}}}).catch(function(e){return o("WALogger").LOG(c||(c=babelHelpers.taggedTemplateLiteralLoose(["updateCollectionWithToken: failed with error"]))),o("WAWebFetchAdAccountToken").hasGraphQLAuthError(e)?{type:"auth-failure"}:e instanceof o("WAWebGraphQLServerError").GraphQLServerError?{type:"graphql-error",error:e}:d})}l.updateCollection=p}),98); __d("WAWebBizCatalogManagementUpdateCollectionListMutation_facebookRelayOperation",[],(function(t,n,r,o,a,i){a.exports="9930298893688430"}),null); __d("WAWebBizCatalogManagementUpdateCollectionListMutation.graphql",["WAWebBizCatalogManagementUpdateCollectionListMutation_facebookRelayOperation"],(function(t,n,r,o,a,i){"use strict";var e=(function(){var e=[{defaultValue:null,kind:"LocalArgument",name:"input"}],t=[{alias:null,args:[{kind:"Variable",name:"request",variableName:"input"}],concreteType:"XFBWhatsAppCatalogUpdateCollectionListResponse",kind:"LinkedField",name:"xfb_whatsapp_catalog_update_collection_list",plural:!1,selections:[{alias:null,args:null,kind:"ScalarField",name:"__typename",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"success",storageKey:null}],storageKey:null}];return{fragment:{argumentDefinitions:e,kind:"Fragment",metadata:null,name:"WAWebBizCatalogManagementUpdateCollectionListMutation",selections:t,type:"Mutation",abstractKey:null},kind:"Request",operation:{argumentDefinitions:e,kind:"Operation",name:"WAWebBizCatalogManagementUpdateCollectionListMutation",selections:t},params:{id:n("WAWebBizCatalogManagementUpdateCollectionListMutation_facebookRelayOperation"),metadata:{},name:"WAWebBizCatalogManagementUpdateCollectionListMutation",operationKind:"mutation",text:null}}})();a.exports=e}),null); __d("WAWebBizCatalogManagementUpdateCollectionList",["Promise","WALogger","WAWebBizCatalogManagementUpdateCollectionListMutation.graphql","WAWebBizGatingUtils","WAWebFetchAdAccountToken","WAWebGraphQLServerError","WAWebNetworkStatus","WAWebRelayClient"],(function(t,n,r,o,a,i,l){var e,s,u,c,d,m={type:"error"},p=e!==void 0?e:e=n("WAWebBizCatalogManagementUpdateCollectionListMutation.graphql");function _(e){return o("WAWebBizGatingUtils").graphQLForUpdateCollectionListEnabled()?f(e).then(function(e){return e.type==="success"?(o("WALogger").LOG(s||(s=babelHelpers.taggedTemplateLiteralLoose(["updateCollectionList: success"]))),e):(e.type,o("WALogger").LOG(u||(u=babelHelpers.taggedTemplateLiteralLoose(['updateCollectionList: failed as "','"'])),e.type),e)}):(d||(d=n("Promise"))).resolve({type:"not-enabled"})}function f(e){return o("WAWebFetchAdAccountToken").fetchToken().then(function(t){return t.type==="success"?g(t.token,e).then(function(e){return e.type!=="success"&&e.type==="auth-failure"?o("WAWebFetchAdAccountToken").markTokenAsInvalid():e.type,e}):(t.type,t)})}function g(e,t){return r("WAWebNetworkStatus").waitIfOffline().then(function(){return o("WAWebRelayClient").commitMutation(p,{input:t},{environmentType:"facebook",accessToken:e})}).then(function(e){if(e==null)return m;var t=e.xfb_whatsapp_catalog_update_collection_list;return(t==null?void 0:t.success)==null?m:{type:"success",result:t.success}}).catch(function(e){return o("WALogger").LOG(c||(c=babelHelpers.taggedTemplateLiteralLoose(["updateCollectionListWithToken: failed with error"]))),o("WAWebFetchAdAccountToken").hasGraphQLAuthError(e)?{type:"auth-failure"}:e instanceof o("WAWebGraphQLServerError").GraphQLServerError?{type:"graphql-error",error:e}:m})}l.updateCollectionList=_}),98); __d("WAWebProductCollectionsJob",["$InternalEnum","WADeprecatedSendIq","WADeprecatedWapParser","WALogger","WAWap","WAWapDeprecatedSmaxID","WAWebBackendErrors","WAWebBizCatalogManagementAppealCollection","WAWebBizCatalogManagementCreateCollection","WAWebBizCatalogManagementDeleteCollections","WAWebBizCatalogManagementUpdateCollection","WAWebBizCatalogManagementUpdateCollectionList","WAWebBizGatingUtils","WAWebHttpErrors","WAWebMaybeThrowCatalogErrors","WAWebNetworkStatus","WAWebProductTypes.flow","WAWebUserPrefsMeUser","asyncToGeneratorRuntime","err"],(function(t,n,r,o,a,i,l){var e,s,u,c,d=function(t){var e,n,r,a,i=(e=o("WAWebProductTypes.flow").asProductReviewType(t.child("status").contentString()))!=null?e:"APPROVED",l=((n=t.maybeChild("can_appeal"))==null?void 0:n.contentString().toLowerCase())==="true",s=(r=t.maybeChild("reject_reason"))==null?void 0:r.contentString(),u=(a=t.maybeChild("commerce_url"))==null?void 0:a.contentString();return{status:i,canAppeal:l,rejectReason:s,commerceUrl:u}},m=new(c=r("WADeprecatedWapParser"))("createOrEditCollectionResponse",function(e){e.assertTag("iq"),e.assertFromServer();var t=e.child("collection"),n=t.child("id").contentString(),r=t.maybeChild("status_info"),o=r?d(r).status:"APPROVED";return{id:n,reviewStatus:o}}),p=new c("createOrEditCollectionResponseErrorParser",function(e){var t=e.attrString("code"),n=e.attrString("text"),r=e.maybeChild("field"),o=r==null?void 0:r.attrString("name"),a=r==null?void 0:r.attrString("reason");return{code:t,text:n,fieldName:o,fieldReason:a}});function _(e,t,n){return f.apply(this,arguments)}function f(){return f=n("asyncToGeneratorRuntime").asyncToGenerator(function*(e,t,n){if(o("WAWebBizGatingUtils").commerceFeaturesDisabledBySanctions())throw new(o("WAWebBackendErrors")).E451;var a=o("WAWebUserPrefsMeUser").getMaybeMePnUser();if(a==null)throw r("err")("createCollection: meUser is null");var i=yield o("WAWebBizCatalogManagementCreateCollection").createCollection({collection:{name:e,product_ids:t,biz_jid:a.toJid(),catalog_session_id:n}});if(i.type==="success")return i.collectionResult;throw i.type==="graphql-error"&&o("WAWebMaybeThrowCatalogErrors").maybeThrowLocalErrorForCatalogQuery(i.error),r("err")("createCollection: error handling flow not implemented for "+JSON.stringify(i))}),f.apply(this,arguments)}var g=new c("deleteCollectionResponse",function(e){e.assertTag("iq");var t=e.maybeChild("response");return(t==null?void 0:t.maybeChild("success"))!=null});function h(e,t){return y.apply(this,arguments)}function y(){return y=n("asyncToGeneratorRuntime").asyncToGenerator(function*(e,t){var n,a=(n=o("WAWap")).wap("iq",{to:n.S_WHATSAPP_NET,type:"set",xmlns:"w:biz:catalog",id:n.generateId(),smax_id:n.SMAX_ID(r("WAWapDeprecatedSmaxID").CatalogDeleteCollections)},n.wap("collections",{op:"delete"},n.wap("id",null,e),n.wap("catalog_session_id",null,t))),i=yield o("WADeprecatedSendIq").deprecatedSendIq(a,g);if(!i.success)throw i.errorCode===451?new(o("WAWebBackendErrors")).E451:new(o("WAWebBackendErrors")).ServerStatusCodeError(i.errorCode);if(!i.result)throw new(o("WAWebBackendErrors")).ServerStatusCodeError(500)}),y.apply(this,arguments)}function C(e,t){return b.apply(this,arguments)}function b(){return b=n("asyncToGeneratorRuntime").asyncToGenerator(function*(t,n){var a=o("WAWebUserPrefsMeUser").getMaybeMePnUser();if(a==null)throw r("err")("deleteCollectionGraphQL: meUser is null");var i=yield o("WAWebBizCatalogManagementDeleteCollections").deleteCollections({collections:{collection_ids:[t],biz_jid:a.toJid(),catalog_session_id:n}});if(i.type!=="success")return i.type==="graphql-error"?o("WAWebMaybeThrowCatalogErrors").maybeThrowLocalErrorForCatalogQuery(i.error):i.type,o("WALogger").WARN(e||(e=babelHelpers.taggedTemplateLiteralLoose(["deleteCollectionGraphQL: error handling flow not implemented for ",""])),JSON.stringify(i)),h(t,n)}),b.apply(this,arguments)}function v(e,t){return S.apply(this,arguments)}function S(){return S=n("asyncToGeneratorRuntime").asyncToGenerator(function*(e,t){if(o("WAWebBizGatingUtils").commerceFeaturesDisabledBySanctions())throw new(o("WAWebBackendErrors")).E451;return o("WAWebBizGatingUtils").graphQLForDeleteCollectionEnabled()?C(e,t):h(e,t)}),S.apply(this,arguments)}function R(e,t,n,r,o){return L.apply(this,arguments)}function L(){return L=n("asyncToGeneratorRuntime").asyncToGenerator(function*(e,t,n,a,i){var l=o("WAWebUserPrefsMeUser").getMaybeMePnUser();if(l==null)throw r("err")("editCollectionGraphQL: meUser is null");var s={collection:{id:e,biz_jid:l.toJid(),catalog_session_id:i}};t!=null&&(s.collection.name=t),n.length>0&&(s.collection.add={ids:n}),a.length>0&&(s.collection.remove={ids:a});var u=yield o("WAWebBizCatalogManagementUpdateCollection").updateCollection(s);if(u.type==="success")return u.collectionResult;throw u.type==="graphql-error"&&o("WAWebMaybeThrowCatalogErrors").maybeThrowLocalErrorForCatalogQuery(u.error),r("err")("editCollectionGraphQL: unexpected result type "+JSON.stringify(u))}),L.apply(this,arguments)}function E(e,t,n,r,o){return k.apply(this,arguments)}function k(){return k=n("asyncToGeneratorRuntime").asyncToGenerator(function*(e,t,n,r,a){if(o("WAWebBizGatingUtils").commerceFeaturesDisabledBySanctions())throw new(o("WAWebBackendErrors")).E451;return R(e,t,n,r,a)}),k.apply(this,arguments)}var I=new c("appealCollectionResponse",function(e){e.assertTag("iq"),e.assertFromServer();var t=e.maybeChild("response");return(t==null?void 0:t.maybeChild("success"))!=null});function T(e,t){return D.apply(this,arguments)}function D(){return D=n("asyncToGeneratorRuntime").asyncToGenerator(function*(e,t){var n=t!=null?o("WAWap").wap("reason",null,t):void 0,a=o("WAWap").wap("iq",{id:o("WAWap").generateId(),to:o("WAWap").S_WHATSAPP_NET,xmlns:"w:biz:catalog",type:"set",smax_id:o("WAWap").SMAX_ID(r("WAWapDeprecatedSmaxID").CatalogAppealCollection)},o("WAWap").wap("collection",{op:"appeal",id:o("WAWap").CUSTOM_STRING(e)},n)),i=yield o("WADeprecatedSendIq").deprecatedSendIq(a,I);if(i.success)return i.result;throw i.errorCode===451?new(o("WAWebBackendErrors")).E451:new(o("WAWebBackendErrors")).ServerStatusCodeError(i.errorCode)}),D.apply(this,arguments)}function x(e,t){return $.apply(this,arguments)}function $(){return $=n("asyncToGeneratorRuntime").asyncToGenerator(function*(e,t){var n=o("WAWebUserPrefsMeUser").getMaybeMePnUser();if(n==null)throw r("err")("appealCollectionGraphQL: meUser is null");var a=yield o("WAWebBizCatalogManagementAppealCollection").appealCollection({product_set_id:e,jid:n.toJid(),reason:t});return a.type==="success"?a.result:(a.type==="graphql-error"?o("WAWebMaybeThrowCatalogErrors").maybeThrowLocalErrorForCatalogQuery(a.error):a.type,o("WALogger").WARN(s||(s=babelHelpers.taggedTemplateLiteralLoose(["appealCollectionGraphQL: error handling flow not implemented for ",""])),JSON.stringify(a)),T(e,t))}),$.apply(this,arguments)}function P(e,t){return N.apply(this,arguments)}function N(){return N=n("asyncToGeneratorRuntime").asyncToGenerator(function*(e,t){if(o("WAWebBizGatingUtils").commerceFeaturesDisabledBySanctions())throw new(o("WAWebBackendErrors")).E451;return o("WAWebBizGatingUtils").graphQLForAppealCollectionEnabled()?x(e,t):T(e,t)}),N.apply(this,arguments)}var M=new c("reorderCollectionResponse",function(e){e.assertTag("iq");var t=e.maybeChild("response");return(t==null?void 0:t.maybeChild("success"))!=null}),w=n("$InternalEnum")({ProductOutOfOrder:457,IndexOutOfBound:458});function A(e){return F.apply(this,arguments)}function F(){return F=n("asyncToGeneratorRuntime").asyncToGenerator(function*(e){var t,n=(t=o("WAWap")).wap("iq",{id:t.generateId(),to:t.S_WHATSAPP_NET,xmlns:"w:biz:catalog",type:"set",smax_id:t.SMAX_ID(r("WAWapDeprecatedSmaxID").UpdateCollectionList)},t.wap("collections",{op:"update"},t.wap("move",null,e.map(function(e){var t=e[0],n=e[1],r=e[2];return o("WAWap").wap("id",{from_index:o("WAWap").CUSTOM_STRING(n.toString()),to_index:o("WAWap").CUSTOM_STRING(r.toString())},t)})))),a=yield o("WADeprecatedSendIq").deprecatedSendIq(n,M);if(a.success)return a.result;throw a.errorCode===451?new(o("WAWebBackendErrors")).E451:[w.IndexOutOfBound,w.ProductOutOfOrder].includes(a.errorCode)?new(o("WAWebBackendErrors")).CollectionReorderError:new(o("WAWebBackendErrors")).ServerStatusCodeError(a.errorCode)}),F.apply(this,arguments)}function O(e){return B.apply(this,arguments)}function B(){return B=n("asyncToGeneratorRuntime").asyncToGenerator(function*(e){var t=o("WAWebUserPrefsMeUser").getMaybeMePnUser();if(t==null)throw r("err")("reorderCollectionGraphQL: meUser is null");var n=yield o("WAWebBizCatalogManagementUpdateCollectionList").updateCollectionList({biz_jid:t.toJid(),move:e.map(function(e){var t=e[0],n=e[1],r=e[2];return{collection_id:t,from_index:n,to_index:r}})});return n.type==="success"?n.result:(n.type==="graphql-error"?o("WAWebMaybeThrowCatalogErrors").maybeThrowLocalErrorForCatalogQuery(n.error):n.type,o("WALogger").WARN(u||(u=babelHelpers.taggedTemplateLiteralLoose(["reorderCollectionGraphQL: error handling flow not implemented for ",""])),JSON.stringify(n)),A(e))}),B.apply(this,arguments)}function W(e){return q.apply(this,arguments)}function q(){return q=n("asyncToGeneratorRuntime").asyncToGenerator(function*(e){if(!r("WAWebNetworkStatus").online)throw new(o("WAWebHttpErrors")).HttpNetworkError;if(o("WAWebBizGatingUtils").commerceFeaturesDisabledBySanctions())throw new(o("WAWebBackendErrors")).E451;return o("WAWebBizGatingUtils").graphQLForUpdateCollectionListEnabled()?O(e):A(e)}),q.apply(this,arguments)}l.createCollection=_,l.deleteCollection=v,l.editCollection=E,l.appealCollection=P,l.reorderCollection=W}),98); __d("WAWebManageActions",["fbt","Promise","WAFilteredCatch","WALogger","WAQplTypes","WAWebBackendErrors","WAWebBizProductCatalogAction","WAWebBizProductCatalogBridge","WAWebConfirmPopup.react","WAWebFbtCommon","WAWebHttpErrors","WAWebModalManager","WAWebNonEmptyString","WAWebProductCatalogLogEvents","WAWebProductCollection","WAWebProductCollectionLogEvents","WAWebProductCollectionsJob","WAWebQplQuickPerformanceLoggerMarkerIds","WAWebQplQuickPerformanceLoggerModule","WAWebToast.react","WAWebToastManager","asyncToGeneratorRuntime","getErrorSafe","react"],(function(t,n,r,o,a,i,l,s){var e,u,c,d,m=d||(d=r("react"));function p(e,t,n){return _.apply(this,arguments)}function _(){return _=n("asyncToGeneratorRuntime").asyncToGenerator(function*(e,t,n){try{return yield o("WAWebBizProductCatalogAction").deleteProducts([t.id.toString()]),o("WAWebProductCatalogLogEvents").logDeleteProductSuccess(t,1,n),e.productCollection.evictImagesFromCache(t.id.toString()),e.productCollection.remove(t.id.toString()),e.collections&&e.collections.forEach(function(e){return e.productCollection.remove(t.id.toString())}),!0}catch(e){if(e instanceof o("WAWebBackendErrors").ServerStatusCodeError)return o("WAWebProductCatalogLogEvents").logDeleteProductFailed(t,1,n,e.statusCode),o("WAWebToastManager").ToastManager.open(m.jsx(o("WAWebToast.react").Toast,{msg:s._(/*BTDS*/"No se pudo eliminar el producto"),id:o("WAWebToast.react").genId("catalog_delete_product_failed")})),!1;throw e}}),_.apply(this,arguments)}function f(e,t,a,i){return o("WAWebProductCatalogLogEvents").logDeleteProductClick(t,1,a),new(c||(c=n("Promise")))(function(n,l){o("WAWebModalManager").ModalManager.open(m.jsx(o("WAWebConfirmPopup.react").ConfirmPopup,{title:s._(/*BTDS*/"Eliminar art\u00edculo"),okText:r("WAWebFbtCommon")("OK"),okButtonType:"solid-warning",cancelText:s._(/*BTDS*/"Cancelar"),onOK:function(){o("WAWebModalManager").ModalManager.close(),o("WAWebQplQuickPerformanceLoggerModule").QPL.markerStart(o("WAWebQplQuickPerformanceLoggerMarkerIds").QuickLogMarkerId.WHATSAPP_PRODUCT_DELETE,{annotations:{string:{EntryPoint:i}}}),p(e,t,a).then(function(e){o("WAWebQplQuickPerformanceLoggerModule").QPL.markerEnd(o("WAWebQplQuickPerformanceLoggerMarkerIds").QuickLogMarkerId.WHATSAPP_PRODUCT_DELETE,o("WAQplTypes").QuickLogActionType.SUCCESS),n(e)}).catch(function(e){o("WAWebQplQuickPerformanceLoggerModule").QPL.markerEnd(o("WAWebQplQuickPerformanceLoggerMarkerIds").QuickLogMarkerId.WHATSAPP_PRODUCT_DELETE,o("WAQplTypes").QuickLogActionType.FAIL),l(e)})},onCancel:function(){o("WAWebModalManager").ModalManager.close(),n(!1)},children:m.jsx("div",{children:s._(/*BTDS*/"\u00bfConfirmas que quieres eliminar este art\u00edculo de tu cat\u00e1logo?")})}))})}function g(e,t){return h.apply(this,arguments)}function h(){return h=n("asyncToGeneratorRuntime").asyncToGenerator(function*(e,t){yield o("WAWebBizProductCatalogBridge").productVisibilitySet(t.id.toString(),!t.isHidden),t.isHidden=!t.isHidden;var n=[e.productCollection].concat((e.collections||[]).map(function(e){return e.productCollection}));n.forEach(function(e){var n=e.get(t.id);n&&(n.isHidden=t.isHidden)})}),h.apply(this,arguments)}function y(e,t,a,i){var l=t.id.toString(),u=!t.isHidden;return u?o("WAWebProductCatalogLogEvents").logCatalogProductHideClick(l,a):o("WAWebProductCatalogLogEvents").logCatalogProductShowClick(l,a),new(c||(c=n("Promise")))(function(n,c){var d=t.isHidden?s._(/*BTDS*/"\u00bfQuieres mostrar este art\u00edculo en tu cat\u00e1logo?"):s._(/*BTDS*/"\u00bfQuieres ocultar este art\u00edculo de tu cat\u00e1logo?");o("WAWebModalManager").ModalManager.open(m.jsx(o("WAWebConfirmPopup.react").ConfirmPopup,{okText:r("WAWebFbtCommon")("OK"),cancelText:s._(/*BTDS*/"Cancelar"),onOK:function(){o("WAWebQplQuickPerformanceLoggerModule").QPL.markerStart(o("WAWebQplQuickPerformanceLoggerMarkerIds").QuickLogMarkerId.WHATSAPP_PRODUCT_SET_VISIBLE,{annotations:{string:{EntryPoint:i}}}),o("WAWebModalManager").ModalManager.close(),g(e,t).then(function(){o("WAWebQplQuickPerformanceLoggerModule").QPL.markerEnd(o("WAWebQplQuickPerformanceLoggerMarkerIds").QuickLogMarkerId.WHATSAPP_PRODUCT_SET_VISIBLE,o("WAQplTypes").QuickLogActionType.SUCCESS),u?o("WAWebProductCatalogLogEvents").logCatalogProductHideSuccess(l,a):o("WAWebProductCatalogLogEvents").logCatalogProductShowSuccess(l,a),n(!0)}).catch(function(e){o("WAWebQplQuickPerformanceLoggerModule").QPL.markerEnd(o("WAWebQplQuickPerformanceLoggerMarkerIds").QuickLogMarkerId.WHATSAPP_PRODUCT_SET_VISIBLE,o("WAQplTypes").QuickLogActionType.FAIL),u?o("WAWebProductCatalogLogEvents").logCatalogProductHideFailed(l,a):o("WAWebProductCatalogLogEvents").logCatalogProductShowFailed(l,a),c(e)})},onCancel:function(){o("WAWebModalManager").ModalManager.close(),u?o("WAWebProductCatalogLogEvents").logCatalogProductHideCancelled(l,a):o("WAWebProductCatalogLogEvents").logCatalogProductShowCancelled(l,a),n(!1)},children:m.jsx("div",{children:d})}))})}function C(e,t,n){return b.apply(this,arguments)}function b(){return b=n("asyncToGeneratorRuntime").asyncToGenerator(function*(e,t,n){yield o("WAWebProductCollectionsJob").deleteCollection(t.id.toString(),n.session.sessionId.toString()),e.collections.remove(t.id.toString()),o("WAWebProductCollectionLogEvents").logCollectionDeleted({catalogContext:n,collectionId:t.id})}),b.apply(this,arguments)}function v(t,n,a){o("WAWebModalManager").ModalManager.open(m.jsx(o("WAWebConfirmPopup.react").ConfirmPopup,{title:s._(/*BTDS*/"Eliminar colecci\u00f3n"),okText:r("WAWebFbtCommon")("OK"),cancelText:s._(/*BTDS*/"Cancelar"),onOK:function(){o("WAWebModalManager").ModalManager.close(),C(t,n,a).catch(function(t){return o("WAFilteredCatch").filteredCatch(o("WAWebBackendErrors").ServerStatusCodeError,function(t){return o("WALogger").ERROR(e||(e=babelHelpers.taggedTemplateLiteralLoose(["Failed to delete collection, error: ",""])),t).verbose().sendLogs("Deleteing collection failed"),o("WAWebToastManager").ToastManager.open(m.jsx(o("WAWebToast.react").Toast,{msg:s._(/*BTDS*/"No se pudo eliminar la colecci\u00f3n"),id:o("WAWebToast.react").genId("catalog_delete_product_failed")})),!1})(t)})},onCancel:o("WAWebModalManager").closeModalManager,children:m.jsx("div",{children:s._(/*BTDS*/"Si eliminas esta colecci\u00f3n, no se eliminar\u00e1n los art\u00edculos que contiene.")})}))}function S(e,t,n,r,a,i){var l;return o("WAWebQplQuickPerformanceLoggerModule").QPL.markerPoint(o("WAWebQplQuickPerformanceLoggerMarkerIds").QuickLogMarkerId.WHATSAPP_COLLECTION_EDIT,"datasource_start"),t?l=o("WAWebProductCollectionsJob").editCollection(t.id.toString()||"",n===t.name?void 0:o("WAWebNonEmptyString").asMaybeNonEmptyString(n),r.map(function(e){return e.id.toString()}),a.map(function(e){return e.id.toString()}),i.session.toString()).then(function(i){return o("WAWebQplQuickPerformanceLoggerModule").QPL.markerPoint(o("WAWebQplQuickPerformanceLoggerMarkerIds").QuickLogMarkerId.WHATSAPP_COLLECTION_EDIT,"datasource_end"),t.name=n,t.reviewStatus=i.reviewStatus,e.collections.replaceId(t.id,i.id),(r.length!==0||a.length!==0)&&(t.productCollection.reset(),t.afterCursor=void 0,e.collections.reset(),e.collections.afterCursor=""),!0}):l=o("WAWebProductCollectionsJob").createCollection(n,r.map(function(e){return e.id.toString()}),i.session.toString()).then(function(t){return o("WAWebQplQuickPerformanceLoggerModule").QPL.markerPoint(o("WAWebQplQuickPerformanceLoggerMarkerIds").QuickLogMarkerId.WHATSAPP_COLLECTION_EDIT,"datasource_end"),o("WAWebProductCollectionLogEvents").logCollectionCreated({catalogContext:i,collectionId:t.id,productCount:r.length}),e.collections.reset(),e.collections.afterCursor="",!0}),l.catch(function(e){var t=function(t){o("WAWebToastManager").ToastManager.open(m.jsx(o("WAWebToast.react").Toast,{msg:t,id:o("WAWebToast.react").genId("catalog_save_collection_failed")}))},n=s._(/*BTDS*/"No se pudo guardar la colecci\u00f3n");if(e.text==="not-acceptable")return e.fieldName==="products"&&e.fieldReason==="duplicate"&&(n=s._(/*BTDS*/"Ya tienes una colecci\u00f3n con este grupo de art\u00edculos. A\u00f1ade o elimina art\u00edculos para crear un grupo diferente.")),e.fieldName==="collection"&&e.fieldReason==="empty"&&(n=s._(/*BTDS*/"La colecci\u00f3n debe tener al menos un art\u00edculo.")),t(n),!1;throw o("WALogger").ERROR(u||(u=babelHelpers.taggedTemplateLiteralLoose(["Failed to save collection, error: ",""])),e).verbose().sendLogs("Saving collection failed"),t(n),e})}function R(e,t){return L.apply(this,arguments)}function L(){return L=n("asyncToGeneratorRuntime").asyncToGenerator(function*(e,t){o("WAWebQplQuickPerformanceLoggerModule").QPL.markerPoint(o("WAWebQplQuickPerformanceLoggerMarkerIds").QuickLogMarkerId.WHATSAPP_COLLECTION_APPEAL,"datasource_start"),yield o("WAWebProductCollectionsJob").appealCollection(e.id.toString(),t),e.set({canAppeal:!1,reviewStatus:o("WAWebProductCollection").PRODUCT_REVIEW_STATUS.PENDING}),o("WAWebQplQuickPerformanceLoggerModule").QPL.markerPoint(o("WAWebQplQuickPerformanceLoggerMarkerIds").QuickLogMarkerId.WHATSAPP_COLLECTION_APPEAL,"datasource_end")}),L.apply(this,arguments)}var E={OUT_OF_SYNC:{getTitle:function(){return s._(/*BTDS*/"No se pudieron guardar los cambios")},getDescription:function(){return s._(/*BTDS*/"Por favor, actualiza y vuelve a intentarlo.")},getOkText:function(){return s._(/*BTDS*/"Volver a cargar")}},SERVER_ERROR:{getTitle:function(){return s._(/*BTDS*/"Error")},getDescription:function(){return s._(/*BTDS*/"Se produjo un error. Por favor, vuelve a intentarlo.")},getOkText:function(){return s._(/*BTDS*/"OK")}},HTTP_NETWORK_ERROR:{getTitle:function(){return s._(/*BTDS*/"No hay conexi\u00f3n a Internet")},getDescription:function(){return s._(/*BTDS*/"Revisa la conexi\u00f3n a Internet y vuelve a intentarlo.")},getOkText:function(){return s._(/*BTDS*/"OK")}}},k=function(t){return t instanceof o("WAWebHttpErrors").HttpNetworkError?E.HTTP_NETWORK_ERROR:t instanceof o("WAWebBackendErrors").CollectionReorderError?E.OUT_OF_SYNC:E.SERVER_ERROR};function I(e,t){return T.apply(this,arguments)}function T(){return T=n("asyncToGeneratorRuntime").asyncToGenerator(function*(e,t){try{var a=yield o("WAWebProductCollectionsJob").reorderCollection(e);return a&&o("WAWebProductCollectionLogEvents").logCollectionReorder({catalogContext:t,movesCount:e.length}),a}catch(e){var i=r("getErrorSafe")(e),l=i instanceof o("WAWebHttpErrors").HttpNetworkError,s=k(i),u=s.getDescription,d=s.getOkText,p=s.getTitle;return new(c||(c=n("Promise")))(function(e,t){o("WAWebModalManager").ModalManager.open(m.jsx(o("WAWebConfirmPopup.react").ConfirmPopup,{title:p(),okText:d(),onOK:function(){o("WAWebModalManager").ModalManager.close(),l?t(i):e(!1)},children:m.jsx("div",{children:u()})}),{blockClose:!0})})}}),T.apply(this,arguments)}l.handleProductDelete=f,l.handleProductVisibilityChange=y,l.handleCollectionDelete=v,l.handleCollectionSave=S,l.handleCollectionAppeal=R,l.handleCollectionReorder=I}),226); __d("WAWebBizAppealCollectionPopup.react",["fbt","WAFilteredCatch","WAQplTypes","WAWebBackendErrors","WAWebConfirmPopup.react","WAWebConstantsDeprecated","WAWebExternalLink.react","WAWebManageActions","WAWebModalManager","WAWebNonEmptyString","WAWebQplQuickPerformanceLoggerMarkerIds","WAWebQplQuickPerformanceLoggerModule","WAWebRichTextField.react","WAWebText_DONOTUSE.react","WAWebToast.react","WAWebToastManager","react","vulture"],(function(t,n,r,o,a,i,l,s){var e,u,c=u||(u=r("react")),d=(e||(e=o("react"))).useState;function m(e){r("vulture")("IcZIx2KUhxReGrAhkUk0ZE_IsHA=");var t=e.collection,n=d(!1),a=n[0],i=n[1],l=d(!1),u=l[0],m=l[1],p=d(null),_=p[0],f=p[1],g=function(t){f(o("WAWebNonEmptyString").asMaybeNonEmptyString(t))},h=function(){i(!0);var e=!0;o("WAWebQplQuickPerformanceLoggerModule").QPL.markerStart(o("WAWebQplQuickPerformanceLoggerMarkerIds").QuickLogMarkerId.WHATSAPP_COLLECTION_APPEAL),o("WAWebManageActions").handleCollectionAppeal(t,_).then(function(){i(!1),m(!0),e=!1,o("WAWebQplQuickPerformanceLoggerModule").QPL.markerEnd(o("WAWebQplQuickPerformanceLoggerMarkerIds").QuickLogMarkerId.WHATSAPP_COLLECTION_APPEAL,o("WAQplTypes").QuickLogActionType.SUCCESS)}).catch(o("WAFilteredCatch").filteredCatch(o("WAWebBackendErrors").ServerStatusCodeError,function(){o("WAWebToastManager").ToastManager.open(c.jsx(o("WAWebToast.react").Toast,{msg:s._(/*BTDS*/"Se produjo un error y no se envi\u00f3 tu solicitud. Vuelve a intentarlo."),id:o("WAWebToast.react").genId("catalog_collection_appeal_submission_failed")})),i(!1)})).finally(function(){e&&o("WAWebQplQuickPerformanceLoggerModule").QPL.markerEnd(o("WAWebQplQuickPerformanceLoggerMarkerIds").QuickLogMarkerId.WHATSAPP_COLLECTION_APPEAL,o("WAQplTypes").QuickLogActionType.FAIL)})},y=function(){o("WAWebModalManager").ModalManager.close()};if(u)return c.jsx(o("WAWebConfirmPopup.react").ConfirmPopup,{title:s._(/*BTDS*/"Solicitar revisi\u00f3n"),onOK:y,children:c.jsx(o("WAWebText_DONOTUSE.react").TextDiv,{children:s._(/*BTDS*/"Revisaremos la colecci\u00f3n y, si cumple con nuestros lineamientos, se a\u00f1adir\u00e1 a tu cat\u00e1logo.")})});var C=_!=null||a;return c.jsx(o("WAWebConfirmPopup.react").ConfirmPopup,{title:s._(/*BTDS*/"Solicitar revisi\u00f3n"),onOK:h,onCancel:y,okDisabled:C,children:c.jsxs("form",{children:[c.jsx(o("WAWebRichTextField.react").RichTextField,{testid:void 0,placeholder:s._(/*BTDS*/"Ingresa el motivo de esta solicitud\u2026"),onChange:function(t){var e=t.text;return g(e)},value:_,maxLength:1e3}),c.jsx(o("WAWebExternalLink.react").ExternalLink,{href:r("WAWebConstantsDeprecated").WA_COMMERCE_POLICY_URL,children:s._(/*BTDS*/"M\u00e1s informaci\u00f3n")})]})})}m.displayName=m.name+" [from "+i.id+"]",l.default=m}),226); __d("WAWebBizBroadcastsCSVParsingUtils",["JSResourceForInteraction","WALogger","asyncToGeneratorRuntime"],(function(t,n,r,o,a,i,l){var e,s,u,c,d=(function(){var t=n("asyncToGeneratorRuntime").asyncToGenerator(function*(t){var n;try{n=yield r("JSResourceForInteraction")("papaparse").__setRef("WAWebBizBroadcastsCSVParsingUtils").load(),o("WALogger").LOG(e||(e=babelHelpers.taggedTemplateLiteralLoose(["PapaParse loaded \u2713, processing CSV ("," chars)"])),t.length)}catch(e){throw o("WALogger").ERROR(s||(s=babelHelpers.taggedTemplateLiteralLoose(["Failed to load PapaParse library: ",""])),e).verbose().sendLogs("biz-broadcasts-csv-library-load-failed",{sampling:1}),e}try{var a,i=n.parse(t);return o("WALogger").LOG(u||(u=babelHelpers.taggedTemplateLiteralLoose(["CSV file parsed successfully: "," rows extracted"])),((a=i.data)==null?void 0:a.length)||0),i}catch(e){throw o("WALogger").ERROR(c||(c=babelHelpers.taggedTemplateLiteralLoose(["Failed to parse CSV file: ",""])),e).verbose().sendLogs("biz-broadcasts-csv-parsing-failed",{sampling:1}),e}});return function(n){return t.apply(this,arguments)}})();l.loadPapaParse=d}),98); __d("WAWebBizBroadcastsContactVerifier",["WALogger","WAWebPerformanceUtils","WAWebUsernameGatingUtils","WAWebUsync","WAWebUsyncUser","asyncToGeneratorRuntime"],(function(t,n,r,o,a,i,l){var e,s,u;function c(e){return d.apply(this,arguments)}function d(){return d=n("asyncToGeneratorRuntime").asyncToGenerator(function*(t){var n=new(o("WAWebUsync")).USyncQuery().withMode("query").withContext("interactive").withBusinessProtocol().withPictureProtocol();o("WAWebUsernameGatingUtils").usernameContactUsyncLidBased()?n.withContactProtocol(o("WAWebUsync").USYNC_ADDRESSING_MODE.LID):(n.withContactProtocol(o("WAWebUsync").USYNC_ADDRESSING_MODE.PN),n.withLidProtocol());var r=self.performance.now();t.forEach(function(e){n.withUser(new(o("WAWebUsyncUser")).USyncUser().withPhone(e))});var a=yield n.execute();a.error&&Object.keys(a.error).length>0&&(o("WALogger").WARN(e||(e=babelHelpers.taggedTemplateLiteralLoose(["USync verification errors for "," numbers"])),t.length),Object.entries(a.error).forEach(function(e){var t=e[0],n=e[1]})),a.refresh&&Object.keys(a.refresh).length>0&&Object.entries(a.refresh).forEach(function(e){var t=e[0],n=e[1]});var i={};a.list&&a.list.length>0&&a.list.forEach(function(e){var t,n;if(!e.id){o("WALogger").WARN(s||(s=babelHelpers.taggedTemplateLiteralLoose(["verifyWhatsAppUsers: user has no id, skipping"])));return}var r=(t=e.contact)==null?void 0:t.content,a=((n=e.contact)==null?void 0:n.type)==="in";if(a){var l=e.id.isLid()?e.id:e.lid;i[r]={isWhatsAppUser:!0,lid:l}}else i[r]={isWhatsAppUser:!1}});var l=o("WAWebPerformanceUtils").getElapsedTimeMs(r);return o("WALogger").LOG(u||(u=babelHelpers.taggedTemplateLiteralLoose(["contact verification done in "," for "," numbers"])),l,t.length),i}),d.apply(this,arguments)}l.verifyWhatsAppUsers=c}),98); __d("WAWebBizBroadcastsFileTypeValidator",["$InternalEnum"],(function(t,n,r,o,a,i){var e,l=n("$InternalEnum")({EXCEL:"excel",CSV:"csv"}),s=(e={},e[l.EXCEL]={extensions:[".xlsx",".xls"],mimeTypes:["application/vnd.ms-excel","application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"]},e[l.CSV]={extensions:[".csv"],mimeTypes:["text/csv","application/csv"]},e);function u(e,t){if(!s[t])return!1;var n=s[t];return n.extensions.some(function(t){return e.name.endsWith(t)})||n.mimeTypes.includes(e.type)}function c(e){e===void 0&&(e=[l.EXCEL,l.CSV]);var t=[];e.forEach(function(e){s[e]&&(t.push.apply(t,s[e].extensions),t.push.apply(t,s[e].mimeTypes))});var n=Array.from(new Set(t));return n.join(",")}i.FileType=l,i.isFileOfType=u,i.getAcceptTypesString=c}),66); __d("WAWebBizBroadcastsRecipientUtils",["WAWebABProps"],(function(t,n,r,o,a,i,l){var e=256,s=-1,u=2;function c(){var t=o("WAWebABProps").getABPropConfigValue("smba_business_broadcast_recipient_limit");return t===s?e:t}l.MIN_RECIPIENTS=u,l.getRecipientLimit=c}),98); __d("WAWebBizBroadcastsTypedError",["$InternalEnum"],(function(t,n,r,o,a,i){var e,l=(e=n("$InternalEnum")).Mirrored(["NOT_WHATSAPP_USER","INVALID","DUPLICATE"]),s=e.Mirrored(["INVALID","EMPTY"]),u=e.Mirrored(["TYPE","FORMAT","TOO_MANY_ITEMS","TOO_MANY_ERRORS"]),c=e.Mirrored(["TOO_SMALL"]),d=(function(e){function t(t){var n;return n=e.call(this,"TypedError")||this,n.name="WAWebBizBroadcastsTypedError",n.type=t,n}return babelHelpers.inheritsLoose(t,e),t})(babelHelpers.wrapNativeSuper(Error));i.PhoneError=l,i.NameError=s,i.FileError=u,i.AudienceError=c,i.WAWebBizBroadcastsTypedError=d}),66); __d("WAWebBizBroadcastsValidationUtils",["$InternalEnum","WALogger","WAPhoneFindCC","WAWebBizBroadcastsTypedError","WAWebLinkDevicePhoneNumberEntryInputFormatUtils","WAWebUserPrefsMeUser"],(function(t,n,r,o,a,i,l){var e,s=n("$InternalEnum").Mirrored(["VALID","INVALID"]),u=50;function c(e){var t=o("WAWebLinkDevicePhoneNumberEntryInputFormatUtils").cleanPhoneNumberInputValue(e),n=t.countryCodeIso,r=t.fullRawPhoneNumber,a=t.phoneNumberWithoutCountryCode;if(n==null||a.length===0)return null;var i=o("WAPhoneFindCC").findCC(r),l=o("WAWebLinkDevicePhoneNumberEntryInputFormatUtils").isPhoneNumberValid(Number(i),a),s="+"+i+" "+a;return{isValid:l,formattedPhoneNumber:s}}function d(t){try{if(t==null)return{status:s.INVALID,type:o("WAWebBizBroadcastsTypedError").PhoneError.INVALID};var n=t.trim();if(!n.startsWith("+")){var r=o("WAWebUserPrefsMeUser").getMePnUserOrThrow(),a=o("WAPhoneFindCC").findCC(r.user),i=o("WAPhoneFindCC").findCC(n);a!==i?n="+"+a+n:n="+"+n}var l=c(n);return l!=null&&l.isValid?{status:s.VALID,value:l.formattedPhoneNumber}:{status:s.INVALID,type:o("WAWebBizBroadcastsTypedError").PhoneError.INVALID}}catch(n){return o("WALogger").ERROR(e||(e=babelHelpers.taggedTemplateLiteralLoose(['Phone number validation exception for input "','": ',""])),t,n).sendLogs("phone-number-validation-exception",{sampling:1}),{status:s.INVALID,type:o("WAWebBizBroadcastsTypedError").PhoneError.INVALID}}}function m(e){if(e==null||typeof e!="string")return{status:s.INVALID,type:o("WAWebBizBroadcastsTypedError").NameError.INVALID};var t=Array.from(e).slice(0,u).join("");return t.trim().length===0?{status:s.INVALID,type:o("WAWebBizBroadcastsTypedError").NameError.EMPTY}:{status:s.VALID,value:t}}l.ValidationStatus=s,l.validateAndFormatPhoneNumber=d,l.sanitizeName=m}),98); __d("WAWebBizBroadcastsTemplateParsingUtils",["fbt","WAWebBizBroadcastsRecipientUtils","WAWebBizBroadcastsTypedError","WAWebBizBroadcastsValidationUtils"],(function(t,n,r,o,a,i,l,s){var e=s._(/*BTDS*/"N\u00famero de tel\u00e9fono").toString(),u=s._(/*BTDS*/"Nombre completo").toString(),c=new Set(["phone","phone number",e.toLowerCase()]),d=["name","full name",u.toLowerCase()],m=["firstname","first name"],p=new Set(d),_=new Set(m),f=new Set([].concat(m,d)),g=new Set(["lastname","last name"]);function h(){var t=o("WAWebBizBroadcastsRecipientUtils").getRecipientLimit(),n=s._(/*BTDS*/"Ingresa el nombre completo y el n\u00famero de tel\u00e9fono de cada destinatario en una fila separada. Puedes a\u00f1adir hasta {recipient-limit} destinatarios a un p\u00fablico.",[s._param("recipient-limit",t)]).toString(),r=s._(/*BTDS*/"A\u00f1ade un nombre aqu\u00ed").toString(),a=s._(/*BTDS*/"A\u00f1ade un n\u00famero de tel\u00e9fono aqu\u00ed").toString();return n+"\n\n"+u+","+e+"\n\n"+r+","+a}function y(){return{href:"data:application/csv,"+encodeURI(h()),download:"template.csv"}}function C(){var e=y();return{href:e.href,download:e.download}}function b(e,t){for(var n in e){var r=n.toLowerCase();if(t.has(r))return n}}function v(e){for(var t of e.slice(0,3)){var n=b(t,_)!=null,r=b(t,g)!=null;if(n||r)return"dual";var o=b(t,p)!=null;if(o)return"single"}return"single"}function S(e,t){var n=b(e,t);if(n!=null)return e[n]}function R(e,t){for(var n in e){var r=n.toLowerCase();if(t.has(r)&&e[n]!=null)return String(e[n])}return""}function L(e){return R(e,f)}function E(e){return R(e,c)}function k(e){return c.has(e.toLowerCase().trim())}function I(e){var t=[],n=v(e),r=[];e.forEach(function(e,n){var a=S(e,c),i=o("WAWebBizBroadcastsValidationUtils").validateAndFormatPhoneNumber(String(a));if(i.status===o("WAWebBizBroadcastsValidationUtils").ValidationStatus.INVALID){t.push({rowIndex:n,rowData:e,errorType:i.type});return}r.push({row:e,phoneResult:i,originalIndex:n})});var a=new Map,i=[];r.forEach(function(e){var n=e.originalIndex,r=e.phoneResult,l=e.row,s=r.value;s!=null&&a.has(s)?t.push({rowIndex:n,rowData:l,errorType:o("WAWebBizBroadcastsTypedError").PhoneError.DUPLICATE}):s!=null&&(a.set(s,n),i.push({row:l,phoneResult:r,originalIndex:n}))});var l=i.map(function(e){var t=e.originalIndex,r=e.phoneResult,a=e.row,i=void 0,l=void 0;if(n==="single"){var s=S(a,p),u=o("WAWebBizBroadcastsValidationUtils").sanitizeName(s),c="";u.status===o("WAWebBizBroadcastsValidationUtils").ValidationStatus.VALID?c=u.value!=null?u.value:"":c=r.value!=null?r.value:"",i=c!==""?c:void 0}else{var d=S(a,_),m=S(a,g),f="",h="",y=null,C=null;d!=null&&(y=o("WAWebBizBroadcastsValidationUtils").sanitizeName(d),y.status===o("WAWebBizBroadcastsValidationUtils").ValidationStatus.VALID&&(f=y.value!=null?y.value:"")),m!=null&&(C=o("WAWebBizBroadcastsValidationUtils").sanitizeName(m),C.status===o("WAWebBizBroadcastsValidationUtils").ValidationStatus.VALID&&(h=C.value!=null?C.value:"")),f!==""||h!==""?(i=f!==""?f:void 0,l=h!==""?h:void 0):i=r.value!=null?r.value:void 0}var b={phone:r.value!=null?r.value:"",rowIndex:t};return i!=null&&(b.firstName=i),l!=null&&(b.lastName=l),b});return{validContacts:l,errors:t}}l.getTemplateLinkProps=y,l.getTemplateLinkPropsWithURL=C,l.extractName=L,l.extractPhone=E,l.isPhoneFieldName=k,l.parseContactData=I}),226); __d("WAWebBizBroadcastsXLSXParsingUtils",["JSResourceForInteraction","WALogger","asyncToGeneratorRuntime"],(function(t,n,r,o,a,i,l){var e,s,u,c;function d(e){return m.apply(this,arguments)}function m(){return m=n("asyncToGeneratorRuntime").asyncToGenerator(function*(t){var n;try{n=yield r("JSResourceForInteraction")("xlsx").__setRef("WAWebBizBroadcastsXLSXParsingUtils").load(),o("WALogger").LOG(e||(e=babelHelpers.taggedTemplateLiteralLoose(["XLSX loaded \u2713, processing file ("," bytes)"])),t.byteLength)}catch(e){throw o("WALogger").ERROR(s||(s=babelHelpers.taggedTemplateLiteralLoose(["XLSX library loading failed: ",""])),e).verbose().sendLogs("biz-broadcasts-xlsx-library-loading-failed",{sampling:1}),e}try{var a=n.read(t,{type:"array"}),i=a.SheetNames[0],l=a.Sheets[i],d=n.utils.sheet_to_json(l,{header:1});return o("WALogger").LOG(u||(u=babelHelpers.taggedTemplateLiteralLoose(["Excel parsed \u2713: ",' rows from sheet "','"'])),d.length,i),d}catch(e){throw o("WALogger").ERROR(c||(c=babelHelpers.taggedTemplateLiteralLoose(["XLSX file parsing failed: ",""])),e).verbose().sendLogs("biz-broadcasts-xlsx-file-parsing-failed",{sampling:1}),e}}),m.apply(this,arguments)}l.loadXLSX=d}),98); __d("WAWebBizBroadcastsFileProcessor",["WALogger","WAWebBizBroadcastsCSVParsingUtils","WAWebBizBroadcastsContactVerifier","WAWebBizBroadcastsFileTypeValidator","WAWebBizBroadcastsRecipientUtils","WAWebBizBroadcastsTemplateParsingUtils","WAWebBizBroadcastsTypedError","WAWebBizBroadcastsXLSXParsingUtils","asyncToGeneratorRuntime"],(function(t,n,r,o,a,i,l){var e,s,u,c,d,m,p,_;function f(e){var t,n=(t=o("WAWebBizBroadcastsFileTypeValidator")).isFileOfType(e,t.FileType.EXCEL),r=t.isFileOfType(e,t.FileType.CSV);if(!n&&!r)throw new(o("WAWebBizBroadcastsTypedError")).WAWebBizBroadcastsTypedError(o("WAWebBizBroadcastsTypedError").FileError.TYPE)}function g(e){var t=o("WAWebBizBroadcastsRecipientUtils").getRecipientLimit();if(e.length>t)throw new(o("WAWebBizBroadcastsTypedError")).WAWebBizBroadcastsTypedError(o("WAWebBizBroadcastsTypedError").FileError.TOO_MANY_ITEMS)}function h(e){for(var t=0;t=400)return new(o("WAWebActionToast.react")).ActionType(c,{actionText:s._(/*BTDS*/"Volver a intentarlo"),actionHandler:function(){return p(t,n,a,i)}})})).then(function(){var e;return o("WAWebBizGatingUtils").coverPhotoPrivacyMessagingEnabled()?e=s._(/*BTDS*/"Tu foto de portada ahora es p\u00fablica."):e=s._(/*BTDS*/"Se estableci\u00f3 la foto de portada"),new(o("WAWebActionToast.react")).ActionType(e)});return o("WAWebToastManager").ToastManager.open(m.jsx(o("WAWebActionToast.react").ActionToast,{id:i,initialAction:l,pendingAction:d})),d.then(r("WAWebNoop"))}function _(e,t){t===void 0&&(t=o("WAWebActionToast.react").genId());var n=o("WAWebBusinessProfileJob").deleteCoverPhoto(e),a=new(o("WAWebActionToast.react")).ActionType(s._(/*BTDS*/"Quitando la foto de portada\u2026")),i=s._(/*BTDS*/"No se pudo quitar la foto de portada"),l=n.catch(function(e){throw o("WALogger").WARN(c||(c=babelHelpers.taggedTemplateLiteralLoose(["actions:deleteCoverPhoto dropped"]))),new(o("WAWebActionToast.react")).ActionType(i)}).catch(o("WAFilteredCatch").filteredCatch(o("WAWebBackendErrors").ServerStatusCodeError,function(n){if(n.status>=400)return new(o("WAWebActionToast.react")).ActionType(i,{actionText:s._(/*BTDS*/"Volver a intentarlo"),actionHandler:function(){return _(e,t)}})})).then(function(){return new(o("WAWebActionToast.react")).ActionType(s._(/*BTDS*/"Se quit\u00f3 la foto de portada"))});return o("WAWebToastManager").ToastManager.open(m.jsx(o("WAWebActionToast.react").ActionToast,{id:t,initialAction:a,pendingAction:l})),n.then(r("WAWebNoop"))}l.setCoverPhoto=p,l.deleteCoverPhoto=_}),226); __d("WAWebWamEnumBusinessProfileEntryPoint",[],(function(t,n,r,o,a,i){var e=Object.freeze({REGISTRATION:1,SETTINGS:2,COMPLIANCE:3,QUICK_REPLY_SMART_DEFAULT:4,WA_PAGES:5,PROFILE_COMPLETENESS:6,DIRECTORY_ONBOARDING:7,BUSINESS_HOME:8,DEEPLINK:9,CHAT_BANNER:10,BUSINESS_SEARCH:11,META_VERIFIED:12,UNKNOWN:13});i.BUSINESS_PROFILE_ENTRY_POINT=e}),66); __d("WAWebWamEnumBusinessProfileField",[],(function(t,n,r,o,a,i){var e=Object.freeze({DESCRIPTION:1,HOURS:2,ADDRESS:3,EMAIL:4,WEBSITE:5,CATEGORY:6,PROFILE:7,PIX:8});i.BUSINESS_PROFILE_FIELD=e}),66); __d("WAWebWamEnumEditProfileAction",[],(function(t,n,r,o,a,i){var e=Object.freeze({ACTION_OPEN:1,ACTION_SAVE:2,ACTION_DISCARD:3,ACTION_PROFILE_FIELD_OPEN:4,ACTION_PROFILE_FIELD_SAVE:5,ACTION_PROFILE_FIELD_DISCARD:6,ACTION_FACEBOOK_ENABLED:7,ACTION_FACEBOOK_DISABLED:8,ACTION_INSTAGRAM_ENABLED:9,ACTION_INSTAGRAM_DISABLED:10,ACTION_FB_IG_POP_SHOWN:11,ACTION_EDIT_COVER_PHOTO_CLICK:12,ACTION_REMOVE_COVER_PHOTO:13,UPGRADE_TO_CUSTOM_LINK_CLICK:14,DIALOG_BOX_GEOCODE_IMPRESSION:15,DIALOG_BOX_GEOCODE_ACCEPT:16,DIALOG_BOX_GEOCODE_REVOKE:17});i.EDIT_PROFILE_ACTION=e}),66); __d("WAWebEditBusinessProfileWamEvent",["WAWebWamCodegenUtils","WAWebWamEnumBusinessProfileEntryPoint","WAWebWamEnumBusinessProfileField","WAWebWamEnumEditProfileAction"],(function(t,n,r,o,a,i,l){var e,s=(e=o("WAWebWamCodegenUtils")).defineEvents({EditBusinessProfile:[1466,{businessProfileEntryPoint:[10,o("WAWebWamEnumBusinessProfileEntryPoint").BUSINESS_PROFILE_ENTRY_POINT],editBusinessProfileSessionId:[2,e.TYPES.STRING],editProfileAction:[1,o("WAWebWamEnumEditProfileAction").EDIT_PROFILE_ACTION],editProfileActionField:[9,o("WAWebWamEnumBusinessProfileField").BUSINESS_PROFILE_FIELD],hasAddress:[5,e.TYPES.BOOLEAN],hasCategory:[4,e.TYPES.BOOLEAN],hasDescription:[3,e.TYPES.BOOLEAN],hasEmail:[7,e.TYPES.BOOLEAN],hasHours:[6,e.TYPES.BOOLEAN],hasPaymentInfo:[11,e.TYPES.BOOLEAN],hasWebsite:[8,e.TYPES.BOOLEAN]},[1,1,1],"regular"]},{EditBusinessProfile:[]});l.EditBusinessProfileWamEvent=s}),98); __d("WAWebEditFormLogEvents",["WAWebEditBusinessProfileWamEvent","WAWebWamEnumBusinessProfileEntryPoint","WAWebWamEnumEditProfileAction"],(function(t,n,r,o,a,i,l){function e(e){var t;return{hasAddress:e.address!=null,hasCategory:!!(e.categories&&e.categories.length>0),hasDescription:e.description!=null,hasEmail:e.email!=null,hasHours:((t=e.businessHours)==null?void 0:t.config)!=null,hasWebsite:e.website!=null}}function s(t,n){var r=new(o("WAWebEditBusinessProfileWamEvent")).EditBusinessProfileWamEvent(babelHelpers.extends({businessProfileEntryPoint:o("WAWebWamEnumBusinessProfileEntryPoint").BUSINESS_PROFILE_ENTRY_POINT.SETTINGS,editBusinessProfileSessionId:n,editProfileAction:o("WAWebWamEnumEditProfileAction").EDIT_PROFILE_ACTION.ACTION_OPEN},e(t)));r.commit()}function u(t,n,r){var a=new(o("WAWebEditBusinessProfileWamEvent")).EditBusinessProfileWamEvent(babelHelpers.extends({businessProfileEntryPoint:o("WAWebWamEnumBusinessProfileEntryPoint").BUSINESS_PROFILE_ENTRY_POINT.SETTINGS,editBusinessProfileSessionId:r,editProfileAction:o("WAWebWamEnumEditProfileAction").EDIT_PROFILE_ACTION.ACTION_PROFILE_FIELD_OPEN,editProfileActionField:t},e(n)));a.commit()}function c(t,n,r){var a=new(o("WAWebEditBusinessProfileWamEvent")).EditBusinessProfileWamEvent(babelHelpers.extends({businessProfileEntryPoint:o("WAWebWamEnumBusinessProfileEntryPoint").BUSINESS_PROFILE_ENTRY_POINT.SETTINGS,editBusinessProfileSessionId:r,editProfileAction:o("WAWebWamEnumEditProfileAction").EDIT_PROFILE_ACTION.ACTION_PROFILE_FIELD_SAVE,editProfileActionField:t},e(n)));a.commit()}function d(t,n,r){var a=new(o("WAWebEditBusinessProfileWamEvent")).EditBusinessProfileWamEvent(babelHelpers.extends({businessProfileEntryPoint:o("WAWebWamEnumBusinessProfileEntryPoint").BUSINESS_PROFILE_ENTRY_POINT.SETTINGS,editBusinessProfileSessionId:r,editProfileAction:o("WAWebWamEnumEditProfileAction").EDIT_PROFILE_ACTION.ACTION_PROFILE_FIELD_DISCARD,editProfileActionField:t},e(n)));a.commit()}function m(){var e=new(o("WAWebEditBusinessProfileWamEvent")).EditBusinessProfileWamEvent({businessProfileEntryPoint:o("WAWebWamEnumBusinessProfileEntryPoint").BUSINESS_PROFILE_ENTRY_POINT.SETTINGS,editProfileAction:o("WAWebWamEnumEditProfileAction").EDIT_PROFILE_ACTION.ACTION_EDIT_COVER_PHOTO_CLICK});e.commit()}function p(){var e=new(o("WAWebEditBusinessProfileWamEvent")).EditBusinessProfileWamEvent({businessProfileEntryPoint:o("WAWebWamEnumBusinessProfileEntryPoint").BUSINESS_PROFILE_ENTRY_POINT.SETTINGS,editProfileAction:o("WAWebWamEnumEditProfileAction").EDIT_PROFILE_ACTION.ACTION_REMOVE_COVER_PHOTO});e.commit()}l.getProfilePopulatedFields=e,l.logProfileOpen=s,l.logProfileFieldOpen=u,l.logProfileFieldSave=c,l.logProfileFieldDiscard=d,l.logEditCoverPhoto=m,l.logRemoveCoverPhoto=p}),98); __d("WAWebMediaBizCoverPhoto",["WAWebFileUtils","WAWebHttpErrors","WAWebMmsMediaTypes","WAWebUploadManager","WAWebWamEnumUploadOriginType","asyncToGeneratorRuntime"],(function(t,n,r,o,a,i,l){function e(e,t,n){return s.apply(this,arguments)}function s(){return s=n("asyncToGeneratorRuntime").asyncToGenerator(function*(e,t,n){var a=yield o("WAWebFileUtils").blobToArrayBuffer(e),i=yield r("WAWebUploadManager").uploadCoverPhoto({file:a,hash:t,signal:n,type:o("WAWebMmsMediaTypes").MEDIA_TYPES.BIZ_COVER_PHOTO,uploadOrigin:o("WAWebWamEnumUploadOriginType").UPLOAD_ORIGIN_TYPE.UNKNOWN,isViewOnce:!1}),l=i.fbid,s=i.metaHmac,u=i.ts;if(l!=null&&u!=null&&s!=null)return{id:l,ts:u,metaHmac:s};throw new(o("WAWebHttpErrors")).HttpInvalidResponseError("mmsUpload: missing fields in upload response")}),s.apply(this,arguments)}l.uploadBizCoverPhoto=e}),98); __d("WAWebBizCoverPhotoPicker.react",["WAFilteredCatch","WALogger","WAWebBizCoverPhotoAction","WAWebBusinessProfileSMBUserJourneyLogger","WAWebCryptoCalculateFilehash","WAWebDataUrlToBlob","WAWebEditFormLogEvents","WAWebHttpErrors","WAWebMediaBizCoverPhoto","WAWebPhotoPickerConstants","WAWebPhotoPickerLoadable.react","react"],(function(t,n,r,o,a,i,l){var e,s,u,c,d=c||(c=r("react")),m=(u||(u=o("react"))).useState;function p(t){var n=t.coverPhoto,r=t.signal,a=m(!1),i=a[0],l=a[1],u=n==null?void 0:n.url,c=function(a,i){l(!0);var t=(n==null?void 0:n.id)!=null,u;if(i==null){u=o("WAWebBusinessProfileSMBUserJourneyLogger").OperationType.REMOVE,n!=null&&n.id&&(o("WAWebBusinessProfileSMBUserJourneyLogger").BusinessProfileUserJourneyLogger.saveCoverPhoto(u),o("WAWebBizCoverPhotoAction").deleteCoverPhoto(n.id).finally(function(){l(!1),o("WAWebEditFormLogEvents").logRemoveCoverPhoto()}));return}u=t?o("WAWebBusinessProfileSMBUserJourneyLogger").OperationType.MODIFY:o("WAWebBusinessProfileSMBUserJourneyLogger").OperationType.ADD;var c=o("WAWebDataUrlToBlob").dataURLtoBlob(i);o("WAWebCryptoCalculateFilehash").calculateFilehashFromBlob(c).then(function(t){o("WAWebMediaBizCoverPhoto").uploadBizCoverPhoto(c,t,r).then(function(e){if(!r.aborted)return o("WAWebBusinessProfileSMBUserJourneyLogger").BusinessProfileUserJourneyLogger.saveCoverPhoto(u),o("WAWebEditFormLogEvents").logEditCoverPhoto(),o("WAWebBizCoverPhotoAction").setCoverPhoto(e.id,e.ts,e.metaHmac)}).catch(o("WAFilteredCatch").filteredCatch(o("WAWebHttpErrors").HttpInvalidResponseError,function(t){o("WALogger").WARN(e||(e=babelHelpers.taggedTemplateLiteralLoose(["BizCoverPhotoPicker: failed to upload cover photo"])))})).catch(function(){o("WALogger").ERROR(s||(s=babelHelpers.taggedTemplateLiteralLoose(["BizCoverPhotoPicker: unexpected error uploading cover photo"]))).sendLogs("biz_cover_photo_upload")}).finally(function(){l(!1)})})};return d.jsx(o("WAWebPhotoPickerLoadable.react").PhotoPickerLoadable,{type:o("WAWebPhotoPickerConstants").PhotoPickerType.COVER_PHOTO,pending:i,readOnly:!1,onImageSet:c,attachToChat:!1,startImage:u==null?void 0:u.toString(),theme:o("WAWebPhotoPickerConstants").PhotoPickerThemeType.COVER_PHOTO})}p.displayName=p.name+" [from "+i.id+"]",l.default=p}),98); __d("WAWebTextMessageModal.react",["WAWebComposeBoxPopupPanel.react","WAWebConstantsDeprecated","WAWebDrawer.react","WAWebDrawerBody.react","WAWebDrawerHeader.react","WAWebEmojiText.react","WAWebKeyboardHotKeys.react","WAWebMediaLinkPreview.react","WAWebModal.react","WAWebRichTextField.react","WAWebRound.react","WAWebUimUie.react","WAWebWdsIcSendFilledIcon.react","react","useWAWebLinkPreview"],(function(t,n,r,o,a,i,l){var e=["ref"],s,u,c=u||(u=r("react")),d=(s||(s=o("react"))).useState,m={buttonRefresh:{color:"x1pse0pq",backgroundColor:"xfn3atn",$$css:!0}};function p(t){var n=t.ref,a=babelHelpers.objectWithoutPropertiesLoose(t,e),i=a.defaultText,l=a.onBack,s=a.onSend,u=a.title,p=d(i),_=p[0],f=p[1],g=o("useWAWebLinkPreview").findFirstWebLink(_),h=o("useWAWebLinkPreview").useLinkPreview(g),y=h.clearLinkPreview,C=h.linkPreview,b=function(t){var e=t.text;f(e)},v=function(){_.length&&s(_,C)},S=u?c.jsx(o("WAWebEmojiText.react").EmojiText,{text:u,direction:"auto",titlify:!0,ellipsify:!0}):null,R=C||{},L=R.description,E=R.matchedText,k=R.thumbnail,I=R.title,T=C?c.jsx(o("WAWebUimUie.react").UIE,{displayName:"ComposeBoxLinkPreview",escapable:!0,requestDismiss:y,children:c.jsx(r("WAWebComposeBoxPopupPanel.react"),{onOmit:y,children:c.jsx(r("WAWebMediaLinkPreview.react"),{title:I,compose:!0,matchedText:E,description:L,thumbnailJpeg:k,isLoading:!1})})}):null;return c.jsx(o("WAWebModal.react").Modal,{ref:n,type:o("WAWebModal.react").ModalTheme.Box,children:c.jsxs(r("WAWebDrawer.react"),{children:[c.jsx(o("WAWebDrawerHeader.react").DrawerHeader,{type:o("WAWebDrawerHeader.react").DRAWER_HEADER_TYPE.POPUP,onBack:l,children:S}),c.jsx(r("WAWebDrawerBody.react"),{children:c.jsxs(o("WAWebKeyboardHotKeys.react").HotKeys,{className:"x78zum5 xdt5ytf x1egiwwb xs9asl8 x6ikm8r x10wlt62 xhjsbib",children:[c.jsx("div",{className:"x1iyjqo2 x9desvi xjfo4ez xs9asl8 xf7qf19 xw2csxc x1odjw0f xhjsbib",children:c.jsx(o("WAWebRichTextField.react").RichTextField,{testid:void 0,value:_,maxLength:r("WAWebConstantsDeprecated").MAX_TXT_MSG_SIZE,onChange:b,emojiBtnPosition:"side",multiline:!0,spellCheck:!0,showRemaining:!0,focusOnMount:!0,theme:"small",textFormatEnabled:!0})}),T]})}),c.jsx("div",{className:"x1n2onr6 x12xzxwr x1x0gksc x1280gxy",children:c.jsx("div",{className:"x10l6tqk x145d82y x3h4tne",children:c.jsx(o("WAWebRound.react").Round,{large:!0,onClick:v,xstyle:m.buttonRefresh,children:c.jsx(o("WAWebWdsIcSendFilledIcon.react").WdsIcSendFilledIcon,{width:30,directional:!0})})})})]})})}p.displayName=p.name+" [from "+i.id+"]",l.default=p}),98); __d("WAWebSendTextFlow.react",["fbt","$InternalEnum","WALogger","WATimeUtils","WAWebBlockContactAction","WAWebChatGetters","WAWebCmd","WAWebComposeBoxActions","WAWebDrawerManager","WAWebFrontendConstants","WAWebSelectModal.react","WAWebSelectModalFooter.react","WAWebSendTextMsgChatAction","WAWebServerPropConstants","WAWebTextMessageModal.react","WAWebUiIdleEventBus","WAWebWid","asyncToGeneratorRuntime","react","useWAWebFlow"],(function(t,n,r,o,a,i,l,s){var e,u,c,d=c||(c=o("react")),m=u||(u=r("react")),p=d.useMemo,_=d.useRef,f=n("$InternalEnum").Mirrored(["Select","TextMessage"]);function g(t){var a=t.onSend,i=t.origin,l=t.text,u=t.title,c=o("useWAWebFlow").useFlow(f.Select),d=c[0],g=c[1],h=_([]),y=_([]),C=(function(){var e=n("asyncToGeneratorRuntime").asyncToGenerator(function*(e){o("WAWebChatGetters").getIsUser(e)&&e.contact.isContactBlocked&&(yield o("WAWebBlockContactAction").unblockContact(e.contact))});return function(n){return e.apply(this,arguments)}})(),b=p(function(){if(i!=null&&r("WAWebWid").isNewsletter(i))return{surface:"channel-forward",extras:{channelWid:i}}},[i]);if(g.step==null)return null;var v;switch(g.step){case f.Select:{var S=(function(){var e=n("asyncToGeneratorRuntime").asyncToGenerator(function*(e,t){yield C(e),e.active?o("WAWebComposeBoxActions").ComposeBoxActions.paste(e,t):(e.setComposeContents({text:t,timestamp:o("WATimeUtils").unixTime()}),o("WAWebCmd").Cmd.openChatFromUnread({chat:e}).then(function(t){t&&o("WAWebComposeBoxActions").ComposeBoxActions.focus(e)}))});return function(n,r){return e.apply(this,arguments)}})(),R=(function(){var e=n("asyncToGeneratorRuntime").asyncToGenerator(function*(e){if(y.current=e,e.length===1){var t=e[0];yield S(t,l),g.end(),window.innerWidth<=o("WAWebFrontendConstants").LAYOUT_2COLUMNS_MAX_WIDTH&&o("WAWebDrawerManager").DrawerManager.closeDrawerRight()}else g.push(f.TextMessage);a&&a()});return function(n){return e.apply(this,arguments)}})(),L=function(){return h.current},E=function(t,n,r){h.current=r};v=m.jsx(o("WAWebSelectModal.react").SelectModal,{title:u!=null?u:s._(/*BTDS*/"Env\u00eda un mensaje a"),tsNavigationData:b,listType:o("WAWebSelectModal.react").ListType.ChatSelectModal,getInitialItems:L,maxItems:o("WAWebServerPropConstants").MULTICAST_LIMIT_GLOBAL,onConfirm:R,onCancel:function(){return g.end()},onSelectionChanged:E,singleSelectionFooterType:o("WAWebSelectModalFooter.react").FooterType.NEXT,multipleSelectionFooterType:o("WAWebSelectModalFooter.react").FooterType.NEXT});break}case f.TextMessage:{var k=function(r,a,i){r.forEach((function(){var t=n("asyncToGeneratorRuntime").asyncToGenerator(function*(t){yield C(t),o("WAWebUiIdleEventBus").UiIdleEventBus.once("ui_idle",function(){o("WALogger").LOG(e||(e=babelHelpers.taggedTemplateLiteralLoose(["handleSend inside WAWebSendTextFlow"]))),o("WAWebSendTextMsgChatAction").sendTextMsgToChat(t,a,{linkPreview:i})})});return function(e){return t.apply(this,arguments)}})()),g.end()};v=m.jsx(r("WAWebTextMessageModal.react"),{defaultText:l,title:u!=null?u:s._(/*BTDS*/"Env\u00eda un mensaje a"),onSend:function(t,n){return k(y.current,t,n)},onBack:function(){return g.pop()}});break}}return m.jsx(d,{flow:g,children:v})}g.displayName=g.name+" [from "+i.id+"]",l.default=g}),226); __d("WAWebBizSendCatalogLinkFlow.react",["fbt","WAWebCatalogShortLinkUtils","WAWebSendTextFlow.react","WAWebUserPrefsMeUser","react"],(function(t,n,r,o,a,i,l,s){var e,u=e||(e=r("react"));function c(e){var t=e.catalog,n=e.onSend,a=o("WAWebCatalogShortLinkUtils").createCatalogLink(t.id.user),i=t.id.equals(o("WAWebUserPrefsMeUser").getMaybeMePnUser())?s._(/*BTDS*/"Sigue este enlace para ver nuestro cat\u00e1logo en WhatsApp:").toString()+" "+a:a;return u.jsx(r("WAWebSendTextFlow.react"),{text:i,onSend:n})}c.displayName=c.name+" [from "+i.id+"]",l.default=c}),226); __d("WAWebBizSendProductButton.react",["fbt","WAWebChatRefreshedIcon.react","WAWebDrawerButton.react","react"],(function(t,n,r,o,a,i,l,s){var e,u=e||(e=r("react")),c={icon:{color:"xw63xux",$$css:!0}};function d(e){var t=e.onClick,n=o("WAWebChatRefreshedIcon.react").ChatRefreshedIcon;return u.jsx(o("WAWebDrawerButton.react").DrawerButtonSimple,{testid:void 0,icon:u.jsx(n,{xstyle:c.icon}),onClick:t,children:s._(/*BTDS*/"Enviar producto")})}d.displayName=d.name+" [from "+i.id+"]",l.default=d}),226); __d("WAWebBizSendProductLinkFlow.react",["fbt","WAWebCatalogShortLinkUtils","WAWebSendTextFlow.react","WAWebUserPrefsMeUser","react"],(function(t,n,r,o,a,i,l,s){var e,u=e||(e=r("react"));function c(e){var t=e.onSend,n=e.product,a=o("WAWebCatalogShortLinkUtils").createProductLink(n.catalogWid.user,n.id.toString()),i=o("WAWebUserPrefsMeUser").isMeAccount(n.catalogWid)?s._(/*BTDS*/"Sigue este enlace para ver el art\u00edculo en WhatsApp:").toString()+" "+a:a;return u.jsx(r("WAWebSendTextFlow.react"),{text:i,onSend:t})}c.displayName=c.name+" [from "+i.id+"]",l.default=c}),226); __d("WAWebBizVerifyPostcodeBridge",["WAWebBusinessDirectConnectionCollection"],(function(t,n,r,o,a,i,l){function e(e,t){return r("WAWebBusinessDirectConnectionCollection").verifyAndSavePostcode(e,t)}l.verifyPostcode=e}),98); __d("WAWebBizVerifyPostcodeAction",["WAWebBizVerifyPostcodeBridge"],(function(t,n,r,o,a,i,l){var e=function(t,n){return o("WAWebBizVerifyPostcodeBridge").verifyPostcode(t,n)};l.verifyPostcode=e}),98); __d("WAWebBroadcastListIdUtils",["WAJids"],(function(t,n,r,o,a,i,l){function e(e){for(var t=Math.floor(Date.now()/1e3);e(o("WAJids").toBroadcastJid(String(t)));)t++;return o("WAJids").toBroadcastJid(String(t))}function s(e){if(e.length<1||e.length>20)return!1;var t=e.charAt(0);if(t<"1"||t>"9")return!1;for(var n=0;n"9")return!1}return!0}l.createBroadcastListJid=e,l.isValidBroadcastListId=s}),98); __d("WAWebBroadcastSystemMsg",["WAWebContactSystemMsg","WAWebMsgType"],(function(t,n,r,o,a,i,l){function e(e){return o("WAWebContactSystemMsg").genNotificationMsg(e,{type:"broadcast_notification",kind:o("WAWebMsgType").MsgKind.BroadcastNotification,subtype:"create",templateParams:[]})}l.genBroadcastCreateSystemMsg=e}),98); __d("WAWebBroadcastListStorageUtils",["Promise","WAWebBackendApi","WAWebBizGatingUtils","WAWebBroadcastSystemMsg","WAWebHandleMsgTypes.flow","WAWebHandleSingleMsg","WAWebInitialSystemMsg","WAWebSyncdCoreApi","WAWebWidFactory","asyncToGeneratorRuntime"],(function(t,n,r,o,a,i,l){var e;function s(e,t){return u.apply(this,arguments)}function u(){return u=n("asyncToGeneratorRuntime").asyncToGenerator(function*(t,a){var i=t.id,l=t.listName,s=t.participants,u=t.labelIds,c=u===void 0?[]:u,d=t.timestamp,m=o("WAWebWidFactory").createWid(i),p={name:l,id:m},_=!1;if(yield o("WAWebSyncdCoreApi").lockForSync(["chat","broadcast-metadata","contact"],a!=null?a:[],(function(){var e=n("asyncToGeneratorRuntime").asyncToGenerator(function*(e){var t=e[0],n=e[1],r=e[2];if(o("WAWebBizGatingUtils").isBizBroadcastSendWebEnabled()){var a=yield t.get(i);a==null&&(_=!0,p.t=d),yield t.createOrMerge(i,babelHelpers.extends({},p,{id:i})),yield r.createOrMerge(i,{id:i,name:l}),yield n.createOrReplace({id:i,recipients:s.map(function(e){return e.lidJid}),labels:c})}});return function(t){return e.apply(this,arguments)}})()),!!o("WAWebBizGatingUtils").isBizBroadcastSendWebEnabled()){if(_){var f=yield r("WAWebInitialSystemMsg")(m,null,null),g=o("WAWebBroadcastSystemMsg").genBroadcastCreateSystemMsg(m),h=[].concat(f,[g]);yield(e||(e=n("Promise"))).all(h.map(function(e){return o("WAWebHandleSingleMsg").handleSingleMsg({chatId:m,newMsg:e,handleSingleMsgOrigin:"createChat",messageOverwriteOption:o("WAWebHandleMsgTypes.flow").MessageOverwriteOption.NO_OVERWRITE,preserveOrder:!1})}))}o("WAWebBackendApi").frontendFireAndForget("updateBroadcastList",{chat:p,broadcastMetadata:{id:m,labels:c,recipients:s.map(function(e){return{id:o("WAWebWidFactory").createWid(e.lidJid)}})},contact:{id:m,name:l}})}}),u.apply(this,arguments)}function c(e,t){return d.apply(this,arguments)}function d(){return d=n("asyncToGeneratorRuntime").asyncToGenerator(function*(e,t){var r=typeof e=="string"?e:e.toString(),a=typeof e=="string"?o("WAWebWidFactory").createWid(e):e;yield o("WAWebSyncdCoreApi").lockForSync(["chat","broadcast-metadata"],t!=null?t:[],(function(){var e=n("asyncToGeneratorRuntime").asyncToGenerator(function*(e){var t=e[0],n=e[1];yield t.remove(r),yield n.remove(r)});return function(t){return e.apply(this,arguments)}})()),o("WAWebBackendApi").frontendFireAndForget("removeBroadcastList",{id:a})}),d.apply(this,arguments)}l.updateBroadcastListStorage=s,l.removeBroadcastListStorage=c}),98); __d("WAWebBroadcastListSync",["Promise","WALogger","WASyncdConst","WAWebBizGatingUtils","WAWebBroadcastListStorageUtils","WAWebProtobufsServerSync.pb","WAWebSyncdAction","WAWebSyncdActionUtils","WAWebSyncdIndexUtils","asyncToGeneratorRuntime"],(function(t,n,r,o,a,i,l){var e,s,u=(function(t){function r(){for(var e,n=arguments.length,r=new Array(n),a=0;a1e6?o("WAWebWamEnumTrustSignalBuckets").TRUST_SIGNAL_BUCKETS.B1M:e>=1e5?o("WAWebWamEnumTrustSignalBuckets").TRUST_SIGNAL_BUCKETS.B100K:e>=1e4?o("WAWebWamEnumTrustSignalBuckets").TRUST_SIGNAL_BUCKETS.B10K:e>=1e3?o("WAWebWamEnumTrustSignalBuckets").TRUST_SIGNAL_BUCKETS.B1K:e>=501?o("WAWebWamEnumTrustSignalBuckets").TRUST_SIGNAL_BUCKETS.B501:e>=101?o("WAWebWamEnumTrustSignalBuckets").TRUST_SIGNAL_BUCKETS.B101:e>=51?o("WAWebWamEnumTrustSignalBuckets").TRUST_SIGNAL_BUCKETS.B51:e>=11?o("WAWebWamEnumTrustSignalBuckets").TRUST_SIGNAL_BUCKETS.B11:e>=2?o("WAWebWamEnumTrustSignalBuckets").TRUST_SIGNAL_BUCKETS.B2:e===1?o("WAWebWamEnumTrustSignalBuckets").TRUST_SIGNAL_BUCKETS.B1:o("WAWebWamEnumTrustSignalBuckets").TRUST_SIGNAL_BUCKETS.B0}l.logProfileImpression=s,l.logProfileExit=u,l.logMessageClick=c,l.logShopsClick=d,l.logCatalogClick=m,l.logForwardClick=p,l.logEmailClick=_,l.logWebsiteClick=f,l.logLocationClick=g,l.logHoursClick=h,l.logLinkedFbClick=y,l.logLinkedIgClick=C,l.logLinkedAccountImpression=b}),98); __d("WAWebProfilePicPicker.react",["WAAbortError","WAFilteredCatch","WALogger","WAPromiseRaceAbort","WATimeUtils","WAWebBusinessProfileSMBUserJourneyLogger","WAWebFocusTracer","WAWebMiscErrors","WAWebNoop","WAWebPhotoPickerConstants","WAWebPhotoPickerLoadable.react","WAWebProfilePicThumbAction","WAWebUserPrefsGeneral","react","useWAWebUnmountSignal"],(function(t,n,r,o,a,i,l){var e,s,u,c=u||(u=o("react")),d=s||(s=r("react")),m=c.useRef,p=c.useState;function _(t){var n=t.profilePicThumb,a=t.size,i=t.tabIndex,l=!n.canSet()&&!n.canDelete(),s=p(!1),u=s[0],c=s[1],_=r("useWAWebUnmountSignal")(),f=m(null),g=function(){f.current&&r("WAWebFocusTracer").focus(f.current)},h=function(a,i){var n=t.profilePicThumb;c(!0);var l=n.imgFull!=null&&n.imgFull!=="",s,u=!1,d;a!=null&&i!=null?(s=o("WAWebProfilePicThumbAction").setProfilePic(n,a,i,g),d=l?o("WAWebBusinessProfileSMBUserJourneyLogger").OperationType.MODIFY:o("WAWebBusinessProfileSMBUserJourneyLogger").OperationType.ADD):(u=!0,s=o("WAWebProfilePicThumbAction").deleteProfilePic(n,g),d=o("WAWebBusinessProfileSMBUserJourneyLogger").OperationType.REMOVE),o("WAWebBusinessProfileSMBUserJourneyLogger").BusinessProfileUserJourneyLogger.saveProfilePhoto(d),r("WAPromiseRaceAbort")(s,_).catch(o("WAFilteredCatch").filteredCatch(o("WAWebMiscErrors").ActionError,function(t){o("WALogger").WARN(e||(e=babelHelpers.taggedTemplateLiteralLoose(["ProfileDrawer: failed to set/delete profile image"])))})).catch(o("WAAbortError").catchAbort(r("WAWebNoop"))).finally(function(){c(!1),u&&o("WAWebUserPrefsGeneral").setLastProfilePicThumbUpdate(o("WATimeUtils").unixTime())})};return d.jsx(o("WAWebPhotoPickerLoadable.react").PhotoPickerLoadable,{tabIndex:i,type:o("WAWebPhotoPickerConstants").PhotoPickerType.PROFILE,id:n.id,attachToChat:!1,pending:u,startImage:n.imgFull,readOnly:l,onImageSet:h,size:a,editImageButtonRef:f})}_.displayName=_.name+" [from "+i.id+"]",l.default=_}),98); __d("WAWebBusinessProfileCoverPhoto.react",["fbt","WAWebBizCoverPhotoPicker.react","WAWebDetailImage.react","WAWebFlex.react","WAWebMiscGatingUtils","WAWebPencilRefreshedIcon.react","WAWebProfilePicPicker.react","WAWebRound.react","WAWebThemeContext","WAWebUISpacing","react","stylex","useWAWebModelValues","useWAWebUnmountSignal"],(function(t,n,r,o,a,i,l,s){var e,u,c,d=c||(c=o("react")),m=e||(e=r("react")),p=d.useEffect,_=d.useState,f=1300,g=122,h=152,y={avatar:{marginTop:"xma71h1",maxWidth:"x1c4npxh",position:"x1n2onr6",zIndex:"xlynzuj","@media screen and (min-width: 1300px)_marginTop":"x1bfl7gj",$$css:!0},noStatusBorder:{borderTopWidth:"x1kr8tdy",borderInlineEndWidth:"xburx9h",borderBottomWidth:"xqm4iv",borderInlineStartWidth:"x8u93l6",$$css:!0}};function C(e){var t,n,a=e.businessProfile,i=e.contact,l=e.editable,c=e.onClick,d=e.onLoad,C=e.profilePicThumb,b=_(window.innerWidth),v=b[0],S=b[1],R=o("useWAWebModelValues").useModelValues(a,["coverPhoto","profileOptions"]),L=r("useWAWebUnmountSignal")(),E=o("WAWebThemeContext").useIsDarkTheme();p(function(){function e(){S(window.innerWidth)}return window.addEventListener("resize",e),e(),function(){return window.removeEventListener("resize",e)}},[R.profileOptions]);var k=o("WAWebMiscGatingUtils").isBlueLockingEnabled()&&((t=R.profileOptions)==null?void 0:t.isProfileEditDisabled)===!0,I=v>f?h:g;function T(e){c&&c(e)}var D=y.noStatusBorder,x;l===!0&&C!=null&&!k?x=m.jsx(r("WAWebProfilePicPicker.react"),{profilePicThumb:C,size:I}):x=m.jsx(o("WAWebDetailImage.react").DetailImage,{id:i.id,size:I,loader:!0,onLoad:d,onClick:k?null:T,quality:o("WAWebDetailImage.react").DetailImageQuality.High});var $=(n=R.coverPhoto)==null?void 0:n.url.toString(),P,N;if(l!=null){P=m.jsx(r("WAWebBizCoverPhotoPicker.react"),{coverPhoto:R.coverPhoto!=null?R.coverPhoto:void 0,signal:L});var M=m.jsx(o("WAWebPencilRefreshedIcon.react").PencilRefreshedIcon,{});N=m.jsx("div",babelHelpers.extends({},{0:{className:"x219wg1 x1c9tyrk xeusxvb x1pahc9y x1ertn4p x191j7n5 xdg88n9 x47corl x10l6tqk x1vjfegm"},1:{className:"x1c9tyrk xeusxvb x1pahc9y x1ertn4p x191j7n5 xdg88n9 x47corl x10l6tqk x1vjfegm xfn3atn x1pse0pq"}}[!E<<0],{"aria-hidden":!0,children:m.jsx(o("WAWebRound.react").Round,{inverted:!0,testid:void 0,children:M})}))}var w;if(l==null&&$!=null){var A=s._(/*BTDS*/"Imagen de la foto de portada de la empresa"),F=$!==""?{backgroundImage:"url("+$+")"}:null;w=m.jsx("div",{className:"xiy17q3 x18d0r48 x1ey2m1c xtijo5x x1o0tod x10l6tqk x13vifvy",style:F,"data-testid":void 0,role:"img","aria-label":A})}return m.jsxs(m.Fragment,{children:[m.jsxs("div",babelHelpers.extends({},{0:{className:"xiqx3za x1o0tod x6ikm8r x10wlt62 x10l6tqk x13vifvy xh8yej3 x1knukwh xihgre1"},1:{className:"xiqx3za x1o0tod x6ikm8r x10wlt62 x10l6tqk x13vifvy xh8yej3 x1knukwh xihgre1 x1yk5sdm"}}[!!l<<0],{children:[w,P,N]})),m.jsx(o("WAWebFlex.react").FlexRow,{justify:"center",className:(u||(u=r("stylex")))(y.avatar,o("WAWebUISpacing").uiMargin.bottom15,o("WAWebUISpacing").uiMargin.horizAuto),children:m.jsx("div",{className:"x1y9zq84 xt9xd2u x3tsejo x1ahzpo1 xvs2etk xg3wpu6 x1jwbhkm xgg4q86 x13fuv20 x18b5jzi x1q0q8m5 x1t7ytsu x1kr8tdy xburx9h xqm4iv x8u93l6",children:x})})]})}C.displayName=C.name+" [from "+i.id+"]",l.default=C}),226); __d("WAWebCartIcon.react",["WAWebShoppingCartRefreshedIcon.react","react"],(function(t,n,r,o,a,i,l){var e,s=e||(e=r("react")),u={cartIcon:{color:"xuwfzo9",$$css:!0},inheritColor:{color:"x1heor9g",$$css:!0}};function c(e){var t=e.theme,n=o("WAWebShoppingCartRefreshedIcon.react").ShoppingCartRefreshedIcon;return s.jsx(n,{xstyle:[u.cartIcon,t==="inherit-color"&&u.inheritColor]})}c.displayName=c.name+" [from "+i.id+"]",l.default=c}),98); __d("WAWebCatalogLoadError.react",["fbt","WAWebBox.react","WAWebButton.react","WAWebCatalogLoadErrorLoadable","WAWebCatalogManagementFlowLoadable","WAWebClickableLink.react","WAWebSvgComponentBase","WAWebText.react","WAWebUISpacing","WAWebWamEnumCatalogEntryPoint","WAWebWarningOutlineIcon.react","react"],(function(t,n,r,o,a,i,l,s){var e,u=e||(e=o("react"));function c(e){var t=e.ctaDisplayType,n=e.shouldShowHeader,a=n===void 0?!0:n,i=function(){o("WAWebCatalogManagementFlowLoadable").openCatalogManagementFlow({entryPoint:o("WAWebWamEnumCatalogEntryPoint").CATALOG_ENTRY_POINT.CATALOG_ENTRY_POINT_PROFILE,isInitialStep:!0})},l=s._(/*BTDS*/"Verifica tu correo electr\u00f3nico"),c=s._(/*BTDS*/"No pudimos cargar tu cat\u00e1logo."),d=c;return t===o("WAWebCatalogLoadErrorLoadable").CTADisplayType.LINK?d=s._(/*BTDS*/"{error-desc-text} Ve al {=m3} para verificar tu correo electr\u00f3nico.",[s._param("error-desc-text",c),s._implicitParam("=m3",u.jsx(r("WAWebClickableLink.react"),{testid:void 0,onClick:i,children:s._(/*BTDS*/"Administrador de cat\u00e1logos")}))]):t===o("WAWebCatalogLoadErrorLoadable").CTADisplayType.BUTTON&&(d=s._(/*BTDS*/"{error-desc-text} Ve al administrador de cat\u00e1logos para verificar tu correo electr\u00f3nico.",[s._param("error-desc-text",c)])),u.jsxs(r("WAWebBox.react"),{xstyle:o("WAWebUISpacing").uiPadding.horiz24,flex:!0,align:"center",testid:void 0,direction:"vertical",children:[(t===o("WAWebCatalogLoadErrorLoadable").CTADisplayType.BUTTON||t===o("WAWebCatalogLoadErrorLoadable").CTADisplayType.NONE)&&u.jsx(o("WAWebWarningOutlineIcon.react").WarningOutlineIcon,{width:24,height:24,DEPRECATED_color:o("WAWebSvgComponentBase").DEPRECATED_SvgColorProp.SECONDARY,directional:!0}),a&&u.jsx(o("WAWebText.react").WAWebTextTitle,{xstyle:[o("WAWebUISpacing").uiPadding.bottom5,o("WAWebUISpacing").uiPadding.top16],textAlign:"center",children:l}),u.jsx(o("WAWebText.react").WAWebTextSmall,{testid:void 0,textAlign:"center",xstyle:o("WAWebUISpacing").uiPadding.bottom24,children:d}),t===o("WAWebCatalogLoadErrorLoadable").CTADisplayType.BUTTON&&u.jsx(r("WAWebBox.react"),{xstyle:o("WAWebUISpacing").uiMargin.bottom24,children:u.jsx(o("WAWebButton.react").WAWebButtonSecondary,{testid:void 0,onClick:i,children:s._(/*BTDS*/"Ir al administrador de cat\u00e1logos")})})]})}c.displayName=c.name+" [from "+i.id+"]",l.CatalogLoadError=c}),226); __d("WAWebNuxCollectionsBanner.react",["fbt","WAWebABProps","WAWebCatalogCollection","WAWebConnModel","WAWebCoolOffNuxBanner.react","WAWebNux","WAWebNuxBanner","WAWebNuxCoolOff","WAWebUserPrefsMeUser","WAWebWamEnumBannerTypes","react"],(function(t,n,r,o,a,i,l,s){var e,u,c=u||(u=r("react")),d=(e||(e=o("react"))).createRef,m={CLICKS_BEFORE_COOL_OFF:1,COOL_OFF_DURATION_IN_DAYS:2,COOL_OFF_START_STORAGE_KEY:o("WAWebNux").CoolOffPeriodKeys.CATALOG,MAX_VIEWS_IN_DAYS:2,VIEWS_BEFORE_COOL_OFF_IN_DAYS:1,metricField:o("WAWebWamEnumBannerTypes").BANNER_TYPES.SMB_COLLECTION_CREATION};function p(){var e=o("WAWebCatalogCollection").CatalogCollection.get(o("WAWebUserPrefsMeUser").getMePnUserOrThrow());if(e==null||e.collections==null)return!1;var t=e.collections.getCollectionModels(!0),n=e.productCollection.getProductModels(!0).some(function(e){return!e.isHidden&&e.reviewStatus!=="REJECTED"});return n&&t.length===0}var _=(function(e){function t(){for(var t,n=arguments.length,r=new Array(n),o=0;o1.91&&(I=1.91),I>1&&!k&&(I=1);var T={width:k&&I<1?100*I+"%":I===1&&!g?"100%":null},D={paddingTop:Math.floor(100/I)+"%"},x={cursor:l?"pointer":"auto"},$;return(a==null?void 0:a.videoUrl)!=null&&o("WAWebBizGatingUtils").isCatalogVideoViewEnabled()&&($=m.jsx(o("WAWebFlex.react").FlexRow,{xstyle:f.playButton,children:m.jsx(o("WAWebMediaStateControls.react").Play,{})})),m.jsx("div",{ref:n?function(e){return n(e)}:null,className:"_ak9l",style:T,children:m.jsxs("div",{className:"_ak9m",style:D,children:[!r("isStringNullOrEmpty")(S)&&m.jsx("img",{ref:R,alt:t,src:S,className:"_ak9n",style:x,draggable:"false",onClick:E}),$,d===!0&&m.jsx(o("WAWebFlex.react").FlexRow,{xstyle:f.unsupportedVideoOverlay,children:m.jsx(o("WAWebFlex.react").FlexRow,{xstyle:f.unsupportedVideoOverlayText,children:u._(/*BTDS*/"Usa WhatsApp en tu tel\u00e9fono para ver videos del cat\u00e1logo.")})})]})})}g.displayName=g.name+" [from "+i.id+"]",l.default=g}),226); __d("WAWebVideoIcon.react",["WAWebSvgComponentBase","react","stylex"],(function(t,n,r,o,a,i,l){var e=["height","iconXstyle","innerStyles","name","viewBox","width"],s,u,c=s||(s=r("react")),d="video";function m(t){var n=t.height,a=t.iconXstyle,i=t.innerStyles,l=t.name,s=t.viewBox,m=t.width,p=babelHelpers.objectWithoutPropertiesLoose(t,e),_;if(s){var f=s.height,g=f===void 0?0:f,h=s.width,y=h===void 0?0:h,C=s.x,b=C===void 0?0:C,v=s.y,S=v===void 0?0:v;_=[b,S,y,g].join(" ")}var R=28,L=46;return(n!=null||m!=null)&&(R=n,L=m),c.jsx(o("WAWebSvgComponentBase").BaseSvgSpan,babelHelpers.extends({name:l!=null?l:d},p,{children:c.jsxs("svg",{viewBox:_!=null?_:"0 0 46 28",height:R,width:L,preserveAspectRatio:"xMidYMid meet",className:(u||(u=r("stylex")))(a),fill:"currentColor",children:[c.jsx("title",{children:l!=null?l:d}),c.jsx("path",{d:"M0.632234 3.05765C0 4.25556 0 5.82371 0 8.96V19.04C0 22.1763 0 23.7444 0.632234 24.9423C1.18836 25.9961 2.07575 26.8527 3.16722 27.3896C4.40804 28 6.03238 28 9.28106 28H23.5894C26.838 28 28.4624 28 29.7032 27.3896C30.7947 26.8527 31.682 25.9961 32.2382 24.9423C32.8704 23.7444 32.8704 22.1763 32.8704 19.04V8.96C32.8704 5.82371 32.8704 4.25556 32.2382 3.05765C31.682 2.00395 30.7947 1.14725 29.7032 0.610364C28.4624 0 26.838 0 23.5894 0H9.28106C6.03238 0 4.40804 0 3.16722 0.610364C2.07575 1.14725 1.18836 2.00395 0.632234 3.05765Z",fill:"currentColor",className:u(i==null?void 0:i.primary)}),c.jsx("path",{d:"M36.7051 8.4197C36.3068 8.77319 36.0801 9.27163 36.0801 9.79396V18.206C36.0801 18.7284 36.3068 19.2268 36.7051 19.5803L41.899 24.1895C43.1385 25.2895 45.1411 24.4407 45.1411 22.8153V5.18474C45.1411 3.55931 43.1385 2.71047 41.899 3.81048L36.7051 8.4197Z",fill:"currentColor",className:u(i==null?void 0:i.secondary)})]})}))}m.displayName=m.name+" [from "+i.id+"]",l.VideoIcon=m}),98); __d("WAWebVideoPlaceholderSlide.react",["fbt","WAWebFlex.react","WAWebUISpacing","WAWebVideoIcon.react","react","vulture"],(function(t,n,r,o,a,i,l,s){var e,u=e||(e=r("react")),c={unsupportedVideoOverlayText:{color:"xraqfvc",fontSize:"x1jchvi3",textAlign:"x2b8uid",maxWidth:"x1jkqq1h",lineHeight:"xwn7fz2",$$css:!0}};function d(){return r("vulture")("YxVxfbRTE4fdLKkYtaY7Aiq0Du8="),u.jsx("div",{className:"xc8qplx xh8yej3 x1psf4jx",children:u.jsx("div",{className:"x1n2onr6",children:u.jsxs(o("WAWebFlex.react").FlexContainer,{direction:"vertical",children:[u.jsx(o("WAWebFlex.react").FlexRow,{xstyle:[c.unsupportedVideoOverlayText,o("WAWebUISpacing").uiMargin.horizAuto,o("WAWebUISpacing").uiMargin.bottom16],children:u.jsx(o("WAWebVideoIcon.react").VideoIcon,{width:24})}),u.jsx(o("WAWebFlex.react").FlexRow,{xstyle:[c.unsupportedVideoOverlayText,o("WAWebUISpacing").uiMargin.horizAuto],children:s._(/*BTDS*/"Usa WhatsApp en tu tel\u00e9fono para ver videos del cat\u00e1logo.")})]})})},"video-placeholder-slide")}d.displayName=d.name+" [from "+i.id+"]",l.default=d}),226); __d("WAWebImageCarousel.react",["Promise","WAAbortError","WAPromiseRaceAbort","WAWebChevronButton.react","WAWebImageSlide.react","WAWebMediaTypes","WAWebResizeObserver.react","WAWebRound.react","WAWebSpinner.react","WAWebVelocityAnimate","WAWebVideoPlaceholderSlide.react","react","smoothscroll-polyfill","stylex"],(function(t,n,r,o,a,i,l){var e,s,u,c,d=c||(c=o("react")),m=u||(u=r("react")),p=d.useEffect,_=d.useRef,f=d.useState;r("smoothscroll-polyfill").polyfill();var g={loaded:{opacity:"x1hc1fzr",$$css:!0},fadeIn:{transition:"xk82a7y",$$css:!0},carousel:{position:"x1n2onr6",height:"xqtp20y",paddingTop:"x1ukowes",$$css:!0},contentContainer:{position:"x10l6tqk",top:"x13vifvy",left:"xu96u03",display:"x78zum5",alignItems:"x6s0dn4",width:"xh8yej3",height:"x5yr21d",overflowX:"x6ikm8r",overflowY:"x10wlt62",$$css:!0},slidesContainer:{overflowX:"xw2csxc",opacity:"xg01cxk",$$css:!0}};function h(t){var a=t.fallbackMediaData,i=t.fetching,l=t.images,u=t.onClick,c=t.renderFallback,d=t.showUnsupportedVideoPlaceholder,h=_(null),y=_(null),C=_(null),b=_(null),v=_(null),S=f(null),R=S[0],L=S[1],E=f(l.filter(function(e){return e.mediaData.mediaStage===o("WAWebMediaTypes").MediaDataStage.RESOLVED}).length),k=E[0],I=E[1],T=f(!1),D=T[0],x=T[1],$=k===l.length,P=function(){return I(function(e){return e+1})};p(function(){var t=null;if(!$&&!c){var a,i,l=y.current;if(!l)return;(a=C.current)==null||a.controller.abort(),t=new AbortController;var s=t.signal,u=(((i=C.current)==null?void 0:i.promise)||(e||(e=n("Promise"))).resolve()).then(function(){var e=75,t=50;return r("WAWebVelocityAnimate")(l,{opacity:[1,0]},{delay:e,duration:t})}),d=r("WAPromiseRaceAbort")(u,s).then(function(){if(s.aborted)throw new(o("WAAbortError")).AbortError;x(!0)}).catch(o("WAAbortError").catchAbort(function(){r("WAWebVelocityAnimate")(l,"stop",!0)})).finally(function(){C.current=null});C.current={promise:d,controller:t}}return function(){var e;(e=t)==null||e.abort()}},[$,c]);var N=function(){var e;return!((e=h.current)!=null&&e.children)||h.current.scrollWidth===h.current.offsetWidth?null:h.current.scrollLeft===0?"next":h.current.scrollWidth-1<=h.current.scrollLeft+h.current.offsetWidth?"prev":"both"};if(p(function(){L(N())},[$]),c&&l.length===0)return m.jsx("div",{className:"x1n2onr6 xqtp20y x1ukowes",dir:"ltr",children:m.jsx("div",{className:"x10l6tqk x13vifvy xu96u03 x78zum5 x6s0dn4 xh8yej3 x5yr21d x10wlt62 xw2csxc xg01cxk",children:a&&m.jsx(r("WAWebImageSlide.react"),{altText:"",mediaData:a,renderFallback:!0,singleSlide:!0})})});var M,w,A,F=function(){b.current=null;var e=N();R!==e&&L(e)},O=function(){b.current==null&&(b.current=window.requestAnimationFrame(F))};if(l.length>1||d===!0){var B=function(){var e=h.current;if(e!=null&&(R==="prev"||R==="both")){for(var t=e.scrollLeft+e.offsetWidth/2,n=0,r=e.lastElementChild;r instanceof HTMLElement&&n===0;){var o=r.offsetLeft+r.offsetWidth/2;o0,S=o("WAWebABProps").getABPropConfigValue("wds_web_button"),R=c.jsx(o("WAWebButton.react").Button,{testid:void 0,type:"primary",onClick:h,disabled:!v,children:s._(/*BTDS*/"Guardar")}),L=c.jsx(o("WAWebButton.react").Button,{testid:void 0,type:"secondary",onClick:y,children:s._(/*BTDS*/"Cancelar")}),E=S?c.jsx(r("WDSButtonGroup.react"),{width:"hug",orientation:"horizontal",secondaryButtonProps:{variant:"outline",type:"default",onPress:y,testid:"popup-controls-cancel",label:s._(/*BTDS*/"Cancelar")},primaryButtonProps:{variant:"filled",type:"default",onPress:function(){return void h()},testid:"popup-controls-ok",disabled:!v,label:s._(/*BTDS*/"Guardar")}}):c.jsxs(o("WAWebButton.react").ButtonGroup,{direction:"horizontal",align:"end",children:[L,R]}),k=c.jsx(o("WAWebRichTextField.react").RichTextField,{testid:void 0,value:f,maxLength:o("WAWebGroupGatingUtils").getGroupMaxSubject(),onChange:b,validate:C,emojiBtnPosition:"side",multiline:!0,spellCheck:!0,showRemaining:!0,focusOnMount:!0,theme:"small",textFormatEnabled:!0,editable:a,editRestrictionInfo:i});return c.jsxs(o("WAWebModal.react").Modal,{title:s._(/*BTDS*/"Designa un nombre para tu grupo"),actions:E,children:[m,k]})}m.displayName=m.name+" [from "+i.id+"]",l.default=m}),226); __d("WAWebProductCatalogCatalogDrawerMenu.react",["fbt","WATypeUtils","WAWebAdCreationDropdownItem.react","WAWebBizGatingUtils","WAWebCollectionRefreshedIcon.react","WAWebCommonCartIconMenuBarItem.react","WAWebDropdown.react","WAWebDropdownItem.react","WAWebInfoRefreshedIcon.react","WAWebLinkRefreshedIcon.react","WAWebMenuBar.react","WAWebMoreRefreshedIcon.react","WAWebSettingsRefreshedIcon.react","WAWebShareRefreshedIcon.react","WAWebTabOrder","WAWebUserPrefsMeUser","WAWebWamEnumLwiEntryPoint","WAWebWidFactory","WDSMenuBarItem.react","react","useWAWebABPropConfigValue"],(function(t,n,r,o,a,i,l,s){var e,u=e||(e=r("react"));function c(e){var t=e.boostMenuOptionInput,n=e.canManageCatalog,a=e.onOpenCollections,i=e.onOpenMerchantDetailsForm,l=e.onOpenSettings,c=e.onSendCatalog,d=e.ref,m=o("useWAWebABPropConfigValue").useABPropConfigValue("wds_web_button");if(n){var p=u.jsxs(u.Fragment,{children:[u.jsx(o("WAWebDropdownItem.react").DropdownItem,{testid:void 0,action:c,icon:u.jsx(o("WAWebShareRefreshedIcon.react").ShareRefreshedIcon,{}),children:s._(/*BTDS*/"Reenviar")}),a&&u.jsx(o("WAWebDropdownItem.react").DropdownItem,{testid:void 0,action:a,icon:u.jsx(o("WAWebCollectionRefreshedIcon.react").CollectionRefreshedIcon,{}),children:s._(/*BTDS*/"Colecciones")}),o("WAWebBizGatingUtils").canSeeECommerceComplianceIndiaCountryOriginExemptBusinessJourney(o("WAWebUserPrefsMeUser").getMePnUserOrThrow())&&i&&u.jsx(o("WAWebDropdownItem.react").DropdownItem,{testid:void 0,action:i,icon:u.jsx(o("WAWebInfoRefreshedIcon.react").InfoRefreshedIcon,{}),children:s._(/*BTDS*/"Detalles de la empresa")},"merchantDetails"),l&&u.jsx(o("WAWebDropdownItem.react").DropdownItem,{testid:void 0,action:l,icon:u.jsx(o("WAWebSettingsRefreshedIcon.react").SettingsRefreshedIcon,{}),children:s._(/*BTDS*/"Ajustes")}),t!=null&&u.jsx(r("WAWebAdCreationDropdownItem.react"),{adCreationUrlInput:t.adCreationUrlInput,ctaText:t.ctaText,lwiEntryPoint:o("WAWebWamEnumLwiEntryPoint").LWI_ENTRY_POINT.SMB_CATALOG_LIST_ADVERTISE_MENU_ITEM})]});return m?u.jsx(r("WDSMenuBarItem.react"),{ref:d,testid:void 0,icon:o("WAWebMoreRefreshedIcon.react").MoreRefreshedIcon,title:s._(/*BTDS*/"Men\u00fa"),dropdownMenu:{menu:p,type:o("WAWebDropdown.react").MenuType.DropdownMenu,dirX:o("WAWebDropdown.react").DirX.LEFT,flipOnRTL:!0}}):u.jsx(o("WAWebMenuBar.react").MenuBarItem,{ref:d,testid:void 0,icon:u.jsx(o("WAWebMoreRefreshedIcon.react").MoreRefreshedIcon,{}),title:s._(/*BTDS*/"Men\u00fa"),dropdownMenu:{menu:p,type:o("WAWebDropdown.react").MenuType.DropdownMenu,dirX:o("WAWebDropdown.react").DirX.LEFT,flipOnRTL:!0}})}return m?u.jsx(r("WDSMenuBarItem.react"),{ref:d,testid:void 0,icon:o("WAWebLinkRefreshedIcon.react").LinkRefreshedIcon,title:s._(/*BTDS*/"Enlace al cat\u00e1logo"),onClick:c,tabOrder:o("WAWebTabOrder").TAB_ORDER.CHATLIST_HEADER}):u.jsx(o("WAWebMenuBar.react").MenuBarItem,{ref:d,testid:void 0,icon:u.jsx(o("WAWebLinkRefreshedIcon.react").LinkRefreshedIcon,{}),title:s._(/*BTDS*/"Enlace al cat\u00e1logo"),onClick:c,tabOrder:o("WAWebTabOrder").TAB_ORDER.CHATLIST_HEADER})}c.displayName=c.name+" [from "+i.id+"]";function d(e){var t=e.boostMenuOptionInput,n=e.canManageCatalog,a=e.cartCount,i=e.catalogId,l=e.onCartClick,s=e.onOpenCollections,d=e.onOpenMerchantDetailsForm,m=e.onOpenSettings,p=e.onSendCatalog,_;if(i!=null){var f,g=o("WAWebWidFactory").createWid(i),h=((f=o("WAWebUserPrefsMeUser").getMePnUserOrThrow())==null?void 0:f.equals(g))===!0;_=!h&&l?u.jsx(r("WAWebCommonCartIconMenuBarItem.react"),{cartCountText:o("WATypeUtils").isNumber(a)&&a>0?a.toString():void 0,onClick:l,catalogOwnerJid:i}):null}var y=u.jsx(c,{canManageCatalog:n,onSendCatalog:p,onOpenCollections:s,onOpenMerchantDetailsForm:d,onOpenSettings:m,boostMenuOptionInput:t});return[_,y]}l.getCatalogDrawerMenu=d}),226); __d("WAWebProductCatalogCatalogDrawerSection.react",["fbt","WAWebButton.react","WAWebChevronIcon.react","WAWebDrawerContext","WAWebDrawerSection.react","WAWebFbshopsIcon.react","WAWebFlex.react","WAWebFlexItem.react","WAWebMediaGalleryView.react","WAWebProductCatalogContext","WAWebProductCatalogLogEvents","WAWebProductCatalogProductThumb.react","WAWebProductCollection","WAWebStateUtils","WAWebUnstyledButton.react","react","vulture"],(function(t,n,r,o,a,i,l,s){var e,u,c=u||(u=o("react")),d=e||(e=r("react")),m=c.useContext,p=c.useEffect,_=3,f={addIcon:{position:"x1n2onr6",width:"xa1il55",height:"xqtp20y",paddingBottom:"x85gtzv",marginTop:"xdj266r",marginInlineEnd:"xqf2s3x",marginBottom:"xefnzgg",marginInlineStart:"x1lziwak",borderTopWidth:"x178xt8z",borderInlineEndWidth:"x1lun4ml",borderBottomWidth:"xso031l",borderInlineStartWidth:"xpilrb4",borderTopStyle:"x13fuv20",borderInlineEndStyle:"x18b5jzi",borderBottomStyle:"x1q0q8m5",borderInlineStartStyle:"x1t7ytsu",borderTopColor:"x1vynwtf",borderInlineEndColor:"xxmg6um",borderBottomColor:"x1j5b3ru",borderInlineStartColor:"x1mov0ff",borderStartStartRadius:"xrxyp3c",borderStartEndRadius:"xv0oops",borderEndEndRadius:"x1isl5vh",borderEndStartRadius:"xn8zj9a","::before_position":"x1hmns74","::before_top":"x1knuo7r","::before_left":"xgdch9p","::before_insetInlineStart":null,"::before_insetInlineEnd":null,"::before_display":"x1fgarty","::before_width":"x1j6c3ea","::before_height":"xv7f310","::before_content":"x1cpjm7i","::before_background":"x1qncxzq","::before_transform":"xbnewub","::after_position":"x1j6awrg","::after_top":"xoqv437","::after_left":"x16v8oms","::after_insetInlineStart":null,"::after_insetInlineEnd":null,"::after_display":"xhkezso","::after_width":"xqysinb","::after_height":"x6giem4","::after_content":"x1s928wv","::after_background":"x1hcy2ng","::after_transform":"x128ww4c",$$css:!0},largeGallerySpacing:{width:"x1anfit2",height:"xqtp20y",marginInlineEnd:"x14z9mp",marginBottom:"x14owe82",$$css:!0},placeholderThumb:{width:"xa1il55",height:"xdox8uz",paddingBottom:"x1ghzhde",marginTop:"xdj266r",marginInlineEnd:"xqf2s3x",marginBottom:"xefnzgg",marginInlineStart:"x1lziwak",backgroundColor:"xhub2e1",borderStartStartRadius:"xrxyp3c",borderStartEndRadius:"xv0oops",borderEndEndRadius:"x1isl5vh",borderEndStartRadius:"xn8zj9a",$$css:!0},subtitle:{marginTop:"xdj266r",marginInlineEnd:"xf6vk7d",marginBottom:"xat24cr",marginInlineStart:"x1lziwak",fontSize:"x1f6kntn",color:"x1anpt5t",$$css:!0},chevron:{color:"xhslqc4",$$css:!0}};function g(e){var t=e.catalogEntryLabel,n=e.onClick;return t==null?null:d.jsx("div",{className:"x1k70j0n x14z9mp xat24cr x1lziwak x2b8uid",children:d.jsx(o("WAWebButton.react").Button,{testid:void 0,type:"secondary",onClick:n,children:t})})}g.displayName=g.name+" [from "+i.id+"]";function h(){return r("vulture")("6o3eqfKJBJ6dUqeW3Ia2sjaYDA4="),d.jsx("div",{className:"xav9cv8 x2b8uid",children:d.jsx(o("WAWebFbshopsIcon.react").FbshopsIcon,{displayInline:!0})})}h.displayName=h.name+" [from "+i.id+"]";function y(e){var t=e.catalog,n=e.filterProductId,a=e.hideIncompleteRows,i=e.onProductImageClick,l=e.onProductThumbClick,u=e.productsToShow,c=e.seeMoreOverlay,m=e.showProductPlaceholders,p,g,h=u;if(t!=null){g=t.productCollection;var y=t.productCollection.getProductModels();a&&y.length>_&&(h=Math.min(u,y.length-y.length%_)),p=y.slice(0,h+1).filter(function(e){var t=e.id.toString();return t!==n}).map(function(e,n){var r,a=(r=e.getPreviewImage())==null?void 0:r.mediaData;if(!a)return d.jsx(d.Fragment,{});var i;c===!0&&n===h-1&&t.productCollection.length>h-1&&(i=s._(/*BTDS*/"Ver m\u00e1s"));var u=d.jsx(o("WAWebProductCatalogProductThumb.react").ProductThumb,{onClick:function(){return l(i!=null,e)},mediaData:a,overlayContent:i,theme:"largeGallerySpacing"},e.id.toString());return u}).slice(0,h)}else g=new(o("WAWebProductCollection")).ProductCollection,g.add({id:"_ph"});if((p==null||p.length===0)&&m!==!0)return null;var C=f.addIcon,b=[];if(m===!0)for(var v=(S=(R=p)==null?void 0:R.length)!=null?S:0;v0?t.toString():void 0,onClick:i,catalogOwnerJid:n}):null;return[p,u.jsx(o("WAWebMenuBar.react").MenuBarItem,{testid:void 0,icon:u.jsx(o("WAWebLinkRefreshedIcon.react").LinkRefreshedIcon,{}),title:s._(/*BTDS*/"Enlace al producto"),onClick:l},"link"),u.jsx(o("WAWebMenuBar.react").MenuBarItem,{testid:void 0,icon:u.jsx(o("WAWebMoreRefreshedIcon.react").MoreRefreshedIcon,{}),title:s._(/*BTDS*/"Men\u00fa"),dropdownMenu:{menu:u.jsxs(u.Fragment,{children:[u.jsx(o("WAWebDropdownItem.react").DropdownItem,{testid:void 0,action:m,icon:u.jsx(o("WAWebChatRefreshedIcon.react").ChatRefreshedIcon,{}),children:s._(/*BTDS*/"Enviar producto")}),o("WAWebBizGatingUtils").canSeeECommerceComplianceIndiaSoftEnforcement(a)&&u.jsx(o("WAWebDropdownItem.react").DropdownItem,{testid:void 0,action:c,icon:u.jsx(o("WAWebInfoRefreshedIcon.react").InfoRefreshedIcon,{}),children:s._(/*BTDS*/"M\u00e1s informaci\u00f3n")}),u.jsx(r("WAWebDropdownItemSeparator.react"),{}),u.jsx(o("WAWebDropdownItem.react").DropdownItem,{testid:void 0,action:d,icon:u.jsx(o("WAWebThumbsDownRefreshedIcon.react").ThumbsDownRefreshedIcon,{}),children:s._(/*BTDS*/"Reportar producto")})]}),type:o("WAWebDropdown.react").MenuType.DropdownMenu,dirX:o("WAWebDropdown.react").DirX.LEFT,flipOnRTL:!0}},"dropdown")]}l.getDetailDrawerMenu=c}),226); __d("WAWebProductCatalogFetchState",["WALogger","WAWebBackendErrors","WAWebMiscErrors"],(function(t,n,r,o,a,i,l){var e;function s(t,n){if(!(t instanceof o("WAWebMiscErrors").Unmount))if(t instanceof o("WAWebBackendErrors").ServerStatusCodeError)t.status==="not_found"||t.status===404?n("NOT_FOUND"):(n("ERROR"),o("WALogger").WARN(e||(e=babelHelpers.taggedTemplateLiteralLoose(["parseErrorState:Failed to fetch from server"]))));else throw n("ERROR"),t}l.parseErrorState=s}),98); __d("WAWebProductCatalogFetchStateTopBar.react",["fbt","WAWebSpinner.react","WAWebText.react","WAWebUISpacing","err","react","stylex"],(function(t,n,r,o,a,i,l,s){var e,u,c=e||(e=r("react")),d={loadingContainer:{position:"x10l6tqk",zIndex:"xa1v5g2",boxSizing:"x9f619",display:"x78zum5",alignItems:"x6s0dn4",justifyContent:"xl56j7k",width:"xh8yej3",backgroundColor:"x1280gxy",boxShadow:"x1499u3w",opacity:"x1hc1fzr",transitionDelay:"x1ojkfpl",transitionTimingFunction:"x9lcvmn",$$css:!0},text:{fontWeight:"xk50ysn",$$css:!0},loadingText:{color:"xxr6tci",$$css:!0}};function m(e){var t=e.fetchState;switch(t){case"NONE":case"SUCCESS":return null;case"PENDING":return c.jsxs("div",babelHelpers.extends({},(u||(u=r("stylex"))).props(d.loadingContainer,o("WAWebUISpacing").uiPadding.all8),{children:[c.jsx(o("WAWebSpinner.react").Spinner,{size:14,color:"highlight"}),c.jsx(o("WAWebText.react").WAWebTextSmall,{as:"span",xstyle:[d.text,o("WAWebUISpacing").uiMargin.horiz10,d.loadingText],children:s._(/*BTDS*/"Esperando red")})]}));case"TOKEN_RECOVERY_REQUIRED":case"NOT_FOUND":case"ERROR":return c.jsx("div",babelHelpers.extends({},(u||(u=r("stylex"))).props(d.loadingContainer,o("WAWebUISpacing").uiPadding.all8),{children:c.jsx(o("WAWebText.react").WAWebTextSmall,{as:"span",xstyle:[d.text,o("WAWebUISpacing").uiMargin.horiz10],color:"critical",children:t==="NOT_FOUND"?s._(/*BTDS*/"Se quit\u00f3 este producto o servicio"):s._(/*BTDS*/"Se produjo un error")})}));default:throw r("err")("invalid fetchState "+t)}}m.displayName=m.name+" [from "+i.id+"]",l.default=m}),226); __d("WAWebProductCatalogLinkIcon.react",["WAWebLinkRefreshedIcon.react","react"],(function(t,n,r,o,a,i,l){var e,s=e||(e=r("react")),u={linkIcon:{color:"xhslqc4",$$css:!0},inheritColor:{color:"x1heor9g",$$css:!0}};function c(e){var t=e.theme;return s.jsx(o("WAWebLinkRefreshedIcon.react").LinkRefreshedIcon,{xstyle:[u.linkIcon,t==="inherit-color"&&u.inheritColor]})}c.displayName=c.name+" [from "+i.id+"]",l.default=c}),98); __d("WAWebProductCatalogList.react",["WAWebDrawerContext","WAWebDrawerManager","WAWebFlatList.react","WAWebFlatListContainer.react","WAWebManageActions","WAWebProductCatalogCatalogConstants","WAWebProductCatalogContext","WAWebProductCatalogListItem.react","WAWebProductCatalogLogEvents","WAWebStateUtils","react","useWAWebModelValues"],(function(t,n,r,o,a,i,l){var e,s,u=s||(s=r("react")),c=(e||(e=o("react"))).useState,d=o("WAWebFlatList.react").FlatListFactory();function m(e){var t=e.canManageCatalog,n=e.onCartOpen,a=e.onProductDetail,i=e.onProductShare,l=e.shareLinks,s=c(void 0),m=s[0],p=s[1],_=o("useWAWebModelValues").useModelValues(e.catalog,["productCollection","afterCursor","id","index"]),f=function(t,n){return o("WAWebProductCatalogLogEvents").logCatalogListDetailClick({product:o("WAWebStateUtils").unproxy(t),catalogContext:n}),p(t.id.toString()),a(t)},g=function(t){i&&i(t)},h=function(t,n){o("WAWebManageActions").handleProductDelete(_,t,n,"Catalog").then(function(e){t.id===m&&(o("WAWebDrawerManager").DrawerManager.closeDrawerMid(),p(void 0))})},y=function(t,n){o("WAWebManageActions").handleProductVisibilityChange(_,t,n,"Catalog")},C=function(){var e=n!==void 0,r=_.productCollection.getProductModels(t);return r.map(function(t){return{itemKey:t.id.toString()+"_"+e.toString(),product:t}})};return!_.productCollection||!_.productCollection.getProductModels(e.canManageCatalog).length?null:u.jsx(r("WAWebFlatListContainer.react"),{flatListControllers:[e.flatListController],children:u.jsx(d,{flatListController:e.flatListController,direction:"vertical",forceConsistentRenderCount:!1,data:C(),renderItem:function(a){var e=a.product;return u.jsx(o("WAWebDrawerContext").DrawerContext.Consumer,{children:function(i){var a=o("WAWebProductCatalogContext").getProductCatalogContext(i);return u.jsx(r("WAWebProductCatalogListItem.react"),{product:e,onCartOpen:n,onClick:function(){return f(e,a)},onProductShare:l?g:null,onProductDelete:function(t){return h(t,a)},onProductHideShow:function(t){return y(t,a)},canManageCatalog:t})}})},defaultItemHeight:o("WAWebProductCatalogCatalogConstants").PRODUCT_LIST_ITEM_HEIGHT})})}m.displayName=m.name+" [from "+i.id+"]",l.default=m}),98); __d("WAWebProductDetailsInfoVariantsHelper",["isStringNullOrEmpty"],(function(t,n,r,o,a,i,l){function e(e){var t,n,o,a,i,l=e.variantInfo;if(l==null)return null;var s=(t=l.availability)==null?void 0:t.listing;if(s==null)return null;var u=(n=l.types)==null?void 0:n[0],c=(o=l.types)==null?void 0:o[1];if(u==null)return null;var d=new Map,m=new Map;(a=u.options)==null||a.forEach(function(e){r("isStringNullOrEmpty")(e.value)||d.set(e.value,!1)}),c==null||(i=c.options)==null||i.forEach(function(e){r("isStringNullOrEmpty")(e.value)||m.set(e.value,!1)});var p=new Map,_=new Map;s.forEach(function(e){var t=e.options||[],n=t.find(function(e){return e.name===u.name}),r=c?t.find(function(e){return e.name===c.name}):null,o=n==null?void 0:n.value,a=r==null?void 0:r.value;if(o!=null&&(d.set(o,!0),e.is_available===!0)){if(a!=null&&m.set(a,!0),c!=null&&a!=null){var i=p.get(o);i==null&&(i=new Map,p.set(o,i)),i.set(a,e)}_.set(o,e)}});var f=Array.from(d.entries()).filter(function(e){var t=e[0],n=e[1];return n}).map(function(e){var t=e[0];return t}),g=Array.from(m.entries()).filter(function(e){var t=e[0],n=e[1];return n}).map(function(e){var t=e[0];return t});return{firstType:u.name,secondType:c==null?void 0:c.name,firstTypeExistingOptions:f,secondTypeExistingOptions:g,firstTypeAvailableOptions:_,secondTypeAvailableOptions:p}}function s(e,t){var n,o;return r("isStringNullOrEmpty")(e)?[]:Array.from((n=(o=t.get(e))==null?void 0:o.keys())!=null?n:[])}function u(e,t){var n=s(e,t);return n.length>0?n[0]:null}l.catalogVariantOptionsList=e,l.getSecondTypeAvailableOptionsForSelectedFirstType=s,l.selectDefaultSecondOption=u}),98); __d("WAWebProductDetailsInfoVariants.react",["fbt","WAWebCatalogVariantHelper","WAWebDropdownV2.react","WAWebFlex.react","WAWebProductDetailsInfoVariantsHelper","WAWebSelectButton.react","WAWebSelectMenuItem.react","WAWebText.react","WAWebToast.react","WAWebToastManager","WAWebUISpacing","WAWebUnstyledButton.react","WDSText.react","react"],(function(t,n,r,o,a,i,l,s){var e,u,c=u||(u=r("react")),d=(e||(e=o("react"))).useState,m=6,p={filterRefreshed:{borderStartStartRadius:"xtf1z3e",borderStartEndRadius:"x18i4vdl",borderEndEndRadius:"x17ka9pb",borderEndStartRadius:"xaozknv",backgroundColor:"x1h3rtpe",boxShadow:"x1hdfv4t",$$css:!0},filterHoverRefreshed:{":hover_backgroundColor":"x1nsvvxn",$$css:!0},selectedRefreshed:{backgroundColor:"x1j3esqa",$$css:!0},optionsContainer:{marginTop:"x14vqqas",marginBottom:"xod5an3",$$css:!0},variantsList:{overflowX:"xw2csxc",overflowY:"x1odjw0f",$$css:!0}};function _(e){var t,n=e.disabled,a=e.onSelect,i=e.option,l=e.selected,s=[(t=o("WAWebUISpacing")).uiMargin.end8,t.uiPadding.vert4,t.uiMargin.top10,t.uiPadding.horiz12,p.filterRefreshed,l?p.selectedRefreshed:p.filterHoverRefreshed],u="wdsContentDefault";return n?u="wdsContentDisabled":l&&(u="teal"),c.jsx(r("WAWebUnstyledButton.react"),{role:"option",tabIndex:l?0:-1,"aria-label":i,"aria-selected":l,onClick:function(){return a(i)},xstyle:s,disabled:n,children:c.jsx(o("WAWebText.react").WAWebTextSmall,{weight:l?"medium":"normal",color:u,children:i})})}_.displayName=_.name+" [from "+i.id+"]";function f(e){var t=e.isOptionDisabled,n=e.onOptionSelect,a=e.options,i=e.selectedOption,l=c.createRef();return a.length>=m?c.jsx(o("WAWebFlex.react").FlexRow,{xstyle:o("WAWebUISpacing").uiMargin.top10,children:c.jsx(o("WAWebSelectButton.react").SelectButton,{ref:l,ariaRoleDescription:i!=null?i:"",label:i,width:150,testid:void 0,children:c.jsx(o("WAWebDropdownV2.react").DropdownV2Menu,{target:l,position:o("WAWebDropdownV2.react").PopoverPosition.Start,minWidth:150,maxHeight:268,xstyle:p.variantsList,alignment:o("WAWebDropdownV2.react").PopoverAlignment.Start,children:c.jsx(o("WAWebSelectMenuItem.react").SelectMenuItemGroup,{multiselect:!1,initialSelection:i,onSelect:n,children:a.map(function(e){var n=t(e);return c.jsx(o("WAWebSelectMenuItem.react").SelectMenuItem,{optionId:e,disabled:n,primary:c.jsx(r("WDSText.react"),{type:"Body2",colorName:n?"contentDisabled":"contentDefault",children:e})},e)})})})})}):c.jsx(o("WAWebFlex.react").FlexRow,{xstyle:o("WAWebUISpacing").uiMargin.top10,wrap:"wrap",children:a.map(function(e){return c.jsx(_,{option:e,selected:i===e,disabled:t(e),onSelect:n},e)})})}f.displayName=f.name+" [from "+i.id+"]";function g(e){var t,n,r,a=e.product,i=e.productChanged,l=d((t=a.variantInfo)==null||(t=t.variant_properties[0])==null?void 0:t.value),s=l[0],u=l[1],m=d((n=a.variantInfo)==null||(n=n.variant_properties[1])==null?void 0:n.value),_=m[0],g=m[1];if(!((r=a.variantInfo)!=null&&(r=r.variant_properties)!=null&&r.length))return null;var h=o("WAWebProductDetailsInfoVariantsHelper").catalogVariantOptionsList(a);if(h==null)return null;var y=h.firstType,C=h.firstTypeAvailableOptions,b=h.firstTypeExistingOptions,v=h.secondType,S=h.secondTypeAvailableOptions,R=h.secondTypeExistingOptions,L=function(t){if(u(t),R.length>0){var e=o("WAWebProductDetailsInfoVariantsHelper").getSecondTypeAvailableOptionsForSelectedFirstType(t,S);if(_!=null&&e.includes(_)){var n=k(t,_);n!=null&&i(n)}else{var r=o("WAWebProductDetailsInfoVariantsHelper").selectDefaultSecondOption(t,S);if(r!=null){g(r);var a=k(t,r);a!=null&&i(a)}}}else{var l=k(t);l!=null&&i(l)}},E=function(t){g(t);var e=k(s,t);e!=null&&i(e)},k=function(t,n){if(t==null)return null;if(n!=null){var e,r=(e=S.get(t))==null?void 0:e.get(n);return r==null?void 0:r.product_id}var o=C.get(t);return o==null?void 0:o.product_id},I=function(t){if(R.length>0){var e=o("WAWebProductDetailsInfoVariantsHelper").getSecondTypeAvailableOptionsForSelectedFirstType(t,S);return e.length===0}return!C.has(t)},T=function(t){var e=o("WAWebProductDetailsInfoVariantsHelper").getSecondTypeAvailableOptionsForSelectedFirstType(s,S);return!e.includes(t)};return c.jsxs(o("WAWebFlex.react").FlexColumn,{gap:16,xstyle:p.optionsContainer,children:[y!=null&&b.length>0&&c.jsxs(o("WAWebFlex.react").FlexColumn,{children:[c.jsx(o("WAWebText.react").WAWebTextTitle,{color:"wdsContentDeemphasized",children:o("WAWebCatalogVariantHelper").getVariantTypeOptions(y)}),c.jsx(f,{options:b,selectedOption:s,isOptionDisabled:I,onOptionSelect:L})]}),v!=null&&R.length>0&&c.jsxs(o("WAWebFlex.react").FlexColumn,{children:[c.jsx(o("WAWebText.react").WAWebTextTitle,{color:"wdsContentDeemphasized",children:o("WAWebCatalogVariantHelper").getVariantTypeOptions(v)}),c.jsx(f,{options:R,selectedOption:_,isOptionDisabled:T,onOptionSelect:E})]})]})}g.displayName=g.name+" [from "+i.id+"]";var h=function(){o("WAWebToastManager").ToastManager.open(c.jsx(o("WAWebToast.react").Toast,{msg:s._(/*BTDS*/"No se pudo cargar el producto del cat\u00e1logo para la opci\u00f3n seleccionada.")}))};l.ProductCatalogDetailsInfoVariants=g,l.showProductChangeErrorToast=h}),226); __d("WAWebProductCatalogProductDetailsInfo.react",["fbt","WALogger","WAWebAddToCartIcon.react","WAWebBizGatingUtils","WAWebBizGetProductQuantityCartAction","WAWebButton.react","WAWebCartQuantityControls.react","WAWebConstantsDeprecated","WAWebDrawerContext","WAWebDrawerSection.react","WAWebEmojiText.react","WAWebExternalLink.react","WAWebFormatConfiguration","WAWebLinkify","WAWebManageCart","WAWebProductCatalogCheckCartEnabled","WAWebProductCatalogContext","WAWebProductCatalogLogEvents","WAWebProductCatalogProductPriceInfoText.react","WAWebProductCollection","WAWebProductDetailsInfoVariants.react","WAWebProductTypes.flow","WAWebQplQuickPerformanceLoggerMarkerIds","WAWebQplQuickPerformanceLoggerModule","WAWebStateUtils","WAWebStopEvent","WAWebText.react","WAWebText_DONOTUSE.react","WAWebUISpacing","WAWebUserPrefsMeUser","isStringNullOrEmpty","react","stylex","useHoverState","useWAWebModelValues"],(function(t,n,r,o,a,i,l,s){var e,u,c,d,m=d||(d=o("react")),p=u||(u=r("react")),_=m.useContext,f=m.useEffect,g=m.useState,h={addToCartIconDisabled:{color:"xhslqc4",":hover_color":"x12ln5q2",$$css:!0},addToCartIcon:{color:"xo1mcw5",":hover_color":"xyla9g4",$$css:!0},addToCartBtnHoverIcon:{color:"xk4n5i7",":hover_color":"xfrlarv",$$css:!0},buttonContainer:{display:"x78zum5",textAlign:"x2b8uid",$$css:!0},description:{overflowX:"x6ikm8r",overflowY:"x10wlt62",wordWrap:"x1vvkbs",$$css:!0},name:{fontWeight:"xk50ysn",wordWrap:"x1vvkbs",$$css:!0}};function y(e){var t=e.isAvailable,n=e.onSendChat,a=e.product,i=o("WAWebUserPrefsMeUser").isMeUser(a.catalogWid);if(i||!n||!a.fetchedFromServer||!t||a.reviewStatus!==o("WAWebProductCollection").PRODUCT_REVIEW_STATUS.APPROVED)return null;var l=s._(/*BTDS*/"Enviar mensaje a la empresa");return p.jsx("div",babelHelpers.extends({},(c||(c=r("stylex"))).props([h.buttonContainer,o("WAWebUISpacing").uiMargin.bottom8]),{title:l,children:p.jsx(o("WAWebButton.react").Button,{testid:void 0,onClick:n,type:"secondary",stretch:!0,children:l})}))}y.displayName=y.name+" [from "+i.id+"]";function C(e){var t=e.cartEnabled,n=e.collectionId,a=e.context,i=e.isAvailable,l=e.onClick,u=e.product,c=r("useHoverState")(),d=c.isHovered,m=c.onMouseEnter,_=c.onMouseLeave,f=o("WAWebUserPrefsMeUser").isMeUser(u.catalogWid);if(f||!t||!u.fetchedFromServer||!i||u.reviewStatus!==o("WAWebProductCollection").PRODUCT_REVIEW_STATUS.APPROVED)return null;var g=o("WAWebBizGatingUtils").isQuantityControlsFeatureEnabled(),y=s._(/*BTDS*/"A\u00f1adir al carrito"),C=o("WAWebProductTypes.flow").PRODUCT_AVAILABILITY_UNAVAILABLE_VALUES.includes(u.availability),b=null;C?b=h.addToCartIconDisabled:d?b=h.addToCartBtnHoverIcon:b=h.addToCartIcon;var v=r("WAWebBizGetProductQuantityCartAction")(u.id,u.catalogWid),S=g?null:p.jsx(r("WAWebAddToCartIcon.react"),{colorXStyle:b}),R=g&&v>0?p.jsx(o("WAWebCartQuantityControls.react").WAWebCartQuantityControls,{product:u,context:a,collectionId:n||""}):p.jsx(o("WAWebButton.react").Button,{testid:void 0,onClick:l,type:"secondary",disabled:C,stretch:!0,children:p.jsxs("span",babelHelpers.extends({},{0:{className:"x78zum5 x6s0dn4 x1o2pa38"},1:{className:"x78zum5 x6s0dn4 x1o2pa38 x1rdy4ex x14z9mp x4vbgl9 x1lziwak"}}[!!S<<0],{children:[S,y]}))});return p.jsx("div",babelHelpers.extends({},{0:{className:"x78zum5 x2b8uid"},1:{className:"x78zum5 x2b8uid xl56j7k xhrpt6u xat24cr"}}[!!g<<0],{title:y,onMouseEnter:m,onMouseLeave:_,children:R}))}C.displayName=C.name+" [from "+i.id+"]";function b(e){var t=e.isAvailable,n=e.onClick,a=e.product,i=a.url;if(!a.fetchedFromServer||r("isStringNullOrEmpty")(i)||!t)return null;var l=o("WAWebFormatConfiguration").TrustedGroupDesc({links:o("WAWebLinkify").findLinks(i)});return p.jsx("div",{children:p.jsx(o("WAWebEmojiText.react").EmojiText,{selectable:!0,formatters:l,text:i,onClick:function(t){return n(t,i)}})})}b.displayName=b.name+" [from "+i.id+"]";function v(e){var t=e.hideRetailerID,n=e.isAvailable,a=e.isDescExpanded,i=e.onClickUrl,l=e.onReadMore,u=e.product,d=!r("isStringNullOrEmpty")(u.description),m=!r("isStringNullOrEmpty")(u.retailerId),_=!r("isStringNullOrEmpty")(u.url);if(!d&&!_&&!m)return null;var f=u.description!=null&&u.description.length>r("WAWebConstantsDeprecated").GROUP_DESCRIPTION_INFO_PANEL_TRUNC_LENGTH,g=d?p.jsxs("div",{children:[p.jsx(o("WAWebEmojiText.react").EmojiText,{selectable:!0,multiline:!0,text:u.description,textLimit:a?1/0:r("WAWebConstantsDeprecated").GROUP_DESCRIPTION_INFO_PANEL_TRUNC_LENGTH}),f&&!a?p.jsxs("span",{className:"x1ph7ams",role:"button",onClick:l,children:[" ",s._(/*BTDS*/"Leer m\u00e1s")]}):null]}):null;return p.jsxs(o("WAWebText_DONOTUSE.react").TextDiv,{theme:"plain",className:(c||(c=r("stylex")))([h.description,o("WAWebUISpacing").uiMargin.bottom20]),children:[g,p.jsx(b,{isAvailable:n,product:u,onClick:i}),m&&!t?p.jsx("div",{children:p.jsx(o("WAWebEmojiText.react").EmojiText,{text:u.retailerId,selectable:!0,direction:"inherit"})}):null]})}v.displayName=v.name+" [from "+i.id+"]";function S(t){var n,a=t.collectionId,i=t.hideDescription,l=t.hideMessageBusinessButton,s=t.isAvailable,u=t.onAddToCart,d=t.onSendChat,m=_(o("WAWebDrawerContext").DrawerContext),b=o("useWAWebModelValues").useModelValues(t.product,["name","url","description","availability","currency","priceAmount1000","salePriceAmount1000","salePriceStartDate","salePriceEndDate","fetchedFromServer","retailerId","catalogWid","productImageCollection","imageHash","reviewStatus","imageCdnUrl","id","maxAvailable","variantInfo"]),S=g(!1),R=S[0],L=S[1],E=g(!1),k=E[0],I=E[1];f(function(){r("WAWebProductCatalogCheckCartEnabled")(b.catalogWid).then(function(e){I(e)}).catch(function(){o("WALogger").ERROR(e||(e=babelHelpers.taggedTemplateLiteralLoose(["[product-catalog] failed to check cart enabled"]))).sendLogs("failed-to-check-cart-enabled")})},[]);var T=function(){d==null||d()},D=function(t){o("WAWebQplQuickPerformanceLoggerModule").QPL.markerStart(o("WAWebQplQuickPerformanceLoggerMarkerIds").QuickLogMarkerId.WHATSAPP_CART_ADD,{annotations:{string:{EntryPoint:"Product"}}}),o("WAWebManageCart").addToCart(b,o("WAWebProductCatalogContext").getProductCatalogContext(m),a),u==null||u(),t.stopPropagation()},x=function(){L(!0)},$=function(t,n){o("WAWebStopEvent").stopEvent(t);var e=o("WAWebStateUtils").unproxy(b);o("WAWebProductCatalogLogEvents").logDetailLinkClick({product:e,catalogContext:o("WAWebProductCatalogContext").getProductCatalogContext(m)});var r=n?o("WAWebLinkify").findLink(n):null;if(r){var a=e.signedShimmedUrl!=null&&o("WAWebBizGatingUtils").isUsingSignedShimmedLinkInCatalogueEnabled()?e.signedShimmedUrl:null;o("WAWebExternalLink.react").openExternalLink(a!=null?a:r.url)}};return p.jsxs(r("WAWebDrawerSection.react"),{theme:"padding-product",animation:!1,children:[p.jsx(o("WAWebText.react").WAWebTextTitle,{xstyle:[h.name,o("WAWebUISpacing").uiMargin.bottom12],children:p.jsx(o("WAWebEmojiText.react").EmojiText,{text:b.name,selectable:!0})}),b.priceAmount1000!=null?p.jsx(o("WAWebText_DONOTUSE.react").TextDiv,{className:(c||(c=r("stylex")))(o("WAWebUISpacing").uiMargin.bottom12),color:"dark",theme:"plain",children:p.jsx(r("WAWebProductCatalogProductPriceInfoText.react"),{product:b,selectable:!0,direction:"inherit"})}):null,((n=b.variantInfo)==null||(n=n.availability)==null?void 0:n.listing)!=null&&o("WAWebBizGatingUtils").isCatalogVariantsViewingEnabled()&&p.jsx(o("WAWebProductDetailsInfoVariants.react").ProductCatalogDetailsInfoVariants,{product:b,productChanged:t.onProductChange}),!i&&p.jsx(v,{product:b,isAvailable:s,isDescExpanded:R,hideRetailerID:t.hideRetailerID===!0,onReadMore:x,onClickUrl:$}),!l&&p.jsx(y,{onSendChat:T,isAvailable:s,product:b}),p.jsx(C,{collectionId:a,cartEnabled:k,isAvailable:s,product:b,onClick:D,context:m})]})}S.displayName=S.name+" [from "+i.id+"]",l.default=S}),226); __d("WAWebProductCollectionCatalogPostcodeChangeModal",["fbt","$InternalEnum","WALogger","WAWebBizVerifyPostcodeAction","WAWebConfirmPopup.react","WAWebExternalLink.react","WAWebFaqUrl","WAWebFbtCommon","WAWebRichTextField.react","WAWebText.react","WAWebText_DONOTUSE.react","asyncToGeneratorRuntime","react","useWAWebUnmountSignal"],(function(t,n,r,o,a,i,l,s){var e,u,c,d=c||(c=o("react")),m=u||(u=r("react")),p=d.useCallback,_=d.useState,f=n("$InternalEnum").Mirrored(["NOT_STARTED","COMPLETED","FAILED","IN_PROGRESS"]),g={infoText:{fontSize:"x1jchvi3",lineHeight:"xdod15v",marginBottom:"xcytdqz",$$css:!0},privacyText:{fontSize:"x1f6kntn",lineHeight:"x1d3mw78",marginTop:"x1de0gy",$$css:!0}};function h(t){var a,i,l=t.catalogId,u=t.existingPostcode,c=t.onCancel,d=t.onSuccess,h=r("useWAWebUnmountSignal")(),y=_({state:f.NOT_STARTED}),C=y[0],b=y[1],v=_(u),S=v[0],R=v[1],L=u===S,E=(function(){var t=n("asyncToGeneratorRuntime").asyncToGenerator(function*(){if(typeof S=="string"){b({state:f.IN_PROGRESS});try{var t=yield o("WAWebBizVerifyPostcodeAction").verifyPostcode(l,S);h.aborted||b({state:f.COMPLETED,data:t}),(t==null?void 0:t.resultCode)==="success"&&d()}catch(t){if(o("WALogger").ERROR(e||(e=babelHelpers.taggedTemplateLiteralLoose(["[direct-connection] Updating postcode failed ",""])),t).verbose().sendLogs("[direct-connection] Updating postcode failed"),h.aborted)return;b({state:f.FAILED})}}});return function(){return t.apply(this,arguments)}})(),k=p(function(){return b({state:f.NOT_STARTED})},[]),I=((a=C.data)==null?void 0:a.resultCode)==="unserviceable_location",T=function(t){k(),R(t)},D=null,x=s._(/*BTDS*/"Ingresa un c\u00f3digo postal v\u00e1lido.");(((i=C.data)==null?void 0:i.resultCode)==="invalid_postcode"||typeof S!="string"||S.length===0||S.search("^[0-9]{6}$")!==0)&&(D=x);var $=C.state===f.IN_PROGRESS,P=$||D!=null||L,N=function(){P||(I?k():E())},M=function(){N()};return m.jsx(o("WAWebConfirmPopup.react").ConfirmPopup,{onOK:N,title:I?null:s._(/*BTDS*/"Cambia el c\u00f3digo postal"),okDisabled:P,okSpinner:$,okText:I?r("WAWebFbtCommon")("OK"):s._(/*BTDS*/"CONTINUAR"),onCancel:I?null:c,cancelDisabled:$,children:I?m.jsx(o("WAWebText_DONOTUSE.react").Text,{as:"p",testid:void 0,children:s._(/*BTDS*/"JioMart no tiene art\u00edculos disponibles en esa \u00e1rea. Puedes probar con otro c\u00f3digo postal.")}):m.jsxs(m.Fragment,{children:[m.jsx(o("WAWebText_DONOTUSE.react").Text,{as:"p",xstyle:g.infoText,children:s._(/*BTDS*/"Para ver los art\u00edculos de JioMart disponibles en otra \u00e1rea, ingresa el c\u00f3digo postal correspondiente.")}),m.jsx(o("WAWebRichTextField.react").RichTextField,{testid:void 0,onChange:function(t){var e=t.text;return T(e)},value:S,managed:!0,editable:!$,managedError:!0,selectOnMount:!0,focusOnMount:!0,error:D,onEnter:M}),m.jsxs(o("WAWebText.react").WAWebTextMuted,{as:"p",xstyle:g.privacyText,children:[s._(/*BTDS*/"Si contin\u00faas, aceptas compartir tu c\u00f3digo postal y tu n\u00famero de tel\u00e9fono con JioMart. Solo JioMart puede ver tu c\u00f3digo postal.")," ",m.jsx(o("WAWebExternalLink.react").ExternalLink,{href:o("WAWebFaqUrl").getJioMartPostcodeChangeLearnMoreLink(),children:s._(/*BTDS*/"M\u00e1s informaci\u00f3n")})]})]})})}h.displayName=h.name+" [from "+i.id+"]",l.default=h}),226); __d("WAWebProductCatalogProductPostcodeChangeBanner",["fbt","WALogger","WAWebBusinessDirectConnectionCollection","WAWebClickableLink.react","WAWebModalManager","WAWebProductCollectionCatalogPostcodeChangeModal","asyncToGeneratorRuntime","react","useBoolean","useWAWebModelValues","useWAWebUnmountSignal","vulture"],(function(t,n,r,o,a,i,l,s){var e,u,c,d=c||(c=o("react")),m=u||(u=r("react")),p=d.useEffect,_=d.useState;function f(e){var t=e.postcode,n=e.catalogWid,a=e.postcodeChangeSuccess;r("vulture")("rTXq1nkKsRPidRYfvGGAQTp-0N4=");var i=function(){o("WAWebModalManager").ModalManager.open(m.jsx(r("WAWebProductCollectionCatalogPostcodeChangeModal"),{existingPostcode:t,catalogId:n,onCancel:o("WAWebModalManager").closeModalManager,onSuccess:function(){o("WAWebModalManager").ModalManager.close(),a()}}))};return m.jsx(r("WAWebClickableLink.react"),{onClick:i,children:s._(/*BTDS*/"Cambiar")})}f.displayName=f.name+" [from "+i.id+"]";function g(e){var t=e.businessDirectConnection,n=e.catalogWid,a=e.postcodeChangeSuccess;r("vulture")("NWZLY-Rha4wcV7i4WRRd5Q8-uCE=");var i=o("useWAWebModelValues").useModelValues(t,["postcode"]),l=i.postcode;return l==null?null:m.jsxs(m.Fragment,{children:[s._(/*BTDS*/"No est\u00e1 disponible en {area-postcode}.",[s._param("area-postcode",l)]),"\xA0",m.jsx(f,{postcode:l,catalogWid:n,postcodeChangeSuccess:a})]})}g.displayName=g.name+" [from "+i.id+"]";function h(t){r("vulture")("ARk_zMsOVUKLGZzSCD0L_VSqzOw=");var a=t.catalogWid,i=t.postcodeChangeSuccess,l=_(null),s=l[0],u=l[1],c=r("useBoolean")(!0),d=c.set,f=c.value,h=r("useWAWebUnmountSignal")();return p(function(){var t=(function(){var t=n("asyncToGeneratorRuntime").asyncToGenerator(function*(){try{var t=yield r("WAWebBusinessDirectConnectionCollection").getCypher(a);if(h.aborted)return;u(t)}catch(t){o("WALogger").ERROR(e||(e=babelHelpers.taggedTemplateLiteralLoose(["[direct-connection] Setting cypher failed in PDP ",""])),t).verbose().sendLogs("direct-connection-setting-cypher-failed-in-pdp")}h.aborted||d(!1)});return function(){return t.apply(this,arguments)}})();t()},[a,d,h]),f||s==null?null:m.jsx(g,{businessDirectConnection:s,catalogWid:a,postcodeChangeSuccess:i})}h.displayName=h.name+" [from "+i.id+"]",l.default=h}),226); __d("WAWebProductCatalogProductTile.react",["WAWebBizGatingUtils","WAWebCmd","WAWebDrawerContext","WAWebImageCarousel.react","WAWebProductCatalogContext","WAWebProductCatalogLogEvents","WAWebStateUtils","react","useWAWebModelValues"],(function(t,n,r,o,a,i,l){var e,s,u=s||(s=r("react")),c=(e||(e=o("react"))).useContext;function d(e){var t=e.fetching,n=e.isAvailable,a=c(o("WAWebDrawerContext").DrawerContext),i=o("useWAWebModelValues").useModelValues(e.product,["productImageCollection","productMsgMediaData","catalogWid","imageCdnUrl","videos"]),l=function(t,n){o("WAWebProductCatalogLogEvents").logDetailImageClick({product:o("WAWebStateUtils").unproxy(i),catalogContext:o("WAWebProductCatalogContext").getProductCatalogContext(a)});var e=function(){return t},r={activeProductImage:n,productImageCollection:i.lazyloadProductImageCollection(),getZoomNode:e,product:i};o("WAWebCmd").Cmd.productImageViewerModal(r,o("WAWebProductCatalogContext").getProductCatalogSessionId(a))},s=i.lazyloadProductImageCollection().toArray(),d=i.videos!=null&&!o("WAWebBizGatingUtils").isCatalogVideoViewEnabled()&&o("WAWebBizGatingUtils").isCatalogVideoViewFallbackEnabled();return u.jsx("div",{className:"xh8yej3",children:u.jsx(r("WAWebImageCarousel.react"),{images:s,fetching:t,onClick:n?l:null,renderFallback:!n,fallbackMediaData:i.productMsgMediaData,showUnsupportedVideoPlaceholder:d})})}d.displayName=d.name+" [from "+i.id+"]",l.default=d}),98); __d("WAWebProductCatalogReportProductChoicePopup.react",["fbt","WAWebButton.react","WAWebKeyboardHotKeys.react","WAWebModal.react","WAWebUISpacing","react","stylex"],(function(t,n,r,o,a,i,l,s){var e=["ref"],u,c,d=u||(u=r("react"));function m(t){var n=t.ref,a=babelHelpers.objectWithoutPropertiesLoose(t,e),i=a.onPopupCancel,l=a.onReport,u=s._(/*BTDS*/"\u00bfDeseas reportar este producto?"),m=d.jsx("div",{children:s._(/*BTDS*/"Revisaremos el producto y, si no cumple con nuestros lineamientos, se quitar\u00e1.")},"ReportProductChoicePopup-desc"),p=d.jsx(o("WAWebButton.react").Button,{testid:void 0,type:"secondary",onClick:l,children:s._(/*BTDS*/"Reportar producto")},"ReportProductChoicePopup-reportBtn"),_=d.jsx(o("WAWebButton.react").Button,{type:"secondary",onClick:i,children:s._(/*BTDS*/"Cancelar")},0),f={escape:i},g=d.jsxs("div",{className:"x78zum5 xdt5ytf",children:[d.jsx("div",babelHelpers.extends({},(c||(c=r("stylex"))).props(o("WAWebUISpacing").uiMargin.top4),{children:p})),d.jsx("div",babelHelpers.extends({},c.props(o("WAWebUISpacing").uiMargin.top4),{children:_}))]});return d.jsx(o("WAWebKeyboardHotKeys.react").HotKeys,{ref:n,handlers:f,children:d.jsx(o("WAWebModal.react").Modal,{title:u,actions:g,children:m})})}m.displayName=m.name+" [from "+i.id+"]",l.default=m}),226); __d("WAWebProductCatalogReportProductReasonPopup.react",["fbt","WAWebButton.react","WAWebKeyboardHotKeys.react","WAWebModal.react","WAWebRadio.react","WAWebToast.react","WAWebToastManager","react"],(function(t,n,r,o,a,i,l,s){var e=["ref"],u,c,d=c||(c=r("react")),m=(u||(u=o("react"))).useState,p={ILLEGAL:"ILLEGAL",KNOCKOFF:"KNOCKOFF",NO_MATCH:"NO_MATCH",OTHER:"OTHER",SCAM:"SCAM",SPAM:"SPAM"},_=[p.NO_MATCH,p.SPAM,p.ILLEGAL,p.SCAM,p.KNOCKOFF,p.OTHER];function f(t){var n=t.ref,r=babelHelpers.objectWithoutPropertiesLoose(t,e),a=r.onCancel,i=r.onTellUsMoreSubmit,l=m(null),u=l[0],c=l[1],p=function(){a==null||a()},f=function(t){c(t)},h=function(){o("WAWebToastManager").ToastManager.open(d.jsx(o("WAWebToast.react").Toast,{msg:s._(/*BTDS*/"Por favor, selecciona una raz\u00f3n.")}))},y=function(){if(u==null||!_.includes(u))return h();i(u)},C=s._(/*BTDS*/"Cu\u00e9ntanos m\u00e1s"),b=d.jsx("div",{className:"x78zum5",children:d.jsx("ul",{className:"x1n2onr6 x98rzlu",children:_.map(function(e){return d.jsx("li",{children:d.jsx(o("WAWebRadio.react").RadioWithLabel,{name:e,value:e,label:d.jsx(g,{reason:e}),checked:u===e,onChange:function(){return f(e)}})},"ReportProductReasonPopup-"+e+"-option")})})}),v=d.jsx(o("WAWebButton.react").Button,{testid:void 0,type:"primary",onClick:y,disabled:!u,children:s._(/*BTDS*/"Enviar")},"ReportProductReasonPopup-submitButton"),S=d.jsx(o("WAWebButton.react").Button,{type:"secondary",testid:void 0,onClick:p,children:s._(/*BTDS*/"Cancelar")},"ReportProductReasonPopup-cancelButton"),R={escape:p},L=d.jsxs("div",{className:"x78zum5 x1s70e7g",children:[S,v]});return d.jsx(o("WAWebKeyboardHotKeys.react").HotKeys,{ref:n,handlers:R,children:d.jsx(o("WAWebModal.react").Modal,{title:C,actions:L,children:b})})}f.displayName=f.name+" [from "+i.id+"]";function g(e){var t=e.reason;switch(t){case"NO_MATCH":return s._(/*BTDS*/"Las fotos o descripciones no coinciden con el art\u00edculo");case"SPAM":return s._(/*BTDS*/"Es spam");case"ILLEGAL":return s._(/*BTDS*/"Es abusivo, da\u00f1ino o ilegal");case"SCAM":return s._(/*BTDS*/"Es un fraude o una estafa");case"KNOCKOFF":return s._(/*BTDS*/"Parece ser una copia o un art\u00edculo falsificado");case"OTHER":return s._(/*BTDS*/"Otro")}}g.displayName=g.name+" [from "+i.id+"]",l.default=f}),226); __d("WAWebProductCatalogReportProductFlow",["fbt","$InternalEnum","WALogger","WAQplTypes","WAWebActionToast.react","WAWebBizProductCatalogAction","WAWebProductCatalogLogEvents","WAWebProductCatalogReportProductChoicePopup.react","WAWebProductCatalogReportProductReasonPopup.react","WAWebQplQuickPerformanceLoggerMarkerIds","WAWebQplQuickPerformanceLoggerModule","WAWebStateUtils","WAWebToastManager","react","useWAWebFlow"],(function(t,n,r,o,a,i,l,s){var e,u,c=u||(u=r("react")),d=n("$InternalEnum").Mirrored(["ReportProductChoice","TellUsMore"]);function m(t){var n=o("useWAWebFlow").useFlow(d.ReportProductChoice),a=n[0],i=n[1];if(i.step==null)return null;var l=function(n){var e=t.product;return o("WAWebBizProductCatalogAction").reportProduct(e.catalogWid,e.id.toString(),n)},u=function(){i.end()},m=function(r,a){a===void 0&&(a=o("WAWebActionToast.react").genId());var n=t.product,i=t.sessionId,d=l(r),p=new(o("WAWebActionToast.react")).ActionType(s._(/*BTDS*/"Reportando el producto")),_=d.then(function(){return o("WAWebProductCatalogLogEvents").logReportProductSuccess({product:o("WAWebStateUtils").unproxy(n),catalogSessionId:i,reason:r||""}),o("WAWebQplQuickPerformanceLoggerModule").QPL.markerEnd(o("WAWebQplQuickPerformanceLoggerMarkerIds").QuickLogMarkerId.WHATSAPP_PRODUCT_REPORT,o("WAQplTypes").QuickLogActionType.SUCCESS),new(o("WAWebActionToast.react")).ActionType(s._(/*BTDS*/"Gracias por tus comentarios").toString()+". "+s._(/*BTDS*/"Tu reporte se envi\u00f3 con \u00e9xito.").toString())}).catch(function(t){return o("WAWebProductCatalogLogEvents").logReportProductFailure({product:o("WAWebStateUtils").unproxy(n),catalogSessionId:i,reason:r||""}),o("WAWebQplQuickPerformanceLoggerModule").QPL.markerEnd(o("WAWebQplQuickPerformanceLoggerMarkerIds").QuickLogMarkerId.WHATSAPP_PRODUCT_REPORT,o("WAQplTypes").QuickLogActionType.FAIL),o("WALogger").WARN(e||(e=babelHelpers.taggedTemplateLiteralLoose(["error submitting product report"]))),new(o("WAWebActionToast.react")).ActionType(s._(/*BTDS*/"No se pudo reportar el producto"),{actionText:s._(/*BTDS*/"Reintentar"),actionHandler:function(){return m(r,a)}})});return o("WAWebToastManager").ToastManager.open(c.jsx(o("WAWebActionToast.react").ActionToast,{id:a,initialAction:p,pendingAction:_})),u(),d},p=function(){i.push(d.TellUsMore)},_=function(t){o("WAWebQplQuickPerformanceLoggerModule").QPL.markerStart(o("WAWebQplQuickPerformanceLoggerMarkerIds").QuickLogMarkerId.WHATSAPP_PRODUCT_REPORT),m(t)},f=null;switch(i.step){case d.ReportProductChoice:f=c.jsx(r("WAWebProductCatalogReportProductChoicePopup.react"),{onReport:p,onPopupCancel:u,onCancel:u});break;case d.TellUsMore:f=c.jsx(r("WAWebProductCatalogReportProductReasonPopup.react"),{onTellUsMoreSubmit:_,onCancel:u});break}return c.jsx(a,{flow:i,children:f})}m.displayName=m.name+" [from "+i.id+"]",l.default=m}),226); __d("WAWebProductCatalogProductDetailsDrawer.react",["fbt","Promise","WAAbortError","WAFilteredCatch","WALogger","WAQplTypes","WATimeUtils","WAWebBackendErrors","WAWebBizGatingUtils","WAWebBizProductCatalogAction","WAWebBusinessProfileCollection","WAWebBusinessProfileUtils","WAWebCartCollection","WAWebCatalogCollection","WAWebCatalogLoadError.react","WAWebCatalogLoadErrorLoadable","WAWebChatThreadLogging","WAWebCmd","WAWebConfirmPopup.react","WAWebDirectConnectionGatingUtils","WAWebDrawer.react","WAWebDrawerBody.react","WAWebDrawerContext","WAWebDrawerHeader.react","WAWebFbtCommon","WAWebModalManager","WAWebNoop","WAWebProductCatalogCatalogDrawerSection.react","WAWebProductCatalogCheckCartEnabled","WAWebProductCatalogContext","WAWebProductCatalogDetailDrawerMenu.react","WAWebProductCatalogLogEvents","WAWebProductCatalogProductDetailsInfo.react","WAWebProductCatalogProductPostcodeChangeBanner","WAWebProductCatalogProductTile.react","WAWebProductCatalogReportProductFlow","WAWebProductCollection","WAWebProductDetailsInfoVariants.react","WAWebProductTypes.flow","WAWebSpinner.react","WAWebStateUtils","WAWebText.react","WAWebUISpacing","WAWebUserPrefsMeUser","WAWebUtilsLogQplEvents","react","stylex","useWAWebForceUpdate","useWAWebListener","useWAWebModelValues","useWAWebUnmountSignal"],(function(t,n,r,o,a,i,l,s){var e,u,c,d,m,p,_,f=["ref"],g,h,y,C,b=C||(C=o("react")),v=h||(h=r("react")),S=b.useContext,R=b.useEffect,L=b.useMemo,E=b.useState,k={surface:"catalog-item"},I={availabilityBanner:{display:"x78zum5",lineHeight:"x1fc57z9",backgroundColor:"x16w0wmm",$$css:!0},text:{fontWeight:"xk50ysn",$$css:!0},loadingText:{color:"xxr6tci",$$css:!0},loadingContainer:{position:"x10l6tqk",zIndex:"xa1v5g2",boxSizing:"x9f619",display:"x78zum5",alignItems:"x6s0dn4",justifyContent:"xl56j7k",width:"xh8yej3",background:"xsm26vf",boxShadow:"x1499u3w",opacity:"x1hc1fzr",transitionProperty:"xfagghw",transitionDuration:"xofcydl",transitionTimingFunction:"x9lcvmn",$$css:!0},shiftUp:{position:"x10l6tqk",zIndex:"xuvdrym",display:"x78zum5",alignItems:"x6s0dn4",justifyContent:"xl56j7k",width:"xh8yej3",background:"xsm26vf",boxShadow:"x1499u3w",transitionProperty:"xfagghw",transitionDuration:"x1wsgiic",transitionTimingFunction:"x9lcvmn",transform:"x1mbp4g0",$$css:!0},body:{flex:"x1okw0bk",$$css:!0}};function T(e){var t=e.isAvailable,n=e.productCatalogFetchState,a=e.productFetchState,i=e.productSanctioned,l;a==="ERROR"||a==="TOKEN_RECOVERY_REQUIRED"?l=v.jsx(o("WAWebText.react").WAWebTextSmall,{as:"span",xstyle:[I.text,o("WAWebUISpacing").uiMargin.horiz10],color:"critical",children:s._(/*BTDS*/"Se produjo un error")}):t?l=[v.jsx(o("WAWebSpinner.react").Spinner,{size:14,color:"highlight"},"DetailDrawer-loadingBar-spinner"),v.jsx(o("WAWebText.react").WAWebTextSmall,{as:"span",xstyle:[I.text,o("WAWebUISpacing").uiMargin.horiz10,I.loadingText],children:s._(/*BTDS*/"Esperando red")},"DetailDrawer-loadingBar-msg")]:i===!0&&o("WAWebBizGatingUtils").isCountryOfOriginEnabled()?l=v.jsx(o("WAWebText.react").WAWebTextSmall,{as:"span",xstyle:[I.text,o("WAWebUISpacing").uiMargin.horiz10],color:"critical",children:s._(/*BTDS*/"Se quit\u00f3 este art\u00edculo y ya no est\u00e1 disponible para su compra.")}):l=v.jsx(o("WAWebText.react").WAWebTextSmall,{as:"span",xstyle:[I.text,o("WAWebUISpacing").uiMargin.horiz10],color:"critical",children:s._(/*BTDS*/"Se quit\u00f3 este producto o servicio")});var u=a==="PENDING"||n==="PENDING",c=u||!t;return v.jsx("div",babelHelpers.extends({},(y||(y=r("stylex"))).props(c&&I.loadingContainer,!c&&I.shiftUp,c&&o("WAWebUISpacing").uiPadding.all8),{children:l}))}T.displayName=T.name+" [from "+i.id+"]";function D(e){var t=e.handleBack,n=e.menu;return v.jsx(o("WAWebDrawerHeader.react").DrawerHeader,{title:s._(/*BTDS*/"Detalles"),onBack:t,type:o("WAWebDrawerHeader.react").DRAWER_HEADER_TYPE.SMALL,menu:n})}D.displayName=D.name+" [from "+i.id+"]";function x(t){"use no forget";var a,i=t.ref,l=babelHelpers.objectWithoutPropertiesLoose(t,f),h=l.chat,C=l.collectionId,b=l.hideCatalogSection,x=l.hideDescription,$=l.hideHeader,P=l.hideMessageBusinessButton,N=l.onBack,M=l.onCartClick,w=l.onProductCatalog,A=l.onProductDetail,F=l.onProductLinkClick,O=l.onProductMoreInformation,B=l.refreshCarousel,W=o("useWAWebForceUpdate").useForceUpdateDONOTUSE(),q=r("useWAWebUnmountSignal")(),U=S(o("WAWebDrawerContext").DrawerContext),V=E(l.product),H=V[0],G=V[1],z=o("useWAWebModelValues").useModelValues(H,["id","catalogWid","productImageCollection","fetchedFromServer","name","availability","reviewStatus","isSanctioned","variantInfo"]),j=E(null),K=j[0],Q=j[1],X=E(!1),Y=X[0],J=X[1],Z=E(null),ee=Z[0],te=Z[1],ne=E("NONE"),re=ne[0],oe=ne[1],ae=E("NONE"),ie=ae[0],le=ae[1],se=L(function(){return o("WAWebCartCollection").CartCollection.findCart(z.catalogWid.toString())},[z.catalogWid]);o("useWAWebListener").useListener(se,"change:cartItemCollection",W);var ue=function(){return N()},ce=function(){var t=z.catalogWid;o("WAWebCatalogCollection").CatalogCollection.findCarouselCatalog(t).then(function(e){if(!q.aborted){var t=Array.isArray(e)?e[0]:e;te(t||null),le(t?"SUCCESS":"NONE")}}).catch(o("WAFilteredCatch").filteredCatch(o("WAWebBackendErrors").ServerStatusCodeError,function(t){t.status==="not_found"||t.status===404?(te(null),le("NOT_FOUND")):(te(null),le("ERROR"),o("WALogger").WARN(e||(e=babelHelpers.taggedTemplateLiteralLoose(["Failed to fetch product catalog from server"]))))}))},de=function(t){var e,n=(e=o("WAWebCatalogCollection").CatalogCollection.get(z.catalogWid))==null?void 0:e.productCollection.get(t);n!=null?G(n):o("WAWebCatalogCollection").CatalogCollection.findProduct({catalogWid:z.catalogWid,productId:t.toString()}).then(function(e){var n=e[0],r=n==null?void 0:n.productCollection.get(t);r&&G(r)}).catch(function(e){o("WAWebProductDetailsInfoVariants.react").showProductChangeErrorToast()})},me=function(){o("WAWebModalManager").ModalManager.open(v.jsx(o("WAWebConfirmPopup.react").ConfirmPopup,{onOK:function(){o("WAWebModalManager").ModalManager.close()},okText:r("WAWebFbtCommon")("OK"),children:s._(/*BTDS*/"Se quit\u00f3 este producto o servicio")}))},pe=function(){var e=z.catalogWid,t=z.id.toString();return o("WAWebCatalogCollection").CatalogCollection.findProduct({catalogWid:e,productId:t,productMsgMediaData:o("WAWebStateUtils").unproxy(z).productMsgMediaData,canLogQpl:!0})},_e=function(){var e=z.catalogWid,t=pe(),a=o("WAWebBusinessProfileCollection").BusinessProfileCollection.find(e),i=!0;return(g||(g=n("Promise"))).all([a,t]).then(function(e){var t=e[0];if(q.aborted)throw new(o("WAAbortError")).AbortError;return i=!1,o("WAWebUtilsLogQplEvents").qplEndProductView(o("WAQplTypes").QuickLogActionType.SUCCESS),Q(t),oe("SUCCESS"),t}).then(function(e){le(function(t){if(t==="PENDING"){if(!o("WAWebBusinessProfileUtils").hasCatalog(e))return"NONE";ce()}return t})}).catch(o("WAAbortError").catchAbort(r("WAWebNoop"))).catch(o("WAFilteredCatch").filteredCatch(o("WAWebBackendErrors").E404,function(){ue(),me(),oe("NOT_FOUND"),i=!1,o("WAWebUtilsLogQplEvents").qplDropProductView()})).catch(o("WAFilteredCatch").filteredCatch(o("WAWebBackendErrors").CatalogUnknownError,function(e){oe("ERROR"),o("WALogger").WARN(u||(u=babelHelpers.taggedTemplateLiteralLoose(["Failed to fetch product from server"])))})).catch(o("WAFilteredCatch").filteredCatch(o("WAWebBackendErrors").ServerStatusCodeError,function(e){oe("ERROR"),o("WALogger").WARN(c||(c=babelHelpers.taggedTemplateLiteralLoose(["Failed to fetch product from server"])))})).catch(o("WAFilteredCatch").filteredCatch(o("WAWebBackendErrors").AdAccountRecoveryRequiredError,function(e){oe("TOKEN_RECOVERY_REQUIRED"),o("WALogger").WARN(d||(d=babelHelpers.taggedTemplateLiteralLoose(["Failed to fetch product from server due to token recovery error"])))})).finally(function(){i&&o("WAWebUtilsLogQplEvents").qplEndProductView(o("WAQplTypes").QuickLogActionType.FAIL)})};R(function(){if(o("WAWebBizGatingUtils").commerceThreadsLoggingEnabled()&&h&&o("WAWebChatThreadLogging").handleActivitiesForChatThreadLogging([{activityType:"pdpViews",ts:o("WATimeUtils").unixTime(),chatId:h.id}]),B===!0){var e=o("WAWebCatalogCollection").CatalogCollection.get(z.catalogWid);e!=null&&e.productCollection&&e.fetchedFromServer?le("SUCCESS"):le("PENDING")}o("WAWebUtilsLogQplEvents").qplAnnotateProductView(o("WAWebUserPrefsMeUser").isMeUser(z.catalogWid));var t=z.catalogWid,n=z.id.toString();if(!t||!n){o("WAWebUtilsLogQplEvents").qplDropProductView();return}return _e().catch(function(){o("WALogger").ERROR(m||(m=babelHelpers.taggedTemplateLiteralLoose(["[product catalog] failed to fetch data"]))).sendLogs("product-catalog-failed-to-fetch-data")}),r("WAWebProductCatalogCheckCartEnabled")(t).then(function(e){J(e),o("WAWebProductCatalogLogEvents").logProductDetailView({product:o("WAWebStateUtils").unproxy(z),catalogContext:o("WAWebProductCatalogContext").getProductCatalogContext(U),cartToggle:e,collectionId:C})}).catch(function(){o("WALogger").ERROR(p||(p=babelHelpers.taggedTemplateLiteralLoose(["[product catalog] failed to check cart enabled"]))).sendLogs("product-catalog-failed-to-check-cart-enabled")}),function(){var e=z.catalogWid,t=z.id.toString();if(!(!e||!t)){var n=o("WAWebCatalogCollection").CatalogCollection.get(e),r=n&&n.msgProductCollection.get(t);r!=null&&r.fetchedFromServer&&n&&n.msgProductCollection.remove(r)}}},[]);var fe=function(){o("WAWebUtilsLogQplEvents").qplStartCartView("Product"),M==null||M(z.catalogWid.toString())},ge=function(){o("WAWebModalManager").ModalManager.open(v.jsx(r("WAWebProductCatalogReportProductFlow"),{product:z,sessionId:o("WAWebProductCatalogContext").getProductCatalogSessionId(U)}))},he=function(){o("WAWebProductCatalogLogEvents").logProductShareLinkClick({product:z,catalogContext:o("WAWebProductCatalogContext").getProductCatalogContext(U)}),F(z)},ye=function(t,n){n===void 0&&(n=!0),o("WAWebBizGatingUtils").commerceThreadsLoggingEnabled()&&h&&o("WAWebChatThreadLogging").handleActivitiesForChatThreadLogging([{activityType:t,ts:o("WATimeUtils").unixTime(),chatId:h.id,boolValue:n}])},Ce=function(){var e=o("WAWebCatalogCollection").CatalogCollection.get(z.catalogWid);o("WAWebBizProductCatalogAction").sendProductToChat(z,e,o("WAWebProductCatalogContext").getProductCatalogContext(U)),ye("isCtaOnPdpClicked"),o("WAWebProductCatalogLogEvents").logProductMessageBusinessClick(z,o("WAWebProductCatalogContext").getProductCatalogContext(U))},be=function(){ye("isCartAddClicked")},ve=function(){var e=z,t=e.catalogWid,n=o("WAWebCatalogCollection").CatalogCollection.get(t);if(n){var r=n.productCollection.get(e.id);o("WAWebCmd").Cmd.attachProduct({product:r?o("WAWebStateUtils").unproxy(r):o("WAWebStateUtils").unproxy(e)})}},Se=function(){O(z)},Re=function(){w&&w(z.catalogWid,o("WAWebProductCatalogContext").getProductCatalogContext(U))},Le=function(t){if(o("WAWebUtilsLogQplEvents").qplStartProductView("Product"),A)return A(t)},Ee=function(){var e=z.reviewStatus;return e===o("WAWebProductCollection").PRODUCT_REVIEW_STATUS.REJECTED},ke=function(){return re!=="ERROR"&&re!=="NOT_FOUND"&&!Ee()&&z.isSanctioned!==!0},Ie=ke(),Te=o("WAWebBusinessProfileUtils").hasCatalog(K)&&!b,De=function(){pe().then(function(){var e=o("WAWebCatalogCollection").CatalogCollection.get(z.catalogWid);e&&(e.stale=!0)}).catch(function(){o("WALogger").ERROR(_||(_=babelHelpers.taggedTemplateLiteralLoose(["[product catalog] failed to fetch product after postcode change"]))).sendLogs("product-catalog-failed-to-fetch-product-after-postcode-change")})},xe=function(){return o("WAWebProductTypes.flow").PRODUCT_AVAILABILITY_UNAVAILABLE_VALUES.includes(z.availability)?v.jsxs("div",babelHelpers.extends({},(y||(y=r("stylex"))).props([I.availabilityBanner,o("WAWebUISpacing").uiPadding.vert18,o("WAWebUISpacing").uiPadding.horiz30,o("WAWebUISpacing").uiMargin.bottom0]),{children:[z.availability===o("WAWebProductTypes.flow").ProductAvailability.OUT_OF_STOCK?s._(/*BTDS*/"Este art\u00edculo est\u00e1 agotado."):null,z.availability===o("WAWebProductTypes.flow").ProductAvailability.AVAILABLE_FOR_ANOTHER_POSTCODE&&o("WAWebDirectConnectionGatingUtils").enablePostcodeInCatalog()?v.jsx(r("WAWebProductCatalogProductPostcodeChangeBanner"),{catalogWid:z.catalogWid,postcodeChangeSuccess:De}):null]})):null},$e;return ke()&&($e=o("WAWebProductCatalogDetailDrawerMenu.react").getDetailDrawerMenu({onSendProduct:ve,onReportProduct:ge,onProductLinkClick:he,onProductMoreInformation:Se,onCartClick:Y?fe:void 0,cartCount:se.itemCount,catalogId:z.catalogWid.toString(),contactId:h==null?void 0:h.contact.id})),v.jsxs(r("WAWebDrawer.react"),{ref:i,onDrop:ue,theme:"striped",tsNavigationData:k,children:[!$&&v.jsx(D,{handleBack:ue,menu:$e}),v.jsx(r("WAWebDrawerBody.react"),{children:v.jsxs("div",babelHelpers.extends({"data-testid":void 0},(y||(y=r("stylex"))).props([I.body,o("WAWebUISpacing").uiPadding.bottom32]),{children:[v.jsx(T,{productFetchState:re,productCatalogFetchState:ie,isAvailable:Ie,productSanctioned:!!z.isSanctioned}),v.jsx(r("WAWebProductCatalogProductTile.react"),{product:z,isAvailable:Ie,fetching:re==="PENDING"}),xe(),re==="TOKEN_RECOVERY_REQUIRED"&&v.jsx("div",babelHelpers.extends({},(y||(y=r("stylex"))).props(o("WAWebUISpacing").uiMargin.top36),{children:v.jsx(o("WAWebCatalogLoadError.react").CatalogLoadError,{ctaDisplayType:o("WAWebCatalogLoadErrorLoadable").CTADisplayType.LINK,shouldShowHeader:!1})})),v.jsx(r("WAWebProductCatalogProductDetailsInfo.react"),{product:z,collectionId:C,onSendChat:Ce,onAddToCart:be,isAvailable:Ie,hideRetailerID:(a=l.chat)==null?void 0:a.contact.isEnterprise,onProductChange:de,hideMessageBusinessButton:P,hideDescription:x}),Te&&ee?v.jsx(r("WAWebProductCatalogCatalogDrawerSection.react"),{catalog:ee,onProductCatalog:Re,onProductDetail:Le,filterProductId:z.id.toString(),title:s._(/*BTDS*/"M\u00e1s"),animation:!1}):null]}))})]},"product-details-drawer")}x.displayName=x.name+" [from "+i.id+"]",l.default=x}),226); __d("WAWebProductCatalogProductLinkDrawer.react",["fbt","WAWebBizSendProductButton.react","WAWebBizSendProductLinkFlow.react","WAWebCatalogShortLinkUtils","WAWebCellFrame.react","WAWebCmd","WAWebCopyLinkButton.react","WAWebDrawer.react","WAWebDrawerBody.react","WAWebDrawerContext","WAWebDrawerHeader.react","WAWebEmojiText.react","WAWebModalManager","WAWebProductCatalogContext","WAWebProductCatalogLinkText.react","WAWebProductCatalogLogEvents","WAWebProductCatalogProductThumb.react","WAWebSendLinkButton.react","WAWebStateUtils","WAWebUISpacing","react","stylex"],(function(t,n,r,o,a,i,l,s){var e=["ref"],u,c,d,m=d||(d=r("react")),p=(u||(u=o("react"))).useContext,_={surface:"smb-catalog-share-product-link"},f={prompt:{lineHeight:"x101yacv",$$css:!0},productImageContainer:{width:"xjzcg3w",height:"xcbkimw",$$css:!0},productThumbContainer:{position:"x170k5ml",backgroundColor:null,$$css:!0}},g="product-link-anchor";function h(e){var t=e.getProductImageCollectionHead();return t?m.jsx(o("WAWebProductCatalogProductThumb.react").ProductThumb,{xstyle:f.productImageContainer,mediaData:t.mediaData}):m.jsx(o("WAWebProductCatalogProductThumb.react").ProductThumbPlaceholder,{xstyle:f.productThumbContainer})}h.displayName=h.name+" [from "+i.id+"]";function y(t){var n=t.ref,a=babelHelpers.objectWithoutPropertiesLoose(t,e),i=a.centerDrawer,l=a.onBack,u=a.onCancel,d=a.onSend,y=a.product,C=a.prompt,b=a.sendProductMsg,v=p(o("WAWebDrawerContext").DrawerContext),S=function(){o("WAWebModalManager").ModalManager.open(m.jsx(r("WAWebBizSendProductLinkFlow.react"),{product:y,onSend:d}),{transition:"modal-flow"}),o("WAWebProductCatalogLogEvents").logShareProductViaWALinkClick({product:y,catalogContext:o("WAWebProductCatalogContext").getProductCatalogContext(v)})},R=function(t){t.preventDefault(),S()},L=function(){o("WAWebProductCatalogLogEvents").logShareProductCopyLinkClick({product:y,catalogContext:o("WAWebProductCatalogContext").getProductCatalogContext(v)})},E=function(){o("WAWebCmd").Cmd.attachProduct({product:o("WAWebStateUtils").unproxy(y),onSend:d})},k=o("WAWebCatalogShortLinkUtils").createProductLink(y.catalogWid.user,y.id.toString()),I,T;i&&(I="labels",T="center-column");var D;return b!=null?D=m.jsx(r("WAWebBizSendProductButton.react"),{onClick:E}):D=m.jsx(r("WAWebSendLinkButton.react"),{onClick:S}),m.jsxs(r("WAWebDrawer.react"),{ref:n,theme:I,tsNavigationData:_,children:[m.jsx(o("WAWebDrawerHeader.react").DrawerHeader,{testid:void 0,title:s._(/*BTDS*/"Enlace al producto"),onBack:l,onCancel:u,type:o("WAWebDrawerHeader.react").DRAWER_HEADER_TYPE.SMALL,focusBackOrCancel:!0}),m.jsxs(r("WAWebDrawerBody.react"),{theme:T,children:[m.jsxs("div",babelHelpers.extends({},(c||(c=r("stylex"))).props(f.prompt,o("WAWebUISpacing").uiPadding.horiz20,o("WAWebUISpacing").uiPadding.bottom10),{children:[" ",C," "]})),m.jsx(r("WAWebCellFrame.react"),{image:h(y),primary:m.jsx(o("WAWebEmojiText.react").EmojiText,{text:y.name,direction:"auto"}),theme:"identity",secondary:m.jsx(r("WAWebProductCatalogLinkText.react"),{id:g,href:k,onClick:R,noHandle:!0})}),D,m.jsx(r("WAWebCopyLinkButton.react"),{elementId:g,onClick:L})]})]},"product-link-drawer")}y.displayName=y.name+" [from "+i.id+"]",l.default=y}),226); __d("WAWebProductCatalogProductListDrawerHeader.react",["WAWebContactGetters","WAWebDetailImage.react","WAWebEmojiText.react","WAWebName.react","WAWebText.react","WAWebUISpacing","isStringNullOrEmpty","react","stylex","useWAWebContactValues","useWAWebModelValues"],(function(t,n,r,o,a,i,l){var e,s,u=e||(e=r("react")),c={description:{display:"x104kibb",maxHeight:"x1jquxbb",overflowX:"x6ikm8r",overflowY:"x10wlt62",lineHeight:"x1fc57z9",color:"x17t9dm2",overflowWrap:"x1mzt3pk",WebkitLineClamp:"x1gzmk7r",WebkitBoxOrient:"x1ua5tub",$$css:!0},photoIcon:{width:"x1exxlbk",height:"xpyat2d",$$css:!0},text:{position:"x10l6tqk",top:"x13vifvy",insetInlineEnd:"xtijo5x",bottom:"x1ey2m1c",insetInlineStart:"x1o0tod",zIndex:"x11uqc5h",display:"x78zum5",flexDirection:"xdt5ytf",alignItems:"x6s0dn4",justifyContent:"xl56j7k",textAlign:"x2b8uid",$$css:!0},name:{fontWeight:"xk50ysn",color:"x17t9dm2",$$css:!0},spinner:{borderStartStartRadius:"x1bczwif",borderStartEndRadius:"x17un8ov",borderEndEndRadius:"x1e7945m",borderEndStartRadius:"x11o6v7j",$$css:!0},img:{height:"xt7dq6l",$$css:!0}};function d(e){var t=e.businessProfile,n=o("useWAWebModelValues").useOptionalModelValues(t,["description"]);return!n||r("isStringNullOrEmpty")(n==null?void 0:n.description)?null:u.jsx("div",babelHelpers.extends({},(s||(s=r("stylex"))).props(c.description,o("WAWebUISpacing").uiMargin.top12),{children:u.jsx(o("WAWebEmojiText.react").EmojiText,{text:n.description,direction:"auto",selectable:!0,titlify:!0})}))}d.displayName=d.name+" [from "+i.id+"]";function m(e){var t=e.contact,n=e.profilePicThumb,r=o("useWAWebModelValues").useOptionalModelValues(n,["imgFull"]),a=o("useWAWebContactValues").useContactValues(t.id,[o("WAWebContactGetters").getId,o("WAWebContactGetters").getIsMe]),i=a[0];if(!r)return null;var l=u.jsx(o("WAWebDetailImage.react").DefaultIcon,{id:i,xstyle:c.photoIcon});return u.jsx("div",{className:"x1n2onr6 x1vjfegm x78zum5 x6s0dn4 xl56j7k xh8yej3 x5yr21d x1j6awrg x1m1drc7 x1iygr5g x1ojvc37 x4eaejv x1wsn0xg x100rkj9 x1sak2ym",children:u.jsx(o("WAWebDetailImage.react").DetailImageCommon,{profilePicThumb:r,loader:!0,defaultIcon:l,profilePicThumbImg:r.imgFull,spinnerXstyle:c.spinner,spinnerSize:100,imgXstyle:c.img,theme:"business",shape:o("WAWebDetailImage.react").DetailImageShape.Square})})}m.displayName=m.name+" [from "+i.id+"]";function p(e){var t=e.businessProfile,n=e.contact,a=e.profilePicThumb;return u.jsxs("div",{className:"x1n2onr6 x1m3v4wt x6ikm8r x10wlt62 x15e7hw7","data-testid":void 0,children:[u.jsx(m,{profilePicThumb:a,contact:n}),u.jsxs("div",babelHelpers.extends({},(s||(s=r("stylex"))).props(c.text,o("WAWebUISpacing").uiPadding.horiz30),{children:[u.jsx(o("WAWebText.react").WAWebTextLarge,{xstyle:c.name,children:u.jsx(o("WAWebName.react").Name,{contact:n,selectable:!0,useVerifiedName:!0})}),u.jsx(d,{businessProfile:t})]}))]})}p.displayName=p.name+" [from "+i.id+"]",l.default=p}),98); __d("WAWebProductCatalogProductListDrawer.react",["fbt","WAFilteredCatch","WATypeUtils","WAWebBackendErrors","WAWebCartCollection","WAWebCatalogCollection","WAWebCommonCartIconMenuBarItem.react","WAWebContactGetters","WAWebDrawer.react","WAWebDrawerBody.react","WAWebDrawerContext","WAWebDrawerHeader.react","WAWebDropdown.react","WAWebDropdownItem.react","WAWebFlatListController","WAWebFlatListLoadingSpinnerItem.react","WAWebFrontendConstants","WAWebManageAddItemCta.react","WAWebMenuBar.react","WAWebMoreRefreshedIcon.react","WAWebProductCatalogCatalogConstants","WAWebProductCatalogCheckCartEnabled","WAWebProductCatalogContext","WAWebProductCatalogFetchState","WAWebProductCatalogFetchStateTopBar.react","WAWebProductCatalogLinkIcon.react","WAWebProductCatalogList.react","WAWebProductCatalogLogEvents","WAWebProductCatalogProductListDrawerHeader.react","WAWebUISpacing","react","stylex","useWAWebContactValues","useWAWebDebouncedCallback","useWAWebForceUpdate","useWAWebListener","useWAWebThrottledCallback","useWAWebUnmountSignal"],(function(t,n,r,o,a,i,l,s){var e=["ref"],u,c,d,m=d||(d=o("react")),p=u||(u=r("react")),_=m.useContext,f=m.useEffect,g=m.useMemo,h=m.useState,y={list:{flex:"x1okw0bk",overflowX:"x6ikm8r",overflowY:"x10wlt62",$$css:!0}};function C(e){var t=e.businessProfile,n=e.canManageCatalog,a=e.contact,i=e.loadingMore,l=e.onAddProduct,s=e.productCatalogList,u;return n&&l&&(u=p.jsx(r("WAWebManageAddItemCta.react"),{onClick:l,theme:"in-list",testid:void 0})),p.jsxs(p.Fragment,{children:[t&&p.jsx("div",{"data-testid":void 0,className:"x1okw0bk",children:p.jsx(r("WAWebProductCatalogProductListDrawerHeader.react"),{profilePicThumb:a.getProfilePicThumb(),contact:a,businessProfile:t})}),p.jsxs("div",babelHelpers.extends({"data-testid":void 0},(c||(c=r("stylex"))).props(y.list,o("WAWebUISpacing").uiPadding.bottom8,t&&o("WAWebUISpacing").uiMargin.top8),{children:[u,s,i&&p.jsx(r("WAWebFlatListLoadingSpinnerItem.react"),{})]}))]})}C.displayName=C.name+" [from "+i.id+"]";function b(e){var t=e.canManageCatalog,n=e.cartCount,a=e.cartEnabled,i=e.catalogId,l=e.handleCartClick,u=e.handleCatalogLinkClick,c=e.onCartClick,d=e.onOpenSettings,m=t?p.jsx(o("WAWebMenuBar.react").MenuBarItem,{testid:void 0,icon:p.jsx(o("WAWebMoreRefreshedIcon.react").MoreRefreshedIcon,{}),title:s._(/*BTDS*/"Men\u00fa"),dropdownMenu:{menu:p.jsxs(p.Fragment,{children:[p.jsx(o("WAWebDropdownItem.react").DropdownItem,{testid:void 0,action:u,children:s._(/*BTDS*/"Reenviar")}),d&&p.jsx(o("WAWebDropdownItem.react").DropdownItem,{testid:void 0,action:d,children:s._(/*BTDS*/"Ajustes")})]}),type:o("WAWebDropdown.react").MenuType.DropdownMenu,flipOnRTL:!0,dirX:o("WAWebDropdown.react").DirX.LEFT}}):p.jsx(o("WAWebMenuBar.react").MenuBarItem,{testid:void 0,icon:p.jsx(r("WAWebProductCatalogLinkIcon.react"),{theme:null}),title:s._(/*BTDS*/"Enlace al cat\u00e1logo"),onClick:u}),_=a&&c?p.jsx(r("WAWebCommonCartIconMenuBarItem.react"),{cartIconTheme:null,cartCountText:o("WATypeUtils").isNumber(n)&&n>0?n.toString():void 0,onClick:l,catalogOwnerJid:i.toString()}):null;return[_,m]}function v(t){"use no forget";var n=t.ref,a=babelHelpers.objectWithoutPropertiesLoose(t,e),i=a.autoUpdate,l=i===void 0?!1:i,u=a.businessProfile,c=a.canManageCatalog,d=a.catalogId,m=a.contact,y=a.onAddProduct,v=a.onCartClick,S=a.onCatalogLinkClick,R=a.onOpenSettings,L=a.onProductDetail,E=a.onProductShare,k=a.setScrollOffset,I=r("useWAWebUnmountSignal")(),T=_(o("WAWebDrawerContext").DrawerContext),D=o("useWAWebForceUpdate").useForceUpdateDONOTUSE(),x=r("useWAWebDebouncedCallback")(D,100),$=o("useWAWebContactValues").useContactValues(m.id,[o("WAWebContactGetters").getId]),P=$[0],N=g(function(){return new(r("WAWebFlatListController"))},[]),M=function(){var e=o("WAWebCatalogCollection").CatalogCollection.get(d);return!e||e.stale?null:e},w=g(function(){return o("WAWebCartCollection").CartCollection.findCart(P.toString())},[P]),A=h(!1),F=A[0],O=A[1],B=h(0),W=B[0],q=B[1],U=h(!1),V=U[0],H=U[1],G=h(!1),z=G[0],j=G[1],K=h(M),Q=K[0],X=K[1],Y=h(function(){return w.itemCount}),J=Y[0],Z=Y[1],ee=h(function(){return M()?"SUCCESS":"NONE"}),te=ee[0],ne=ee[1],re=function(){var e=w.itemCount;J!==e&&Z(e)};o("useWAWebListener").useListener(w,"all",re);var oe=function(){if(!V){var e=o("WAWebCatalogCollection").CatalogCollection.assertGet(d);if(e.afterCursor){var t=e.productCollection.getProductModels().length;O(!0),q(t),o("WAWebCatalogCollection").CatalogCollection.update(d).then(function(e){if(!I.aborted){O(!1);var n=Array.isArray(e)?e[0]:e,r=n.productCollection.getProductModels().length;r===W&&H(!0),t*o("WAWebProductCatalogCatalogConstants").PRODUCT_LIST_ITEM_HEIGHTe.scrollHeight-e.clientHeight&&oe()},100),ue=function(t){var e,n;t.currentTarget&&se(t.currentTarget),k==null||k((e=(n=t.currentTarget)==null?void 0:n.scrollTop)!=null?e:0)},ce=function(){v==null||v(P.toString())},de=function(){Q&&(S(Q,m),o("WAWebProductCatalogLogEvents").logCatalogShareLinkClick({catalogOwnerWid:d,catalogContext:o("WAWebProductCatalogContext").getProductCatalogContext(T)}))},me=z&&v?ce:void 0,pe=Q?p.jsx(C,{canManageCatalog:c,onAddProduct:y,businessProfile:u,contact:m,loadingMore:F,productCatalogList:p.jsx(r("WAWebProductCatalogList.react"),{onCartOpen:me,onProductDetail:L,flatListController:N,catalog:Q,canManageCatalog:c,shareLinks:c,onProductShare:E})}):p.jsx(r("WAWebProductCatalogFetchStateTopBar.react"),{fetchState:te}),_e=b({canManageCatalog:c,handleCatalogLinkClick:de,onOpenSettings:R,cartEnabled:z,onCartClick:v,cartCount:J,handleCartClick:ce,catalogId:d});return p.jsxs(r("WAWebDrawer.react"),{ref:n,theme:"products",onDrop:a.onBack,children:[p.jsx(o("WAWebDrawerHeader.react").DrawerHeader,{title:s._(/*BTDS*/"Cat\u00e1logo"),type:o("WAWebDrawerHeader.react").DRAWER_HEADER_TYPE.SMALL,onBack:a.onBack,menu:_e,focusBackOrCancel:!0}),p.jsx(r("WAWebDrawerBody.react"),{onScroll:ue,flatListControllers:[N],scrollOffset:a.scrollOffset,children:pe})]})}v.displayName=v.name+" [from "+i.id+"]",l.default=v}),226); __d("WAWebProductCatalogProductMoreInformationDrawer.react",["fbt","Promise","WALogger","WANullthrows","WAWebCatalogCollection","WAWebComplianceConstants","WAWebComplianceInfo.react","WAWebCountriesUtils","WAWebDrawer.react","WAWebDrawerBody.react","WAWebDrawerHeader.react","WAWebStateUtils","WAWebSyntheticCountryCode","WAWebUISpacing","asyncToGeneratorRuntime","react","stylex","useWAWebModelValues","useWAWebRenderCallbacks"],(function(t,n,r,o,a,i,l,s){var e,u=["ref"],c,d,m,p,_=p||(p=r("react")),f=(m||(m=o("react"))).useState,g=[o("WAWebComplianceConstants").COMPLIANCE_INFO_CODES.INDIA,o("WAWebSyntheticCountryCode").SyntheticCountryCode.NotApplicable];function h(t){var a=t.ref,i=babelHelpers.objectWithoutPropertiesLoose(t,u),l=i.onBack,m=o("useWAWebModelValues").useModelValues(i.product,["id","catalogWid"]),p=f({}),h=p[0],y=p[1],C=f(""),b=C[0],v=C[1],S=f(""),R=S[0],L=S[1],E=f(!0),k=E[0],I=E[1],T=function(t){var e,a;return((e=t.complianceInfo)==null?void 0:e.countryCodeOrigin)===String(o("WAWebSyntheticCountryCode").SyntheticCountryCode.NotApplicable)?(c||(c=n("Promise"))).resolve(_.jsxs("div",{children:[_.jsx("div",babelHelpers.extends({},(d||(d=r("stylex"))).props(o("WAWebUISpacing").uiMargin.bottom6),{children:s._(/*BTDS*/"No corresponde")})),_.jsx("div",{children:s._(/*BTDS*/"El art\u00edculo es un servicio o un bien no f\u00edsico.")})]})):o("WAWebCountriesUtils").getCountryNameFromCountryCode((a=t.complianceInfo)==null?void 0:a.countryCodeOrigin,o("WAWebCountriesUtils").COUNTRY_FILTER_TYPE.META_RECOGNIZED)};r("useWAWebRenderCallbacks")({onMount:function(){function t(){return a.apply(this,arguments)}function a(){return a=n("asyncToGeneratorRuntime").asyncToGenerator(function*(){yield o("WAWebCatalogCollection").CatalogCollection.findProduct({catalogWid:m.catalogWid,productId:m.id.toString(),productMsgMediaData:o("WAWebStateUtils").unproxy(m).productMsgMediaData,shouldFetchComplianceFields:!0});var t=o("WAWebCatalogCollection").CatalogCollection.get(m.catalogWid),n=r("WANullthrows")(t).productCollection.get(m.id);if(n){var a,i,l,s,u,c,d,p,_=yield T(n),f=yield o("WAWebCountriesUtils").getCountryNameFromCountryCode((a=n.complianceInfo)==null||(a=a.importerAddress)==null?void 0:a.countryCode,o("WAWebCountriesUtils").COUNTRY_FILTER_TYPE.META_RECOGNIZED),g={importerName:((i=n.complianceInfo)==null?void 0:i.importerName)||"",countryCodeOrigin:((l=n.complianceInfo)==null?void 0:l.countryCodeOrigin)||"",importerAddress:{street1:((s=n.complianceInfo)==null||(s=s.importerAddress)==null?void 0:s.street1)||"",street2:((u=n.complianceInfo)==null||(u=u.importerAddress)==null?void 0:u.street2)||"",city:((c=n.complianceInfo)==null||(c=c.importerAddress)==null?void 0:c.city)||"",region:((d=n.complianceInfo)==null||(d=d.importerAddress)==null?void 0:d.region)||"",postalCode:((p=n.complianceInfo)==null||(p=p.importerAddress)==null?void 0:p.postalCode)||""}};y(g),I(!1),v(_),L(f)}else o("WALogger").WARN(e||(e=babelHelpers.taggedTemplateLiteralLoose(["Unable to fetch compliance for product: ",""])),m.id)}),a.apply(this,arguments)}t()}});var D=function(){return l()},x=h.countryCodeOrigin,$=h.importerAddress,P=h.importerName;return _.jsxs(r("WAWebDrawer.react"),{ref:a,onDrop:D,theme:"striped",children:[_.jsx(o("WAWebDrawerHeader.react").DrawerHeader,{testid:void 0,title:s._(/*BTDS*/"M\u00e1s informaci\u00f3n"),onBack:D,type:o("WAWebDrawerHeader.react").DRAWER_HEADER_TYPE.SMALL}),_.jsx(r("WAWebDrawerBody.react"),{theme:k?"center-content":void 0,children:k?_.jsx(o("WAWebComplianceInfo.react").ComplianceInfoLoading,{}):_.jsxs(o("WAWebComplianceInfo.react").ComplianceInfoGroup,{children:[_.jsx(o("WAWebComplianceInfo.react").ComplianceInfoPrimitiveField,{value:b,label:s._(/*BTDS*/"Pa\u00eds de origen")}),x&&!g.includes(x)?_.jsxs(_.Fragment,{children:[_.jsx(o("WAWebComplianceInfo.react").ComplianceInfoPrimitiveField,{value:P,label:s._(/*BTDS*/"Nombre del importador")}),_.jsx(o("WAWebComplianceInfo.react").ComplianceInfoStructuralField,{valuesMap:babelHelpers.extends({importerAddressCountryNameOrigin:R},$),keys:["street1","street2","city","region","postalCode","importerAddressCountryNameOrigin"],label:s._(/*BTDS*/"Direcci\u00f3n del importador")})]}):null]})})]},"product-details-drawer")}h.displayName=h.name+" [from "+i.id+"]",l.default=h}),226); __d("WAWebProductCollectionCatalogCategoriesBanner",["fbt","WAWebBizProductCatalogBridge","WAWebText_DONOTUSE.react","WAWebUISpacing","react","useWAWebModelValues"],(function(t,n,r,o,a,i,l,s){var e,u,c=u||(u=r("react")),d=(e||(e=o("react"))).useEffect,m={banner:{backgroundColor:"x1280gxy",display:"x78zum5",alignItems:"x6s0dn4",borderBottomWidth:"xso031l",borderBottomStyle:"x1q0q8m5",borderBottomColor:"x120ee7l",$$css:!0}};function p(e){var t=e.catalog,n=o("useWAWebModelValues").useModelValues(t,["id","hasCatalogCategories"]),r=n.hasCatalogCategories,a=n.id;return d(function(){r==null&&o("WAWebBizProductCatalogBridge").queryCatalogHasCategories(a).then(function(e){t.set({hasCatalogCategories:e})})},[r,a,t]),r===!1||r==null?null:c.jsx(o("WAWebText_DONOTUSE.react").TextDiv,{xstyle:[m.banner,o("WAWebUISpacing").uiPadding.all16],size:"13",color:"dark",children:s._(/*BTDS*/"Usa WhatsApp en tu tel\u00e9fono para buscar categor\u00edas de productos.")})}p.displayName=p.name+" [from "+i.id+"]",l.default=p}),226); __d("WAWebProductCollectionCatalogPostcodeMenuConstants",[],(function(t,n,r,o,a,i){var e=500,l=500,s=3500;i.CATALOG_POSTCODE_CHANGE_MODAL_OPEN_DELAY=e,i.CATALOG_POSTCODE_MENU_TOOLTIP_DELAY=l,i.CATALOG_POSTCODE_MENU_TOOLTIP_DURATION=s}),66); __d("WAWebProductCollectionCatalogPostcodeMenu",["fbt","WALogger","WAPromiseDelays","WAWebAccessibility.react","WAWebBusinessAddressIcon.react","WAWebDropdown.react","WAWebFlex.react","WAWebModalManager","WAWebProductCollectionCatalogPostcodeChangeModal","WAWebProductCollectionCatalogPostcodeMenuConstants","WAWebText.react","WAWebText_DONOTUSE.react","WAWebUimUie.react","WAWebUimUieTooltip.react","WAWebUserPrefsGeneral","react","useWAWebModelValues","useWAWebOnUnmount","useWAWebTimeout"],(function(t,n,r,o,a,i,l,s){var e,u,c,d=c||(c=o("react")),m=u||(u=r("react")),p=d.useCallback,_=d.useEffect,f=d.useRef,g=d.useState,h={postcodeDescription:{lineHeight:"xdod15v",fontSize:"x1jchvi3",$$css:!0},postcodeLocationName:{lineHeight:"x1fc57z9",fontSize:"x1f6kntn",$$css:!0}},y=5,C=function(){var e=o("WAWebUserPrefsGeneral").getPostcodeTooltipViewCount();o("WAWebUserPrefsGeneral").setPostcodeTooltipViewCount(e+1)},b=function(){if(o("WAWebUserPrefsGeneral").getPostcodeTooltipViewedInSession())return!1;var e=o("WAWebUserPrefsGeneral").getPostcodeTooltipViewCount();return!(e>=y)};function v(t){var n=t.businessDirectConnection,a=t.catalog,i=t.postcodeChangeSuccess,l=o("useWAWebModelValues").useModelValues(n,["postcode","postcodeLocationName","postcodeSetByUser"]),u=l.postcode,c=l.postcodeLocationName,d=l.postcodeSetByUser,y=o("useWAWebModelValues").useModelValues(a,["id","hasCatalogCategories"]),v=y.hasCatalogCategories,S=y.id,R=d===!0,L=g(!1),E=L[0],k=L[1],I=function(){o("WAWebModalManager").ModalManager.close(),k(!1)},T=function(){o("WAWebModalManager").ModalManager.open(m.jsx(r("WAWebProductCollectionCatalogPostcodeChangeModal"),{existingPostcode:u!=null?u:"",catalogId:S,onCancel:I,onSuccess:function(){I(),i()}})),k(!0)},D=function(t){t===void 0&&(t=!1),o("WAPromiseDelays").delayMs(t?o("WAWebProductCollectionCatalogPostcodeMenuConstants").CATALOG_POSTCODE_CHANGE_MODAL_OPEN_DELAY:0).finally(T)},x=function(){D(!1)},$=g(null),P=$[0],N=$[1],M=f(null),w=f(null),A=p(function(){return N(null)},[]),F=o("useWAWebTimeout").useTimeout(A,o("WAWebProductCollectionCatalogPostcodeMenuConstants").CATALOG_POSTCODE_MENU_TOOLTIP_DURATION),O=F[0],B=p(function(){var e=w.current?w.current.offsetWidth*3/4:null;N({menu:m.jsx("div",{style:typeof e=="number"?{maxWidth:e+"px"}:null,children:m.jsx(o("WAWebText_DONOTUSE.react").Text,{as:"p",children:s._(/*BTDS*/"Haz clic para cambiar el c\u00f3digo postal y ver art\u00edculos disponibles en tu \u00e1rea.")})}),anchor:M.current,dirY:o("WAWebDropdown.react").DirY.TOP,type:o("WAWebDropdown.react").MenuType.Tooltip,horizontal:!0,tooltipColorScheme:o("WAWebDropdown.react").TooltipColorScheme.Highlight})},[]),W=o("useWAWebTimeout").useTimeout(function(){M.current?(B(),O()):o("WALogger").WARN(e||(e=babelHelpers.taggedTemplateLiteralLoose(["[direct-connection] change postcode tooltip is not shown"])))},o("WAWebProductCollectionCatalogPostcodeMenuConstants").CATALOG_POSTCODE_MENU_TOOLTIP_DELAY),q=W[0];_(function(){R||b()&&(C(),o("WAWebUserPrefsGeneral").setPostcodeTooltipViewedInSession(!0),q())},[]),r("useWAWebOnUnmount")(function(){E&&I()});var U=g(0),V=U[0],H=U[1];_(function(){v===!0&&H(function(e){return e+1})},[v]);var G=P?m.jsx(o("WAWebUimUie.react").UIE,{displayName:"CatalogPostcodeTooltip",popable:!0,escapable:!0,requestDismiss:A,dismissOnWindowResize:!0,children:m.jsx(r("WAWebUimUieTooltip.react"),{tooltip:P})},V):null;return m.jsxs("div",babelHelpers.extends({className:"x78zum5 x6s0dn4 x1280gxy x7wzq59 x13vifvy x1ks9yow x1obj6zc x17gydlx"},o("WAWebAccessibility.react").accessibleClickableButtonProps({onClick:x}),{ref:w,children:[m.jsx("span",{className:"x1h678fw xv6tirj x11ahuha xl3akx1 xvy4d1p xhslqc4",children:m.jsx(o("WAWebBusinessAddressIcon.react").BusinessAddressIcon,{})}),m.jsxs(o("WAWebFlex.react").FlexColumn,{ref:M,children:[m.jsx(o("WAWebText_DONOTUSE.react").Text,{as:"p",xstyle:h.postcodeDescription,children:s._(/*BTDS*/"Enviar al c\u00f3digo postal {postcode-of-a-geographic-area}",[s._param("postcode-of-a-geographic-area",u)])}),m.jsx(o("WAWebText.react").WAWebTextMuted,{as:"p",xstyle:h.postcodeLocationName,children:R?c:s._(/*BTDS*/"Haz clic para cambiar el c\u00f3digo postal.")}),G]})]}))}v.displayName=v.name+" [from "+i.id+"]",l.MAX_TIMES_POSTCODE_CHANGE_TOOLTIP_TO_SHOW=y,l.CatalogPostcodeMenu=v}),226); __d("WAWebProductCollectionCollectionListItem.react",["fbt","WAWebCellFrame.react","WAWebClickableLink.react","WAWebEmojiText.react","WAWebProductCollection","WAWebStopEvent","WAWebText.react","WAWebUtilsLogQplEvents","react"],(function(t,n,r,o,a,i,l,s){var e,u=e||(e=r("react")),c={collectionName:{lineHeight:"xdod15v",$$css:!0}};function d(e){var t=e.name,n=e.onClick;return u.jsx(r("WAWebClickableLink.react"),{onClick:n,className:"xdod15v",title:s._(/*BTDS*/"Colecci\u00f3n {collectionName}, ver todo",[s._param("collectionName",t)]),tabIndex:0,children:s._(/*BTDS*/"Ver todo")})}d.displayName=d.name+" [from "+i.id+"]";function m(e){var t=e.allItems,n=e.collection,a=e.onSeeAll,i,l;n?(l=n.id,i=n.name):t&&(i=s._(/*BTDS*/"Todos los art\u00edculos"));var m=u.jsx(o("WAWebText.react").WAWebTextTitle,{xstyle:c.collectionName,children:u.jsx(o("WAWebEmojiText.react").EmojiText,{text:i,ellipsify:!0,titlify:!0})});function p(e){o("WAWebStopEvent").stopEvent(e),o("WAWebUtilsLogQplEvents").qplStartCollectionViewAll("Catalog"),a&&n?a(n):a&&a()}var _=void 0;if(n)switch(n.reviewStatus){case o("WAWebProductCollection").PRODUCT_REVIEW_STATUS.REJECTED:_=u.jsx("span",{className:"x30a034",children:s._(/*BTDS*/"rechazada")});break}return u.jsx(r("WAWebCellFrame.react"),{primary:m,secondary:_,detail:u.jsx(d,{name:i,onClick:p}),theme:"collection-header",idle:!0,className:"x1gx403c x1y332i5 x178xt8z x13fuv20 xx42vgk"},l)}m.displayName=m.name+" [from "+i.id+"]",l.default=m}),226); __d("WAWebProductCollectionsList.react",["WAWebDrawerContext","WAWebFlatList.react","WAWebFlatListContainer.react","WAWebFlatListController","WAWebManageActions","WAWebManageCollectionIntegrityBanner.react","WAWebNonEmptyString","WAWebProductCatalogCatalogConstants","WAWebProductCatalogContext","WAWebProductCatalogListItem.react","WAWebProductCatalogLogEvents","WAWebProductCollection","WAWebProductCollectionCollectionListItem.react","WAWebStateUtils","WAWebUtilsLogQplEvents","react","useWAWebForceUpdate","useWAWebListener","useWAWebModelValues"],(function(t,n,r,o,a,i,l){var e,s,u=s||(s=o("react")),c=e||(e=r("react")),d=u.useContext,m=u.useMemo,p=o("WAWebFlatList.react").FlatListFactory();function _(e){"use no forget";var t=e.canManageCatalog,n=e.onCartOpen,a=e.onCollectionSeeAll,i=e.onEditCollection,l=e.onProductDetail,s=e.onProductShare,u=e.shareLinks,_=u===void 0?!1:u,f=o("useWAWebForceUpdate").useForceUpdateDONOTUSE(),g=o("useWAWebModelValues").useModelValues(e.catalog,["productCollection","collections","afterCursor","id","index"]),h=d(o("WAWebDrawerContext").DrawerContext),y=m(function(){return new Set},[]),C=m(function(){return new(r("WAWebFlatListController"))},[]),b=function(){var t=n!==void 0,r=e.data||[],a=[];return r.forEach(function(n){var r=n.collection,i=n.product,l=n.allItems;if(r&&i){var s=r.id;a.push({itemKey:s.toString()+"_"+i.id.toString()+"_"+t.toString(),product:i,collectionId:s})}else if(r)y.has(r)||y.add(r),a.push({itemKey:r.id.toString()+"_"+r.reviewStatus.toString(),collection:r}),(r.reviewStatus===o("WAWebProductCollection").PRODUCT_REVIEW_STATUS.PENDING||r.reviewStatus===o("WAWebProductCollection").PRODUCT_REVIEW_STATUS.REJECTED)&&a.push({itemKey:r.id.toString()+"_reviewBanner",collection:r,height:o("WAWebManageCollectionIntegrityBanner.react").getCollectionIntegrityHeight(r),reviewBanner:!0});else if(l)a.push({itemKey:"view_all",allItems:l});else if(i){var u={itemKey:i.id.toString()+"_"+t.toString(),product:i},c=o("WAWebNonEmptyString").asMaybeNonEmptyString(e.collectionId);c!=null&&(u.collectionId=c),a.push(u)}}),a},v=function(t,n){return o("WAWebUtilsLogQplEvents").qplStartProductView("Collection"),o("WAWebProductCatalogLogEvents").logCatalogListDetailClick({product:o("WAWebStateUtils").unproxy(t),catalogContext:o("WAWebProductCatalogContext").getProductCatalogContext(h)}),l(t,n)},S=function(t){s==null||s(t)},R=function(t){o("WAWebManageActions").handleProductDelete(g,t,o("WAWebProductCatalogContext").getProductCatalogContext(h),"Collection")},L=function(t){o("WAWebManageActions").handleProductVisibilityChange(g,t,o("WAWebProductCatalogContext").getProductCatalogContext(h),"Collections")};return o("useWAWebListener").useListeners(Array.from(y,function(e){return{source:e,eventOrEvents:["change:reviewStatus","canAppeal"],callback:f}})),c.jsx(r("WAWebFlatListContainer.react"),{flatListControllers:[C],children:c.jsx(p,{flatListController:C,direction:"vertical",forceConsistentRenderCount:!1,data:b(),renderItem:function(l){var e=l.allItems,s=l.collection,u=l.collectionId,d=l.product,m=l.reviewBanner,p=m===void 0?!1:m;return s?p?c.jsx(o("WAWebManageCollectionIntegrityBanner.react").CollectionIntegrityBanner,{collection:s,onEditCollection:i}):c.jsx(r("WAWebProductCollectionCollectionListItem.react"),{collection:s,onSeeAll:a}):e?c.jsx(r("WAWebProductCollectionCollectionListItem.react"),{allItems:e,onSeeAll:a}):d?c.jsx(r("WAWebProductCatalogListItem.react"),{collectionId:u,product:d,onCartOpen:n,onClick:function(){return v(d,u)},onProductShare:_?S:null,onProductDelete:R,onProductHideShow:L,theme:"product-of-collection",canManageCatalog:t}):null},defaultItemHeight:o("WAWebProductCatalogCatalogConstants").PRODUCT_LIST_ITEM_HEIGHT})})}_.displayName=_.name+" [from "+i.id+"]",l.default=_}),98); __d("WAWebProductCollectionCatalogViewDrawer.react",["fbt","WALogger","WAQplTypes","WAWebActionToast.react","WAWebActiveAccountInfoContext.react","WAWebAdvertisePill.react","WAWebBizCatalogUtils","WAWebBizGatingUtils","WAWebBusinessDirectConnectionCollection","WAWebBusinessDirectUtils","WAWebCartCollection","WAWebCatalogCollection","WAWebCatalogNuxBanners.react","WAWebClickableLink.react","WAWebContactGetters","WAWebDirectConnectionGatingUtils","WAWebDrawer.react","WAWebDrawerBody.react","WAWebDrawerContext","WAWebDrawerHeader.react","WAWebExternalLink.react","WAWebFaqUrl","WAWebFlatListController","WAWebFlatListLoadingSpinnerItem.react","WAWebFlex.react","WAWebInfoRefreshedIcon.react","WAWebLinkedCatalogHelper","WAWebManageAddItemCta.react","WAWebProductCatalogCatalogConstants","WAWebProductCatalogCatalogDrawerMenu.react","WAWebProductCatalogCheckCartEnabled","WAWebProductCatalogContext","WAWebProductCatalogFetchState","WAWebProductCatalogFetchStateTopBar.react","WAWebProductCatalogLogEvents","WAWebProductCatalogProductListDrawerHeader.react","WAWebProductCollectionCatalogCategoriesBanner","WAWebProductCollectionCatalogPostcodeMenu","WAWebProductCollectionsList.react","WAWebQplQuickPerformanceLoggerMarkerIds","WAWebQplQuickPerformanceLoggerModule","WAWebToastManager","WAWebUISpacing","WAWebUtilsLogQplEvents","WAWebWamEnumLwiEntryPoint","WDSText.react","asyncToGeneratorRuntime","react","stylex","useWAWebContactValues","useWAWebDebouncedCallback","useWAWebForceUpdate","useWAWebServerGatedAdEntryPoint","useWAWebThrottledCallback","useWAWebUnmountSignal"],(function(t,n,r,o,a,i,l,s){var e,u=["ref"],c,d,m,p=m||(m=o("react")),_=c||(c=r("react")),f=p.useContext,g=p.useEffect,h=p.useMemo,y=p.useState,C={list:{flex:"x1okw0bk",overflowX:"x6ikm8r",overflowY:"x10wlt62",$$css:!0}};function b(e){"use no forget";var t,n=e.businessDirectConnection,a=e.businessProfile,i=e.canManageCatalog,l=e.cartEnabled,u=e.catalog,c=e.catalogFetchState,m=e.catalogFlatListController,p=e.contact,f=e.dataSource,g=e.directConnectionPostcodeEnabled,h=e.handleCartClick,y=e.loadingDirectConnectionInfo,b=e.loadingMore,v=e.onAddProduct,R=e.onCartClick,L=e.onCollectionSeeAll,E=e.onEditCollection,k=e.onOpenCollections,I=e.onProductDetail,T=e.onProductShare,D=e.postcodeChangeSuccess,x=l&&R?h:void 0,$;i&&v&&!o("WAWebLinkedCatalogHelper").shouldHideComponentForSMBLinkedCatalog()&&($=_.jsx(r("WAWebManageAddItemCta.react"),{onClick:v,theme:"collections",testid:void 0}));var P;if(u&&i&&o("WAWebLinkedCatalogHelper").isLinkedCatalog(u.id)&&o("WAWebBizGatingUtils").isCatalogVariantsViewingEnabled()){var N=_.jsx(r("WAWebClickableLink.react"),{href:o("WAWebFaqUrl").getSMBLinkedCatalogUrl(),onClick:S,children:s._(/*BTDS*/"M\u00e1s informaci\u00f3n")});P=_.jsxs(o("WAWebFlex.react").FlexRow,{xstyle:[o("WAWebUISpacing").uiPadding.all15,o("WAWebUISpacing").uiPadding.start25],align:"center",children:[_.jsx(o("WAWebInfoRefreshedIcon.react").InfoRefreshedIcon,{xstyle:o("WAWebUISpacing").uiMargin.end4}),_.jsx(r("WDSText.react"),{type:"Body2",colorName:"contentDefault",children:s._(/*BTDS*/"Este es un cat\u00e1logo conectado. {learn_more_link}.",[s._param("learn_more_link",N)])})]})}var M;if(u&&i&&E&&!o("WAWebLinkedCatalogHelper").shouldHideComponentForSMBLinkedCatalog()){var w=u.productCollection.getProductModels(!0).some(function(e){return!e.isHidden&&e.reviewStatus!=="REJECTED"});M=w?_.jsx(r("WAWebManageAddItemCta.react"),{onClick:function(){E(null)},theme:"collections",title:s._(/*BTDS*/"A\u00f1adir una colecci\u00f3n nueva"),testid:void 0}):null}var A,F;return u&&f?(A=_.jsx(r("WAWebProductCollectionsList.react"),{onCartOpen:x,onProductDetail:I,flatListController:m,catalog:u,canManageCatalog:i,shareLinks:i,onProductShare:T,onCollectionSeeAll:L,data:f.getData(),onEditCollection:E}),i&&!o("WAWebLinkedCatalogHelper").shouldHideComponentForSMBLinkedCatalog()&&(F=_.jsx(r("WAWebCatalogNuxBanners.react"),{onOpenCollections:k}))):A=_.jsx(r("WAWebProductCatalogFetchStateTopBar.react"),{fetchState:c}),_.jsxs(_.Fragment,{children:[a&&_.jsxs(_.Fragment,{children:[_.jsx("div",{"data-testid":void 0,className:"x1okw0bk",children:_.jsx(r("WAWebProductCatalogProductListDrawerHeader.react"),{profilePicThumb:p.getProfilePicThumb(),contact:p,businessProfile:a})}),u&&o("WAWebBizGatingUtils").catalogCategoriesEnabled()&&(t=a.directConnection)!=null&&t.enabled?_.jsx(r("WAWebProductCollectionCatalogCategoriesBanner"),{catalog:u}):null,u&&g&&!y&&n&&_.jsx(o("WAWebProductCollectionCatalogPostcodeMenu").CatalogPostcodeMenu,{catalog:u,businessDirectConnection:n,postcodeChangeSuccess:D})]}),_.jsxs("div",babelHelpers.extends({"data-testid":void 0},(d||(d=r("stylex"))).props(C.list,o("WAWebUISpacing").uiPadding.bottom8,a&&o("WAWebUISpacing").uiMargin.top8),{children:[F,P,$,M,A,b&&_.jsx(r("WAWebFlatListLoadingSpinnerItem.react"),{})]}))]})}b.displayName=b.name+" [from "+i.id+"]";function v(t){"use no forget";var a=t.ref,i=babelHelpers.objectWithoutPropertiesLoose(t,u),l=i.autoUpdate,c=i.businessProfile,d=i.canLogQpl,m=d===void 0?!0:d,p=i.canManageCatalog,C=i.catalogId,v=i.contact,S=i.isInitialStep,R=S===void 0?!1:S,L=i.onAddProduct,E=i.onBack,k=i.onCartClick,I=i.onCatalogLinkClick,T=i.onCollectionSeeAll,D=i.onEditCollection,x=i.onOpenCollections,$=i.onOpenMerchantDetailsForm,P=i.onOpenSettings,N=i.onProductDetail,M=i.onProductShare,w=i.onRemoveProduct,A=i.scrollOffset,F=i.setScrollOffset,O=f(o("WAWebDrawerContext").DrawerContext),B=o("WAWebDirectConnectionGatingUtils").enablePostcodeInCatalog()&&!!c&&o("WAWebBusinessDirectUtils").businessSupportsPostcode(c),W=r("useWAWebUnmountSignal")(),q=o("useWAWebForceUpdate").useForceUpdateDONOTUSE(),U=r("useWAWebDebouncedCallback")(q,100),V=h(function(){return new(r("WAWebFlatListController"))},[]),H=o("useWAWebContactValues").useContactValues(v.id,[o("WAWebContactGetters").getId]),G=H[0],z=h(function(){return o("WAWebCartCollection").CartCollection.findCart(G.toString())},[G]),j=y(!1),K=j[0],Q=j[1],X=y(null),Y=X[0],J=X[1],Z=y(z.itemCount),ee=Z[0],te=Z[1],ne=y("NONE"),re=ne[0],oe=ne[1],ae=y(null),ie=ae[0],le=ae[1],se=y(null),ue=se[0],ce=se[1],de=y(!0),me=de[0],pe=de[1],_e=(function(){var e=n("asyncToGeneratorRuntime").asyncToGenerator(function*(e){yield e==null?void 0:e.loadInitialItems(),pe(!1)});return function(n){return e.apply(this,arguments)}})(),fe=r("useWAWebDebouncedCallback")(function(){q(),w==null||w()},100),ge=function(t){l&&t!=null&&(t.productCollection.on("add",U),t.productCollection.on("remove",fe),t.collections.on("add",U),t.collections.on("remove",U))},he=y(),ye=he[0],Ce=he[1],be=y(!1),ve=be[0],Se=be[1],Re=function(){var e=m,t=e?o("WAWebQplQuickPerformanceLoggerMarkerIds").QuickLogMarkerId.WHATSAPP_CATALOG_COLLECTIONS_VIEW:void 0;o("WAWebCatalogCollection").CatalogCollection.find(C,{markerId:t}).then(function(t){if(!W.aborted){var n=new(o("WAWebBizCatalogUtils")).CatalogWithCollectionsDataSource(t,p||!1,o("WAWebProductCatalogCatalogConstants").PRODUCT_LIST_ITEM_HEIGHT,e),r=new(o("WAWebBizCatalogUtils")).CatalogListItemScrollHelper(n);J(t),le(n),ce(r),oe("SUCCESS"),_e(n).then(function(){e&&o("WAWebQplQuickPerformanceLoggerModule").QPL.markerEnd(o("WAWebQplQuickPerformanceLoggerMarkerIds").QuickLogMarkerId.WHATSAPP_CATALOG_COLLECTIONS_VIEW,o("WAQplTypes").QuickLogActionType.SUCCESS)}).catch(function(){e&&o("WAWebQplQuickPerformanceLoggerModule").QPL.markerEnd(o("WAWebQplQuickPerformanceLoggerMarkerIds").QuickLogMarkerId.WHATSAPP_CATALOG_COLLECTIONS_VIEW,o("WAQplTypes").QuickLogActionType.FAIL)}),ge(t),A!==void 0&&V.setScrollFromStart(A)}}).catch(function(t){e&&o("WAWebQplQuickPerformanceLoggerModule").QPL.markerEnd(o("WAWebQplQuickPerformanceLoggerMarkerIds").QuickLogMarkerId.WHATSAPP_CATALOG_COLLECTIONS_VIEW,o("WAQplTypes").QuickLogActionType.FAIL),o("WAWebProductCatalogFetchState").parseErrorState(t,function(e){oe(e),pe(!1)})})},Le=function(){if(B){Se(!0);var e=new(o("WAWebActionToast.react")).ActionType(s._(/*BTDS*/"Buscando cat\u00e1logo\u2026")),t=r("WAWebBusinessDirectConnectionCollection").getCypher(C).then(function(e){Ce(e),Se(!1),Re()}).catch(function(){throw pe(!1),new(o("WAWebActionToast.react")).ActionType(s._(/*BTDS*/"No se pudo encontrar el cat\u00e1logo."))});o("WAWebToastManager").ToastManager.open(_.jsx(o("WAWebActionToast.react").ActionToast,{initialAction:e,pendingAction:t}))}else Re()};g(function(){Le(),r("WAWebProductCatalogCheckCartEnabled")(C).then(function(e){Q(e),e&&z.on("change:cartItemCollection",function(){return te(z.itemCount)}),o("WAWebProductCatalogLogEvents").logCatalogListView({catalogOwnerWid:C,catalogContext:o("WAWebProductCatalogContext").getProductCatalogContext(O),cartToggle:e})}).catch(function(){o("WALogger").ERROR(e||(e=babelHelpers.taggedTemplateLiteralLoose(["[WAWebProductCollectionCatalogViewDrawer] cartEnabled \u2717"])))})},[]);var Ee=r("useWAWebThrottledCallback")(function(e,t){F==null||F(t.scrollTop),ue!=null&&ue.willLoadMore(t)&&pe(!0),ue==null||ue.onScroll(e,t).then(function(e){e&&pe(!1)}).catch(function(e){throw pe(!1),e})},100),ke=function(t){Ee(t,t.currentTarget)},Ie=function(){o("WAWebUtilsLogQplEvents").qplStartCartView("Catalog"),k==null||k(G.toString())},Te=function(){Y&&(I(Y,v),o("WAWebProductCatalogLogEvents").logCatalogShareLinkClick({catalogOwnerWid:C,catalogContext:o("WAWebProductCatalogContext").getProductCatalogContext(O)}))},De=o("WAWebActiveAccountInfoContext.react").getActiveAccountInfo(),xe=o("useWAWebServerGatedAdEntryPoint").useServerGatedAdEntryPoint("whatsapp_smb_web_catalog",De),$e=xe[0],Pe=xe[1],Ne={};R?Ne.onCancel=E:Ne.onBack=E;var Me,we;if(p===!0&&De!=null&&(De!=="not-linked"||o("WAWebBizGatingUtils").nativeAdsCreationEnabledNoExposure())&&!$e&&o("WAWebBizGatingUtils").adCreationEntryPointCatalogEnabled()){var Ae=Y==null?void 0:Y.getMostRecentlyApprovedProduct(),Fe=Ae==null?void 0:Ae.id.toString();if(Fe!=null){var Oe={activeAccountInfo:De,sourceAdCreation:"whatsapp_smb_web_catalog",productId:Fe};o("WAWebBizGatingUtils").adCreationEntryPointCatalogProductEnabled()?we={adCreationUrlInput:Oe,ctaText:Pe==null?void 0:Pe.content}:Me=_.jsx(o("WAWebFlex.react").FlexRow,{children:_.jsx(r("WAWebAdvertisePill.react"),{ctaText:Pe==null?void 0:Pe.content,adCreationUrlInput:Oe,lwiEntryPoint:o("WAWebWamEnumLwiEntryPoint").LWI_ENTRY_POINT.SMB_CATALOG_LIST_ADVERTISE_BUTTON})})}}var Be=o("WAWebProductCatalogCatalogDrawerMenu.react").getCatalogDrawerMenu({onSendCatalog:Te,onCartClick:K?Ie:void 0,cartCount:ee,catalogId:C.toString(),canManageCatalog:p,onOpenCollections:x,onOpenMerchantDetailsForm:$,onOpenSettings:P,boostMenuOptionInput:we}),We=h(function(){return{surface:p?"smb-catalog":"catalog-home"}},[p]);return _.jsxs(r("WAWebDrawer.react"),{ref:a,theme:"products",onDrop:E,tsNavigationData:We,children:[_.jsx(o("WAWebDrawerHeader.react").DrawerHeader,babelHelpers.extends({title:s._(/*BTDS*/"Cat\u00e1logo"),type:o("WAWebDrawerHeader.react").DRAWER_HEADER_TYPE.SMALL,menu:Be,focusBackOrCancel:!0},Ne,{children:Me})),_.jsx(r("WAWebDrawerBody.react"),{onScroll:ke,flatListControllers:[V],children:_.jsx(b,{cartEnabled:K,contact:v,handleCartClick:Ie,onProductDetail:N,onCartClick:k,catalog:Y,dataSource:ie,businessProfile:c,canManageCatalog:p,onAddProduct:L,onProductShare:M,onCollectionSeeAll:T,onOpenCollections:x,onEditCollection:D,catalogFlatListController:V,catalogFetchState:re,directConnectionPostcodeEnabled:B,loadingDirectConnectionInfo:ve,businessDirectConnection:ye,loadingMore:me,postcodeChangeSuccess:function(){o("WAWebCatalogCollection").CatalogCollection.removeCatalog(C),J(null),le(null),ce(null),oe("NONE"),pe(!0),Le()}})})]})}v.displayName=v.name+" [from "+i.id+"]";function S(e){e.preventDefault(),o("WAWebExternalLink.react").openExternalLink(o("WAWebFaqUrl").getSMBLinkedCatalogUrl())}l.default=v}),226); __d("WAWebProductCollectionCollectionContentDrawer.react",["fbt","WALogger","WAQplTypes","WAWebBizCatalogUtils","WAWebCartCollection","WAWebCatalogCollection","WAWebContactGetters","WAWebDrawer.react","WAWebDrawerBody.react","WAWebDrawerContext","WAWebDrawerHeader.react","WAWebFlatListController","WAWebFlatListLoadingSpinnerItem.react","WAWebManageAddItemCta.react","WAWebManageCollectionIntegrityBanner.react","WAWebProductCatalogCatalogConstants","WAWebProductCatalogCatalogDrawerMenu.react","WAWebProductCatalogCheckCartEnabled","WAWebProductCatalogContext","WAWebProductCatalogFetchState","WAWebProductCatalogFetchStateTopBar.react","WAWebProductCollectionLogEvents","WAWebProductCollectionsList.react","WAWebQplQuickPerformanceLoggerMarkerIds","WAWebQplQuickPerformanceLoggerModule","WAWebUtilsLogQplEvents","asyncToGeneratorRuntime","react","useWAWebContactValues","useWAWebDebouncedCallback","useWAWebForceUpdate","useWAWebListener","useWAWebUnmountSignal"],(function(t,n,r,o,a,i,l,s){var e,u=["ref"],c,d,m=d||(d=o("react")),p=c||(c=r("react")),_=m.useContext,f=m.useEffect,g=m.useMemo,h=m.useState;function y(e){var t=e.canManageCatalog,n=e.cartEnabled,a=e.catalog,i=e.catalogFetchState,l=e.collection,u=e.collectionFlatListController,c=e.dataSource,d=e.handleCartClick,m=e.loadingMore,_=e.onCartClick,f=e.onEditCollection,g=e.onProductDetail,h=e.onProductShare,y=n&&_?d:void 0;if(!a||!c)return p.jsx(r("WAWebProductCatalogFetchStateTopBar.react"),{fetchState:i});var C=c.getData();if(C.length===0&&!m&&t&&l)return p.jsxs("div",{className:"x1okw0bk x12xbjc7 x6ikm8r x10wlt62",children:[p.jsx(r("WAWebManageAddItemCta.react"),{theme:"collections",onClick:function(){f==null||f(l)},testid:void 0}),p.jsx("div",{className:"xqy66fx x1q3ajuy xr1496l x1gx403c x101yacv",children:s._(/*BTDS*/"Los clientes no podr\u00e1n ver esta colecci\u00f3n a menos que a\u00f1adas al menos un art\u00edculo.")})]});var b=p.jsx(r("WAWebProductCollectionsList.react"),{onCartOpen:y,onProductDetail:g,flatListController:u,catalog:a,canManageCatalog:t,shareLinks:t,onProductShare:h,collectionId:l==null?void 0:l.id.toString(),data:C}),v=l?p.jsx(o("WAWebManageCollectionIntegrityBanner.react").CollectionIntegrityBanner,{collection:l,onEditCollection:f}):void 0;return p.jsxs("div",{className:"x1okw0bk x12xbjc7 x6ikm8r x10wlt62",children:[v,b,m&&p.jsx(r("WAWebFlatListLoadingSpinnerItem.react"),{})]})}y.displayName=y.name+" [from "+i.id+"]";function C(t){"use no forget";var a,i=t.ref,l=babelHelpers.objectWithoutPropertiesLoose(t,u),c=l.canManageCatalog,d=l.catalogId,m=l.collection,C=l.contact,b=l.onCartClick,v=l.onCatalogLinkClick,S=l.onEditCollection,R=l.onProductDetail,L=l.onProductShare,E=l.scrollOffset,k=l.setScrollOffset,I=o("useWAWebForceUpdate").useForceUpdateDONOTUSE(),T=r("useWAWebUnmountSignal")(),D=_(o("WAWebDrawerContext").DrawerContext),x=o("useWAWebContactValues").useContactValues(C.id,[o("WAWebContactGetters").getId]),$=x[0],P=g(function(){return o("WAWebCartCollection").CartCollection.findCart($.toString())},[$]),N=g(function(){return new(r("WAWebFlatListController"))},[]),M=h(!1),w=M[0],A=M[1],F=h(null),O=F[0],B=F[1],W=h(P.itemCount),q=W[0],U=W[1],V=h("NONE"),H=V[0],G=V[1],z=h(null),j=z[0],K=z[1],Q=h(null),X=Q[0],Y=Q[1],J=h(!0),Z=J[0],ee=J[1];o("useWAWebListener").useListener(m==null?void 0:m.productCollection,["add","remove"],I),o("useWAWebListener").useListener(O==null?void 0:O.productCollection,["add","remove"],I),o("useWAWebListener").useListener(O==null?void 0:O.collections,["add","remove"],I),o("useWAWebListener").useListener(m,["change:reviewStatus","canAppeal"],I);var te=(function(){var e=n("asyncToGeneratorRuntime").asyncToGenerator(function*(e){yield e==null?void 0:e.loadInitialItems(),ee(!1),o("WAWebProductCollectionLogEvents").logCollectionSeeAllView({catalogOwnerJid:d.toString(),catalogContext:o("WAWebProductCatalogContext").getProductCatalogContext(D),collectionId:e==null?void 0:e.collectionId})});return function(n){return e.apply(this,arguments)}})(),ne=function(){o("WAWebCatalogCollection").CatalogCollection.find(d).then(function(e){if(!T.aborted){B(e),G("SUCCESS");var t=new(o("WAWebBizCatalogUtils")).SingleCollectionDataSource(e,m==null?void 0:m.id.toString(),c||!1,o("WAWebProductCatalogCatalogConstants").PRODUCT_LIST_ITEM_HEIGHT),n=new(o("WAWebBizCatalogUtils")).CatalogListItemScrollHelper(t);K(t),Y(n),te(t).then(function(){o("WAWebQplQuickPerformanceLoggerModule").QPL.markerEnd(o("WAWebQplQuickPerformanceLoggerMarkerIds").QuickLogMarkerId.WHATSAPP_COLLECTION_VIEW_ALL,o("WAQplTypes").QuickLogActionType.SUCCESS)}).catch(function(){o("WAWebQplQuickPerformanceLoggerModule").QPL.markerEnd(o("WAWebQplQuickPerformanceLoggerMarkerIds").QuickLogMarkerId.WHATSAPP_COLLECTION_VIEW_ALL,o("WAQplTypes").QuickLogActionType.FAIL)}),E!==void 0&&N.setScrollFromStart(E)}}).catch(function(e){o("WAWebQplQuickPerformanceLoggerModule").QPL.markerEnd(o("WAWebQplQuickPerformanceLoggerMarkerIds").QuickLogMarkerId.WHATSAPP_COLLECTION_VIEW_ALL,o("WAQplTypes").QuickLogActionType.FAIL),o("WAWebProductCatalogFetchState").parseErrorState(e,function(e){G(e),ee(!1)})})},re=function(){var e=P.itemCount;q!==e&&U(e)};f(function(){ne(),r("WAWebProductCatalogCheckCartEnabled")(d).then(function(e){A(e),e&&P.on("all",re)}).catch(function(t){o("WALogger").ERROR(e||(e=babelHelpers.taggedTemplateLiteralLoose(["[product-catalog] failed to check cart enabled"])))})},[]);var oe=function(){o("WAWebUtilsLogQplEvents").qplStartCartView("Collection"),b==null||b($.toString())},ae=function(){O&&v(O,C)},ie=r("useWAWebDebouncedCallback")(function(e,t){k==null||k(t.scrollTop),X!=null&&X.willLoadMore(t)&&ee(!0),X==null||X.onScroll(e,t).then(function(e){e&&ee(!1)}).catch(function(e){throw ee(!1),e})},100),le=function(t){ie(t,t.currentTarget)},se=o("WAWebProductCatalogCatalogDrawerMenu.react").getCatalogDrawerMenu({onSendCatalog:ae,onCartClick:w?oe:void 0,cartCount:P.itemCount,catalogId:d.toString(),canManageCatalog:c}),ue=((a=l.collection)==null?void 0:a.name)||s._(/*BTDS*/"Todos los art\u00edculos"),ce=g(function(){return{surface:c?"smb-catalog-collection-products":"catalog-collection"}},[c]);return p.jsxs(r("WAWebDrawer.react"),{ref:i,theme:"products",onDrop:l.onBack,tsNavigationData:ce,children:[p.jsx(o("WAWebDrawerHeader.react").DrawerHeader,{title:ue,type:l.headerType||o("WAWebDrawerHeader.react").DRAWER_HEADER_TYPE.SMALL,onBack:l.onBack,menu:se}),p.jsx(r("WAWebDrawerBody.react"),{flatListControllers:[N],onScroll:le,children:p.jsx(y,{cartEnabled:w,onCartClick:b,handleCartClick:oe,catalog:O,dataSource:j,catalogFetchState:H,loadingMore:Z,canManageCatalog:c,collection:m,onProductDetail:R,onProductShare:L,onEditCollection:S,collectionFlatListController:N})})]})}C.displayName=C.name+" [from "+i.id+"]",l.default=C}),226); __d("WAWebPttAudioTag.react",["WANullthrows","WAWebAddOnBubbleType","WAWebAddOnBubblesContainer.react","WAWebDebounce","WAWebDomVideoDisposeMediaPlayer","WAWebGetDisplayType","WAWebMsgGetters","WAWebPttAudioChannels","WAWebSocketConstants","WAWebSocketModel","WAWebUA","WAWebUserPrefsGeneral","react","useWAWebInterval","useWAWebListener","useWAWebMsgValues"],(function(t,n,r,o,a,i,l){var e,s,u=s||(s=o("react")),c=e||(e=r("react")),d=u.useEffect,m=u.useRef,p=r("WAWebDebounce")(function(e,t){o("WAWebUserPrefsGeneral").setMediaVolumeSettings(e,t)},500);function _(e){var t=e.autoPlay,n=e.onError,a=e.playbackRate,i=e.refAudio,l=e.url,s=m(0),u=m(null),_=m(null),f=o("useWAWebMsgValues").useMsgValues(e.msg.id,[o("WAWebMsgGetters").getIsSentByMe]),g=f[0],h=function(){var e=u.current;_.current==null||_.current(),_.current=e==null?null:o("WAWebPttAudioChannels").MainAudioChannel.registerMedia(e)},y=function(t){L(),n==null||n(t.target.src)},C=function(){L()},b=function(){if(o("WAWebSocketModel").Socket.state===o("WAWebSocketConstants").SOCKET_STATE.CONNECTED){if(s.current++,s.current>40){y({target:{src:l,error:{code:window.MediaError.MEDIA_ERR_NETWORK}}});return}var e=r("WANullthrows")(u.current),t=e.buffered;t.length&&t.end(0)>0&&C()}},v=r("useWAWebInterval")(b,250),S=v[0],R=v[1];function L(){R(),s.current=0}var E=function(){s.current=0,S()},k=function(){var e=u.current;e&&(e.defaultPlaybackRate!==a||e.playbackRate!==a)&&(e.defaultPlaybackRate=e.playbackRate=a!=null?a:1)};d(function(){h(),k(),i==null||i(u)},void 0),o("useWAWebListener").useListener(u.current,"error",y,{capture:!0}),o("useWAWebListener").useListener(u.current,"playing",C),d(function(){var e=function(){var e=u.current;if(e){var t=o("WAWebUserPrefsGeneral").getMediaVolumeSettings(),n=t.muted,r=t.volume;r!=null&&(e.volume=r),e.muted=n}};e(),h(),i==null||i(u);var n=u.current;return(o("WAWebUA").UA.isGecko||o("WAWebUA").UA.isSafari)&&t&&E(),function(){_.current==null||_.current(),p.flush(),o("WAWebUA").UA.isBlink&&n&&r("WAWebDomVideoDisposeMediaPlayer")(n)}},[]);var I=function(){var e=u.current;e&&p(e.volume,e.muted)};o("useWAWebListener").useListener((o("WAWebUA").UA.isGecko||o("WAWebUA").UA.isSafari)&&!t?u.current:null,"play",E);var T=o("WAWebGetDisplayType").getDisplayType(e.msg);return c.jsxs("div",{className:e.className,"data-testid":void 0,children:[c.jsx("audio",{ref:u,className:"xh8yej3",src:e.url,onClick:e.onClick,controls:e.controls,preload:e.preload,onVolumeChange:I,autoPlay:e.autoPlay,children:e.children}),c.jsx(r("WAWebAddOnBubblesContainer.react"),{isOutgoingMsg:g,displayType:T,bubbleType:o("WAWebAddOnBubbleType").AddOnBubbleType.MEDIA_VIEWER,parentIds:[e.msg.id.toString()]})]})}_.displayName=_.name+" [from "+i.id+"]",l.default=_}),98); __d("WAWebTextWithLearnMoreLink",["fbt","WAWebClickableLink.react","react"],(function(t,n,r,o,a,i,l,s){"use strict";var e,u=e||(e=r("react"));function c(e){var t=e.handleClick,n=e.text;return u.jsxs(u.Fragment,{children:[n,t!=null&&u.jsxs(u.Fragment,{children:["\xA0",u.jsx(r("WAWebClickableLink.react"),{onClick:t,children:s._(/*BTDS*/"M\u00e1s informaci\u00f3n")})]})]})}c.displayName=c.name+" [from "+i.id+"]",l.default=c}),226); __d("WAWebValidationUtils",["WAWebURLUtils"],(function(t,n,r,o,a,i,l){var e=new RegExp(/^[a-z0-9!#$%&\'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&\'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?/),s=new RegExp(/^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/i),u=function(n){return n==null||n===""||e.test(n)},c=function(t){return t==null||t===""||r("WAWebURLUtils").URL_REGEX.test(t)},d=function(t){return t==null||t.trim()!==""&&s.test(t.trim())};l.validateEmail=u,l.validateURL=c,l.validateUUID=d}),98); __d("WAWebWamGroupMetadataMetricUtils_WORKER_INCOMPATIBLE",["WAWebGroupMetadataCollection","WAWebWamGroupMetricUtils"],(function(t,n,r,o,a,i,l){function e(e){return e.isGroup()?r("WAWebGroupMetadataCollection").get(e):null}function s(t){if(t!=null&&t.isGroup()){var n=e(t);if(n!=null)return o("WAWebWamGroupMetricUtils").getGroupCountMetricsFromGroupMetadata(n)}}l.getGroupCountMetricsFromChatWid=s}),98); __d("WDSIconIcMoreVert.react",["WDSSvgComponentBase.react","react","stylex"],(function(t,n,r,o,a,i,l){var e=["height","iconXstyle","viewBox","width"],s,u,c=s||(s=r("react")),d="ic-more-vert";function m(t){var n=t.height,o=t.iconXstyle,a=t.viewBox,i=t.width,l=babelHelpers.objectWithoutPropertiesLoose(t,e),s;if(a){var m=a.height,p=m===void 0?0:m,_=a.width,f=_===void 0?0:_,g=a.x,h=g===void 0?0:g,y=a.y,C=y===void 0?0:y;s=[h,C,f,p].join(" ")}var b=24,v=24;return(n!=null||i!=null)&&(b=n,v=i),c.jsx(r("WDSSvgComponentBase.react"),babelHelpers.extends({},l,{children:c.jsxs("svg",{viewBox:s!=null?s:"0 0 24 24",height:b,width:v,preserveAspectRatio:"xMidYMid meet",className:(u||(u=r("stylex")))(o),fill:"none",children:[c.jsx("title",{children:d}),c.jsx("path",{d:"M12 20C11.45 20 10.9792 19.8042 10.5875 19.4125C10.1958 19.0208 10 18.55 10 18C10 17.45 10.1958 16.9792 10.5875 16.5875C10.9792 16.1958 11.45 16 12 16C12.55 16 13.0208 16.1958 13.4125 16.5875C13.8042 16.9792 14 17.45 14 18C14 18.55 13.8042 19.0208 13.4125 19.4125C13.0208 19.8042 12.55 20 12 20ZM12 14C11.45 14 10.9792 13.8042 10.5875 13.4125C10.1958 13.0208 10 12.55 10 12C10 11.45 10.1958 10.9792 10.5875 10.5875C10.9792 10.1958 11.45 10 12 10C12.55 10 13.0208 10.1958 13.4125 10.5875C13.8042 10.9792 14 11.45 14 12C14 12.55 13.8042 13.0208 13.4125 13.4125C13.0208 13.8042 12.55 14 12 14ZM12 8C11.45 8 10.9792 7.80417 10.5875 7.4125C10.1958 7.02083 10 6.55 10 6C10 5.45 10.1958 4.97917 10.5875 4.5875C10.9792 4.19583 11.45 4 12 4C12.55 4 13.0208 4.19583 13.4125 4.5875C13.8042 4.97917 14 5.45 14 6C14 6.55 13.8042 7.02083 13.4125 7.4125C13.0208 7.80417 12.55 8 12 8Z",fill:"currentColor"})]})}))}m.displayName=m.name+" [from "+i.id+"]",l.default=m}),98); __d("useWAWebPrivacyTipQuickPromotion",["WAWebSettingsConst","useWAWebBestQuickPromotionForSurface"],(function(t,n,r,o,a,i,l){function e(e,t){var n=o("useWAWebBestQuickPromotionForSurface").useBestQuickPromotionForSurface(e,{fireImpression:!0},t);if(n!=null){var r=n.promotion,a=r.promotion.data.primaryAction,i;return a!=null&&a.deepLink!=null&&(i=o("WAWebSettingsConst").SettingsSteps.cast(a.deepLink)),babelHelpers.extends({},n,{settingStep:i!=null?i:o("WAWebSettingsConst").SettingsSteps.Settings})}}l.usePrivacyTipQuickPromotion=e}),98);