forked from aptyInc/optimal-select
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathoptimal-select.min.js
2 lines (2 loc) · 38.7 KB
/
optimal-select.min.js
1
2
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.OptimalSelect=t():e.OptimalSelect=t()}(this,function(){return function(e){function t(r){if(n[r])return n[r].exports;var o=n[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,t),o.l=!0,o.exports}var n={};return t.m=e,t.c=n,t.i=function(e){return e},t.d=function(e,n,r){t.o(e,n)||Object.defineProperty(e,n,{configurable:!1,enumerable:!0,get:r})},t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,"a",n),n},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="",t(t.s=8)}([function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(e,t){var n=[],r=!0,o=!1,i=void 0;try{for(var u,a=e[Symbol.iterator]();!(r=(u=a.next()).done)&&(n.push(u.value),!t||n.length!==t);r=!0);}catch(e){o=!0,i=e}finally{try{!r&&a.return&&a.return()}finally{if(o)throw i}}return n}return function(t,n){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return e(t,n);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}();t.convertNodeList=function(e){for(var t=e.length,n=new Array(t),r=0;r<t;r++)n[r]=e[r];return n},t.escapeValue=function(e){return e&&e.replace(/['"`\\/:?&!#$%^()[\]{|}*+;,.<=>@~]/g,"\\$&").replace(/\n/g," ")},t.partition=function(e,t){return e.reduce(function(e,n){var o=r(e,2),i=o[0],u=o[1];return t(n)?[i.concat(n),u]:[i,u.concat(n)]},[[],[]])},t.isValidCSSIdentifier=function(e){return!!e&&!/(^\d)|(^--)|(^-\d)/.test(e)&&!/([^\\]|^)['"`/:?&!#$%^()[\]{|}*+;,.<=>@~]/.test(e)}},function(e,t,n){"use strict";function r(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t<e.length;t++)n[t]=e[t];return n}return Array.from(e)}function o(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];t=f(t);var r=t,o=r.root,i=r.skip,u=r.ignore,s=r.format,p=[],h=e,g=p.length,v=(0,l.getSelect)(t),y=(0,a.getToString)(t),N=i&&(Array.isArray(i)?i:[i]).map(function(e){return"function"!=typeof e?function(t){return t===e}:e}),A=function(e){return i&&N.some(function(t){return t(e)})};for(Object.keys(u).forEach(function(e){var t=u[e];"function"!=typeof t&&("number"==typeof t&&(t=t.toString()),"string"==typeof t&&(t=new RegExp((0,c.escapeValue)(t).replace(/\\/g,"\\\\"))),"boolean"==typeof t&&(t=t?/(?:)/:/.^/),u[e]=function(e,n){return t.test(n)})});h!==o&&11!==h.nodeType;){if(!0!==A(h)){if(d(h,p,t,v,y,o))break;if(m(h,p,t,v,y,o))break;d(h,p,t,v,y),p.length===g&&m(h,p,t,v,y),p.length===g&&[1,"xpath"].includes(s)&&!n&&h===e&&w(h,p,t,v,y),p.length===g&&[1,"xpath","jquery"].includes(s)&&S(h,p,t,v,y,"jquery"===s),p.length===g&&b(h,p,t)}h=h.parentNode,g=p.length}if(h===o){var T=x(h,t,v,y);p.unshift(T)}return p}Object.defineProperty(t,"__esModule",{value:!0}),t.checkIgnore=t.combinations=t.initOptions=t.defaultIgnore=void 0;var i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},u=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e};t.default=o;var a=n(2),l=n(3),c=n(0),s=t.defaultIgnore={attribute:function(e){return["style","data-reactid","data-react-checksum"].indexOf(e)>-1},contains:function(){return!0}},f=t.initOptions=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return u({},e,{root:e.root||document,skip:e.skip||null,priority:e.priority||["id","class","href","src"],ignore:e.ignore||{}})},d=function(e,t,n,r,o){var i=n.priority,u=n.ignore,a=arguments.length>5&&void 0!==arguments[5]?arguments[5]:e.parentNode,l=v(i,e,u,r,o,a);return!!l&&(t.unshift(l),!0)},p=t.combinations=function(e,t){var n=t||{},r=n.min,o=n.max,i=[[]];return e.forEach(function(e){i.forEach(function(t){(!o||t.length<o)&&i.push(t.concat(e))})}),i.shift(),r?i.filter(function(e){return e.length>=r}):i},h=[{items:13,max:1},{items:10,max:2},{items:8,max:3},{items:5,max:4}],g=function(){for(var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments[1],n=arguments[2],r=arguments[3],o=arguments[4],i=h.find(function(t){var n=t.items;return e.length>n})||{max:e.length},a=i.max,l=p(e,{max:a}),c=0;c<l.length;c++){if(1===t(n.pattern(u({},o,{classes:l[c]})),r).length)return l[c]}return null},v=function(e,t,n,o,u){var l=arguments.length>5&&void 0!==arguments[5]?arguments[5]:t.parentNode,f=t.attributes,d=Object.keys(f).map(function(e){return f[e].name}).filter(function(t){return e.indexOf(t)<0}),p=[].concat(r(e),r(d)),h=(0,a.createPattern)();h.tag=t.tagName.toLowerCase();for(var v=function(e){return 1===o(u.pattern(e),l).length},m=0,y=p.length;m<y;m++){var b=p[m],S=f[b],w=(0,c.escapeValue)(S&&S.name),x=(0,c.escapeValue)(S&&S.value),A="class"!==w,T=A&&n[w]||n.attribute,C=A&&s[w]||s.attribute;if(!N(T,w,x,C))switch(w){case"class":var E=function(){var e=x.trim().split(/\s+/g);if(!e[0])return"break";var t=n.class||s.class;if(t&&(e=e.filter(function(e){return!t(e)})),e.length>0){var r=g(e,o,u,l,h);if(r&&(h.classes=r,v(h)))return{v:h}}}();switch(E){case"break":break;default:if("object"===(void 0===E?"undefined":i(E)))return E.v}break;default:if(h.attributes.push({name:w,value:x}),v(h))return h}}return null},m=function(e,t,n,r,o){var i=n.ignore,u=arguments.length>5&&void 0!==arguments[5]?arguments[5]:e.parentNode,a=y(e,i);if(a){var l=[];if(l=r(o.pattern(a),u),1===l.length)return t.unshift(a),"iframe"!==a.tag}return!1},y=function(e,t){var n=e.tagName.toLowerCase();if(N(t.tag,null,n))return null;var r=(0,a.createPattern)();return r.tag=n,r},b=function(e,t,n){for(var r=n.ignore,o=e.parentNode,i=o.children,u=0,a=i.length;u<a;u++){var l=i[u];if(l===e){var c=y(l,r);return c?(c.relates="child",c.pseudo=["nth-child("+(u+1)+")"],t.unshift(c),!0):console.warn("\n Element couldn't be matched through strict ignore pattern!\n ",l,r,c)}}return!1},S=function(e,t,n,r,o,i){var a=n.ignore,l=y(e,a);if(!l)return!1;var c=i?e.textContent:e.firstChild&&e.firstChild.nodeValue||"";if(!c)return!1;l.relates="child";for(var f=e.parentNode,d=c.replace(/\n+/g,"\n").split("\n").map(function(e){return e.trim()}).filter(function(e){return e.length>0}),p=[];d.length>0;){var h=d.shift();if(N(a.contains,null,h,s.contains))break;p.push('contains("'+h+'")');var g=r(o.pattern(u({},l,{pseudo:p})),f);if(1===g.length)return l.pseudo=p,t.unshift(l),!0;if(0===g.length)return!1}return!1},w=function(e,t,n,r,i){var a=y(e,n.ignore);if(!a)return!1;for(var l=Array.from(e.querySelectorAll("*"));l.length>0;){var c=o(l.shift(),u({},n,{root:e}),!0);if(!c.some(function(e){return e.pseudo.some(function(e){return e.startsWith("nth-child")})})){var s=e.parentElement;if(1===r(i.pattern(u({},a,{descendants:[c]})),s).length)return a.descendants=[c],t.unshift(a),!0}}return!1},x=function(e,t,n,r){var o=t.priority,i=t.ignore,u=v(o,e,i,n,r);return u||(u=y(e,i)),u},N=t.checkIgnore=function(e,t,n,r){if(!n)return!0;var o=e||r;return!!o&&o(t,n,r)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getToString=t.descendantsToXPath=t.pathToXPath=t.patternToXPath=t.pseudoToXPath=t.classesToXPath=t.attributesToXPath=t.pathToSelector=t.patternToSelector=t.pseudoToSelector=t.classesToSelector=t.attributesToSelector=t.createPattern=void 0;var r=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},o=n(0),i=(t.createPattern=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return r({attributes:[],classes:[],pseudo:[],descendants:[]},e)},t.attributesToSelector=function(e){return e.map(function(e){var t=e.name,n=e.value;return null===n?"["+t+"]":"id"===t&&(0,o.isValidCSSIdentifier)(n)?"#"+n:"["+t+'="'+n+'"]'}).join("")}),u=t.classesToSelector=function(e){return e.map(function(e){return(0,o.isValidCSSIdentifier)(e)?"."+e:'[class~="'+e+'"]'}).join("")},a=t.pseudoToSelector=function(e){return e.length?":"+e.join(":"):""},l=t.patternToSelector=function(e){var t=e.relates,n=e.tag,r=e.attributes,o=e.classes,l=e.pseudo;return("child"===t?"> ":"")+(n||"")+i(r)+u(o)+a(l)},c=t.pathToSelector=function(e){return e.map(l).join(" ")},s=function(e){return e&&e.replace(/\\([`\\/:?&!#$%^()[\]{|}*+;,.<=>@~])/g,"$1").replace(/\\(['"])/g,"$1$1").replace(/\\A /g,"\n")},f=t.attributesToXPath=function(e){return e.map(function(e){var t=e.name,n=e.value;return null===n?"[@"+t+"]":"[@"+t+'="'+s(n)+'"]'}).join("")},d=t.classesToXPath=function(e){return e.map(function(e){return'[contains(concat(" ",normalize-space(@class)," ")," '+e+' ")]'}).join("")},p=t.pseudoToXPath=function(e){return e.map(function(e){var t=e.match(/^(nth-child|nth-of-type|contains)\((.+)\)$/);if(!t)return"";switch(t[1]){case"nth-child":return"[(count(preceding-sibling::*)+1) = "+t[2]+"]";case"nth-of-type":return"["+t[2]+"]";case"contains":return"[contains(text(),"+t[2]+")]";default:return""}}).join("")},h=t.patternToXPath=function(e){var t=e.relates,n=e.tag,r=e.attributes,o=e.classes,i=e.pseudo,u=e.descendants;return("child"===t?"/":"//")+(n||"*")+f(r)+d(o)+p(i)+v(u)},g=t.pathToXPath=function(e){return"."+e.map(h).join("")},v=t.descendantsToXPath=function(e){return e.length?"["+e.map(g).join("][")+"]":""},m={css:{attributes:i,classes:u,pseudo:a,pattern:l,path:c},xpath:{attributes:f,classes:d,pseudo:p,pattern:h,path:g},jquery:{}};m.jquery=m.css,m[0]=m.css,m[1]=m.xpath;t.getToString=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return m[e.format||"css"]}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=void 0,o=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return r||(r=n(7)),r(e,t||document)},i=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;t=t||document;for(var n=t;n.parentNode;)n=n.parentNode;n===t||e.startsWith(".")||(e="."+e);for(var r,o=n.evaluate(e,t,null,0),i=[];r=o.iterateNext();)i.push(r);return i},u=function(e){return((arguments.length>1&&void 0!==arguments[1]?arguments[1]:null)||document).querySelectorAll(e)},a={css:u,xpath:i,jquery:o};a[0]=a.css,a[1]=a.xpath;t.getSelect=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return function(t,n){try{return a[e.format||"css"](t,n||e.root)}catch(e){return[]}}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getCommonProperties=t.getCommonAncestor=void 0;var r=n(1),o=n(0);t.getCommonAncestor=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.root,r=void 0===n?document:n,o=[];e.forEach(function(e,t){for(var n=[];e!==r;)e=e.parentNode,n.unshift(e);o[t]=n}),o.sort(function(e,t){return e.length-t.length});for(var i=o.shift(),u=null,a=function(){var e=i[l];if(o.some(function(t){return!t.some(function(t){return t===e})}))return"break";u=e},l=0,c=i.length;l<c;l++){if("break"===a())break}return u},t.getCommonProperties=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.ignore,i=void 0===n?{}:n,u={classes:[],attributes:{},tag:null};return e.forEach(function(e){var t=u.classes,n=u.attributes,a=u.tag;if(void 0!==t){var l=e.getAttribute("class");l?(l=l.trim().split(" ").filter(function(e){return!i.class||!i.class(e)}),t.length?(t=t.filter(function(e){return l.some(function(t){return t===e})}),t.length?u.classes=t:delete u.classes):u.classes=l):delete u.classes}if(void 0!==n){var c=e.attributes,s=Object.keys(c).reduce(function(e,t){var n=c[t],u=(0,o.escapeValue)(n&&n.name),a=(0,o.escapeValue)(n&&n.value),l="class"!==u,s=l&&i[u]||i.attribute,f=l&&r.defaultIgnore[u]||r.defaultIgnore.attribute;return n&&"class"!==u&&!(0,r.checkIgnore)(s,u,a,f)&&(e[u]=n.value),e},{}),f=Object.keys(s),d=Object.keys(n);f.length?d.length?(n=d.reduce(function(e,t){var r=n[t];return r===s[t]&&(e[t]=r),e},{}),Object.keys(n).length?u.attributes=n:delete u.attributes):u.attributes=s:delete u.attributes}if(void 0!==a){var p=e.tagName.toLowerCase();a?p!==a&&delete u.tag:u.tag=p}}),u}},function(e,t,n){"use strict";function r(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t<e.length;t++)n[t]=e[t];return n}return Array.from(e)}function o(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(0===e.length)return[];if("child"===e[0].relates&&(e[0].relates=void 0),Array.isArray(t)||(t=t.length?(0,c.convertNodeList)(t):[t]),!t.length||t.some(function(e){return 1!==e.nodeType}))throw new Error('Invalid input - to compare HTMLElements its necessary to provide a reference of the selected node(s)! (missing "elements")');var o=(0,a.getSelect)(n),i=(0,l.getToString)(n);if(1===e.length)return[m([],e[0],[],t,o,i)];var u=!1;"child"===e[e.length-1].relates&&(e[e.length-1]=m(e.slice(0,-1),e[e.length-1],[],t,o,i),u=!0),e=[].concat(r(e));for(var s=[e.pop()],f=function(){var n=e.pop(),u=o(i.path([].concat(r(e),s)));u.length===t.length&&t.every(function(e,t){return e===u[t]})||s.unshift(m(e,n,s,t,o,i))};e.length>1;)f();return s.unshift(e[0]),e=s,e[0]=m([],e[0],e.slice(1),t,o,i),u||(e[e.length-1]=m(e.slice(0,-1),e[e.length-1],[],t,o,i)),e}Object.defineProperty(t,"__esModule",{value:!0}),t.compareResults=void 0;var i=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},u=function(){function e(e,t){var n=[],r=!0,o=!1,i=void 0;try{for(var u,a=e[Symbol.iterator]();!(r=(u=a.next()).done)&&(n.push(u.value),!t||n.length!==t);r=!0);}catch(e){o=!0,i=e}finally{try{!r&&a.return&&a.return()}finally{if(o)throw i}}return n}return function(t,n){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return e(t,n);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}();t.default=o;var a=n(3),l=n(2),c=n(0),s=function(e,t,n,o,a,l){var s=(0,c.partition)(t.pseudo,function(e){return e.startsWith("contains")}),f=u(s,2),d=f[0],p=f[1];if(d.length>0&&n.length){for(var h=i({},t,{pseudo:[].concat(r(p),r(d))});h.pseudo.length>p.length;){var g=h.pseudo.slice(0,-1);if(!y(a(l.path([].concat(r(e),[i({},h,{pseudo:g})],r(n)))),o))break;h.pseudo=g}return h}return t},f=function(e,t,n,o,u,a){if(t.attributes.length>0){var l=[].concat(r(t.attributes)),c=function(l,c){for(var s=l.length-1;s>=0;){var f=c(l,s);if(!y(u(a.path([].concat(r(e),[i({},t,{attributes:f})],r(n)))),o))break;s--,l=f}return l},s=c(l,function(e,t){var n=e[t].name;return"id"===n?e:[].concat(r(e.slice(0,t)),[{name:n,value:null}],r(e.slice(t+1)))});return i({},t,{attributes:c(s,function(e){return e.slice(0,-1)})})}return t},d=function(e,t,n,o,u,a){if("child"===t.relates){var l=i({},t,{relates:void 0}),c=u(a.path([].concat(r(e),[l],r(n))));if(y(c,o))return l}return t},p=function(e,t,n,o,u,a){if(t.descendants.length>0&&n.length){for(var l=i({},t,{descendants:[].concat(r(t.descendants))});l.descendants.length>0;){var c=l.descendants.slice(0,-1);if(!y(u(a.path([].concat(r(e),[i({},l,{descendants:c})],r(n)))),o))break;l.descendants=c}return l}return t},h=function(e,t,n,o,u,a){var l=t.pseudo.findIndex(function(e){return e.startsWith("nth-child")});if(l>=0){var c=t.pseudo[l].replace(/^nth-child/,"nth-of-type"),s=i({},t,{pseudo:[].concat(r(t.pseudo.slice(0,l)),[c],r(t.pseudo.slice(l+1)))}),f=a.path([].concat(r(e),[s],r(n))),d=u(f);if(y(d,o))return s}return t},g=function(e,t,n,o,u,a){if(t.classes.length>1){for(var c=t.classes.slice().sort(function(e,t){return e.length-t.length});c.length>1;){c.shift();var s=a.path([].concat(r(e),[i({},t,{classes:c})],r(n)));if(!y(u(s),o))break;t.classes=c}if(c=t.classes,c.length>2)for(var f=(0,l.createPattern)({classes:c}),d=u(a.path([].concat(r(e),[f]))),p=function(){var i=d[h];if(o.some(function(e){return i.contains(e)})){var c=(0,l.createPattern)({tag:i.tagName});return g=a.path([].concat(r(e),[c],r(n))),v=u(g),y(v,o)&&(t=c),"break"}},h=0;h<d.length;h++){var g,v,m=p();if("break"===m)break}}return t},v=[s,f,d,p,h,g],m=function(e,t,n,r,o,i){return v.reduce(function(t,u){return u(e,t,n,r,o,i)},t)},y=t.compareResults=function(e,t){var n=e.length;return n===t.length&&t.every(function(t){for(var r=0;r<n;r++)if(e[r]===t)return!0;return!1})}},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t<e.length;t++)n[t]=e[t];return n}return Array.from(e)}function i(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=e.length&&!e.name?v(e,t):g(e,t);return Array.isArray(n)&&n.length>0&&n[0]instanceof HTMLElement?n.map(function(e){return i(e,t)}).join(","):(0,h.getToString)(t).path(n)}Object.defineProperty(t,"__esModule",{value:!0}),t.getMultiSelectorPath=t.getSingleSelectorPath=void 0;var u="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};t.default=i;var a=n(1),l=r(a),c=n(5),s=r(c),f=n(0),d=n(4),p=n(3),h=n(2),g=t.getSingleSelectorPath=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(3===e.nodeType&&(e=e.parentNode),1!==e.nodeType)throw new Error('Invalid input - only HTMLElements or representations of them are supported! (not "'+(void 0===e?"undefined":u(e))+'")');var n=(0,l.default)(e,t);return(0,s.default)(n,e,t)},v=t.getMultiSelectorPath=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(Array.isArray(e)||(e=(0,f.convertNodeList)(e)),e.some(function(e){return 1!==e.nodeType}))throw new Error("Invalid input - only an Array of HTMLElements or representations of them is supported!");var n=(0,p.getSelect)(t),r=(0,h.getToString)(t),i=(0,d.getCommonAncestor)(e,t),u=(0,l.default)(i,t),a=m(e,t),c=a[0],g=(0,s.default)([].concat(o(u),[c]),e,t),v=(0,f.convertNodeList)(n(r.path(g)));return e.every(function(e){return v.some(function(t){return t===e})})?g:(console.warn("\n The selected elements can't be efficiently mapped.\n Its probably best to use multiple single selectors instead!\n "),e)},m=function(e,t){var n=(0,d.getCommonProperties)(e,t),r=n.classes,o=n.attributes,i=n.tag;return[(0,h.createPattern)({tag:i,classes:r||[],attributes:o?Object.keys(o).map(function(e){return{name:(0,f.escapeValue)(e),value:(0,f.escapeValue)(o[e])}}):[]})]}},function(e,t,n){"use strict";var r;!function(o){function i(e,t,n,r){var o,i,u,a,l,c,s,f=t&&t.ownerDocument,d=t?t.nodeType:9;if(n=n||[],"string"!=typeof e||!e||1!==d&&9!==d&&11!==d)return n;if(!r&&(M(t),t=t||B,$)){if(11!==d&&(l=Ne.exec(e)))if(o=l[1]){if(9===d){if(!(u=t.getElementById(o)))return n;if(u.id===o)return n.push(u),n}else if(f&&(u=f.getElementById(o))&&z(t,u)&&u.id===o)return n.push(u),n}else{if(l[2])return re.apply(n,t.getElementsByTagName(e)),n;if((o=l[3])&&C.getElementsByClassName&&t.getElementsByClassName)return re.apply(n,t.getElementsByClassName(o)),n}if(C.qsa&&!Q[e+" "]&&(!_||!_.test(e))&&(1!==d||"object"!==t.nodeName.toLowerCase())){if(s=e,f=t,1===d&&(ge.test(e)||he.test(e))){for(f=Ae.test(e)&&g(t.parentNode)||t,f===t&&C.scope||((a=t.getAttribute("id"))?a=a.replace(Ee,Pe):t.setAttribute("id",a=F)),c=j(e),i=c.length;i--;)c[i]=(a?"#"+a:":scope")+" "+m(c[i]);s=c.join(",")}try{return re.apply(n,f.querySelectorAll(s)),n}catch(t){Q(e,!0)}finally{a===F&&t.removeAttribute("id")}}}return D(e.replace(de,"$1"),t,n,r)}function u(){function e(n,r){return t.push(n+" ")>E.cacheLength&&delete e[t.shift()],e[n+" "]=r}var t=[];return e}function a(e){return e[F]=!0,e}function l(e){var t=B.createElement("fieldset");try{return!!e(t)}catch(e){return!1}finally{t.parentNode&&t.parentNode.removeChild(t),t=null}}function c(e,t){for(var n=e.split("|"),r=n.length;r--;)E.attrHandle[n[r]]=t}function s(e,t){var n=t&&e,r=n&&1===e.nodeType&&1===t.nodeType&&e.sourceIndex-t.sourceIndex;if(r)return r;if(n)for(;n=n.nextSibling;)if(n===t)return-1;return e?1:-1}function f(e){return function(t){return"input"===t.nodeName.toLowerCase()&&t.type===e}}function d(e){return function(t){var n=t.nodeName.toLowerCase();return("input"===n||"button"===n)&&t.type===e}}function p(e){return function(t){return"form"in t?t.parentNode&&!1===t.disabled?"label"in t?"label"in t.parentNode?t.parentNode.disabled===e:t.disabled===e:t.isDisabled===e||t.isDisabled!==!e&&je(t)===e:t.disabled===e:"label"in t&&t.disabled===e}}function h(e){return a(function(t){return t=+t,a(function(n,r){for(var o,i=e([],n.length,t),u=i.length;u--;)n[o=i[u]]&&(n[o]=!(r[o]=n[o]))})})}function g(e){return e&&void 0!==e.getElementsByTagName&&e}function v(){}function m(e){for(var t=0,n=e.length,r="";t<n;t++)r+=e[t].value;return r}function y(e,t,n){var r=t.dir,o=t.next,i=o||r,u=n&&"parentNode"===i,a=U++;return t.first?function(t,n,o){for(;t=t[r];)if(1===t.nodeType||u)return e(t,n,o);return!1}:function(t,n,l){var c,s,f,d=[G,a];if(l){for(;t=t[r];)if((1===t.nodeType||u)&&e(t,n,l))return!0}else for(;t=t[r];)if(1===t.nodeType||u)if(f=t[F]||(t[F]={}),s=f[t.uniqueID]||(f[t.uniqueID]={}),o&&o===t.nodeName.toLowerCase())t=t[r]||t;else{if((c=s[i])&&c[0]===G&&c[1]===a)return d[2]=c[2];if(s[i]=d,d[2]=e(t,n,l))return!0}return!1}}function b(e){return e.length>1?function(t,n,r){for(var o=e.length;o--;)if(!e[o](t,n,r))return!1;return!0}:e[0]}function S(e,t,n){for(var r=0,o=t.length;r<o;r++)i(e,t[r],n);return n}function w(e,t,n,r,o){for(var i,u=[],a=0,l=e.length,c=null!=t;a<l;a++)(i=e[a])&&(n&&!n(i,r,o)||(u.push(i),c&&t.push(a)));return u}function x(e,t,n,r,o,i){return r&&!r[F]&&(r=x(r)),o&&!o[F]&&(o=x(o,i)),a(function(i,u,a,l){var c,s,f,d=[],p=[],h=u.length,g=i||S(t||"*",a.nodeType?[a]:a,[]),v=!e||!i&&t?g:w(g,d,e,a,l),m=n?o||(i?e:h||r)?[]:u:v;if(n&&n(v,m,a,l),r)for(c=w(m,p),r(c,[],a,l),s=c.length;s--;)(f=c[s])&&(m[p[s]]=!(v[p[s]]=f));if(i){if(o||e){if(o){for(c=[],s=m.length;s--;)(f=m[s])&&c.push(v[s]=f);o(null,m=[],c,l)}for(s=m.length;s--;)(f=m[s])&&(c=o?ie(i,f):d[s])>-1&&(i[c]=!(u[c]=f))}}else m=w(m===u?m.splice(h,m.length):m),o?o(null,u,m,l):re.apply(u,m)})}function N(e){for(var t,n,r,o=e.length,i=E.relative[e[0].type],u=i||E.relative[" "],a=i?1:0,l=y(function(e){return e===t},u,!0),c=y(function(e){return ie(t,e)>-1},u,!0),s=[function(e,n,r){var o=!i&&(r||n!==I)||((t=n).nodeType?l(e,n,r):c(e,n,r));return t=null,o}];a<o;a++)if(n=E.relative[e[a].type])s=[y(b(s),n)];else{if(n=E.filter[e[a].type].apply(null,e[a].matches),n[F]){for(r=++a;r<o&&!E.relative[e[r].type];r++);return x(a>1&&b(s),a>1&&m(e.slice(0,a-1).concat({value:" "===e[a-2].type?"*":""})).replace(de,"$1"),n,a<r&&N(e.slice(a,r)),r<o&&N(e=e.slice(r)),r<o&&m(e))}s.push(n)}return b(s)}function A(e,t){var n=t.length>0,r=e.length>0,o=function(o,u,a,l,c){var s,f,d,p=0,h="0",g=o&&[],v=[],m=I,y=o||r&&E.find.TAG("*",c),b=G+=null==m?1:Math.random()||.1,S=y.length;for(c&&(I=u==B||u||c);h!==S&&null!=(s=y[h]);h++){if(r&&s){for(f=0,u||s.ownerDocument==B||(M(s),a=!$);d=e[f++];)if(d(s,u||B,a)){l.push(s);break}c&&(G=b)}n&&((s=!d&&s)&&p--,o&&g.push(s))}if(p+=h,n&&h!==p){for(f=0;d=t[f++];)d(g,v,u,a);if(o){if(p>0)for(;h--;)g[h]||v[h]||(v[h]=te.call(l));v=w(v)}re.apply(l,v),c&&!o&&v.length>0&&p+t.length>1&&i.uniqueSort(l)}return c&&(G=b,I=m),g};return n?a(o):o}var T,C,E,P,O,j,L,D,I,k,q,M,B,R,$,_,H,V,z,F="sizzle"+1*new Date,X=o.document,G=0,U=0,W=u(),J=u(),K=u(),Q=u(),Y=function(e,t){return e===t&&(q=!0),0},Z={}.hasOwnProperty,ee=[],te=ee.pop,ne=ee.push,re=ee.push,oe=ee.slice,ie=function(e,t){for(var n=0,r=e.length;n<r;n++)if(e[n]===t)return n;return-1},ue="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",ae="[\\x20\\t\\r\\n\\f]",le="(?:\\\\[\\da-fA-F]{1,6}"+ae+"?|\\\\[^\\r\\n\\f]|[\\w-]|[^\0-\\x7f])+",ce="\\["+ae+"*("+le+")(?:"+ae+"*([*^$|!~]?=)"+ae+"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|("+le+"))|)"+ae+"*\\]",se=":("+le+")(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|"+ce+")*)|.*)\\)|)",fe=new RegExp(ae+"+","g"),de=new RegExp("^"+ae+"+|((?:^|[^\\\\])(?:\\\\.)*)"+ae+"+$","g"),pe=new RegExp("^"+ae+"*,"+ae+"*"),he=new RegExp("^"+ae+"*([>+~]|"+ae+")"+ae+"*"),ge=new RegExp(ae+"|>"),ve=new RegExp(se),me=new RegExp("^"+le+"$"),ye={ID:new RegExp("^#("+le+")"),CLASS:new RegExp("^\\.("+le+")"),TAG:new RegExp("^("+le+"|[*])"),ATTR:new RegExp("^"+ce),PSEUDO:new RegExp("^"+se),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+ae+"*(even|odd|(([+-]|)(\\d*)n|)"+ae+"*(?:([+-]|)"+ae+"*(\\d+)|))"+ae+"*\\)|)","i"),bool:new RegExp("^(?:"+ue+")$","i"),needsContext:new RegExp("^"+ae+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+ae+"*((?:-\\d)?\\d*)"+ae+"*\\)|)(?=[^-]|$)","i")},be=/HTML$/i,Se=/^(?:input|select|textarea|button)$/i,we=/^h\d$/i,xe=/^[^{]+\{\s*\[native \w/,Ne=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,Ae=/[+~]/,Te=new RegExp("\\\\[\\da-fA-F]{1,6}"+ae+"?|\\\\([^\\r\\n\\f])","g"),Ce=function(e,t){var n="0x"+e.slice(1)-65536;return t||(n<0?String.fromCharCode(n+65536):String.fromCharCode(n>>10|55296,1023&n|56320))},Ee=/([\0-\x1f\x7f]|^-?\d)|^-$|[^\0-\x1f\x7f-\uFFFF\w-]/g,Pe=function(e,t){return t?"\0"===e?"�":e.slice(0,-1)+"\\"+e.charCodeAt(e.length-1).toString(16)+" ":"\\"+e},Oe=function(){M()},je=y(function(e){return!0===e.disabled&&"fieldset"===e.nodeName.toLowerCase()},{dir:"parentNode",next:"legend"});try{re.apply(ee=oe.call(X.childNodes),X.childNodes),ee[X.childNodes.length].nodeType}catch(e){re={apply:ee.length?function(e,t){ne.apply(e,oe.call(t))}:function(e,t){for(var n=e.length,r=0;e[n++]=t[r++];);e.length=n-1}}}C=i.support={},O=i.isXML=function(e){var t=e&&e.namespaceURI,n=e&&(e.ownerDocument||e).documentElement;return!be.test(t||n&&n.nodeName||"HTML")},M=i.setDocument=function(e){var t,n,r=e?e.ownerDocument||e:X;return r!=B&&9===r.nodeType&&r.documentElement?(B=r,R=B.documentElement,$=!O(B),X!=B&&(n=B.defaultView)&&n.top!==n&&(n.addEventListener?n.addEventListener("unload",Oe,!1):n.attachEvent&&n.attachEvent("onunload",Oe)),C.scope=l(function(e){return R.appendChild(e).appendChild(B.createElement("div")),void 0!==e.querySelectorAll&&!e.querySelectorAll(":scope fieldset div").length}),C.attributes=l(function(e){return e.className="i",!e.getAttribute("className")}),C.getElementsByTagName=l(function(e){return e.appendChild(B.createComment("")),!e.getElementsByTagName("*").length}),C.getElementsByClassName=xe.test(B.getElementsByClassName),C.getById=l(function(e){return R.appendChild(e).id=F,!B.getElementsByName||!B.getElementsByName(F).length}),C.getById?(E.filter.ID=function(e){var t=e.replace(Te,Ce);return function(e){return e.getAttribute("id")===t}},E.find.ID=function(e,t){if(void 0!==t.getElementById&&$){var n=t.getElementById(e);return n?[n]:[]}}):(E.filter.ID=function(e){var t=e.replace(Te,Ce);return function(e){var n=void 0!==e.getAttributeNode&&e.getAttributeNode("id");return n&&n.value===t}},E.find.ID=function(e,t){if(void 0!==t.getElementById&&$){var n,r,o,i=t.getElementById(e);if(i){if((n=i.getAttributeNode("id"))&&n.value===e)return[i];for(o=t.getElementsByName(e),r=0;i=o[r++];)if((n=i.getAttributeNode("id"))&&n.value===e)return[i]}return[]}}),E.find.TAG=C.getElementsByTagName?function(e,t){return void 0!==t.getElementsByTagName?t.getElementsByTagName(e):C.qsa?t.querySelectorAll(e):void 0}:function(e,t){var n,r=[],o=0,i=t.getElementsByTagName(e);if("*"===e){for(;n=i[o++];)1===n.nodeType&&r.push(n);return r}return i},E.find.CLASS=C.getElementsByClassName&&function(e,t){if(void 0!==t.getElementsByClassName&&$)return t.getElementsByClassName(e)},H=[],_=[],(C.qsa=xe.test(B.querySelectorAll))&&(l(function(e){var t;R.appendChild(e).innerHTML="<a id='"+F+"'></a><select id='"+F+"-\r\\' msallowcapture=''><option selected=''></option></select>",e.querySelectorAll("[msallowcapture^='']").length&&_.push("[*^$]="+ae+"*(?:''|\"\")"),e.querySelectorAll("[selected]").length||_.push("\\["+ae+"*(?:value|"+ue+")"),e.querySelectorAll("[id~="+F+"-]").length||_.push("~="),t=B.createElement("input"),t.setAttribute("name",""),e.appendChild(t),e.querySelectorAll("[name='']").length||_.push("\\["+ae+"*name"+ae+"*="+ae+"*(?:''|\"\")"),e.querySelectorAll(":checked").length||_.push(":checked"),e.querySelectorAll("a#"+F+"+*").length||_.push(".#.+[+~]"),e.querySelectorAll("\\\f"),_.push("[\\r\\n\\f]")}),l(function(e){e.innerHTML="<a href='' disabled='disabled'></a><select disabled='disabled'><option/></select>";var t=B.createElement("input");t.setAttribute("type","hidden"),e.appendChild(t).setAttribute("name","D"),e.querySelectorAll("[name=d]").length&&_.push("name"+ae+"*[*^$|!~]?="),2!==e.querySelectorAll(":enabled").length&&_.push(":enabled",":disabled"),R.appendChild(e).disabled=!0,2!==e.querySelectorAll(":disabled").length&&_.push(":enabled",":disabled"),e.querySelectorAll("*,:x"),_.push(",.*:")})),(C.matchesSelector=xe.test(V=R.matches||R.webkitMatchesSelector||R.mozMatchesSelector||R.oMatchesSelector||R.msMatchesSelector))&&l(function(e){C.disconnectedMatch=V.call(e,"*"),V.call(e,"[s!='']:x"),H.push("!=",se)}),_=_.length&&new RegExp(_.join("|")),H=H.length&&new RegExp(H.join("|")),t=xe.test(R.compareDocumentPosition),z=t||xe.test(R.contains)?function(e,t){var n=9===e.nodeType?e.documentElement:e,r=t&&t.parentNode;return e===r||!(!r||1!==r.nodeType||!(n.contains?n.contains(r):e.compareDocumentPosition&&16&e.compareDocumentPosition(r)))}:function(e,t){if(t)for(;t=t.parentNode;)if(t===e)return!0;return!1},Y=t?function(e,t){if(e===t)return q=!0,0;var n=!e.compareDocumentPosition-!t.compareDocumentPosition;return n||(n=(e.ownerDocument||e)==(t.ownerDocument||t)?e.compareDocumentPosition(t):1,1&n||!C.sortDetached&&t.compareDocumentPosition(e)===n?e==B||e.ownerDocument==X&&z(X,e)?-1:t==B||t.ownerDocument==X&&z(X,t)?1:k?ie(k,e)-ie(k,t):0:4&n?-1:1)}:function(e,t){if(e===t)return q=!0,0;var n,r=0,o=e.parentNode,i=t.parentNode,u=[e],a=[t];if(!o||!i)return e==B?-1:t==B?1:o?-1:i?1:k?ie(k,e)-ie(k,t):0;if(o===i)return s(e,t);for(n=e;n=n.parentNode;)u.unshift(n);for(n=t;n=n.parentNode;)a.unshift(n);for(;u[r]===a[r];)r++;return r?s(u[r],a[r]):u[r]==X?-1:a[r]==X?1:0},B):B},i.matches=function(e,t){return i(e,null,null,t)},i.matchesSelector=function(e,t){if(M(e),C.matchesSelector&&$&&!Q[t+" "]&&(!H||!H.test(t))&&(!_||!_.test(t)))try{var n=V.call(e,t);if(n||C.disconnectedMatch||e.document&&11!==e.document.nodeType)return n}catch(e){Q(t,!0)}return i(t,B,null,[e]).length>0},i.contains=function(e,t){return(e.ownerDocument||e)!=B&&M(e),z(e,t)},i.attr=function(e,t){(e.ownerDocument||e)!=B&&M(e);var n=E.attrHandle[t.toLowerCase()],r=n&&Z.call(E.attrHandle,t.toLowerCase())?n(e,t,!$):void 0;return void 0!==r?r:C.attributes||!$?e.getAttribute(t):(r=e.getAttributeNode(t))&&r.specified?r.value:null},i.escape=function(e){return(e+"").replace(Ee,Pe)},i.error=function(e){throw new Error("Syntax error, unrecognized expression: "+e)},i.uniqueSort=function(e){var t,n=[],r=0,o=0;if(q=!C.detectDuplicates,k=!C.sortStable&&e.slice(0),e.sort(Y),q){for(;t=e[o++];)t===e[o]&&(r=n.push(o));for(;r--;)e.splice(n[r],1)}return k=null,e},P=i.getText=function(e){var t,n="",r=0,o=e.nodeType;if(o){if(1===o||9===o||11===o){if("string"==typeof e.textContent)return e.textContent;for(e=e.firstChild;e;e=e.nextSibling)n+=P(e)}else if(3===o||4===o)return e.nodeValue}else for(;t=e[r++];)n+=P(t);return n},E=i.selectors={cacheLength:50,createPseudo:a,match:ye,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(Te,Ce),e[3]=(e[3]||e[4]||e[5]||"").replace(Te,Ce),"~="===e[2]&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),"nth"===e[1].slice(0,3)?(e[3]||i.error(e[0]),e[4]=+(e[4]?e[5]+(e[6]||1):2*("even"===e[3]||"odd"===e[3])),e[5]=+(e[7]+e[8]||"odd"===e[3])):e[3]&&i.error(e[0]),e},PSEUDO:function(e){var t,n=!e[6]&&e[2];return ye.CHILD.test(e[0])?null:(e[3]?e[2]=e[4]||e[5]||"":n&&ve.test(n)&&(t=j(n,!0))&&(t=n.indexOf(")",n.length-t)-n.length)&&(e[0]=e[0].slice(0,t),e[2]=n.slice(0,t)),e.slice(0,3))}},filter:{TAG:function(e){var t=e.replace(Te,Ce).toLowerCase();return"*"===e?function(){return!0}:function(e){return e.nodeName&&e.nodeName.toLowerCase()===t}},CLASS:function(e){var t=W[e+" "];return t||(t=new RegExp("(^|"+ae+")"+e+"("+ae+"|$)"))&&W(e,function(e){return t.test("string"==typeof e.className&&e.className||void 0!==e.getAttribute&&e.getAttribute("class")||"")})},ATTR:function(e,t,n){return function(r){var o=i.attr(r,e);return null==o?"!="===t:!t||(o+="","="===t?o===n:"!="===t?o!==n:"^="===t?n&&0===o.indexOf(n):"*="===t?n&&o.indexOf(n)>-1:"$="===t?n&&o.slice(-n.length)===n:"~="===t?(" "+o.replace(fe," ")+" ").indexOf(n)>-1:"|="===t&&(o===n||o.slice(0,n.length+1)===n+"-"))}},CHILD:function(e,t,n,r,o){var i="nth"!==e.slice(0,3),u="last"!==e.slice(-4),a="of-type"===t;return 1===r&&0===o?function(e){return!!e.parentNode}:function(t,n,l){var c,s,f,d,p,h,g=i!==u?"nextSibling":"previousSibling",v=t.parentNode,m=a&&t.nodeName.toLowerCase(),y=!l&&!a,b=!1;if(v){if(i){for(;g;){for(d=t;d=d[g];)if(a?d.nodeName.toLowerCase()===m:1===d.nodeType)return!1;h=g="only"===e&&!h&&"nextSibling"}return!0}if(h=[u?v.firstChild:v.lastChild],u&&y){for(d=v,f=d[F]||(d[F]={}),s=f[d.uniqueID]||(f[d.uniqueID]={}),c=s[e]||[],p=c[0]===G&&c[1],b=p&&c[2],d=p&&v.childNodes[p];d=++p&&d&&d[g]||(b=p=0)||h.pop();)if(1===d.nodeType&&++b&&d===t){s[e]=[G,p,b];break}}else if(y&&(d=t,f=d[F]||(d[F]={}),s=f[d.uniqueID]||(f[d.uniqueID]={}),c=s[e]||[],p=c[0]===G&&c[1],b=p),!1===b)for(;(d=++p&&d&&d[g]||(b=p=0)||h.pop())&&((a?d.nodeName.toLowerCase()!==m:1!==d.nodeType)||!++b||(y&&(f=d[F]||(d[F]={}),s=f[d.uniqueID]||(f[d.uniqueID]={}),s[e]=[G,b]),d!==t)););return(b-=o)===r||b%r==0&&b/r>=0}}},PSEUDO:function(e,t){var n,r=E.pseudos[e]||E.setFilters[e.toLowerCase()]||i.error("unsupported pseudo: "+e);return r[F]?r(t):r.length>1?(n=[e,e,"",t],E.setFilters.hasOwnProperty(e.toLowerCase())?a(function(e,n){for(var o,i=r(e,t),u=i.length;u--;)o=ie(e,i[u]),e[o]=!(n[o]=i[u])}):function(e){return r(e,0,n)}):r}},pseudos:{not:a(function(e){var t=[],n=[],r=L(e.replace(de,"$1"));return r[F]?a(function(e,t,n,o){for(var i,u=r(e,null,o,[]),a=e.length;a--;)(i=u[a])&&(e[a]=!(t[a]=i))}):function(e,o,i){return t[0]=e,r(t,null,i,n),t[0]=null,!n.pop()}}),has:a(function(e){return function(t){return i(e,t).length>0}}),contains:a(function(e){return e=e.replace(Te,Ce),function(t){return(t.textContent||P(t)).indexOf(e)>-1}}),lang:a(function(e){return me.test(e||"")||i.error("unsupported lang: "+e),e=e.replace(Te,Ce).toLowerCase(),function(t){var n;do{if(n=$?t.lang:t.getAttribute("xml:lang")||t.getAttribute("lang"))return(n=n.toLowerCase())===e||0===n.indexOf(e+"-")}while((t=t.parentNode)&&1===t.nodeType);return!1}}),target:function(e){var t=o.location&&o.location.hash;return t&&t.slice(1)===e.id},root:function(e){return e===R},focus:function(e){return e===B.activeElement&&(!B.hasFocus||B.hasFocus())&&!!(e.type||e.href||~e.tabIndex)},enabled:p(!1),disabled:p(!0),checked:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&!!e.checked||"option"===t&&!!e.selected},selected:function(e){return e.parentNode&&e.parentNode.selectedIndex,!0===e.selected},empty:function(e){for(e=e.firstChild;e;e=e.nextSibling)if(e.nodeType<6)return!1;return!0},parent:function(e){return!E.pseudos.empty(e)},header:function(e){return we.test(e.nodeName)},input:function(e){return Se.test(e.nodeName)},button:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&"button"===e.type||"button"===t},text:function(e){var t;return"input"===e.nodeName.toLowerCase()&&"text"===e.type&&(null==(t=e.getAttribute("type"))||"text"===t.toLowerCase())},first:h(function(){return[0]}),last:h(function(e,t){return[t-1]}),eq:h(function(e,t,n){return[n<0?n+t:n]}),even:h(function(e,t){for(var n=0;n<t;n+=2)e.push(n);return e}),odd:h(function(e,t){for(var n=1;n<t;n+=2)e.push(n);return e}),lt:h(function(e,t,n){for(var r=n<0?n+t:n>t?t:n;--r>=0;)e.push(r);return e}),gt:h(function(e,t,n){for(var r=n<0?n+t:n;++r<t;)e.push(r);return e})}},E.pseudos.nth=E.pseudos.eq;for(T in{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})E.pseudos[T]=f(T);for(T in{submit:!0,reset:!0})E.pseudos[T]=d(T);v.prototype=E.filters=E.pseudos,E.setFilters=new v,j=i.tokenize=function(e,t){var n,r,o,u,a,l,c,s=J[e+" "];if(s)return t?0:s.slice(0);for(a=e,l=[],c=E.preFilter;a;){n&&!(r=pe.exec(a))||(r&&(a=a.slice(r[0].length)||a),l.push(o=[])),n=!1,(r=he.exec(a))&&(n=r.shift(),o.push({value:n,type:r[0].replace(de," ")}),a=a.slice(n.length));for(u in E.filter)!(r=ye[u].exec(a))||c[u]&&!(r=c[u](r))||(n=r.shift(),o.push({value:n,type:u,matches:r}),a=a.slice(n.length));if(!n)break}return t?a.length:a?i.error(e):J(e,l).slice(0)},L=i.compile=function(e,t){var n,r=[],o=[],i=K[e+" "];if(!i){for(t||(t=j(e)),n=t.length;n--;)i=N(t[n]),i[F]?r.push(i):o.push(i);i=K(e,A(o,r)),i.selector=e}return i},D=i.select=function(e,t,n,r){var o,i,u,a,l,c="function"==typeof e&&e,s=!r&&j(e=c.selector||e);if(n=n||[],1===s.length){if(i=s[0]=s[0].slice(0),i.length>2&&"ID"===(u=i[0]).type&&9===t.nodeType&&$&&E.relative[i[1].type]){if(!(t=(E.find.ID(u.matches[0].replace(Te,Ce),t)||[])[0]))return n;c&&(t=t.parentNode),e=e.slice(i.shift().value.length)}for(o=ye.needsContext.test(e)?0:i.length;o--&&(u=i[o],!E.relative[a=u.type]);)if((l=E.find[a])&&(r=l(u.matches[0].replace(Te,Ce),Ae.test(i[0].type)&&g(t.parentNode)||t))){if(i.splice(o,1),!(e=r.length&&m(i)))return re.apply(n,r),n;break}}return(c||L(e,s))(r,t,!$,n,!t||Ae.test(e)&&g(t.parentNode)||t),n},C.sortStable=F.split("").sort(Y).join("")===F,C.detectDuplicates=!!q,M(),C.sortDetached=l(function(e){return 1&e.compareDocumentPosition(B.createElement("fieldset"))}),l(function(e){return e.innerHTML="<a href='#'></a>","#"===e.firstChild.getAttribute("href")})||c("type|href|height|width",function(e,t,n){if(!n)return e.getAttribute(t,"type"===t.toLowerCase()?1:2)}),C.attributes&&l(function(e){return e.innerHTML="<input/>",e.firstChild.setAttribute("value",""),""===e.firstChild.getAttribute("value")})||c("value",function(e,t,n){if(!n&&"input"===e.nodeName.toLowerCase())return e.defaultValue}),l(function(e){return null==e.getAttribute("disabled")})||c(ue,function(e,t,n){var r;if(!n)return!0===e[t]?t.toLowerCase():(r=e.getAttributeNode(t))&&r.specified?r.value:null});var Le=o.Sizzle;i.noConflict=function(){return o.Sizzle===i&&(o.Sizzle=Le),i},void 0!==(r=function(){return i}.call(t,n,t,e))&&(e.exports=r)}(window)},function(e,t,n){"use strict";function r(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}function o(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0}),t.common=t.optimize=t.initOptions=t.match=t.getMultiSelector=t.getSingleSelector=t.select=void 0;var i=n(6);Object.defineProperty(t,"select",{enumerable:!0,get:function(){return o(i).default}}),Object.defineProperty(t,"getSingleSelector",{enumerable:!0,get:function(){return i.getSingleSelector}}),Object.defineProperty(t,"getMultiSelector",{enumerable:!0,get:function(){return i.getMultiSelector}});var u=n(1);Object.defineProperty(t,"match",{enumerable:!0,get:function(){return o(u).default}}),Object.defineProperty(t,"initOptions",{enumerable:!0,get:function(){return u.initOptions}});var a=n(5);Object.defineProperty(t,"optimize",{enumerable:!0,get:function(){return o(a).default}});var l=n(4),c=r(l);t.common=c}])});
//# sourceMappingURL=optimal-select.min.js.map