h5educoderbuild/static/js/main.21e41f1d.chunk.js

1 line
6.0 KiB
JavaScript

(this.webpackJsonph5=this.webpackJsonph5||[]).push([[4],{102:function(e,t,n){},103:function(e,t,n){},173:function(e,t,n){"use strict";n.r(t);var a=n(0),r=n.n(a),o=n(17),i=n.n(o),c=(n(102),n(103),n(58)),u=n(16),s=(n(60),n(61),n(63),n(62),n(64),r.a.Component,n(59)),l=Object(a.lazy)((function(){return Promise.all([n.e(0),n.e(2),n.e(11)]).then(n.bind(null,647))})),d=Object(a.lazy)((function(){return Promise.all([n.e(0),n.e(2),n.e(10)]).then(n.bind(null,648))})),f=Object(a.lazy)((function(){return Promise.all([n.e(0),n.e(12)]).then(n.bind(null,645))}));Object(s.b)(),Boolean("localhost"===window.location.hostname||"[::1]"===window.location.hostname||window.location.hostname.match(/^127(?:\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)){3}$/)),i.a.render(r.a.createElement((function(){return r.a.createElement("div",{className:"app"},r.a.createElement(c.a,{basename:"/h5educoderbuild"},r.a.createElement(a.Suspense,{fallback:r.a.createElement("div",null)},r.a.createElement(u.c,null,r.a.createElement(u.a,{path:"/educodermd/Notice/:courseid/:infromid/:educoder_session/:autologin_trustie",component:f}),r.a.createElement(u.a,{path:"/educodermd/hack/:identifier/:educoder_session/:autologin_trustie",component:d}),r.a.createElement(u.a,{path:"/educodermd/:identifier/:educoder_session/:autologin_trustie",component:l})))))}),null),document.getElementById("root")),"serviceWorker"in navigator&&navigator.serviceWorker.ready.then((function(e){e.unregister()})).catch((function(e){}))},59:function(e,t,n){"use strict";n.d(t,"c",(function(){return w})),n.d(t,"b",(function(){return y})),n.d(t,"a",(function(){return O})),n(93);var a,r=n(13),o=n.n(r),i=n(29),c=n.n(i),u=n(40),s=n(31),l=n.n(s),d=n(32),f=n.n(d),p=n(39),h=n.n(p),m=!1;window._debugType="";var v=function(e,t){var n={},a=Object.assign(!0,e,{}),r=[];return Object.keys(a).sort().forEach((function(e){if(a[e]=!0===a[e]?"true":a[e],a[e]=!1===a[e]?"false":a[e],"GET"===t){if(null!==a[e]){if("object"==typeof a[e]&&(!Array.isArray(a[e])||Array.isArray(a[e])&&!a[e].length))return;var o=null===a[e]||"null"===a[e]?"":a[e];r.push("".concat(e,"=").concat("string"==typeof o||"number"==typeof o?decodeURIComponent(o):JSON.stringify(o)))}}else{var i=null===a[e]||"null"===a[e]?"":a[e];r.push("".concat(e,"=").concat("string"==typeof i||"number"==typeof i?i:JSON.stringify(i))),a[e],n[e]=a[e]}})),r.join("&")};function b(e){try{var t,n,a=Date.now(),r="method="+e.method.toUpperCase()+"&"+(null!==(t=Object.keys((null==e?void 0:e.params)||{}))&&void 0!==t&&t.length&&function(e){function t(t){"object"==typeof e[t]?Array.isArray(e[t])&&e[t].forEach((function(e){n+="&"+t+"[]="+e})):void 0!==e[t]&&(n+="&"+t+"="+e[t])}e=e||{};var n="";for(var a in e)t(a);return n.substr(1)}(e.params)?v(e.params,e.method)+"&":"")+(null!==(n=Object.keys(e.data||{}))&&void 0!==n&&n.length?v(e.data)+"&":"")+"ak=e83900ca9be33747397cc81a8f68ac11&sk=6de3a75ae5718cde1e0907a593afd01f&time="+a;e.headers["X-EDU-Timestamp"]=a,-1<navigator.userAgent.indexOf("MicroMessenger")?e.headers["X-EDU-Signature"]=h()(r):e.headers["X-EDU-Signature"]=h()(function(e){var t,n,a,r="";for(t=0;t<e.length;t+=3)for(a=e.charCodeAt(t)<<16|e.charCodeAt(t+1)<<8|e.charCodeAt(t+2),n=0;n<4;n+=1)t+.75*n>=e.length?r+="=":r+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(a>>>6*(3-n)&63);return r}(r))}catch(e){}return e}function w(e){e.map((function(e,t){"educoder_session"===e.id?(l.a.save("_educoder_session",e.value,{path:"/"}),l.a.save("_educoder_session",e.value,{domain:".educoder.net",path:"/"})):(l.a.save("autologin_trustie",e.value,{path:"/"}),l.a.save("autologin_trustie",e.value,{domain:".educoder.net",path:"/"}))}))}function g(e){var t=[function(e){var t=e[1];return"/tasks/".concat(t,"/choose_build.json")}],n=e.url;if(-1!==n.indexOf(".json"))return e;e.withCredentials=!1;var a,r,o=n.split("?"),i=o[0];return(a={}[i])||[/\/api\/v1\/games\/(\w*)\/choose_build/i].forEach((function(n,c){var u=i.match(n);if(u){var s=t[c];return a=s&&s(u),r="".concat(a,"?").concat(o[1]),e.url=r,e}})),e}function y(){var e="https://test-data.educoder.net",t={};window.setfalseInRequestMap=function(e){t[e]=!1},f.a.interceptors.request.use(function(){var n=Object(u.a)(c.a.mark((function n(r){var o,i;return c.a.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:if(-1!=r.url.indexOf(e)||-1!=r.url.indexOf(":"))return n.abrupt("return",r);n.next=2;break;case 2:if(g(r),o="/api".concat(r.url),r.params&&null!=r.params.redirect_uri&&-1!=r.params.redirect_uri.indexOf("otherloginqq")&&(o="".concat(r.url)),i=h()("79e33abd4b6588941ab7622aed1e67e8"+a),"true"!="".concat(r[0])&&("3000"===window.location.port?(r.url="".concat(e).concat(o),r.url.indexOf("?"),r.url="".concat(r.url),r.params=r.params||{},r.params.debug=""):(r.url=o,r.url.indexOf("?"),r.url="".concat(r.url),r.params=r.params||{}),r.params.randomcode="",r.params.client_key=i),"post"!==r.method){n.next=10;break}if(!0===t[r.url])return n.abrupt("return",!1);n.next=10;break;case 10:return-1===r.url.indexOf("update_file")&&(t[r.url]=!0,window.setTimeout("setfalseInRequestMap('"+r.url+"')",900)),b(r),n.abrupt("return",r);case 13:case"end":return n.stop()}}),n)})));return function(e){return n.apply(this,arguments)}}(),(function(e){return Promise.reject(e)})),f.a.interceptors.response.use((function(e){if(void 0!==e){var n=e.data,a=n.status,r=n.message;if(-1===a)throw window.location.pathname.startsWith("/tasks/"),o.a.info(r||"\u670d\u52a1\u5668\u5f02\u5e38\uff0c\u8bf7\u8054\u7cfb\u7ba1\u7406\u5458\u3002"),new f.a.Cancel("Operation canceled by the user.");return 401===a&&o.a.info("\u8bf7\u5148\u767b\u5f55"),403!==a&&"403"!==a||o.a.info("\u8bbf\u95ee\u5f02\u5e38\uff0c\u65e0\u6743\u9650\u3002"),404===a&&o.a.info("\u8bbf\u95ee\u5f02\u5e38\uff0c\u63a5\u53e3404\u3002"),500===a&&o.a.info("\u8bbf\u95ee\u5f02\u5e38\uff0c\u63a5\u53e3500\u3002"),501===a&&(!1===m&&(m=!0,o.a.info(r||"\u8bbf\u95ee\u5f02\u5e38\uff0c\u8bf7\u6c42\u4e0d\u5408\u7406")),window.setTimeout((function(){m=!1}),2e3)),t[e.config.url]=!1,e}}))}var O=0<location.href.indexOf("test-")||0<location.href.indexOf("localhost")?"https://test-newweb.educoder.net":"https://www.educoder.net"},97:function(e,t,n){e.exports=n(173)}},[[97,5,6]]]);