index of
/
home
/
thefkyzp
/
hulmvisaadvisor.com
/
wp-content
/
plugins
/
surecart
/
dist
/
File: /home/thefkyzp/hulmvisaadvisor.com/wp-content/plugins/surecart/dist/4451.js
"use strict";(self.webpackChunk_surecart_surecart=self.webpackChunk_surecart_surecart||[]).push([[4451],{448:function(n,r,t){t.d(r,{a:function(){return f},b:function(){return s},g:function(){return l}});var e=t(4942),i=t(885);function c(n,r){var t=Object.keys(n);if(Object.getOwnPropertySymbols){var e=Object.getOwnPropertySymbols(n);r&&(e=e.filter((function(r){return Object.getOwnPropertyDescriptor(n,r).enumerable}))),t.push.apply(t,e)}return t}function u(n){for(var r=1;r<arguments.length;r++){var t=null!=arguments[r]?arguments[r]:{};r%2?c(Object(t),!0).forEach((function(r){(0,e.Z)(n,r,t[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(t)):c(Object(t)).forEach((function(r){Object.defineProperty(n,r,Object.getOwnPropertyDescriptor(t,r))}))}return n}function o(n,r){var t="undefined"!=typeof Symbol&&n[Symbol.iterator]||n["@@iterator"];if(!t){if(Array.isArray(n)||(t=function(n,r){if(n){if("string"==typeof n)return a(n,r);var t=Object.prototype.toString.call(n).slice(8,-1);return"Object"===t&&n.constructor&&(t=n.constructor.name),"Map"===t||"Set"===t?Array.from(n):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?a(n,r):void 0}}(n))||r&&n&&"number"==typeof n.length){t&&(n=t);var e=0,i=function(){};return{s:i,n:function(){return e>=n.length?{done:!0}:{done:!1,value:n[e++]}},e:function(n){throw n},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var c,u=!0,o=!1;return{s:function(){t=t.call(n)},n:function(){var n=t.next();return u=n.done,n},e:function(n){o=!0,c=n},f:function(){try{u||null==t.return||t.return()}finally{if(o)throw c}}}}function a(n,r){(null==r||r>n.length)&&(r=n.length);for(var t=0,e=new Array(r);t<r;t++)e[t]=n[t];return e}function s(n){for(var r,t="",e=Object.entries(n);r=e.shift();){var c=r,u=(0,i.Z)(c,2),a=u[0],s=u[1];if(Array.isArray(s)||s&&s.constructor===Object){var l,f=o(Object.entries(s).reverse());try{for(f.s();!(l=f.n()).done;){var d=(0,i.Z)(l.value,2),p=d[0],_=d[1];e.unshift(["".concat(a,"[").concat(p,"]"),_])}}catch(n){f.e(n)}finally{f.f()}}else void 0!==s&&(null===s&&(s=""),t+="&"+[a,s].map(encodeURIComponent).join("="))}return t.substr(1)}function l(n){return(function(n){var r;try{r=new URL(n,"http://example.com").search.substring(1)}catch(n){}if(r)return r}(n)||"").replace(/\+/g,"%20").split("&").reduce((function(n,r){var t=r.split("=").filter(Boolean).map(decodeURIComponent),e=(0,i.Z)(t,2),c=e[0],o=e[1],a=void 0===o?"":o;return c&&function(n,r,t){for(var e=r.length,i=e-1,c=0;c<e;c++){var o=r[c];!o&&Array.isArray(n)&&(o=n.length.toString());var a=!isNaN(Number(r[c+1]));n[o]=c===i?t:n[o]||(a?[]:{}),Array.isArray(n[o])&&!a&&(n[o]=u({},n[o])),n=n[o]}}(n,c.replace(/\]/g,"").split("["),a),n}),{})}function f(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",r=arguments.length>1?arguments[1]:void 0;if(!r||!Object.keys(r).length)return n;var t=n,e=n.indexOf("?");return-1!==e&&(r=Object.assign(l(n),r),t=t.substr(0,e)),t+"?"+s(r)}},2846:function(n,r,t){t.d(r,{i:function(){return c},m:function(){return i},z:function(){return e}});var e=["bif","byr","clp","djf","gnf","isk","jpy","kmf","krw","pyg","rwf","ugx","vnd","vuv","xaf","xag","xau","xba","xbb","xbc","xbd","xdr","xof","xpd","xpf","xpt","xts"],i=function(n,r){return c(r)?n:n/100},c=function(n){var r;return e.includes(null===(r=null==n?void 0:n.toLowerCase)||void 0===r?void 0:r.call(n))}},2400:function(n,r,t){t.d(r,{a:function(){return i},b:function(){return d},c:function(){return _},d:function(){return u},g:function(){return c},i:function(){return s},p:function(){return p},t:function(){return o}});var e=t(2846),i=function(n){return(null==n?void 0:n.amount_off)&&(null==n?void 0:n.currency)?c({amount:n.amount_off,currency:n.currency}):(null==n?void 0:n.percent_off)?wp.i18n.sprintf(wp.i18n.__("%1d%% off","surecart"),0|n.percent_off):""},c=function(n){var r=n.amount,t=n.currency,i=function(n,r){return e.z.includes(r)?n:n/100}(r,t);return"".concat(new Intl.NumberFormat(void 0,{style:"currency",currency:t}).format(parseFloat(i.toFixed(2))))},u=function(){var n,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"usd",t=new Intl.NumberFormat(void 0,{style:"currency",currency:r}).formatToParts();return null===(n=t.find((function(n){return"currency"===n.type})))||void 0===n?void 0:n.value},o=function(n,r){var t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:wp.i18n.__("every","surecart"),e=arguments.length>3&&void 0!==arguments[3]?arguments[3]:wp.i18n.__("once","surecart"),i=arguments.length>4&&void 0!==arguments[4]&&arguments[4];switch(r){case"day":return"".concat(t," ").concat(wp.i18n.sprintf(i?wp.i18n._n("%d day","%d days",n,"surecart"):wp.i18n._n("day","%d days",n,"surecart"),n));case"week":return"".concat(t," ").concat(wp.i18n.sprintf(i?wp.i18n._n("%d week","%d weeks",n,"surecart"):wp.i18n._n("week","%d weeks",n,"surecart"),n));case"month":return"".concat(t," ").concat(wp.i18n.sprintf(i?wp.i18n._n("%d month","%d months",n,"surecart"):wp.i18n._n("month","%d months",n,"surecart"),n));case"year":return"".concat(t," ").concat(wp.i18n.sprintf(i?wp.i18n._n("%d year","%d years",n,"surecart"):wp.i18n._n("year","%d years",n,"surecart"),n));default:return e}},a=function(n,r){var t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:wp.i18n.__("once","surecart"),e=arguments.length>3&&void 0!==arguments[3]&&arguments[3];switch(r){case"day":return" / ".concat(wp.i18n.sprintf(e?wp.i18n._n("%d day","%d days",n,"surecart"):wp.i18n._n("day","%d days",n,"surecart"),n));case"week":return" / ".concat(wp.i18n.sprintf(e?wp.i18n._n("%d wk","%d wks",n,"surecart"):wp.i18n._n("wk","%d wks",n,"surecart"),n));case"month":return" / ".concat(wp.i18n.sprintf(e?wp.i18n._n("%d mo","%d months",n,"surecart"):wp.i18n._n("mo","%d mos",n,"surecart"),n));case"year":return" / ".concat(wp.i18n.sprintf(e?wp.i18n._n("%d yr","%d yrs",n,"surecart"):wp.i18n._n("yr","%d yrs",n,"surecart"),n));default:return t}},s=function(n){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!n)return"";var t=r.showOnce,e=r.labels,i=r.abbreviate,c=e||{},u=c.interval,o=void 0===u?wp.i18n.__("every","surecart"):u;return"".concat(l(n,o,t?wp.i18n.__("once","surecart"):"",i)," ").concat(f(n,i))},l=function(n,r){var t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:wp.i18n.__("once","surecart"),e=arguments.length>3&&void 0!==arguments[3]&&arguments[3];return n.recurring_interval_count&&n.recurring_interval&&1!==(null==n?void 0:n.recurring_period_count)?e?a(n.recurring_interval_count,n.recurring_interval,t):o(n.recurring_interval_count,n.recurring_interval," ".concat(r),t):""},f=function(n){var r=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return(null==n?void 0:n.recurring_period_count)&&1!==(null==n?void 0:n.recurring_period_count)?r?"x ".concat(n.recurring_period_count):" (".concat(wp.i18n.sprintf(wp.i18n._n("%d payment","%d payments",n.recurring_period_count,"surecart"),n.recurring_period_count),")"):""},d=function(n){return wp.i18n.sprintf(wp.i18n._n("%d payment remaining","%d payments remaining",n,"surecart"),n)},p=function(n){var r;return n?"".concat(null===(r=null==n?void 0:n.product)||void 0===r?void 0:r.name," ").concat((null==n?void 0:n.name)?"— ".concat(n.name):""):""},_=function(n){switch(n){case"invalid":return wp.i18n.__("Not valid","surecart");case"expired":return wp.i18n.__("Expired","surecart");case"gone":return wp.i18n.__("Not available","surecart");case"less_than_min_subtotal_amount":return wp.i18n.__("Minimum not met","surecart");case"greater_than_max_subtotal_amount":return wp.i18n.__("Order too large","surecart");case"not_applicable":return wp.i18n.__("Product(s) not eligible","surecart");case"not_applicable_to_customer":return wp.i18n.__("Not eligible","surecart");case"":return"";default:return wp.i18n.__("Not redeemable","surecart")}}},4451:function(n,r,t){t.r(r),t.d(r,{sc_subscription_ad_hoc_confirm:function(){return f}});var e=t(5861),i=t(5671),c=t(3144),u=t(1284),o=t.n(u),a=t(8860),s=t(2400),l=t(448),f=function(){function n(r){(0,i.Z)(this,n),(0,a.r)(this,r),this.heading=void 0,this.price=void 0,this.busy=!1}var r;return(0,c.Z)(n,[{key:"handleSubmit",value:(r=(0,e.Z)(o().mark((function n(r){var t,e;return o().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,r.target.getFormJson();case 2:return t=n.sent,e=t.ad_hoc_amount,this.busy=!0,n.abrupt("return",window.location.assign((0,l.a)(window.location.href,{action:"confirm",ad_hoc_amount:e})));case 6:case"end":return n.stop()}}),n,this)}))),function(_x){return r.apply(this,arguments)})},{key:"render",value:function(){var n=this;return(0,a.h)("sc-dashboard-module",{heading:this.heading||wp.i18n.__("Enter An Amount","surecart"),class:"subscription-switch"},(0,a.h)("sc-card",null,(0,a.h)("sc-form",{onScSubmit:function(r){return n.handleSubmit(r)}},(0,a.h)("sc-price-input",{label:"Amount",name:"ad_hoc_amount",autofocus:!0,required:!0},(0,a.h)("span",{slot:"suffix",style:{opacity:"0.75"}},(0,s.i)(this.price))),(0,a.h)("sc-button",{type:"primary",full:!0,submit:!0,loading:this.busy},wp.i18n.__("Next","surecart")," ",(0,a.h)("sc-icon",{name:"arrow-right",slot:"suffix"})))),this.busy&&(0,a.h)("sc-block-ui",{style:{zIndex:"9"}}))}}]),n}();f.style=":host{display:block}"},4942:function(n,r,t){function e(n,r,t){return r in n?Object.defineProperty(n,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):n[r]=t,n}t.d(r,{Z:function(){return e}})}}]);