Files
everything2/EveryThing/wwwroot/vendor/libs/bootstrap-table/extensions/addrbar/addrbar.js
David Štaleker 03b92525d7 Prvi commit
2023-05-12 09:00:07 +02:00

1 line
5.0 KiB
JavaScript

!function(t,e){var o=function(t){var e={};function o(n){if(e[n])return e[n].exports;var r=e[n]={i:n,l:!1,exports:{}};return t[n].call(r.exports,r,r.exports,o),r.l=!0,r.exports}return o.m=t,o.c=e,o.d=function(t,e,n){o.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:n})},o.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},o.t=function(t,e){if(1&e&&(t=o(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(o.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var r in t)o.d(n,r,function(e){return t[e]}.bind(null,r));return n},o.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return o.d(e,"a",e),e},o.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},o.p="",o(o.s=391)}({391:function(t,e,o){o(392)},392:function(t,e){function o(t){return(o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function n(t,e){for(var o=0;o<e.length;o++){var n=e[o];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function r(t,e){return!e||"object"!==o(e)&&"function"!=typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}function i(t,e,o){return(i="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(t,e,o){var n=function(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=a(t)););return t}(t,e);if(n){var r=Object.getOwnPropertyDescriptor(n,e);return r.get?r.get.call(o):r.value}})(t,e,o||t)}function a(t){return(a=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function c(t,e){return(c=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function u(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var o=[],n=!0,r=!1,i=void 0;try{for(var a,c=t[Symbol.iterator]();!(n=(a=c.next()).done)&&(o.push(a.value),!e||o.length!==e);n=!0);}catch(t){r=!0,i=t}finally{try{n||null==c.return||c.return()}finally{if(r)throw i}}return o}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}!function(t){function e(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:window.location.search,o=new RegExp("(^|&)".concat(t,"=([^&]*)(&|$)")),n=e.substr(1).match(o);return n?decodeURIComponent(n[2]):null}t.BootstrapTable=function(o){function s(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,s),r(this,a(s).apply(this,arguments))}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&c(t,e)}(s,o),l=s,(p=[{key:"init",value:function(){var o=this;if(this.options.addrbar){this.addrbarInit=!0;var n=this.options.addrPrefix||"";this.options.pageSize=this.options.pageSize||(e("".concat(n,"limit"))?parseInt(e("".concat(n,"limit"))):t.BootstrapTable.DEFAULTS.pageSize),this.options.pageNumber=this.options.pageNumber||(e("".concat(n,"page"))?parseInt(e("".concat(n,"page"))):t.BootstrapTable.DEFAULTS.pageNumber),this.options.sortOrder=this.options.sortOrder||(e("".concat(n,"order"))?e("".concat(n,"order")):t.BootstrapTable.DEFAULTS.sortOrder),this.options.sortName=this.options.sortName||(e("".concat(n,"sort"))?e("".concat(n,"sort")):"id"),this.options.searchText=this.options.searchText||(e("".concat(n,"search"))?e("".concat(n,"search")):t.BootstrapTable.DEFAULTS.searchText);var r=this.options.onLoadSuccess;this.options.onLoadSuccess=function(t){if(o.addrbarInit)o.addrbarInit=!1;else{var e={};e["".concat(n,"page")]=o.options.pageNumber,e["".concat(n,"limit")]=o.options.pageSize,e["".concat(n,"order")]=o.options.sortOrder,e["".concat(n,"sort")]=o.options.sortName,e["".concat(n,"search")]=o.options.searchText,window.history.pushState({},"",function(t){for(var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:window.location.search,o=0,n=Object.entries(t);o<n.length;o++){var r=n[o],i=u(r,2),a=i[0],c=i[1],s="".concat(a,"=([^&]*)"),l="".concat(a,"=").concat(c);if(e.match(s)){var p=new RegExp("(".concat(a,"=)([^&]*)"),"gi");e=e.replace(p,l)}else{var f=e.match("[?]")?"&":"?";e=e+f+l}}return location.hash&&(e+=location.hash),e}(e))}r&&r.call(o,t)}}i(a(s.prototype),"init",this).call(this)}}])&&n(l.prototype,p),f&&n(l,f),s;var l,p,f}(t.BootstrapTable)}(jQuery)}});if("object"==typeof o){var n=["object"==typeof module&&"object"==typeof module.exports?module.exports:null,"undefined"!=typeof window?window:null,t&&t!==window?t:null];for(var r in o)n[0]&&(n[0][r]=o[r]),n[1]&&"__esModule"!==r&&(n[1][r]=o[r]),n[2]&&(n[2][r]=o[r])}}(this);