UNPKG

object-get-own-property-descriptor-x

Version:
15 lines 16.9 kB
/*! { "author": "Graham Fairweather", "copywrite": "Copyright (c) 2017", "date": "2019-08-28T17:32:24.198Z", "describe": "", "description": "Sham for ES6 Object.getOwnPropertyDescriptor", "file": "object-get-own-property-descriptor-x.min.js", "hash": "57ec370b17acd0e09502", "license": "MIT", "version": "4.1.2" } */ !function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.objectGetOwnPropertyDescriptorX=e():t.objectGetOwnPropertyDescriptorX=e()}(function(){"use strict";var t,e={}.constructor,n=e.prototype,r=e.defineProperty,o=function(){return"undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:void 0},i=function(){return this};try{return r?r(n,"$$globalThis$$",{get:i,configurable:!0}):n.__defineGetter__("$$globalThis$$",i),t="undefined"==typeof $$globalThis$$?o():$$globalThis$$,delete n.$$globalThis$$,t}catch(t){return o()}}(),function(){return function(t){var e={};function n(r){if(e[r])return e[r].exports;var o=e[r]={i:r,l:!1,exports:{}};return t[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=t,n.c=e,n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:r})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var o in t)n.d(r,o,function(e){return t[e]}.bind(null,o));return r},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=6)}([function(t,e,n){"use strict";var r=Object.prototype.toString;if(n(3)()){var o=Symbol.prototype.toString,i=/^Symbol\(.*\)$/;t.exports=function(t){if("symbol"==typeof t)return!0;if("[object Symbol]"!==r.call(t))return!1;try{return function(t){return"symbol"==typeof t.valueOf()&&i.test(o.call(t))}(t)}catch(t){return!1}}}else t.exports=function(t){return!1}},function(t,e,n){"use strict";var r=String.prototype.valueOf,o=Object.prototype.toString,i="function"==typeof Symbol&&"symbol"==typeof Symbol.toStringTag;t.exports=function(t){return"string"==typeof t||"object"==typeof t&&(i?function(t){try{return r.call(t),!0}catch(t){return!1}}(t):"[object String]"===o.call(t))}},function(t,e,n){"use strict";var r=Date.prototype.getDay,o=Object.prototype.toString,i="function"==typeof Symbol&&"symbol"==typeof Symbol.toStringTag;t.exports=function(t){return"object"==typeof t&&null!==t&&(i?function(t){try{return r.call(t),!0}catch(t){return!1}}(t):"[object Date]"===o.call(t))}},function(t,e,n){"use strict";(function(e){var r=e.Symbol,o=n(5);t.exports=function(){return"function"==typeof r&&("function"==typeof Symbol&&("symbol"==typeof r("foo")&&("symbol"==typeof Symbol("bar")&&o())))}}).call(this,n(4))},function(t,e){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(t){"object"==typeof window&&(n=window)}t.exports=n},function(t,e,n){"use strict";t.exports=function(){if("function"!=typeof Symbol||"function"!=typeof Object.getOwnPropertySymbols)return!1;if("symbol"==typeof Symbol.iterator)return!0;var t={},e=Symbol("test"),n=Object(e);if("string"==typeof e)return!1;if("[object Symbol]"!==Object.prototype.toString.call(e))return!1;if("[object Symbol]"!==Object.prototype.toString.call(n))return!1;for(e in t[e]=42,t)return!1;if("function"==typeof Object.keys&&0!==Object.keys(t).length)return!1;if("function"==typeof Object.getOwnPropertyNames&&0!==Object.getOwnPropertyNames(t).length)return!1;var r=Object.getOwnPropertySymbols(t);if(1!==r.length||r[0]!==e)return!1;if(!Object.prototype.propertyIsEnumerable.call(t,e))return!1;if("function"==typeof Object.getOwnPropertyDescriptor){var o=Object.getOwnPropertyDescriptor(t,e);if(42!==o.value||!0!==o.enumerable)return!1}return!0}},function(t,e,n){"use strict";n.r(e);var r=function(t){return null==t},o=function(t){if(r(t))throw new TypeError("Cannot call method on ".concat(t));return t},i={}.constructor,u=function(t){return i(o(t))};function c(t){return(c="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)}var s=function(t){return"object"===c(t)?null===t:"function"!=typeof t},f=n(1),a=n.n(f),l={}.constructor("a"),p="a"===l[0]&&0 in l,y=function(){}.bind,b="function"==typeof y&&function(){var t=null,e=null,n=null,r=[];try{var o=y.apply(function(r,o){return n=this,t=r,e=o,arguments},[r,1]),i=o(2);return 1===o.length&&2===i.length&&1===t&&2===e&&n===r}catch(t){return!1}}()&&function(){var t=null,e=null,n=null,r=[1,2,3],o=function(o,i){return t=o,e=i,n=this,r};try{var i=y.apply(o,[null]),u=new i(1,2);return i.length===o.length&&u===r&&1===t&&2===e&&n!==r}catch(t){return!1}}(),d="".split,g=Math.max,m=s.bind,v=s.call,h=b?m.call(v,d):function(t,e){return d.call(t,e)},w=function(t){return a()(t)?h(t,""):t},S=function(t,e){var n=arguments.length>2?arguments[2]:[];if("string"!=typeof t&&s(t))return n;for(var r=p?t:w(t),o=r.length,i=g(0,e)||0;i<o;i+=1)n[n.length]=t[i];return n};function j(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=[],r=!0,o=!1,i=void 0;try{for(var u,c=t[Symbol.iterator]();!(r=(u=c.next()).done)&&(n.push(u.value),!e||n.length!==e);r=!0);}catch(t){o=!0,i=t}finally{try{r||null==c.return||c.return()}finally{if(o)throw i}}return n}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}var O=S.bind,_=S.call,x={},T=x.constructor,$=x.toString,P=function(t,e){return t>=e?t:e},E=function(t){if("function"!=typeof t&&"[object Function]"!==$.apply(t))throw new TypeError("bind called on incompatible "+t)},F=[function(t){return function(){return t.apply(this,S(arguments))}},function(t,e){return function(n){return t.apply(this,S(arguments,e,[n]))}},function(t,e){return function(n,r){return t.apply(this,S(arguments,e,[n,r]))}},function(t,e){return function(n,r,o){return t.apply(this,S(arguments,e,[n,r,o]))}},function(t,e){return function(n,r,o,i){return t.apply(this,S(arguments,e,[n,r,o,i]))}},function(t,e){return function(n,r,o,i,u){return t.apply(this,S(arguments,e,[n,r,o,i,u]))}},function(t,e){return function(n,r,o,i,u,c){return t.apply(this,S(arguments,e,[n,r,o,i,u,c]))}},function(t,e){return function(n,r,o,i,u,c,s){return t.apply(this,S(arguments,e,[n,r,o,i,u,c,s]))}},function(t,e){return function(n,r,o,i,u,c,s,f){return t.apply(this,S(arguments,e,[n,r,o,i,u,c,s,f]))}}],M=function(t){var e=j(t,3),n=e[0],r=e[1],o=e[2],i=P(0,r.length-P(0,o.length-2)),u=F[i],c=u?u(n,i):F[0](n);if(r.prototype){var s=function(){};s.prototype=r.prototype,c.prototype=new s,s.prototype=null}return c},N=function(t,e){var n=t.apply(this,e);return T(n)===n?n:this},k=b?_.bind(O):function(t,e){E(t);var n,r=arguments,o=function(){var o=S(arguments,0,S(r,2));return this instanceof n?N.apply(this,[t,o]):t.apply(e,o)};return n=M([o,t,r])},D=TypeError,C=k.apply,G=k(k.call,C),A=k(C,{}.toString),I=function(t){if("function"!=typeof t&&"[object Function]"!==A(t))throw new D(t+" is not a function");return t},X=function(t,e){return G(I(t),e,S(arguments[2]))},q=function(t){try{return{threw:!1,value:X(t,this,S(arguments,1))}}catch(t){return{threw:!0,value:t}}},L=n(0),R=n.n(L);for(var z=q(function(){return function(t,e){if(t!==e)throw new TypeError("Cannot instantiate an arrow function")}(this,void 0),"function"==typeof Symbol&&R()(Symbol(""))}.bind(void 0)),B=!1===z.threw&&!0===z.value,H=n(2),U=n.n(H),V=function(t){return!!t},J={}.toString,K=function(t){return function(t){if("function"!=typeof t&&"[object Function]"!==X(J,t))throw new TypeError("methodize called on incompatible "+t)}(t),function(){return X(t,arguments[0],S(arguments,1))}},Q=K({}.toString),W=function(t){return null===t?"[object Null]":void 0===t?"[object Undefined]":Q(t)},Y=B&&R()(Symbol.toStringTag),Z="Cannot convert a Symbol value to a string".constructor,tt=function(t){if(R()(t))throw new TypeError("Cannot convert a Symbol value to a string");return Z(t)},et=function(t){return tt(o(t))},nt=[{code:9,description:"Tab",es5:!0,es2015:!0,es2016:!0,es2017:!0,es2018:!0,string:"\t"},{code:10,description:"Line Feed",es5:!0,es2015:!0,es2016:!0,es2017:!0,es2018:!0,string:"\n"},{code:11,description:"Vertical Tab",es5:!0,es2015:!0,es2016:!0,es2017:!0,es2018:!0,string:"\v"},{code:12,description:"Form Feed",es5:!0,es2015:!0,es2016:!0,es2017:!0,es2018:!0,string:"\f"},{code:13,description:"Carriage Return",es5:!0,es2015:!0,es2016:!0,es2017:!0,es2018:!0,string:"\r"},{code:32,description:"Space",es5:!0,es2015:!0,es2016:!0,es2017:!0,es2018:!0,string:" "},{code:160,description:"No-break space",es5:!0,es2015:!0,es2016:!0,es2017:!0,es2018:!0,string:" "},{code:5760,description:"Ogham space mark",es5:!0,es2015:!0,es2016:!0,es2017:!0,es2018:!0,string:" "},{code:6158,description:"Mongolian vowel separator",es5:!0,es2015:!0,es2016:!0,es2017:!1,es2018:!1,string:"᠎"},{code:8192,description:"En quad",es5:!0,es2015:!0,es2016:!0,es2017:!0,es2018:!0,string:" "},{code:8193,description:"Em quad",es5:!0,es2015:!0,es2016:!0,es2017:!0,es2018:!0,string:" "},{code:8194,description:"En space",es5:!0,es2015:!0,es2016:!0,es2017:!0,es2018:!0,string:" "},{code:8195,description:"Em space",es5:!0,es2015:!0,es2016:!0,es2017:!0,es2018:!0,string:" "},{code:8196,description:"Three-per-em space",es5:!0,es2015:!0,es2016:!0,es2017:!0,es2018:!0,string:" "},{code:8197,description:"Four-per-em space",es5:!0,es2015:!0,es2016:!0,es2017:!0,es2018:!0,string:" "},{code:8198,description:"Six-per-em space",es5:!0,es2015:!0,es2016:!0,es2017:!0,es2018:!0,string:" "},{code:8199,description:"Figure space",es5:!0,es2015:!0,es2016:!0,es2017:!0,es2018:!0,string:" "},{code:8200,description:"Punctuation space",es5:!0,es2015:!0,es2016:!0,es2017:!0,es2018:!0,string:" "},{code:8201,description:"Thin space",es5:!0,es2015:!0,es2016:!0,es2017:!0,es2018:!0,string:" "},{code:8202,description:"Hair space",es5:!0,es2015:!0,es2016:!0,es2017:!0,es2018:!0,string:" "},{code:8232,description:"Line separator",es5:!0,es2015:!0,es2016:!0,es2017:!0,es2018:!0,string:"\u2028"},{code:8233,description:"Paragraph separator",es5:!0,es2015:!0,es2016:!0,es2017:!0,es2018:!0,string:"\u2029"},{code:8239,description:"Narrow no-break space",es5:!0,es2015:!0,es2016:!0,es2017:!0,es2018:!0,string:" "},{code:8287,description:"Medium mathematical space",es5:!0,es2015:!0,es2016:!0,es2017:!0,es2018:!0,string:" "},{code:12288,description:"Ideographic space",es5:!0,es2015:!0,es2016:!0,es2017:!0,es2018:!0,string:" "},{code:65279,description:"Byte Order Mark",es5:!0,es2015:!0,es2016:!0,es2017:!0,es2018:!0,string:"\ufeff"}],rt="",ot=nt.length,it=0;it<ot;it+=1)nt[it].es2016&&nt[it].string,nt[it].es2018&&(rt+=nt[it].string);var ut=rt,ct=new(0,/none/.constructor)("^[".concat(ut,"]+")),st=K("".replace),ft=function(t){return st(et(t),ct,"")},at=new(0,/none/.constructor)("[".concat(ut,"]+$")),lt=K("".replace),pt=function(t){return lt(et(t),at,"")},yt=function(t){return ft(pt(t))},bt=new(0,/none/.constructor)("[".concat(ut,"]+"),"g"),dt=K(" ".replace),gt=function(t){return dt(yt(t),bt," ")},mt=/((\/\/.*$)|(\/\*[\s\S]*?\*\/))/gm,vt=K("".replace),ht=function(t,e){return vt(et(t),mt,arguments.length>1?tt(e):"")},wt=q.constructor,St=K(q.toString),jt=/^class /,Ot=K(jt.test),_t=!1===q(function(){return wt('"use strict"; return class My {};')()}).threw,xt=function(t){return Ot(jt,gt(ht(St(t)," ")))},Tt=function(t){var e=q(xt,t);return!1===e.threw&&e.value},$t=function(t,e){return!s(t)&&(Y?function(t,e){return!(_t&&!1===e&&Tt(t)||!1!==q(function(){return St(t)}).threw)}(t,V(e)):(!_t||!1!==V(e)||!Tt(t))&&function(t){var e=W(t);return"[object Function]"===e||"[object GeneratorFunction]"===e||"[object AsyncFunction]"===e}(t))},Pt="string".constructor,Et=(0).constructor,Ft=B&&Symbol.toPrimitive,Mt=B&&Symbol.prototype.valueOf,Nt=["toString","valueOf"],kt=["valueOf","toString"],Dt=function(t,e){o(t),function(t){if("string"!=typeof t||"number"!==t&&"string"!==t)throw new TypeError('hint must be "string" or "number"')}(e);for(var n="string"===e?Nt:kt,r=0;r<2;r+=1){var i=t[n[r]];if($t(i)){var u=X(i,t);if(s(u))return u}}throw new TypeError("No default value")},Ct=function(t,e){if(e){if(t===Pt)return"string";if(t===Et)return"number"}return"default"},Gt=function(t){if(B){if(Ft)return function(t,e){var n=t[e];if(!1===r(n)){if(!1===$t(n))throw new TypeError("".concat(n," returned for property ").concat(e," of object ").concat(t," is not a function"));return n}}(t,Ft);if(R()(t))return Mt}},At=function(t){var e=t.exoticToPrim,n=t.input,r=t.hint,o=X(e,n,[r]);if(s(o))return o;throw new TypeError("unable to convert exotic object to primitive")},It=function(t,e){var n="default"===e&&(U()(t)||R()(t))?"string":e;return Dt(t,"default"===n?"number":n)},Xt=function(t,e){if(s(t))return t;var n=Ct(e,arguments.length>1),r=Gt(t);return void 0===r?It(t,n):At({exoticToPrim:r,input:t,hint:n})};function qt(t){return(qt="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)}var Lt=function(t){var e=Xt(t,String);return B&&"symbol"===qt(e)?e:tt(e)},Rt=K({}.hasOwnProperty),zt=function(t,e){return Rt(u(t),Lt(e))},Bt=B&&Symbol.prototype.toString,Ht="function"==typeof Bt&&R.a,Ut="".constructor,Vt=function(t){return Ht&&Ht(t)?Bt.call(t):Ut(t)},Jt=parseInt,Kt=(0).constructor,Qt=K("᠎".charAt),Wt=/^[-+]?0[xX]/,Yt=K(Wt.test),Zt=function(t,e){var n=ft(tt(t));return"᠎"===Qt(n,0)?NaN:Jt(n,Kt(e)||(Yt(Wt,n)?16:10))},te=2..constructor,ee=K("Cannot convert a Symbol value to a number".slice),ne=/^0b[01]+$/i,re=ne.constructor,oe=K(ne.test),ie=/^0o[0-7]+$/i,ue=new re("[…᠎​￾]","g"),ce=/^[-+]0x[0-9a-f]+$/i,se=function(t,e){return Zt(ee(t,2),e)},fe=function(t,e){return function(t){return oe(ne,t)}(e)?t(se(e,2)):function(t){return oe(ie,t)}(e)?t(se(e,8)):null},ae=function(t,e){var n=fe(t,e);if(null!==n)return n;if(function(t){return oe(ue,t)}(e)||function(t){return oe(ce,t)}(e))return NaN;var r=yt(e);return r!==e?t(r):null},le=function t(e){var n=function(t){if(R()(t))throw new TypeError("Cannot convert a Symbol value to a number");return t}(Xt(e,te));if("string"==typeof n){var r=ae(t,n);if(null!==r)return r}return te(n)},pe=function(t){return t!=t},ye=function(t){return"number"==typeof t&&!1===pe(t)&&t!==1/0&&t!==-1/0},be=function(t){var e=le(t);return 0===e||pe(e)?e:e>0?1:-1},de=Math.abs,ge=Math.floor,me=function(t){var e=le(t);return pe(e)?0:0===e||!1===ye(e)?e:be(e)*ge(de(e))},ve=function(t){var e=le(t[1]),n=t.length<3?{max:e,min:0}:{max:le(t[2]),min:e};if(n.min>n.max)throw new RangeError('"min" must be less than "max"');return n},he=function(t){var e=le(t);if(arguments.length<2)return e;var n=ve(arguments),r=n.max,o=n.min;return e<o?o:e>r?r:e},we=/^(?:0|[1-9]\d*)$/,Se=we.test,je=function(t,e){var n=Vt(t);if(!1===Se.call(we,n))return!1;var r=le(n);return arguments.length>1?r<he(me(e),9007199254740991):r<9007199254740991},Oe=K({}.propertyIsEnumerable),_e=function(t,e){return Oe(u(t),Lt(e))};n.d(e,"implementation",function(){return Ae});var xe,Te,$e,Pe=K("".charAt),Ee={}.constructor,Fe=Ee.getOwnPropertyDescriptor,Me="function"==typeof Fe&&Fe,Ne=function(t,e){t[Lt(e)]=0;var n=q(Me,t,e);return!1===n.threw&&0===n.value.value},ke=Ee.prototype,De=zt(ke,"__defineGetter__"),Ce=De&&K(ke.__lookupGetter__),Ge=De&&K(ke.__lookupSetter__),Ae=function(t,e){var n,r=u(t),o=Lt(e);if(xe&&!1===(n=q(function(){return xe(u(r),o)})).threw)return n.value;var i=a()(r)&&je(o,r.length);if(Te&&!1===i&&!1===(n=q(function(){return Te(u(r),o)})).threw)return n.value;var c=void 0;if(!1===i&&!1===zt(r,o))return c;if(c={configurable:!1===s(t)&&!1===i,enumerable:_e(r,o)},De){var f=r.__proto__,l=r!==ke;l&&(r.__proto__=ke);var p=Ce(r,o),y=Ge(r,o);if(l&&(r.__proto__=f),p||y)return p&&(c.get=p),y&&(c.set=y),c}return i?(c.value=Pe(r,o),c.writable=!1):(c.value=r[o],c.writable=!0),c};if(Me){var Ie="undefined"!=typeof document&&document;if(!Ie||Ne(Ie.createElement("div"),"sentinel")){var Xe=q(Me,u("abc"),1);if(!1===Xe.threw&&Xe.value&&"b"===Xe.value.value)if(Ne({},"sentinel")){var qe=!1===q(Me,42,"name").threw;$e=B&&Ne({},u(Symbol("")))?qe?Me:function(t,e){return Me(u(t),e)}:qe?function(t,e){return Me(t,Lt(e))}:function(t,e){return Me(u(t),Lt(e))}}else xe=Me;else Te=Me}}(!1===V($e)||xe||Te)&&($e=Ae);var Le=$e;e.default=Le}])}); //# sourceMappingURL=object-get-own-property-descriptor-x.min.js.map