LavaPack.loadBundle([[9982,{"../../../shared/constants/metametrics":8495,"../../../shared/constants/security-provider":8510,"../../../shared/lib/transactions-controller-utils":8696,"@metamask/transaction-controller":4096},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.formatAccountType=function(e){if("default"===e)return"metamask";return e},n.generateSignatureUniqueId=function(e){return`signature-${e}`},n.getBlockaidMetricsProps=void 0,n.getMethodName=function(e){if(!e||"string"!=typeof e)return"";return e.replace(/([a-z])([A-Z])/gu,"$1 $2").replace(/([A-Z])([a-z])/gu," $1$2").replace(/ +/gu," ")},n.getSwapAndSendMetricsProps=void 0;var r=e("@metamask/transaction-controller"),o=e("../../../shared/constants/security-provider"),s=e("../../../shared/constants/metametrics"),i=e("../../../shared/lib/transactions-controller-utils");n.getBlockaidMetricsProps=({securityAlertResponse:e})=>{if(!e)return{};const t={},{providerRequestsCount:n,reason:r,result_type:i,description:a,source:c}=e,u=(e=>{let t;return e===o.BlockaidResultType.Malicious?t=[s.MetaMetricsEventUiCustomization.FlaggedAsMalicious]:e===o.BlockaidResultType.Warning?t=[s.MetaMetricsEventUiCustomization.FlaggedAsWarning]:e===o.BlockaidResultType.Errored&&(t=[s.MetaMetricsEventUiCustomization.SecurityAlertError]),t})(i);return u&&(t.ui_customizations=u),i!==o.BlockaidResultType.Benign&&(t.security_alert_reason=r??o.BlockaidReason.notApplicable),a&&(t.security_alert_description=a),t.security_alert_response=i??o.BlockaidResultType.NotApplicable,t.security_alert_source=c,n&&Object.keys(n).forEach(e=>{t[`ppom_${e}_count`]=n[e]}),t};n.getSwapAndSendMetricsProps=e=>{if(e.type!==r.TransactionType.swapAndSend)return{};const{chainId:t,sourceTokenAmount:n,sourceTokenDecimals:o,destinationTokenAmount:s,destinationTokenDecimals:a,sourceTokenSymbol:c,destinationTokenAddress:u,destinationTokenSymbol:l,sourceTokenAddress:d}=e;return{chain_id:t,token_amount_source:n&&o?(0,i.calcTokenAmount)(n,o).toString():undefined,token_amount_dest_estimate:s&&a?(0,i.calcTokenAmount)(s,a).toString():undefined,token_symbol_source:c,token_symbol_destination:l,token_address_source:d,token_address_destination:u}}}}},{package:"$root$",file:"ui/helpers/utils/metrics.js"}],[9997,{"../../../shared/lib/environment":8598},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.isSnapIgnoredInProd=void 0;var r=e("../../../shared/lib/environment");const o=["npm:@metamask/preinstalled-example-snap"];n.isSnapIgnoredInProd=e=>!!(0,r.isProduction)()&&o.includes(e)}}},{package:"$root$",file:"ui/helpers/utils/snaps.ts"}]],[],{});