amis-rpc-design/dist/5377.d5ed1000.bundle.js

2 lines
32 KiB
JavaScript
Raw Normal View History

2023-10-07 19:42:30 +08:00
/*! For license information please see 5377.d5ed1000.bundle.js.LICENSE.txt */
"use strict";(self.webpackChunkamis_rpc_design=self.webpackChunkamis_rpc_design||[]).push([[5377],{15377:(e,t,n)=>{n.r(t),n.d(t,{CompletionAdapter:()=>gt,DefinitionAdapter:()=>yt,DiagnosticsAdapter:()=>ct,DocumentColorAdapter:()=>Pt,DocumentFormattingEditProvider:()=>Rt,DocumentHighlightAdapter:()=>kt,DocumentLinkAdapter:()=>St,DocumentRangeFormattingEditProvider:()=>Tt,DocumentSymbolAdapter:()=>It,FoldingRangeAdapter:()=>Mt,HoverAdapter:()=>vt,ReferenceAdapter:()=>Ct,RenameAdapter:()=>xt,SelectionRangeAdapter:()=>Ft,WorkerManager:()=>oe,fromPosition:()=>lt,fromRange:()=>ht,setupMode:()=>Ot,setupMode1:()=>jt,toRange:()=>ft,toTextEdit:()=>mt});var r=n(91902),i=Object.defineProperty,o=Object.getOwnPropertyDescriptor,a=Object.getOwnPropertyNames,s=Object.prototype.hasOwnProperty,u=(e,t,n,r)=>{if(t&&"object"==typeof t||"function"==typeof t)for(let u of a(t))s.call(e,u)||u===n||i(e,u,{get:()=>t[u],enumerable:!(r=o(t,u))||r.enumerable});return e},c={};u(c,r,"default");var d,g,l,h,f,p,m,v,_,w,k,b,y,E,C,x,I,A,S,R,T,D,P,M,F,L,j,O,N,U,W,V,H,K,z,X,B,$,q,Q,G,J,Y,Z,ee,te,ne,re,ie,oe=class{_defaults;_idleCheckInterval;_lastUsedTime;_configChangeListener;_worker;_client;constructor(e){this._defaults=e,this._worker=null,this._client=null,this._idleCheckInterval=window.setInterval((()=>this._checkIfIdle()),3e4),this._lastUsedTime=0,this._configChangeListener=this._defaults.onDidChange((()=>this._stopWorker()))}_stopWorker(){this._worker&&(this._worker.dispose(),this._worker=null),this._client=null}dispose(){clearInterval(this._idleCheckInterval),this._configChangeListener.dispose(),this._stopWorker()}_checkIfIdle(){this._worker&&Date.now()-this._lastUsedTime>12e4&&this._stopWorker()}_getClient(){return this._lastUsedTime=Date.now(),this._client||(this._worker=c.editor.createWebWorker({moduleId:"vs/language/html/htmlWorker",createData:{languageSettings:this._defaults.options,languageId:this._defaults.languageId},label:this._defaults.languageId}),this._client=this._worker.getProxy()),this._client}getLanguageServiceWorker(...e){let t;return this._getClient().then((e=>{t=e})).then((t=>{if(this._worker)return this._worker.withSyncedResources(e)})).then((e=>t))}};(g=d||(d={})).MIN_VALUE=-2147483648,g.MAX_VALUE=2147483647,(h=l||(l={})).MIN_VALUE=0,h.MAX_VALUE=2147483647,(p=f||(f={})).create=function(e,t){return e===Number.MAX_VALUE&&(e=l.MAX_VALUE),t===Number.MAX_VALUE&&(t=l.MAX_VALUE),{line:e,character:t}},p.is=function(e){var t=e;return ot.objectLiteral(t)&&ot.uinteger(t.line)&&ot.uinteger(t.character)},(v=m||(m={})).create=function(e,t,n,r){if(ot.uinteger(e)&&ot.uinteger(t)&&ot.uinteger(n)&&ot.uinteger(r))return{start:f.create(e,t),end:f.create(n,r)};if(f.is(e)&&f.is(t))return{start:e,end:t};throw new Error("Range#create called with invalid arguments["+e+", "+t+", "+n+", "+r+"]")},v.is=function(e){var t=e;return ot.objectLiteral(t)&&f.is(t.start)&&f.is(t.end)},(w=_||(_={})).create=function(e,t){return{uri:e,range:t}},w.is=function(e){var t=e;return ot.defined(t)&&m.is(t.range)&&(ot.string(t.uri)||ot.undefined(t.uri))},(b=k||(k={})).create=function(e,t,n,r){return{targetUri:e,targetRange:t,targetSelectionRange:n,originSelectionRange:r}},b.is=function(e){var t=e;return ot.defined(t)&&m.is(t.targetRange)&&ot.string(t.targetUri)&&(m.is(t.targetSelectionRange)||ot.undefined(t.targetSelectionRange))&&(m.is(t.originSelectionRange)||ot.undefined(t.originSelectionRange))},(E=y||(y={})).create=function(e,t,n,r){return{red:e,green:t,blue:n,alpha:r}},E.is=function(e){var t=e;return ot.numberRange(t.red,0,1)&&ot.numberRange(t.green,0,1)&&ot.numberRange(t.blue,0,1)&&ot.numberRange(t.alpha,0,1)},(x=C||(C={})).create=function(e,t){return{range:e,color:t}},x.is=function(e){var t=e;return m.is(t.range)&&y.is(t.color)},(A=I||(I={})).create=function(e,t,n){return{label:e,textEdit:t,additionalTextEdits:n}},A.is=function(e){var t=e;return ot.string(t.label)&&(ot.undefined(t.textEdit)||K.is(t))&&(ot.undefined(t.additionalTextEdits)||ot.typedArray(t.additionalTextEdits,K.is))},(R=S||(S={})).Comment="comment",R.Imports="imports",R.Region="region",(D=T||(T={})).crea