MCPcopy
hub / github.com/JuliaPluto/Pluto.jl / push

Method push

frontend-dist-offline/editor.eded5de0.js:1489–1489  ·  view source on GitHub ↗
(e)

Source from the content-addressed store, hash-verified

1487 <span class="text">${yq(r?"t_edit_or_run_view_code_cancel":"t_edit_or_run_view_code")}</span>
1488 </button>
1489 `},Ty=(e,t)=>{setTimeout(()=>{if(!t.state.inspecting_hidden_code)return;let n=[...e.target.closest("pluto-editor").querySelectorAll("pluto-cell.code_folded > pluto-shoulder > button")],i=(0+(window.innerHeight||document.documentElement.clientHeight))/2,r=n.map(e=>{let t=e.getBoundingClientRect();return{btn:e,distance:Math.abs((t.top+t.bottom)/2-i)}}),o=tW.first(tW.sortBy(r,"distance"));null!=o&&(o.btn.closest("pluto-cell").scrollIntoView({behavior:"smooth",block:"nearest",inline:"nearest"}),setTimeout(()=>{t.state.inspecting_hidden_code&&yM({type:"info",body:eA`← Click on this icon to read hidden code.`,source_element:o.btn})},600))},200)},Tv=async e=>{let t;if(window.pluto_injected_environment)t=window.pluto_injected_environment.environment;else{let{default:n}=await import(e.session_options.server.injected_javascript_data_url);t=n}return t},Tw="starting",Tx="waiting_to_restart",TQ="waiting_for_permission";Symbol("init"),Symbol("before"),Symbol("after"),Symbol("destroy"),Symbol("promiseResolve");var TS=(Object.assign(Object.create(null),{NONE:0,DIRHANDLE:1,DNSCHANNEL:2,ELDHISTOGRAM:3,FILEHANDLE:4,FILEHANDLECLOSEREQ:5,BLOBREADER:6,FSEVENTWRAP:7,FSREQCALLBACK:8,FSREQPROMISE:9,GETADDRINFOREQWRAP:10,GETNAMEINFOREQWRAP:11,HEAPSNAPSHOT:12,HTTP2SESSION:13,HTTP2STREAM:14,HTTP2PING:15,HTTP2SETTINGS:16,HTTPINCOMINGMESSAGE:17,HTTPCLIENTREQUEST:18,JSSTREAM:19,JSUDPWRAP:20,MESSAGEPORT:21,PIPECONNECTWRAP:22,PIPESERVERWRAP:23,PIPEWRAP:24,PROCESSWRAP:25,PROMISE:26,QUERYWRAP:27,QUIC_ENDPOINT:28,QUIC_LOGSTREAM:29,QUIC_PACKET:30,QUIC_SESSION:31,QUIC_STREAM:32,QUIC_UDP:33,SHUTDOWNWRAP:34,SIGNALWRAP:35,STATWATCHER:36,STREAMPIPE:37,TCPCONNECTWRAP:38,TCPSERVERWRAP:39,TCPWRAP:40,TTYWRAP:41,UDPSENDWRAP:42,UDPWRAP:43,SIGINTWATCHDOG:44,WORKER:45,WORKERHEAPSNAPSHOT:46,WRITEWRAP:47,ZLIB:48,CHECKPRIMEREQUEST:49,PBKDF2REQUEST:50,KEYPAIRGENREQUEST:51,KEYGENREQUEST:52,KEYEXPORTREQUEST:53,CIPHERREQUEST:54,DERIVEBITSREQUEST:55,HASHREQUEST:56,RANDOMBYTESREQUEST:57,RANDOMPRIMEREQUEST:58,SCRYPTREQUEST:59,SIGNREQUEST:60,TLSWRAP:61,VERIFYREQUEST:62}),100),TX=class{__unenv__=!0;type;_asyncId;_triggerAsyncId;constructor(e,t=0){this.type=e,this._asyncId=-1*TS++,this._triggerAsyncId="number"==typeof t?t:t?.triggerAsyncId}static bind(e,t,n){return new TP(t??"anonymous").bind(e)}bind(e,t){let n=(...n)=>this.runInAsyncScope(e,t,...n);return n.asyncResource=this,n}runInAsyncScope(e,t,...n){return e.apply(t,n)}emitDestroy(){return this}asyncId(){return this._asyncId}triggerAsyncId(){return this._triggerAsyncId}},TP=globalThis.AsyncResource||TX;function TR(e){return Object.assign(()=>{throw Error(`[unenv] ${e} is not implemented yet!`)},{__unenv__:!0})}var TT=10,TL=Object.getPrototypeOf(Object.getPrototypeOf(async function*(){}).prototype),Tj=Error,TU=Error,TE=Error,Tz=Error,TA=Error,TZ=Symbol.for("nodejs.rejection"),Tq=Symbol.for("kCapture"),TC=Symbol.for("events.errorMonitor"),TW=Symbol.for("shapeMode"),TK=Symbol.for("events.maxEventTargetListeners"),TV=Symbol.for("kEnhanceStackBeforeInspector"),TM=Symbol.for("nodejs.watermarkData"),TD=Symbol.for("kEventEmitter"),TY=Symbol.for("kAsyncResource"),TN=Symbol.for("kFirstEventParam"),TI=Symbol.for("kResistStopPropagation"),TB=Symbol.for("events.maxEventTargetListenersWarned"),TF=class e{_events=void 0;_eventsCount=0;_maxListeners=TT;[Tq]=!1;[TW]=!1;static captureRejectionSymbol=TZ;static errorMonitor=TC;static kMaxEventTargetListeners=TK;static kMaxEventTargetListenersWarned=TB;static usingDomains=!1;static get on(){return TH}static get once(){return T0}static get getEventListeners(){return T2}static get getMaxListeners(){return T9}static get addAbortListener(){return T1}static get EventEmitterAsyncResource(){return TG}static get EventEmitter(){return e}static setMaxListeners(e=TT,...t){if(0===t.length)TT=e;else for(let n of t)if(T8(n))n[TK]=e,n[TB]=!1;else if("function"==typeof n.setMaxListeners)n.setMaxListeners(e);else throw new TE("eventTargets",["EventEmitter","EventTarget"],n)}static listenerCount(t,n){if("function"==typeof t.listenerCount)return t.listenerCount(n);e.prototype.listenerCount.call(t,n)}static init(){throw Error("EventEmitter.init() is not implemented.")}static get captureRejections(){return this[Tq]}static set captureRejections(e){this[Tq]=e}static get defaultMaxListeners(){return TT}static set defaultMaxListeners(e){TT=e}constructor(t){void 0===this._events||this._events===Object.getPrototypeOf(this)._events?(this._events={__proto__:null},this._eventsCount=0,this[TW]=!1):this[TW]=!0,this._maxListeners=this._maxListeners||void 0,t?.captureRejections?this[Tq]=!!t.captureRejections:this[Tq]=e.prototype[Tq]}setMaxListeners(e){return this._maxListeners=e,this}getMaxListeners(){return T4(this)}emit(t,...n){let i="error"===t,r=this._events;if(void 0!==r)i&&void 0!==r[TC]&&this.emit(TC,...n),i=i&&void 0===r.error;else if(!i)return!1;if(i){let t,i;if(n.length>0&&(t=n[0]),t instanceof Error){try{let n={};Error.captureStackTrace?.(n,e.prototype.emit),Object.defineProperty(t,TV,{__proto__:null,value:Function.prototype.bind(Le,this,t,n),configurable:!0})}catch{}throw t}try{i=t}catch{i=t}let r=new TU(i);throw r.context=t,r}let o=r[t];if(void 0===o)return!1;if("function"==typeof o){let e=o.apply(this,n);null!=e&&T6(this,e,t,n)}else{let e=o.length,i=Lo(o);for(let r=0;r<e;++r){let e=i[r].apply(this,n);null!=e&&T6(this,e,t,n)}}return!0}addListener(e,t){return Lt(this,e,t,!1),this}on(e,t){return this.addListener(e,t)}prependListener(e,t){return Lt(this,e,t,!0),this}once(e,t){return this.on(e,Li(this,e,t)),this}prependOnceListener(e,t){return this.prependListener(e,Li(this,e,t)),this}removeListener(e,t){let n=this._events;if(void 0===n)return this;let i=n[e];if(void 0===i)return this;if(i===t||i.listener===t)this._eventsCount-=1,this[TW]?n[e]=void 0:0===this._eventsCount?this._events={__proto__:null}:(delete n[e],n.removeListener&&this.emit("removeListener",e,i.listener||t));else if("function"!=typeof i){let r=-1;for(let e=i.length-1;e>=0;e--)if(i[e]===t||i[e].listener===t){r=e;break}if(r<0)return this;0===r?i.shift():function(e,t){for(;t+1<e.length;t++)e[t]=e[t+1];e.pop()}(i,r),1===i.length&&(n[e]=i[0]),void 0!==n.removeListener&&this.emit("removeListener",e,t)}return this}off(e,t){return this.removeListener(e,t)}removeAllListeners(e){let t=this._events;if(void 0===t)return this;if(void 0===t.removeListener)return 0==arguments.length?(this._events={__proto__:null},this._eventsCount=0):void 0!==t[e]&&(0==--this._eventsCount?this._events={__proto__:null}:delete t[e]),this[TW]=!1,this;if(0==arguments.length){for(let e of Reflect.ownKeys(t))"removeListener"!==e&&this.removeAllListeners(e);return this.removeAllListeners("removeListener"),this._events={__proto__:null},this._eventsCount=0,this[TW]=!1,this}let n=t[e];if("function"==typeof n)this.removeListener(e,n);else if(void 0!==n)for(let t=n.length-1;t>=0;t--)this.removeListener(e,n[t]);return this}listeners(e){return Lr(this,e,!0)}rawListeners(e){return Lr(this,e,!1)}eventNames(){return this._eventsCount>0?Reflect.ownKeys(this._events):[]}listenerCount(e,t){let n=this._events;if(void 0!==n){let i=n[e];if("function"==typeof i)return null!=t?+(t===i||t===i.listener):1;if(void 0!==i){if(null!=t){let e=0;for(let n=0,r=i.length;n<r;n++)(i[n]===t||i[n].listener===t)&&e++;return e}return i.length}}return 0}},TG=class extends TF{constructor(e){let t;"string"==typeof e?(t=e,e=void 0):t=e?.name||new.target.name,super(e),this[TY]=new TJ(this,t,e)}emit(e,...t){if(void 0===this[TY])throw new Tj("EventEmitterAsyncResource");let{asyncResource:n}=this;return Array.prototype.unshift(t,super.emit,this,e),Reflect.apply(n.runInAsyncScope,n,t)}emitDestroy(){if(void 0===this[TY])throw new Tj("EventEmitterAsyncResource");this.asyncResource.emitDestroy()}get asyncId(){if(void 0===this[TY])throw new Tj("EventEmitterAsyncResource");return this.asyncResource.asyncId()}get triggerAsyncId(){if(void 0===this[TY])throw new Tj("EventEmitterAsyncResource");return this.asyncResource.triggerAsyncId()}get asyncResource(){if(void 0===this[TY])throw new Tj("EventEmitterAsyncResource");return this[TY]}},TJ=class extends TP{constructor(e,t,n){super(t,n),this[TD]=e}get eventEmitter(){if(void 0===this[TD])throw new Tj("EventEmitterReferencingAsyncResource");return this[TD]}},TH=function(e,t,n={}){let i,r=n.signal;if(r?.aborted)throw new Tz(void 0,{cause:r?.reason});let o=n.highWaterMark??n.highWatermark??Number.MAX_SAFE_INTEGER,a=n.lowWaterMark??n.lowWatermark??1,s=new T5,l=new T5,c=!1,u=null,d=!1,_=0,h=Object.setPrototypeOf({next(){if(_){let t=s.shift();return _--,c&&_<a&&(e.resume?.(),c=!1),Promise.resolve(La(t,!1))}if(u){let e=Promise.reject(u);return u=null,e}return d?b():new Promise(function(e,t){l.push({resolve:e,reject:t})})},return:()=>b(),throw(e){if(!e||!(e instanceof Error))throw new TE("EventEmitter.AsyncIterator","Error",e);g(e)},[Symbol.asyncIterator](){return this},[TM]:{get size(){return _},get low(){return a},get high(){return o},get isPaused(){return c}}},TL),{addEventListener:p,removeAll:$}=(i=[],{addEventListener(e,t,n,r){Ll(e,t,n,r),Array.prototype.push(i,[e,t,n,r])},removeAll(){for(;i.length>0;)Reflect.apply(Ls,void 0,i.pop())}});p(e,t,n[TN]?m:function(...e){return m(e)}),"error"!==t&&"function"==typeof e.on&&p(e,"error",g);let O=n?.close;if(O?.length)for(let t of O)p(e,t,b);let f=r?T1(r,function(){g(new Tz(void 0,{cause:r?.reason}))}):null;return h;function m(t){l.isEmpty()?(_++,!c&&_>o&&(c=!0,e.pause?.()),s.push(t)):l.shift().resolve(La(t,!1))}function g(e){l.isEmpty()?u=e:l.shift().reject(e),b()}function b(){f?.[Symbol.dispose](),$(),d=!0;let e=La(void 0,!0);for(;!l.isEmpty();)l.shift().resolve(e);return Promise.resolve(e)}},T0=async function(e,t,n={}){let i=n?.signal;if(i?.aborted)throw new Tz(void 0,{cause:i?.reason});return new Promise((n,r)=>{let o=n=>{"function"==typeof e.removeListener&&e.removeListener(t,a),null!=i&&Ls(i,"abort",s),r(n)},a=(...t)=>{"function"==typeof e.removeListener&&e.removeListener("error",o),null!=i&&Ls(i,"abort",s),n(t)};function s(){Ls(e,t,a),Ls(e,"error",o),r(new Tz(void 0,{cause:i?.reason}))}Ll(e,t,a,{__proto__:null,once:!0,[TI]:!0}),"error"!==t&&"function"==typeof e.once&&e.once("error",o),null!=i&&Ll(i,"abort",s,{__proto__:null,once:!0,[TI]:!0})})},T1=function(e,t){let n;if(void 0===e)throw new TE("signal","AbortSignal",e);return e.aborted?queueMicrotask(()=>t()):(e.addEventListener("abort",t,{__proto__:null,once:!0,[TI]:!0}),n=()=>{e.removeEventListener("abort",t)}),{__proto__:null,[Symbol.dispose](){n?.()}}},T2=function(e,t){if("function"==typeof e.listeners)return e.listeners(t);if(T8(e)){let n=e[kEvents].get(t),i=[],r=n?.next;for(;r?.listener!==void 0;){let e=r.listener?.deref?r.listener.deref():r.listener;i.push(e),r=r.next}return i}throw new TE("emitter",["EventEmitter","EventTarget"],e)},T9=function(e){if("function"==typeof e?.getMaxListeners)return T4(e);if(e?.[TK])return e[TK];throw new TE("emitter",["EventEmitter","EventTarget"],e)},T7=class{bottom;top;list;next;constructor(){this.bottom=0,this.top=0,this.list=Array(2048),this.next=null}isEmpty(){return this.top===this.bottom}isFull(){return(this.top+1&2047)===this.bottom}push(e){this.list[this.top]=e,this.top=this.top+1&2047}shift(){let e=this.list[this.bottom];return void 0===e?null:(this.list[this.bottom]=void 0,this.bottom=this.bottom+1&2047,e)}},T5=class{head;tail;constructor(){this.head=this.tail=new T7}isEmpty(){return this.head.isEmpty()}push(e){this.head.isFull()&&(this.head=this.head.next=new T7),this.head.push(e)}shift(){let e=this.tail,t=e.shift();return e.isEmpty()&&null!==e.next&&(this.tail=e.next,e.next=null),t}};function T8(e){return"function"==typeof e?.addEventListener}function T6(e,t,n,i){if(e[Tq])try{let r=t.then;"function"==typeof r&&r.call(t,void 0,function(t){setTimeout(T3,0,e,t,n,i)})}catch(t){e.emit("error",t)}}function T3(e,t,n,i){if("function"==typeof e[TZ])e[TZ](t,n,...i);else{let n=e[Tq];try{e[Tq]=!1,e.emit("error",t)}finally{e[Tq]=n}}}function T4(e){return void 0===e._maxListeners?TT:e._maxListeners}function Le(e,t){let n="";try{let{name:e}=this.constructor;"EventEmitter"!==e&&(n=` on ${e} instance`)}catch{}let i=`
1490Emitted 'error' event${n} at:
1491`,r=(t.stack||"").split(`
1492`).slice(1);return e.stack+i+r.join(`

Callers 15

YFunction · 0.45
IFunction · 0.45
JFunction · 0.45
editor.eded5de0.jsFile · 0.45
ebFunction · 0.45
eyFunction · 0.45
evFunction · 0.45
eEFunction · 0.45
sFunction · 0.45
tyFunction · 0.45
setFunction · 0.45
tTFunction · 0.45

Calls 1

isFullMethod · 0.45

Tested by

no test coverage detected