org.htmlunit.javascript.polyfill.proxy.es6-proxy-polyfill.js Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of xlt Show documentation
Show all versions of xlt Show documentation
XLT (Xceptance LoadTest) is an extensive load and performance test tool developed and maintained by Xceptance.
/**
* es6-proxy-polyfill
* @version 2.1.1
* @author Ambit-Tsai
* @license Apache-2.0
* @see {@link https://github.com/ambit-tsai/es6-proxy-polyfill#readme}
*/
!function(t,n){"object"==typeof exports&&"undefined"!=typeof module?module.exports=n():"function"==typeof define&&define.amd?define(n):(t="undefined"!=typeof globalThis?globalThis:t||self).Proxy=n()}(this,(function(){"use strict";var t,n="[[ProxyTarget]]",e="[[ProxyHandler]]",r="[[Get]]",o="[[Set]]",i="[[Call]]",c="[[Construct]]",u="__proto__",f="REVOKED",a=Object.defineProperty,s=Object.defineProperties,p=Object.getPrototypeOf,y=Object.getOwnPropertyDescriptor,_=!!s&&h(s),l=_?Object.__proto__?p:function(t){return"function"==typeof t?t.__proto__||{}:p(t)}:function(t){return _isVbObject(t)&&_getVbInternalOf(t).__proto__||{}};function h(t){return"function"==typeof t&&/\[native code\]/.test(t.toString())}function v(t,n){if(this instanceof v)return b(new g(t,n));d("Constructor Proxy requires 'new'")}function b(e){var u=e[n];return"function"==typeof u?function(t){var e=t[n];function r(){return this instanceof r?t[c](arguments,r):t[i](this,arguments)}if(r.prototype=e.prototype,_){var o=m(t),u=T(p(e),o);for(var f in w(r,u),o=R(e,t))j(r,f)&&delete o[f];s(r,o)}else C(r,e);return r}(e):u instanceof Array?function(e){var i,c,u=e[n];_&&((i=m(e)).concat.get=function(){var t=e[r]("concat",this);return t===Array.prototype.concat?t.bind(u):t},c=T(p(u),i));return(i=R(u,e)).length.set=function(r){var i=r-u.length;e[o]("length",r,this),i&&function(e,r,o){var i=o[n];if(e>0)for(var c=i.length,u=c-e;u=0;--o)r[e[o]]=V(t,e[o],n);return r}function V(t,n,e){var i=y(t,n);return{get:function(){return e[r](n,this)},set:function(t){e[o](n,t,this)},enumerable:i.enumerable,configurable:i.configurable}}return"undefined"==typeof Proxy?v:Proxy}));