{"version":3,"sources":["webpack:///webpack/bootstrap","webpack:///./js/src/error-handler.js","webpack:///./js/src/frontend.js","webpack:///./js/src/payment-element/request.js","webpack:///./js/src/payment-element/stripe-payments-handler.js","webpack:///(webpack)/buildin/global.js","webpack:///./node_modules/whatwg-fetch/fetch.js"],"names":["formId","ccFieldId","validationPlacement","initErrorHandler","formIdParam","ccFieldIdParam","displayError","message","cardContainer","gform","utils","getNode","document","legacyCardContainer","descriptionElement","getValidationPlacement","fieldContainer","getFieldContainer","classList","add","validationContainerExists","insertValidationContainer","validationContainer","getValidationContainer","innerText","setTimeout","wp","a11y","speak","clearErrors","remove","validationMessages","getNodes","forEach","validationMessage","field","hasClassFromArray","element","position","createElement","className","insertAdjacentElement","nextElementSibling","matches","previousElementSibling","window","GFStripe","extensions","styles","gravityformsstripe","$","args","prop","hasOwnProperty","form","activeFeed","GFCCField","stripeResponse","hasPaymentIntent","stripePaymentHandlers","cardStyle","componentStyles","Object","keys","length","JSON","parse","stringify","pageInstance","setComponentStyleValue","key","value","themeFrameworkStyles","manualElement","resolvedValue","indexOf","computedValue","getPropertyValue","selector","getComputedStyle","resolvedKey","replace","toLowerCase","trim","setComponentStyles","obj","objKey","parentKey","getElementById","firstFormControl","querySelector","objPath","init","isCreditCardOnPage","stripe_payment","GFStripeObj","feedActivated","hidePostalCode","apiKey","addAction","feeds","i","addonSlug","isActivated","j","feedId","gformCalculateTotalPrice","StripePaymentsHandler","stripe","Stripe","elements","address_zip","card","_destroyed","destroy","create","classes","cardClasses","style","hide","html","gforms_stripe_frontend_strings","requires_action","jQuery","append","gf_global","spinnerUrl","$iconSpan","isThemeFrameWork","console","log","removeClass","addClass","scaActionHandler","mount","attr","on","event","displayStripeCardError","setPublishableKey","getElement","isStripePaymentHandlerInitiated","no_active_frontend_feed","resetStripeStatus","isLastPage","addFilter","total","getOrderData","paymentAmount","paymentAmountInfo","getProductFieldPrice","price","qty","setupFeeInfo","setupFee","stripe_connect_enabled","updatePaymentAmount","order","skipElementsHandler","val","sourcePage","parseInt","targetPage","data","gformIsHidden","maybeHitRateLimits","invisibleCaptchaPending","recaptchav3Pending","preventDefault","maybeAddSpinner","injectHoneypot","validate","submit","type","createPaymentMethod","createToken","ccInputPrefix","cc","number","find","exp_month","exp_year","cvc","name","status","response","responseHandler","payment_element_intent_failure","prepend","fieldId","GFMergeTag","getMergeTagValue","getBillingAddressMergeTag","ccInputSuffixes","input","ccNumber","cardType","gformFindCardType","cardLabels","slice","toJSON","elementsResponseHandler","currency","applyFilters","amount","gf_currency_config","decimals","gformRoundPrice","error","paymentMethod","last4","brand","ajax","async","url","ajaxurl","dataType","method","action","nonce","create_payment_intent_nonce","payment_method","feed_id","success","token","payment_intent","id","currentResponse","updatedToken","retrievePaymentIntent","client_secret","then","result","paymentIntent","handleCardAction","scaSuccess","isConversationalForm","trigger","handleCardPayment","targetPageInput","convoForm","currentPage","getCurrentPageNumber","ccPage","currentPageInput","isAjax","gformAddSpinner","$spinnerTarget","after","spinnerNodes","querySelectorAll","node","cardholderName","tokenData","address_line1","replaceMergeTags","address_line2","address_city","address_state","address_country","country","countryFieldValue","code","line1","line2","city","state","postal_code","billing_details","address","cardErrorCount","reCaptcha","reCaptchaResponse","recaptchaField","recaptchaResponse","target","shouldInjectHoneypot","isFormSubmission","isSaveContinue","isHeadlessBrowser","hashInput","version_hash","insertAdjacentHTML","dataset","formid","nodes","targetEl","_phantom","callPhantom","__phantomas","Buffer","emit","spawn","webdriver","_selenium","_Selenium_IDE_Recorder","callSelenium","__nightmare","domAutomation","domAutomationController","__webdriver_evaluate","__selenium_evaluate","__webdriver_script_function","__webdriver_script_func","__webdriver_script_fn","__fxdriver_evaluate","__driver_unwrapped","__webdriver_unwrapped","__driver_evaluate","__selenium_unwrapped","__fxdriver_unwrapped","documentElement","getAttribute","convert","custom","selectorString","convertElements","converted","unshift","undefined","request","isJson","has","set","get","delete","options","credentials","body","headers","URL","searchParams","is_preview","fetch","toString","json","constructor","draftId","validateForm","bind","handlelinkEmailFieldChange","reInitiateLinkWithEmailAddress","initStripe","link_email_field_id","emailField","email","link","mountCard","bindEvents","getStripeCoupon","coupons","stripeCoupons","currentCoupon","getStripeCouponCode","foundCoupon","coupon","localeCompare","sensitivity","getStripeCouponInput","couponField","couponInput","couponCode","bindStripeCoupon","addEventListener","handleCouponChange","setAttribute","contains","toUpperCase","updateStripeCoupon","coupon_code","get_stripe_coupon_nonce","initialPaymentInformation","initial_payment_information","Math","round","appearance","payment_method_types","values","mountLink","linkDiv","before","String","match","destroyLink","emailAddress","defaultValues","siblings","complete","failWithMessage","payment_incomplete","getFormData","invalid_nonce","failed_to_confirm_intent","invoice_id","redirect_url","location","href","resume_token","tracking_id","is_valid_intent","intent","is_valid_submission","is_valid","is_spam","resetFormValidationErrors","hasTrial","isValidCoupon","coupon_invalid","handleRedirect","getRedirectUrl","confirm","payment_amount","formData","FormData","appendParams","random","validate_form_nonce","newAmount","mode","updatedPaymentInformation","update","applyStripeCoupon","percentage_off","amount_off","confirmData","submitError","paymentData","clientSecret","confirmParams","return_url","payment_method_data","redirect","paymentResult","isSetupIntent","confirmSetup","confirmPayment","e","handlePaymentRedirect","handleFailedPayment","setupIntent","intentTypeString","isAjaxEmbed","errorMessage","delete_draft_nonce","rate_limiting_nonce","error_count","linkContainer","el","failed_to_process_payment","_gformPriceFields","setUpFieldId","productTotal","isTrial","recurringAmount","isTextCoupon","gformCalculateProductPrice"],"mappings":";QAAA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;;QAEA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;;;QAGA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;QACA,0CAA0C,gCAAgC;QAC1E;QACA;;QAEA;QACA;QACA;QACA,wDAAwD,kBAAkB;QAC1E;QACA,iDAAiD,cAAc;QAC/D;;QAEA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA,yCAAyC,iCAAiC;QAC1E,gHA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,OAAQ,uBAAuB3H,MAA/B,EAAwCgE,MAAxC,IAAkD,CAAzD;AACA;AA5zByC,C;;;;;;;;;;;ACF3C;;AAEA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;;AAEA;AACA;AACA,4CAA4C;;AAE5C;;;;;;;;;;;;;ACnBA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA,KAAK;AACL;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEO;AACP;;AAEA;AACA;AACA;AACA,KAAK;AACL,GAAG;AACH;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,GAAG;AACH;AACA;AACA,KAAK;AACL;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,iBAAiB,iBAAiB;AAClC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,KAAK;AACL;AACA,KAAK;AACL;AACA,KAAK;AACL;AACA,KAAK;AACL;AACA;AACA;AACA,KAAK;AACL;AACA,KAAK;AACL;AACA;;AAEA;AACA;AACA,qDAAqD;AACrD,OAAO;AACP;AACA,OAAO;AACP,4EAA4E;AAC5E;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,OAAO;AACP;AACA,OAAO;AACP;AACA,OAAO;AACP;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA,KAAK;AACL;AACA,KAAK;AACL;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,KAAK;AACL;AACA,KAAK;AACL;AACA,KAAK;AACL;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEO;AACP;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,4BAA4B,qBAAqB;AACjD;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,KAAK;AACL;AACA;;AAEA;;AAEO;AACP;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;;AAEA;AACA,qCAAqC,4BAA4B;AACjE;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA,6BAA6B,0BAA0B,eAAe;AACtE;;AAEO;AACP;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEO;AACP;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;;AAEA;AACA;AACA;AACA,OAAO;AACP;;AAEA;AACA;AACA;AACA,OAAO;AACP;;AAEA;AACA;AACA;AACA,OAAO;AACP;;AAEA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;;AAEA;;AAEA;AACA;AACA,KAAK;AACL;AACA;;AAEA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA,OAAO;AACP,KAAK;AACL;AACA;AACA,OAAO;AACP;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,GAAG;AACH;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA","file":"./js/frontend.js","sourcesContent":[" \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 0);\n","\n/**\n * Error handling UI and accessibility.\n */\nlet formId;\nlet ccFieldId;\nlet validationPlacement = null;\n\n/**\n * @function initErrorHandler\n * @description Initializes the error handler with the provided form and field IDs.\n *\n * @param {string} formIdParam The form ID.\n * @param {string} ccFieldIdParam The field ID.\n */\nfunction initErrorHandler( formIdParam, ccFieldIdParam ) {\n\tformId = formIdParam;\n\tccFieldId = ccFieldIdParam;\n}\n\n/**\n * @function displayError\n * @description Displays an error message next to the invalid element.\n *\n * @param {string} invalidElementSelector The CSS selector of the element where the error message will be displayed next to.\n * @param {string} message The error message.\n */\nfunction displayError( message ) {\n\tlet cardContainer = gform.utils.getNode( `#gform_${ formId } .ginput_stripe_creditcard`, document, true );\n\tconst legacyCardContainer = gform.utils.getNode( `#gform_${ formId } .ginput_container_creditcard`, document, true );\n\tif ( legacyCardContainer ) {\n\t\tcardContainer = legacyCardContainer;\n\t}\n\n\t// Handle edge case when field description exists and is below, then validation should be displayed beneath description instead of the field.\n\tconst descriptionElement = gform.utils.getNode( `#gfield_description_${formId}_${ccFieldId}`, document, true );\n\tif ( getValidationPlacement() === 'below' && descriptionElement ) {\n\t\tcardContainer = descriptionElement;\n\t}\n\n\tif ( ! cardContainer ) {\n\t\treturn;\n\t}\n\n\t// Add error class to the whole field.\n\tconst fieldContainer = getFieldContainer();\n\tfieldContainer.classList.add( 'gfield_error' );\n\n\t// Make sure validation container exists after field container, if not create it.\n\tif ( ! validationContainerExists( cardContainer ) ) {\n\t\tinsertValidationContainer( cardContainer );\n\t}\n\n\tconst validationContainer = getValidationContainer( cardContainer );\n\tif ( ! validationContainer ) {\n\t\treturn;\n\t}\n\n\tvalidationContainer.innerText = message;\n\n\tsetTimeout( () => { wp.a11y.speak( message ) }, 500 );\n}\n\n/**\n * @function clearErrors\n * @description Clears all error messages and classes from the field.\n */\nfunction clearErrors() {\n\tconst fieldContainer = getFieldContainer();\n\tfieldContainer.classList.remove( 'gfield_error' );\n\tconst validationMessages = gform.utils.getNodes( '.stripe_validation_error.validation_message', true, fieldContainer, true );\n\tvalidationMessages.forEach( ( validationMessage ) => {\n\t\tvalidationMessage.remove();\n\t} );\n}\n\n/**\n * Gets the field container.\n *\n * @function getFieldContainer\n * @description Retrieves the field container element based on the form and field IDs.\n *\n * @return {HTMLElement|null} The field container element.\n */\nfunction getFieldContainer() {\n\treturn gform.utils.getNode( `#field_${ formId }_${ ccFieldId }`, document, true );\n}\n\n/**\n * @function getValidationPlacement\n * @description Determines the position of the validation message (above or below the element).\n *\n * @return {string} The placement setting, 'below' or 'above'.\n */\nfunction getValidationPlacement() {\n\tif ( validationPlacement ) {\n\t\treturn validationPlacement;\n\t}\n\n\tconst field = gform.utils.getNode( `#field_${ formId }_${ ccFieldId }`, document, true );\n\tif ( field && gform.utils.hasClassFromArray( field, [ 'field_validation_above' ] ) ) {\n\t\tvalidationPlacement = 'above';\n\t} else {\n\t\tvalidationPlacement = 'below';\n\t}\n\n\treturn validationPlacement;\n}\n\n/**\n * Inserts the validation container after or before an element.\n *\n * @function insertValidationContainer\n * @description Inserts the validation container in the appropriate position relative to the element.\n *\n * @param {HTMLElement} element The element after or before which to insert the validation container.\n */\nfunction insertValidationContainer( element ) {\n\tconst position = getValidationPlacement();\n\tconst validationContainer = document.createElement( 'div' );\n\tvalidationContainer.className = 'stripe_validation_error gfield_description validation_message gfield_validation_message';\n\tif ( position === 'below' ) {\n\t\telement.insertAdjacentElement( 'afterend', validationContainer );\n\t} else {\n\t\telement.insertAdjacentElement( 'beforebegin', validationContainer );\n\t}\n}\n\n/**\n * @function validationContainerExists\n * @description Checks if the validation container exists next to the provided element.\n *\n * @param {HTMLElement} element The element to check.\n *\n * @return {boolean} True if the validation message container exists, false otherwise.\n */\nfunction validationContainerExists( element ) {\n\tif ( ! element ) {\n\t\treturn false;\n\t}\n\treturn getValidationContainer( element ) !== null;\n}\n\n/**\n * @function getValidationContainer\n * @description Retrieves the validation message container element, if it exists, next to or before the provided element.\n *\n * @param {HTMLElement} element The element to check.\n *\n * @return {HTMLElement|null} The validation message container element, or null if it does not exist.\n */\nfunction getValidationContainer( element ) {\n\tif ( ! element ) {\n\t\treturn null;\n\t}\n\n\tif ( getValidationPlacement() === 'below' && element.nextElementSibling ) {\n\t\treturn element.nextElementSibling.matches( '.validation_message' ) ? element.nextElementSibling : null;\n\t}\n\n\tif ( element.previousElementSibling ) {\n\t\treturn element.previousElementSibling.matches( '.validation_message' ) ? element.previousElementSibling : null;\n\t}\n\n\treturn null;\n}\n\nexport {\n\tinitErrorHandler,\n\tdisplayError,\n\tclearErrors\n};\n","/**\n * Front-end Script\n */\n\nimport StripePaymentsHandler from \"./payment-element/stripe-payments-handler\";\nimport { initErrorHandler, clearErrors, displayError } from \"./error-handler\";\nwindow.GFStripe = null;\n\ngform.extensions = gform.extensions || {};\ngform.extensions.styles = gform.extensions.styles || {};\ngform.extensions.styles.gravityformsstripe = gform.extensions.styles.gravityformsstripe || {};\n\n(function ($) {\n\n\tGFStripe = function (args) {\n\n\t\tfor ( var prop in args ) {\n\t\t\tif ( args.hasOwnProperty( prop ) )\n\t\t\t\tthis[ prop ] = args[ prop ];\n\t\t}\n\n\t\tthis.form = null;\n\n\t\tthis.activeFeed = null;\n\n\t\tthis.GFCCField = null;\n\n\t\tthis.stripeResponse = null;\n\n\t\tthis.hasPaymentIntent = false;\n\n\t\tthis.stripePaymentHandlers = {};\n\n\n\t\tinitErrorHandler( this.formId, this.ccFieldId );\n\t\tthis.cardStyle = this.cardStyle || {};\n\n\t\tgform.extensions.styles.gravityformsstripe[ this.formId ] = gform.extensions.styles.gravityformsstripe[ this.formId ] || {};\n\n\t\tconst componentStyles = Object.keys( this.cardStyle ).length > 0 ? JSON.parse( JSON.stringify( this.cardStyle ) ) : gform.extensions.styles.gravityformsstripe[ this.formId ][ this.pageInstance ] || {};\n\n\t\tthis.setComponentStyleValue = function ( key, value, themeFrameworkStyles, manualElement ) {\n\t\t\tlet resolvedValue = '';\n\n\t\t\t// If the value provided is a custom property let's begin\n\t\t\tif ( value.indexOf( '--' ) === 0 ) {\n\t\t\t\tconst computedValue = themeFrameworkStyles.getPropertyValue( value );\n\n\t\t\t\t// If we have a computed end value from the custom property, let's use that\n\t\t\t\tif ( computedValue ) {\n\t\t\t\t\tresolvedValue = computedValue;\n\t\t\t\t}\n\t\t\t\t\t// Otherwise, let's use a provided element or the form wrapper\n\t\t\t\t// along with the key to nab the computed end value for the CSS property\n\t\t\t\telse {\n\t\t\t\t\tconst selector = manualElement ? getComputedStyle( manualElement ) : themeFrameworkStyles;\n\t\t\t\t\tconst resolvedKey = key === 'fontSmoothing' ? '-webkit-font-smoothing' : key;\n\t\t\t\t\tresolvedValue = selector.getPropertyValue( resolvedKey.replace( /([a-z])([A-Z])/g, '$1-$2' ).toLowerCase() );\n\t\t\t\t}\n\t\t\t}\n\t\t\t// Otherwise let's treat the provided value as the actual CSS value wanted\n\t\t\telse {\n\t\t\t\tresolvedValue = value;\n\t\t\t}\n\n\t\t\treturn resolvedValue.trim();\n\t\t};\n\n\t\tthis.setComponentStyles = function ( obj, objKey, parentKey ) {\n\t\t\t// If our object doesn't have any styles specified, let's bail here\n\t\t\tif ( Object.keys( obj ).length === 0 ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// Grab the computed styles for the form, which the global CSS API and theme framework are scoped to\n\t\t\tconst form = document.getElementById( 'gform_' + this.formId );\n\t\t\tconst themeFrameworkStyles = getComputedStyle( form );\n\n\t\t\t// Grab the first form control in the form for fallback CSS property value computation\n\t\t\tconst firstFormControl = form.querySelector( '.gfield input' )\n\n\t\t\t// Note, this currently only supports three levels deep of object nesting.\n\t\t\tObject.keys( obj ).forEach( ( key ) => {\n\t\t\t\t// Handling of keys that are objects with additional key/value pairs\n\t\t\t\tif ( typeof obj[ key ] === 'object' ) {\n\n\t\t\t\t\t// Create object for top level key\n\t\t\t\t\tif ( !parentKey ) {\n\t\t\t\t\t\tthis.cardStyle[ key ] = {};\n\t\t\t\t\t}\n\n\t\t\t\t\t// Create object for second level key\n\t\t\t\t\tif ( parentKey ) {\n\t\t\t\t\t\tthis.cardStyle[ parentKey ][ key ] = {};\n\t\t\t\t\t}\n\n\t\t\t\t\tconst objPath = parentKey ? parentKey : key;\n\n\t\t\t\t\t// Recursively pass each key's object through our method for continued processing\n\t\t\t\t\tthis.setComponentStyles( obj[ key ], key, objPath );\n\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\t// Handling of keys that are not objects and need their value to be set\n\t\t\t\tif ( typeof obj[ key ] !== 'object' ) {\n\t\t\t\t\tlet value = '';\n\t\t\t\t\t// Handling of nested keys\n\t\t\t\t\tif ( parentKey ) {\n\t\t\t\t\t\tif ( objKey && objKey !== parentKey ) {\n\t\t\t\t\t\t\t// Setting value for a key three levels into the object\n\t\t\t\t\t\t\tvalue = this.setComponentStyleValue( key, componentStyles[ parentKey ][ objKey ][ key ], themeFrameworkStyles, firstFormControl );\n\t\t\t\t\t\t\tif ( value ) {\n\t\t\t\t\t\t\t\tthis.cardStyle[ parentKey ][ objKey ][ key ] = value;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t// Setting value for a key two levels into the object\n\t\t\t\t\t\t\tvalue = this.setComponentStyleValue( key, componentStyles[ parentKey ][ key ], themeFrameworkStyles, firstFormControl );\n\t\t\t\t\t\t\tif ( value ) {\n\t\t\t\t\t\t\t\tthis.cardStyle[ parentKey ][ key ] = value;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\t// Setting value for a key one level into the object\n\t\t\t\t\t\tvalue = this.setComponentStyleValue( key, componentStyles[ key ], themeFrameworkStyles, firstFormControl );\n\t\t\t\t\t\tif ( value ) {\n\t\t\t\t\t\t\tthis.cardStyle[ key ] = value;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} );\n\t\t};\n\n\t\tthis.init = async function () {\n\n\t\t\tthis.setComponentStyles( componentStyles );\n\n\t\t\tif ( !this.isCreditCardOnPage() ) {\n\t\t\t\tif ( this.stripe_payment === 'stripe.js' || ( this.stripe_payment === 'elements' && !$( '#gf_stripe_response' ).length ) ) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tvar GFStripeObj = this, activeFeed = null, feedActivated = false,\n\t\t\t\thidePostalCode = false, apiKey = this.apiKey;\n\n\t\t\tthis.form = $( '#gform_' + this.formId );\n\t\t\tthis.GFCCField = $( '#input_' + this.formId + '_' + this.ccFieldId + '_1' );\n\n\t\t\tgform.addAction( 'gform_frontend_feeds_evaluated', async function ( feeds, formId ) {\n\t\t\t\tif ( formId !== GFStripeObj.formId ) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tactiveFeed = null;\n\t\t\t\tfeedActivated = false;\n\t\t\t\thidePostalCode = false;\n\n\t\t\t\tfor ( var i = 0; i < Object.keys( feeds ).length; i++ ) {\n\t\t\t\t\tif ( feeds[ i ].addonSlug === 'gravityformsstripe' && feeds[ i ].isActivated ) {\n\t\t\t\t\t\tfeedActivated = true;\n\n\t\t\t\t\t\tfor ( var j = 0; j < Object.keys( GFStripeObj.feeds ).length; j++ ) {\n\t\t\t\t\t\t\tif ( GFStripeObj.feeds[ j ].feedId === feeds[ i ].feedId ) {\n\t\t\t\t\t\t\t\tactiveFeed = GFStripeObj.feeds[ j ];\n\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\tapiKey = activeFeed.hasOwnProperty( 'apiKey' ) ? activeFeed.apiKey : GFStripeObj.apiKey;\n\t\t\t\t\t\tGFStripeObj.activeFeed = activeFeed;\n\n\t\t\t\t\t\tgformCalculateTotalPrice( formId );\n\n\t\t\t\t\t\tif ( GFStripeObj.stripe_payment == 'payment_element' ) {\n\t\t\t\t\t\t\tGFStripeObj.stripePaymentHandlers[ formId ] = new StripePaymentsHandler( apiKey, GFStripeObj );\n\t\t\t\t\t\t} else if ( GFStripeObj.stripe_payment === 'elements' ) {\n\t\t\t\t\t\t\tstripe = Stripe( apiKey );\n\t\t\t\t\t\t\telements = stripe.elements();\n\n\t\t\t\t\t\t\thidePostalCode = activeFeed.address_zip !== '';\n\n\t\t\t\t\t\t\t// If Stripe Card is already on the page (AJAX failed validation, or switch frontend feeds),\n\t\t\t\t\t\t\t// Destroy the card field so we can re-initiate it.\n\t\t\t\t\t\t\tif ( card != null && card.hasOwnProperty( '_destroyed' ) && card._destroyed === false ) {\n\t\t\t\t\t\t\t\tcard.destroy();\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t// Clear card field errors before initiate it.\n\t\t\t\t\t\t\tclearErrors();\n\n\t\t\t\t\t\t\tcard = elements.create(\n\t\t\t\t\t\t\t\t'card',\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tclasses: GFStripeObj.cardClasses,\n\t\t\t\t\t\t\t\t\tstyle: GFStripeObj.cardStyle,\n\t\t\t\t\t\t\t\t\thidePostalCode: hidePostalCode\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t);\n\n\t\t\t\t\t\t\tif ( $( '.gform_stripe_requires_action' ).length ) {\n\t\t\t\t\t\t\t\tif ( $( '.ginput_container_creditcard > div' ).length === 2 ) {\n\t\t\t\t\t\t\t\t\t// Cardholder name enabled.\n\t\t\t\t\t\t\t\t\t$( '.ginput_container_creditcard > div:last' ).hide();\n\t\t\t\t\t\t\t\t\t$( '.ginput_container_creditcard > div:first' ).html( '

' + gforms_stripe_frontend_strings.requires_action + '

' );\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t$( '.ginput_container_creditcard' ).html( '

' + gforms_stripe_frontend_strings.requires_action + '

' );\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t// Add a spinner next to the validation message and disable the submit button until we are over with 3D Secure.\n\t\t\t\t\t\t\t\tif ( jQuery( '#gform_' + formId + '_validation_container h2 .gform_ajax_spinner').length <= 0 ) {\n\t\t\t\t\t\t\t\t\tjQuery( '#gform_' + formId + '_validation_container h2' ).append( '\"\"');\n\t\t\t\t\t\t\t\t\tjQuery( '#gform_submit_button_' + formId ).prop( 'disabled' , true );\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t// Update legacy close icon to an info icon.\n\t\t\t\t\t\t\t\tconst $iconSpan = jQuery( '#gform_' + formId + '_validation_container h2 .gform-icon.gform-icon--close' );\n\t\t\t\t\t\t\t\tconst isThemeFrameWork = jQuery( '.gform-theme--framework' ).length;\n\t\t\t\t\t\t\t\tconsole.log( isThemeFrameWork );\n\t\t\t\t\t\t\t\tconsole.log( $iconSpan );\n\t\t\t\t\t\t\t\tif ( $iconSpan.length && ! isThemeFrameWork ) {\n\t\t\t\t\t\t\t\t\t$iconSpan.removeClass( 'gform-icon--close' ).addClass( 'gform-icon--info' );\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\tGFStripeObj.scaActionHandler( stripe, formId );\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tcard.mount( '#' + GFStripeObj.GFCCField.attr( 'id' ) );\n\n\t\t\t\t\t\t\t\tcard.on( 'change', function ( event ) {\n\t\t\t\t\t\t\t\t\tGFStripeObj.displayStripeCardError( event );\n\t\t\t\t\t\t\t\t} );\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t} else if ( GFStripeObj.stripe_payment == 'stripe.js' ) {\n\t\t\t\t\t\t\tStripe.setPublishableKey( apiKey );\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tbreak; // allow only one active feed.\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tif ( !feedActivated ) {\n\t\t\t\t\tif ( GFStripeObj.stripe_payment === 'elements' || GFStripeObj.stripe_payment === 'payment_element' ) {\n\t\t\t\t\t\tif ( elements != null && card === elements.getElement( 'card' ) ) {\n\t\t\t\t\t\t\tcard.destroy();\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif ( GFStripeObj.isStripePaymentHandlerInitiated( formId ) ) {\n\t\t\t\t\t\t\tGFStripeObj.stripePaymentHandlers[ formId ].destroy();\n\t\t\t\t\t\t}\n\t\t\t\t\t\tdisplayError( gforms_stripe_frontend_strings.no_active_frontend_feed );\n\t\t\t\t\t}\n\n\t\t\t\t\t// remove Stripe fields and form status when Stripe feed deactivated\n\t\t\t\t\tGFStripeObj.resetStripeStatus( GFStripeObj.form, formId, GFStripeObj.isLastPage() );\n\t\t\t\t\tapiKey = GFStripeObj.apiKey;\n\t\t\t\t\tGFStripeObj.activeFeed = null;\n\t\t\t\t}\n\t\t\t} );\n\n\t\t\t// Set priority to 51 so it will be triggered after the coupons add-on\n\t\t\tgform.addFilter( 'gform_product_total', function ( total, formId ) {\n\n\t\t\t\tif (\n\t\t\t\t\tGFStripeObj.stripe_payment == 'payment_element' &&\n\t\t\t\t\tGFStripeObj.isStripePaymentHandlerInitiated( formId )\n\t\t\t\t) {\n\t\t\t\t\tGFStripeObj.stripePaymentHandlers[ formId ].getOrderData( total, formId );\n\t\t\t\t}\n\n\t\t\t\tif ( ! GFStripeObj.activeFeed ) {\n\t\t\t\t\twindow['gform_stripe_amount_' + formId] = 0;\n\t\t\t\t\treturn total;\n\t\t\t\t}\n\n\t\t\t\tif ( GFStripeObj.activeFeed.paymentAmount !== 'form_total' ) {\n\n\t\t\t\t\tconst paymentAmountInfo = GFStripeObj.getProductFieldPrice( formId, GFStripeObj.activeFeed.paymentAmount );\n\t\t\t\t\twindow[ 'gform_stripe_amount_' + formId ] = paymentAmountInfo.price * paymentAmountInfo.qty;\n\n\t\t\t\t\tif ( GFStripeObj.activeFeed.hasOwnProperty('setupFee') ) {\n\t\t\t\t\t\tconst setupFeeInfo = GFStripeObj.getProductFieldPrice( formId, GFStripeObj.activeFeed.setupFee );\n\t\t\t\t\t\twindow['gform_stripe_amount_' + formId] += setupFeeInfo.price * setupFeeInfo.qty;\n\t\t\t\t\t}\n\n\t\t\t\t} else {\n\t\t\t\t\twindow[ 'gform_stripe_amount_' + formId ] = total;\n\t\t\t\t}\n\n\t\t\t\t// Update elements payment amount if payment element is enabled.\n\t\t\t\tif (\n\t\t\t\t\tGFStripeObj.stripe_payment == 'payment_element' &&\n\t\t\t\t\tGFStripeObj.isStripePaymentHandlerInitiated( formId ) &&\n\t\t\t\t\tGFStripeObj.stripePaymentHandlers[ formId ].elements !== null &&\n\t\t\t\t\tgforms_stripe_frontend_strings.stripe_connect_enabled === \"1\"\n\t\t\t\t) {\n\t\t\t\t\tGFStripeObj.stripePaymentHandlers[ formId ].updatePaymentAmount( GFStripeObj.stripePaymentHandlers[ formId ].order.paymentAmount )\n\t\t\t\t}\n\n\t\t\t\treturn total;\n\n\t\t\t}, 51 );\n\n\t\t\tswitch ( this.stripe_payment ) {\n\t\t\t\tcase 'elements':\n\t\t\t\t\tvar stripe = null,\n\t\t\t\t\t\telements = null,\n\t\t\t\t\t\tcard = null,\n\t\t\t\t\t\tskipElementsHandler = false;\n\n\t\t\t\t\tif ( $( '#gf_stripe_response' ).length ) {\n\t\t\t\t\t\tthis.stripeResponse = JSON.parse( $( '#gf_stripe_response' ).val() );\n\n\t\t\t\t\t\tif ( this.stripeResponse.hasOwnProperty( 'client_secret' ) ) {\n\t\t\t\t\t\t\tthis.hasPaymentIntent = true;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\t// bind Stripe functionality to submit event\n\t\t\t$( '#gform_' + this.formId ).on( 'submit', function ( event ) {\n\n\t\t\t\t// Don't proceed with payment logic if clicking on the Previous button.\n\t\t\t\tlet skipElementsHandler = false;\n\t\t\t\tconst sourcePage = parseInt( $( '#gform_source_page_number_' + GFStripeObj.formId ).val(), 10 )\n\t\t\t\tconst targetPage = parseInt( $( '#gform_target_page_number_' + GFStripeObj.formId ).val(), 10 );\n\t\t\t\tif ( ( sourcePage > targetPage && targetPage !== 0 ) ) {\n\t\t\t\t\tskipElementsHandler = true;\n\t\t\t\t}\n\n\t\t\t\tif (\n\t\t\t\t\tskipElementsHandler\n\t\t\t\t\t|| !feedActivated\n\t\t\t\t\t|| $( this ).data( 'gfstripesubmitting' )\n\t\t\t\t\t|| $( '#gform_save_' + GFStripeObj.formId ).val() == 1\n\t\t\t\t\t|| ( !GFStripeObj.isLastPage() && 'elements' !== GFStripeObj.stripe_payment )\n\t\t\t\t\t|| gformIsHidden( GFStripeObj.GFCCField )\n\t\t\t\t\t|| GFStripeObj.maybeHitRateLimits()\n\t\t\t\t\t|| GFStripeObj.invisibleCaptchaPending()\n\t\t\t\t\t|| GFStripeObj.recaptchav3Pending()\n\t\t\t\t\t|| 'payment_element' === GFStripeObj.stripe_payment && window[ 'gform_stripe_amount_' + GFStripeObj.formId ] === 0\n\t\t\t\t) {\n\t\t\t\t\treturn;\n\t\t\t\t} else {\n\t\t\t\t\tevent.preventDefault();\n\t\t\t\t\t$( this ).data( 'gfstripesubmitting', true );\n\t\t\t\t\tGFStripeObj.maybeAddSpinner();\n\t\t\t\t}\n\n\t\t\t\tswitch ( GFStripeObj.stripe_payment ) {\n\t\t\t\t\tcase 'payment_element':\n\t\t\t\t\t\tGFStripeObj.injectHoneypot( event );\n\t\t\t\t\t\tGFStripeObj.stripePaymentHandlers[ GFStripeObj.formId ].validate( event );\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'elements':\n\t\t\t\t\t\tGFStripeObj.form = $( this );\n\n\t\t\t\t\t\tif ( ( GFStripeObj.isLastPage() && !GFStripeObj.isCreditCardOnPage() ) || gformIsHidden( GFStripeObj.GFCCField ) || skipElementsHandler ) {\n\t\t\t\t\t\t\t$( this ).submit();\n\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif ( activeFeed.type === 'product' ) {\n\t\t\t\t\t\t\t// Create a new payment method when every time the Stripe Elements is resubmitted.\n\t\t\t\t\t\t\tGFStripeObj.createPaymentMethod( stripe, card );\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tGFStripeObj.createToken( stripe, card );\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'stripe.js':\n\t\t\t\t\t\tvar form = $( this ),\n\t\t\t\t\t\t\tccInputPrefix = 'input_' + GFStripeObj.formId + '_' + GFStripeObj.ccFieldId + '_',\n\t\t\t\t\t\t\tcc = {\n\t\t\t\t\t\t\t\tnumber: form.find( '#' + ccInputPrefix + '1' ).val(),\n\t\t\t\t\t\t\t\texp_month: form.find( '#' + ccInputPrefix + '2_month' ).val(),\n\t\t\t\t\t\t\t\texp_year: form.find( '#' + ccInputPrefix + '2_year' ).val(),\n\t\t\t\t\t\t\t\tcvc: form.find( '#' + ccInputPrefix + '3' ).val(),\n\t\t\t\t\t\t\t\tname: form.find( '#' + ccInputPrefix + '5' ).val()\n\t\t\t\t\t\t\t};\n\n\n\t\t\t\t\t\tGFStripeObj.form = form;\n\n\t\t\t\t\t\tStripe.card.createToken( cc, function ( status, response ) {\n\t\t\t\t\t\t\tGFStripeObj.responseHandler( status, response );\n\t\t\t\t\t\t} );\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\n\t\t\t} );\n\n\t\t\t// Show validation message if a payment element payment intent failed and we coulnd't tell until the page has been reloaded\n\t\t\tif ( 'payment_element_intent_failure' in GFStripeObj && GFStripeObj.payment_element_intent_failure ) {\n\t\t\t\tconst validationMessage = jQuery( '

' + gforms_stripe_frontend_strings.payment_element_intent_failure + '

' );\n\t\t\t\tjQuery( '#gform_wrapper_' + GFStripeObj.formId ).prepend( validationMessage );\n\t\t\t}\n\t\t};\n\n\t\tthis.getProductFieldPrice = function ( formId, fieldId ) {\n\n\t\t\tvar price = GFMergeTag.getMergeTagValue( formId, fieldId, ':price' ),\n\t\t\t\tqty = GFMergeTag.getMergeTagValue( formId, fieldId, ':qty' );\n\n\t\t\tif ( typeof price === 'string' ) {\n\t\t\t\tprice = GFMergeTag.getMergeTagValue( formId, fieldId + '.2', ':price' );\n\t\t\t\tqty = GFMergeTag.getMergeTagValue( formId, fieldId + '.3', ':qty' );\n\t\t\t}\n\n\t\t\treturn {\n\t\t\t\tprice: price,\n\t\t\t\tqty: qty\n\t\t\t};\n\t\t}\n\n\t\tthis.getBillingAddressMergeTag = function (field) {\n\t\t\tif (field === '') {\n\t\t\t\treturn '';\n\t\t\t} else {\n\t\t\t\treturn '{:' + field + ':value}';\n\t\t\t}\n\t\t};\n\n\t\tthis.responseHandler = function (status, response) {\n\n\t\t\tvar form = this.form,\n\t\t\t\tccInputPrefix = 'input_' + this.formId + '_' + this.ccFieldId + '_',\n\t\t\t\tccInputSuffixes = ['1', '2_month', '2_year', '3', '5'];\n\n\t\t\t// remove \"name\" attribute from credit card inputs\n\t\t\tfor (var i = 0; i < ccInputSuffixes.length; i++) {\n\n\t\t\t\tvar input = form.find('#' + ccInputPrefix + ccInputSuffixes[i]);\n\n\t\t\t\tif (ccInputSuffixes[i] == '1') {\n\n\t\t\t\t\tvar ccNumber = $.trim(input.val()),\n\t\t\t\t\t\tcardType = gformFindCardType(ccNumber);\n\n\t\t\t\t\tif (typeof this.cardLabels[cardType] != 'undefined')\n\t\t\t\t\t\tcardType = this.cardLabels[cardType];\n\n\t\t\t\t\tform.append($('').val(ccNumber.slice(-4)));\n\t\t\t\t\tform.append($('').val(cardType));\n\n\t\t\t\t}\n\n\t\t\t\t// name attribute is now removed from markup in GFStripe::add_stripe_inputs()\n\t\t\t\t//input.attr( 'name', null );\n\n\t\t\t}\n\n\t\t\t// append stripe.js response\n\t\t\tform.append($('').val($.toJSON(response)));\n\n\t\t\t// submit the form\n\t\t\tform.submit();\n\n\t\t};\n\n\t\tthis.elementsResponseHandler = function (response) {\n\t\t\tvar form = this.form,\n\t\t\t\tGFStripeObj = this,\n\t\t\t\tactiveFeed = this.activeFeed,\n\t\t\t currency = gform.applyFilters( 'gform_stripe_currency', this.currency, this.formId ),\n\t\t\t\tamount = (0 === gf_global.gf_currency_config.decimals) ? window['gform_stripe_amount_' + this.formId] : gformRoundPrice( window['gform_stripe_amount_' + this.formId] * 100 );\n\n\t\t\tif (response.error) {\n\t\t\t\t// display error below the card field.\n\t\t\t\tthis.displayStripeCardError(response);\n\t\t\t\t// when Stripe response contains errors, stay on page\n\t\t\t\t// but remove some elements so the form can be submitted again\n\t\t\t\t// also remove last_4 and card type if that already exists (this happens when people navigate back to previous page and submit an empty CC field)\n\t\t\t\tthis.resetStripeStatus(form, this.formId, this.isLastPage());\n\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tif (!this.hasPaymentIntent) {\n\t\t\t\t// append stripe.js response\n\t\t\t\tif (!$('#gf_stripe_response').length) {\n\t\t\t\t\tform.append($('').val($.toJSON(response)));\n\t\t\t\t} else {\n\t\t\t\t\t$('#gf_stripe_response').val($.toJSON(response));\n\t\t\t\t}\n\n\t\t\t\tif (activeFeed.type === 'product') {\n\t\t\t\t\t//set last 4\n\t\t\t\t\tform.append($('').val(response.paymentMethod.card.last4));\n\n\t\t\t\t\t// set card type\n\t\t\t\t\tform.append($('').val(response.paymentMethod.card.brand));\n\t\t\t\t\t// Create server side payment intent.\n\t\t\t\t\t$.ajax({\n\t\t\t\t\t\tasync: false,\n\t\t\t\t\t\turl: gforms_stripe_frontend_strings.ajaxurl,\n\t\t\t\t\t\tdataType: 'json',\n\t\t\t\t\t\tmethod: 'POST',\n\t\t\t\t\t\tdata: {\n\t\t\t\t\t\t\taction: \"gfstripe_create_payment_intent\",\n\t\t\t\t\t\t\tnonce: gforms_stripe_frontend_strings.create_payment_intent_nonce,\n\t\t\t\t\t\t\tpayment_method: response.paymentMethod,\n\t\t\t\t\t\t\tcurrency: currency,\n\t\t\t\t\t\t\tamount: amount,\n\t\t\t\t\t\t\tfeed_id: activeFeed.feedId\n\t\t\t\t\t\t},\n\t\t\t\t\t\tsuccess: function (response) {\n\t\t\t\t\t\t\tif (response.success) {\n\t\t\t\t\t\t\t\t// populate the stripe_response field again.\n\t\t\t\t\t\t\t\tif (!$('#gf_stripe_response').length) {\n\t\t\t\t\t\t\t\t\tform.append($('').val($.toJSON(response.data)));\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t$('#gf_stripe_response').val($.toJSON(response.data));\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t// submit the form\n\t\t\t\t\t\t\t\tform.submit();\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tresponse.error = response.data;\n\t\t\t\t\t\t\t\tdelete response.data;\n\t\t\t\t\t\t\t\tGFStripeObj.displayStripeCardError(response);\n\t\t\t\t\t\t\t\tGFStripeObj.resetStripeStatus(form, GFStripeObj.formId, GFStripeObj.isLastPage());\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\t\t\t\t} else {\n\t\t\t\t\tform.append($('').val(response.token.card.last4));\n\t\t\t\t\tform.append($('').val(response.token.card.brand));\n\t\t\t\t\tform.submit();\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tif (activeFeed.type === 'product') {\n\t\t\t\t\tif (response.hasOwnProperty('paymentMethod')) {\n\t\t\t\t\t\t$('#gf_stripe_credit_card_last_four').val(response.paymentMethod.card.last4);\n\t\t\t\t\t\t$('#stripe_credit_card_type').val(response.paymentMethod.card.brand);\n\n\t\t\t\t\t\t$.ajax({\n\t\t\t\t\t\t\tasync: false,\n\t\t\t\t\t\t\turl: gforms_stripe_frontend_strings.ajaxurl,\n\t\t\t\t\t\t\tdataType: 'json',\n\t\t\t\t\t\t\tmethod: 'POST',\n\t\t\t\t\t\t\tdata: {\n\t\t\t\t\t\t\t\taction: \"gfstripe_update_payment_intent\",\n\t\t\t\t\t\t\t\tnonce: gforms_stripe_frontend_strings.create_payment_intent_nonce,\n\t\t\t\t\t\t\t\tpayment_intent: response.id,\n\t\t\t\t\t\t\t\tpayment_method: response.paymentMethod,\n\t\t\t\t\t\t\t\tcurrency: currency,\n\t\t\t\t\t\t\t\tamount: amount,\n\t\t\t\t\t\t\t\tfeed_id: activeFeed.feedId\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\tsuccess: function (response) {\n\t\t\t\t\t\t\t\tif (response.success) {\n\t\t\t\t\t\t\t\t\t$('#gf_stripe_response').val($.toJSON(response.data));\n\t\t\t\t\t\t\t\t\tform.submit();\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\tresponse.error = response.data;\n\t\t\t\t\t\t\t\t\tdelete response.data;\n\t\t\t\t\t\t\t\t\tGFStripeObj.displayStripeCardError(response);\n\t\t\t\t\t\t\t\t\tGFStripeObj.resetStripeStatus(form, GFStripeObj.formId, GFStripeObj.isLastPage());\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t});\n\t\t\t\t\t} else if (response.hasOwnProperty('amount')) {\n\t\t\t\t\t\tform.submit();\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tvar currentResponse = JSON.parse($('#gf_stripe_response').val());\n\t\t\t\t\tcurrentResponse.updatedToken = response.token.id;\n\n\t\t\t\t\t$('#gf_stripe_response').val($.toJSON(currentResponse));\n\n\t\t\t\t\tform.append($('').val(response.token.card.last4));\n\t\t\t\t\tform.append($('').val(response.token.card.brand));\n\t\t\t\t\tform.submit();\n\t\t\t\t}\n\t\t\t}\n\t\t};\n\n\t\tthis.scaActionHandler = function (stripe, formId) {\n\t\t\tif ( ! $('#gform_' + formId).data('gfstripescaauth') ) {\n\t\t\t\t$('#gform_' + formId).data('gfstripescaauth', true);\n\n\t\t\t\tvar GFStripeObj = this, response = JSON.parse($('#gf_stripe_response').val());\n\t\t\t\tif (this.activeFeed.type === 'product') {\n\t\t\t\t\t// Prevent the 3D secure auth from appearing twice, so we need to check if the intent status first.\n\t\t\t\t\tstripe.retrievePaymentIntent(\n\t\t\t\t\t\tresponse.client_secret\n\t\t\t\t\t).then(function(result) {\n\t\t\t\t\t\tif ( result.paymentIntent.status === 'requires_action' ) {\n\t\t\t\t\t\t\tstripe.handleCardAction(\n\t\t\t\t\t\t\t\tresponse.client_secret\n\t\t\t\t\t\t\t).then(function(result) {\n\t\t\t\t\t\t\t\tvar currentResponse = JSON.parse($('#gf_stripe_response').val());\n\t\t\t\t\t\t\t\tcurrentResponse.scaSuccess = true;\n\n\t\t\t\t\t\t\t\t$('#gf_stripe_response').val($.toJSON(currentResponse));\n\n\t\t\t\t\t\t\t\tGFStripeObj.maybeAddSpinner();\n\t\t\t\t\t\t\t\t// Enable the submit button, which was disabled before displaying the SCA warning message, so we can submit the form.\n\t\t\t\t\t\t\t\tjQuery( '#gform_submit_button_' + formId ).prop( 'disabled' , false );\n\t\t\t\t\t\t\t\t$('#gform_' + formId).data('gfstripescaauth', false);\n\t\t\t\t\t\t\t\t$('#gform_' + formId).data('gfstripesubmitting', true);\n\t\t\t\t\t\t\t\tif ( GFStripeObj.isConversationalForm() ) {\n\t\t\t\t\t\t\t\t\t$( '.gform-conversational__field-form-footer-submit' ).attr( 'style', 'display: block' );\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t$('#gform_' + formId).trigger( 'submit' );\n\t\t\t\t\t\t\t\t// There are a couple of seconds delay where the button is available for clicking before the thank you page is displayed,\n\t\t\t\t\t\t\t\t// Disable the button so the user will not think it needs to be clicked again.\n\t\t\t\t\t\t\t\tjQuery( '#gform_submit_button_' + formId ).prop( 'disabled' , true );\n\t\t\t\t\t\t\t});\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\t\t\t\t} else {\n\t\t\t\t\tstripe.retrievePaymentIntent(\n\t\t\t\t\t\tresponse.client_secret\n\t\t\t\t\t).then(function(result) {\n\t\t\t\t\t\tif ( result.paymentIntent.status === 'requires_action' ) {\n\t\t\t\t\t\t\tstripe.handleCardPayment(\n\t\t\t\t\t\t\t\tresponse.client_secret\n\t\t\t\t\t\t\t).then(function(result) {\n\t\t\t\t\t\t\t\tGFStripeObj.maybeAddSpinner();\n\t\t\t\t\t\t\t\t// Enable the submit button, which was disabled before displaying the SCA warning message, so we can submit the form.\n\t\t\t\t\t\t\t\tjQuery( '#gform_submit_button_' + formId ).prop( 'disabled' , false );\n\t\t\t\t\t\t\t\t$('#gform_' + formId).data('gfstripescaauth', false);\n\t\t\t\t\t\t\t\t$('#gform_' + formId).data('gfstripesubmitting', true);\n\t\t\t\t\t\t\t\tif ( GFStripeObj.isConversationalForm() ) {\n\t\t\t\t\t\t\t\t\t$( '.gform-conversational__field-form-footer-submit' ).attr( 'style', 'display: block' );\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t$('#gform_' + formId).trigger( 'submit' );\n\t\t\t\t\t\t\t});\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t}\n\t\t};\n\n\t\tthis.isLastPage = function () {\n\n\t\t\tvar targetPageInput = $('#gform_target_page_number_' + this.formId);\n\t\t\tif (targetPageInput.length > 0)\n\t\t\t\treturn targetPageInput.val() == 0;\n\n\t\t\treturn true;\n\t\t};\n\n\t\t/**\n\t\t * @function isConversationalForm\n\t\t * @description Determines if we are on conversational form mode\n\t\t *\n\t\t * @since 5.1.0\n\t\t *\n\t\t * @returns {boolean}\n\t\t */\n\t\tthis.isConversationalForm = function () {\n\t\t\tconst convoForm = $('[data-js=\"gform-conversational-form\"]');\n\n\t\t\treturn convoForm.length > 0;\n\t\t}\n\n\t\t/**\n\t\t * @function isCreditCardOnPage\n\t\t * @description Determines if the credit card field is on the current page\n\t\t *\n\t\t * @since 5.1.0\n\t\t *\n\t\t * @returns {boolean}\n\t\t */\n\t\tthis.isCreditCardOnPage = function () {\n\n\t\t\tvar currentPage = this.getCurrentPageNumber();\n\n\t\t\t// if current page is false or no credit card page number or this is a convo form, assume this is not a multi-page form\n\t\t\tif ( ! this.ccPage || ! currentPage || this.isConversationalForm() ) {\n\t\t\t\treturn true;\n\t\t\t}\n\n\t\t\treturn this.ccPage == currentPage;\n\t\t};\n\n\t\tthis.getCurrentPageNumber = function () {\n\t\t\tvar currentPageInput = $('#gform_source_page_number_' + this.formId);\n\t\t\treturn currentPageInput.length > 0 ? currentPageInput.val() : false;\n\t\t};\n\n\t\tthis.maybeAddSpinner = function () {\n\t\t\tif (this.isAjax)\n\t\t\t\treturn;\n\n\t\t\tif (typeof gformAddSpinner === 'function') {\n\t\t\t\tgformAddSpinner(this.formId);\n\t\t\t} else {\n\t\t\t\t// Can be removed after min Gravity Forms version passes 2.1.3.2.\n\t\t\t\tvar formId = this.formId;\n\n\t\t\t\tif (jQuery('#gform_ajax_spinner_' + formId).length == 0) {\n\t\t\t\t\tvar spinnerUrl = gform.applyFilters('gform_spinner_url', gf_global.spinnerUrl, formId),\n\t\t\t\t\t\t$spinnerTarget = gform.applyFilters('gform_spinner_target_elem', jQuery('#gform_submit_button_' + formId + ', #gform_wrapper_' + formId + ' .gform_next_button, #gform_send_resume_link_button_' + formId), formId);\n\t\t\t\t\t$spinnerTarget.after('\"\"');\n\t\t\t\t}\n\t\t\t}\n\n\t\t};\n\n\t\tthis.resetStripeStatus = function(form, formId, isLastPage) {\n\t\t\t$('#gf_stripe_response, #gf_stripe_credit_card_last_four, #stripe_credit_card_type').remove();\n\t\t\tform.data('gfstripesubmitting', false);\n\t\t\tconst spinnerNodes = document.querySelectorAll( '#gform_ajax_spinner_' + formId );\n\t\t\tspinnerNodes.forEach( function( node ) {\n\t\t\t\tnode.remove();\n\t\t\t} );\n\t\t\t// must do this or the form cannot be submitted again\n\t\t\tif (isLastPage) {\n\t\t\t\twindow[\"gf_submitting_\" + formId] = false;\n\t\t\t}\n\t\t};\n\n\t\tthis.displayStripeCardError = function (event) {\n\t\t\tif (event.error) {\n\t\t\t\tif ( $('#gform_ajax_spinner_' + this.formId).length > 0 ) {\n\t\t\t\t\t$('#gform_ajax_spinner_' + this.formId).remove();\n\t\t\t\t}\n\t\t\t\tdisplayError( event.error.message );\n\t\t\t} else {\n\t\t\t\tclearErrors();\n\t\t\t}\n\t\t};\n\n\t\tthis.createToken = function (stripe, card) {\n\t\t\tconst GFStripeObj = this;\n\t\t\tconst activeFeed = this.activeFeed;\n\t\t\tconst cardholderName = $( '#input_' + GFStripeObj.formId + '_' + GFStripeObj.ccFieldId + '_5' ).val();\n\t\t\tconst tokenData = {\n\t\t\t\t\tname: cardholderName,\n\t\t\t\t\taddress_line1: GFMergeTag.replaceMergeTags(this.formId, this.getBillingAddressMergeTag(activeFeed.address_line1)),\n\t\t\t\t\taddress_line2: GFMergeTag.replaceMergeTags(this.formId, this.getBillingAddressMergeTag(activeFeed.address_line2)),\n\t\t\t\t\taddress_city: GFMergeTag.replaceMergeTags(this.formId, this.getBillingAddressMergeTag(activeFeed.address_city)),\n\t\t\t\t\taddress_state: GFMergeTag.replaceMergeTags(this.formId, this.getBillingAddressMergeTag(activeFeed.address_state)),\n\t\t\t\t\taddress_zip: GFMergeTag.replaceMergeTags(this.formId, this.getBillingAddressMergeTag(activeFeed.address_zip)),\n\t\t\t\t\taddress_country: GFMergeTag.replaceMergeTags(this.formId, this.getBillingAddressMergeTag(activeFeed.address_country)),\n\t\t\t\t\tcurrency: gform.applyFilters( 'gform_stripe_currency', this.currency, this.formId )\n\t\t\t\t};\n\n\t\t\tstripe.createToken(card, tokenData).then(function (response) {\n\t\t\t\tGFStripeObj.elementsResponseHandler(response);\n\t\t\t});\n\t\t}\n\n\t\tthis.createPaymentMethod = function (stripe, card, country) {\n\t\t\tvar GFStripeObj = this, activeFeed = this.activeFeed, countryFieldValue = '';\n\n\t\t\tif ( activeFeed.address_country !== '' ) {\n\t\t\t\tcountryFieldValue = GFMergeTag.replaceMergeTags(GFStripeObj.formId, GFStripeObj.getBillingAddressMergeTag(activeFeed.address_country));\n\t\t\t}\n\n\t\t\tif (countryFieldValue !== '' && ( typeof country === 'undefined' || country === '' )) {\n $.ajax({\n async: false,\n url: gforms_stripe_frontend_strings.ajaxurl,\n dataType: 'json',\n method: 'POST',\n data: {\n action: \"gfstripe_get_country_code\",\n nonce: gforms_stripe_frontend_strings.create_payment_intent_nonce,\n country: countryFieldValue,\n feed_id: activeFeed.feedId\n },\n success: function (response) {\n if (response.success) {\n GFStripeObj.createPaymentMethod(stripe, card, response.data.code);\n }\n }\n });\n } else {\n var cardholderName = $('#input_' + this.formId + '_' + this.ccFieldId + '_5').val(),\n\t\t\t\t\tline1 = GFMergeTag.replaceMergeTags(this.formId, this.getBillingAddressMergeTag(activeFeed.address_line1)),\n\t\t\t\t\tline2 = GFMergeTag.replaceMergeTags(this.formId, this.getBillingAddressMergeTag(activeFeed.address_line2)),\n\t\t\t\t\tcity = GFMergeTag.replaceMergeTags(this.formId, this.getBillingAddressMergeTag(activeFeed.address_city)),\n\t\t\t\t\tstate = GFMergeTag.replaceMergeTags(this.formId, this.getBillingAddressMergeTag(activeFeed.address_state)),\n\t\t\t\t\tpostal_code = GFMergeTag.replaceMergeTags(this.formId, this.getBillingAddressMergeTag(activeFeed.address_zip)),\n data = { billing_details: { name: null, address: {} } };\n\n if (cardholderName !== '') {\n \tdata.billing_details.name = cardholderName;\n\t\t\t\t}\n\t\t\t\tif (line1 !== '') {\n\t\t\t\t\tdata.billing_details.address.line1 = line1;\n\t\t\t\t}\n\t\t\t\tif (line2 !== '') {\n\t\t\t\t\tdata.billing_details.address.line2 = line2;\n\t\t\t\t}\n\t\t\t\tif (city !== '') {\n\t\t\t\t\tdata.billing_details.address.city = city;\n\t\t\t\t}\n\t\t\t\tif (state !== '') {\n\t\t\t\t\tdata.billing_details.address.state = state;\n\t\t\t\t}\n\t\t\t\tif (postal_code !== '') {\n\t\t\t\t\tdata.billing_details.address.postal_code = postal_code;\n\t\t\t\t}\n\t\t\t\tif (country !== '') {\n\t\t\t\t\tdata.billing_details.address.country = country;\n\t\t\t\t}\n\n\t\t\t\tif (data.billing_details.name === null) {\n\t\t\t\t\tdelete data.billing_details.name;\n\t\t\t\t}\n\t\t\t\tif (data.billing_details.address === {}) {\n\t\t\t\t\tdelete data.billing_details.address;\n\t\t\t\t}\n\n\t\t\t\tstripe.createPaymentMethod('card', card, data).then(function (response) {\n\t\t\t\t\tif (GFStripeObj.stripeResponse !== null) {\n\t\t\t\t\t\tresponse.id = GFStripeObj.stripeResponse.id;\n\t\t\t\t\t\tresponse.client_secret = GFStripeObj.stripeResponse.client_secret;\n\t\t\t\t\t}\n\n\t\t\t\t\tGFStripeObj.elementsResponseHandler(response);\n\t\t\t\t});\n }\n\t\t};\n\n\t\tthis.maybeHitRateLimits = function() {\n\t\t\tif (this.hasOwnProperty('cardErrorCount')) {\n\t\t\t\tif (this.cardErrorCount >= 5) {\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn false;\n\t\t};\n\n\t\tthis.invisibleCaptchaPending = function () {\n\t\t\tvar form = this.form,\n\t\t\t\treCaptcha = form.find('.ginput_recaptcha');\n\n\t\t\tif (!reCaptcha.length || reCaptcha.data('size') !== 'invisible') {\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\tvar reCaptchaResponse = reCaptcha.find('.g-recaptcha-response');\n\n\t\t\treturn !(reCaptchaResponse.length && reCaptchaResponse.val());\n\t\t}\n\n\t\t/**\n\t\t * @function recaptchav3Pending\n\t\t * @description Check if recaptcha v3 is enabled and pending a response.\n\t\t *\n\t\t * @since 5.5.0\n\t\t */\n\t\tthis.recaptchav3Pending = function () {\n\t\t\tconst form = this.form;\n\t\t\tconst recaptchaField = form.find( '.ginput_recaptchav3' );\n\t\t\tif ( ! recaptchaField.length ) {\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\tconst recaptchaResponse = recaptchaField.find( '.gfield_recaptcha_response' );\n\n\t\t\treturn ! ( recaptchaResponse && recaptchaResponse.val() );\n\t\t};\n\n\t\t/**\n\t\t * This is duplicated honeypot logic from core that can be removed once Stripe can consume the core honeypot js.\n\t\t */\n\n\n\t\t/**\n\t\t * @function injectHoneypot\n\t\t * @description Duplicated from core. Injects the honeypot field when appropriate.\n\t\t *\n\t\t * @since 5.0\n\t\t *\n\t\t * @param {jQuery.Event} event Form submission event.\n\t\t */\n\t\tthis.injectHoneypot = ( event ) => {\n\t\t\tconst form = event.target;\n\t\t\tconst shouldInjectHoneypot = ( this.isFormSubmission( form ) || this.isSaveContinue( form ) ) && ! this.isHeadlessBrowser();\n\n\t\t\tif ( shouldInjectHoneypot ) {\n\t\t\t\tconst hashInput = ``;\n\t\t\t\tform.insertAdjacentHTML( 'beforeend', hashInput );\n\t\t\t}\n\t\t};\n\n\t\t/**\n\t\t * @function isSaveContinue\n\t\t * @description Duplicated from core. Determines if this submission is from a Save and Continue click.\n\t\t *\n\t\t * @since 5.0\n\t\t *\n\t\t * @param {HTMLFormElement} form The form that was submitted.\n\t\t *\n\t\t * @return {boolean} Returns true if this submission was initiated via a Save a Continue button click. Returns false otherwise.\n\t\t */\n\t\tthis.isSaveContinue = ( form ) => {\n\t\t\tconst formId = form.dataset.formid;\n\t\t\tconst nodes = this.getNodes( `#gform_save_${ formId }`, true, form, true );\n\t\t\treturn nodes.length > 0 && nodes[ 0 ].value === '1';\n\t\t};\n\n\t\t/**\n\t\t * @function isFormSubmission\n\t\t * @description Duplicated from core. Determines if this is a standard form submission (ie. not a next or previous page submission, and not a save and continue submission).\n\t\t *\n\t\t * @since 5.0\n\t\t *\n\t\t * @param {HTMLFormElement} form The form that was submitted.\n\t\t *\n\t\t * @return {boolean} Returns true if this is a standard form submission. Returns false otherwise.\n\t\t */\n\t\tthis.isFormSubmission = ( form ) => {\n\t\t\tconst formId = form.dataset.formid;\n\t\t\tconst targetEl = this.getNodes( `input[name = \"gform_target_page_number_${ formId }\"]`, true, form, true )[ 0 ];\n\t\t\tif ( 'undefined' === typeof targetEl ) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\tconst targetPage = parseInt( targetEl.value );\n\t\t\treturn targetPage === 0;\n\t\t};\n\n\t\t/**\n\t\t * @function isHeadlessBrowser.\n\t\t * @description Determines if the currently browser is headless.\n\t\t *\n\t\t * @since 5.0\n\t\t *\n\t\t * @return {boolean} Returns true for headless browsers. Returns false otherwise.\n\t\t */\n\t\tthis.isHeadlessBrowser = () => {\n\t\t\treturn window._phantom || window.callPhantom || // phantomjs.\n\t\t\t\twindow.__phantomas || // PhantomJS-based web perf metrics + monitoring tool.\n\t\t\t\twindow.Buffer || // nodejs.\n\t\t\t\twindow.emit || // couchjs.\n\t\t\t\twindow.spawn || // rhino.\n\t\t\t\twindow.webdriver || window._selenium || window._Selenium_IDE_Recorder || window.callSelenium || // selenium.\n\t\t\t\twindow.__nightmare ||\n\t\t\t\twindow.domAutomation ||\n\t\t\t\twindow.domAutomationController || // chromium based automation driver.\n\t\t\t\twindow.document.__webdriver_evaluate || window.document.__selenium_evaluate ||\n\t\t\t\twindow.document.__webdriver_script_function || window.document.__webdriver_script_func || window.document.__webdriver_script_fn ||\n\t\t\t\twindow.document.__fxdriver_evaluate ||\n\t\t\t\twindow.document.__driver_unwrapped ||\n\t\t\t\twindow.document.__webdriver_unwrapped ||\n\t\t\t\twindow.document.__driver_evaluate ||\n\t\t\t\twindow.document.__selenium_unwrapped ||\n\t\t\t\twindow.document.__fxdriver_unwrapped ||\n\t\t\t\twindow.document.documentElement.getAttribute( 'selenium' ) ||\n\t\t\t\twindow.document.documentElement.getAttribute( 'webdriver' ) ||\n\t\t\t\twindow.document.documentElement.getAttribute( 'driver' );\n\t\t};\n\n\t\t/**\n\t\t * @function getNodes.\n\t\t * @description Duplicated from core until the build system can use Gravity Forms utilities.\n\t\t *\n\t\t * @since 5.\n\t\t */\n\t\tthis.getNodes = (\n\t\tselector = '',\n\t\tconvert = false,\n\t\tnode = document,\n\t\tcustom = false\n\t\t) => {\n\t\t\tconst selectorString = custom ? selector : `[data-js=\"${ selector }\"]`;\n\t\t\tlet nodes = node.querySelectorAll( selectorString );\n\t\t\tif ( convert ) {\n\t\t\t\tnodes = this.convertElements( nodes );\n\t\t\t}\n\t\t\treturn nodes;\n\t\t}\n\n\t\t/**\n\t\t * @function convertElements.\n\t\t * @description Duplicated from core until the build system can use Gravity Forms utilities.\n\t\t *\n\t\t * @since 5.0\n\t\t */\n\t\tthis.convertElements = ( elements = [] ) => {\n\t\t\tconst converted = [];\n\t\t\tlet i = elements.length;\n\t\t\tfor ( i; i--; converted.unshift( elements[ i ] ) ); // eslint-disable-line\n\n\t\t\treturn converted;\n\t\t}\n\n\t\t/**\n\t\t * @function isStripePaymentHandlerInitiated.\n\t\t * @description Checks if a Stripe payment handler has been initiated for a form.\n\t\t *\n\t\t * @since 5.4\n\t\t */\n\t\tthis.isStripePaymentHandlerInitiated = function ( formId ) {\n\t\t\treturn (\n\t\t\t\tformId in this.stripePaymentHandlers &&\n\t\t\t\tthis.stripePaymentHandlers[ formId ] !== null &&\n\t\t\t\tthis.stripePaymentHandlers[ formId ] !== undefined\n\t\t\t);\n\t\t}\n\n\t\t/**\n\t\t * End duplicated honeypot logic.\n\t\t */\n\n\t\tthis.init();\n\n\t}\n\n})(jQuery);\n","const request = async( data, isJson = false, action = false, nonce = false ) => {\n\n\t// Delete gform_ajax if it exists in the FormData object\n\tif ( typeof data.has === 'function' && data.has( 'gform_ajax' ) ) {\n\n\t\t// Saves a temp gform_ajax so that it can be reset later during form processing.\n\t\tdata.set( 'gform_ajax--stripe-temp', data.get( 'gform_ajax' ) );\n\n\t\t// Remove the ajax input to prevent Gravity Forms ajax submission handler from handling the submission in the backend during Stripe's validation.\n\t\tdata.delete( 'gform_ajax' );\n\t}\n\n\tconst options = {\n\t\tmethod: 'POST',\n\t\tcredentials: 'same-origin',\n\t\tbody: data,\n\t};\n\n\tif ( isJson ) {\n\t\toptions.headers = { 'Accept': 'application/json', 'content-type': 'application/json' }\n\t}\n\n\tconst url = new URL( gforms_stripe_frontend_strings.ajaxurl )\n\n\tif ( action ) {\n\t\turl.searchParams.set( 'action', action )\n\t}\n\n\tif ( nonce ) {\n\t\turl.searchParams.set( 'nonce', nonce )\n\t}\n\n\tif ( gforms_stripe_frontend_strings.is_preview ) {\n\t\turl.searchParams.set( 'preview', '1' )\n\t}\n\n\treturn await fetch(\n\t\turl.toString(),\n\t\toptions\n\t).then(\n\t\tresponse => response.json()\n\t);\n}\n\nexport default request;\n","import request from './request';\nimport { clearErrors } from './../error-handler';\nexport default class StripePaymentsHandler {\n\n\t/**\n\t * StripePaymentsHandler constructor\n\t *\n\t * @since 5.0\n\t *\n\t * @param {String} apiKey The stripe API key.\n\t * @param {Object} GFStripeObj The stripe addon JS object.\n\t */\n\tconstructor( apiKey, GFStripeObj ) {\n\t\tthis.GFStripeObj = GFStripeObj;\n\t\tthis.apiKey = apiKey;\n\t\tthis.stripe = null;\n\t\tthis.elements = null;\n\t\tthis.card = null;\n\t\tthis.paymentMethod = null;\n\t\tthis.draftId = null;\n\t\t// A workaround so we can call validate method from outside this class while still accessing the correct scope.\n\t\tthis.validateForm = this.validate.bind( this );\n\t\tthis.handlelinkEmailFieldChange = this.reInitiateLinkWithEmailAddress.bind( this );\n\t\tthis.order = {\n\t\t\t'recurringAmount': 0,\n\t\t\t'paymentAmount': 0,\n\t\t};\n\t\t// The object gets initialized everytime frontend feeds are evaluated so we need to clear any previous errors.\n\t\tclearErrors();\n\n\t\tif ( ! this.initStripe() || gforms_stripe_frontend_strings.stripe_connect_enabled !== \"1\" ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Create the payment element and mount it.\n\t\tthis.card = this.elements.create( 'payment' );\n\n\t\t// If an email field is mapped to link, bind it to initiate link on change.\n\t\tif ( GFStripeObj.activeFeed.link_email_field_id ) {\n\t\t\tconst emailField = document.querySelector( '#input_' + this.GFStripeObj.formId + '_' + this.GFStripeObj.activeFeed.link_email_field_id );\n\t\t\tconst email = emailField ? emailField.value : '';\n\t\t\tthis.handlelinkEmailFieldChange( { target: { value: email } } );\n\t\t} else {\n\t\t\tthis.link = null;\n\t\t}\n\n\t\tthis.mountCard();\n\t\tthis.bindEvents();\n\t}\n\n\t/**\n\t * @function getStripeCoupon\n\t * @description Retrieves the cached coupon associated with the entered coupon code.\n\t *\n\t * @since 5.1\n\t * @returns {object} Returns the cached coupon object or undefined if the coupon is not found.\n\t */\n\tgetStripeCoupon\t() {\n\t\tconst coupons = window.stripeCoupons || {};\n\t\tconst currentCoupon = this.getStripeCouponCode();\n\t\tconst foundCoupon = Object.keys(coupons).find(coupon => {\n\t\t\treturn coupon.localeCompare(currentCoupon, undefined, { sensitivity: 'accent' }) === 0;\n\t\t});\n\n\t\treturn foundCoupon ? coupons[foundCoupon] : undefined;\n\t}\n\n\t/**\n\t * @function getStripeCouponInput\n\t * @description Retrieves the coupon input associated with the active feed.\n\t *\n\t * @since 5.1\n\t *\n\t * @returns {HTMLInputElement} Returns the coupon input or null if the coupon input is not found.\n\t */\n\tgetStripeCouponInput() {\n\t\tconst couponField = document.querySelector( '#field_' + this.GFStripeObj.formId + '_' + this.GFStripeObj.activeFeed.coupon );\n\t\treturn couponField ? couponField.querySelector( 'input' ) : null;\n\t}\n\n\t/**\n\t * @function getStripeCouponCode\n\t * @description Retrieves the coupon code from the coupon input associated with the active feed.\n\t *\n\t * @since 5.1\n\t *\n\t * @returns {string} Returns the coupon code or an empty string if the coupon input is not found.\n\t */\n\tgetStripeCouponCode() {\n\t\tconst couponInput = this.getStripeCouponInput();\n\t\tif ( ! couponInput ) {\n\t\t\treturn '';\n\t\t}\n\t\tif ( couponInput.className === 'gf_coupon_code' ) {\n\t\t\tconst couponCode = couponInput ? document.querySelector( '#gf_coupon_codes_' + this.GFStripeObj.formId ).value : null;\n\t\t\treturn couponCode;\n\t\t}\n\n\t\treturn couponInput ? couponInput.value : '';\n\t}\n\n\t/**\n\t * @function bindStripeCoupon\n\t * @description Binds the coupon input change event.\n\t *\n\t * @since 5.1\n\t *\n\t * @returns {void}\n\t */\n\tbindStripeCoupon() {\n\n\t\t// Binding coupon input event if it has not been bound before.\n\t\tconst couponInput = this.getStripeCouponInput();\n\t\tif ( couponInput && ! couponInput.getAttribute( 'data-listener-added' ) ) {\n\t\t\tcouponInput.addEventListener( 'blur', this.handleCouponChange.bind( this ) );\n\t\t\tcouponInput.setAttribute( 'data-listener-added', true );\n\t\t}\n\t}\n\n\t/**\n\t * @function handleCouponChange\n\t * @description Handles the coupon input change event.\n\t *\n\t * @since 5.1\n\t *\n\t * @param event The event object.\n\t * @returns {Promise}\n\t */\n\tasync handleCouponChange( event ) {\n\n\t\tif( this.getStripeCouponInput() !== event.target ) {\n\t\t\treturn;\n\t\t}\n\n\t\tif ( event.target.classList.contains( 'gf_coupon_code' ) ) {\n\t\t\tevent.target.value = event.target.value.toUpperCase();\n\t\t}\n\n\t\tawait this.updateStripeCoupon( event.target.value );\n\n\t\tgformCalculateTotalPrice( this.GFStripeObj.formId );\n\t}\n\n\t/**\n\t * @function updateStripeCoupon\n\t * @description Retrieves a coupon from Stripe based on the coupon_code specified and caches it in the window object.\n\t *\n\t * @since 5.1\n\t *\n\t * @param {string} coupon_code The coupon code\n\t * @returns {Promise}\n\t */\n\tasync updateStripeCoupon( coupon_code ) {\n\n\t\t// If the coupon code is empty, we don't need to do anything.\n\t\tif ( ! coupon_code ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Initializing stripeCoupons object if it doesn't exist.\n\t\tif( ! window.stripeCoupons ){\n\t\t\twindow.stripeCoupons = {};\n\t\t}\n\n\t\t// If coupon has already been retrieved from Stripe, abort.\n\t\tif ( window.stripeCoupons[ coupon_code ] ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Retreive coupon from Stripe and store it in the window object.\n\t\tconst response = await request(\n\t\t\tJSON.stringify( {\n\t\t\t\t'coupon' : coupon_code,\n\t\t\t\t'feed_id' : this.GFStripeObj.activeFeed.feedId,\n\t\t\t} ),\n\t\t\ttrue,\n\t\t\t'gfstripe_get_stripe_coupon',\n\t\t\tgforms_stripe_frontend_strings.get_stripe_coupon_nonce,\n\t\t);\n\n\t\twindow.stripeCoupons[ coupon_code ] = response.data;\n\t}\n\n\t/**\n\t * Creates the Stripe object with the given API key.\n\t *\n\t * @since 5.0\n\t *\n\t * @return {boolean}\n\t */\n\tasync initStripe() {\n\t\tthis.stripe = Stripe( this.apiKey );\n\n\t\tconst initialPaymentInformation = this.GFStripeObj.activeFeed.initial_payment_information;\n\t\t// Round the minimum amount to prevent an error on the stripe side.\n\t\tinitialPaymentInformation.amount = Math.round( initialPaymentInformation.amount );\n\n\t\tconst appearance = this.GFStripeObj.cardStyle;\n\n\t\tif ( 'payment_method_types' in initialPaymentInformation ) {\n\t\t\tinitialPaymentInformation.payment_method_types = Object.values( initialPaymentInformation.payment_method_types );\n\t\t}\n\n\t\tthis.elements = this.stripe.elements( { ...initialPaymentInformation, appearance } );\n\n\t\treturn true;\n\t}\n\n\t/**\n\t * Mounts the card element to the field node.\n\t *\n\t * @since 5.0\n\t */\n\tmountCard() {\n\t\tthis.card.mount( '#' + this.GFStripeObj.GFCCField.attr('id') );\n\t}\n\n\t/**\n\t * Creates a container node for the link element and mounts it.\n\t *\n\t * @since 5.0\n\t */\n\tmountLink() {\n\t\tif ( this.link === null ) {\n\t\t\treturn;\n\t\t}\n\t\tif ( document.querySelectorAll( '.stripe-payment-link' ).length <= 0 ) {\n\t\t\tconst linkDiv = document.createElement( 'div' );\n\t\t\tlinkDiv.setAttribute( 'id', 'stripe-payment-link' );\n\t\t\tlinkDiv.classList.add( 'StripeElement--link' );\n\t\t\tthis.GFStripeObj.GFCCField.before( jQuery( linkDiv ) );\n\t\t}\n\n\t\tthis.link.mount( '#stripe-payment-link' );\n\t}\n\n\t/**\n\t * Binds event listeners.\n\t *\n\t * @since 5.0\n\t */\n\tasync bindEvents() {\n\t\tif ( this.card ) {\n\t\t\tthis.card.on( 'change', ( event ) => {\n\t\t\t\t\tif ( this.paymentMethod !== null ) {\n\t\t\t\t\t\tclearErrors();\n\t\t\t\t\t}\n\t\t\t\t\tthis.paymentMethod = event;\n\t\t\t\t}\n\t\t\t);\n\t\t}\n\n\t\t// Binding events for Stripe Coupon.\n\t\tthis.bindStripeCoupon();\n\n\t\tconst emailField = document.querySelector( '#input_' + this.GFStripeObj.formId + '_' + this.GFStripeObj.activeFeed.link_email_field_id );\n\n\t\tif ( emailField === null ) {\n\t\t\treturn;\n\t\t}\n\n\t\temailField.addEventListener( 'blur', this.handlelinkEmailFieldChange );\n\n\t\twindow.addEventListener( 'load', async function () {\n\t\tconst emailField = document.querySelector( '#input_' + this.GFStripeObj.formId + '_' + this.GFStripeObj.activeFeed.link_email_field_id );\n\t\t\tif (\n\t\t\t\t(\n\t\t\t\t\tString( emailField.value )\n\t\t\t\t\t\t.toLowerCase()\n\t\t\t\t\t\t.match(\n\t\t\t\t\t\t\t/^(([^<>()[\\]\\\\.,;:\\s@\"]+(\\.[^<>()[\\]\\\\.,;:\\s@\"]+)*)|(\".+\"))@((\\[[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\])|(([a-zA-Z\\-0-9]+\\.)+[a-zA-Z]{2,}))$/\n\t\t\t\t\t\t)\n\t\t\t\t)\n\t\t\t\t&& this.GFStripeObj.isLastPage()\n\t\t\t) {\n\t\t\t\tthis.handlelinkEmailFieldChange( { target: { value: emailField.value } } );\n\t\t\t}\n\n\t\t}.bind( this ) );\n\n\t}\n\n\t/**\n\t * Destroys the current instance of link and creates a new one with value extracted from the passed event.\n\t *\n\t * @since 5\n\t *\n\t * @param {Object} event an object that contains information about the email input.\n\t * @return {Promise}\n\t */\n\tasync reInitiateLinkWithEmailAddress( event ) {\n\n\t\tif ( this.GFStripeObj.isCreditCardOnPage() === false ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// If there is a Link instance, destroy it.\n\t\tthis.destroyLink();\n\n\t\tconst emailAddress = event.target.value;\n\t\tif ( emailAddress ) {\n\t\t\tthis.link = await this.elements.create( \"linkAuthentication\", { defaultValues: { email: emailAddress } } );\n\t\t\tthis.mountLink();\n\t\t\tthis.GFStripeObj.GFCCField.siblings( '.gfield #stripe-payment-link' ).addClass( 'visible' );\n\t\t}\n\t}\n\t/**\n\t * Validates the form.\n\t *\n\t * @since 5.0\n\t *\n\t * @param {Object} event The form event object.\n\t *\n\t * @return {Promise}\n\t */\n\tasync validate( event ) {\n\t\t// If this is an ajax form submission, we just need to submit the form as everything has already been handled.\n\t\tconst form = jQuery( '#gform_' + this.GFStripeObj.formId );\n\t\tif ( form.data( 'isAjaxSubmitting' ) ) {\n\t\t\tform.submit();\n\t\t\treturn;\n\t\t}\n\n\t\t// Make sure the required information are entered.\n\t\t// Link stays incomplete even when email is entered, and it will fail with a friendly message when the confirmation request fails, so skip its frontend validation.\n\t\tif ( ! this.paymentMethod.complete && this.paymentMethod.value.type !== 'link' ) {\n\t\t\tthis.failWithMessage( gforms_stripe_frontend_strings.payment_incomplete, this.GFStripeObj.formId )\n\t\t\treturn false;\n\t\t}\n\n\t\tgformAddSpinner( this.GFStripeObj.formId );\n\t\tconst response = await request( this.getFormData( event.target ) );\n\n\t\tif ( response === -1 ) {\n\t\t\tthis.failWithMessage( gforms_stripe_frontend_strings.invalid_nonce, this.GFStripeObj.formId );\n\n\t\t\treturn false;\n\t\t}\n\n\t\tif ( 'success' in response && response.success === false ) {\n\t\t\tthis.failWithMessage( gforms_stripe_frontend_strings.failed_to_confirm_intent, this.GFStripeObj.formId )\n\n\t\t\treturn false;\n\t\t}\n\n\t\t// Invoice for trials are automatically paid.\n\t\tif ( 'invoice_id' in response.data && response.data.invoice_id !== null && 'resume_token' in response.data ) {\n\t\t\tconst redirect_url = new URL( window.location.href );\n\t\t\tredirect_url.searchParams.append( 'resume_token', response.data.resume_token );\n\t\t\tredirect_url.searchParams.append( 'tracking_id', response.data.tracking_id );\n\t\t\twindow.location.href = redirect_url.href;\n\t\t}\n\n\t\tconst is_valid_intent = 'intent' in response.data\n\t\t\t\t\t\t\t\t\t&& response.data.intent !== false\n\t\t\t\t\t\t\t\t\t&& response.data.intent != null\n\t\t\t\t\t\t\t\t\t&& 'client_secret' in response.data.intent;\n\n\n\t\tconst is_valid_submission = 'data' in response\n\t\t\t\t\t\t\t\t\t&& 'is_valid' in response.data\n\t\t\t\t\t\t\t\t\t&& response.data.is_valid\n\t\t\t\t\t\t\t\t\t&& 'resume_token' in response.data\n\n\t\tconst is_spam = 'is_spam' in response.data && response.data.is_spam;\n\n\t\tif ( ! is_valid_intent && ! is_spam && is_valid_submission ) {\n\t\t\tthis.failWithMessage( gforms_stripe_frontend_strings.failed_to_confirm_intent, this.GFStripeObj.formId )\n\t\t\treturn false;\n\t\t}\n\n\n\t\tif ( is_valid_submission ) {\n\n\t\t\t// Reset any errors.\n\t\t\tthis.resetFormValidationErrors();\n\t\t\tthis.draftId = response.data.resume_token;\n\t\t\t// Validate Stripe coupon, if there is a setup fee or trial, the coupon won't be applied to the current payment, so pass validation as it is all handled in the backend.\n\t\t\tif (\n\t\t\t\tthis.GFStripeObj.activeFeed.hasTrial !== '1' &&\n\t\t\t\t! this.GFStripeObj.activeFeed.setupFee &&\n\t\t\t\t! this.isValidCoupon( response.data.total )\n\t\t\t) {\n\t\t\t\tthis.failWithMessage( gforms_stripe_frontend_strings.coupon_invalid, this.GFStripeObj.formId )\n\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\t// Do not confirm payment if this is a spam submission.\n\t\t\tif ( is_spam ) {\n\t\t\t\t// For spam submissions, redirect to the confirmation page without confirming the payment. This will process the submission as a spam entry without capturing the payment.\n\t\t\t\tthis.handleRedirect( this.getRedirectUrl( response.data.resume_token ) );\n\t\t\t} else {\n\t\t\t\t// For non-spam submissions, confirm the payment and redirect to the confirmation page.\n\t\t\t\tthis.confirm( response.data );\n\t\t\t}\n\n\t\t} else {\n\t\t\t// Form is not valid, do a normal submit to render the validation errors markup in backend.\n\t\t\tevent.target.submit();\n\t\t}\n\t}\n\n\n\t/**\n\t * @function isValidCoupon\n\t * @description Validates the coupon code.\n\t *\n\t * @since 5.1\n\t *\n\t * @param {number} payment_amount Payment amount calculated by Stripe.\n\t *\n\t * @returns {boolean} Returns true if the coupon is valid, returns false otherwise.\n\t */\n\tisValidCoupon( payment_amount ) {\n\t\tconst coupon = this.getStripeCoupon();\n\t\tif ( ! coupon ) {\n\t\t\treturn true;\n\t\t}\n\n\t\treturn coupon.is_valid && payment_amount == this.order.paymentAmount;\n\t}\n\n\t/**\n\t * Creates a FormData object containing the information required to validate the form and start the checkout process on the backend.\n\t *\n\t * @since 5.0\n\t *\n\t * @param {Object} form The form object.\n\t *\n\t * @return {FormData}\n\t */\n\tgetFormData( form ) {\n\t\tconst formData = new FormData( form );\n\t\t// if gform_submit exist in the request, GFFormDisplay::process_form() will be called even before the AJAX handler.\n\t\tformData.delete( 'gform_submit' );\n\t\t// Append the payment data to the form.\n\t\tconst appendParams = {\n\t\t\t'action': 'gfstripe_validate_form',\n\t\t\t'feed_id': this.GFStripeObj.activeFeed.feedId,\n\t\t\t'form_id': this.GFStripeObj.formId,\n\t\t\t'tracking_id': Math.random().toString( 36 ).slice( 2, 10 ),\n\t\t\t'payment_method': this.paymentMethod.value.type,\n\t\t\t'nonce': gforms_stripe_frontend_strings.validate_form_nonce\n\t\t}\n\n\t\tObject.keys( appendParams ).forEach( ( key ) => {\n\t\t\tformData.append( key, appendParams[ key ] );\n\t\t} );\n\n\t\treturn formData;\n\t}\n\n\t/**\n\t * Updates the payment information amount.\n\t *\n\t * @since 5.1\n\t * @since 5.3 Added the updatedPaymentInformation filter.\n\t *\n\t * @param {Double} newAmount The updated amount.\n\t */\n\tupdatePaymentAmount( newAmount ) {\n\t\tif ( newAmount <= 0 || this.GFStripeObj.activeFeed.initial_payment_information.mode === 'setup' ) {\n\t\t\treturn;\n\t\t}\n\t\t// Get amount in cents (or the equivalent subunit for other currencies)\n\t\tlet total = newAmount * 100;\n\t\t// Round total to two decimal places.\n\t\ttotal = Math.round( total * 100 ) / 100;\n\n\t\tlet updatedPaymentInformation = {\n\t\t\tamount: total,\n\t\t};\n\n\t\t/**\n\t\t * Filters the payment information before updating it.\n\t\t *\n\t\t * @since 5.3\n\t\t *\n\t\t * @param {Object} updatedPaymentInformation The object that contains the updated payment information, for possible values, @see https://docs.stripe.com/js/elements_object/update#elements_update-options\n\t\t * @param {Object} initialPaymentInformation The initial payment information.\n\t\t * @param {int} feedId The feed ID.\n\t\t * @param {int} formId The form ID.\n\t\t *\n\t\t * @return {Object} The updated payment information.\n\t\t */\n\t\tupdatedPaymentInformation = window.gform.applyFilters( 'gform_stripe_payment_element_updated_payment_information', updatedPaymentInformation, this.GFStripeObj.activeFeed.initial_payment_information, this.GFStripeObj.activeFeed.feedId, this.GFStripeObj.formId );\n\n\t\tthis.elements.update( updatedPaymentInformation );\n\t}\n\n\t/**\n\t * @function applyStripeCoupon\n\t * @description Applies the coupon discount to the total.\n\t *\n\t * @since 5.1\n\t *\n\t * @param {number} total The payment amount.\n\t * @returns {number} Returns the updated total.\n\t */\n\tapplyStripeCoupon( total ) {\n\n\t\tconst coupon = this.getStripeCoupon();\n\t\tif ( ! coupon || ! coupon.is_valid ) {\n\t\t\treturn total;\n\t\t}\n\n\t\tif( coupon.percentage_off ) {\n\t\t\ttotal = total - ( total * ( coupon.percentage_off / 100 ) );\n\t\t} else if ( coupon.amount_off ) {\n\t\t\ttotal = total - coupon.amount_off;\n\t\t}\n\n\t\treturn total;\n\t}\n\n\t/**\n\t * Calls stripe confirm payment or confirm setup to attempt capturing the payment after form validation passed.\n\t *\n\t * @since 5.0\n\t * @since 5.4.0 Updated the method parameter, so it received the whole confirmData object instead of just the resume_token and client secret.\n\t *\n\t * @param {Object} confirmData The confirmData object that contains the resume_token, client secret and intent information.\n\t *\n\t * @return {Promise}\n\t */\n\tasync confirm( confirmData ) {\n\n\t\t// Prepare the return URL.\n\t\tconst redirect_url = this.getRedirectUrl( confirmData.resume_token );\n\t\tredirect_url.searchParams.append( 'tracking_id', confirmData.tracking_id );\n\n\t\tconst { error: submitError } = await this.elements.submit();\n\t\tif ( submitError ) {\n\t\t\tthis.failWithMessage( submitError.message , this.GFStripeObj.formId )\n\t\t\treturn;\n\t\t}\n\t\t// Gather the payment data.\n\t\tconst paymentData = {\n\t\t\telements: this.elements,\n\t\t\tclientSecret: confirmData.intent.client_secret,\n\t\t\tconfirmParams: {\n\t\t\t\treturn_url: redirect_url.toString(),\n\t\t\t\tpayment_method_data: {\n\t\t\t\t\tbilling_details: {\n\t\t\t\t\t\taddress: {\n\t\t\t\t\t\t\tline1: GFMergeTag.replaceMergeTags( this.GFStripeObj.formId, this.getBillingAddressMergeTag( this.GFStripeObj.activeFeed.address_line1 ) ),\n\t\t\t\t\t\t\tline2: GFMergeTag.replaceMergeTags( this.GFStripeObj.formId, this.getBillingAddressMergeTag( this.GFStripeObj.activeFeed.address_line2 ) ),\n\t\t\t\t\t\t\tcity: GFMergeTag.replaceMergeTags( this.GFStripeObj.formId, this.getBillingAddressMergeTag( this.GFStripeObj.activeFeed.address_city ) ),\n\t\t\t\t\t\t\tstate: GFMergeTag.replaceMergeTags( this.GFStripeObj.formId, this.getBillingAddressMergeTag( this.GFStripeObj.activeFeed.address_state ) ),\n\t\t\t\t\t\t\tpostal_code: GFMergeTag.replaceMergeTags( this.GFStripeObj.formId, this.getBillingAddressMergeTag( this.GFStripeObj.activeFeed.address_zip ) ),\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t\t// let Stripe handle redirection only if the payment method requires redirection to a third party page,\n\t\t\t// Otherwise, the add-on will handle the redirection.\n\t\t\tredirect: 'if_required',\n\t\t};\n\n\n\t\t/**\n\t\t * The promise that returns from calling stripe.confirmPayment or stripe.confirmSetup.\n\t\t *\n\t\t * If the payment method used requires redirecting the user to a third party page,\n\t\t * this promise will never resolve, as confirmPayment or confirmSetup redirect the user to the third party page.\n\t\t *\n\t\t * @since 5.0.0\n\t\t *\n\t\t * @type {Promise}\n\t\t */\n\t\tlet paymentResult = {};\n\t\tlet isSetupIntent = confirmData.intent.id.indexOf( 'seti_' ) === 0;\n\t\ttry {\n\t\t\tpaymentResult = isSetupIntent ? await this.stripe.confirmSetup( paymentData ) : await this.stripe.confirmPayment( paymentData );\n\t\t} catch ( e ) {\n\t\t\tconsole.log( e );\n\t\t\tthis.failWithMessage( gforms_stripe_frontend_strings.failed_to_confirm_intent, this.GFStripeObj.formId )\n\t\t}\n\n\t\t// If we have a paymentIntent or a setupIntent in the result, the process was successful.\n\t\t// Note that confirming could be successful but the intent status is still 'processing' or 'pending'.\n\t\tif ( 'paymentIntent' in paymentResult || 'setupIntent' in paymentResult ) {\n\t\t\tthis.handlePaymentRedirect( paymentResult, redirect_url );\n\t\t} else {\n\t\t\tawait this.handleFailedPayment( paymentResult );\n\t\t}\n\t}\n\n\t/**\n\t * Redirects the user to the confirmation page after the payment intent is confirmed.\n\t *\n\t * This method will never be executed if the payment method used requires redirecting the user to a third party page.\n\t *\n\t * @since 5.0\n\t * @since 5.2 Added the redirect_url parameter.\n\t * @since 5.4 Renamed the function from handlePayment to handlePaymentRedirect.\n\t *\n\t * @param {Object} paymentResult The result of confirming a payment intent or a setup intent.\n\t * @param {URL} redirect_url The redirect URL the user will be taken to after confirmation.\n\t */\n\thandlePaymentRedirect( paymentResult, redirect_url ) {\n\t\tconst intent = paymentResult.paymentIntent ? paymentResult.paymentIntent : paymentResult.setupIntent;\n\t\t// Add parameters required for entry processing in the backend.\n\t\tconst intentTypeString = intent.id.indexOf( 'seti_' ) === 0 ? 'setup' : 'payment'\n\t\tredirect_url.searchParams.append( intentTypeString + '_intent', intent.id );\n\t\tredirect_url.searchParams.append( intentTypeString + '_intent_client_secret', intent.client_secret );\n\t\tredirect_url.searchParams.append( 'redirect_status', intent.status ? 'succeeded' : 'pending' );\n\n\t\tthis.handleRedirect( redirect_url );\n\t}\n\n\t/**\n\t * Redirects the user to the confirmation page.\n\t *\n\t * @since 5.4.1\n\t *\n\t * @param {URL} redirect_url The redirect URL the user will be taken to after confirmation.\n\t */\n\thandleRedirect( redirect_url ) {\n\n\t\t// If this is not an AJAX embedded form, redirect the user to the confirmation page.\n\t\tif ( ! this.isAjaxEmbed( this.GFStripeObj.formId ) ) {\n\t\t\twindow.location.href = redirect_url.toString();\n\t\t} else {\n\t\t\t// AJAX embeds are handled differently, we need to update the form's action with the redirect URL, and submit it inside the AJAX IFrame.\n\t\t\tjQuery( '#gform_' + this.GFStripeObj.formId ).attr( 'action' , redirect_url.toString() );\n\t\t\t// Prevent running same logic again after submitting the form.\n\t\t\tjQuery( '#gform_' + this.GFStripeObj.formId ).data( 'isAjaxSubmitting' , true );\n\t\t\t// Keeping this input makes the backend thinks it is not an ajax form, so we need to remove it.\n\t\t\tjQuery( '#gform_' + this.GFStripeObj.formId ).find( '[name=\"gform_submit\"]' ).remove();\n\t\t\t// Form will be submitted inside the IFrame, once IFrame content is updated, the form element will be replaced with the content of the IFrame.\n\t\t\tjQuery( '#gform_' + this.GFStripeObj.formId ).submit();\n\t\t}\n\t}\n\n\t/**\n\t * Returns the URL with the resume token appended to it.\n\t *\n\t * @since 5.4.1\n\t *\n\t * @param resume_token The resume token to append to the URL.\n\t *\n\t * @returns {URL} The URL with the resume token appended to it.\n\t */\n\tgetRedirectUrl( resume_token ) {\n\t\tconst redirect_url = new URL( window.location.href );\n\t\tredirect_url.searchParams.append( 'resume_token', resume_token );\n\t\tredirect_url.searchParams.append( 'feed_id', this.GFStripeObj.activeFeed.feedId );\n\t\tredirect_url.searchParams.append( 'form_id', this.GFStripeObj.formId );\n\t\treturn redirect_url;\n\t}\n\n\t/**\n\t * Handles a failed payment attempt.\n\t *\n\t * @since 5.0\n\t *\n\t * @param {Object} paymentResult The result of confirming a payment intent or a setup intent.\n\t */\n\tasync handleFailedPayment( paymentResult ) {\n\t\tlet errorMessage = '';\n\t\tif ( 'error' in paymentResult && 'message' in paymentResult.error ) {\n\t\t\terrorMessage = paymentResult.error.message;\n\t\t}\n\t\tthis.failWithMessage( errorMessage, this.GFStripeObj.formId );\n\t\t// Delete the draft entry created.\n\t\tlet response = request(\n\t\t\tJSON.stringify( { 'draft_id': this.draftId } ),\n\t\t\ttrue,\n\t\t\t'gfstripe_delete_draft_entry',\n\t\t\tgforms_stripe_frontend_strings.delete_draft_nonce\n\t\t);\n\t\t// If rate limiting is enabled, increase the errors number at the backend side, and set the new count here.\n\t\tif ( this.GFStripeObj.hasOwnProperty( 'cardErrorCount' ) ) {\n\t\t\tresponse = await request(\n\t\t\t\tJSON.stringify( { 'increase_count': true } ),\n\t\t\t\ttrue ,\n\t\t\t\t'gfstripe_payment_element_check_rate_limiting',\n\t\t\t\tgforms_stripe_frontend_strings.rate_limiting_nonce\n\t\t\t);\n\t\t\tthis.GFStripeObj.cardErrorCount = response.data.error_count;\n\t\t}\n\t}\n\n\t/**\n\t * Destroys the stripe objects and removes any DOM nodes created while initializing them.\n\t *\n\t * @since 5.0\n\t */\n\tdestroy() {\n\t\tif ( this.card ) {\n\t\t\tthis.card.destroy();\n\t\t}\n\n\t\tthis.destroyLink();\n\t}\n\n\t/**\n\t * Destroys the Stripe payment link and removes any DOM nodes created while initializing it.\n\t *\n\t * @since 5.4.0\n\t */\n\tdestroyLink() {\n\t\tif ( this.link ) {\n\t\t\tthis.link.destroy();\n\t\t\tthis.link = null;\n\n\t\t\tconst linkContainer = this.GFStripeObj.GFCCField.siblings( '.gfield #stripe-payment-link' );\n\t\t\tif ( linkContainer ) {\n\t\t\t\tlinkContainer.remove();\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t * Removes the validation error messages from the form fields.\n\t *\n\t * @since 5.0\n\t */\n\tresetFormValidationErrors() {\n\t\tdocument.querySelectorAll( '.gform_validation_errors, .validation_message' ).forEach( ( el ) => { el.remove() } );\n\t\tdocument.querySelectorAll( '.gfield_error' ).forEach( ( el ) => { el.classList.remove( 'gfield_error' ) } );\n\t}\n\n\t/**\n\t * Displays an error message if the flow failed at any point, also clears the loading indicator and resets the form data attributes.\n\t *\n\t * @since 5.0\n\t *\n\t * @param {String} message The error message to display.\n\t * @param {int} formId The form ID.\n\t */\n\tfailWithMessage( message, formId ) {\n\t\tmessage = message ? message : gforms_stripe_frontend_strings.failed_to_process_payment;\n\t\tthis.GFStripeObj.displayStripeCardError( { error : { message : message } } );\n\t\tthis.GFStripeObj.resetStripeStatus( jQuery( '#gform_' + formId ), formId, true );\n\t\tjQuery( '#gform_ajax_spinner_' + formId ).remove();\n\t}\n\n\t/**\n\t * Returns the merge tag for the billing address.\n\t *\n\t * @since 5.0\n\t *\n\t * @param field The billing address field.\n\t *\n\t * @return {string} The merge tag for the billing address.\n\t */\n\tgetBillingAddressMergeTag( field ) {\n\n\t\tif ( field === '' ) {\n\t\t\treturn '';\n\t\t}\n\n\t\treturn '{:' + field + ':value}';\n\t}\n\n\t/**\n\t * Gets the order data.\n\t *\n\t * The order contains the following properties\n\t * \tpaymentAmount: The amount of the payment that will be charged after form submission.\n\t * \trecurringAmount: If this is a subscription, this is the recurring amount.\n\t *\n\t * @since 5.1\n\t *\n\t * @param total The form total.\n\t * @param formId The current form id.\n\t *\n\t * @return {Object} The order data.\n\t */\n\tgetOrderData( total, formId ) {\n\n\t\tif ( ! _gformPriceFields[ formId ] || this.GFStripeObj.activeFeed === null ) {\n\t\t\treturn this.order;\n\t\t}\n\n\t\tconst setUpFieldId = this.GFStripeObj.activeFeed.setupFee;\n\t\tlet setupFee = 0;\n\t\tlet productTotal = 0;\n\t\tconst isTrial = this.GFStripeObj.activeFeed.hasTrial;\n\n\n\t\t// If this is the setup fee field, or the shipping field, don't add to total.\n\t\tif ( setUpFieldId ) {\n\t\t\tconst setupFeeInfo = this.GFStripeObj.getProductFieldPrice( formId, this.GFStripeObj.activeFeed.setupFee );\n\t\t\tsetupFee = setupFeeInfo.price * setupFeeInfo.qty;\n\t\t\t// If this field is a setup fee, subtract it from total, so it is not added to the recurring amount.\n\t\t\ttotal -= setupFee;\n\t\t}\n\n\t\tif ( this.GFStripeObj.activeFeed.paymentAmount === 'form_total' ) {\n\t\t\tthis.order.recurringAmount = total;\n\t\t\tif ( this.isTextCoupon() ) {\n\t\t\t\tthis.order.recurringAmount = this.applyStripeCoupon( this.order.recurringAmount );\n\t\t\t}\n\t\t} else {\n\t\t\tthis.order.recurringAmount = gformCalculateProductPrice( formId, this.GFStripeObj.activeFeed.paymentAmount );\n\t\t\tthis.order.recurringAmount = this.applyStripeCoupon( this.order.recurringAmount );\n\t\t}\n\n\t\tif ( isTrial === '1' ) {\n\t\t\tthis.order.paymentAmount = setupFee;\n\t\t} else {\n\t\t\tthis.order.paymentAmount = this.order.recurringAmount + setupFee;\n\t\t}\n\n\t\treturn this.order;\n\t}\n\n\tisTextCoupon() {\n\t\tconst coupon = this.getStripeCouponInput();\n\t\tif ( ! coupon ) {\n\t\t\treturn false;\n\t\t}\n\n\t\treturn ! coupon.classList.contains( 'gf_coupon_code' )\n\t}\n\n\t/**\n\t * Decides whether the form is embedded with the AJAX option on or not.\n\t *\n\t * Since 5.2\n\t *\n\t * @param {integer} formId The form ID.\n\t * @returns {boolean}\n\t */\n\tisAjaxEmbed( formId ) {\n\t\treturn jQuery( '#gform_ajax_frame_' + formId ).length >= 1;\n\t}\n}\n","var g;\n\n// This works in non-strict mode\ng = (function() {\n\treturn this;\n})();\n\ntry {\n\t// This works if eval is allowed (see CSP)\n\tg = g || new Function(\"return this\")();\n} catch (e) {\n\t// This works if the window reference is available\n\tif (typeof window === \"object\") g = window;\n}\n\n// g can still be undefined, but nothing to do about it...\n// We return undefined, instead of nothing here, so it's\n// easier to handle this case. if(!global) { ...}\n\nmodule.exports = g;\n","/* eslint-disable no-prototype-builtins */\nvar g =\n (typeof globalThis !== 'undefined' && globalThis) ||\n (typeof self !== 'undefined' && self) ||\n // eslint-disable-next-line no-undef\n (typeof global !== 'undefined' && global) ||\n {}\n\nvar support = {\n searchParams: 'URLSearchParams' in g,\n iterable: 'Symbol' in g && 'iterator' in Symbol,\n blob:\n 'FileReader' in g &&\n 'Blob' in g &&\n (function() {\n try {\n new Blob()\n return true\n } catch (e) {\n return false\n }\n })(),\n formData: 'FormData' in g,\n arrayBuffer: 'ArrayBuffer' in g\n}\n\nfunction isDataView(obj) {\n return obj && DataView.prototype.isPrototypeOf(obj)\n}\n\nif (support.arrayBuffer) {\n var viewClasses = [\n '[object Int8Array]',\n '[object Uint8Array]',\n '[object Uint8ClampedArray]',\n '[object Int16Array]',\n '[object Uint16Array]',\n '[object Int32Array]',\n '[object Uint32Array]',\n '[object Float32Array]',\n '[object Float64Array]'\n ]\n\n var isArrayBufferView =\n ArrayBuffer.isView ||\n function(obj) {\n return obj && viewClasses.indexOf(Object.prototype.toString.call(obj)) > -1\n }\n}\n\nfunction normalizeName(name) {\n if (typeof name !== 'string') {\n name = String(name)\n }\n if (/[^a-z0-9\\-#$%&'*+.^_`|~!]/i.test(name) || name === '') {\n throw new TypeError('Invalid character in header field name: \"' + name + '\"')\n }\n return name.toLowerCase()\n}\n\nfunction normalizeValue(value) {\n if (typeof value !== 'string') {\n value = String(value)\n }\n return value\n}\n\n// Build a destructive iterator for the value list\nfunction iteratorFor(items) {\n var iterator = {\n next: function() {\n var value = items.shift()\n return {done: value === undefined, value: value}\n }\n }\n\n if (support.iterable) {\n iterator[Symbol.iterator] = function() {\n return iterator\n }\n }\n\n return iterator\n}\n\nexport function Headers(headers) {\n this.map = {}\n\n if (headers instanceof Headers) {\n headers.forEach(function(value, name) {\n this.append(name, value)\n }, this)\n } else if (Array.isArray(headers)) {\n headers.forEach(function(header) {\n if (header.length != 2) {\n throw new TypeError('Headers constructor: expected name/value pair to be length 2, found' + header.length)\n }\n this.append(header[0], header[1])\n }, this)\n } else if (headers) {\n Object.getOwnPropertyNames(headers).forEach(function(name) {\n this.append(name, headers[name])\n }, this)\n }\n}\n\nHeaders.prototype.append = function(name, value) {\n name = normalizeName(name)\n value = normalizeValue(value)\n var oldValue = this.map[name]\n this.map[name] = oldValue ? oldValue + ', ' + value : value\n}\n\nHeaders.prototype['delete'] = function(name) {\n delete this.map[normalizeName(name)]\n}\n\nHeaders.prototype.get = function(name) {\n name = normalizeName(name)\n return this.has(name) ? this.map[name] : null\n}\n\nHeaders.prototype.has = function(name) {\n return this.map.hasOwnProperty(normalizeName(name))\n}\n\nHeaders.prototype.set = function(name, value) {\n this.map[normalizeName(name)] = normalizeValue(value)\n}\n\nHeaders.prototype.forEach = function(callback, thisArg) {\n for (var name in this.map) {\n if (this.map.hasOwnProperty(name)) {\n callback.call(thisArg, this.map[name], name, this)\n }\n }\n}\n\nHeaders.prototype.keys = function() {\n var items = []\n this.forEach(function(value, name) {\n items.push(name)\n })\n return iteratorFor(items)\n}\n\nHeaders.prototype.values = function() {\n var items = []\n this.forEach(function(value) {\n items.push(value)\n })\n return iteratorFor(items)\n}\n\nHeaders.prototype.entries = function() {\n var items = []\n this.forEach(function(value, name) {\n items.push([name, value])\n })\n return iteratorFor(items)\n}\n\nif (support.iterable) {\n Headers.prototype[Symbol.iterator] = Headers.prototype.entries\n}\n\nfunction consumed(body) {\n if (body._noBody) return\n if (body.bodyUsed) {\n return Promise.reject(new TypeError('Already read'))\n }\n body.bodyUsed = true\n}\n\nfunction fileReaderReady(reader) {\n return new Promise(function(resolve, reject) {\n reader.onload = function() {\n resolve(reader.result)\n }\n reader.onerror = function() {\n reject(reader.error)\n }\n })\n}\n\nfunction readBlobAsArrayBuffer(blob) {\n var reader = new FileReader()\n var promise = fileReaderReady(reader)\n reader.readAsArrayBuffer(blob)\n return promise\n}\n\nfunction readBlobAsText(blob) {\n var reader = new FileReader()\n var promise = fileReaderReady(reader)\n var match = /charset=([A-Za-z0-9_-]+)/.exec(blob.type)\n var encoding = match ? match[1] : 'utf-8'\n reader.readAsText(blob, encoding)\n return promise\n}\n\nfunction readArrayBufferAsText(buf) {\n var view = new Uint8Array(buf)\n var chars = new Array(view.length)\n\n for (var i = 0; i < view.length; i++) {\n chars[i] = String.fromCharCode(view[i])\n }\n return chars.join('')\n}\n\nfunction bufferClone(buf) {\n if (buf.slice) {\n return buf.slice(0)\n } else {\n var view = new Uint8Array(buf.byteLength)\n view.set(new Uint8Array(buf))\n return view.buffer\n }\n}\n\nfunction Body() {\n this.bodyUsed = false\n\n this._initBody = function(body) {\n /*\n fetch-mock wraps the Response object in an ES6 Proxy to\n provide useful test harness features such as flush. However, on\n ES5 browsers without fetch or Proxy support pollyfills must be used;\n the proxy-pollyfill is unable to proxy an attribute unless it exists\n on the object before the Proxy is created. This change ensures\n Response.bodyUsed exists on the instance, while maintaining the\n semantic of setting Request.bodyUsed in the constructor before\n _initBody is called.\n */\n // eslint-disable-next-line no-self-assign\n this.bodyUsed = this.bodyUsed\n this._bodyInit = body\n if (!body) {\n this._noBody = true;\n this._bodyText = ''\n } else if (typeof body === 'string') {\n this._bodyText = body\n } else if (support.blob && Blob.prototype.isPrototypeOf(body)) {\n this._bodyBlob = body\n } else if (support.formData && FormData.prototype.isPrototypeOf(body)) {\n this._bodyFormData = body\n } else if (support.searchParams && URLSearchParams.prototype.isPrototypeOf(body)) {\n this._bodyText = body.toString()\n } else if (support.arrayBuffer && support.blob && isDataView(body)) {\n this._bodyArrayBuffer = bufferClone(body.buffer)\n // IE 10-11 can't handle a DataView body.\n this._bodyInit = new Blob([this._bodyArrayBuffer])\n } else if (support.arrayBuffer && (ArrayBuffer.prototype.isPrototypeOf(body) || isArrayBufferView(body))) {\n this._bodyArrayBuffer = bufferClone(body)\n } else {\n this._bodyText = body = Object.prototype.toString.call(body)\n }\n\n if (!this.headers.get('content-type')) {\n if (typeof body === 'string') {\n this.headers.set('content-type', 'text/plain;charset=UTF-8')\n } else if (this._bodyBlob && this._bodyBlob.type) {\n this.headers.set('content-type', this._bodyBlob.type)\n } else if (support.searchParams && URLSearchParams.prototype.isPrototypeOf(body)) {\n this.headers.set('content-type', 'application/x-www-form-urlencoded;charset=UTF-8')\n }\n }\n }\n\n if (support.blob) {\n this.blob = function() {\n var rejected = consumed(this)\n if (rejected) {\n return rejected\n }\n\n if (this._bodyBlob) {\n return Promise.resolve(this._bodyBlob)\n } else if (this._bodyArrayBuffer) {\n return Promise.resolve(new Blob([this._bodyArrayBuffer]))\n } else if (this._bodyFormData) {\n throw new Error('could not read FormData body as blob')\n } else {\n return Promise.resolve(new Blob([this._bodyText]))\n }\n }\n }\n\n this.arrayBuffer = function() {\n if (this._bodyArrayBuffer) {\n var isConsumed = consumed(this)\n if (isConsumed) {\n return isConsumed\n } else if (ArrayBuffer.isView(this._bodyArrayBuffer)) {\n return Promise.resolve(\n this._bodyArrayBuffer.buffer.slice(\n this._bodyArrayBuffer.byteOffset,\n this._bodyArrayBuffer.byteOffset + this._bodyArrayBuffer.byteLength\n )\n )\n } else {\n return Promise.resolve(this._bodyArrayBuffer)\n }\n } else if (support.blob) {\n return this.blob().then(readBlobAsArrayBuffer)\n } else {\n throw new Error('could not read as ArrayBuffer')\n }\n }\n\n this.text = function() {\n var rejected = consumed(this)\n if (rejected) {\n return rejected\n }\n\n if (this._bodyBlob) {\n return readBlobAsText(this._bodyBlob)\n } else if (this._bodyArrayBuffer) {\n return Promise.resolve(readArrayBufferAsText(this._bodyArrayBuffer))\n } else if (this._bodyFormData) {\n throw new Error('could not read FormData body as text')\n } else {\n return Promise.resolve(this._bodyText)\n }\n }\n\n if (support.formData) {\n this.formData = function() {\n return this.text().then(decode)\n }\n }\n\n this.json = function() {\n return this.text().then(JSON.parse)\n }\n\n return this\n}\n\n// HTTP methods whose capitalization should be normalized\nvar methods = ['CONNECT', 'DELETE', 'GET', 'HEAD', 'OPTIONS', 'PATCH', 'POST', 'PUT', 'TRACE']\n\nfunction normalizeMethod(method) {\n var upcased = method.toUpperCase()\n return methods.indexOf(upcased) > -1 ? upcased : method\n}\n\nexport function Request(input, options) {\n if (!(this instanceof Request)) {\n throw new TypeError('Please use the \"new\" operator, this DOM object constructor cannot be called as a function.')\n }\n\n options = options || {}\n var body = options.body\n\n if (input instanceof Request) {\n if (input.bodyUsed) {\n throw new TypeError('Already read')\n }\n this.url = input.url\n this.credentials = input.credentials\n if (!options.headers) {\n this.headers = new Headers(input.headers)\n }\n this.method = input.method\n this.mode = input.mode\n this.signal = input.signal\n if (!body && input._bodyInit != null) {\n body = input._bodyInit\n input.bodyUsed = true\n }\n } else {\n this.url = String(input)\n }\n\n this.credentials = options.credentials || this.credentials || 'same-origin'\n if (options.headers || !this.headers) {\n this.headers = new Headers(options.headers)\n }\n this.method = normalizeMethod(options.method || this.method || 'GET')\n this.mode = options.mode || this.mode || null\n this.signal = options.signal || this.signal || (function () {\n if ('AbortController' in g) {\n var ctrl = new AbortController();\n return ctrl.signal;\n }\n }());\n this.referrer = null\n\n if ((this.method === 'GET' || this.method === 'HEAD') && body) {\n throw new TypeError('Body not allowed for GET or HEAD requests')\n }\n this._initBody(body)\n\n if (this.method === 'GET' || this.method === 'HEAD') {\n if (options.cache === 'no-store' || options.cache === 'no-cache') {\n // Search for a '_' parameter in the query string\n var reParamSearch = /([?&])_=[^&]*/\n if (reParamSearch.test(this.url)) {\n // If it already exists then set the value with the current time\n this.url = this.url.replace(reParamSearch, '$1_=' + new Date().getTime())\n } else {\n // Otherwise add a new '_' parameter to the end with the current time\n var reQueryString = /\\?/\n this.url += (reQueryString.test(this.url) ? '&' : '?') + '_=' + new Date().getTime()\n }\n }\n }\n}\n\nRequest.prototype.clone = function() {\n return new Request(this, {body: this._bodyInit})\n}\n\nfunction decode(body) {\n var form = new FormData()\n body\n .trim()\n .split('&')\n .forEach(function(bytes) {\n if (bytes) {\n var split = bytes.split('=')\n var name = split.shift().replace(/\\+/g, ' ')\n var value = split.join('=').replace(/\\+/g, ' ')\n form.append(decodeURIComponent(name), decodeURIComponent(value))\n }\n })\n return form\n}\n\nfunction parseHeaders(rawHeaders) {\n var headers = new Headers()\n // Replace instances of \\r\\n and \\n followed by at least one space or horizontal tab with a space\n // https://tools.ietf.org/html/rfc7230#section-3.2\n var preProcessedHeaders = rawHeaders.replace(/\\r?\\n[\\t ]+/g, ' ')\n // Avoiding split via regex to work around a common IE11 bug with the core-js 3.6.0 regex polyfill\n // https://github.com/github/fetch/issues/748\n // https://github.com/zloirock/core-js/issues/751\n preProcessedHeaders\n .split('\\r')\n .map(function(header) {\n return header.indexOf('\\n') === 0 ? header.substr(1, header.length) : header\n })\n .forEach(function(line) {\n var parts = line.split(':')\n var key = parts.shift().trim()\n if (key) {\n var value = parts.join(':').trim()\n try {\n headers.append(key, value)\n } catch (error) {\n console.warn('Response ' + error.message)\n }\n }\n })\n return headers\n}\n\nBody.call(Request.prototype)\n\nexport function Response(bodyInit, options) {\n if (!(this instanceof Response)) {\n throw new TypeError('Please use the \"new\" operator, this DOM object constructor cannot be called as a function.')\n }\n if (!options) {\n options = {}\n }\n\n this.type = 'default'\n this.status = options.status === undefined ? 200 : options.status\n if (this.status < 200 || this.status > 599) {\n throw new RangeError(\"Failed to construct 'Response': The status provided (0) is outside the range [200, 599].\")\n }\n this.ok = this.status >= 200 && this.status < 300\n this.statusText = options.statusText === undefined ? '' : '' + options.statusText\n this.headers = new Headers(options.headers)\n this.url = options.url || ''\n this._initBody(bodyInit)\n}\n\nBody.call(Response.prototype)\n\nResponse.prototype.clone = function() {\n return new Response(this._bodyInit, {\n status: this.status,\n statusText: this.statusText,\n headers: new Headers(this.headers),\n url: this.url\n })\n}\n\nResponse.error = function() {\n var response = new Response(null, {status: 200, statusText: ''})\n response.ok = false\n response.status = 0\n response.type = 'error'\n return response\n}\n\nvar redirectStatuses = [301, 302, 303, 307, 308]\n\nResponse.redirect = function(url, status) {\n if (redirectStatuses.indexOf(status) === -1) {\n throw new RangeError('Invalid status code')\n }\n\n return new Response(null, {status: status, headers: {location: url}})\n}\n\nexport var DOMException = g.DOMException\ntry {\n new DOMException()\n} catch (err) {\n DOMException = function(message, name) {\n this.message = message\n this.name = name\n var error = Error(message)\n this.stack = error.stack\n }\n DOMException.prototype = Object.create(Error.prototype)\n DOMException.prototype.constructor = DOMException\n}\n\nexport function fetch(input, init) {\n return new Promise(function(resolve, reject) {\n var request = new Request(input, init)\n\n if (request.signal && request.signal.aborted) {\n return reject(new DOMException('Aborted', 'AbortError'))\n }\n\n var xhr = new XMLHttpRequest()\n\n function abortXhr() {\n xhr.abort()\n }\n\n xhr.onload = function() {\n var options = {\n statusText: xhr.statusText,\n headers: parseHeaders(xhr.getAllResponseHeaders() || '')\n }\n // This check if specifically for when a user fetches a file locally from the file system\n // Only if the status is out of a normal range\n if (request.url.indexOf('file://') === 0 && (xhr.status < 200 || xhr.status > 599)) {\n options.status = 200;\n } else {\n options.status = xhr.status;\n }\n options.url = 'responseURL' in xhr ? xhr.responseURL : options.headers.get('X-Request-URL')\n var body = 'response' in xhr ? xhr.response : xhr.responseText\n setTimeout(function() {\n resolve(new Response(body, options))\n }, 0)\n }\n\n xhr.onerror = function() {\n setTimeout(function() {\n reject(new TypeError('Network request failed'))\n }, 0)\n }\n\n xhr.ontimeout = function() {\n setTimeout(function() {\n reject(new TypeError('Network request timed out'))\n }, 0)\n }\n\n xhr.onabort = function() {\n setTimeout(function() {\n reject(new DOMException('Aborted', 'AbortError'))\n }, 0)\n }\n\n function fixUrl(url) {\n try {\n return url === '' && g.location.href ? g.location.href : url\n } catch (e) {\n return url\n }\n }\n\n xhr.open(request.method, fixUrl(request.url), true)\n\n if (request.credentials === 'include') {\n xhr.withCredentials = true\n } else if (request.credentials === 'omit') {\n xhr.withCredentials = false\n }\n\n if ('responseType' in xhr) {\n if (support.blob) {\n xhr.responseType = 'blob'\n } else if (\n support.arrayBuffer\n ) {\n xhr.responseType = 'arraybuffer'\n }\n }\n\n if (init && typeof init.headers === 'object' && !(init.headers instanceof Headers || (g.Headers && init.headers instanceof g.Headers))) {\n var names = [];\n Object.getOwnPropertyNames(init.headers).forEach(function(name) {\n names.push(normalizeName(name))\n xhr.setRequestHeader(name, normalizeValue(init.headers[name]))\n })\n request.headers.forEach(function(value, name) {\n if (names.indexOf(name) === -1) {\n xhr.setRequestHeader(name, value)\n }\n })\n } else {\n request.headers.forEach(function(value, name) {\n xhr.setRequestHeader(name, value)\n })\n }\n\n if (request.signal) {\n request.signal.addEventListener('abort', abortXhr)\n\n xhr.onreadystatechange = function() {\n // DONE (success or failure)\n if (xhr.readyState === 4) {\n request.signal.removeEventListener('abort', abortXhr)\n }\n }\n }\n\n xhr.send(typeof request._bodyInit === 'undefined' ? null : request._bodyInit)\n })\n}\n\nfetch.polyfill = true\n\nif (!g.fetch) {\n g.fetch = fetch\n g.Headers = Headers\n g.Request = Request\n g.Response = Response\n}\n"],"sourceRoot":""}