-
Notifications
You must be signed in to change notification settings - Fork 31
/
42745.cfe88dc0.iframe.bundle.js
1 lines (1 loc) · 72.2 KB
/
42745.cfe88dc0.iframe.bundle.js
1
"use strict";(globalThis.webpackChunkmetamask_crx=globalThis.webpackChunkmetamask_crx||[]).push([[42745],{"./ui/components/ui/tabs/snaps/dropdown-tab/index.js":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{__webpack_require__.d(__webpack_exports__,{A:()=>dropdown_tab});var react=__webpack_require__("./node_modules/react/index.js"),prop_types=__webpack_require__("./node_modules/prop-types/index.js"),prop_types_default=__webpack_require__.n(prop_types),classnames=__webpack_require__("./node_modules/classnames/index.js"),classnames_default=__webpack_require__.n(classnames),design_system=__webpack_require__("./ui/helpers/constants/design-system.ts"),component_library=__webpack_require__("./ui/components/component-library/index.ts"),dropdown=__webpack_require__("./ui/components/ui/dropdown/index.js");function _array_like_to_array(arr,len){(null==len||len>arr.length)&&(len=arr.length);for(var i=0,arr2=Array(len);i<len;i++)arr2[i]=arr[i];return arr2}function _array_with_holes(arr){if(Array.isArray(arr))return arr}function _define_property(obj,key,value){return key in obj?Object.defineProperty(obj,key,{value:value,enumerable:!0,configurable:!0,writable:!0}):obj[key]=value,obj}function _iterable_to_array_limit(arr,i){var _s,_e,_i=null==arr?null:"undefined"!=typeof Symbol&&arr[Symbol.iterator]||arr["@@iterator"];if(null!=_i){var _arr=[],_n=!0,_d=!1;try{for(_i=_i.call(arr);!(_n=(_s=_i.next()).done)&&(_arr.push(_s.value),!i||_arr.length!==i);_n=!0);}catch(err){_d=!0,_e=err}finally{try{_n||null==_i.return||_i.return()}finally{if(_d)throw _e}}return _arr}}function _non_iterable_rest(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _sliced_to_array(arr,i){return _array_with_holes(arr)||_iterable_to_array_limit(arr,i)||_unsupported_iterable_to_array(arr,i)||_non_iterable_rest()}function _unsupported_iterable_to_array(o,minLen){if(o){if("string"==typeof o)return _array_like_to_array(o,minLen);var n=Object.prototype.toString.call(o).slice(8,-1);if("Object"===n&&o.constructor&&(n=o.constructor.name),"Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return _array_like_to_array(o,minLen)}}var DropdownTab=function(param){var _options_find,activeClassName=param.activeClassName,className=param.className,dataTestId=param["data-testid"],isActive=param.isActive,onClick=param.onClick,onChange=param.onChange,tabIndex=param.tabIndex,options=param.options,selectedOption=param.selectedOption,_useState=_sliced_to_array((0,react.useState)(!1),2),isOpen=_useState[0],setIsOpen=_useState[1],dropdownRef=(0,react.useRef)(null),selectOption=(0,react.useCallback)(function(option){onChange(option)},[onChange]),selectedOptionName=null===(_options_find=options.find(function(option){return option.value===selectedOption}))||void 0===_options_find?void 0:_options_find.name;return(0,react.useEffect)(function(){var handleClickOutside=function handleClickOutside(event){dropdownRef.current&&!dropdownRef.current.contains(event.target)&&isOpen&&setIsOpen(!1)};return document.addEventListener("mousedown",handleClickOutside),function(){document.removeEventListener("mousedown",handleClickOutside)}},[dropdownRef,isOpen]),react.createElement(component_library.az,{as:"li",className:classnames_default()("tab",className,"transaction-insight-dropdown-wrapper",_define_property({"tab--active":isActive},activeClassName,activeClassName&&isActive)),"data-testid":dataTestId,onClick:function(event){event.preventDefault(),onClick(tabIndex)},dataTestId:dataTestId,flexDirection:design_system.bo.Row,flexWrap:design_system.I4.NoWrap,height:design_system.Zf.Full,style:{cursor:"pointer",position:"relative",overflow:"visible"},title:selectedOptionName},react.createElement(dropdown.A,{className:"transaction-insight-dropdown",onChange:function(option){return selectOption(option)},options:options,selectedOption:selectedOption,title:"Transaction Insights",style:{pointerEvents:isActive?"auto":"none",fontFamily:"var(--typography-s-body-md-font-family)",fontWeight:"var(--typography-s-body-md-font-weight)",fontSize:"var(--typography-s-body-md-font-size)",lineHeight:"var(--typography-s-body-md-line-height)",letterSpacing:"var(--typography-s-body-md-letter-spacing)"}}))};DropdownTab.propTypes={activeClassName:prop_types_default().string,className:prop_types_default().string,"data-testid":prop_types_default().string,isActive:prop_types_default().bool,options:prop_types_default().arrayOf(prop_types_default().exact({name:prop_types_default().string,value:prop_types_default().string.isRequired})).isRequired,selectedOption:prop_types_default().string,onChange:prop_types_default().func,onClick:prop_types_default().func,tabIndex:prop_types_default().number},DropdownTab.defaultProps={activeClassName:void 0,className:void 0,onChange:void 0,onClick:void 0,selectedOption:void 0},DropdownTab.__docgenInfo={description:"",methods:[],displayName:"DropdownTab",props:{activeClassName:{defaultValue:{value:"undefined",computed:!0},description:"",type:{name:"string"},required:!1},className:{defaultValue:{value:"undefined",computed:!0},description:"",type:{name:"string"},required:!1},onChange:{defaultValue:{value:"undefined",computed:!0},description:"",type:{name:"func"},required:!1},onClick:{defaultValue:{value:"undefined",computed:!0},description:"",type:{name:"func"},required:!1},selectedOption:{defaultValue:{value:"undefined",computed:!0},description:"",type:{name:"string"},required:!1},"data-testid":{description:"",type:{name:"string"},required:!1},isActive:{description:"",type:{name:"bool"},required:!1},options:{description:"",type:{name:"arrayOf",value:{name:"exact",value:{name:{name:"string",required:!1},value:{name:"string",required:!0}}}},required:!0},tabIndex:{description:"",type:{name:"number"},required:!1}}};let dropdown_tab=DropdownTab;DropdownTab.__docgenInfo={description:"",methods:[],displayName:"DropdownTab",props:{activeClassName:{defaultValue:{value:"undefined",computed:!0},description:"",type:{name:"string"},required:!1},className:{defaultValue:{value:"undefined",computed:!0},description:"",type:{name:"string"},required:!1},onChange:{defaultValue:{value:"undefined",computed:!0},description:"",type:{name:"func"},required:!1},onClick:{defaultValue:{value:"undefined",computed:!0},description:"",type:{name:"func"},required:!1},selectedOption:{defaultValue:{value:"undefined",computed:!0},description:"",type:{name:"string"},required:!1},"data-testid":{description:"",type:{name:"string"},required:!1},isActive:{description:"",type:{name:"bool"},required:!1},options:{description:"",type:{name:"arrayOf",value:{name:"exact",value:{name:{name:"string",required:!1},value:{name:"string",required:!0}}}},required:!0},tabIndex:{description:"",type:{name:"number"},required:!1}}}},"./ui/hooks/snaps/useInsightSnaps.js":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{__webpack_require__.d(__webpack_exports__,{P:()=>useInsightSnaps});var react_redux__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/react-redux/es/index.js"),_metamask_snaps_sdk__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./node_modules/@metamask/snaps-sdk/dist/types/handlers/transaction.mjs"),_selectors__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./ui/selectors/index.js");function useInsightSnaps(id){var insight=(0,react_redux__WEBPACK_IMPORTED_MODULE_0__.d4)(function(state){return(0,_selectors__WEBPACK_IMPORTED_MODULE_1__.wOE)(state,id)}),data=insight?Object.values(insight):[],warnings=data.filter(function(result){return result.severity===_metamask_snaps_sdk__WEBPACK_IMPORTED_MODULE_2__.O.Critical});return{data:data,warnings:warnings}}},"./ui/pages/confirmations/components/confirm-page-container/confirm-detail-row/index.js":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{__webpack_require__.d(__webpack_exports__,{A:()=>confirm_detail_row_component});var react=__webpack_require__("./node_modules/react/index.js"),prop_types=__webpack_require__("./node_modules/prop-types/index.js"),prop_types_default=__webpack_require__.n(prop_types),classnames=__webpack_require__("./node_modules/classnames/index.js"),classnames_default=__webpack_require__.n(classnames),user_preferenced_currency_display=__webpack_require__("./ui/components/app/user-preferenced-currency-display/index.js"),common=__webpack_require__("./ui/helpers/constants/common.ts"),ConfirmDetailRow=function(props){var label=props.label,primaryText=props.primaryText,secondaryText=props.secondaryText,onHeaderClick=props.onHeaderClick,primaryValueTextColor=props.primaryValueTextColor,headerText=props.headerText,headerTextClassName=props.headerTextClassName,value=props.value;return react.createElement("div",{className:"confirm-detail-row"},react.createElement("div",{className:"confirm-detail-row__label"},label),react.createElement("div",{className:"confirm-detail-row__details"},headerText&&react.createElement("div",{className:classnames_default()("confirm-detail-row__header-text",headerTextClassName),onClick:function(){return null==onHeaderClick?void 0:onHeaderClick()}},headerText),primaryText?react.createElement("div",{className:"confirm-detail-row__primary",style:{color:primaryValueTextColor}},primaryText):react.createElement(user_preferenced_currency_display.A,{className:"confirm-detail-row__primary",type:common.jd,value:value,showEthLogo:!0,style:{color:primaryValueTextColor},hideLabel:!0}),secondaryText?react.createElement("div",{className:"confirm-detail-row__secondary"},secondaryText):react.createElement(user_preferenced_currency_display.A,{className:"confirm-detail-row__secondary",type:common.lS,value:value,showEthLogo:!0,hideLabel:!0})))};ConfirmDetailRow.propTypes={headerText:prop_types_default().string,headerTextClassName:prop_types_default().string,label:prop_types_default().string,onHeaderClick:prop_types_default().func,primaryValueTextColor:prop_types_default().string,primaryText:prop_types_default().oneOfType([prop_types_default().string,prop_types_default().node]),secondaryText:prop_types_default().string,value:prop_types_default().string};let confirm_detail_row_component=ConfirmDetailRow;ConfirmDetailRow.__docgenInfo={description:"",methods:[],displayName:"ConfirmDetailRow",props:{headerText:{description:"",type:{name:"string"},required:!1},headerTextClassName:{description:"",type:{name:"string"},required:!1},label:{description:"",type:{name:"string"},required:!1},onHeaderClick:{description:"",type:{name:"func"},required:!1},primaryValueTextColor:{description:"",type:{name:"string"},required:!1},primaryText:{description:"",type:{name:"union",value:[{name:"string"},{name:"node"}]},required:!1},secondaryText:{description:"",type:{name:"string"},required:!1},value:{description:"",type:{name:"string"},required:!1}}}},"./ui/pages/confirmations/components/confirm-page-container/confirm-page-container-content/confirm-page-container-summary/index.js":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{__webpack_require__.d(__webpack_exports__,{A:()=>confirm_page_container_summary_component});var react=__webpack_require__("./node_modules/react/index.js"),es=__webpack_require__("./node_modules/react-redux/es/index.js"),prop_types=__webpack_require__("./node_modules/prop-types/index.js"),prop_types_default=__webpack_require__.n(prop_types),classnames=__webpack_require__("./node_modules/classnames/index.js"),classnames_default=__webpack_require__.n(classnames),types=__webpack_require__("./node_modules/@metamask/transaction-controller/dist/types.mjs"),hexstring_utils=__webpack_require__("./shared/modules/hexstring-utils.ts"),useI18nContext=__webpack_require__("./ui/hooks/useI18nContext.js"),selectors=__webpack_require__("./ui/selectors/index.js"),util=__webpack_require__("./ui/helpers/utils/util.js");let hooks_useAddressDetails=function(toAddress){var _tokenList_toAddress_toLowerCase,addressBook=(0,es.d4)(selectors.U$O),accounts=(0,es.d4)(selectors.atg),tokenList=(0,es.d4)(selectors.iM3),checksummedAddress=(0,hexstring_utils.sX)(toAddress);if(!toAddress)return{};var toAccount=accounts.find(function(account){return(0,hexstring_utils.sX)(account.address)===checksummedAddress}),addressBookEntryObject=addressBook.find(function(entry){return entry.address===checksummedAddress});return(null==addressBookEntryObject?void 0:addressBookEntryObject.name)?{toName:addressBookEntryObject.name,isTrusted:!0}:toAccount?{toName:toAccount.metadata.name,isTrusted:!0}:(null===(_tokenList_toAddress_toLowerCase=tokenList[null==toAddress?void 0:toAddress.toLowerCase()])||void 0===_tokenList_toAddress_toLowerCase?void 0:_tokenList_toAddress_toLowerCase.name)?{toName:tokenList[null==toAddress?void 0:toAddress.toLowerCase()].name,isTrusted:!0}:{toName:(0,util.Wr)(checksummedAddress),isTrusted:!1}};var identicon=__webpack_require__("./ui/components/ui/identicon/index.js"),info_tooltip=__webpack_require__("./ui/components/ui/info-tooltip/index.js"),nickname_popovers=__webpack_require__("./ui/components/app/modals/nickname-popovers/index.js"),app=__webpack_require__("./shared/constants/app.ts"),site_origin=__webpack_require__("./ui/components/ui/site-origin/index.js"),useGetAssetImageUrl=__webpack_require__("./ui/hooks/useGetAssetImageUrl.ts");function _array_like_to_array(arr,len){(null==len||len>arr.length)&&(len=arr.length);for(var i=0,arr2=Array(len);i<len;i++)arr2[i]=arr[i];return arr2}function _array_with_holes(arr){if(Array.isArray(arr))return arr}function _iterable_to_array_limit(arr,i){var _s,_e,_i=null==arr?null:"undefined"!=typeof Symbol&&arr[Symbol.iterator]||arr["@@iterator"];if(null!=_i){var _arr=[],_n=!0,_d=!1;try{for(_i=_i.call(arr);!(_n=(_s=_i.next()).done)&&(_arr.push(_s.value),!i||_arr.length!==i);_n=!0);}catch(err){_d=!0,_e=err}finally{try{_n||null==_i.return||_i.return()}finally{if(_d)throw _e}}return _arr}}function _non_iterable_rest(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _sliced_to_array(arr,i){return _array_with_holes(arr)||_iterable_to_array_limit(arr,i)||_unsupported_iterable_to_array(arr,i)||_non_iterable_rest()}function _unsupported_iterable_to_array(o,minLen){if(o){if("string"==typeof o)return _array_like_to_array(o,minLen);var n=Object.prototype.toString.call(o).slice(8,-1);if("Object"===n&&o.constructor&&(n=o.constructor.name),"Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return _array_like_to_array(o,minLen)}}var ConfirmPageContainerSummary=function(props){var contractAddress,action=props.action,titleComponent=props.titleComponent,subtitleComponent=props.subtitleComponent,className=props.className,tokenAddress=props.tokenAddress,nonce=props.nonce,origin=props.origin,image=props.image,transactionType=props.transactionType,_useState=_sliced_to_array((0,react.useState)(!1),2),showNicknamePopovers=_useState[0],setShowNicknamePopovers=_useState[1],t=(0,useI18nContext.P)(),ipfsGateway=(0,es.d4)(selectors.l68),txData=(0,es.d4)(selectors.m2F),nftImageURL=(0,useGetAssetImageUrl.A)(image,ipfsGateway),_txData_txParams=txData.txParams,txParamsToAddress=(void 0===_txData_txParams?{}:_txData_txParams).to,isContractTypeTransaction=[types.D_.contractInteraction,types.D_.tokenMethodTransfer,types.D_.tokenMethodTransferFrom,types.D_.tokenMethodSafeTransferFrom].includes(transactionType);isContractTypeTransaction&&(contractAddress=transactionType===types.D_.tokenMethodTransfer||transactionType===types.D_.tokenMethodTransferFrom||transactionType===types.D_.tokenMethodSafeTransferFrom||transactionType===types.D_.tokenMethodSetApprovalForAll?tokenAddress:txParamsToAddress);var _useAddressDetails=hooks_useAddressDetails(contractAddress),toName=_useAddressDetails.toName,isTrusted=_useAddressDetails.isTrusted,checksummedAddress=(0,hexstring_utils.sX)(contractAddress);return react.createElement("div",{className:classnames_default()("confirm-page-container-summary",className)},origin===app.jt?null:react.createElement(site_origin.A,{className:"confirm-page-container-summary__origin",siteOrigin:origin}),react.createElement("div",{className:"confirm-page-container-summary__action-row"},react.createElement("div",{className:"confirm-page-container-summary__action"},isContractTypeTransaction&&toName&&react.createElement("span",{className:"confirm-page-container-summary__action__contract-address"},react.createElement("button",{className:"confirm-page-container-summary__action__contract-address-btn",onClick:function(){return setShowNicknamePopovers(!0)},role:"button"},toName),":"),react.createElement("span",{className:"confirm-page-container-summary__action__name"},action),isContractTypeTransaction&&!1===isTrusted&&react.createElement(info_tooltip.A,{position:"top",contentText:t("unverifiedContractAddressMessage")})),nonce&&react.createElement("div",{className:"confirm-page-container-summary__nonce"},"#".concat(nonce))),react.createElement(react.Fragment,null,react.createElement("div",{className:"confirm-page-container-summary__title"},image?react.createElement("img",{className:"confirm-page-container-summary__icon",width:36,src:nftImageURL}):contractAddress?react.createElement(identicon.A,{className:"confirm-page-container-summary__icon",diameter:36,address:contractAddress}):null,titleComponent),subtitleComponent),showNicknamePopovers&&react.createElement(nickname_popovers.A,{onClose:function(){return setShowNicknamePopovers(!1)},address:checksummedAddress}))};ConfirmPageContainerSummary.propTypes={action:prop_types_default().string,image:prop_types_default().string,titleComponent:prop_types_default().node,subtitleComponent:prop_types_default().node,className:prop_types_default().string,tokenAddress:prop_types_default().string,nonce:prop_types_default().string,origin:prop_types_default().string.isRequired,transactionType:prop_types_default().string};let confirm_page_container_summary_component=ConfirmPageContainerSummary;ConfirmPageContainerSummary.__docgenInfo={description:"",methods:[],displayName:"ConfirmPageContainerSummary",props:{action:{description:"",type:{name:"string"},required:!1},image:{description:"",type:{name:"string"},required:!1},titleComponent:{description:"",type:{name:"node"},required:!1},subtitleComponent:{description:"",type:{name:"node"},required:!1},className:{description:"",type:{name:"string"},required:!1},tokenAddress:{description:"",type:{name:"string"},required:!1},nonce:{description:"",type:{name:"string"},required:!1},origin:{description:"",type:{name:"string"},required:!0},transactionType:{description:"",type:{name:"string"},required:!1}}}},"./ui/pages/confirmations/components/confirm-page-container/confirm-page-container-content/confirm-page-container-warning/index.js":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{__webpack_require__.d(__webpack_exports__,{A:()=>confirm_page_container_warning_component});var react=__webpack_require__("./node_modules/react/index.js"),prop_types=__webpack_require__("./node_modules/prop-types/index.js"),prop_types_default=__webpack_require__.n(prop_types),component_library=__webpack_require__("./ui/components/component-library/index.ts"),design_system=__webpack_require__("./ui/helpers/constants/design-system.ts"),ConfirmPageContainerWarning=function(props){return react.createElement("div",{className:"confirm-page-container-warning"},react.createElement(component_library.In,{name:component_library.$M.Info,color:design_system.Li.warningDefault,className:"confirm-page-container-warning__icon"}),react.createElement("div",{className:"confirm-page-container-warning__warning"},props.warning))};ConfirmPageContainerWarning.propTypes={warning:prop_types_default().string};let confirm_page_container_warning_component=ConfirmPageContainerWarning;ConfirmPageContainerWarning.__docgenInfo={description:"@deprecated The `<ConfirmPageContainerWarning />` component has been deprecated in favor of the new `<BannerAlert>` component from the component-library.\nPlease update your code to use the new `<BannerAlert>` component instead, which can be found at ui/components/component-library/banner-alert/banner-alert.js.\nYou can find documentation for the new `BannerAlert` component in the MetaMask Storybook:\n{@link https://metamask.github.io/metamask-storybook/?path=/docs/components-componentlibrary-banneralert--docs}\nIf you would like to help with the replacement of the old `ConfirmPageContainerWarning` component, please submit a pull request against this GitHub issue:\n{@link https://github.com/MetaMask/metamask-extension/issues/20466}",methods:[],displayName:"ConfirmPageContainerWarning",props:{warning:{description:"",type:{name:"string"},required:!1}}}},"./ui/pages/confirmations/components/confirm-page-container/confirm-page-container-content/index.js":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{__webpack_require__.d(__webpack_exports__,{JQ:()=>confirm_page_container_summary.A,Pf:()=>confirm_page_container_warning.A,Ay:()=>ConfirmPageContainerContent});var react=__webpack_require__("./node_modules/react/index.js"),prop_types=__webpack_require__("./node_modules/prop-types/index.js"),prop_types_default=__webpack_require__.n(prop_types),classnames=__webpack_require__("./node_modules/classnames/index.js"),classnames_default=__webpack_require__.n(classnames),tabs=__webpack_require__("./ui/components/ui/tabs/index.js"),component_library=__webpack_require__("./ui/components/component-library/index.ts"),page_container=__webpack_require__("./ui/components/ui/page-container/index.js"),error_keys=__webpack_require__("./ui/helpers/constants/error-keys.js"),design_system=__webpack_require__("./ui/helpers/constants/design-system.ts"),security_provider=__webpack_require__("./shared/constants/security-provider.ts");function _assert_this_initialized(self){if(void 0===self)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return self}function _class_call_check(instance,Constructor){if(!(instance instanceof Constructor))throw TypeError("Cannot call a class as a function")}function _defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||!1,descriptor.configurable=!0,"value"in descriptor&&(descriptor.writable=!0),Object.defineProperty(target,descriptor.key,descriptor)}}function _create_class(Constructor,protoProps,staticProps){return protoProps&&_defineProperties(Constructor.prototype,protoProps),staticProps&&_defineProperties(Constructor,staticProps),Constructor}function _define_property(obj,key,value){return key in obj?Object.defineProperty(obj,key,{value:value,enumerable:!0,configurable:!0,writable:!0}):obj[key]=value,obj}function _get_prototype_of(o){return(_get_prototype_of=Object.setPrototypeOf?Object.getPrototypeOf:function getPrototypeOf(o){return o.__proto__||Object.getPrototypeOf(o)})(o)}function _inherits(subClass,superClass){if("function"!=typeof superClass&&null!==superClass)throw TypeError("Super expression must either be null or a function");subClass.prototype=Object.create(superClass&&superClass.prototype,{constructor:{value:subClass,writable:!0,configurable:!0}}),superClass&&_set_prototype_of(subClass,superClass)}function _possible_constructor_return(self,call){return call&&("object"===_type_of(call)||"function"==typeof call)?call:_assert_this_initialized(self)}function _set_prototype_of(o,p){return(_set_prototype_of=Object.setPrototypeOf||function setPrototypeOf(o,p){return o.__proto__=p,o})(o,p)}function _type_of(obj){return obj&&"undefined"!=typeof Symbol&&obj.constructor===Symbol?"symbol":typeof obj}function _is_native_reflect_construct(){if("undefined"==typeof Reflect||!Reflect.construct||Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}function _create_super(Derived){var hasNativeReflectConstruct=_is_native_reflect_construct();return function _createSuperInternal(){var result,Super=_get_prototype_of(Derived);return result=hasNativeReflectConstruct?Reflect.construct(Super,arguments,_get_prototype_of(this).constructor):Super.apply(this,arguments),_possible_constructor_return(this,result)}}var ConfirmPageContainerContent=function(Component){_inherits(ConfirmPageContainerContent,Component);var _super=_create_super(ConfirmPageContainerContent);function ConfirmPageContainerContent(){return _class_call_check(this,ConfirmPageContainerContent),_super.apply(this,arguments)}return _create_class(ConfirmPageContainerContent,[{key:"renderContent",value:function renderContent(){var _this_props=this.props,detailsComponent=_this_props.detailsComponent,dataHexComponent=_this_props.dataHexComponent,insightComponent=_this_props.insightComponent;return insightComponent&&(detailsComponent||dataHexComponent)||this.props.noteComponent||detailsComponent&&dataHexComponent?this.renderTabs():detailsComponent||insightComponent}},{key:"renderTabs",value:function renderTabs(){var _this=this,t=this.context.t,_this_props=this.props,detailsComponent=_this_props.detailsComponent,dataHexComponent=_this_props.dataHexComponent,insightComponent=_this_props.insightComponent,noteComponent=_this_props.noteComponent;return react.createElement(tabs.t,{defaultActiveTabKey:"details"},react.createElement(tabs.o,{className:"confirm-page-container-content__tab",name:t("details"),tabKey:"details"},detailsComponent),noteComponent&&react.createElement(tabs.o,{"data-testid":"note-tab",className:"confirm-page-container-content__tab",name:t("note"),tabKey:"note",onClick:function(){_this.context.trackEvent({category:"Note to trader",event:"Clicked on Notes tab on a transaction window"})}},noteComponent),dataHexComponent&&react.createElement(tabs.o,{className:"confirm-page-container-content__tab",name:t("dataHex"),tabKey:"dataHex"},dataHexComponent),insightComponent)}},{key:"render",value:function render(){var _txData_securityAlertResponse,_this_props=this.props,action=_this_props.action,errorKey=_this_props.errorKey,errorMessage=_this_props.errorMessage,image=_this_props.image,titleComponent=_this_props.titleComponent,subtitleComponent=_this_props.subtitleComponent,tokenAddress=_this_props.tokenAddress,nonce=_this_props.nonce,detailsComponent=_this_props.detailsComponent,warning=_this_props.warning,onCancelAll=_this_props.onCancelAll,onCancel=_this_props.onCancel,cancelText=_this_props.cancelText,onSubmit=_this_props.onSubmit,submitText=_this_props.submitText,disabled=_this_props.disabled,unapprovedTxCount=_this_props.unapprovedTxCount,rejectNText=_this_props.rejectNText,origin=_this_props.origin,ethGasPriceWarning=_this_props.ethGasPriceWarning,supportsEIP1559=_this_props.supportsEIP1559,hasTopBorder=_this_props.hasTopBorder,nativeCurrency=_this_props.nativeCurrency,networkName=_this_props.networkName,toAddress=_this_props.toAddress,transactionType=_this_props.transactionType,isBuyableChain=_this_props.isBuyableChain,openBuyCryptoInPdapp=_this_props.openBuyCryptoInPdapp,txData=_this_props.txData,t=this.context.t,showInsufficientFundsError=(errorKey||errorMessage)&&errorKey===error_keys.uo,showIsSigningOrSubmittingError=errorKey===error_keys.yu,showUserOpContractDeployError=errorKey===error_keys.SB,submitButtonType=(null==txData?void 0:null===(_txData_securityAlertResponse=txData.securityAlertResponse)||void 0===_txData_securityAlertResponse?void 0:_txData_securityAlertResponse.result_type)===security_provider.p0.Malicious?"danger-primary":"primary";return react.createElement("div",{className:classnames_default()("confirm-page-container-content",{"confirm-page-container-content--with-top-border":hasTopBorder})},warning?react.createElement(confirm_page_container_warning.A,{warning:warning}):null,ethGasPriceWarning&&react.createElement(confirm_page_container_warning.A,{warning:ethGasPriceWarning}),react.createElement(confirm_page_container_summary.A,{className:classnames_default()({"confirm-page-container-summary--border":!detailsComponent}),action:action,image:image,titleComponent:titleComponent,subtitleComponent:subtitleComponent,tokenAddress:tokenAddress,nonce:nonce,origin:origin,toAddress:toAddress,transactionType:transactionType}),this.renderContent(),!supportsEIP1559&&!showInsufficientFundsError&&!showIsSigningOrSubmittingError&&!showUserOpContractDeployError&&(errorKey||errorMessage)&&react.createElement(component_library.b8,{severity:design_system.AI.Danger,description:errorKey?t(errorKey):errorMessage,marginBottom:4,marginLeft:4,marginRight:4}),showInsufficientFundsError&&react.createElement(component_library.b8,{severity:design_system.AI.Danger,marginBottom:4,marginLeft:4,marginRight:4,description:isBuyableChain?t("insufficientCurrencyBuyOrDeposit",[nativeCurrency,networkName,react.createElement(component_library.$n,{variant:component_library.Vt.LINK,size:component_library.GO.INHERIT,onClick:openBuyCryptoInPdapp,key:"".concat(nativeCurrency,"-buy-button")},t("buyAsset",[nativeCurrency]))]):t("insufficientCurrencyDeposit",[nativeCurrency,networkName])}),(showIsSigningOrSubmittingError||showUserOpContractDeployError)&&react.createElement(component_library.b8,{"data-testid":"confirm-page-container-content-error-banner-2",severity:design_system.AI.Danger,description:t(errorKey),marginBottom:4,marginLeft:4,marginRight:4}),react.createElement(page_container.QY,{onCancel:onCancel,cancelText:cancelText,onSubmit:onSubmit,submitText:submitText,disabled:disabled,submitButtonType:submitButtonType},unapprovedTxCount>1?react.createElement("a",{onClick:onCancelAll},rejectNText):null))}}]),ConfirmPageContainerContent}(react.Component);_define_property(ConfirmPageContainerContent,"contextTypes",{t:prop_types_default().func.isRequired,trackEvent:prop_types_default().func}),_define_property(ConfirmPageContainerContent,"propTypes",{action:prop_types_default().string,dataHexComponent:prop_types_default().node,detailsComponent:prop_types_default().node,insightComponent:prop_types_default().node,errorKey:prop_types_default().string,errorMessage:prop_types_default().string,tokenAddress:prop_types_default().string,nonce:prop_types_default().string,subtitleComponent:prop_types_default().node,image:prop_types_default().string,titleComponent:prop_types_default().node,warning:prop_types_default().string,origin:prop_types_default().string.isRequired,ethGasPriceWarning:prop_types_default().string,onCancelAll:prop_types_default().func,onCancel:prop_types_default().func,cancelText:prop_types_default().string,onSubmit:prop_types_default().func,submitText:prop_types_default().string,disabled:prop_types_default().bool,unapprovedTxCount:prop_types_default().number,rejectNText:prop_types_default().string,supportsEIP1559:prop_types_default().bool,hasTopBorder:prop_types_default().bool,nativeCurrency:prop_types_default().string,networkName:prop_types_default().string,toAddress:prop_types_default().string,transactionType:prop_types_default().string,isBuyableChain:prop_types_default().bool,openBuyCryptoInPdapp:prop_types_default().func,noteComponent:prop_types_default().node,txData:prop_types_default().object}),ConfirmPageContainerContent.__docgenInfo={description:"",methods:[{name:"renderContent",docblock:null,modifiers:[],params:[],returns:null},{name:"renderTabs",docblock:null,modifiers:[],params:[],returns:null}],displayName:"ConfirmPageContainerContent",props:{action:{description:"",type:{name:"string"},required:!1},dataHexComponent:{description:"",type:{name:"node"},required:!1},detailsComponent:{description:"",type:{name:"node"},required:!1},insightComponent:{description:"",type:{name:"node"},required:!1},errorKey:{description:"",type:{name:"string"},required:!1},errorMessage:{description:"",type:{name:"string"},required:!1},tokenAddress:{description:"",type:{name:"string"},required:!1},nonce:{description:"",type:{name:"string"},required:!1},subtitleComponent:{description:"",type:{name:"node"},required:!1},image:{description:"",type:{name:"string"},required:!1},titleComponent:{description:"",type:{name:"node"},required:!1},warning:{description:"",type:{name:"string"},required:!1},origin:{description:"",type:{name:"string"},required:!0},ethGasPriceWarning:{description:"",type:{name:"string"},required:!1},onCancelAll:{description:"",type:{name:"func"},required:!1},onCancel:{description:"",type:{name:"func"},required:!1},cancelText:{description:"",type:{name:"string"},required:!1},onSubmit:{description:"",type:{name:"func"},required:!1},submitText:{description:"",type:{name:"string"},required:!1},disabled:{description:"",type:{name:"bool"},required:!1},unapprovedTxCount:{description:"",type:{name:"number"},required:!1},rejectNText:{description:"",type:{name:"string"},required:!1},supportsEIP1559:{description:"",type:{name:"bool"},required:!1},hasTopBorder:{description:"",type:{name:"bool"},required:!1},nativeCurrency:{description:"",type:{name:"string"},required:!1},networkName:{description:"",type:{name:"string"},required:!1},toAddress:{description:"",type:{name:"string"},required:!1},transactionType:{description:"",type:{name:"string"},required:!1},isBuyableChain:{description:"",type:{name:"bool"},required:!1},openBuyCryptoInPdapp:{description:"",type:{name:"func"},required:!1},noteComponent:{description:"",type:{name:"node"},required:!1},txData:{description:"",type:{name:"object"},required:!1}},context:{t:{type:{name:"func"},required:!0},trackEvent:{type:{name:"func"},required:!1}}};var confirm_page_container_summary=__webpack_require__("./ui/pages/confirmations/components/confirm-page-container/confirm-page-container-content/confirm-page-container-summary/index.js"),confirm_page_container_warning=__webpack_require__("./ui/pages/confirmations/components/confirm-page-container/confirm-page-container-content/confirm-page-container-warning/index.js")},"./ui/pages/confirmations/components/confirm-page-container/confirm-page-container-header/index.js":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{__webpack_require__.d(__webpack_exports__,{A:()=>ConfirmPageContainerHeader});var react=__webpack_require__("./node_modules/react/index.js"),prop_types=__webpack_require__("./node_modules/prop-types/index.js"),prop_types_default=__webpack_require__.n(prop_types),app=__webpack_require__("./shared/constants/app.ts"),util=__webpack_require__("./app/scripts/lib/util.ts"),network_display=__webpack_require__("./ui/components/app/network-display/index.js"),identicon=__webpack_require__("./ui/components/ui/identicon/index.js"),utils_util=__webpack_require__("./ui/helpers/utils/util.js"),account_mismatch_warning_component=__webpack_require__("./ui/components/ui/account-mismatch-warning/account-mismatch-warning.component.js"),useI18nContext=__webpack_require__("./ui/hooks/useI18nContext.js"),component_library=__webpack_require__("./ui/components/component-library/index.ts");function ConfirmPageContainerHeader(param){var onEdit=param.onEdit,showEdit=param.showEdit,accountAddress=param.accountAddress,showAccountInHeader=param.showAccountInHeader,children=param.children,origin=param.origin,t=(0,useI18nContext.P)(),windowType=(0,util.mc)(),isFullScreen=windowType!==app.XU&&windowType!==app.YY;return!showEdit&&isFullScreen?children:react.createElement("div",{className:"confirm-page-container-header","data-testid":"header-container"},react.createElement("div",{className:"confirm-page-container-header__row"},showAccountInHeader?react.createElement("div",{className:"confirm-page-container-header__address-container"},react.createElement("div",{className:"confirm-page-container-header__address-identicon"},react.createElement(identicon.A,{address:accountAddress,diameter:24})),react.createElement("div",{className:"confirm-page-container-header__address","data-testid":"header-address"},(0,utils_util.Wr)(accountAddress)),react.createElement(account_mismatch_warning_component.A,{address:accountAddress})):origin===app.jt&&react.createElement("div",{className:"confirm-page-container-header__back-button-container",style:{visibility:showEdit?"initial":"hidden"}},react.createElement(component_library.In,{name:component_library.$M.ArrowLeft}),react.createElement("span",{"data-testid":"confirm-page-back-edit-button",className:"confirm-page-container-header__back-button",onClick:function(){return onEdit()}},t("edit"))),react.createElement(network_display.A,null)),children)}ConfirmPageContainerHeader.propTypes={accountAddress:prop_types_default().string,showAccountInHeader:prop_types_default().bool,showEdit:prop_types_default().bool,onEdit:prop_types_default().func,children:prop_types_default().node,origin:prop_types_default().string},ConfirmPageContainerHeader.__docgenInfo={description:"",methods:[],displayName:"ConfirmPageContainerHeader",props:{accountAddress:{description:"",type:{name:"string"},required:!1},showAccountInHeader:{description:"",type:{name:"bool"},required:!1},showEdit:{description:"",type:{name:"bool"},required:!1},onEdit:{description:"",type:{name:"func"},required:!1},children:{description:"",type:{name:"node"},required:!1},origin:{description:"",type:{name:"string"},required:!1}}}},"./ui/pages/confirmations/components/confirm-page-container/index.js":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{__webpack_require__.d(__webpack_exports__,{qE:()=>confirm_page_container_content.Ay,aT:()=>confirm_page_container_header.A,p0:()=>confirm_page_container_navigation.A,Ay:()=>confirm_page_container_component});var react=__webpack_require__("./node_modules/react/index.js"),prop_types=__webpack_require__("./node_modules/prop-types/index.js"),prop_types_default=__webpack_require__.n(prop_types),es=__webpack_require__("./node_modules/react-redux/es/index.js"),types=__webpack_require__("./node_modules/@metamask/transaction-controller/dist/types.mjs"),gas=__webpack_require__("./shared/constants/gas.ts"),gasFee=__webpack_require__("./ui/contexts/gasFee.js"),transaction=__webpack_require__("./shared/constants/transaction.ts"),network=__webpack_require__("./shared/constants/network.ts"),page_container=__webpack_require__("./ui/components/ui/page-container/index.js"),ui_button=__webpack_require__("./ui/components/ui/button/index.js"),actionable_message=__webpack_require__("./ui/components/ui/actionable-message/actionable-message.js"),sender_to_recipient=__webpack_require__("./ui/components/ui/sender-to-recipient/index.js"),dist=__webpack_require__("./node_modules/@metamask/metamask-eth-abis/dist/index.js"),lib_esm=__webpack_require__("./node_modules/@ethersproject/contracts/lib.esm/index.js"),web3_provider=__webpack_require__("./node_modules/@ethersproject/providers/lib.esm/web3-provider.js");function asyncGeneratorStep(gen,resolve,reject,_next,_throw,key,arg){try{var info=gen[key](arg),value=info.value}catch(error){reject(error);return}info.done?resolve(value):Promise.resolve(value).then(_next,_throw)}function _async_to_generator(fn){return function(){var self=this,args=arguments;return new Promise(function(resolve,reject){var gen=fn.apply(self,args);function _next(value){asyncGeneratorStep(gen,resolve,reject,_next,_throw,"next",value)}function _throw(err){asyncGeneratorStep(gen,resolve,reject,_next,_throw,"throw",err)}_next(void 0)})}}function _ts_generator(thisArg,body){var f,y,t,g,_={label:0,sent:function(){if(1&t[0])throw t[1];return t[1]},trys:[],ops:[]};return g={next:verb(0),throw:verb(1),return:verb(2)},"function"==typeof Symbol&&(g[Symbol.iterator]=function(){return this}),g;function verb(n){return function(v){return step([n,v])}}function step(op){if(f)throw TypeError("Generator is already executing.");for(;_;)try{if(f=1,y&&(t=2&op[0]?y.return:op[0]?y.throw||((t=y.return)&&t.call(y),0):y.next)&&!(t=t.call(y,op[1])).done)return t;switch(y=0,t&&(op=[2&op[0],t.value]),op[0]){case 0:case 1:t=op;break;case 4:return _.label++,{value:op[1],done:!1};case 5:_.label++,y=op[1],op=[0];continue;case 7:op=_.ops.pop(),_.trys.pop();continue;default:if(!(t=(t=_.trys).length>0&&t[t.length-1])&&(6===op[0]||2===op[0])){_=0;continue}if(3===op[0]&&(!t||op[1]>t[0]&&op[1]<t[3])){_.label=op[1];break}if(6===op[0]&&_.label<t[1]){_.label=t[1],t=op;break}if(t&&_.label<t[2]){_.label=t[2],_.ops.push(op);break}t[2]&&_.ops.pop(),_.trys.pop();continue}op=body.call(thisArg,_)}catch(e){op=[6,e],y=0}finally{f=t=0}if(5&op[0])throw op[1];return{value:op[0]?op[1]:void 0,done:!0}}}function fetchTokenBalance(address,userAddress,provider){return _fetchTokenBalance.apply(this,arguments)}function _fetchTokenBalance(){return(_fetchTokenBalance=_async_to_generator(function(address,userAddress,provider){var ethersProvider;return _ts_generator(this,function(_state){switch(_state.label){case 0:return ethersProvider=new web3_provider.j(provider),[4,new lib_esm.NZ(address,dist.jB,ethersProvider).balanceOf(userAddress)];case 1:return[2,_state.sent()]}})})).apply(this,arguments)}var advanced_gas_fee_popover=__webpack_require__("./ui/pages/confirmations/components/advanced-gas-fee-popover/index.js"),edit_gas_fee_popover=__webpack_require__("./ui/pages/confirmations/components/edit-gas-fee-popover/edit-gas-fee-popover.js"),edit_gas_popover=__webpack_require__("./ui/pages/confirmations/components/edit-gas-popover/index.js"),error_message=__webpack_require__("./ui/components/ui/error-message/index.js"),error_keys=__webpack_require__("./ui/helpers/constants/error-keys.js"),component_library=__webpack_require__("./ui/components/component-library/index.ts"),design_system=__webpack_require__("./ui/helpers/constants/design-system.ts"),network_account_balance_header=__webpack_require__("./ui/components/app/network-account-balance-header/network-account-balance-header.js"),set_approval_for_all_warning=__webpack_require__("./ui/pages/confirmations/components/set-approval-for-all-warning/index.js"),useI18nContext=__webpack_require__("./ui/hooks/useI18nContext.js"),tabs=__webpack_require__("./ui/components/ui/tabs/index.js"),dropdown_tab=__webpack_require__("./ui/components/ui/tabs/snaps/dropdown-tab/index.js"),box=__webpack_require__("./ui/components/ui/box/box.js"),snap_ui_renderer=__webpack_require__("./ui/components/app/snaps/snap-ui-renderer/index.js"),snap_delineator=__webpack_require__("./ui/components/app/snaps/snap-delineator/index.js"),snaps=__webpack_require__("./ui/helpers/constants/snaps/index.js"),copyable=__webpack_require__("./ui/components/app/snaps/copyable/index.js"),selectors=__webpack_require__("./ui/selectors/index.js"),actions=__webpack_require__("./ui/__mocks__/actions.js");function snap_insight_asyncGeneratorStep(gen,resolve,reject,_next,_throw,key,arg){try{var info=gen[key](arg),value=info.value}catch(error){reject(error);return}info.done?resolve(value):Promise.resolve(value).then(_next,_throw)}function snap_insight_async_to_generator(fn){return function(){var self=this,args=arguments;return new Promise(function(resolve,reject){var gen=fn.apply(self,args);function _next(value){snap_insight_asyncGeneratorStep(gen,resolve,reject,_next,_throw,"next",value)}function _throw(err){snap_insight_asyncGeneratorStep(gen,resolve,reject,_next,_throw,"throw",err)}_next(void 0)})}}function snap_insight_ts_generator(thisArg,body){var f,y,t,g,_={label:0,sent:function(){if(1&t[0])throw t[1];return t[1]},trys:[],ops:[]};return g={next:verb(0),throw:verb(1),return:verb(2)},"function"==typeof Symbol&&(g[Symbol.iterator]=function(){return this}),g;function verb(n){return function(v){return step([n,v])}}function step(op){if(f)throw TypeError("Generator is already executing.");for(;_;)try{if(f=1,y&&(t=2&op[0]?y.return:op[0]?y.throw||((t=y.return)&&t.call(y),0):y.next)&&!(t=t.call(y,op[1])).done)return t;switch(y=0,t&&(op=[2&op[0],t.value]),op[0]){case 0:case 1:t=op;break;case 4:return _.label++,{value:op[1],done:!1};case 5:_.label++,y=op[1],op=[0];continue;case 7:op=_.ops.pop(),_.trys.pop();continue;default:if(!(t=(t=_.trys).length>0&&t[t.length-1])&&(6===op[0]||2===op[0])){_=0;continue}if(3===op[0]&&(!t||op[1]>t[0]&&op[1]<t[3])){_.label=op[1];break}if(6===op[0]&&_.label<t[1]){_.label=t[1],t=op;break}if(t&&_.label<t[2]){_.label=t[2],_.ops.push(op);break}t[2]&&_.ops.pop(),_.trys.pop();continue}op=body.call(thisArg,_)}catch(e){op=[6,e],y=0}finally{f=t=0}if(5&op[0])throw op[1];return{value:op[0]?op[1]:void 0,done:!0}}}var SnapInsight=function(param){var snapId=param.snapId,data=param.data,dispatch=(0,es.wA)(),t=(0,useI18nContext.P)(),isLoading=null==data?void 0:data.loading,error=null==data?void 0:data.error,interfaceId=null==data?void 0:data.interfaceId;(0,react.useEffect)(function(){var _ref;(_ref=snap_insight_async_to_generator(function(){return snap_insight_ts_generator(this,function(_state){switch(_state.label){case 0:return _state.trys.push([0,2,,3]),[4,dispatch((0,actions.trackInsightSnapUsage)(snapId))];case 1:case 2:return _state.sent(),[3,3];case 3:return[2]}})}),function trackInsightUsage(){return _ref.apply(this,arguments)})()},[snapId,dispatch]);var snapName=(0,es.d4)(function(state){return(0,selectors.oeg)(state,snapId)}).name,hasNoData=!error&&!isLoading&&!interfaceId;return react.createElement(box.Ay,{flexDirection:design_system.GO.COLUMN,height:"full",marginTop:hasNoData&&12,marginBottom:hasNoData&&12,alignItems:hasNoData&&design_system.k2.center,justifyContent:hasNoData&&design_system.A9.center,textAlign:hasNoData&&design_system.nO.Center,className:"snap-insight"},!error&&react.createElement(box.Ay,{height:"full",width:"full",flexDirection:design_system.GO.COLUMN,className:"snap-insight__container"},isLoading||interfaceId?react.createElement(snap_ui_renderer.a,{snapId:snapId,interfaceId:interfaceId,delineatorType:snaps.cJ.Insights,isLoading:isLoading}):react.createElement(component_library.EY,{color:design_system.r7.textAlternative,variant:design_system.J3.bodySm,as:"h6"},t("snapsNoInsight"))),!isLoading&&error&&react.createElement(box.Ay,{padding:4,className:"snap-insight__container__error"},react.createElement(snap_delineator.Q,{snapName:snapName,type:snaps.cJ.Error},react.createElement(component_library.EY,{variant:design_system.J3.bodySm,marginBottom:4},t("snapsUIError",[react.createElement("b",{key:"0"},snapName)])),react.createElement(copyable.a,{text:error}))))};SnapInsight.propTypes={snapId:prop_types_default().string,data:prop_types_default().object,loading:prop_types_default().bool},SnapInsight.__docgenInfo={description:"",methods:[],displayName:"SnapInsight",props:{snapId:{description:"The snap id",type:{name:"string"},required:!1},data:{description:"",type:{name:"object"},required:!1},loading:{description:"",type:{name:"bool"},required:!1}}};var store_actions=__webpack_require__("./ui/store/actions.ts"),util=__webpack_require__("./ui/helpers/utils/util.js"),useInsightSnaps=__webpack_require__("./ui/hooks/snaps/useInsightSnaps.js");function _array_like_to_array(arr,len){(null==len||len>arr.length)&&(len=arr.length);for(var i=0,arr2=Array(len);i<len;i++)arr2[i]=arr[i];return arr2}function _array_with_holes(arr){if(Array.isArray(arr))return arr}function _iterable_to_array_limit(arr,i){var _s,_e,_i=null==arr?null:"undefined"!=typeof Symbol&&arr[Symbol.iterator]||arr["@@iterator"];if(null!=_i){var _arr=[],_n=!0,_d=!1;try{for(_i=_i.call(arr);!(_n=(_s=_i.next()).done)&&(_arr.push(_s.value),!i||_arr.length!==i);_n=!0);}catch(err){_d=!0,_e=err}finally{try{_n||null==_i.return||_i.return()}finally{if(_d)throw _e}}return _arr}}function _non_iterable_rest(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _sliced_to_array(arr,i){return _array_with_holes(arr)||_iterable_to_array_limit(arr,i)||_unsupported_iterable_to_array(arr,i)||_non_iterable_rest()}function _unsupported_iterable_to_array(o,minLen){if(o){if("string"==typeof o)return _array_like_to_array(o,minLen);var n=Object.prototype.toString.call(o).slice(8,-1);if("Object"===n&&o.constructor&&(n=o.constructor.name),"Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return _array_like_to_array(o,minLen)}}let hooks_useTransactionInsights=function(param){var transactionType,_insightSnaps_,insightComponent,txData=param.txData,dispatch=(0,es.wA)(),insightSnaps=(0,es.d4)(selectors.YUi),insightSnapIds=(0,es.d4)(selectors.jJ7),snapsMetadata=(0,es.d4)(selectors.JaC),snapsNameGetter=(0,util.IB)(snapsMetadata),_useState=_sliced_to_array((0,react.useState)(null===(_insightSnaps_=insightSnaps[0])||void 0===_insightSnaps_?void 0:_insightSnaps_.id),2),selectedInsightSnapId=_useState[0],setSelectedInsightSnapId=_useState[1],_useInsightSnaps=(0,useInsightSnaps.P)(txData.id),data=_useInsightSnaps.data,warnings=_useInsightSnaps.warnings;if((0,react.useEffect)(function(){insightSnapIds.length>0&&!selectedInsightSnapId&&setSelectedInsightSnapId(insightSnapIds[0])},[insightSnapIds,selectedInsightSnapId,setSelectedInsightSnapId]),(0,react.useEffect)(function(){return function(){null==data||data.map(function(param){var response=param.response;return(null==response?void 0:response.id)&&dispatch((0,store_actions.deleteInterface)(response.id))})}},[data]),!((transactionType=txData.type)===types.D_.contractInteraction||transactionType===types.D_.simpleSend||transactionType===types.D_.tokenMethodSafeTransferFrom||transactionType===types.D_.tokenMethodTransferFrom||transactionType===types.D_.tokenMethodTransfer)||!insightSnaps.length)return null;var selectedSnap=insightSnaps.find(function(param){return param.id===selectedInsightSnapId});if(1===insightSnaps.length)insightComponent=react.createElement(tabs.o,{className:"confirm-page-container-content__tab",name:snapsNameGetter(selectedSnap.id)},react.createElement(SnapInsight,{snapId:selectedInsightSnapId,data:null==data?void 0:data[0]}));else if(insightSnaps.length>1){var dropdownOptions=null==insightSnaps?void 0:insightSnaps.map(function(param){var id=param.id,name=snapsNameGetter(id);return{value:id,name:name}}),selectedSnapData=null==data?void 0:data.find(function(result){return(null==result?void 0:result.snapId)===selectedInsightSnapId});insightComponent=react.createElement(dropdown_tab.A,{className:"confirm-page-container-content__tab",options:dropdownOptions,selectedOption:selectedInsightSnapId,onChange:function(snapId){return setSelectedInsightSnapId(snapId)}},react.createElement(SnapInsight,{snapId:selectedInsightSnapId,data:selectedSnapData}))}return{insightComponent:insightComponent,warnings:warnings}};var insight_warnings=__webpack_require__("./ui/components/app/snaps/insight-warnings/index.js"),useRamps=__webpack_require__("./ui/hooks/ramps/useRamps/useRamps.ts"),metametrics=__webpack_require__("./ui/contexts/metametrics.js"),constants_metametrics=__webpack_require__("./shared/constants/metametrics.ts"),security_provider=__webpack_require__("./shared/constants/security-provider.ts"),ramps=__webpack_require__("./ui/ducks/ramps/index.ts");function confirm_page_container_component_array_like_to_array(arr,len){(null==len||len>arr.length)&&(len=arr.length);for(var i=0,arr2=Array(len);i<len;i++)arr2[i]=arr[i];return arr2}function confirm_page_container_component_array_with_holes(arr){if(Array.isArray(arr))return arr}function confirm_page_container_component_asyncGeneratorStep(gen,resolve,reject,_next,_throw,key,arg){try{var info=gen[key](arg),value=info.value}catch(error){reject(error);return}info.done?resolve(value):Promise.resolve(value).then(_next,_throw)}function confirm_page_container_component_async_to_generator(fn){return function(){var self=this,args=arguments;return new Promise(function(resolve,reject){var gen=fn.apply(self,args);function _next(value){confirm_page_container_component_asyncGeneratorStep(gen,resolve,reject,_next,_throw,"next",value)}function _throw(err){confirm_page_container_component_asyncGeneratorStep(gen,resolve,reject,_next,_throw,"throw",err)}_next(void 0)})}}function confirm_page_container_component_iterable_to_array_limit(arr,i){var _s,_e,_i=null==arr?null:"undefined"!=typeof Symbol&&arr[Symbol.iterator]||arr["@@iterator"];if(null!=_i){var _arr=[],_n=!0,_d=!1;try{for(_i=_i.call(arr);!(_n=(_s=_i.next()).done)&&(_arr.push(_s.value),!i||_arr.length!==i);_n=!0);}catch(err){_d=!0,_e=err}finally{try{_n||null==_i.return||_i.return()}finally{if(_d)throw _e}}return _arr}}function confirm_page_container_component_non_iterable_rest(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function confirm_page_container_component_sliced_to_array(arr,i){return confirm_page_container_component_array_with_holes(arr)||confirm_page_container_component_iterable_to_array_limit(arr,i)||confirm_page_container_component_unsupported_iterable_to_array(arr,i)||confirm_page_container_component_non_iterable_rest()}function confirm_page_container_component_unsupported_iterable_to_array(o,minLen){if(o){if("string"==typeof o)return confirm_page_container_component_array_like_to_array(o,minLen);var n=Object.prototype.toString.call(o).slice(8,-1);if("Object"===n&&o.constructor&&(n=o.constructor.name),"Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return confirm_page_container_component_array_like_to_array(o,minLen)}}function confirm_page_container_component_ts_generator(thisArg,body){var f,y,t,g,_={label:0,sent:function(){if(1&t[0])throw t[1];return t[1]},trys:[],ops:[]};return g={next:verb(0),throw:verb(1),return:verb(2)},"function"==typeof Symbol&&(g[Symbol.iterator]=function(){return this}),g;function verb(n){return function(v){return step([n,v])}}function step(op){if(f)throw TypeError("Generator is already executing.");for(;_;)try{if(f=1,y&&(t=2&op[0]?y.return:op[0]?y.throw||((t=y.return)&&t.call(y),0):y.next)&&!(t=t.call(y,op[1])).done)return t;switch(y=0,t&&(op=[2&op[0],t.value]),op[0]){case 0:case 1:t=op;break;case 4:return _.label++,{value:op[1],done:!1};case 5:_.label++,y=op[1],op=[0];continue;case 7:op=_.ops.pop(),_.trys.pop();continue;default:if(!(t=(t=_.trys).length>0&&t[t.length-1])&&(6===op[0]||2===op[0])){_=0;continue}if(3===op[0]&&(!t||op[1]>t[0]&&op[1]<t[3])){_.label=op[1];break}if(6===op[0]&&_.label<t[1]){_.label=t[1],t=op;break}if(t&&_.label<t[2]){_.label=t[2],_.ops.push(op);break}t[2]&&_.ops.pop(),_.trys.pop();continue}op=body.call(thisArg,_)}catch(e){op=[6,e],y=0}finally{f=t=0}if(5&op[0])throw op[1];return{value:op[0]?op[1]:void 0,done:!0}}}var ConfirmPageContainer=function(props){var _txData_securityAlertResponse,showEdit=props.showEdit,onEdit=props.onEdit,fromName=props.fromName,fromAddress=props.fromAddress,toEns=props.toEns,toNickname=props.toNickname,toAddress=props.toAddress,disabled=props.disabled,errorKey=props.errorKey,errorMessage=props.errorMessage,contentComponent=props.contentComponent,action=props.action,title=props.title,image=props.image,titleComponent=props.titleComponent,subtitleComponent=props.subtitleComponent,detailsComponent=props.detailsComponent,dataHexComponent=props.dataHexComponent,onCancelAll=props.onCancelAll,onCancel=props.onCancel,onSubmit=props.onSubmit,onSetApprovalForAll=props.onSetApprovalForAll,showWarningModal=props.showWarningModal,tokenAddress=props.tokenAddress,nonce=props.nonce,unapprovedTxCount=props.unapprovedTxCount,warning=props.warning,hideSenderToRecipient=props.hideSenderToRecipient,showAccountInHeader=props.showAccountInHeader,origin=props.origin,ethGasPriceWarning=props.ethGasPriceWarning,editingGas=props.editingGas,handleCloseEditGas=props.handleCloseEditGas,currentTransaction=props.currentTransaction,supportsEIP1559=props.supportsEIP1559,nativeCurrency=props.nativeCurrency,txData=props.txData,assetStandard=props.assetStandard,isApprovalOrRejection=props.isApprovalOrRejection,displayAccountBalanceHeader=props.displayAccountBalanceHeader,noteComponent=props.noteComponent,t=(0,useI18nContext.P)(),trackEvent=(0,react.useContext)(metametrics.O2),_useState=confirm_page_container_component_sliced_to_array((0,react.useState)("0"),2),collectionBalance=_useState[0],setCollectionBalance=_useState[1],_useState1=confirm_page_container_component_sliced_to_array((0,react.useState)(!1),2),isShowingTxInsightWarnings=_useState1[0],setIsShowingTxInsightWarnings=_useState1[1],isBuyableChain=(0,es.d4)(ramps.fu),contact=(0,es.d4)(function(state){return(0,selectors.AF5)(state,toAddress)}),accountBalance=(0,es.d4)(selectors.DW3).string,internalAccounts=(0,es.d4)(selectors.atg),ownedAccountName=(0,selectors.Ptq)(internalAccounts,toAddress),toName=ownedAccountName||(null==contact?void 0:contact.name),toMetadataName=(0,es.d4)(function(state){return(0,selectors.rG1)(state,toAddress)}),openBuyCryptoInPdapp=(0,useRamps.A)().openBuyCryptoInPdapp,isSetApproveForAll=currentTransaction.type===types.D_.tokenMethodSetApprovalForAll,shouldDisplayWarning=contentComponent&&disabled&&(errorKey||errorMessage),chainId=currentTransaction.chainId,networkIdentifier=(0,es.d4)(function(state){return(0,selectors.fr4)(state,chainId)}),networkName=network.qJ[chainId]||networkIdentifier,fetchCollectionBalance=(0,react.useCallback)(confirm_page_container_component_async_to_generator(function(){return confirm_page_container_component_ts_generator(this,function(_state){switch(_state.label){case 0:return[4,fetchTokenBalance(tokenAddress,fromAddress,__webpack_require__.g.ethereumProvider)];case 1:return setCollectionBalance(_state.sent().toString()||"0"),[2]}})}),[fromAddress,tokenAddress]),insightObject=hooks_useTransactionInsights({txData:txData}),insightComponent=null==insightObject?void 0:insightObject.insightComponent,handleSubmit=function(){return isSetApproveForAll&&isApprovalOrRejection?onSetApprovalForAll():onSubmit()},topLevelHandleSubmit=function(){var _insightObject_warnings;return(null==insightObject?void 0:null===(_insightObject_warnings=insightObject.warnings)||void 0===_insightObject_warnings?void 0:_insightObject_warnings.length)>0?setIsShowingTxInsightWarnings(!0):handleSubmit()};(0,react.useEffect)(function(){isSetApproveForAll&&assetStandard===transaction.ph.ERC721&&fetchCollectionBalance()},[currentTransaction,assetStandard,isSetApproveForAll,fetchCollectionBalance,collectionBalance]);var isMaliciousRequest=(null===(_txData_securityAlertResponse=txData.securityAlertResponse)||void 0===_txData_securityAlertResponse?void 0:_txData_securityAlertResponse.result_type)===security_provider.p0.Malicious;return react.createElement(gasFee.cB,{transaction:currentTransaction},react.createElement("div",{className:"page-container","data-testid":"page-container"},react.createElement(confirm_page_container_navigation.A,null),displayAccountBalanceHeader?react.createElement(network_account_balance_header.A,{accountName:fromName,accountBalance:accountBalance,tokenName:nativeCurrency,accountAddress:fromAddress,networkName:networkName,chainId:currentTransaction.chainId}):react.createElement(confirm_page_container_header.A,{showEdit:showEdit,onEdit:function(){return onEdit()},showAccountInHeader:showAccountInHeader,accountAddress:fromAddress,origin:origin},hideSenderToRecipient?null:react.createElement(sender_to_recipient.A,{senderName:fromName,senderAddress:fromAddress,recipientName:toName,recipientMetadataName:toMetadataName,recipientAddress:toAddress,recipientEns:toEns,recipientNickname:toNickname,recipientIsOwnedAccount:!!ownedAccountName,chainId:currentTransaction.chainId})),contentComponent||react.createElement(confirm_page_container_content.Ay,{action:action,title:title,image:image,titleComponent:titleComponent,subtitleComponent:subtitleComponent,detailsComponent:detailsComponent,dataHexComponent:dataHexComponent,insightComponent:insightComponent,errorMessage:errorMessage,errorKey:errorKey,tokenAddress:tokenAddress,nonce:nonce,warning:warning,onCancelAll:onCancelAll,onCancel:onCancel,cancelText:t("reject"),onSubmit:topLevelHandleSubmit,submitText:t("confirm"),disabled:disabled,unapprovedTxCount:unapprovedTxCount,rejectNText:t("rejectTxsN",[unapprovedTxCount]),origin:origin,ethGasPriceWarning:ethGasPriceWarning,supportsEIP1559:supportsEIP1559,currentTransaction:currentTransaction,nativeCurrency:nativeCurrency,networkName:networkName,toAddress:toAddress,transactionType:currentTransaction.type,isBuyableChain:isBuyableChain,openBuyCryptoInPdapp:openBuyCryptoInPdapp,txData:txData,noteComponent:noteComponent}),shouldDisplayWarning&&errorKey===error_keys.uo&&react.createElement("div",{className:"confirm-approve-content__warning"},react.createElement(actionable_message.A,{message:isBuyableChain?react.createElement(component_library.EY,{variant:design_system.J3.bodySm,textAlign:design_system.nO.Left,as:"h6"},t("insufficientCurrencyBuyOrDeposit",[nativeCurrency,networkName,react.createElement(ui_button.A,{type:"inline",className:"confirm-page-container-content__link",onClick:function(){openBuyCryptoInPdapp(),trackEvent({event:constants_metametrics.gP.NavBuyButtonClicked,category:constants_metametrics.FZ.Navigation,properties:{location:"Transaction Confirmation",text:"Buy"}})},key:"".concat(nativeCurrency,"-buy-button")},t("buyAsset",[nativeCurrency]))])):react.createElement(component_library.EY,{variant:design_system.J3.bodySm,textAlign:design_system.nO.Left,as:"h6"},t("insufficientCurrencyDeposit",[nativeCurrency,networkName])),useIcon:!0,iconFillColor:"var(--color-error-default)",type:"danger"})),shouldDisplayWarning&&errorKey!==error_keys.uo&&react.createElement("div",{className:"confirm-approve-content__warning"},react.createElement(error_message.A,{errorKey:errorKey})),showWarningModal&&react.createElement(set_approval_for_all_warning.A,{collectionName:title,senderAddress:fromAddress,name:fromName,isERC721:assetStandard===transaction.ph.ERC721,total:collectionBalance,onSubmit:onSubmit,onCancel:onCancel}),contentComponent&&react.createElement(page_container.QY,{onCancel:onCancel,cancelText:t("reject"),onSubmit:topLevelHandleSubmit,submitText:t("confirm"),submitButtonType:isSetApproveForAll&&isApprovalOrRejection||isMaliciousRequest?"danger-primary":"primary",disabled:disabled},unapprovedTxCount>1&&react.createElement("a",{onClick:onCancelAll},t("rejectTxsN",[unapprovedTxCount]))),editingGas&&!supportsEIP1559&&react.createElement(edit_gas_popover.A,{mode:gas.W5.modifyInPlace,onClose:handleCloseEditGas,transaction:currentTransaction}),supportsEIP1559&&react.createElement(react.Fragment,null,react.createElement(edit_gas_fee_popover.A,null),react.createElement(advanced_gas_fee_popover.A,null)),isShowingTxInsightWarnings&&react.createElement(insight_warnings.A,{warnings:insightObject.warnings,origin:origin,onCancel:function(){return setIsShowingTxInsightWarnings(!1)},onSubmit:function(){handleSubmit(),setIsShowingTxInsightWarnings(!1)}})))};ConfirmPageContainer.propTypes={action:prop_types_default().string,onEdit:prop_types_default().func,showEdit:prop_types_default().bool,subtitleComponent:prop_types_default().node,title:prop_types_default().string,image:prop_types_default().string,titleComponent:prop_types_default().node,hideSenderToRecipient:prop_types_default().bool,showAccountInHeader:prop_types_default().bool,assetStandard:prop_types_default().string,fromAddress:prop_types_default().string,fromName:prop_types_default().string,toAddress:prop_types_default().string,toEns:prop_types_default().string,toNickname:prop_types_default().string,contentComponent:prop_types_default().node,errorKey:prop_types_default().string,errorMessage:prop_types_default().string,dataHexComponent:prop_types_default().node,detailsComponent:prop_types_default().node,txData:prop_types_default().object,tokenAddress:prop_types_default().string,nonce:prop_types_default().string,warning:prop_types_default().string,unapprovedTxCount:prop_types_default().number,origin:prop_types_default().string.isRequired,ethGasPriceWarning:prop_types_default().string,onCancelAll:prop_types_default().func,onCancel:prop_types_default().func,onSubmit:prop_types_default().func,onSetApprovalForAll:prop_types_default().func,showWarningModal:prop_types_default().bool,disabled:prop_types_default().bool,editingGas:prop_types_default().bool,handleCloseEditGas:prop_types_default().func,currentTransaction:prop_types_default().object.isRequired,supportsEIP1559:prop_types_default().bool,nativeCurrency:prop_types_default().string,isApprovalOrRejection:prop_types_default().bool,displayAccountBalanceHeader:prop_types_default().bool,noteComponent:prop_types_default().node};let confirm_page_container_component=ConfirmPageContainer;ConfirmPageContainer.__docgenInfo={description:"",methods:[],displayName:"ConfirmPageContainer",props:{action:{description:"",type:{name:"string"},required:!1},onEdit:{description:"",type:{name:"func"},required:!1},showEdit:{description:"",type:{name:"bool"},required:!1},subtitleComponent:{description:"",type:{name:"node"},required:!1},title:{description:"",type:{name:"string"},required:!1},image:{description:"",type:{name:"string"},required:!1},titleComponent:{description:"",type:{name:"node"},required:!1},hideSenderToRecipient:{description:"",type:{name:"bool"},required:!1},showAccountInHeader:{description:"",type:{name:"bool"},required:!1},assetStandard:{description:"",type:{name:"string"},required:!1},fromAddress:{description:"",type:{name:"string"},required:!1},fromName:{description:"",type:{name:"string"},required:!1},toAddress:{description:"",type:{name:"string"},required:!1},toEns:{description:"",type:{name:"string"},required:!1},toNickname:{description:"",type:{name:"string"},required:!1},contentComponent:{description:"",type:{name:"node"},required:!1},errorKey:{description:"",type:{name:"string"},required:!1},errorMessage:{description:"",type:{name:"string"},required:!1},dataHexComponent:{description:"",type:{name:"node"},required:!1},detailsComponent:{description:"",type:{name:"node"},required:!1},txData:{description:"",type:{name:"object"},required:!1},tokenAddress:{description:"",type:{name:"string"},required:!1},nonce:{description:"",type:{name:"string"},required:!1},warning:{description:"",type:{name:"string"},required:!1},unapprovedTxCount:{description:"",type:{name:"number"},required:!1},origin:{description:"",type:{name:"string"},required:!0},ethGasPriceWarning:{description:"",type:{name:"string"},required:!1},onCancelAll:{description:"",type:{name:"func"},required:!1},onCancel:{description:"",type:{name:"func"},required:!1},onSubmit:{description:"",type:{name:"func"},required:!1},onSetApprovalForAll:{description:"",type:{name:"func"},required:!1},showWarningModal:{description:"",type:{name:"bool"},required:!1},disabled:{description:"",type:{name:"bool"},required:!1},editingGas:{description:"",type:{name:"bool"},required:!1},handleCloseEditGas:{description:"",type:{name:"func"},required:!1},currentTransaction:{description:"",type:{name:"object"},required:!0},supportsEIP1559:{description:"",type:{name:"bool"},required:!1},nativeCurrency:{description:"",type:{name:"string"},required:!1},isApprovalOrRejection:{description:"",type:{name:"bool"},required:!1},displayAccountBalanceHeader:{description:"",type:{name:"bool"},required:!1},noteComponent:{description:"",type:{name:"node"},required:!1}}};var confirm_page_container_header=__webpack_require__("./ui/pages/confirmations/components/confirm-page-container/confirm-page-container-header/index.js");__webpack_require__("./ui/pages/confirmations/components/confirm-page-container/confirm-detail-row/index.js");var confirm_page_container_navigation=__webpack_require__("./ui/pages/confirmations/components/confirm-page-container/confirm-page-container-navigation/index.js"),confirm_page_container_content=__webpack_require__("./ui/pages/confirmations/components/confirm-page-container/confirm-page-container-content/index.js")},"./ui/pages/confirmations/components/set-approval-for-all-warning/index.js":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{__webpack_require__.d(__webpack_exports__,{A:()=>set_approval_for_all_warning});var react=__webpack_require__("./node_modules/react/index.js"),prop_types=__webpack_require__("./node_modules/prop-types/index.js"),prop_types_default=__webpack_require__.n(prop_types),useI18nContext=__webpack_require__("./ui/hooks/useI18nContext.js"),popover=__webpack_require__("./ui/components/ui/popover/index.js"),box=__webpack_require__("./ui/components/ui/box/index.js"),design_system=__webpack_require__("./ui/helpers/constants/design-system.ts"),identicon=__webpack_require__("./ui/components/ui/identicon/index.js"),util=__webpack_require__("./ui/helpers/utils/util.js"),component_library=__webpack_require__("./ui/components/component-library/index.ts"),SetApproveForAllWarning=function(param){var collectionName=param.collectionName,senderAddress=param.senderAddress,name=param.name,total=param.total,isERC721=param.isERC721,onSubmit=param.onSubmit,onCancel=param.onCancel,t=(0,useI18nContext.P)(),footer=react.createElement(box.Ay,{display:design_system.Nu.FLEX,flexDirection:design_system.GO.COLUMN,justifyContent:design_system.A9.SPACE_BETWEEN,className:"set-approval-for-all-warning__footer",gap:4},react.createElement(component_library.$n,{className:"set-approval-for-all-warning__footer__approve-button",variant:component_library.Vt.PRIMARY,danger:!0,onClick:onSubmit},t("approveButtonText")),react.createElement(component_library.$n,{className:"set-approval-for-all-warning__footer__cancel-button",variant:component_library.Vt.SECONDARY,onClick:onCancel},t("reject")));return react.createElement(popover.A,{className:"set-approval-for-all-warning__content",footer:footer},react.createElement(box.Ay,{display:design_system.Nu.FLEX,flexDirection:design_system.GO.ROW,padding:4,className:"set-approval-for-all-warning__content__header"},react.createElement(component_library.In,{name:component_library.$M.Danger,className:"set-approval-for-all-warning__content__header__warning-icon"}),react.createElement(component_library.EY,{variant:design_system.J3.headingSm,as:"h4"},t("yourNFTmayBeAtRisk"))),react.createElement(box.Ay,{display:design_system.Nu.FLEX,padding:4,justifyContent:design_system.A9.spaceBetween,className:"set-approval-for-all-warning__content__account"},react.createElement(box.Ay,{display:design_system.Nu.FLEX},react.createElement(identicon.A,{address:senderAddress,diameter:32}),react.createElement(component_library.EY,{variant:design_system.J3.bodyMd,as:"h5",marginLeft:2,className:"set-approval-for-all-warning__content__account-name"},react.createElement("strong",null,name)," "," (".concat((0,util.Wr)(senderAddress),")"))),isERC721&&total&&react.createElement(component_library.EY,null,"".concat(t("total"),": ").concat(total))),react.createElement(component_library.EY,{margin:4,marginTop:4,marginBottom:4,variant:design_system.J3.bodySm,as:"h6"},t("nftWarningContent",[react.createElement("strong",{key:"non_custodial_bold"},t("nftWarningContentBold",[collectionName||""])),react.createElement("strong",{key:"non_custodial_grey"},t("nftWarningContentGrey"))])))};SetApproveForAllWarning.propTypes={collectionName:prop_types_default().string,senderAddress:prop_types_default().string,name:prop_types_default().string,total:prop_types_default().string,isERC721:prop_types_default().bool,onSubmit:prop_types_default().func,onCancel:prop_types_default().func};let set_approval_for_all_warning=SetApproveForAllWarning;SetApproveForAllWarning.__docgenInfo={description:"",methods:[],displayName:"SetApproveForAllWarning",props:{collectionName:{description:"NFT collection name that is being approved",type:{name:"string"},required:!1},senderAddress:{description:"Address of a current user that is approving collection",type:{name:"string"},required:!1},name:{description:"Name of a current user that is approving collection",type:{name:"string"},required:!1},total:{description:"Total number of items that are being approved",type:{name:"string"},required:!1},isERC721:{description:"Is asset standard ERC721",type:{name:"bool"},required:!1},onSubmit:{description:"Function that approves collection",type:{name:"func"},required:!1},onCancel:{description:"Function that rejects collection",type:{name:"func"},required:!1}}}},"./ui/pages/confirmations/confirmation/components/queued-requests-banner-alert/queued-requests-banner-alert.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{__webpack_require__.d(__webpack_exports__,{Y:()=>QueuedRequestsBannerAlert});var react__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/react/index.js"),react_redux__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./node_modules/react-redux/es/index.js"),_shared_constants_metametrics__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./shared/constants/metametrics.ts"),_components_component_library__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("./ui/components/component-library/index.ts"),_hooks_useI18nContext__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__("./ui/hooks/useI18nContext.js"),_selectors__WEBPACK_IMPORTED_MODULE_5__=__webpack_require__("./ui/selectors/index.js"),_hooks_useQueuedConfirmationEvents__WEBPACK_IMPORTED_MODULE_6__=__webpack_require__("./ui/pages/confirmations/hooks/useQueuedConfirmationEvents.ts"),QueuedRequestsBannerAlert=function(){var t=(0,_hooks_useI18nContext__WEBPACK_IMPORTED_MODULE_4__.P)(),queuedRequestCount=(0,react_redux__WEBPACK_IMPORTED_MODULE_1__.d4)(_selectors__WEBPACK_IMPORTED_MODULE_5__.uZ);return((0,_hooks_useQueuedConfirmationEvents__WEBPACK_IMPORTED_MODULE_6__.F)(_shared_constants_metametrics__WEBPACK_IMPORTED_MODULE_2__.Gq.QueueController),0===queuedRequestCount)?null:react__WEBPACK_IMPORTED_MODULE_0__.createElement(_components_component_library__WEBPACK_IMPORTED_MODULE_3__.b8,{severity:_components_component_library__WEBPACK_IMPORTED_MODULE_3__.OU.Info,description:t("existingRequestsBannerAlertDesc"),margin:4})}}}]);