geno/wp-content/plugins/woocommerce/assets/js/selectWoo/selectWoo.min.js

8 lines
67 KiB
JavaScript
Raw Normal View History

2024-02-01 17:24:18 +05:30
/*!
* SelectWoo 1.0.10
* https://github.com/woocommerce/selectWoo
*
* Released under the MIT license
* https://github.com/woocommerce/selectWoo/blob/master/LICENSE.md
*/
!function(e){"function"==typeof define&&define.amd?define(["jquery"],e):"object"==typeof module&&module.exports?module.exports=function(t,n){return n===undefined&&(n="undefined"!=typeof window?require("jquery"):require("jquery")(t)),e(n),n}:e(jQuery)}(function(e){var t=function(){if(e&&e.fn&&e.fn.select2&&e.fn.select2.amd)var t=e.fn.select2.amd;var n,i,r;return t&&t.requirejs||(t?i=t:t={},function(e){var t,o,s,a,l={},c={},u={},d={},p=Object.prototype.hasOwnProperty,h=[].slice,f=/\.js$/;function g(e,t){return p.call(e,t)}function m(e,t){var n,i,r,o,s,a,l,c,d,p,h,g=t&&t.split("/"),m=u.map,v=m&&m["*"]||{};if(e){for(s=(e=e.split("/")).length-1,u.nodeIdCompat&&f.test(e[s])&&(e[s]=e[s].replace(f,"")),"."===e[0].charAt(0)&&g&&(e=g.slice(0,g.length-1).concat(e)),d=0;d<e.length;d++)if("."===(h=e[d]))e.splice(d,1),d-=1;else if(".."===h){if(0===d||1===d&&".."===e[2]||".."===e[d-1])continue;d>0&&(e.splice(d-1,2),d-=2)}e=e.join("/")}if((g||v)&&m){for(d=(n=e.split("/")).length;d>0;d-=1){if(i=n.slice(0,d).join("/"),g)for(p=g.length;p>0;p-=1)if((r=m[g.slice(0,p).join("/")])&&(r=r[i])){o=r,a=d;break}if(o)break;!l&&v&&v[i]&&(l=v[i],c=d)}!o&&l&&(o=l,a=c),o&&(n.splice(0,a,o),e=n.join("/"))}return e}function v(t,n){return function(){var i=h.call(arguments,0);return"string"!=typeof i[0]&&1===i.length&&i.push(null),o.apply(e,i.concat([t,n]))}}function y(e){return function(t){l[e]=t}}function _(n){if(g(c,n)){var i=c[n];delete c[n],d[n]=!0,t.apply(e,i)}if(!g(l,n)&&!g(d,n))throw new Error("No "+n);return l[n]}function $(e){var t,n=e?e.indexOf("!"):-1;return n>-1&&(t=e.substring(0,n),e=e.substring(n+1,e.length)),[t,e]}function w(e){return e?$(e):[]}s=function(e,t){var n,i,r=$(e),o=r[0],s=t[1];return e=r[1],o&&(n=_(o=m(o,s))),o?e=n&&n.normalize?n.normalize(e,(i=s,function(e){return m(e,i)})):m(e,s):(o=(r=$(e=m(e,s)))[0],e=r[1],o&&(n=_(o))),{f:o?o+"!"+e:e,n:e,pr:o,p:n}},a={require:function(e){return v(e)},exports:function(e){var t=l[e];return void 0!==t?t:l[e]={}},module:function(e){return{id:e,uri:"",exports:l[e],config:function(e){return function(){return u&&u.config&&u.config[e]||{}}}(e)}}},t=function(t,n,i,r){var o,u,p,h,f,m,$,b=[],A=typeof i;if(m=w(r=r||t),"undefined"===A||"function"===A){for(n=!n.length&&i.length?["require","exports","module"]:n,f=0;f<n.length;f+=1)if("require"===(u=(h=s(n[f],m)).f))b[f]=a.require(t);else if("exports"===u)b[f]=a.exports(t),$=!0;else if("module"===u)o=b[f]=a.module(t);else if(g(l,u)||g(c,u)||g(d,u))b[f]=_(u);else{if(!h.p)throw new Error(t+" missing "+u);h.p.load(h.n,v(r,!0),y(u),{}),b[f]=l[u]}p=i?i.apply(l[t],b):undefined,t&&(o&&o.exports!==e&&o.exports!==l[t]?l[t]=o.exports:p===e&&$||(l[t]=p))}else t&&(l[t]=i)},n=i=o=function(n,i,r,l,c){if("string"==typeof n)return a[n]?a[n](i):_(s(n,w(i)).f);if(!n.splice){if((u=n).deps&&o(u.deps,u.callback),!i)return;i.splice?(n=i,i=r,r=null):n=e}return i=i||function(){},"function"==typeof r&&(r=l,l=c),l?t(e,n,i,r):setTimeout(function(){t(e,n,i,r)},4),o},o.config=function(e){return o(e)},n._defined=l,(r=function(e,t,n){if("string"!=typeof e)throw new Error("See almond README: incorrect module build, no module name");t.splice||(n=t,t=[]),g(l,e)||g(c,e)||(c[e]=[e,t,n])}).amd={jQuery:!0}}(),t.requirejs=n,t.require=i,t.define=r),t.define("almond",function(){}),t.define("jquery",[],function(){var t=e||$;return null==t&&console&&console.error&&console.error("Select2: An instance of jQuery or a jQuery-compatible library was not found. Make sure that you are including jQuery before Select2 on your web page."),t}),t.define("select2/utils",["jquery"],function(e){var t={};function n(e){var t=e.prototype,n=[];for(var i in t){"function"==typeof t[i]&&("constructor"!==i&&n.push(i))}return n}t.Extend=function(e,t){var n={}.hasOwnProperty;function i(){this.constructor=e}for(var r in t)n.call(t,r)&&(e[r]=t[r]);return i.prototype=t.prototype,e.prototype=new i,e.__super__=t.prototype,e},t.Decorate=function(e,t){var i=n(t),r=n(e);function o(){var n=Array.prototype.unshift,i=t.prototype.constructor.length,r=e.prototype.constructor;i>0&&(n.call(arguments,e.prototype.constructor),r=t.prototype.con