"use strict";(self.webpackChunk_jupyterlite_xeus_sqlite_kernel=self.webpackChunk_jupyterlite_xeus_sqlite_kernel||[]).push([[895],{895:(e,s,t)=>{t.r(s),t.d(s,{default:()=>l});var i=t(635),r=t(374),a=t(168),n=t(797);class d{constructor(e){this._isDisposed=!1,this._disposed=new a.Signal(this),this._executeDelegate=new n.PromiseDelegate,this._parentHeader=void 0,this._parent=void 0;const{id:s,name:i,sendMessage:r}=e;this._id=s,this._name=i,this._sendMessage=r,this._worker=new Worker(new URL(t.p+t.u(213),t.b)),this._worker.onmessage=e=>{this._processWorkerMessage(e.data)}}async handleMessage(e){this._parent=e,this._parentHeader=e.header,await this._sendMessageToWorker(e)}async _sendMessageToWorker(e){if("input_reply"!==e.header.msg_type&&(this._executeDelegate=new n.PromiseDelegate),this._worker.postMessage({msg:e,parent:this.parent}),"input_reply"!==e.header.msg_type)return await this._executeDelegate.promise}get parentHeader(){return this._parentHeader}get parent(){return this._parent}_processWorkerMessage(e){var s,t,i,a,n,d,o;if("special_input_request"===e.type){const a=r.KernelMessage.createMessage({channel:"stdin",msgType:"input_request",session:null!==(t=null===(s=this._parentHeader)||void 0===s?void 0:s.session)&&void 0!==t?t:"",parentHeader:this._parentHeader,content:null!==(i=e.content)&&void 0!==i?i:{prompt:"",password:!1}});this._sendMessage(a)}else e.header.session=null!==(n=null===(a=this._parentHeader)||void 0===a?void 0:a.session)&&void 0!==n?n:"",e.session=null!==(o=null===(d=this._parentHeader)||void 0===d?void 0:d.session)&&void 0!==o?o:"",this._sendMessage(e);"status"===e.type&&"idle"===e.content.execution_state&&this._executeDelegate.resolve()}get ready(){return Promise.resolve()}get isDisposed(){return this._isDisposed}get disposed(){return this._disposed}dispose(){this.isDisposed||(this._isDisposed=!0,this._disposed.emit(void 0))}get id(){return this._id}get name(){return this._name}}const o=t.p+"e58e163d9cee25f19e1d4586ccd4799e79e59128faa463177e9cfd9d2ab4459f.png",p=t.p+"1d294d21c80c4bf4e239740688a0c5b9d5b34ce1d8bc7749901c022b22be74fb.png",l=[{id:"@jupyterlite/xeus-kernel-extension:kernel",autoStart:!0,requires:[i.IKernelSpecs],activate:(e,s)=>{s.register({spec:{name:"Sqlite",display_name:"Sqlite",language:"sql",argv:[],spec:{argv:[],env:{},display_name:"Sqlite",language:"sql",interrupt_mode:"message",metadata:{}},resources:{"logo-32x32":o,"logo-64x64":p}},create:async e=>new d({...e})})}}]}}]);