1 line
161 KiB
JavaScript
1 line
161 KiB
JavaScript
|
!function(p){"use strict";var I=function(){},v=function(t,r){return function(){for(var n=[],e=0;e<arguments.length;e++)n[e]=arguments[e];return t(r.apply(null,n))}},A=function(n){return function(){return n}},h=function(n){return n};function l(r){for(var o=[],n=1;n<arguments.length;n++)o[n-1]=arguments[n];return function(){for(var n=[],e=0;e<arguments.length;e++)n[e]=arguments[e];var t=o.concat(n);return r.apply(null,t)}}var n,e,t,r,o,i,u,c,x=function(t){return function(){for(var n=[],e=0;e<arguments.length;e++)n[e]=arguments[e];return!t.apply(null,n)}},a=function(n){return function(){throw new Error(n)}},f=function(n){return n()},s=A(!1),d=A(!0),m=function(e){return function(n){return function(n){if(null===n)return"null";var e=typeof n;return"object"===e&&(Array.prototype.isPrototypeOf(n)||n.constructor&&"Array"===n.constructor.name)?"array":"object"===e&&(String.prototype.isPrototypeOf(n)||n.constructor&&"String"===n.constructor.name)?"string":e}(n)===e}},y=m("string"),g=m("object"),b=m("array"),w=m("boolean"),T=m("function"),S=m("number"),O=Object.prototype.hasOwnProperty,k=function(u){return function(){for(var n=new Array(arguments.length),e=0;e<n.length;e++)n[e]=arguments[e];if(0===n.length)throw new Error("Can't merge zero objects");for(var t={},r=0;r<n.length;r++){var o=n[r];for(var i in o)O.call(o,i)&&(t[i]=u(t[i],o[i]))}return t}},C=k(function(n,e){return g(n)&&g(e)?C(n,e):e}),E=k(function(n,e){return e}),D=s,M=d,F=function(){return R},R=(r={fold:function(n,e){return n()},is:D,isSome:D,isNone:M,getOr:t=function(n){return n},getOrThunk:e=function(n){return n()},getOrDie:function(n){throw new Error(n||"error: getOrDie called on none.")},getOrNull:function(){return null},getOrUndefined:function(){return undefined},or:t,orThunk:e,map:F,ap:F,each:function(){},bind:F,flatten:F,exists:D,forall:M,filter:F,equals:n=function(n){return n.isNone()},equals_:n,toArray:function(){return[]},toString:A("none()")},Object.freeze&&Object.freeze(r),r),B=function(t){var n=function(){return t},e=function(){return o},r=function(n){return n(t)},o={fold:function(n,e){return e(t)},is:function(n){return t===n},isSome:M,isNone:D,getOr:n,getOrThunk:n,getOrDie:n,getOrNull:n,getOrUndefined:n,or:e,orThunk:e,map:function(n){return B(n(t))},ap:function(n){return n.fold(F,function(n){return B(n(t))})},each:function(n){n(t)},bind:r,flatten:n,exists:r,forall:r,filter:function(n){return n(t)?o:R},equals:function(n){return n.is(t)},equals_:function(n,e){return n.fold(D,function(n){return e(t,n)})},toArray:function(){return[t]},toString:function(){return"some("+t+")"}};return o},V={some:B,none:F,from:function(n){return null===n||n===undefined?R:B(n)}},N=Object.keys,_=function(n,e){for(var t=N(n),r=0,o=t.length;r<o;r++){var i=t[r];e(n[i],i,n)}},j=function(n,r){return H(n,function(n,e,t){return{k:e,v:r(n,e,t)}})},H=function(r,o){var i={};return _(r,function(n,e){var t=o(n,e,r);i[t.k]=t.v}),i},z=function(n,t){var r=[];return _(n,function(n,e){r.push(t(n,e))}),r},L=A("touchstart"),P=A("touchmove"),$=A("touchend"),W=A("mousedown"),U=A("mousemove"),G=A("mouseup"),q=A("mouseover"),Y=A("keydown"),K=A("input"),X=A("change"),J=A("click"),Q=A("transitionend"),Z=A("selectstart"),nn=function(t){var r,o=!1;return function(){for(var n=[],e=0;e<arguments.length;e++)n[e]=arguments[e];return o||(o=!0,r=t.apply(null,n)),r}},en=function(n,e){var t=function(n,e){for(var t=0;t<n.length;t++){var r=n[t];if(r.test(e))return r}return undefined}(n,e);if(!t)return{major:0,minor:0};var r=function(n){return Number(e.replace(t,"$"+n))};return rn(r(1),r(2))},tn=function(){return rn(0,0)},rn=function(n,e){return{major:n,minor:e}},on={nu:rn,detect:function(n,e){var t=String(e).toLowerCase();return 0===n.length?tn():en(n,t)},unknown:tn},un="Firefox",cn=function(n,e){return function(){return e===n}},an=function(n){var e=n.current;return{current:e,version:n.version,isEdge:cn("Edge",e),isChrome:cn("Chrome",e),isIE:cn("IE",e),isOpera:cn("Opera",e),isFirefox:cn(un,e),isSafari:cn("Safari",e)}},fn={unknown:function(){return an({current:undefined,version:on.unknown()})},nu:an,edge:A("Edge"),chr
|