index of
/
home
/
thefkyzp
/
hulmvisaadvisor.com
/
wp-content
/
plugins
/
surecart
/
dist
/
File: /home/thefkyzp/hulmvisaadvisor.com/wp-content/plugins/surecart/dist/9797.js
"use strict";(self.webpackChunk_surecart_surecart=self.webpackChunk_surecart_surecart||[]).push([[9797],{8028:function(n,t,e){e.d(t,{a:function(){return u},b:function(){return c},c:function(){return o},d:function(){return s},g:function(){return i},i:function(){return f}});var r=e(6786),o=function(){return["loading","busy","redirecting"].includes(r.s.loading)},i=function(){var n,t;return(null===(t=null===(n=null===r.s||void 0===r.s?void 0:r.s.checkout)||void 0===n?void 0:n.metadata)||void 0===t?void 0:t.success_url)||r.s.success_url||null},u=function(n){var t,e;return null!==(e=null===(t=null===r.s||void 0===r.s?void 0:r.s.line_item)||void 0===t?void 0:t.total_amount)&&void 0!==e?e:n},c=function(n){var t,e,o;return(null===(t=null===r.s||void 0===r.s?void 0:r.s.line_item)||void 0===t?void 0:t.total_savings_amount)?-(null===(e=null===r.s||void 0===r.s?void 0:r.s.line_item)||void 0===e?void 0:e.total_savings_amount)+(null===(o=null===r.s||void 0===r.s?void 0:r.s.line_item)||void 0===o?void 0:o.total_amount):n},a=function(){var n,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"seconds",e=null===(n=r.s.checkout)||void 0===n?void 0:n.upsells_expire_at;if(!e)return null;var o=Date.now(),i=Math.floor((1e3*e-o)/1e3);return i<0?0:"seconds"===t?i:"minutes"===t?Math.floor(i/60):"hours"===t?Math.floor(i/60/60):void 0},l=function(n){return n<10?"0".concat(n):"".concat(n)},s=function(){var n;if(!(null===(n=r.s.checkout)||void 0===n?void 0:n.upsells_expire_at))return"--:--";var t=a("seconds"),e=Math.floor(t/86400),o=Math.floor(t%86400/3600),i=Math.floor(t%3600/60),u=Math.floor(t%60);return e>0?"".concat(l(e),":").concat(l(o),":").concat(l(i),":").concat(l(u)):o>0?"".concat(l(o),":").concat(l(i),":").concat(l(u)):"".concat(l(i),":").concat(l(u))},f=function(){var n=a();return null!==a()&&n<=0}},1416:function(n,t,e){e.d(t,{c:function(){return s}});var r=e(1346);function o(n,t){(null==t||t>n.length)&&(t=n.length);for(var e=0,r=Array(t);e<t;e++)r[e]=n[e];return r}var i,u,c=function(n){return!("isConnected"in n)||n.isConnected},a=(i=function(n){var t,e=function(n,t){var e="undefined"!=typeof Symbol&&n[Symbol.iterator]||n["@@iterator"];if(!e){if(Array.isArray(n)||(e=function(n,t){if(n){if("string"==typeof n)return o(n,t);var e={}.toString.call(n).slice(8,-1);return"Object"===e&&n.constructor&&(e=n.constructor.name),"Map"===e||"Set"===e?Array.from(n):"Arguments"===e||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(e)?o(n,t):void 0}}(n))||t&&n&&"number"==typeof n.length){e&&(n=e);var _n=0,r=function(){};return{s:r,n:function(){return _n>=n.length?{done:!0}:{done:!1,value:n[_n++]}},e:function(n){throw n},f:r}}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 i,u=!0,c=!1;return{s:function(){e=e.call(n)},n:function(){var n=e.next();return u=n.done,n},e:function(n){c=!0,i=n},f:function(){try{u||null==e.return||e.return()}finally{if(c)throw i}}}}(n.keys());try{for(e.s();!(t=e.n()).done;){var r=t.value;n.set(r,n.get(r).filter(c))}}catch(n){e.e(n)}finally{e.f()}},function(){for(var n=arguments.length,t=new Array(n),e=0;e<n;e++)t[e]=arguments[e];u&&clearTimeout(u),u=setTimeout((function(){u=0,i.apply(void 0,t)}),2e3)}),l=function(n){return"function"==typeof n?n():n},s=function(n,t){var e=function(n){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:function(n,t){return n!==t},e=l(n),r=new Map(Object.entries(null!=e?e:{})),o={dispose:[],get:[],set:[],reset:[]},i=function(){var t;r=new Map(Object.entries(null!==(t=l(n))&&void 0!==t?t:{})),o.reset.forEach((function(n){return n()}))},u=function(n){return o.get.forEach((function(t){return t(n)})),r.get(n)},c=function(n,e){var i=r.get(n);t(e,i,n)&&(r.set(n,e),o.set.forEach((function(t){return t(n,e,i)})))},a="undefined"==typeof Proxy?{}:new Proxy(e,{get:function(n,t){return u(t)},ownKeys:function(n){return Array.from(r.keys())},getOwnPropertyDescriptor:function(){return{enumerable:!0,configurable:!0}},has:function(n,t){return r.has(t)},set:function(n,t,e){return c(t,e),!0}}),s=function(n,t){return o[n].push(t),function(){var e,r,i;e=o[n],r=t,(i=e.indexOf(r))>=0&&(e[i]=e[e.length-1],e.length--)}};return{state:a,get:u,set:c,on:s,onChange:function(t,e){var r=s("set",(function(n,r){n===t&&e(r)})),o=s("reset",(function(){return e(l(n)[t])}));return function(){r(),o()}},use:function(){for(var n=arguments.length,t=new Array(n),e=0;e<n;e++)t[e]=arguments[e];var r=t.reduce((function(n,t){return t.set&&n.push(s("set",t.set)),t.get&&n.push(s("get",t.get)),t.reset&&n.push(s("reset",t.reset)),t.dispose&&n.push(s("dispose",t.dispose)),n}),[]);return function(){return r.forEach((function(n){return n()}))}},dispose:function(){o.dispose.forEach((function(n){return n()})),i()},reset:i,forceUpdate:function(n){var t=r.get(n);o.set.forEach((function(e){return e(n,t,t)}))}}}(n,t);return e.use(function(){if("function"!=typeof r.g)return{};var n=new Map;return{dispose:function(){return n.clear()},get:function(t){var e=(0,r.g)();e&&function(n,t,e){var r=n.get(t);r?r.includes(e)||r.push(e):n.set(t,[e])}(n,t,e)},set:function(t){var e=n.get(t);e&&n.set(t,e.filter(r.f)),a(n)},reset:function(){n.forEach((function(n){return n.forEach(r.f)})),a(n)}}}()),e}},9797:function(n,t,e){e.r(t),e.d(t,{sc_upsell_countdown_timer:function(){return c}});var r=e(3029),o=e(2901),i=e(1346),u=e(8028),c=(e(6786),e(1416),function(){return(0,o.A)((function n(t){(0,r.A)(this,n),(0,i.r)(this,t),this.timeRemaining=1/0,this.formattedTime=void 0,this.showIcon=!0}),[{key:"componentDidLoad",value:function(){this.updateCountdown()}},{key:"updateCountdown",value:function(){var n=this;this.formattedTime=(0,u.d)(),setInterval((function(){n.formattedTime=(0,u.d)()}),1e3)}},{key:"render",value:function(){return(0,i.h)(i.H,{key:"78ffae153baefe9b9f84d129dcfac5370212a2a2",role:"timer",class:{"sc-upsell-countdown-timer":!0}},this.showIcon&&(0,i.h)("sc-icon",{key:"f0178828c7e0cc28f8ca0c93890e8e3077b0dbb9",name:"clock"}),(0,i.h)("span",{key:"0e673c27efd949f1ea8fcde7cb975ff2df63c8ad"},(0,i.h)("slot",{key:"61eb5079b0faca31fdf489c5cb55b29da88e767b",name:"offer-expire-text"})," ",(0,i.h)("strong",{key:"2e1a5878b38413411dd0487fe66b7152e3687f7e"},this.formattedTime)))}}])}());c.style=":host{display:flex;justify-content:var(--sc-upsell-countdown-timer-justify-content, center);align-items:var(--sc-upsell-countdown-timer-align-items, center);text-align:var(--sc-upsell-countdown-timer-text-align, center);flex-wrap:wrap;gap:var(--sc-upsell-countdown-timer-gap, 0.5em);line-height:1;padding:var(--sc-upsell-countdown-timer-padding, var(--sc-spacing-medium));border-radius:var(--sc-upsell-countdown-timer-border-radius, var(--sc-border-radius-pill));background-color:var(--sc-upsell-countdown-timer-background-color, rgb(226, 249, 235));color:var(--sc-upsell-countdown-timer-color, rgb(71, 91, 80))}"},6786:function(n,t,e){e.d(t,{a:function(){return f},d:function(){return d},f:function(){return v},o:function(){return s},s:function(){return l}});var r=e(4467),o=e(6121),i=e(1416);function u(n,t){var e=Object.keys(n);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(n);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(n,t).enumerable}))),e.push.apply(e,r)}return e}var c=(0,o.g)().upsell,a=(0,i.c)(function(n){for(var t=1;t<arguments.length;t++){var e=null!=arguments[t]?arguments[t]:{};t%2?u(Object(e),!0).forEach((function(t){(0,r.A)(n,t,e[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(e)):u(Object(e)).forEach((function(t){Object.defineProperty(n,t,Object.getOwnPropertyDescriptor(e,t))}))}return n}({upsell:null,product:null,line_item:null,checkout_id:null,checkout:null,form_id:null,busy:!1,disabled:!1,success_url:null,text:{success:{title:"",description:"",button:""}}},c),(function(n,t){return JSON.stringify(n)!==JSON.stringify(t)})),l=a.state,s=a.onChange,f=a.on,d=a.dispose,v=a.forceUpdate},6121:function(n,t,e){e.d(t,{a:function(){return c},g:function(){return i},i:function(){return u}});var r=e(9394),o=e(2284),i=function(){var n,t=document.querySelector('script[type="application/json"]#sc-store-data');if(!t)return{};try{var e=JSON.parse(t.textContent);if((n=e)&&"object"===(0,o.A)(n)&&!Array.isArray(n))return e;throw Error("Parsed state is not an object")}catch(n){console.error(n)}return{}},u=function(n,t,e,o){var i,u,c,a,l;if(!(null==o?void 0:o.stock_enabled)||(null==o?void 0:o.allow_out_of_stock_purchases))return!1;if(1===n){var s=null===(c=(u=(null===(i=o.variants)||void 0===i?void 0:i.data)||[]).filter)||void 0===c?void 0:c.call(u,(function(n){return n.option_1===t}));return Math.max.apply(Math,(0,r.A)(s.map((function(n){return n.available_stock}))))<=0}if(2===n){var f=((null===(a=o.variants)||void 0===a?void 0:a.data)||[]).filter((function(n){return(null==n?void 0:n.option_1)===e.option_1&&n.option_2===t}));return Math.max.apply(Math,(0,r.A)(f.map((function(n){return n.available_stock}))))<=0}var d=((null===(l=o.variants)||void 0===l?void 0:l.data)||[]).filter((function(n){return(null==n?void 0:n.option_1)===e.option_1&&(null==n?void 0:n.option_2)===e.option_2&&n.option_3===t}));return Math.max.apply(Math,(0,r.A)(d.map((function(n){return n.available_stock}))))<=0},c=function(n,t,e,r){var o,i,u;return 1===n?!((null===(o=null==r?void 0:r.variants)||void 0===o?void 0:o.data)||[]).some((function(n){return n.option_1===t})):2===n?!((null===(i=null==r?void 0:r.variants)||void 0===i?void 0:i.data)||[]).some((function(n){return(null==n?void 0:n.option_1)===e.option_1&&n.option_2===t})):!((null===(u=null==r?void 0:r.variants)||void 0===u?void 0:u.data)||[]).some((function(n){return(null==n?void 0:n.option_1)===e.option_1&&(null==n?void 0:n.option_2)===e.option_2&&n.option_3===t}))}}}]);