vare;!function(e,t){"object"==typeofexports&&"object"==typeofmodule?module.exports=t():"function"==typeofdefine&&define.amd?define([],t):"object"==typeofexports?exports.OptimalSelect=t():e.OptimalSelect=t()}(this,function(){returnfunction(r){vari={};functionn(e){if(i[e])returni[e].exports;vart=i[e]={i:e,l:!1,exports:{}};returnr[e].call(t.exports,t,t.exports,n),t.l=!0,t.exports}returnn.m=r,n.c=i,n.i=function(e){returne},n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{configurable:!1,enumerable:!0,get:r})},n.n=function(e){vart=e&&e.__esModule?function(){returne.default}:function(){returne};returnn.d(t,"a",t),t},n.o=function(e,t){returnObject.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=6)}([function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.convertNodeList=function(e){for(vart=e.length,r=newArray(t),i=0;i<t;i++)r[i]=e[i];returnr},t.escapeValue=function(e){returne&&e.replace(/['"`\\/:\?&!#$%^()[\]{|}*+;,.<=>@~]/g,"\\$&").replace(/\n/g,"A")}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getCommonAncestor=function(e){vart=(1<arguments.length&&void0!==arguments[1]?arguments[1]:{}).root,i=void0===t?document:t,n=[];e.forEach(function(e,t){for(varr=[];e!==i;)e=e.parentNode,r.unshift(e);n[t]=r}),n.sort(function(e,t){returne.length-t.length});for(varr=n.shift(),o=null,a=function(){vart=r[s],e=n.some(function(e){return!e.some(function(e){returne===t})});if(e)return"break";o=t},s=0,u=r.length;s<u;s++){varc=a();if("break"===c)break}returno},t.getCommonProperties=function(e){varl={classes:[],attributes:{},tag:null};returne.forEach(function(e){varn,i,t,r,o=l.classes,a=l.attributes,s=l.tag;if(void0!==o){varu=e.getAttribute("class");u?(u=u.trim().split(" "),o.length?(o=o.filter(function(t){returnu.some(function(e){returne===t})})).length?l.classes=o:deletel.classes:l.classes=u):deletel.classes}if(void0!==a&&(n=e.attributes,i=Object.keys(n).reduce(function(e,t){varr=n[t],i=r.name;returnr&&"class"!==i&&(e[i]=r.value),e},{}),t=Object.keys(i),r=Object.keys(a),t.length?r.length?(a=r.reduce(function(e,t){varr=a[t];returnr===i[t]&&(e[t]=r),e},{}),Object.keys(a).length?l.attributes=a:deletel.attributes):l.attributes=i:deletel.attributes),void0!==s){varc=e.tagName.toLowerCase();s?c!==s&&deletel.tag:l.tag=c}}),l}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){varr=2<arguments.length&&void0!==arguments[2]?arguments[2]:{};Array.isArray(t)||(t=t.length?(0,f.convertNodeList)(t):[t]);if(!t.length||t.some(function(e){return1!==e.nodeType}))thrownewError('Invalid input - to compare HTMLElements its necessary to provide a reference of the selected node(s)! (missing "elements")');(0,l.default)(t[0],r);vari=e.replace(/> /g,">").split(/\s+(?=(?:(?:[^"]*"){2})*[^"]*$)/);if(i.length<2)returnh("",e,"",t);varn=[i.pop()];for(;1<i.length;){varo=i.pop(),a=i.join(" "),s=n.join(" "),u=a+" "+s,c=document.querySelectorAll(u);c.length!==t.length&&n.unshift(h(a,o,s,t))}n.unshift(i[0]),(i=n)[0]=h("",i[0],i.slice(1).join(" "),t),i[i.length-1]=h(i.slice(0,-1).join(" "),i[i.length-1],"",t);returni.join(" ").replace(/>/g,"> ").trim()};vari,n=r(3),l=(i=n)&&i.__esModule?i:{default:i},f=r(0);functionh(r,i,n,o){if(r.length&&(r+=" "),n.length&&(n=" "+n),/\[*\]/.test(i)){vare=i.replace(/=.*$/,"]"),a=""+r+e+n;if(m(document.querySelectorAll(a),o))i=e;elsefor(vars=document.querySelectorAll(""+r+e),t=function(){vart=s[u];if(o.some(function(e){returnt.contains(e)})){vare=t.tagName.toLowerCase();returna=""+r+e+n,m(document.querySelectorAll(a),o)&&(i=e),"break"}},u=0,c=s.length;u<c;u++){if("break"===t())break}}if(/>/.test(i)){varl=i.replace(/>/,"");a=""+r+l+n;m(document.querySelectorAll(a),o)&&(i=l)}if(/:nth-child/.test(i)){varf=i.replace(/nth-child/g,"nth-of-type");a=""+r+f+n;m(document.querySelectorAll(a),o)&&(i=f)}if(/\.\S+\.\S+/.test(i)){for(varh=i.trim().split(".").slice(1).map(function(e){return"."+e}).sort(function(e,t){returne.length-t.length});h.length;){vard=i.replace(h.shif