index of
/
home
/
thefkyzp
/
hulmvisaadvisor.com
/
wp-content
/
plugins
/
surecart
/
dist
/
store
/
File: /home/thefkyzp/hulmvisaadvisor.com/wp-content/plugins/surecart/dist/store/ui.js
!function(){"use strict";var r,n,t,e={4539:function(r,n,t){t.r(n),t.d(n,{addErrors:function(){return s},addModelErrors:function(){return d},addSnackbarNotice:function(){return E},addValidationErrors:function(){return p},clearErrors:function(){return A},clearModelErrors:function(){return v},clearValidationErrors:function(){return y},removeSnackbarNotice:function(){return S},setError:function(){return l},setFlash:function(){return f},setInvalid:function(){return c},setSaving:function(){return i},setUpgradeModal:function(){return a}});var e=t(9280),o=t.n(e),u=o().mark(d);function i(r){return{type:"SET_SAVING",value:r}}function a(r){return{type:"SET_MODAL",value:!!r&&"upgrade"}}function c(r){return{type:"SET_INVALID",value:r}}function l(r){return{type:"SET_ERROR",value:r}}function f(r){return{type:"SET_FLASH",value:r}}function s(r){return{type:"ADD_ERRORS",value:r}}function d(r,n){return o().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",{type:"ADD_MODEL_ERRORS",name:r,payload:n});case 1:case"end":return t.stop()}}),u)}function v(r){return{type:"CLEAR_MODEL_ERRORS",name:r}}function A(){return{type:"CLEAR_ERRORS",index:arguments.length>0&&void 0!==arguments[0]?arguments[0]:null}}function p(r){return{type:"ADD_VALIDATION_ERRORS",value:r}}function y(){return{type:"CLEAR_VALIDATION_ERRORS",attribute:arguments.length>0&&void 0!==arguments[0]?arguments[0]:""}}function E(r){return{type:"ADD_SNACKBAR_NOTICE",notice:r}}function S(r){return{type:"REMOVE_SNACKBAR_NOTICE",id:r}}},1989:function(r,n){n.A="surecart/ui"},4416:function(r,n,t){t.d(n,{$:function(){return a},M:function(){return i.A}});var e=t(3412),o=t(3454),u=t(4539),i=t(1989),a={reducer:e.Ay,selectors:o,actions:u}},3412:function(r,n,t){var e=t(9394),o=t(4467),u=t(7143),i=t(6087);function a(r,n){var t=Object.keys(r);if(Object.getOwnPropertySymbols){var e=Object.getOwnPropertySymbols(r);n&&(e=e.filter((function(n){return Object.getOwnPropertyDescriptor(r,n).enumerable}))),t.push.apply(t,e)}return t}function c(r){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?a(Object(t),!0).forEach((function(n){(0,o.A)(r,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(t)):a(Object(t)).forEach((function(n){Object.defineProperty(r,n,Object.getOwnPropertyDescriptor(t,n))}))}return r}n.Ay=(0,u.combineReducers)({saving:function(){var r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{isSaving:!1},n=arguments.length>1?arguments[1]:void 0;return"SET_SAVING"===n.type?c(c({},r),{},{isSaving:n.value}):r},error:function(r,n){return"SET_ERROR"===n.type?n.value:r},errors:function(){var r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{flash:{},validation:[],isInvalid:0,errors:[]},n=arguments.length>1?arguments[1]:void 0;switch(n.type){case"SET_INVALID":return c(c({},r),{},{isInvalid:(null==r?void 0:r.isInvalid)+1});case"SET_SAVING":return c(c({},r),{},{isSaving:n.value});case"SET_FLASH":return c(c({},r),{},{flash:n.value});case"ADD_ERRORS":return c(c({},r),{},{errors:[].concat((0,e.A)(r.errors),(0,e.A)(n.value))});case"CLEAR_ERRORS":return null!==(null==n?void 0:n.index)?c(c({},r),{},{errors:(r.errors||[]).filter((function(r){return r.index!==n.index}))}):c(c({},r),{},{errors:[]});case"ADD_VALIDATION_ERRORS":return c(c({},r),{},{validation:[].concat((0,e.A)(r.validation),(0,e.A)(n.value))});case"CLEAR_VALIDATION_ERRORS":return n.attribute?c(c({},r),{},{isInvalid:0,validation:r.validation.filter((function(r){var t;return(null==r||null===(t=r.data)||void 0===t?void 0:t.attribute)!==n.attribute}))}):c(c({},r),{},{isInvalid:0,validation:[]})}return r},modelErrors:function(){var r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0,t=n.type,u=n.name,a=n.payload;switch(t){case"ADD_MODEL_ERRORS":return c(c({},r),{},(0,o.A)({},u,[].concat((0,e.A)(r[u]||[]),(0,e.A)((0,i.castArray)(a)))));case"CLEAR_MODEL_ERRORS":return c(c({},r),{},(0,o.A)({},u,[]))}return r},modal:function(r,n){return"SET_MODAL"===n.type?n.value:r},snackbar:function(){var r,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"ADD_SNACKBAR_NOTICE":return[].concat((0,e.A)(n),[c({id:n.length,className:"error"===(null==t||null===(r=t.notice)||void 0===r?void 0:r.type)?"is-snackbar-error":""},t.notice)]);case"REMOVE_SNACKBAR_NOTICE":return n.filter((function(r){return r.id!==t.id}));case"SAVE_ERROR":return[].concat((0,e.A)(n),[{id:n.length,className:"is-snackbar-error",content:(null==t?void 0:t.message)||__("Something went wrong.","surecart")}])}return n}})},3454:function(r,n,t){t.r(n),t.d(n,{flash:function(){return a},getError:function(){return l},isInvalid:function(){return c},isSaving:function(){return i},selectErrors:function(){return s},selectModelErrors:function(){return f},selectValidationErrors:function(){return d},showUpgradeModal:function(){return u},snackbarNotices:function(){return o}});var e=t(9394);function o(r){return r.snackbar||[]}function u(r){return"upgrade"===r.modal}function i(r){return r.saving.isSaving}function a(r){return r.errors.flash}function c(r){return r.errors.isInvalid}function l(r){return r.error}function f(r,n){return r.modelErrors[n]||[]}function s(r,n){var t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;if(!n)return r.errors.errors;var e=r.errors.errors.filter((function(r){return(null==r?void 0:r.key)&&r.key===n}));return null===t?e:e.filter((function(r){return(null==r?void 0:r.index)===t}))}function d(r,n){var t=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"",o=s(r,n,arguments.length>2&&void 0!==arguments[2]?arguments[2]:null),u=[];return o.length?(o.forEach((function(r){var n,o,i=r.error;null!=i&&null!==(n=i.additional_errors)&&void 0!==n&&n.length&&(u=[].concat((0,e.A)(u),t?(0,e.A)(null==i||null===(o=i.additional_errors)||void 0===o?void 0:o.filter((function(r){var n;return(null==r||null===(n=r.data)||void 0===n?void 0:n.attribute)===t}))):(0,e.A)(null==i?void 0:i.additional_errors)))})),u):u}},6087:function(r){r.exports=window.lodash},9280:function(r){r.exports=window.regeneratorRuntime},7143:function(r){r.exports=window.wp.data},3145:function(r,n,t){function e(r,n){(null==n||n>r.length)&&(n=r.length);for(var t=0,e=Array(n);t<n;t++)e[t]=r[t];return e}t.d(n,{A:function(){return e}})},4243:function(r,n,t){t.d(n,{A:function(){return o}});var e=t(3145);function o(r){if(Array.isArray(r))return(0,e.A)(r)}},4467:function(r,n,t){t.d(n,{A:function(){return o}});var e=t(9922);function o(r,n,t){return(n=(0,e.A)(n))in r?Object.defineProperty(r,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):r[n]=t,r}},3893:function(r,n,t){function e(r){if("undefined"!=typeof Symbol&&null!=r[Symbol.iterator]||null!=r["@@iterator"])return Array.from(r)}t.d(n,{A:function(){return e}})},519:function(r,n,t){function e(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}t.d(n,{A:function(){return e}})},9394:function(r,n,t){t.d(n,{A:function(){return a}});var e=t(4243),o=t(3893),u=t(7800),i=t(519);function a(r){return(0,e.A)(r)||(0,o.A)(r)||(0,u.A)(r)||(0,i.A)()}},2327:function(r,n,t){t.d(n,{A:function(){return o}});var e=t(2284);function o(r,n){if("object"!=(0,e.A)(r)||!r)return r;var t=r[Symbol.toPrimitive];if(void 0!==t){var o=t.call(r,n||"default");if("object"!=(0,e.A)(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===n?String:Number)(r)}},9922:function(r,n,t){t.d(n,{A:function(){return u}});var e=t(2284),o=t(2327);function u(r){var n=(0,o.A)(r,"string");return"symbol"==(0,e.A)(n)?n:n+""}},2284:function(r,n,t){function e(r){return e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(r){return typeof r}:function(r){return r&&"function"==typeof Symbol&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},e(r)}t.d(n,{A:function(){return e}})},7800:function(r,n,t){t.d(n,{A:function(){return o}});var e=t(3145);function o(r,n){if(r){if("string"==typeof r)return(0,e.A)(r,n);var t={}.toString.call(r).slice(8,-1);return"Object"===t&&r.constructor&&(t=r.constructor.name),"Map"===t||"Set"===t?Array.from(r):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?(0,e.A)(r,n):void 0}}}},o={};function u(r){var n=o[r];if(void 0!==n)return n.exports;var t=o[r]={exports:{}};return e[r](t,t.exports,u),t.exports}u.n=function(r){var n=r&&r.__esModule?function(){return r.default}:function(){return r};return u.d(n,{a:n}),n},u.d=function(r,n){for(var t in n)u.o(n,t)&&!u.o(r,t)&&Object.defineProperty(r,t,{enumerable:!0,get:n[t]})},u.o=function(r,n){return Object.prototype.hasOwnProperty.call(r,n)},u.r=function(r){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(r,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(r,"__esModule",{value:!0})},r=u(4416),t=(n=wp.data).registerStore,(0,n.select)(r.M)||t(r.M,r.$)}();