1
0
Fork 0
mirror of https://github.com/sensebox/blockly-app synced 2025-02-23 16:23:59 +01:00
blockly-app/build/polyfills.js

5 lines
95 KiB
JavaScript
Raw Permalink Normal View History

!function(t){"use strict";function e(t,e){return e={exports:{}},t(e,e.exports),e.exports}function n(t){return isFinite(t=+t)&&0!=t?t<0?-n(-t):Math.log(t+Math.sqrt(t*t+1)):t}function r(t,e){var n,o,i=arguments.length<3?t:arguments[2];return v(t)===i?t[e]:(n=dn.f(t,e))?M(n,"value")?n.value:void 0!==n.get?n.get.call(i):void 0:p(o=bt(t))?r(o,e,i):void 0}function o(t,e,n){var r,i,a=arguments.length<4?t:arguments[3],u=dn.f(v(t),e);if(!u){if(p(i=bt(t)))return o(i,e,n,a);u=E(0)}return M(u,"value")?!(!1===u.writable||!p(a))&&(r=dn.f(a,e)||E(0),r.value=n,T.f(a,e,r),!0):void 0!==u.set&&(u.set.call(a,n),!0)}var i=Math.ceil,a=Math.floor,u=function(t){return isNaN(t=+t)?0:(t>0?a:i)(t)},c=function(t){if(void 0==t)throw TypeError("Can't call method on "+t);return t},s=function(t){return function(e,n){var r,o,i=String(c(e)),a=u(n),s=i.length;return a<0||a>=s?t?"":void 0:(r=i.charCodeAt(a),r<55296||r>56319||a+1===s||(o=i.charCodeAt(a+1))<56320||o>57343?t?i.charAt(a):r:t?i.slice(a,a+2):o-56320+(r-55296<<10)+65536)}},f="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},l=e(function(t){var e=t.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=e)}),h=e(function(t){var e=t.exports={version:"2.5.1"};"number"==typeof __e&&(__e=e)}),p=function(t){return"object"==typeof t?null!==t:"function"==typeof t},v=function(t){if(!p(t))throw TypeError(t+" is not an object!");return t},d=function(t){try{return!!t()}catch(t){return!0}},g=!d(function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a}),y=l.document,m=p(y)&&p(y.createElement),b=function(t){return m?y.createElement(t):{}},_=!g&&!d(function(){return 7!=Object.defineProperty(b("div"),"a",{get:function(){return 7}}).a}),k=function(t,e){if(!p(t))return t;var n,r;if(e&&"function"==typeof(n=t.toString)&&!p(r=n.call(t)))return r;if("function"==typeof(n=t.valueOf)&&!p(r=n.call(t)))return r;if(!e&&"function"==typeof(n=t.toString)&&!p(r=n.call(t)))return r;throw TypeError("Can't convert object to primitive value")},w=Object.defineProperty,S=g?Object.defineProperty:function(t,e,n){if(v(t),e=k(e,!0),v(n),_)try{return w(t,e,n)}catch(t){}if("get"in n||"set"in n)throw TypeError("Accessors not supported!");return"value"in n&&(t[e]=n.value),t},T={f:S},E=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}},O=g?function(t,e,n){return T.f(t,e,E(1,n))}:function(t,e,n){return t[e]=n,t},P={}.hasOwnProperty,M=function(t,e){return P.call(t,e)},F=0,j=Math.random(),D=function(t){return"Symbol(".concat(void 0===t?"":t,")_",(++F+j).toString(36))},x=e(function(t){var e=D("src"),n=Function.toString,r=(""+n).split("toString");h.inspectSource=function(t){return n.call(t)},(t.exports=function(t,n,o,i){var a="function"==typeof o;a&&(M(o,"name")||O(o,"name",n)),t[n]!==o&&(a&&(M(o,e)||O(o,e,t[n]?""+t[n]:r.join(String(n)))),t===l?t[n]=o:i?t[n]?t[n]=o:O(t,n,o):(delete t[n],O(t,n,o)))})(Function.prototype,"toString",function(){return"function"==typeof this&&this[e]||n.call(this)})}),I=function(t){if("function"!=typeof t)throw TypeError(t+" is not a function!");return t},A=function(t,e,n){if(I(t),void 0===e)return t;switch(n){case 1:return function(n){return t.call(e,n)};case 2:return function(n,r){return t.call(e,n,r)};case 3:return function(n,r,o){return t.call(e,n,r,o)}}return function(){return t.apply(e,arguments)}},L=function(t,e,n){var r,o,i,a,u=t&L.F,c=t&L.G,s=t&L.S,f=t&L.P,p=t&L.B,v=c?l:s?l[e]||(l[e]={}):(l[e]||{}).prototype,d=c?h:h[e]||(h[e]={}),g=d.prototype||(d.prototype={});c&&(n=e);for(r in n)o=!u&&v&&void 0!==v[r],i=(o?v:n)[r],a=p&&o?A(i,l):f&&"function"==typeof i?A(Function.call,i):i,v&&x(v,r,i,t&L.U),d[r]!=i&&O(d,r,a),f&&g[r]!=i&&(g[r]=i)};l.core=h,L.F=1,L.G=2,L.S=4,L.P=8,L.B=16,L.W=32,L.U=64,L.R=128;var R=L,N={},C={}.toString,z=function(t){return C.call(t).slice(8,-1)},Z=Object("z").propertyIsEnumerable(0)?Object:function(t){return"String"==z(t)?t.split(""):Object(t)},H=function(t){return Z(c(t))},W=Math.min,
var t={},e={},n=Symbol(),r="abcdefghijklmnopqrst";return t[n]=7,r.split("").forEach(function(t){e[t]=t}),7!=jo({},t)[n]||Object.keys(jo({},e)).join("")!=r})?function(t,e){for(var n=gt(t),r=arguments.length,o=1,i=zr.f,a=hn.f;r>o;)for(var u,c=Z(arguments[o++]),s=i?nt(c).concat(i(c)):nt(c),f=s.length,l=0;f>l;)a.call(c,u=s[l++])&&(n[u]=c[u]);return n}:jo;R(R.S+R.F,"Object",{assign:Do});var xo=Object.is||function(t,e){return t===e?0!==t||1/t==1/e:t!=t&&e!=e};R(R.S,"Object",{is:xo}),R(R.S,"Object",{setPrototypeOf:yn.set}),R(R.G+R.F*(parseFloat!=jr),{parseFloat:jr}),R(R.G+R.F*(parseInt!=Ar),{parseInt:Ar});var Io=(l.Reflect||{}).apply,Ao=Function.apply;R(R.S+R.F*!d(function(){Io(function(){})}),"Reflect",{apply:function(t,e,n){var r=I(t),o=v(n);return Io?Io(r,e,o):Ao.call(r,e,o)}});var Lo=(l.Reflect||{}).construct,Ro=d(function(){function t(){}return!(Lo(function(){},[],t)instanceof t)}),No=!d(function(){Lo(function(){})});R(R.S+R.F*(Ro||No),"Reflect",{construct:function(t,e){I(t),v(e);var n=arguments.length<3?t:I(arguments[2]);if(No&&!Ro)return Lo(t,e,n);if(t==n){switch(e.length){case 0:return new t;case 1:return new t(e[0]);case 2:return new t(e[0],e[1]);case 3:return new t(e[0],e[1],e[2]);case 4:return new t(e[0],e[1],e[2],e[3])}var r=[null];return r.push.apply(r,e),new(Re.apply(t,r))}var o=n.prototype,i=st(p(o)?o:Object.prototype),a=Function.apply.call(t,i,e);return p(a)?a:i}}),R(R.S+R.F*d(function(){Reflect.defineProperty(T.f({},1,{value:1}),1,{value:2})}),"Reflect",{defineProperty:function(t,e,n){v(t),e=k(e,!0),v(n);try{return T.f(t,e,n),!0}catch(t){return!1}}});var Co=dn.f;R(R.S,"Reflect",{deleteProperty:function(t,e){var n=Co(v(t),e);return!(n&&!n.configurable)&&delete t[e]}});var zo=function(t){this._t=v(t),this._i=0;var e,n=this._k=[];for(e in t)n.push(e)};dt(zo,"Object",function(){var t,e=this,n=e._k;do{if(e._i>=n.length)return{value:void 0,done:!0}}while(!((t=n[e._i++])in e._t));return{value:t,done:!1}}),R(R.S,"Reflect",{enumerate:function(t){return new zo(t)}}),R(R.S,"Reflect",{get:r}),R(R.S,"Reflect",{getOwnPropertyDescriptor:function(t,e){return dn.f(v(t),e)}}),R(R.S,"Reflect",{getPrototypeOf:function(t){return bt(v(t))}}),R(R.S,"Reflect",{has:function(t,e){return e in t}});var Zo=Object.isExtensible;R(R.S,"Reflect",{isExtensible:function(t){return v(t),!Zo||Zo(t)}});var Ho=l.Reflect,Wo=Ho&&Ho.ownKeys||function(t){var e=qn.f(v(t)),n=zr.f;return n?e.concat(n(t)):e};R(R.S,"Reflect",{ownKeys:Wo});var Bo=Object.preventExtensions;R(R.S,"Reflect",{preventExtensions:function(t){v(t);try{return Bo&&Bo(t),!0}catch(t){return!1}}}),R(R.S,"Reflect",{set:o}),yn&&R(R.S,"Reflect",{setPrototypeOf:function(t,e){yn.check(t,e);try{return yn.set(t,e),!0}catch(t){return!1}}});var qo=ft("match"),Uo=function(t){var e;return p(t)&&(void 0!==(e=t[qo])?!!e:"RegExp"==z(t))},Vo=function(){var t=v(this),e="";return t.global&&(e+="g"),t.ignoreCase&&(e+="i"),t.multiline&&(e+="m"),t.unicode&&(e+="u"),t.sticky&&(e+="y"),e},Go=T.f,Xo=qn.f,Yo=l.RegExp,Ko=Yo,Jo=Yo.prototype,$o=/a/g,Qo=/a/g,ti=new Yo($o)!==$o;if(g&&(!ti||d(function(){return Qo[ft("match")]=!1,Yo($o)!=$o||Yo(Qo)==Qo||"/a/i"!=Yo($o,"i")}))){Yo=function(t,e){var n=this instanceof Yo,r=Uo(t),o=void 0===e;return!n&&r&&t.constructor===Yo&&o?t:bn(ti?new Ko(r&&!o?t.source:t,e):Ko((r=t instanceof Yo)?t.source:t,r&&o?Vo.call(t):e),n?this:Jo,Yo)};for(var ei=Xo(Ko),ni=0;ei.length>ni;)!function(t){t in Yo||Go(Yo,t,{configurable:!0,get:function(){return Ko[t]},set:function(e){Ko[t]=e}})}(ei[ni++]);Jo.constructor=Yo,Yo.prototype=Jo,x(l,"RegExp",Yo)}me("RegExp"),g&&"g"!=/./g.flags&&T.f(RegExp.prototype,"flags",{configurable:!0,get:Vo});var ri=/./.toString,oi=function(t){x(RegExp.prototype,"toString",t,!0)};d(function(){return"/a/b"!=ri.call({source:"a",flags:"b"})})?oi(function(){var t=v(this);return"/".concat(t.source,"/","flags"in t?t.flags:!g&&t instanceof RegExp?Vo.call(t):void 0)}):"toString"!=ri.name&&oi(function(){return ri.call(this)});var ii=function(t,e,n){var r=ft(t),o=n(c,r,""[t]),i=o[0],a=o[1];d(function(){var e={};return e[r]=function(){return 7},7!=""[t](e)})&&(x(String.prototype,t,i
function v(t,e,n,r){function o(e){function n(){try{e.invoke.apply(this,arguments)}finally{typeof r.handleId===f?delete s[r.handleId]:r.handleId&&(r.handleId[ot]=null)}}var r=e.data;return r.args[0]=n,r.handleId=u.apply(t,r.args),e}function i(t){return c(t.data.handleId)}var u=null,c=null;e+=r,n+=r;var s={},f="number";u=a(t,e,function(n){return function(a,u){if("function"==typeof u[0]){var c=Zone.current,l={handleId:null,isPeriodic:"Interval"===r,delay:"Timeout"===r||"Interval"===r?u[1]||0:null,args:u},h=c.scheduleMacroTask(e,u[0],l,o,i);if(!h)return h;var p=h.data.handleId;return typeof p===f?s[p]=h:p&&(p[ot]=h),p&&p.ref&&p.unref&&"function"==typeof p.ref&&"function"==typeof p.unref&&(h.ref=p.ref.bind(p),h.unref=p.unref.bind(p)),typeof p===f||p?p:h}return n.apply(t,u)}}),c=a(t,n,function(e){return function(n,r){var o,i=r[0];typeof i===f?o=s[i]:(o=i&&i[ot])||(o=i),o&&"string"==typeof o.type?"notScheduled"!==o.state&&(o.cancelFn&&o.data.isPeriodic||0===o.runCount)&&(typeof i===f?delete s[i]:i&&(i[ot]=null),o.zone.cancelTask(o)):e.apply(t,r)}})}function d(){Object.defineProperty=function(t,e,n){if(y(t,e))throw new TypeError("Cannot assign to read only property '"+e+"' of "+t);var r=n.configurable;return e!==st&&(n=m(t,e,n)),b(t,e,n,r)},Object.defineProperties=function(t,e){return Object.keys(e).forEach(function(n){Object.defineProperty(t,n,e[n])}),t},Object.create=function(t,e){return typeof e!==ft||Object.isFrozen(e)||Object.keys(e).forEach(function(n){e[n]=m(t,n,e[n])}),ut(t,e)},Object.getOwnPropertyDescriptor=function(t,e){var n=at(t,e);return y(t,e)&&(n.configurable=!1),n}}function g(t,e,n){var r=n.configurable;return n=m(t,e,n),b(t,e,n,r)}function y(t,e){return t&&t[ct]&&t[ct][e]}function m(t,e,n){return n.configurable=!0,n.configurable||(t[ct]||it(t,ct,{writable:!0,value:{}}),t[ct][e]=!0),n}function b(t,e,n,r){try{return it(t,e,n)}catch(i){if(!n.configurable)throw i;typeof r==lt?delete n.configurable:n.configurable=r;try{return it(t,e,n)}catch(r){var o=null;try{o=JSON.stringify(n)}catch(t){o=o.toString()}console.log("Attempting to configure '"+e+"' with descriptor '"+o+"' on object '"+t+"' and got error, giving up: "+r)}}}function _(t,e){var n=e.WebSocket;e.EventTarget||l(e,[n.prototype]),e.WebSocket=function(t,e){var r,i,a=arguments.length>1?new n(t,e):new n(t),u=Object.getOwnPropertyDescriptor(a,"onmessage");return u&&!1===u.configurable?(r=Object.create(a),i=a,["addEventListener","removeEventListener","send","close"].forEach(function(t){r[t]=function(){var e=Array.prototype.slice.call(arguments);if("addEventListener"===t||"removeEventListener"===t){var n=e.length>0?e[0]:void 0;if(n){var o=Zone.__symbol__("ON_PROPERTY"+n);a[o]=r[o]}}return a[t].apply(a,e)}})):r=a,o(r,["close","error","message","open"],i),r};var r=e.WebSocket;for(var i in n)r[i]=n[i]}function k(t,e,n){if(!n)return e;var r=n.filter(function(e){return e.target===t});if(!r||0===r.length)return e;var o=r[0].ignoreProperties;return e.filter(function(t){return-1===o.indexOf(t)})}function w(t,e,n,r){o(t,k(t,e,n),r)}function S(t,e){if(!N||z){var n="undefined"!=typeof WebSocket;if(T()){var r=e.__Zone_ignore_on_properties;if(C){w(window,Mt.concat(["messageerror"]),r,Object.getPrototypeOf(window)),w(Document.prototype,Mt,r),void 0!==window.SVGElement&&w(window.SVGElement.prototype,Mt,r),w(Element.prototype,Mt,r),w(HTMLElement.prototype,Mt,r),w(HTMLMediaElement.prototype,gt,r),w(HTMLFrameSetElement.prototype,vt.concat(wt),r),w(HTMLBodyElement.prototype,vt.concat(wt),r),w(HTMLFrameElement.prototype,kt,r),w(HTMLIFrameElement.prototype,kt,r);var o=window.HTMLMarqueeElement;o&&w(o.prototype,St,r);var a=window.Worker;a&&w(a.prototype,Pt,r)}w(XMLHttpRequest.prototype,Tt,r);var u=e.XMLHttpRequestEventTarget;u&&w(u&&u.prototype,Tt,r),"undefined"!=typeof IDBIndex&&(w(IDBIndex.prototype,Et,r),w(IDBRequest.prototype,Et,r),w(IDBOpenDBRequest.prototype,Et,r),w(IDBDatabase.prototype,Et,r),w(IDBTransaction.prototype,Et,r),w(IDBCursor.prototype,Et,r)),n&&w(WebSocket.prototype,Ot,r)}else E(),i("XMLHttpRequest"),n&&_(t,e)}}function T(){if((C||z)&&!Object.getOwnPropertyDescriptor
promise:n.promise,reason:n.rejection});r.invoke(i)}})}}t.PromiseRejectionEvent&&(e[D("unhandledPromiseRejectionHandler")]=r("unhandledrejection"),e[D("rejectionHandledHandler")]=r("rejectionhandled"))})})});!function(){"function"!=typeof Element.prototype.matches&&(Element.prototype.matches=Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector||function(t){for(var e=this,n=(e.document||e.ownerDocument).querySelectorAll(t),r=0;n[r]&&n[r]!==e;)++r;return Boolean(n[r])}),"function"!=typeof Element.prototype.closest&&(Element.prototype.closest=function(t){for(var e=this;e&&1===e.nodeType;){if(e.matches(t))return e;e=e.parentNode}return null});var t=window;t.requestAnimationFrame||(t.requestAnimationFrame=t.webkitRequestAnimationFrame,t.cancelAnimationFrame=t.webkitCancelAnimationFrame||t.webkitCancelRequestAnimationFrame,t.requestAnimationFrame||(t.requestAnimationFrame=function(e,n){var r=(new Date).getTime(),o=Math.max(0,16-(r-lastTime)),i=t.setTimeout(function(){e(r+o)},o);return lastTime=r+o,i}),t.cancelAnimationFrame||(t.cancelAnimationFrame=function(t){clearTimeout(t)}))}(),t.__moduleExports=ke}(this.MyBundle=this.MyBundle||{});