-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathjquery_adapter.min.js
17 lines (17 loc) · 4.88 KB
/
jquery_adapter.min.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
/*
Sirius.js v1.3.3
(c) 2014-2020 fntz
license: MIT
*/
var $jscomp=$jscomp||{};$jscomp.scope={};$jscomp.arrayIteratorImpl=function(a){var b=0;return function(){return b<a.length?{done:!1,value:a[b++]}:{done:!0}}};$jscomp.arrayIterator=function(a){return{next:$jscomp.arrayIteratorImpl(a)}};$jscomp.makeIterator=function(a){var b="undefined"!=typeof Symbol&&Symbol.iterator&&a[Symbol.iterator];return b?b.call(a):$jscomp.arrayIterator(a)};$jscomp.arrayFromIterator=function(a){for(var b,c=[];!(b=a.next()).done;)c.push(b.value);return c};
$jscomp.arrayFromIterable=function(a){return a instanceof Array?a:$jscomp.arrayFromIterator($jscomp.makeIterator(a))};$jscomp.ASSUME_ES5=!1;$jscomp.ASSUME_NO_NATIVE_MAP=!1;$jscomp.ASSUME_NO_NATIVE_SET=!1;$jscomp.SIMPLE_FROUND_POLYFILL=!1;$jscomp.objectCreate=$jscomp.ASSUME_ES5||"function"==typeof Object.create?Object.create:function(a){var b=function(){};b.prototype=a;return new b};$jscomp.underscoreProtoCanBeSet=function(){var a={a:!0},b={};try{return b.__proto__=a,b.a}catch(c){}return!1};
$jscomp.setPrototypeOf="function"==typeof Object.setPrototypeOf?Object.setPrototypeOf:$jscomp.underscoreProtoCanBeSet()?function(a,b){a.__proto__=b;if(a.__proto__!==b)throw new TypeError(a+" is not extensible");return a}:null;
$jscomp.inherits=function(a,b){a.prototype=$jscomp.objectCreate(b.prototype);a.prototype.constructor=a;if($jscomp.setPrototypeOf){var c=$jscomp.setPrototypeOf;c(a,b)}else for(c in b)if("prototype"!=c)if(Object.defineProperties){var d=Object.getOwnPropertyDescriptor(b,c);d&&Object.defineProperty(a,c,d)}else a[c]=b[c];a.superClass_=b.prototype};
$jscomp.findInternal=function(a,b,c){a instanceof String&&(a=String(a));for(var d=a.length,e=0;e<d;e++){var f=a[e];if(b.call(c,f,e,a))return{i:e,v:f}}return{i:-1,v:void 0}};$jscomp.defineProperty=$jscomp.ASSUME_ES5||"function"==typeof Object.defineProperties?Object.defineProperty:function(a,b,c){a!=Array.prototype&&a!=Object.prototype&&(a[b]=c.value)};
$jscomp.getGlobal=function(a){a=["object"==typeof window&&window,"object"==typeof self&&self,"object"==typeof global&&global,a];for(var b=0;b<a.length;++b){var c=a[b];if(c&&c.Math==Math)return c}throw Error("Cannot find global object");};$jscomp.global=$jscomp.getGlobal(this);
$jscomp.polyfill=function(a,b,c,d){if(b){c=$jscomp.global;a=a.split(".");for(d=0;d<a.length-1;d++){var e=a[d];e in c||(c[e]={});c=c[e]}a=a[a.length-1];d=c[a];b=b(d);b!=d&&null!=b&&$jscomp.defineProperty(c,a,{configurable:!0,writable:!0,value:b})}};$jscomp.polyfill("Array.prototype.find",function(a){return a?a:function(b,a){return $jscomp.findInternal(this,b,a).v}},"es6","es3");var Adapter,JQueryAdapter;
Adapter=function(){var a=function(){};a.prototype.bind=function(b,a,d,e){};a.prototype.off=function(b,a,d){};a.prototype.fire=function(b,a,d){};a.prototype.get_properties=function(b,a){};a.prototype.get_attr=function(b,a){};a.prototype.swap=function(b,a){};a.prototype.append=function(b,a){};a.prototype.prepend=function(b,a){};a.prototype.clear=function(b){};a.prototype.set_attr=function(b,a,d){};a.prototype.all=function(b){return"object"===typeof b&&1===b.nodeType||9===b.nodeType?b:document.querySelectorAll(b)};
a.prototype.get=function(b){return document.querySelector(b)};a.prototype.as_string=function(b){if(b===document)return"document";if("[object String]"===Object.prototype.toString.call(b))return b;try{if(Array.isArray(b)&&1<b.size){var a=b.map(function(a){return a.tagName+"."+a.className});return a.slice(0,3).join(", ")}return b.tagName+"."+id}catch(d){return b}};a.prototype._adapter_name="Adapter";return a}.call(this);
JQueryAdapter=function(){var a=function(){return Adapter.apply(this,arguments)||this};$jscomp.inherits(a,Adapter);a.prototype.bind=function(a,c,d,e){if(null===c)jQuery(a).on(d,e);else jQuery(a).on(d,c,e)};a.prototype.off=function(a,c,d){jQuery(document).off(c,a,d)};a.prototype.fire=function(a,c,d){for(var b=[],f=2;f<arguments.length;++f)b[f-2]=arguments[f];jQuery(a).trigger(c,b)};a.prototype.get_properties=function(a,c){var b;var e=jQuery(a.target);a=jQuery(a.currentTarget||a.target);var f=[];var h=
0;for(b=c.length;h<b;h++){var g=c[h];var k=e.attr(g);g=a.attr(g);f.push(k||g)}return f};a.prototype.get_attr=function(a,c){return 0===c.indexOf("data")?(c=c.replace("data-",""),jQuery(a).data(c)):jQuery(a).prop(c)};a.prototype.set_attr=function(a,c,d){-1===c.indexOf("data-")?jQuery(a).attr(c,d):jQuery(a).data(c.replace("data-",""),d)};a.prototype.append=function(a,c){jQuery(a).append(c)};a.prototype.prepend=function(a,c){jQuery(a).prepend(c)};a.prototype.clear=function(a){jQuery(a).text("")};a.prototype.swap=
function(a,c){var b=this.get_attr(a,"tagName");"INPUT"===b||"TEXTAREA"===b||"SELECT"===b?jQuery(a).val(c):jQuery(a).text(c)};a.prototype.text=function(a){var b=this.get_attr(a,"tagName");this.get_attr(a,"type");return"INPUT"===b||"TEXTAREA"===b?jQuery(a).val():"SELECT"===b?jQuery(a).find("option:selected").val():jQuery(a).text()};a.prototype._adapter_name="jQuery";return a}.call(this);