UNPKG

2.79 kBJavaScriptView Raw
1!function(){"use strict";function t(t,n){return J.call(arguments,2).reduce(t,n)}function n(t,n){if(n)for(var r=F(n),e=0;e<r[V];e++)t[r[e]]=n[r[e]];return t}function r(t){return"function"==typeof t}function e(t){return t&&typeof t==R||r(t)}function o(t){return t&&typeof t==R&&t.__proto__==q.prototype}function i(t,n){if(n===d)return t;if(w(n))return(w(t)?t:[]).concat(n);if(!o(n))return n;for(var r,e=F(n),u=0;u<e[V];)r=e[u++],n[r]!==d&&(t[r]=i(o(t[r])||w(n[r])?t[r]:{},n[r]));return t}function u(){return h=H.apply([],arguments).filter(function(t,n,e){return r(t)&&e.indexOf(t)===n}),h[V]?h:d}function p(t){return b={},b[E]=t[E]||d,h=t[v],m=t.props,b[v]=e(h||m)?K({},m,h):d,b[z]=u(t.init,t[z]),b[I]=u(t[I]),h=t[P],m=t[D],b[P]=e(h||m)?L({},m,h):d,b[g]=t[g],h=t[A],m=t.statics,b[A]=e(h||m)?K({},m,h):d,h=t[O],m=t[S],b[O]=e(h||m)?L({},m,h):d,b[j]=t[j],h=t[x],m=t.conf,b[x]=e(h||m)?K({},m,h):d,h=t[C],m=t[k],_=e(h||m)?L({},m,h):d,b[C]=_,b}function c(){return function Stamp(t){var n,e,o=Stamp[N]||{},i={__proto__:o[E]},u=o[z],p=J.apply(arguments),c=o[P];if(c&&L(i,c),c=o[v],c&&K(i,c),c=o[g],c&&B(i,c),!u||!u[V])return i;for(t===d&&(t={}),o=0;o<u[V];)n=u[o++],r(n)&&(e=n.call(i,t,{instance:i,stamp:Stamp,args:p}),i=e===d?i:e);return i}}function f(t){return h=c(),m=t[O],m&&L(h,m),m=t[A],m&&K(h,m),m=t[j],m&&B(h,m),m=r(h[N])?h[N]:a,K(h[N]=function(){return m.apply(this,arguments)},t),h}function s(t,n){function r(r,o){e(n[r])&&(e(t[r])||(t[r]={}),(o||K)(t[r],n[r]))}function o(r){(h=u(t[r],n[r]))&&(t[r]=h)}return n&&e(n=n[N]||n)&&(r(E),r(v),r(P,L),r(g),r(A),r(O,L),r(j),r(x),r(C,L),o(z),o(I)),t}function a(){return f(H.apply([this],arguments).reduce(s,{}))}function l(t){return r(t)&&r(t[N])}function y(t,n){return function(){return b={},b[t]=n.apply(d,H.apply([{}],arguments)),h=this,(h&&h[N]||m).call(h,b)}}var d,h="roperties",m="ropertyDescriptors",_="static",b="onfiguration",v="p"+h,P="deepP"+h,g="p"+m,A=_+"P"+h,O=_+"DeepP"+h,j=_+"P"+m,x="c"+b,C="deepC"+b,D="deepProps",S="deepStatics",k="deepConf",z="initializers",E="methods",I="composers",N="compose",R="object",V="length",q=Object,w=Array.isArray,B=q.defineProperties,F=q.keys,G=Array.prototype,H=G.concat,J=G.slice,K=q.assign||t.bind(0,n),L=t.bind(0,i),M={};M[E]=y(E,K),M[v]=M.props=y(v,K),M[z]=M.init=y(z,u),M[I]=y(I,u),M[P]=M[D]=y(P,L),M[A]=M.statics=y(A,K),M[O]=M[S]=y(O,L),M[x]=M.conf=y(x,K),M[C]=M[k]=y(C,L),M[g]=y(g,K),M[j]=y(j,K),m=M[N]=K(function stampit(){for(var t,n=0,r=[],o=arguments,i=this;n<o[V];)t=o[n++],e(t)&&r.push(l(t)?t:p(t));if(t=a.apply(i||G,r),i&&r.unshift(i),o=t[N][I],w(o))for(n=0;n<o[V];)i=o[n++]({stamp:t,composables:r}),t=l(i)?i:t;return t},M),M.create=function(){return this.apply(d,arguments)},b={},b[A]=M,G=a(b),m[N]=m.bind(),m.version="4.1.1",typeof d!=typeof module?module.exports=m:self.stampit=m}();