You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
NewEduCoderBuild/p__MoopCases__FormPanel.27b...

2 lines
23 KiB

(window.webpackJsonp=window.webpackJsonp||[]).push([[138],{X0ci:function(_e,k,h){},iIVh:function(_e,k,h){},nojB:function(_e,k,h){"use strict";h.r(k);var je=h("T2oS"),ee=h("W9HT"),oe=h("9og8"),te=h("tJVT"),V=h("k1fw"),J=h("q1tI"),l=h.n(J),Pe=h("X0ci"),Ue=h("iIVh"),A=h("Ty5D"),j=h("55Ip"),se=h("+L6B"),I=h("2/Rp"),ue=h("5NDa"),D=h("5rEg"),le=h("2qtc"),Fe=h("kLXV"),pe=h("miYZ"),G=h("tsqr"),ve=h("PpiC"),ye=h("y8nQ"),C=h("Vl3Y"),xe=h("DZo9"),ce=h("8z0m"),de=h("sRBo"),N=h("kaz8"),fe=h("LtfV"),H=h("m3rI"),$=h("Ot1p"),he=N.a.Group,me=ce.a.Dragger;function ie(E,g){var n=new FileReader;n.addEventListener("load",function(){return g(n.result)}),n.readAsDataURL(E)}var K=function(E){var g=E.callback,n=E.tags,e=n===void 0?[]:n,r=E.initialValues,u=r===void 0?{}:r,s=E.removeAttachment,i=Object(J.useState)(""),y=Object(te.a)(i,2),v=y[0],_=y[1],x=C.a.useForm(),w=Object(te.a)(x,1),R=w[0];function X(m){var b=m.cover_id,p=m.attachment_ids,Y=Object(ve.a)(m,["cover_id","attachment_ids"]);g(Object(V.a)(Object(V.a)({},Y),{},{cover_id:b==null?void 0:b.map(function(P){return P.response?P.response.id:P.uid})[(b==null?void 0:b.length)-1],attachment_ids:p?p==null?void 0:p.map(function(P){return P.response?P.response.id:P.uid}):[]}))}function B(m){return Array.isArray(m)?m:m&&m.fileList}var O={multiple:!0,beforeUpload:function(b){var p=b.size/1024/1024<100;if(!p)return G.b.error("\u8BE5\u6587\u4EF6\u65E0\u6CD5\u4E0A\u4F20\u3002\u8D85\u8FC7\u6587\u4EF6\u5927\u5C0F\u9650\u5236(100MB),\u5EFA\u8BAE\u4E0A\u4F20\u5230\u767E\u5EA6\u4E91\u7B49\u5176\u5B83\u5171\u4EAB\u5DE5\u5177\u91CC\uFF0C\u7136\u540E\u518Dtxt\u6587\u6863\u91CC\u7ED9\u51FA\u94FE\u63A5\u4EE5\u53CA\u5171\u4EAB\u5BC6\u7801\u5E76\u4E0A\u4F20"),p},action:"".concat(H.a.API_SERVER,"/api/attachments.json"),onRemove:function(b){Fe.a.confirm({centered:!0,okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",content:"\u662F\u5426\u786E\u8BA4\u5220\u9664?",onOk:function(){return s(b.response?b.response.id:b.uid)},onCancel:function(){return!1}})}};function F(m){m.file.status==="done"&&ie(m.file.originFileObj,function(b){return _(b)})}var U={showUploadList:!1,withCredentials:!0,action:"".concat(H.a.API_SERVER,"/api/attachments.json"),onChange:F};return Object(J.useEffect)(function(){u.title&&(R.setFieldsValue(u),u.cover_id.length>0&&_(H.a.IMG_SERVER+u.cover_id[0].url))},[u]),l.a.createElement(C.a,{form:R,initialValues:u,className:"moop-panel",onFinish:X},l.a.createElement(C.a.Item,{label:"\u6807\u9898",name:"title",extra:l.a.createElement("p",{className:"tip"},"\u7B80\u660E\u627C\u8981\u4ECB\u7ECD\u6587\u6863/\u89C6\u9891\u6240\u5305\u542B\u7684\u4E3B\u8981\u7684\u5185\u5BB9"),rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u6807\u9898"}]},l.a.createElement(D.a,{placeholder:"\u4F8B\u5982\uFF1A\u8F6F\u4EF6\u5DE5\u7A0B\u6559\u5B66\u6848\u4F8B"})),l.a.createElement("div",{className:"flex-container"},l.a.createElement(C.a.Item,{label:"\u4F5C\u8005",name:"author_name",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u4F5C\u8005\u540D\u79F0"}]},l.a.createElement(D.a,{placeholder:"\u8BF7\u8F93\u5165\u59D3\u540D",style:{marginRight:20,width:200}})),l.a.createElement(C.a.Item,{name:"author_school_name",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u4F5C\u8005\u5355\u4F4D\u540D\u79F0"}]},l.a.createElement(D.a,{placeholder:"\u8BF7\u8F93\u5165\u4F5C\u8005\u5355\u4F4D\u540D\u79F0",style:{width:200}}))),l.a.createElement(C.a.Item,{name:"tag_ids",label:"\u6807\u7B7E",rules:[{required:!0,message:"\u8BF7\u9009\u62E9\u4E00\u4E2A\u6807\u7B7E"}]},l.a.createElement(he,null,e.map(function(m){return l.a.createElement(N.a,{key:m.id,value:m.id}," ",m.name," ")}))),l.a.createElement(C.a.Item,{name:"publish",valuePropName:"checked"},l.a.createElement(N.a,null,"\u662F\u5426\u7533\u8BF7\u53D1\u5E03")),l.a.createElement(C.a.Item,{name:"content",label:"\u63CF\u8FF0",valuePropName:"defaultValue",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u63CF\u8FF0\u5185\u5BB9"}]},l.a.createElement($.a,{id:"moop_cases_content",height:400})),l.a.createElement(C.a.Item,{name:"attachment_ids",valuePropName:"fileList",getValueFromEvent:B},l.a.createElement(me,O,l.a.createElement("p",{className:"c-blue",style:{marginBottom:10,fontSize:18}},"\u4E0A\u4F20\u9644\u4EF6"),l.a.createElement("p",{className:"c-grey-c"},"\u4ECE\u6211\u7684\u7535\u8111\u9009\u62E9\u8981\u4E0A\u4F20\u7684\u6587\u6863\uFF1A\u6309\u4F4FCTRL\u53EF\u4EE5\u4E0A\u4F20\u591A\u4EFD\u6587\u6863\u3002\u5355\u4E2A\u6587\u4EF6\u6700\u5927\u9650\u5236\uFF1A100MB"))),l.a.createElement(C.a.Item,{name:"cover_id",label:"\u5C01\u9762\u56FE",extra:"\u4E0A\u4F20\u5C3A\u5BF8\uFF1A120*90 px",getValueFromEvent:B,valuePropName:"fileList",rules:[{required:!0,message:"\u8BF7\u4E0A\u4F20\u5C01\u9762\u56FE"}]},l.a.createElement(ce.a,U,v?l.a.createElement("img",{src:v,width:120}):l.a.createElement("a",{title:"\u4E0A\u4F20\u5C01\u9762\u56FE",className:"upload-cover"}," ",l.a.createElement(fe.a,null)," "))),l.a.createElement("div",{className:"desc"},l.a.createElement("h3",null,"\u5BA1\u6838\u8BF4\u660E"),l.a.createElement("p",null," \u5E73\u53F0\u7BA1\u7406\u5458\u5C06\u5BF9\u6BCF\u5929\u65B0\u4E0A\u4F20\u7684\u6587\u6863\u8FDB\u884C\u5BA1\u6838\uFF0C\u5BA1\u6838\u901A\u8FC7\u7684\u6587\u6863\u5C06\u516C\u5F00\u663E\u793A\uFF0C\u5426\u5219\u5C06\u79C1\u6709\u5316\u6216\u79FB\u9664 ")),l.a.createElement("div",{className:"desc"},l.a.createElement("h3",null,"\u6E29\u99A8\u63D0\u793A"),l.a.createElement("ul",{style:{padding:0}},l.a.createElement("li",null,"1.\u8BF7\u52FF\u4E0A\u4F20\u5DF2\u8BBE\u7F6E\u52A0\u5BC6\u53E3\u4EE4\u7684\u6587\u6863\u8D44\u6E90\uFF1B"),l.a.createElement("li",null,"2.\u53EF\u4EE5\u4E0A\u4F20\u7B26\u5408\u6559\u5B66\u6848\u4F8B\u6807\u51C6\u7684\u6587\u6863\u8D44\u6599\uFF0C\u5982",l.a.createElement("a",{href:"https://www.educoder.net/courses/1309/boards/5909/messages/34799",target:"_blank"}," \u6848\u4F8B\u5165\u5E93\u6807\u51C6 ")," \u3001",l.a.createElement("a",{href:"https://www.educoder.net/courses/1309/boards/5909/messages/34798",target:"_blank"},"\u6848\u4F8B\u4F7F\u7528\u8BF4\u660E\u4E66"),"\u4EE5\u53CA\u5176\u4ED6\u8D44\u6599\u7B49\uFF0C\u4E0A\u4F20\u652F\u6301\u7684\u6587\u4EF6\u6700\u5927\u5BB9\u91CF\uFF1A100MB\uFF1B"),l.a.createElement("li",null,"3.\u8BF7\u786E\u4FDD\u4E0A\u4F20\u5185\u5BB9\u65E0\u4FB5\u6743\u6216\u8FDD\u53CD\u56FD\u5BB6\u5173\u4E8E\u4E92\u8054\u7F51\u653F\u7B56\u7684\u4E0D\u826F\u884C\u4E3A\uFF1B"),l.a.createElement("li",null,"4.\u8BF7\u4F7F\u7528Chrome\uFF0CFirefox\uFF0CSafari\uFF0CIE11\uFF08\u53CA\u4EE5\u4E0A\u7248\u672C\uFF09\u6D4F\u89C8\u5668\uFF1B"))),l.a.createElement(C.a.Item,{style:{marginTop:10}},l.a.createElement(I.a,{type:"primary",htmlType:"submit"},"\u63D0\u4EA4")))},Z=h("wzkS");function S(){"use strict";/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */S=function(){return g};var E,g={},n=Object.prototype,e=n.hasOwnProperty,r=Object.defineProperty||function(o,t,a){o[t]=a.value},u=typeof Symbol=="function"?Symbol:{},s=u.iterator||"@@iterator",i=u.asyncIterator||"@@asyncIterator",y=u.toStringTag||"@@toStringTag";function v(o,t,a){return Object.defineProperty(o,t,{value:a,enumerable:!0,configurable:!0,writable:!0}),o[t]}try{v({},"")}catch(o){v=function(a,c,f){return a[c]=f}}function _(o,t,a,c){var f=t&&t.prototype instanceof F?t:F,d=Object.create(f.prototype),L=new Oe(c||[]);return r(d,"_invoke",{value:we(o,a,L)}),d}function x(o,t,a){try{return{type:"normal",arg:o.call(t,a)}}catch(c){return{type:"throw",arg:c}}}g.wrap=_;var w="suspendedStart",R="suspendedYield",X="executing",B="completed",O={};function F(){}function U(){}function m(){}var b={};v(b,s,function(){return this});var p=Object.getPrototypeOf,Y=p&&p(p(Re([])));Y&&Y!==n&&e.call(Y,s)&&(b=Y);var P=m.prototype=F.prototype=Object.create(b);function Ee(o){["next","throw","return"].forEach(function(t){v(o,t,function(a){return this._invoke(t,a)})})}function re(o,t){function a(f,d,L,T){var M=x(o[f],o,d);if(M.type!=="throw"){var ne=M.arg,q=ne.value;return q&&typeof q=="object"&&e.call(q,"__await")?t.resolve(q.__await).then(function(ae){a("next",ae,L,T)},function(ae){a("throw",ae,L,T)}):t.resolve(q).then(function(ae){ne.value=ae,L(ne)},function(ae){return a("throw",ae,L,T)})}T(M.arg)}var c;r(this,"_invoke",{value:function(d,L){function T(){return new t(function(M,ne){a(d,L,M,ne)})}return c=c?c.then(T,T):T()}})}function we(o,t,a){var c=w;return function(f,d){if(c===X)throw new Error("Generator is already running");if(c===B){if(f==="throw")throw d;return{value:E,done:!0}}for(a.method=f,a.arg=d;;){var L=a.delegate;if(L){var T=Q(L,a);if(T){if(T===O)continue;return T}}if(a.method==="next")a.sent=a._sent=a.arg;else if(a.method==="throw"){if(c===w)throw c=B,a.arg;a.dispatchException(a.arg)}else a.method==="return"&&a.abrupt("return",a.arg);c=X;var M=x(o,t,a);if(M.type==="normal"){if(c=a.done?B:R,M.arg===O)continue;return{value:M.arg,done:a.done}}M.type==="throw"&&(c=B,a.method="throw",a.arg=M.arg)}}}function Q(o,t){var a=t.method,c=o.iterator[a];if(c===E)return t.delegate=null,a==="throw"&&o.iterator.return&&(t.method="return",t.arg=E,Q(o,t),t.method==="throw")||a!=="return"&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+a+"' method")),O;var f=x(c,o.iterator,t.arg);if(f.type==="throw")return t.method="throw",t.arg=f.arg,t.delegate=null,O;var d=f.arg;return d?d.done?(t[o.resultName]=d.value,t.next=o.nextLoc,t.method!=="return"&&(t.method="next",t.arg=E),t.delegate=null,O):d:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,O)}function W(o){var t={tryLoc:o[0]};1 in o&&(t.catchLoc=o[1]),2 in o&&(t.finallyLoc=o[2],t.afterLoc=o[3]),this.tryEntries.push(t)}function Ae(o){var t=o.completion||{};t.type="normal",delete t.arg,o.completion=t}function Oe(o){this.tryEntries=[{tryLoc:"root"}],o.forEach(W,this),this.reset(!0)}function Re(o){if(o||o===""){var t=o[s];if(t)return t.call(o);if(typeof o.next=="function")return o;if(!isNaN(o.length)){var a=-1,c=function f(){for(;++a<o.length;)if(e.call(o,a))return f.value=o[a],f.done=!1,f;return f.value=E,f.done=!0,f};return c.next=c}}throw new TypeError(typeof o+" is not iterable")}return U.prototype=m,r(P,"constructor",{value:m,configurable:!0}),r(m,"constructor",{value:U,configurable:!0}),U.displayName=v(m,y,"GeneratorFunction"),g.isGeneratorFunction=function(o){var t=typeof o=="function"&&o.constructor;return!!t&&(t===U||(t.displayName||t.name)==="GeneratorFunction")},g.mark=function(o){return Object.setPrototypeOf?Object.setPrototypeOf(o,m):(o.__proto__=m,v(o,y,"GeneratorFunction")),o.prototype=Object.create(P),o},g.awrap=function(o){return{__await:o}},Ee(re.prototype),v(re.prototype,i,function(){return this}),g.AsyncIterator=re,g.async=function(o,t,a,c,f){f===void 0&&(f=Promise);var d=new re(_(o,t,a,c),f);return g.isGeneratorFunction(t)?d:d.next().then(function(L){return L.done?L.value:d.next()})},Ee(P),v(P,y,"Generator"),v(P,s,function(){return this}),v(P,"toString",function(){return"[object Generator]"}),g.keys=function(o){var t=Object(o),a=[];for(var c in t)a.push(c);return a.reverse(),function f(){for(;a.length;){var d=a.pop();if(d in t)return f.value=d,f.done=!1,f}return f.done=!0,f}},g.values=Re,Oe.prototype={constructor:Oe,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=E,this.done=!1,this.delegate=null,this.method="next",this.arg=E,this.tryEntries.forEach(Ae),!t)for(var a in this)a.charAt(0)==="t"&&e.call(this,a)&&!isNaN(+a.slice(1))&&(this[a]=E)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if(t.type==="throw")throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var a=this;function c(ne,q){return L.type="throw",L.arg=t,a.next=ne,q&&(a.method="next",a.arg=E),!!q}for(var f=this.tryEntries.length-1;f>=0;--f){var d=this.tryEntries[f],L=d.completion;if(d.tryLoc==="root")return c("end");if(d.tryLoc<=this.prev){var T=e.call(d,"catchLoc"),M=e.call(d,"finallyLoc");if(T&&M){if(this.prev<d.catchLoc)return c(d.catchLoc,!0);if(this.prev<d.finallyLoc)return c(d.finallyLoc)}else if(T){if(this.prev<d.catchLoc)return c(d.catchLoc,!0)}else{if(!M)throw new Error("try statement without catch or finally");if(this.prev<d.finallyLoc)return c(d.finallyLoc)}}}},abrupt:function(t,a){for(var c=this.tryEntries.length-1;c>=0;--c){var f=this.tryEntries[c];if(f.tryLoc<=this.prev&&e.call(f,"finallyLoc")&&this.prev<f.finallyLoc){var d=f;break}}d&&(t==="break"||t==="continue")&&d.tryLoc<=a&&a<=d.finallyLoc&&(d=null);var L=d?d.completion:{};return L.type=t,L.arg=a,d?(this.method="next",this.next=d.finallyLoc,O):this.complete(L)},complete:function(t,a){if(t.type==="throw")throw t.arg;return t.type==="break"||t.type==="continue"?this.next=t.arg:t.type==="return"?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):t.type==="normal"&&a&&(this.next=a),O},finish:function(t){for(var a=this.tryEntries.length-1;a>=0;--a){var c=this.tryEntries[a];if(c.finallyLoc===t)return this.complete(c.completion,c.afterLoc),Ae(c),O}},catch:function(t){for(var a=this.tryEntries.length-1;a>=0;--a){var c=this.tryEntries[a];if(c.tryLoc===t){var f=c.completion;if(f.type==="throw"){var d=f.arg;Ae(c)}return d}}throw new Error("illegal catch attempt")},delegateYield:function(t,a,c){return this.delegate={iterator:Re(t),resultName:a,nextLoc:c},this.method==="next"&&(this.arg=E),O}},g}var be={loading:!1,data:{},tags:[]},z=function(E){return E[E.GET_DATA=0]="GET_DATA",E[E.SET_LOADING=1]="SET_LOADING",E[E.GET_TAGS=2]="GET_TAGS",E}(z||{});function Le(E,g){switch(g.type){case z.GET_DATA:return Object(V.a)(Object(V.a)({},E),g.payload);case z.GET_TAGS:return Object(V.a)(Object(V.a)({},E),{},{tags:g.payload});case z.SET_LOADING:return Object(V.a)(Object(V.a)({},E),{},{loading:g.payload});default:throw new Error}}var ge=k.default=function(){var E,g=Object(A.m)(),n=g.caseId,e=Object(A.k)(),r=Object(J.useReducer)(Le,be),u=Object(te.a)(r,2),s=u[0],i=u[1],y=s.loading,v=s.tags,_=s.data;Object(J.useEffect)(function(){var R;function X(){return(R=R||Object(oe.a)(S().mark(function B(){var O;return S().wrap(function(U){for(;;)switch(U.prev=U.next){case 0:return U.next=2,Object(Z.b)();case 2:O=U.sent,i({type:z.GET_TAGS,payload:O.library_tags});case 4:case"end":return U.stop()}},B)}))).apply(this,arguments)}X()},[]),Object(J.useEffect)(function(){var R,X=!1;function B(){return(R=R||Object(oe.a)(S().mark(function O(){var F,U,m,b,p,Y,P,Ee,re;return S().wrap(function(Q){for(;;)switch(Q.prev=Q.next){case 0:return i({type:z.SET_LOADING,payload:!1}),Q.next=3,Object(Z.c)(n);case 3:F=Q.sent,U=F.author_name,m=F.author_school_name,b=F.content,p=F.cover,Y=F.attachments,P=F.status,Ee=F.title,re=F.tags,X||(F.status===404?e.push("/moop_cases"):i({type:z.GET_DATA,payload:{data:{title:Ee,author_name:U,author_school_name:m,content:b,tag_ids:re.map(function(W){return W.id}),publish:P==="published",attachment_ids:Y.map(function(W){return{uid:W.id,id:W.id,name:W.title,url:W.url,filesize:W.filesize,status:"done"}}),cover_id:(p==null?void 0:p.id)?[{uid:p==null?void 0:p.id,id:p==null?void 0:p.id,name:p==null?void 0:p.title,url:p==null?void 0:p.url,filesize:p==null?void 0:p.filesize,status:"done"}]:[]},loading:!1}}));case 6:case"end":return Q.stop()}},O)}))).apply(this,arguments)}return!X&&n&&B(),function(){X=!0}},[n]);function x(R){return(E=E||Object(oe.a)(S().mark(function X(B){var O,F;return S().wrap(function(m){for(;;)switch(m.prev=m.next){case 0:if(!n){m.next=6;break}return m.next=3,Object(Z.e)(n,B);case 3:e.push("/moop_cases/".concat(n,"/publish-success")),m.next=11;break;case 6:return m.next=8,Object(Z.a)(B);case 8:O=m.sent,F=O.id,F&&e.push("/moop_cases/".concat(F,"/publish-success"));case 11:case"end":return m.stop()}},X)}))).apply(this,arguments)}var w={initialValues:_,tags:v,removeAttachment:Z.d,callback:x};return l.a.createElement(ee.a,{spinning:y,delay:500},l.a.createElement("div",{className:"moop-info"},l.a.createElement("div",{className:"crumb"},l.a.createElement(j.Link,{to:"/moop_cases"},"\u6559\u5B66\u6848\u4F8B > "),l.a.createElement("span",null,"\u65B0\u5EFA")),l.a.createElement("div",{className:"title"},l.a.createElement("h2",null,"\u4E0A\u4F20\u6559\u5B66\u6848\u4F8B"),l.a.createElement(j.Link,{to:"/moop_cases"},"\u8FD4\u56DE")),l.a.createElement(K,w)))}},wzkS:function(_e,k,h){"use strict";h.d(k,"c",function(){return V}),h.d(k,"b",function(){return J}),h.d(k,"d",function(){return l}),h.d(k,"a",function(){return Pe}),h.d(k,"e",function(){return Ue});var je=h("9og8"),ee=h("ErOA"),oe;function te(){"use strict";/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */te=function(){return j};var A,j={},se=Object.prototype,I=se.hasOwnProperty,ue=Object.defineProperty||function(n,e,r){n[e]=r.value},D=typeof Symbol=="function"?Symbol:{},le=D.iterator||"@@iterator",Fe=D.asyncIterator||"@@asyncIterator",pe=D.toStringTag||"@@toStringTag";function G(n,e,r){return Object.defineProperty(n,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),n[e]}try{G({},"")}catch(n){G=function(r,u,s){return r[u]=s}}function ve(n,e,r,u){var s=e&&e.prototype instanceof fe?e:fe,i=Object.create(s.prototype),y=new E(u||[]);return ue(i,"_invoke",{value:be(n,r,y)}),i}function ye(n,e,r){try{return{type:"normal",arg:n.call(e,r)}}catch(u){return{type:"throw",arg:u}}}j.wrap=ve;var C="suspendedStart",xe="suspendedYield",ce="executing",de="completed",N={};function fe(){}function H(){}function $(){}var he={};G(he,le,function(){return this});var me=Object.getPrototypeOf,ie=me&&me(me(g([])));ie&&ie!==se&&I.call(ie,le)&&(he=ie);var K=$.prototype=fe.prototype=Object.create(he);function Z(n){["next","throw","return"].forEach(function(e){G(n,e,function(r){return this._invoke(e,r)})})}function S(n,e){function r(s,i,y,v){var _=ye(n[s],n,i);if(_.type!=="throw"){var x=_.arg,w=x.value;return w&&typeof w=="object"&&I.call(w,"__await")?e.resolve(w.__await).then(function(R){r("next",R,y,v)},function(R){r("throw",R,y,v)}):e.resolve(w).then(function(R){x.value=R,y(x)},function(R){return r("throw",R,y,v)})}v(_.arg)}var u;ue(this,"_invoke",{value:function(i,y){function v(){return new e(function(_,x){r(i,y,_,x)})}return u=u?u.then(v,v):v()}})}function be(n,e,r){var u=C;return function(s,i){if(u===ce)throw new Error("Generator is already running");if(u===de){if(s==="throw")throw i;return{value:A,done:!0}}for(r.method=s,r.arg=i;;){var y=r.delegate;if(y){var v=z(y,r);if(v){if(v===N)continue;return v}}if(r.method==="next")r.sent=r._sent=r.arg;else if(r.method==="throw"){if(u===C)throw u=de,r.arg;r.dispatchException(r.arg)}else r.method==="return"&&r.abrupt("return",r.arg);u=ce;var _=ye(n,e,r);if(_.type==="normal"){if(u=r.done?de:xe,_.arg===N)continue;return{value:_.arg,done:r.done}}_.type==="throw"&&(u=de,r.method="throw",r.arg=_.arg)}}}function z(n,e){var r=e.method,u=n.iterator[r];if(u===A)return e.delegate=null,r==="throw"&&n.iterator.return&&(e.method="return",e.arg=A,z(n,e),e.method==="throw")||r!=="return"&&(e.method="throw",e.arg=new TypeError("The iterator does not provide a '"+r+"' method")),N;var s=ye(u,n.iterator,e.arg);if(s.type==="throw")return e.method="throw",e.arg=s.arg,e.delegate=null,N;var i=s.arg;return i?i.done?(e[n.resultName]=i.value,e.next=n.nextLoc,e.method!=="return"&&(e.method="next",e.arg=A),e.delegate=null,N):i:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,N)}function Le(n){var e={tryLoc:n[0]};1 in n&&(e.catchLoc=n[1]),2 in n&&(e.finallyLoc=n[2],e.afterLoc=n[3]),this.tryEntries.push(e)}function ge(n){var e=n.completion||{};e.type="normal",delete e.arg,n.completion=e}function E(n){this.tryEntries=[{tryLoc:"root"}],n.forEach(Le,this),this.reset(!0)}function g(n){if(n||n===""){var e=n[le];if(e)return e.call(n);if(typeof n.next=="function")return n;if(!isNaN(n.length)){var r=-1,u=function s(){for(;++r<n.length;)if(I.call(n,r))return s.value=n[r],s.done=!1,s;return s.value=A,s.done=!0,s};return u.next=u}}throw new TypeError(typeof n+" is not iterable")}return H.prototype=$,ue(K,"constructor",{value:$,configurable:!0}),ue($,"constructor",{value:H,configurable:!0}),H.displayName=G($,pe,"GeneratorFunction"),j.isGeneratorFunction=function(n){var e=typeof n=="function"&&n.constructor;return!!e&&(e===H||(e.displayName||e.name)==="GeneratorFunction")},j.mark=function(n){return Object.setPrototypeOf?Object.setPrototypeOf(n,$):(n.__proto__=$,G(n,pe,"GeneratorFunction")),n.prototype=Object.create(K),n},j.awrap=function(n){return{__await:n}},Z(S.prototype),G(S.prototype,Fe,function(){return this}),j.AsyncIterator=S,j.async=function(n,e,r,u,s){s===void 0&&(s=Promise);var i=new S(ve(n,e,r,u),s);return j.isGeneratorFunction(e)?i:i.next().then(function(y){return y.done?y.value:i.next()})},Z(K),G(K,pe,"Generator"),G(K,le,function(){return this}),G(K,"toString",function(){return"[object Generator]"}),j.keys=function(n){var e=Object(n),r=[];for(var u in e)r.push(u);return r.reverse(),function s(){for(;r.length;){var i=r.pop();if(i in e)return s.value=i,s.done=!1,s}return s.done=!0,s}},j.values=g,E.prototype={constructor:E,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=A,this.done=!1,this.delegate=null,this.method="next",this.arg=A,this.tryEntries.forEach(ge),!e)for(var r in this)r.charAt(0)==="t"&&I.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=A)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if(e.type==="throw")throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function u(x,w){return y.type="throw",y.arg=e,r.next=x,w&&(r.method="next",r.arg=A),!!w}for(var s=this.tryEntries.length-1;s>=0;--s){var i=this.tryEntries[s],y=i.completion;if(i.tryLoc==="root")return u("end");if(i.tryLoc<=this.prev){var v=I.call(i,"catchLoc"),_=I.call(i,"finallyLoc");if(v&&_){if(this.prev<i.catchLoc)return u(i.catchLoc,!0);if(this.prev<i.finallyLoc)return u(i.finallyLoc)}else if(v){if(this.prev<i.catchLoc)return u(i.catchLoc,!0)}else{if(!_)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return u(i.finallyLoc)}}}},abrupt:function(e,r){for(var u=this.tryEntries.length-1;u>=0;--u){var s=this.tryEntries[u];if(s.tryLoc<=this.prev&&I.call(s,"finallyLoc")&&this.prev<s.finallyLoc){var i=s;break}}i&&(e==="break"||e==="continue")&&i.tryLoc<=r&&r<=i.finallyLoc&&(i=null);var y=i?i.completion:{};return y.type=e,y.arg=r,i?(this.method="next",this.next=i.finallyLoc,N):this.complete(y)},complete:function(e,r){if(e.type==="throw")throw e.arg;return e.type==="break"||e.type==="continue"?this.next=e.arg:e.type==="return"?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):e.type==="normal"&&r&&(this.next=r),N},finish:function(e){for(var r=this.tryEntries.length-1;r>=0;--r){var u=this.tryEntries[r];if(u.finallyLoc===e)return this.complete(u.completion,u.afterLoc),ge(u),N}},catch:function(e){for(var r=this.tryEntries.length-1;r>=0;--r){var u=this.tryEntries[r];if(u.tryLoc===e){var s=u.completion;if(s.type==="throw"){var i=s.arg;ge(u)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(e,r,u){return this.delegate={iterator:g(e),resultName:r,nextLoc:u},this.method==="next"&&(this.arg=A),N}},j}function V(A){return Object(ee.c)("libraries/".concat(A,".json"))}function J(){return Object(ee.c)("library_tags.json")}function l(A){return(oe=oe||Object(je.a)(te().mark(function j(se){var I;return te().wrap(function(D){for(;;)switch(D.prev=D.next){case 0:return D.next=2,Object(ee.b)("attachments/".concat(se,".json"));case 2:return I=D.sent,D.abrupt("return",I.status===0);case 4:case"end":return D.stop()}},j)}))).apply(this,arguments)}function Pe(A){return Object(ee.f)("libraries.json",A)}function Ue(A,j){return Object(ee.g)("libraries/".concat(A,".json"),j)}}}]);