{"version":3,"sources":["wc-square.min.js"],"names":["_classCallCheck","instance","Constructor","TypeError","_createClass","defineProperties","target","props","i","length","descriptor","enumerable","configurable","writable","Object","defineProperty","key","protoProps","staticProps","prototype","indexOf","jQuery","document","ready","$","window","WC_Square_Payment_Form_Handler","args","this","set_payment_fields","bind","get_form_params","handle_input_event","id","id_dasherized","csc_required","enabled_card_types","square_card_types","logging_enabled","general_error","ajax_url","ajax_log_nonce","input_styles","application_id","form","handle_checkout_page","handle_pay_page","console","log","handle_add_payment_method_page","params","body","on","val","payment_form","recalculateSize","value","_this","handle_saved_payment_methods","validate_payment_data","$new_payment_method_selection","change","slideUp","slideDown","$parent_row","closest","is","next","show","hide","_this2","submit","_this3","destroy","SqPaymentForm","build","$card_number","$csc","$expiration","$postal_code","_this4","applicationId","cardNumber","elementId","attr","placeholder","data","expirationDate","cvv","postalCode","inputClass","inputStyles","callbacks","inputEventReceived","event","cardNonceResponseReceived","errors","nonce","cardData","handle_response","unsupportedBrowserDetected","handle_unsupported_browser","paymentFormLoaded","handle_form_loaded","setPostalCode","addClass","$input","eventType","handle_card_brand_change","cardBrand","brand","card_class","c","replace","call","has_nonce","find","block_ui","requestCardNonce","message","handle_errors","log_data","last_4","exp_month","exp_year","billing_postal_code","messages","_this5","arguments","undefined","error","each","index","ref","type","push","render_errors","unblock_ui","remove","prepend","join","removeClass","unblock","blur","animate","scrollTop","offset","top","block","overlayCSS","background","opacity","ajax_data","action","security","ajax","url"],"mappings":"AAAA,aAIA,SAASA,gBAAgBC,EAAUC,GAAe,KAAMD,aAAoBC,GAAgB,MAAM,IAAIC,UAAU,qCAFhH,IAAIC,aAAe,WAAc,SAASC,EAAiBC,EAAQC,GAAS,IAAK,IAAIC,EAAI,EAAGA,EAAID,EAAME,OAAQD,IAAK,CAAE,IAAIE,EAAaH,EAAMC,GAAIE,EAAWC,WAAaD,EAAWC,aAAc,EAAOD,EAAWE,cAAe,EAAU,UAAWF,IAAYA,EAAWG,UAAW,GAAMC,OAAO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