@langgraph-js/ui 2.2.1 → 2.2.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -101,7 +101,7 @@ Error generating stack: `+p.message+`
|
|
|
101
101
|
* **记忆生命周期管理:** 对记忆条目进行**全生命周期管理**,包括创建、更新、检索和删除。
|
|
102
102
|
* **分段与标签支持:** 支持**分段或打标签的记忆条目**,方便分类和高效检索。
|
|
103
103
|
* **存储选项灵活:** 提供**临时和永久两种存储选项**,以适应不同类型信息的存储需求。
|
|
104
|
-
`,parameters:[{name:"path",type:"string",description:"记忆路径(创建时需要)"},{name:"tags",type:"string[]",description:"记忆标签(创建或更新时需要)"},{name:"content",type:"string",description:"记忆内容(创建或更新时需要)"},{name:"action",type:"string",enum:["create","update","delete"],description:"操作类型:create(创建)、update(更新)、delete(删除)"},{name:"id",type:"string",description:"记忆ID(更新或删除时需要,创建时会自动生成)",required:!1},{name:"referencePath",type:"string",description:"引用文档的 URL",required:!1}],handler:async t=>{const{content:n,action:r,id:i,tags:a,path:o,referencePath:l}=t;if((r==="delete"||r==="update")&&!i)throw new Error("删除或更新记忆时必须提供记忆ID");if((r==="create"||r==="update")&&!n)throw new Error("创建或更新记忆时必须提供内容");try{if(r==="delete")return await e.delete(Number(i)),`已删除记忆 ${i}`;const c={text:n,content:$Z(n),createdAt:new Date().toISOString(),updatedAt:new Date().toISOString(),namespace:MZ(),tags:a,path:o,type:"document",referencePath:l};return r==="create"?`已创建记忆 ${await e.insert(c)}`:(await e.update(Number(i),c),`已更新记忆 ${i}`)}catch(c){throw new Error(`记忆操作失败: ${c}`)}}}),searchMemory:XT({name:"search_memory",description:"搜索长期记忆中的相关信息,帮助维护对话上下文",parameters:[{name:"query",type:"string",description:"请使用中文关键词进行搜索"},{name:"tags",type:"string[]",description:"记忆标签",required:!1},{name:"path",type:"string",description:"记忆路径,memory://user_id/path/to/memory_name",required:!1},{name:"limit",type:"number",description:"返回结果的最大数量(默认10)",required:!1}],handler:async t=>{const{query:n,limit:r=10,tags:i,path:a}=t;if(!n||typeof n=="string"&&n.trim().length===0)throw new Error("搜索查询不能为空");try{const o=await e.query(n.toString(),{limit:r});return{query:n.toString(),results:o,total:o.length,limit:Number(r)}}catch(o){throw new Error(`搜索记忆失败: ${o}`)}}})}),xw=(e,t)=>t.some(n=>e instanceof n);let uN,cN;function IZ(){return uN||(uN=[IDBDatabase,IDBObjectStore,IDBIndex,IDBCursor,IDBTransaction])}function PZ(){return cN||(cN=[IDBCursor.prototype.advance,IDBCursor.prototype.continue,IDBCursor.prototype.continuePrimaryKey])}const ww=new WeakMap,p0=new WeakMap,Cp=new WeakMap;function LZ(e){const t=new Promise((n,r)=>{const i=()=>{e.removeEventListener("success",a),e.removeEventListener("error",o)},a=()=>{n(gs(e.result)),i()},o=()=>{r(e.error),i()};e.addEventListener("success",a),e.addEventListener("error",o)});return Cp.set(t,e),t}function zZ(e){if(ww.has(e))return;const t=new Promise((n,r)=>{const i=()=>{e.removeEventListener("complete",a),e.removeEventListener("error",o),e.removeEventListener("abort",o)},a=()=>{n(),i()},o=()=>{r(e.error||new DOMException("AbortError","AbortError")),i()};e.addEventListener("complete",a),e.addEventListener("error",o),e.addEventListener("abort",o)});ww.set(e,t)}let Sw={get(e,t,n){if(e instanceof IDBTransaction){if(t==="done")return ww.get(e);if(t==="store")return n.objectStoreNames[1]?void 0:n.objectStore(n.objectStoreNames[0])}return gs(e[t])},set(e,t,n){return e[t]=n,!0},has(e,t){return e instanceof IDBTransaction&&(t==="done"||t==="store")?!0:t in e}};function w5(e){Sw=e(Sw)}function qZ(e){return PZ().includes(e)?function(...t){return e.apply(Ew(this),t),gs(this.request)}:function(...t){return gs(e.apply(Ew(this),t))}}function FZ(e){return typeof e=="function"?qZ(e):(e instanceof IDBTransaction&&zZ(e),xw(e,IZ())?new Proxy(e,Sw):e)}function gs(e){if(e instanceof IDBRequest)return LZ(e);if(p0.has(e))return p0.get(e);const t=FZ(e);return t!==e&&(p0.set(e,t),Cp.set(t,e)),t}const Ew=e=>Cp.get(e);function BZ(e,t,{blocked:n,upgrade:r,blocking:i,terminated:a}={}){const o=indexedDB.open(e,t),l=gs(o);return r&&o.addEventListener("upgradeneeded",c=>{r(gs(o.result),c.oldVersion,c.newVersion,gs(o.transaction),c)}),n&&o.addEventListener("blocked",c=>n(c.oldVersion,c.newVersion,c)),l.then(c=>{a&&c.addEventListener("close",()=>a()),i&&c.addEventListener("versionchange",f=>i(f.oldVersion,f.newVersion,f))}).catch(()=>{}),l}const UZ=["get","getKey","getAll","getAllKeys","count"],VZ=["put","add","delete","clear"],m0=new Map;function fN(e,t){if(!(e instanceof IDBDatabase&&!(t in e)&&typeof t=="string"))return;if(m0.get(t))return m0.get(t);const n=t.replace(/FromIndex$/,""),r=t!==n,i=VZ.includes(n);if(!(n in(r?IDBIndex:IDBObjectStore).prototype)||!(i||UZ.includes(n)))return;const a=async function(o,...l){const c=this.transaction(o,i?"readwrite":"readonly");let f=c.store;return r&&(f=f.index(l.shift())),(await Promise.all([f[n](...l),i&&c.done]))[0]};return m0.set(t,a),a}w5(e=>({...e,get:(t,n,r)=>fN(t,n)||e.get(t,n,r),has:(t,n)=>!!fN(t,n)||e.has(t,n)}));const HZ=["continue","continuePrimaryKey","advance"],dN={},kw=new WeakMap,S5=new WeakMap,GZ={get(e,t){if(!HZ.includes(t))return e[t];let n=dN[t];return n||(n=dN[t]=function(...r){kw.set(this,S5.get(this)[t](...r))}),n}};async function*YZ(...e){let t=this;if(t instanceof IDBCursor||(t=await t.openCursor(...e)),!t)return;t=t;const n=new Proxy(t,GZ);for(S5.set(n,t),Cp.set(n,Ew(t));t;)yield n,t=await(kw.get(n)||t.continue()),kw.delete(n)}function hN(e,t){return t===Symbol.asyncIterator&&xw(e,[IDBIndex,IDBObjectStore,IDBCursor])||t==="iterate"&&xw(e,[IDBIndex,IDBObjectStore])}w5(e=>({...e,get(t,n,r){return hN(t,n)?YZ:e.get(t,n,r)},has(t,n){return hN(t,n)||e.has(t,n)}}));class ZZ{constructor(t){De(this,"isInitialized",!1);De(this,"config");this.config=t}}const KZ="ENTRIES",E5="KEYS",k5="VALUES",gn="";class g0{constructor(t,n){const r=t._tree,i=Array.from(r.keys());this.set=t,this._type=n,this._path=i.length>0?[{node:r,keys:i}]:[]}next(){const t=this.dive();return this.backtrack(),t}dive(){if(this._path.length===0)return{done:!0,value:void 0};const{node:t,keys:n}=Ao(this._path);if(Ao(n)===gn)return{done:!1,value:this.result()};const r=t.get(Ao(n));return this._path.push({node:r,keys:Array.from(r.keys())}),this.dive()}backtrack(){if(this._path.length===0)return;const t=Ao(this._path).keys;t.pop(),!(t.length>0)&&(this._path.pop(),this.backtrack())}key(){return this.set._prefix+this._path.map(({keys:t})=>Ao(t)).filter(t=>t!==gn).join("")}value(){return Ao(this._path).node.get(gn)}result(){switch(this._type){case k5:return this.value();case E5:return this.key();default:return[this.key(),this.value()]}}[Symbol.iterator](){return this}}const Ao=e=>e[e.length-1],XZ=(e,t,n)=>{const r=new Map;if(t===void 0)return r;const i=t.length+1,a=i+n,o=new Uint8Array(a*i).fill(n+1);for(let l=0;l<i;++l)o[l]=l;for(let l=1;l<a;++l)o[l*i]=l;return A5(e,t,n,r,o,1,i,""),r},A5=(e,t,n,r,i,a,o,l)=>{const c=a*o;e:for(const f of e.keys())if(f===gn){const d=i[c-1];d<=n&&r.set(l,[e.get(f),d])}else{let d=a;for(let h=0;h<f.length;++h,++d){const m=f[h],g=o*d,v=g-o;let w=i[g];const b=Math.max(0,d-n-1),_=Math.min(o-1,d+n);for(let S=b;S<_;++S){const x=m!==t[S],k=i[v+S]+ +x,A=i[v+S+1]+1,T=i[g+S]+1,O=i[g+S+1]=Math.min(k,A,T);O<w&&(w=O)}if(w>n)continue e}A5(e.get(f),t,n,r,i,d,o,l+f)}};class Oa{constructor(t=new Map,n=""){this._size=void 0,this._tree=t,this._prefix=n}atPrefix(t){if(!t.startsWith(this._prefix))throw new Error("Mismatched prefix");const[n,r]=Xh(this._tree,t.slice(this._prefix.length));if(n===void 0){const[i,a]=wS(r);for(const o of i.keys())if(o!==gn&&o.startsWith(a)){const l=new Map;return l.set(o.slice(a.length),i.get(o)),new Oa(l,t)}}return new Oa(n,t)}clear(){this._size=void 0,this._tree.clear()}delete(t){return this._size=void 0,WZ(this._tree,t)}entries(){return new g0(this,KZ)}forEach(t){for(const[n,r]of this)t(n,r,this)}fuzzyGet(t,n){return XZ(this._tree,t,n)}get(t){const n=Aw(this._tree,t);return n!==void 0?n.get(gn):void 0}has(t){const n=Aw(this._tree,t);return n!==void 0&&n.has(gn)}keys(){return new g0(this,E5)}set(t,n){if(typeof t!="string")throw new Error("key must be a string");return this._size=void 0,y0(this._tree,t).set(gn,n),this}get size(){if(this._size)return this._size;this._size=0;const t=this.entries();for(;!t.next().done;)this._size+=1;return this._size}update(t,n){if(typeof t!="string")throw new Error("key must be a string");this._size=void 0;const r=y0(this._tree,t);return r.set(gn,n(r.get(gn))),this}fetch(t,n){if(typeof t!="string")throw new Error("key must be a string");this._size=void 0;const r=y0(this._tree,t);let i=r.get(gn);return i===void 0&&r.set(gn,i=n()),i}values(){return new g0(this,k5)}[Symbol.iterator](){return this.entries()}static from(t){const n=new Oa;for(const[r,i]of t)n.set(r,i);return n}static fromObject(t){return Oa.from(Object.entries(t))}}const Xh=(e,t,n=[])=>{if(t.length===0||e==null)return[e,n];for(const r of e.keys())if(r!==gn&&t.startsWith(r))return n.push([e,r]),Xh(e.get(r),t.slice(r.length),n);return n.push([e,t]),Xh(void 0,"",n)},Aw=(e,t)=>{if(t.length===0||e==null)return e;for(const n of e.keys())if(n!==gn&&t.startsWith(n))return Aw(e.get(n),t.slice(n.length))},y0=(e,t)=>{const n=t.length;e:for(let r=0;e&&r<n;){for(const a of e.keys())if(a!==gn&&t[r]===a[0]){const o=Math.min(n-r,a.length);let l=1;for(;l<o&&t[r+l]===a[l];)++l;const c=e.get(a);if(l===a.length)e=c;else{const f=new Map;f.set(a.slice(l),c),e.set(t.slice(r,r+l),f),e.delete(a),e=f}r+=l;continue e}const i=new Map;return e.set(t.slice(r),i),i}return e},WZ=(e,t)=>{const[n,r]=Xh(e,t);if(n!==void 0){if(n.delete(gn),n.size===0)T5(r);else if(n.size===1){const[i,a]=n.entries().next().value;C5(r,i,a)}}},T5=e=>{if(e.length===0)return;const[t,n]=wS(e);if(t.delete(n),t.size===0)T5(e.slice(0,-1));else if(t.size===1){const[r,i]=t.entries().next().value;r!==gn&&C5(e.slice(0,-1),r,i)}},C5=(e,t,n)=>{if(e.length===0)return;const[r,i]=wS(e);r.set(i+t,n),r.delete(i)},wS=e=>e[e.length-1],SS="or",N5="and",QZ="and_not";class ys{constructor(t){if((t==null?void 0:t.fields)==null)throw new Error('MiniSearch: option "fields" must be provided');const n=t.autoVacuum==null||t.autoVacuum===!0?_0:t.autoVacuum;this._options={...v0,...t,autoVacuum:n,searchOptions:{...pN,...t.searchOptions||{}},autoSuggestOptions:{...rK,...t.autoSuggestOptions||{}}},this._index=new Oa,this._documentCount=0,this._documentIds=new Map,this._idToShortId=new Map,this._fieldIds={},this._fieldLength=new Map,this._avgFieldLength=[],this._nextId=0,this._storedFields=new Map,this._dirtCount=0,this._currentVacuum=null,this._enqueuedVacuum=null,this._enqueuedVacuumConditions=Cw,this.addFields(this._options.fields)}add(t){const{extractField:n,tokenize:r,processTerm:i,fields:a,idField:o}=this._options,l=n(t,o);if(l==null)throw new Error(`MiniSearch: document does not have ID field "${o}"`);if(this._idToShortId.has(l))throw new Error(`MiniSearch: duplicate ID ${l}`);const c=this.addDocumentId(l);this.saveStoredFields(c,t);for(const f of a){const d=n(t,f);if(d==null)continue;const h=r(d.toString(),f),m=this._fieldIds[f],g=new Set(h).size;this.addFieldLength(c,m,this._documentCount-1,g);for(const v of h){const w=i(v,f);if(Array.isArray(w))for(const b of w)this.addTerm(m,c,b);else w&&this.addTerm(m,c,w)}}}addAll(t){for(const n of t)this.add(n)}addAllAsync(t,n={}){const{chunkSize:r=10}=n,i={chunk:[],promise:Promise.resolve()},{chunk:a,promise:o}=t.reduce(({chunk:l,promise:c},f,d)=>(l.push(f),(d+1)%r===0?{chunk:[],promise:c.then(()=>new Promise(h=>setTimeout(h,0))).then(()=>this.addAll(l))}:{chunk:l,promise:c}),i);return o.then(()=>this.addAll(a))}remove(t){const{tokenize:n,processTerm:r,extractField:i,fields:a,idField:o}=this._options,l=i(t,o);if(l==null)throw new Error(`MiniSearch: document does not have ID field "${o}"`);const c=this._idToShortId.get(l);if(c==null)throw new Error(`MiniSearch: cannot remove document with ID ${l}: it is not in the index`);for(const f of a){const d=i(t,f);if(d==null)continue;const h=n(d.toString(),f),m=this._fieldIds[f],g=new Set(h).size;this.removeFieldLength(c,m,this._documentCount,g);for(const v of h){const w=r(v,f);if(Array.isArray(w))for(const b of w)this.removeTerm(m,c,b);else w&&this.removeTerm(m,c,w)}}this._storedFields.delete(c),this._documentIds.delete(c),this._idToShortId.delete(l),this._fieldLength.delete(c),this._documentCount-=1}removeAll(t){if(t)for(const n of t)this.remove(n);else{if(arguments.length>0)throw new Error("Expected documents to be present. Omit the argument to remove all documents.");this._index=new Oa,this._documentCount=0,this._documentIds=new Map,this._idToShortId=new Map,this._fieldLength=new Map,this._avgFieldLength=[],this._storedFields=new Map,this._nextId=0}}discard(t){const n=this._idToShortId.get(t);if(n==null)throw new Error(`MiniSearch: cannot discard document with ID ${t}: it is not in the index`);this._idToShortId.delete(t),this._documentIds.delete(n),this._storedFields.delete(n),(this._fieldLength.get(n)||[]).forEach((r,i)=>{this.removeFieldLength(n,i,this._documentCount,r)}),this._fieldLength.delete(n),this._documentCount-=1,this._dirtCount+=1,this.maybeAutoVacuum()}maybeAutoVacuum(){if(this._options.autoVacuum===!1)return;const{minDirtFactor:t,minDirtCount:n,batchSize:r,batchWait:i}=this._options.autoVacuum;this.conditionalVacuum({batchSize:r,batchWait:i},{minDirtCount:n,minDirtFactor:t})}discardAll(t){const n=this._options.autoVacuum;try{this._options.autoVacuum=!1;for(const r of t)this.discard(r)}finally{this._options.autoVacuum=n}this.maybeAutoVacuum()}replace(t){const{idField:n,extractField:r}=this._options,i=r(t,n);this.discard(i),this.add(t)}vacuum(t={}){return this.conditionalVacuum(t)}conditionalVacuum(t,n){return this._currentVacuum?(this._enqueuedVacuumConditions=this._enqueuedVacuumConditions&&n,this._enqueuedVacuum!=null?this._enqueuedVacuum:(this._enqueuedVacuum=this._currentVacuum.then(()=>{const r=this._enqueuedVacuumConditions;return this._enqueuedVacuumConditions=Cw,this.performVacuuming(t,r)}),this._enqueuedVacuum)):this.vacuumConditionsMet(n)===!1?Promise.resolve():(this._currentVacuum=this.performVacuuming(t),this._currentVacuum)}async performVacuuming(t,n){const r=this._dirtCount;if(this.vacuumConditionsMet(n)){const i=t.batchSize||Tw.batchSize,a=t.batchWait||Tw.batchWait;let o=1;for(const[l,c]of this._index){for(const[f,d]of c)for(const[h]of d)this._documentIds.has(h)||(d.size<=1?c.delete(f):d.delete(h));this._index.get(l).size===0&&this._index.delete(l),o%i===0&&await new Promise(f=>setTimeout(f,a)),o+=1}this._dirtCount-=r}await null,this._currentVacuum=this._enqueuedVacuum,this._enqueuedVacuum=null}vacuumConditionsMet(t){if(t==null)return!0;let{minDirtCount:n,minDirtFactor:r}=t;return n=n||_0.minDirtCount,r=r||_0.minDirtFactor,this.dirtCount>=n&&this.dirtFactor>=r}get isVacuuming(){return this._currentVacuum!=null}get dirtCount(){return this._dirtCount}get dirtFactor(){return this._dirtCount/(1+this._documentCount+this._dirtCount)}has(t){return this._idToShortId.has(t)}getStoredFields(t){const n=this._idToShortId.get(t);if(n!=null)return this._storedFields.get(n)}search(t,n={}){const{searchOptions:r}=this._options,i={...r,...n},a=this.executeQuery(t,n),o=[];for(const[l,{score:c,terms:f,match:d}]of a){const h=f.length||1,m={id:this._documentIds.get(l),score:c*h,terms:Object.keys(d),queryTerms:f,match:d};Object.assign(m,this._storedFields.get(l)),(i.filter==null||i.filter(m))&&o.push(m)}return t===ys.wildcard&&i.boostDocument==null||o.sort(gN),o}autoSuggest(t,n={}){n={...this._options.autoSuggestOptions,...n};const r=new Map;for(const{score:a,terms:o}of this.search(t,n)){const l=o.join(" "),c=r.get(l);c!=null?(c.score+=a,c.count+=1):r.set(l,{score:a,terms:o,count:1})}const i=[];for(const[a,{score:o,terms:l,count:c}]of r)i.push({suggestion:a,terms:l,score:o/c});return i.sort(gN),i}get documentCount(){return this._documentCount}get termCount(){return this._index.size}static loadJSON(t,n){if(n==null)throw new Error("MiniSearch: loadJSON should be given the same options used when serializing the index");return this.loadJS(JSON.parse(t),n)}static async loadJSONAsync(t,n){if(n==null)throw new Error("MiniSearch: loadJSON should be given the same options used when serializing the index");return this.loadJSAsync(JSON.parse(t),n)}static getDefault(t){if(v0.hasOwnProperty(t))return b0(v0,t);throw new Error(`MiniSearch: unknown option "${t}"`)}static loadJS(t,n){const{index:r,documentIds:i,fieldLength:a,storedFields:o,serializationVersion:l}=t,c=this.instantiateMiniSearch(t,n);c._documentIds=kd(i),c._fieldLength=kd(a),c._storedFields=kd(o);for(const[f,d]of c._documentIds)c._idToShortId.set(d,f);for(const[f,d]of r){const h=new Map;for(const m of Object.keys(d)){let g=d[m];l===1&&(g=g.ds),h.set(parseInt(m,10),kd(g))}c._index.set(f,h)}return c}static async loadJSAsync(t,n){const{index:r,documentIds:i,fieldLength:a,storedFields:o,serializationVersion:l}=t,c=this.instantiateMiniSearch(t,n);c._documentIds=await Ad(i),c._fieldLength=await Ad(a),c._storedFields=await Ad(o);for(const[d,h]of c._documentIds)c._idToShortId.set(h,d);let f=0;for(const[d,h]of r){const m=new Map;for(const g of Object.keys(h)){let v=h[g];l===1&&(v=v.ds),m.set(parseInt(g,10),await Ad(v))}++f%1e3===0&&await O5(0),c._index.set(d,m)}return c}static instantiateMiniSearch(t,n){const{documentCount:r,nextId:i,fieldIds:a,averageFieldLength:o,dirtCount:l,serializationVersion:c}=t;if(c!==1&&c!==2)throw new Error("MiniSearch: cannot deserialize an index created with an incompatible version");const f=new ys(n);return f._documentCount=r,f._nextId=i,f._idToShortId=new Map,f._fieldIds=a,f._avgFieldLength=o,f._dirtCount=l||0,f._index=new Oa,f}executeQuery(t,n={}){if(t===ys.wildcard)return this.executeWildcardQuery(n);if(typeof t!="string"){const m={...n,...t,queries:void 0},g=t.queries.map(v=>this.executeQuery(v,m));return this.combineResults(g,m.combineWith)}const{tokenize:r,processTerm:i,searchOptions:a}=this._options,o={tokenize:r,processTerm:i,...a,...n},{tokenize:l,processTerm:c}=o,h=l(t).flatMap(m=>c(m)).filter(m=>!!m).map(nK(o)).map(m=>this.executeQuerySpec(m,o));return this.combineResults(h,o.combineWith)}executeQuerySpec(t,n){const r={...this._options.searchOptions,...n},i=(r.fields||this._options.fields).reduce((w,b)=>({...w,[b]:b0(r.boost,b)||1}),{}),{boostDocument:a,weights:o,maxFuzzy:l,bm25:c}=r,{fuzzy:f,prefix:d}={...pN.weights,...o},h=this._index.get(t.term),m=this.termResults(t.term,t.term,1,t.termBoost,h,i,a,c);let g,v;if(t.prefix&&(g=this._index.atPrefix(t.term)),t.fuzzy){const w=t.fuzzy===!0?.2:t.fuzzy,b=w<1?Math.min(l,Math.round(t.term.length*w)):w;b&&(v=this._index.fuzzyGet(t.term,b))}if(g)for(const[w,b]of g){const _=w.length-t.term.length;if(!_)continue;v==null||v.delete(w);const S=d*w.length/(w.length+.3*_);this.termResults(t.term,w,S,t.termBoost,b,i,a,c,m)}if(v)for(const w of v.keys()){const[b,_]=v.get(w);if(!_)continue;const S=f*w.length/(w.length+_);this.termResults(t.term,w,S,t.termBoost,b,i,a,c,m)}return m}executeWildcardQuery(t){const n=new Map,r={...this._options.searchOptions,...t};for(const[i,a]of this._documentIds){const o=r.boostDocument?r.boostDocument(a,"",this._storedFields.get(i)):1;n.set(i,{score:o,terms:[],match:{}})}return n}combineResults(t,n=SS){if(t.length===0)return new Map;const r=n.toLowerCase(),i=JZ[r];if(!i)throw new Error(`Invalid combination operator: ${n}`);return t.reduce(i)||new Map}toJSON(){const t=[];for(const[n,r]of this._index){const i={};for(const[a,o]of r)i[a]=Object.fromEntries(o);t.push([n,i])}return{documentCount:this._documentCount,nextId:this._nextId,documentIds:Object.fromEntries(this._documentIds),fieldIds:this._fieldIds,fieldLength:Object.fromEntries(this._fieldLength),averageFieldLength:this._avgFieldLength,storedFields:Object.fromEntries(this._storedFields),dirtCount:this._dirtCount,index:t,serializationVersion:2}}termResults(t,n,r,i,a,o,l,c,f=new Map){if(a==null)return f;for(const d of Object.keys(o)){const h=o[d],m=this._fieldIds[d],g=a.get(m);if(g==null)continue;let v=g.size;const w=this._avgFieldLength[m];for(const b of g.keys()){if(!this._documentIds.has(b)){this.removeTerm(m,b,n),v-=1;continue}const _=l?l(this._documentIds.get(b),n,this._storedFields.get(b)):1;if(!_)continue;const S=g.get(b),x=this._fieldLength.get(b)[m],k=tK(S,v,this._documentCount,x,w,c),A=r*i*h*_*k,T=f.get(b);if(T){T.score+=A,iK(T.terms,t);const O=b0(T.match,n);O?O.push(d):T.match[n]=[d]}else f.set(b,{score:A,terms:[t],match:{[n]:[d]}})}}return f}addTerm(t,n,r){const i=this._index.fetch(r,yN);let a=i.get(t);if(a==null)a=new Map,a.set(n,1),i.set(t,a);else{const o=a.get(n);a.set(n,(o||0)+1)}}removeTerm(t,n,r){if(!this._index.has(r)){this.warnDocumentChanged(n,t,r);return}const i=this._index.fetch(r,yN),a=i.get(t);a==null||a.get(n)==null?this.warnDocumentChanged(n,t,r):a.get(n)<=1?a.size<=1?i.delete(t):a.delete(n):a.set(n,a.get(n)-1),this._index.get(r).size===0&&this._index.delete(r)}warnDocumentChanged(t,n,r){for(const i of Object.keys(this._fieldIds))if(this._fieldIds[i]===n){this._options.logger("warn",`MiniSearch: document with ID ${this._documentIds.get(t)} has changed before removal: term "${r}" was not present in field "${i}". Removing a document after it has changed can corrupt the index!`,"version_conflict");return}}addDocumentId(t){const n=this._nextId;return this._idToShortId.set(t,n),this._documentIds.set(n,t),this._documentCount+=1,this._nextId+=1,n}addFields(t){for(let n=0;n<t.length;n++)this._fieldIds[t[n]]=n}addFieldLength(t,n,r,i){let a=this._fieldLength.get(t);a==null&&this._fieldLength.set(t,a=[]),a[n]=i;const l=(this._avgFieldLength[n]||0)*r+i;this._avgFieldLength[n]=l/(r+1)}removeFieldLength(t,n,r,i){if(r===1){this._avgFieldLength[n]=0;return}const a=this._avgFieldLength[n]*r-i;this._avgFieldLength[n]=a/(r-1)}saveStoredFields(t,n){const{storeFields:r,extractField:i}=this._options;if(r==null||r.length===0)return;let a=this._storedFields.get(t);a==null&&this._storedFields.set(t,a={});for(const o of r){const l=i(n,o);l!==void 0&&(a[o]=l)}}}ys.wildcard=Symbol("*");const b0=(e,t)=>Object.prototype.hasOwnProperty.call(e,t)?e[t]:void 0,JZ={[SS]:(e,t)=>{for(const n of t.keys()){const r=e.get(n);if(r==null)e.set(n,t.get(n));else{const{score:i,terms:a,match:o}=t.get(n);r.score=r.score+i,r.match=Object.assign(r.match,o),mN(r.terms,a)}}return e},[N5]:(e,t)=>{const n=new Map;for(const r of t.keys()){const i=e.get(r);if(i==null)continue;const{score:a,terms:o,match:l}=t.get(r);mN(i.terms,o),n.set(r,{score:i.score+a,terms:i.terms,match:Object.assign(i.match,l)})}return n},[QZ]:(e,t)=>{for(const n of t.keys())e.delete(n);return e}},eK={k:1.2,b:.7,d:.5},tK=(e,t,n,r,i,a)=>{const{k:o,b:l,d:c}=a;return Math.log(1+(n-t+.5)/(t+.5))*(c+e*(o+1)/(e+o*(1-l+l*r/i)))},nK=e=>(t,n,r)=>{const i=typeof e.fuzzy=="function"?e.fuzzy(t,n,r):e.fuzzy||!1,a=typeof e.prefix=="function"?e.prefix(t,n,r):e.prefix===!0,o=typeof e.boostTerm=="function"?e.boostTerm(t,n,r):1;return{term:t,fuzzy:i,prefix:a,termBoost:o}},v0={idField:"id",extractField:(e,t)=>e[t],tokenize:e=>e.split(aK),processTerm:e=>e.toLowerCase(),fields:void 0,searchOptions:void 0,storeFields:[],logger:(e,t)=>{typeof(console==null?void 0:console[e])=="function"&&console[e](t)},autoVacuum:!0},pN={combineWith:SS,prefix:!1,fuzzy:!1,maxFuzzy:6,boost:{},weights:{fuzzy:.45,prefix:.375},bm25:eK},rK={combineWith:N5,prefix:(e,t,n)=>t===n.length-1},Tw={batchSize:1e3,batchWait:10},Cw={minDirtFactor:.1,minDirtCount:20},_0={...Tw,...Cw},iK=(e,t)=>{e.includes(t)||e.push(t)},mN=(e,t)=>{for(const n of t)e.includes(n)||e.push(n)},gN=({score:e},{score:t})=>t-e,yN=()=>new Map,kd=e=>{const t=new Map;for(const n of Object.keys(e))t.set(parseInt(n,10),e[n]);return t},Ad=async e=>{const t=new Map;let n=0;for(const r of Object.keys(e))t.set(parseInt(r,10),e[r]),++n%1e3===0&&await O5(0);return t},O5=e=>new Promise(t=>setTimeout(t,e)),aK=/[\n\r\p{Z}\p{P}]+/u,bN={dbName:"minisearch_memory_db",dbVersion:1,storeName:"memory",miniSearchOptions:{fields:["text","path","tags","referencePath"],storeFields:["text","path","tags","referencePath"],tokenize:R5}};function R5(e){const t=e.replace(/ /g,""),n=new Intl.Segmenter("zh-CN",{granularity:"word"});return Array.from(n.segment(t)).map(i=>i.segment)}class sK extends ZZ{constructor(n){const r={...bN,...n,miniSearchOptions:{...bN.miniSearchOptions,...(n==null?void 0:n.miniSearchOptions)||{}}};super(r);De(this,"miniSearch");De(this,"config");De(this,"db");this.config=r}async initialize(){if(this.isInitialized)return;const{storeName:n}=this.config;this.db=await BZ(this.config.dbName,this.config.dbVersion,{upgrade(i){i.objectStoreNames.contains(n)||i.createObjectStore(n,{keyPath:"id",autoIncrement:!0}),i.objectStoreNames.contains("minisearch_index")||i.createObjectStore("minisearch_index")}});const r={fields:this.config.miniSearchOptions.fields||["text"],storeFields:this.config.miniSearchOptions.storeFields||["text"],tokenize:this.config.miniSearchOptions.tokenize||R5};this.miniSearch=new ys(r);try{const i=await this.loadMiniSearchIndex();if(i)console.log(i),this.miniSearch=await ys.loadJSAsync(i,r),console.log("MiniSearch index loaded from IndexedDB.");else{console.log("No saved index found, building from documents...");const a=await this.getAll();a.length>0?(this.miniSearch.addAll(a),await this.saveMiniSearchIndex(this.miniSearch.toJSON()),console.log(`MiniSearch index built from ${a.length} documents and saved.`)):console.log("No documents found, index is empty.")}this.isInitialized=!0}catch(i){throw console.error("Failed to initialize FullTextSearchService:",i),i}}async insert(n){const r=this.db.transaction(this.config.storeName,"readwrite"),i=r.objectStore(this.config.storeName),a={...n},o=await i.add(a);return a.id=Number(o),await r.done,this.miniSearch.add(a),await this.saveMiniSearchIndex(this.miniSearch.toJSON()),a.id}async update(n,r){const a=this.db.transaction(this.config.storeName,"readwrite").objectStore(this.config.storeName),o={...r,id:n};await a.put(o);const l=await a.get(n);l&&this.miniSearch.remove(l),this.miniSearch.add(o),await this.saveMiniSearchIndex(this.miniSearch.toJSON())}async delete(n){const i=this.db.transaction(this.config.storeName,"readwrite").objectStore(this.config.storeName),a=await i.get(n);a&&this.miniSearch.remove(a),await i.delete(n),await this.saveMiniSearchIndex(this.miniSearch.toJSON())}async query(n,r){return this.miniSearch.search(n,r).slice(0,(r==null?void 0:r.limit)??5).map(a=>{const{id:o,text:l,...c}=a;return{id:o,text:l,tags:c.tags,path:c.path,type:c.type,score:Math.round(a.score),referencePath:c.referencePath}})}async get(n){return this.db.transaction(this.config.storeName,"readonly").objectStore(this.config.storeName).get(n)}async getAll(){return this.db.transaction(this.config.storeName,"readonly").objectStore(this.config.storeName).getAll()}async loadMiniSearchIndex(){return this.db.transaction("minisearch_index","readonly").objectStore("minisearch_index").get("indexData")}async saveMiniSearchIndex(n){const r=this.db.transaction("minisearch_index","readwrite");await r.objectStore("minisearch_index").put(n,"indexData"),await r.done}}const oK=localStorage.getItem("withCredentials")==="true"?(e,t)=>(t.credentials="include",fetch(e,t)):fetch,lK=()=>({showHistory:localStorage.getItem("showHistory")==="true"||!1,showGraph:localStorage.getItem("showGraph")==="true"||!1}),vN=e=>{Object.entries(e).forEach(([t,n])=>{localStorage.setItem(t,n.toString())})},ES=new sK({dbName:"memory_fulltext_db",dbVersion:1,storeName:"memory"});ES.initialize();console.log(ES);DZ(ES);const uK=JSON.parse(localStorage.getItem("code")||"{}"),cK=u7(localStorage.getItem("defaultAgent")||"",{apiUrl:localStorage.getItem("apiUrl")||"http://localhost:8123",defaultHeaders:uK,callerOptions:{fetch:oK,maxRetries:1}},{...lK()});let x0=(e,t)=>n=>{e.current!==n&&(e.current=n,t())};function j5(e,{keys:t,deps:n=[e,t]}={}){let r=ee.useRef();r.current=e.get();let i=ee.useCallback(o=>(x0(r,o)(e.value),(t==null?void 0:t.length)>0?e7(e,t,x0(r,o)):e.listen(x0(r,o))),n),a=()=>r.current;return ee.useSyncExternalStore(i,a,a)}let fK=0;const oc=Tn([]),Tu=(e,t,n,r)=>{const i=`toast-${++fK}`,a={id:i,type:e,title:t,description:n,duration:(r==null?void 0:r.duration)??4e3,action:r==null?void 0:r.action};return oc.set([...oc.get(),a]),a.duration&&a.duration>0&&setTimeout(()=>{M5(i)},a.duration),i},Wh={success:(e,t,n)=>Tu("success",e,t,n),error:(e,t,n)=>Tu("error",e,t,n),warning:(e,t,n)=>Tu("warning",e,t,n),info:(e,t,n)=>Tu("info",e,t,n),custom:(e,t,n,r)=>Tu(e,t,n,r)},M5=e=>{oc.set(oc.get().filter(t=>t.id!==e))},$5=ee.createContext(void 0),La=()=>{const e=ee.useContext($5);if(!e)throw new Error("useChat must be used within a ChatProvider");return e},dK=({children:e})=>{const t=uB(cK,j5);return ee.useEffect(()=>{t.initClient().then(n=>{t.showHistory&&t.refreshHistoryList(),Wh.success("Hello, LangGraph!")}).catch(n=>{console.error(n),Wh.error("请检查服务器配置: ","初始化客户端失败,"+t.currentAgent+`
|
|
104
|
+
`,parameters:[{name:"path",type:"string",description:"记忆路径(创建时需要)"},{name:"tags",type:"string[]",description:"记忆标签(创建或更新时需要)"},{name:"content",type:"string",description:"记忆内容(创建或更新时需要)"},{name:"action",type:"string",enum:["create","update","delete"],description:"操作类型:create(创建)、update(更新)、delete(删除)"},{name:"id",type:"string",description:"记忆ID(更新或删除时需要,创建时会自动生成)",required:!1},{name:"referencePath",type:"string",description:"引用文档的 URL",required:!1}],handler:async t=>{const{content:n,action:r,id:i,tags:a,path:o,referencePath:l}=t;if((r==="delete"||r==="update")&&!i)throw new Error("删除或更新记忆时必须提供记忆ID");if((r==="create"||r==="update")&&!n)throw new Error("创建或更新记忆时必须提供内容");try{if(r==="delete")return await e.delete(Number(i)),`已删除记忆 ${i}`;const c={text:n,content:$Z(n),createdAt:new Date().toISOString(),updatedAt:new Date().toISOString(),namespace:MZ(),tags:a,path:o,type:"document",referencePath:l};return r==="create"?`已创建记忆 ${await e.insert(c)}`:(await e.update(Number(i),c),`已更新记忆 ${i}`)}catch(c){throw new Error(`记忆操作失败: ${c}`)}}}),searchMemory:XT({name:"search_memory",description:"搜索长期记忆中的相关信息,帮助维护对话上下文",parameters:[{name:"query",type:"string",description:"请使用中文关键词进行搜索"},{name:"tags",type:"string[]",description:"记忆标签",required:!1},{name:"path",type:"string",description:"记忆路径,memory://user_id/path/to/memory_name",required:!1},{name:"limit",type:"number",description:"返回结果的最大数量(默认10)",required:!1}],handler:async t=>{const{query:n,limit:r=10,tags:i,path:a}=t;if(!n||typeof n=="string"&&n.trim().length===0)throw new Error("搜索查询不能为空");try{const o=await e.query(n.toString(),{limit:r});return{query:n.toString(),results:o,total:o.length,limit:Number(r)}}catch(o){throw new Error(`搜索记忆失败: ${o}`)}}})}),xw=(e,t)=>t.some(n=>e instanceof n);let uN,cN;function IZ(){return uN||(uN=[IDBDatabase,IDBObjectStore,IDBIndex,IDBCursor,IDBTransaction])}function PZ(){return cN||(cN=[IDBCursor.prototype.advance,IDBCursor.prototype.continue,IDBCursor.prototype.continuePrimaryKey])}const ww=new WeakMap,p0=new WeakMap,Cp=new WeakMap;function LZ(e){const t=new Promise((n,r)=>{const i=()=>{e.removeEventListener("success",a),e.removeEventListener("error",o)},a=()=>{n(gs(e.result)),i()},o=()=>{r(e.error),i()};e.addEventListener("success",a),e.addEventListener("error",o)});return Cp.set(t,e),t}function zZ(e){if(ww.has(e))return;const t=new Promise((n,r)=>{const i=()=>{e.removeEventListener("complete",a),e.removeEventListener("error",o),e.removeEventListener("abort",o)},a=()=>{n(),i()},o=()=>{r(e.error||new DOMException("AbortError","AbortError")),i()};e.addEventListener("complete",a),e.addEventListener("error",o),e.addEventListener("abort",o)});ww.set(e,t)}let Sw={get(e,t,n){if(e instanceof IDBTransaction){if(t==="done")return ww.get(e);if(t==="store")return n.objectStoreNames[1]?void 0:n.objectStore(n.objectStoreNames[0])}return gs(e[t])},set(e,t,n){return e[t]=n,!0},has(e,t){return e instanceof IDBTransaction&&(t==="done"||t==="store")?!0:t in e}};function w5(e){Sw=e(Sw)}function qZ(e){return PZ().includes(e)?function(...t){return e.apply(Ew(this),t),gs(this.request)}:function(...t){return gs(e.apply(Ew(this),t))}}function FZ(e){return typeof e=="function"?qZ(e):(e instanceof IDBTransaction&&zZ(e),xw(e,IZ())?new Proxy(e,Sw):e)}function gs(e){if(e instanceof IDBRequest)return LZ(e);if(p0.has(e))return p0.get(e);const t=FZ(e);return t!==e&&(p0.set(e,t),Cp.set(t,e)),t}const Ew=e=>Cp.get(e);function BZ(e,t,{blocked:n,upgrade:r,blocking:i,terminated:a}={}){const o=indexedDB.open(e,t),l=gs(o);return r&&o.addEventListener("upgradeneeded",c=>{r(gs(o.result),c.oldVersion,c.newVersion,gs(o.transaction),c)}),n&&o.addEventListener("blocked",c=>n(c.oldVersion,c.newVersion,c)),l.then(c=>{a&&c.addEventListener("close",()=>a()),i&&c.addEventListener("versionchange",f=>i(f.oldVersion,f.newVersion,f))}).catch(()=>{}),l}const UZ=["get","getKey","getAll","getAllKeys","count"],VZ=["put","add","delete","clear"],m0=new Map;function fN(e,t){if(!(e instanceof IDBDatabase&&!(t in e)&&typeof t=="string"))return;if(m0.get(t))return m0.get(t);const n=t.replace(/FromIndex$/,""),r=t!==n,i=VZ.includes(n);if(!(n in(r?IDBIndex:IDBObjectStore).prototype)||!(i||UZ.includes(n)))return;const a=async function(o,...l){const c=this.transaction(o,i?"readwrite":"readonly");let f=c.store;return r&&(f=f.index(l.shift())),(await Promise.all([f[n](...l),i&&c.done]))[0]};return m0.set(t,a),a}w5(e=>({...e,get:(t,n,r)=>fN(t,n)||e.get(t,n,r),has:(t,n)=>!!fN(t,n)||e.has(t,n)}));const HZ=["continue","continuePrimaryKey","advance"],dN={},kw=new WeakMap,S5=new WeakMap,GZ={get(e,t){if(!HZ.includes(t))return e[t];let n=dN[t];return n||(n=dN[t]=function(...r){kw.set(this,S5.get(this)[t](...r))}),n}};async function*YZ(...e){let t=this;if(t instanceof IDBCursor||(t=await t.openCursor(...e)),!t)return;t=t;const n=new Proxy(t,GZ);for(S5.set(n,t),Cp.set(n,Ew(t));t;)yield n,t=await(kw.get(n)||t.continue()),kw.delete(n)}function hN(e,t){return t===Symbol.asyncIterator&&xw(e,[IDBIndex,IDBObjectStore,IDBCursor])||t==="iterate"&&xw(e,[IDBIndex,IDBObjectStore])}w5(e=>({...e,get(t,n,r){return hN(t,n)?YZ:e.get(t,n,r)},has(t,n){return hN(t,n)||e.has(t,n)}}));class ZZ{constructor(t){De(this,"isInitialized",!1);De(this,"config");this.config=t}}const KZ="ENTRIES",E5="KEYS",k5="VALUES",gn="";class g0{constructor(t,n){const r=t._tree,i=Array.from(r.keys());this.set=t,this._type=n,this._path=i.length>0?[{node:r,keys:i}]:[]}next(){const t=this.dive();return this.backtrack(),t}dive(){if(this._path.length===0)return{done:!0,value:void 0};const{node:t,keys:n}=Ao(this._path);if(Ao(n)===gn)return{done:!1,value:this.result()};const r=t.get(Ao(n));return this._path.push({node:r,keys:Array.from(r.keys())}),this.dive()}backtrack(){if(this._path.length===0)return;const t=Ao(this._path).keys;t.pop(),!(t.length>0)&&(this._path.pop(),this.backtrack())}key(){return this.set._prefix+this._path.map(({keys:t})=>Ao(t)).filter(t=>t!==gn).join("")}value(){return Ao(this._path).node.get(gn)}result(){switch(this._type){case k5:return this.value();case E5:return this.key();default:return[this.key(),this.value()]}}[Symbol.iterator](){return this}}const Ao=e=>e[e.length-1],XZ=(e,t,n)=>{const r=new Map;if(t===void 0)return r;const i=t.length+1,a=i+n,o=new Uint8Array(a*i).fill(n+1);for(let l=0;l<i;++l)o[l]=l;for(let l=1;l<a;++l)o[l*i]=l;return A5(e,t,n,r,o,1,i,""),r},A5=(e,t,n,r,i,a,o,l)=>{const c=a*o;e:for(const f of e.keys())if(f===gn){const d=i[c-1];d<=n&&r.set(l,[e.get(f),d])}else{let d=a;for(let h=0;h<f.length;++h,++d){const m=f[h],g=o*d,v=g-o;let w=i[g];const b=Math.max(0,d-n-1),_=Math.min(o-1,d+n);for(let S=b;S<_;++S){const x=m!==t[S],k=i[v+S]+ +x,A=i[v+S+1]+1,T=i[g+S]+1,O=i[g+S+1]=Math.min(k,A,T);O<w&&(w=O)}if(w>n)continue e}A5(e.get(f),t,n,r,i,d,o,l+f)}};class Oa{constructor(t=new Map,n=""){this._size=void 0,this._tree=t,this._prefix=n}atPrefix(t){if(!t.startsWith(this._prefix))throw new Error("Mismatched prefix");const[n,r]=Xh(this._tree,t.slice(this._prefix.length));if(n===void 0){const[i,a]=wS(r);for(const o of i.keys())if(o!==gn&&o.startsWith(a)){const l=new Map;return l.set(o.slice(a.length),i.get(o)),new Oa(l,t)}}return new Oa(n,t)}clear(){this._size=void 0,this._tree.clear()}delete(t){return this._size=void 0,WZ(this._tree,t)}entries(){return new g0(this,KZ)}forEach(t){for(const[n,r]of this)t(n,r,this)}fuzzyGet(t,n){return XZ(this._tree,t,n)}get(t){const n=Aw(this._tree,t);return n!==void 0?n.get(gn):void 0}has(t){const n=Aw(this._tree,t);return n!==void 0&&n.has(gn)}keys(){return new g0(this,E5)}set(t,n){if(typeof t!="string")throw new Error("key must be a string");return this._size=void 0,y0(this._tree,t).set(gn,n),this}get size(){if(this._size)return this._size;this._size=0;const t=this.entries();for(;!t.next().done;)this._size+=1;return this._size}update(t,n){if(typeof t!="string")throw new Error("key must be a string");this._size=void 0;const r=y0(this._tree,t);return r.set(gn,n(r.get(gn))),this}fetch(t,n){if(typeof t!="string")throw new Error("key must be a string");this._size=void 0;const r=y0(this._tree,t);let i=r.get(gn);return i===void 0&&r.set(gn,i=n()),i}values(){return new g0(this,k5)}[Symbol.iterator](){return this.entries()}static from(t){const n=new Oa;for(const[r,i]of t)n.set(r,i);return n}static fromObject(t){return Oa.from(Object.entries(t))}}const Xh=(e,t,n=[])=>{if(t.length===0||e==null)return[e,n];for(const r of e.keys())if(r!==gn&&t.startsWith(r))return n.push([e,r]),Xh(e.get(r),t.slice(r.length),n);return n.push([e,t]),Xh(void 0,"",n)},Aw=(e,t)=>{if(t.length===0||e==null)return e;for(const n of e.keys())if(n!==gn&&t.startsWith(n))return Aw(e.get(n),t.slice(n.length))},y0=(e,t)=>{const n=t.length;e:for(let r=0;e&&r<n;){for(const a of e.keys())if(a!==gn&&t[r]===a[0]){const o=Math.min(n-r,a.length);let l=1;for(;l<o&&t[r+l]===a[l];)++l;const c=e.get(a);if(l===a.length)e=c;else{const f=new Map;f.set(a.slice(l),c),e.set(t.slice(r,r+l),f),e.delete(a),e=f}r+=l;continue e}const i=new Map;return e.set(t.slice(r),i),i}return e},WZ=(e,t)=>{const[n,r]=Xh(e,t);if(n!==void 0){if(n.delete(gn),n.size===0)T5(r);else if(n.size===1){const[i,a]=n.entries().next().value;C5(r,i,a)}}},T5=e=>{if(e.length===0)return;const[t,n]=wS(e);if(t.delete(n),t.size===0)T5(e.slice(0,-1));else if(t.size===1){const[r,i]=t.entries().next().value;r!==gn&&C5(e.slice(0,-1),r,i)}},C5=(e,t,n)=>{if(e.length===0)return;const[r,i]=wS(e);r.set(i+t,n),r.delete(i)},wS=e=>e[e.length-1],SS="or",N5="and",QZ="and_not";class ys{constructor(t){if((t==null?void 0:t.fields)==null)throw new Error('MiniSearch: option "fields" must be provided');const n=t.autoVacuum==null||t.autoVacuum===!0?_0:t.autoVacuum;this._options={...v0,...t,autoVacuum:n,searchOptions:{...pN,...t.searchOptions||{}},autoSuggestOptions:{...rK,...t.autoSuggestOptions||{}}},this._index=new Oa,this._documentCount=0,this._documentIds=new Map,this._idToShortId=new Map,this._fieldIds={},this._fieldLength=new Map,this._avgFieldLength=[],this._nextId=0,this._storedFields=new Map,this._dirtCount=0,this._currentVacuum=null,this._enqueuedVacuum=null,this._enqueuedVacuumConditions=Cw,this.addFields(this._options.fields)}add(t){const{extractField:n,tokenize:r,processTerm:i,fields:a,idField:o}=this._options,l=n(t,o);if(l==null)throw new Error(`MiniSearch: document does not have ID field "${o}"`);if(this._idToShortId.has(l))throw new Error(`MiniSearch: duplicate ID ${l}`);const c=this.addDocumentId(l);this.saveStoredFields(c,t);for(const f of a){const d=n(t,f);if(d==null)continue;const h=r(d.toString(),f),m=this._fieldIds[f],g=new Set(h).size;this.addFieldLength(c,m,this._documentCount-1,g);for(const v of h){const w=i(v,f);if(Array.isArray(w))for(const b of w)this.addTerm(m,c,b);else w&&this.addTerm(m,c,w)}}}addAll(t){for(const n of t)this.add(n)}addAllAsync(t,n={}){const{chunkSize:r=10}=n,i={chunk:[],promise:Promise.resolve()},{chunk:a,promise:o}=t.reduce(({chunk:l,promise:c},f,d)=>(l.push(f),(d+1)%r===0?{chunk:[],promise:c.then(()=>new Promise(h=>setTimeout(h,0))).then(()=>this.addAll(l))}:{chunk:l,promise:c}),i);return o.then(()=>this.addAll(a))}remove(t){const{tokenize:n,processTerm:r,extractField:i,fields:a,idField:o}=this._options,l=i(t,o);if(l==null)throw new Error(`MiniSearch: document does not have ID field "${o}"`);const c=this._idToShortId.get(l);if(c==null)throw new Error(`MiniSearch: cannot remove document with ID ${l}: it is not in the index`);for(const f of a){const d=i(t,f);if(d==null)continue;const h=n(d.toString(),f),m=this._fieldIds[f],g=new Set(h).size;this.removeFieldLength(c,m,this._documentCount,g);for(const v of h){const w=r(v,f);if(Array.isArray(w))for(const b of w)this.removeTerm(m,c,b);else w&&this.removeTerm(m,c,w)}}this._storedFields.delete(c),this._documentIds.delete(c),this._idToShortId.delete(l),this._fieldLength.delete(c),this._documentCount-=1}removeAll(t){if(t)for(const n of t)this.remove(n);else{if(arguments.length>0)throw new Error("Expected documents to be present. Omit the argument to remove all documents.");this._index=new Oa,this._documentCount=0,this._documentIds=new Map,this._idToShortId=new Map,this._fieldLength=new Map,this._avgFieldLength=[],this._storedFields=new Map,this._nextId=0}}discard(t){const n=this._idToShortId.get(t);if(n==null)throw new Error(`MiniSearch: cannot discard document with ID ${t}: it is not in the index`);this._idToShortId.delete(t),this._documentIds.delete(n),this._storedFields.delete(n),(this._fieldLength.get(n)||[]).forEach((r,i)=>{this.removeFieldLength(n,i,this._documentCount,r)}),this._fieldLength.delete(n),this._documentCount-=1,this._dirtCount+=1,this.maybeAutoVacuum()}maybeAutoVacuum(){if(this._options.autoVacuum===!1)return;const{minDirtFactor:t,minDirtCount:n,batchSize:r,batchWait:i}=this._options.autoVacuum;this.conditionalVacuum({batchSize:r,batchWait:i},{minDirtCount:n,minDirtFactor:t})}discardAll(t){const n=this._options.autoVacuum;try{this._options.autoVacuum=!1;for(const r of t)this.discard(r)}finally{this._options.autoVacuum=n}this.maybeAutoVacuum()}replace(t){const{idField:n,extractField:r}=this._options,i=r(t,n);this.discard(i),this.add(t)}vacuum(t={}){return this.conditionalVacuum(t)}conditionalVacuum(t,n){return this._currentVacuum?(this._enqueuedVacuumConditions=this._enqueuedVacuumConditions&&n,this._enqueuedVacuum!=null?this._enqueuedVacuum:(this._enqueuedVacuum=this._currentVacuum.then(()=>{const r=this._enqueuedVacuumConditions;return this._enqueuedVacuumConditions=Cw,this.performVacuuming(t,r)}),this._enqueuedVacuum)):this.vacuumConditionsMet(n)===!1?Promise.resolve():(this._currentVacuum=this.performVacuuming(t),this._currentVacuum)}async performVacuuming(t,n){const r=this._dirtCount;if(this.vacuumConditionsMet(n)){const i=t.batchSize||Tw.batchSize,a=t.batchWait||Tw.batchWait;let o=1;for(const[l,c]of this._index){for(const[f,d]of c)for(const[h]of d)this._documentIds.has(h)||(d.size<=1?c.delete(f):d.delete(h));this._index.get(l).size===0&&this._index.delete(l),o%i===0&&await new Promise(f=>setTimeout(f,a)),o+=1}this._dirtCount-=r}await null,this._currentVacuum=this._enqueuedVacuum,this._enqueuedVacuum=null}vacuumConditionsMet(t){if(t==null)return!0;let{minDirtCount:n,minDirtFactor:r}=t;return n=n||_0.minDirtCount,r=r||_0.minDirtFactor,this.dirtCount>=n&&this.dirtFactor>=r}get isVacuuming(){return this._currentVacuum!=null}get dirtCount(){return this._dirtCount}get dirtFactor(){return this._dirtCount/(1+this._documentCount+this._dirtCount)}has(t){return this._idToShortId.has(t)}getStoredFields(t){const n=this._idToShortId.get(t);if(n!=null)return this._storedFields.get(n)}search(t,n={}){const{searchOptions:r}=this._options,i={...r,...n},a=this.executeQuery(t,n),o=[];for(const[l,{score:c,terms:f,match:d}]of a){const h=f.length||1,m={id:this._documentIds.get(l),score:c*h,terms:Object.keys(d),queryTerms:f,match:d};Object.assign(m,this._storedFields.get(l)),(i.filter==null||i.filter(m))&&o.push(m)}return t===ys.wildcard&&i.boostDocument==null||o.sort(gN),o}autoSuggest(t,n={}){n={...this._options.autoSuggestOptions,...n};const r=new Map;for(const{score:a,terms:o}of this.search(t,n)){const l=o.join(" "),c=r.get(l);c!=null?(c.score+=a,c.count+=1):r.set(l,{score:a,terms:o,count:1})}const i=[];for(const[a,{score:o,terms:l,count:c}]of r)i.push({suggestion:a,terms:l,score:o/c});return i.sort(gN),i}get documentCount(){return this._documentCount}get termCount(){return this._index.size}static loadJSON(t,n){if(n==null)throw new Error("MiniSearch: loadJSON should be given the same options used when serializing the index");return this.loadJS(JSON.parse(t),n)}static async loadJSONAsync(t,n){if(n==null)throw new Error("MiniSearch: loadJSON should be given the same options used when serializing the index");return this.loadJSAsync(JSON.parse(t),n)}static getDefault(t){if(v0.hasOwnProperty(t))return b0(v0,t);throw new Error(`MiniSearch: unknown option "${t}"`)}static loadJS(t,n){const{index:r,documentIds:i,fieldLength:a,storedFields:o,serializationVersion:l}=t,c=this.instantiateMiniSearch(t,n);c._documentIds=kd(i),c._fieldLength=kd(a),c._storedFields=kd(o);for(const[f,d]of c._documentIds)c._idToShortId.set(d,f);for(const[f,d]of r){const h=new Map;for(const m of Object.keys(d)){let g=d[m];l===1&&(g=g.ds),h.set(parseInt(m,10),kd(g))}c._index.set(f,h)}return c}static async loadJSAsync(t,n){const{index:r,documentIds:i,fieldLength:a,storedFields:o,serializationVersion:l}=t,c=this.instantiateMiniSearch(t,n);c._documentIds=await Ad(i),c._fieldLength=await Ad(a),c._storedFields=await Ad(o);for(const[d,h]of c._documentIds)c._idToShortId.set(h,d);let f=0;for(const[d,h]of r){const m=new Map;for(const g of Object.keys(h)){let v=h[g];l===1&&(v=v.ds),m.set(parseInt(g,10),await Ad(v))}++f%1e3===0&&await O5(0),c._index.set(d,m)}return c}static instantiateMiniSearch(t,n){const{documentCount:r,nextId:i,fieldIds:a,averageFieldLength:o,dirtCount:l,serializationVersion:c}=t;if(c!==1&&c!==2)throw new Error("MiniSearch: cannot deserialize an index created with an incompatible version");const f=new ys(n);return f._documentCount=r,f._nextId=i,f._idToShortId=new Map,f._fieldIds=a,f._avgFieldLength=o,f._dirtCount=l||0,f._index=new Oa,f}executeQuery(t,n={}){if(t===ys.wildcard)return this.executeWildcardQuery(n);if(typeof t!="string"){const m={...n,...t,queries:void 0},g=t.queries.map(v=>this.executeQuery(v,m));return this.combineResults(g,m.combineWith)}const{tokenize:r,processTerm:i,searchOptions:a}=this._options,o={tokenize:r,processTerm:i,...a,...n},{tokenize:l,processTerm:c}=o,h=l(t).flatMap(m=>c(m)).filter(m=>!!m).map(nK(o)).map(m=>this.executeQuerySpec(m,o));return this.combineResults(h,o.combineWith)}executeQuerySpec(t,n){const r={...this._options.searchOptions,...n},i=(r.fields||this._options.fields).reduce((w,b)=>({...w,[b]:b0(r.boost,b)||1}),{}),{boostDocument:a,weights:o,maxFuzzy:l,bm25:c}=r,{fuzzy:f,prefix:d}={...pN.weights,...o},h=this._index.get(t.term),m=this.termResults(t.term,t.term,1,t.termBoost,h,i,a,c);let g,v;if(t.prefix&&(g=this._index.atPrefix(t.term)),t.fuzzy){const w=t.fuzzy===!0?.2:t.fuzzy,b=w<1?Math.min(l,Math.round(t.term.length*w)):w;b&&(v=this._index.fuzzyGet(t.term,b))}if(g)for(const[w,b]of g){const _=w.length-t.term.length;if(!_)continue;v==null||v.delete(w);const S=d*w.length/(w.length+.3*_);this.termResults(t.term,w,S,t.termBoost,b,i,a,c,m)}if(v)for(const w of v.keys()){const[b,_]=v.get(w);if(!_)continue;const S=f*w.length/(w.length+_);this.termResults(t.term,w,S,t.termBoost,b,i,a,c,m)}return m}executeWildcardQuery(t){const n=new Map,r={...this._options.searchOptions,...t};for(const[i,a]of this._documentIds){const o=r.boostDocument?r.boostDocument(a,"",this._storedFields.get(i)):1;n.set(i,{score:o,terms:[],match:{}})}return n}combineResults(t,n=SS){if(t.length===0)return new Map;const r=n.toLowerCase(),i=JZ[r];if(!i)throw new Error(`Invalid combination operator: ${n}`);return t.reduce(i)||new Map}toJSON(){const t=[];for(const[n,r]of this._index){const i={};for(const[a,o]of r)i[a]=Object.fromEntries(o);t.push([n,i])}return{documentCount:this._documentCount,nextId:this._nextId,documentIds:Object.fromEntries(this._documentIds),fieldIds:this._fieldIds,fieldLength:Object.fromEntries(this._fieldLength),averageFieldLength:this._avgFieldLength,storedFields:Object.fromEntries(this._storedFields),dirtCount:this._dirtCount,index:t,serializationVersion:2}}termResults(t,n,r,i,a,o,l,c,f=new Map){if(a==null)return f;for(const d of Object.keys(o)){const h=o[d],m=this._fieldIds[d],g=a.get(m);if(g==null)continue;let v=g.size;const w=this._avgFieldLength[m];for(const b of g.keys()){if(!this._documentIds.has(b)){this.removeTerm(m,b,n),v-=1;continue}const _=l?l(this._documentIds.get(b),n,this._storedFields.get(b)):1;if(!_)continue;const S=g.get(b),x=this._fieldLength.get(b)[m],k=tK(S,v,this._documentCount,x,w,c),A=r*i*h*_*k,T=f.get(b);if(T){T.score+=A,iK(T.terms,t);const O=b0(T.match,n);O?O.push(d):T.match[n]=[d]}else f.set(b,{score:A,terms:[t],match:{[n]:[d]}})}}return f}addTerm(t,n,r){const i=this._index.fetch(r,yN);let a=i.get(t);if(a==null)a=new Map,a.set(n,1),i.set(t,a);else{const o=a.get(n);a.set(n,(o||0)+1)}}removeTerm(t,n,r){if(!this._index.has(r)){this.warnDocumentChanged(n,t,r);return}const i=this._index.fetch(r,yN),a=i.get(t);a==null||a.get(n)==null?this.warnDocumentChanged(n,t,r):a.get(n)<=1?a.size<=1?i.delete(t):a.delete(n):a.set(n,a.get(n)-1),this._index.get(r).size===0&&this._index.delete(r)}warnDocumentChanged(t,n,r){for(const i of Object.keys(this._fieldIds))if(this._fieldIds[i]===n){this._options.logger("warn",`MiniSearch: document with ID ${this._documentIds.get(t)} has changed before removal: term "${r}" was not present in field "${i}". Removing a document after it has changed can corrupt the index!`,"version_conflict");return}}addDocumentId(t){const n=this._nextId;return this._idToShortId.set(t,n),this._documentIds.set(n,t),this._documentCount+=1,this._nextId+=1,n}addFields(t){for(let n=0;n<t.length;n++)this._fieldIds[t[n]]=n}addFieldLength(t,n,r,i){let a=this._fieldLength.get(t);a==null&&this._fieldLength.set(t,a=[]),a[n]=i;const l=(this._avgFieldLength[n]||0)*r+i;this._avgFieldLength[n]=l/(r+1)}removeFieldLength(t,n,r,i){if(r===1){this._avgFieldLength[n]=0;return}const a=this._avgFieldLength[n]*r-i;this._avgFieldLength[n]=a/(r-1)}saveStoredFields(t,n){const{storeFields:r,extractField:i}=this._options;if(r==null||r.length===0)return;let a=this._storedFields.get(t);a==null&&this._storedFields.set(t,a={});for(const o of r){const l=i(n,o);l!==void 0&&(a[o]=l)}}}ys.wildcard=Symbol("*");const b0=(e,t)=>Object.prototype.hasOwnProperty.call(e,t)?e[t]:void 0,JZ={[SS]:(e,t)=>{for(const n of t.keys()){const r=e.get(n);if(r==null)e.set(n,t.get(n));else{const{score:i,terms:a,match:o}=t.get(n);r.score=r.score+i,r.match=Object.assign(r.match,o),mN(r.terms,a)}}return e},[N5]:(e,t)=>{const n=new Map;for(const r of t.keys()){const i=e.get(r);if(i==null)continue;const{score:a,terms:o,match:l}=t.get(r);mN(i.terms,o),n.set(r,{score:i.score+a,terms:i.terms,match:Object.assign(i.match,l)})}return n},[QZ]:(e,t)=>{for(const n of t.keys())e.delete(n);return e}},eK={k:1.2,b:.7,d:.5},tK=(e,t,n,r,i,a)=>{const{k:o,b:l,d:c}=a;return Math.log(1+(n-t+.5)/(t+.5))*(c+e*(o+1)/(e+o*(1-l+l*r/i)))},nK=e=>(t,n,r)=>{const i=typeof e.fuzzy=="function"?e.fuzzy(t,n,r):e.fuzzy||!1,a=typeof e.prefix=="function"?e.prefix(t,n,r):e.prefix===!0,o=typeof e.boostTerm=="function"?e.boostTerm(t,n,r):1;return{term:t,fuzzy:i,prefix:a,termBoost:o}},v0={idField:"id",extractField:(e,t)=>e[t],tokenize:e=>e.split(aK),processTerm:e=>e.toLowerCase(),fields:void 0,searchOptions:void 0,storeFields:[],logger:(e,t)=>{typeof(console==null?void 0:console[e])=="function"&&console[e](t)},autoVacuum:!0},pN={combineWith:SS,prefix:!1,fuzzy:!1,maxFuzzy:6,boost:{},weights:{fuzzy:.45,prefix:.375},bm25:eK},rK={combineWith:N5,prefix:(e,t,n)=>t===n.length-1},Tw={batchSize:1e3,batchWait:10},Cw={minDirtFactor:.1,minDirtCount:20},_0={...Tw,...Cw},iK=(e,t)=>{e.includes(t)||e.push(t)},mN=(e,t)=>{for(const n of t)e.includes(n)||e.push(n)},gN=({score:e},{score:t})=>t-e,yN=()=>new Map,kd=e=>{const t=new Map;for(const n of Object.keys(e))t.set(parseInt(n,10),e[n]);return t},Ad=async e=>{const t=new Map;let n=0;for(const r of Object.keys(e))t.set(parseInt(r,10),e[r]),++n%1e3===0&&await O5(0);return t},O5=e=>new Promise(t=>setTimeout(t,e)),aK=/[\n\r\p{Z}\p{P}]+/u,bN={dbName:"minisearch_memory_db",dbVersion:1,storeName:"memory",miniSearchOptions:{fields:["text","path","tags","referencePath"],storeFields:["text","path","tags","referencePath"],tokenize:R5}};function R5(e){const t=e.replace(/ /g,""),n=new Intl.Segmenter("zh-CN",{granularity:"word"});return Array.from(n.segment(t)).map(i=>i.segment)}class sK extends ZZ{constructor(n){const r={...bN,...n,miniSearchOptions:{...bN.miniSearchOptions,...(n==null?void 0:n.miniSearchOptions)||{}}};super(r);De(this,"miniSearch");De(this,"config");De(this,"db");this.config=r}async initialize(){if(this.isInitialized)return;const{storeName:n}=this.config;this.db=await BZ(this.config.dbName,this.config.dbVersion,{upgrade(i){i.objectStoreNames.contains(n)||i.createObjectStore(n,{keyPath:"id",autoIncrement:!0}),i.objectStoreNames.contains("minisearch_index")||i.createObjectStore("minisearch_index")}});const r={fields:this.config.miniSearchOptions.fields||["text"],storeFields:this.config.miniSearchOptions.storeFields||["text"],tokenize:this.config.miniSearchOptions.tokenize||R5};this.miniSearch=new ys(r);try{const i=await this.loadMiniSearchIndex();if(i)console.log(i),this.miniSearch=await ys.loadJSAsync(i,r),console.log("MiniSearch index loaded from IndexedDB.");else{console.log("No saved index found, building from documents...");const a=await this.getAll();a.length>0?(this.miniSearch.addAll(a),await this.saveMiniSearchIndex(this.miniSearch.toJSON()),console.log(`MiniSearch index built from ${a.length} documents and saved.`)):console.log("No documents found, index is empty.")}this.isInitialized=!0}catch(i){throw console.error("Failed to initialize FullTextSearchService:",i),i}}async insert(n){const r=this.db.transaction(this.config.storeName,"readwrite"),i=r.objectStore(this.config.storeName),a={...n},o=await i.add(a);return a.id=Number(o),await r.done,this.miniSearch.add(a),await this.saveMiniSearchIndex(this.miniSearch.toJSON()),a.id}async update(n,r){const a=this.db.transaction(this.config.storeName,"readwrite").objectStore(this.config.storeName),o={...r,id:n};await a.put(o);const l=await a.get(n);l&&this.miniSearch.remove(l),this.miniSearch.add(o),await this.saveMiniSearchIndex(this.miniSearch.toJSON())}async delete(n){const i=this.db.transaction(this.config.storeName,"readwrite").objectStore(this.config.storeName),a=await i.get(n);a&&this.miniSearch.remove(a),await i.delete(n),await this.saveMiniSearchIndex(this.miniSearch.toJSON())}async query(n,r){return this.miniSearch.search(n,r).slice(0,(r==null?void 0:r.limit)??5).map(a=>{const{id:o,text:l,...c}=a;return{id:o,text:l,tags:c.tags,path:c.path,type:c.type,score:Math.round(a.score),referencePath:c.referencePath}})}async get(n){return this.db.transaction(this.config.storeName,"readonly").objectStore(this.config.storeName).get(n)}async getAll(){return this.db.transaction(this.config.storeName,"readonly").objectStore(this.config.storeName).getAll()}async loadMiniSearchIndex(){return this.db.transaction("minisearch_index","readonly").objectStore("minisearch_index").get("indexData")}async saveMiniSearchIndex(n){const r=this.db.transaction("minisearch_index","readwrite");await r.objectStore("minisearch_index").put(n,"indexData"),await r.done}}const oK=localStorage.getItem("withCredentials")==="true"?(e,t)=>(t.credentials="include",fetch(e,t)):fetch,lK=()=>({showHistory:localStorage.getItem("showHistory")==="true"||!1,showGraph:localStorage.getItem("showGraph")==="true"||!1}),vN=e=>{Object.entries(e).forEach(([t,n])=>{localStorage.setItem(t,n.toString())})},ES=new sK({dbName:"memory_fulltext_db",dbVersion:1,storeName:"memory"});ES.initialize();console.log(ES);DZ(ES);const uK=JSON.parse(localStorage.getItem("code")||"[]"),cK=u7(localStorage.getItem("defaultAgent")||"",{apiUrl:localStorage.getItem("apiUrl")||"http://localhost:8123",defaultHeaders:Object.fromEntries(uK.map(e=>[e.key,e.value])),callerOptions:{fetch:oK,maxRetries:1}},{...lK()});let x0=(e,t)=>n=>{e.current!==n&&(e.current=n,t())};function j5(e,{keys:t,deps:n=[e,t]}={}){let r=ee.useRef();r.current=e.get();let i=ee.useCallback(o=>(x0(r,o)(e.value),(t==null?void 0:t.length)>0?e7(e,t,x0(r,o)):e.listen(x0(r,o))),n),a=()=>r.current;return ee.useSyncExternalStore(i,a,a)}let fK=0;const oc=Tn([]),Tu=(e,t,n,r)=>{const i=`toast-${++fK}`,a={id:i,type:e,title:t,description:n,duration:(r==null?void 0:r.duration)??4e3,action:r==null?void 0:r.action};return oc.set([...oc.get(),a]),a.duration&&a.duration>0&&setTimeout(()=>{M5(i)},a.duration),i},Wh={success:(e,t,n)=>Tu("success",e,t,n),error:(e,t,n)=>Tu("error",e,t,n),warning:(e,t,n)=>Tu("warning",e,t,n),info:(e,t,n)=>Tu("info",e,t,n),custom:(e,t,n,r)=>Tu(e,t,n,r)},M5=e=>{oc.set(oc.get().filter(t=>t.id!==e))},$5=ee.createContext(void 0),La=()=>{const e=ee.useContext($5);if(!e)throw new Error("useChat must be used within a ChatProvider");return e},dK=({children:e})=>{const t=uB(cK,j5);return ee.useEffect(()=>{t.initClient().then(n=>{t.showHistory&&t.refreshHistoryList(),Wh.success("Hello, LangGraph!")}).catch(n=>{console.error(n),Wh.error("请检查服务器配置: ","初始化客户端失败,"+t.currentAgent+`
|
|
105
105
|
`+n,{duration:1e4,action:{label:"去设置",onClick:()=>{var r;(r=document.getElementById("setting-button"))==null||r.click(),setTimeout(()=>{var i;(i=document.getElementById("server-login-button"))==null||i.click()},300)}}})})},[]),N.jsx($5.Provider,{value:t,children:e})};function D5(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var i=e.length;for(t=0;t<i;t++)e[t]&&(n=D5(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function I5(){for(var e,t,n=0,r="",i=arguments.length;n<i;n++)(e=arguments[n])&&(t=D5(e))&&(r&&(r+=" "),r+=t);return r}var hK=Object.create,Np=Object.defineProperty,pK=Object.defineProperties,mK=Object.getOwnPropertyDescriptor,gK=Object.getOwnPropertyDescriptors,P5=Object.getOwnPropertyNames,Qh=Object.getOwnPropertySymbols,yK=Object.getPrototypeOf,kS=Object.prototype.hasOwnProperty,L5=Object.prototype.propertyIsEnumerable,_N=(e,t,n)=>t in e?Np(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Xr=(e,t)=>{for(var n in t||(t={}))kS.call(t,n)&&_N(e,n,t[n]);if(Qh)for(var n of Qh(t))L5.call(t,n)&&_N(e,n,t[n]);return e},Op=(e,t)=>pK(e,gK(t)),z5=(e,t)=>{var n={};for(var r in e)kS.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&Qh)for(var r of Qh(e))t.indexOf(r)<0&&L5.call(e,r)&&(n[r]=e[r]);return n},bK=(e,t)=>function(){return t||(0,e[P5(e)[0]])((t={exports:{}}).exports,t),t.exports},vK=(e,t)=>{for(var n in t)Np(e,n,{get:t[n],enumerable:!0})},_K=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of P5(t))!kS.call(e,i)&&i!==n&&Np(e,i,{get:()=>t[i],enumerable:!(r=mK(t,i))||r.enumerable});return e},xK=(e,t,n)=>(n=e!=null?hK(yK(e)):{},_K(!e||!e.__esModule?Np(n,"default",{value:e,enumerable:!0}):n,e)),wK=bK({"../../node_modules/.pnpm/prismjs@1.29.0_patch_hash=vrxx3pzkik6jpmgpayxfjunetu/node_modules/prismjs/prism.js"(e,t){var n=function(){var r=/(?:^|\s)lang(?:uage)?-([\w-]+)(?=\s|$)/i,i=0,a={},o={util:{encode:function v(w){return w instanceof l?new l(w.type,v(w.content),w.alias):Array.isArray(w)?w.map(v):w.replace(/&/g,"&").replace(/</g,"<").replace(/\u00a0/g," ")},type:function(v){return Object.prototype.toString.call(v).slice(8,-1)},objId:function(v){return v.__id||Object.defineProperty(v,"__id",{value:++i}),v.__id},clone:function v(w,b){b=b||{};var _,S;switch(o.util.type(w)){case"Object":if(S=o.util.objId(w),b[S])return b[S];_={},b[S]=_;for(var x in w)w.hasOwnProperty(x)&&(_[x]=v(w[x],b));return _;case"Array":return S=o.util.objId(w),b[S]?b[S]:(_=[],b[S]=_,w.forEach(function(k,A){_[A]=v(k,b)}),_);default:return w}},getLanguage:function(v){for(;v;){var w=r.exec(v.className);if(w)return w[1].toLowerCase();v=v.parentElement}return"none"},setLanguage:function(v,w){v.className=v.className.replace(RegExp(r,"gi"),""),v.classList.add("language-"+w)},isActive:function(v,w,b){for(var _="no-"+w;v;){var S=v.classList;if(S.contains(w))return!0;if(S.contains(_))return!1;v=v.parentElement}return!!b}},languages:{plain:a,plaintext:a,text:a,txt:a,extend:function(v,w){var b=o.util.clone(o.languages[v]);for(var _ in w)b[_]=w[_];return b},insertBefore:function(v,w,b,_){_=_||o.languages;var S=_[v],x={};for(var k in S)if(S.hasOwnProperty(k)){if(k==w)for(var A in b)b.hasOwnProperty(A)&&(x[A]=b[A]);b.hasOwnProperty(k)||(x[k]=S[k])}var T=_[v];return _[v]=x,o.languages.DFS(o.languages,function(O,$){$===T&&O!=v&&(this[O]=x)}),x},DFS:function v(w,b,_,S){S=S||{};var x=o.util.objId;for(var k in w)if(w.hasOwnProperty(k)){b.call(w,k,w[k],_||k);var A=w[k],T=o.util.type(A);T==="Object"&&!S[x(A)]?(S[x(A)]=!0,v(A,b,null,S)):T==="Array"&&!S[x(A)]&&(S[x(A)]=!0,v(A,b,k,S))}}},plugins:{},highlight:function(v,w,b){var _={code:v,grammar:w,language:b};if(o.hooks.run("before-tokenize",_),!_.grammar)throw new Error('The language "'+_.language+'" has no grammar.');return _.tokens=o.tokenize(_.code,_.grammar),o.hooks.run("after-tokenize",_),l.stringify(o.util.encode(_.tokens),_.language)},tokenize:function(v,w){var b=w.rest;if(b){for(var _ in b)w[_]=b[_];delete w.rest}var S=new d;return h(S,S.head,v),f(v,S,w,S.head,0),g(S)},hooks:{all:{},add:function(v,w){var b=o.hooks.all;b[v]=b[v]||[],b[v].push(w)},run:function(v,w){var b=o.hooks.all[v];if(!(!b||!b.length))for(var _=0,S;S=b[_++];)S(w)}},Token:l};function l(v,w,b,_){this.type=v,this.content=w,this.alias=b,this.length=(_||"").length|0}l.stringify=function v(w,b){if(typeof w=="string")return w;if(Array.isArray(w)){var _="";return w.forEach(function(T){_+=v(T,b)}),_}var S={type:w.type,content:v(w.content,b),tag:"span",classes:["token",w.type],attributes:{},language:b},x=w.alias;x&&(Array.isArray(x)?Array.prototype.push.apply(S.classes,x):S.classes.push(x)),o.hooks.run("wrap",S);var k="";for(var A in S.attributes)k+=" "+A+'="'+(S.attributes[A]||"").replace(/"/g,""")+'"';return"<"+S.tag+' class="'+S.classes.join(" ")+'"'+k+">"+S.content+"</"+S.tag+">"};function c(v,w,b,_){v.lastIndex=w;var S=v.exec(b);if(S&&_&&S[1]){var x=S[1].length;S.index+=x,S[0]=S[0].slice(x)}return S}function f(v,w,b,_,S,x){for(var k in b)if(!(!b.hasOwnProperty(k)||!b[k])){var A=b[k];A=Array.isArray(A)?A:[A];for(var T=0;T<A.length;++T){if(x&&x.cause==k+","+T)return;var O=A[T],$=O.inside,I=!!O.lookbehind,M=!!O.greedy,z=O.alias;if(M&&!O.pattern.global){var L=O.pattern.toString().match(/[imsuy]*$/)[0];O.pattern=RegExp(O.pattern.source,L+"g")}for(var q=O.pattern||O,D=_.next,H=S;D!==w.tail&&!(x&&H>=x.reach);H+=D.value.length,D=D.next){var F=D.value;if(w.length>v.length)return;if(!(F instanceof l)){var G=1,K;if(M){if(K=c(q,H,v,I),!K||K.index>=v.length)break;var X=K.index,Q=K.index+K[0].length,R=H;for(R+=D.value.length;X>=R;)D=D.next,R+=D.value.length;if(R-=D.value.length,H=R,D.value instanceof l)continue;for(var V=D;V!==w.tail&&(R<Q||typeof V.value=="string");V=V.next)G++,R+=V.value.length;G--,F=v.slice(H,R),K.index-=H}else if(K=c(q,0,F,I),!K)continue;var X=K.index,j=K[0],P=F.slice(0,X),U=F.slice(X+j.length),Y=H+F.length;x&&Y>x.reach&&(x.reach=Y);var ne=D.prev;P&&(ne=h(w,ne,P),H+=P.length),m(w,ne,G);var ae=new l(k,$?o.tokenize(j,$):j,z,j);if(D=h(w,ne,ae),U&&h(w,D,U),G>1){var re={cause:k+","+T,reach:Y};f(v,w,b,D.prev,H,re),x&&re.reach>x.reach&&(x.reach=re.reach)}}}}}}function d(){var v={value:null,prev:null,next:null},w={value:null,prev:v,next:null};v.next=w,this.head=v,this.tail=w,this.length=0}function h(v,w,b){var _=w.next,S={value:b,prev:w,next:_};return w.next=S,_.prev=S,v.length++,S}function m(v,w,b){for(var _=w.next,S=0;S<b&&_!==v.tail;S++)_=_.next;w.next=_,_.prev=w,v.length-=S}function g(v){for(var w=[],b=v.head.next;b!==v.tail;)w.push(b.value),b=b.next;return w}return o}();t.exports=n,n.default=n}}),be=xK(wK());be.languages.markup={comment:{pattern:/<!--(?:(?!<!--)[\s\S])*?-->/,greedy:!0},prolog:{pattern:/<\?[\s\S]+?\?>/,greedy:!0},doctype:{pattern:/<!DOCTYPE(?:[^>"'[\]]|"[^"]*"|'[^']*')+(?:\[(?:[^<"'\]]|"[^"]*"|'[^']*'|<(?!!--)|<!--(?:[^-]|-(?!->))*-->)*\]\s*)?>/i,greedy:!0,inside:{"internal-subset":{pattern:/(^[^\[]*\[)[\s\S]+(?=\]>$)/,lookbehind:!0,greedy:!0,inside:null},string:{pattern:/"[^"]*"|'[^']*'/,greedy:!0},punctuation:/^<!|>$|[[\]]/,"doctype-tag":/^DOCTYPE/i,name:/[^\s<>'"]+/}},cdata:{pattern:/<!\[CDATA\[[\s\S]*?\]\]>/i,greedy:!0},tag:{pattern:/<\/?(?!\d)[^\s>\/=$<%]+(?:\s(?:\s*[^\s>\/=]+(?:\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))|(?=[\s/>])))+)?\s*\/?>/,greedy:!0,inside:{tag:{pattern:/^<\/?[^\s>\/]+/,inside:{punctuation:/^<\/?/,namespace:/^[^\s>\/:]+:/}},"special-attr":[],"attr-value":{pattern:/=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+)/,inside:{punctuation:[{pattern:/^=/,alias:"attr-equals"},{pattern:/^(\s*)["']|["']$/,lookbehind:!0}]}},punctuation:/\/?>/,"attr-name":{pattern:/[^\s>\/]+/,inside:{namespace:/^[^\s>\/:]+:/}}}},entity:[{pattern:/&[\da-z]{1,8};/i,alias:"named-entity"},/&#x?[\da-f]{1,8};/i]},be.languages.markup.tag.inside["attr-value"].inside.entity=be.languages.markup.entity,be.languages.markup.doctype.inside["internal-subset"].inside=be.languages.markup,be.hooks.add("wrap",function(e){e.type==="entity"&&(e.attributes.title=e.content.replace(/&/,"&"))}),Object.defineProperty(be.languages.markup.tag,"addInlined",{value:function(e,r){var n={},n=(n["language-"+r]={pattern:/(^<!\[CDATA\[)[\s\S]+?(?=\]\]>$)/i,lookbehind:!0,inside:be.languages[r]},n.cdata=/^<!\[CDATA\[|\]\]>$/i,{"included-cdata":{pattern:/<!\[CDATA\[[\s\S]*?\]\]>/i,inside:n}}),r=(n["language-"+r]={pattern:/[\s\S]+/,inside:be.languages[r]},{});r[e]={pattern:RegExp(/(<__[^>]*>)(?:<!\[CDATA\[(?:[^\]]|\](?!\]>))*\]\]>|(?!<!\[CDATA\[)[\s\S])*?(?=<\/__>)/.source.replace(/__/g,function(){return e}),"i"),lookbehind:!0,greedy:!0,inside:n},be.languages.insertBefore("markup","cdata",r)}}),Object.defineProperty(be.languages.markup.tag,"addAttribute",{value:function(e,t){be.languages.markup.tag.inside["special-attr"].push({pattern:RegExp(/(^|["'\s])/.source+"(?:"+e+")"+/\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))/.source,"i"),lookbehind:!0,inside:{"attr-name":/^[^\s=]+/,"attr-value":{pattern:/=[\s\S]+/,inside:{value:{pattern:/(^=\s*(["']|(?!["'])))\S[\s\S]*(?=\2$)/,lookbehind:!0,alias:[t,"language-"+t],inside:be.languages[t]},punctuation:[{pattern:/^=/,alias:"attr-equals"},/"|'/]}}}})}}),be.languages.html=be.languages.markup,be.languages.mathml=be.languages.markup,be.languages.svg=be.languages.markup,be.languages.xml=be.languages.extend("markup",{}),be.languages.ssml=be.languages.xml,be.languages.atom=be.languages.xml,be.languages.rss=be.languages.xml,function(e){var t={pattern:/\\[\\(){}[\]^$+*?|.]/,alias:"escape"},n=/\\(?:x[\da-fA-F]{2}|u[\da-fA-F]{4}|u\{[\da-fA-F]+\}|0[0-7]{0,2}|[123][0-7]{2}|c[a-zA-Z]|.)/,r="(?:[^\\\\-]|"+n.source+")",r=RegExp(r+"-"+r),i={pattern:/(<|')[^<>']+(?=[>']$)/,lookbehind:!0,alias:"variable"};e.languages.regex={"char-class":{pattern:/((?:^|[^\\])(?:\\\\)*)\[(?:[^\\\]]|\\[\s\S])*\]/,lookbehind:!0,inside:{"char-class-negation":{pattern:/(^\[)\^/,lookbehind:!0,alias:"operator"},"char-class-punctuation":{pattern:/^\[|\]$/,alias:"punctuation"},range:{pattern:r,inside:{escape:n,"range-punctuation":{pattern:/-/,alias:"operator"}}},"special-escape":t,"char-set":{pattern:/\\[wsd]|\\p\{[^{}]+\}/i,alias:"class-name"},escape:n}},"special-escape":t,"char-set":{pattern:/\.|\\[wsd]|\\p\{[^{}]+\}/i,alias:"class-name"},backreference:[{pattern:/\\(?![123][0-7]{2})[1-9]/,alias:"keyword"},{pattern:/\\k<[^<>']+>/,alias:"keyword",inside:{"group-name":i}}],anchor:{pattern:/[$^]|\\[ABbGZz]/,alias:"function"},escape:n,group:[{pattern:/\((?:\?(?:<[^<>']+>|'[^<>']+'|[>:]|<?[=!]|[idmnsuxU]+(?:-[idmnsuxU]+)?:?))?/,alias:"punctuation",inside:{"group-name":i}},{pattern:/\)/,alias:"punctuation"}],quantifier:{pattern:/(?:[+*?]|\{\d+(?:,\d*)?\})[?+]?/,alias:"number"},alternation:{pattern:/\|/,alias:"keyword"}}}(be),be.languages.clike={comment:[{pattern:/(^|[^\\])\/\*[\s\S]*?(?:\*\/|$)/,lookbehind:!0,greedy:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0,greedy:!0}],string:{pattern:/(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:!0},"class-name":{pattern:/(\b(?:class|extends|implements|instanceof|interface|new|trait)\s+|\bcatch\s+\()[\w.\\]+/i,lookbehind:!0,inside:{punctuation:/[.\\]/}},keyword:/\b(?:break|catch|continue|do|else|finally|for|function|if|in|instanceof|new|null|return|throw|try|while)\b/,boolean:/\b(?:false|true)\b/,function:/\b\w+(?=\()/,number:/\b0x[\da-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?/i,operator:/[<>]=?|[!=]=?=?|--?|\+\+?|&&?|\|\|?|[?*/~^%]/,punctuation:/[{}[\];(),.:]/},be.languages.javascript=be.languages.extend("clike",{"class-name":[be.languages.clike["class-name"],{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$A-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\.(?:constructor|prototype))/,lookbehind:!0}],keyword:[{pattern:/((?:^|\})\s*)catch\b/,lookbehind:!0},{pattern:/(^|[^.]|\.\.\.\s*)\b(?:as|assert(?=\s*\{)|async(?=\s*(?:function\b|\(|[$\w\xA0-\uFFFF]|$))|await|break|case|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally(?=\s*(?:\{|$))|for|from(?=\s*(?:['"]|$))|function|(?:get|set)(?=\s*(?:[#\[$\w\xA0-\uFFFF]|$))|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)\b/,lookbehind:!0}],function:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*(?:\.\s*(?:apply|bind|call)\s*)?\()/,number:{pattern:RegExp(/(^|[^\w$])/.source+"(?:"+/NaN|Infinity/.source+"|"+/0[bB][01]+(?:_[01]+)*n?/.source+"|"+/0[oO][0-7]+(?:_[0-7]+)*n?/.source+"|"+/0[xX][\dA-Fa-f]+(?:_[\dA-Fa-f]+)*n?/.source+"|"+/\d+(?:_\d+)*n/.source+"|"+/(?:\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\.\d+(?:_\d+)*)(?:[Ee][+-]?\d+(?:_\d+)*)?/.source+")"+/(?![\w$])/.source),lookbehind:!0},operator:/--|\+\+|\*\*=?|=>|&&=?|\|\|=?|[!=]==|<<=?|>>>?=?|[-+*/%&|^!=<>]=?|\.{3}|\?\?=?|\?\.?|[~:]/}),be.languages.javascript["class-name"][0].pattern=/(\b(?:class|extends|implements|instanceof|interface|new)\s+)[\w.\\]+/,be.languages.insertBefore("javascript","keyword",{regex:{pattern:RegExp(/((?:^|[^$\w\xA0-\uFFFF."'\])\s]|\b(?:return|yield))\s*)/.source+/\//.source+"(?:"+/(?:\[(?:[^\]\\\r\n]|\\.)*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}/.source+"|"+/(?:\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.)*\])*\])*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}v[dgimyus]{0,7}/.source+")"+/(?=(?:\s|\/\*(?:[^*]|\*(?!\/))*\*\/)*(?:$|[\r\n,.;:})\]]|\/\/))/.source),lookbehind:!0,greedy:!0,inside:{"regex-source":{pattern:/^(\/)[\s\S]+(?=\/[a-z]*$)/,lookbehind:!0,alias:"language-regex",inside:be.languages.regex},"regex-delimiter":/^\/|\/$/,"regex-flags":/^[a-z]+$/}},"function-variable":{pattern:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*[=:]\s*(?:async\s*)?(?:\bfunction\b|(?:\((?:[^()]|\([^()]*\))*\)|(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)\s*=>))/,alias:"function"},parameter:[{pattern:/(function(?:\s+(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)?\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\))/,lookbehind:!0,inside:be.languages.javascript},{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$a-z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*=>)/i,lookbehind:!0,inside:be.languages.javascript},{pattern:/(\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*=>)/,lookbehind:!0,inside:be.languages.javascript},{pattern:/((?:\b|\s|^)(?!(?:as|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)(?![$\w\xA0-\uFFFF]))(?:(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*)\(\s*|\]\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*\{)/,lookbehind:!0,inside:be.languages.javascript}],constant:/\b[A-Z](?:[A-Z_]|\dx?)*\b/}),be.languages.insertBefore("javascript","string",{hashbang:{pattern:/^#!.*/,greedy:!0,alias:"comment"},"template-string":{pattern:/`(?:\\[\s\S]|\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}|(?!\$\{)[^\\`])*`/,greedy:!0,inside:{"template-punctuation":{pattern:/^`|`$/,alias:"string"},interpolation:{pattern:/((?:^|[^\\])(?:\\{2})*)\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}/,lookbehind:!0,inside:{"interpolation-punctuation":{pattern:/^\$\{|\}$/,alias:"punctuation"},rest:be.languages.javascript}},string:/[\s\S]+/}},"string-property":{pattern:/((?:^|[,{])[ \t]*)(["'])(?:\\(?:\r\n|[\s\S])|(?!\2)[^\\\r\n])*\2(?=\s*:)/m,lookbehind:!0,greedy:!0,alias:"property"}}),be.languages.insertBefore("javascript","operator",{"literal-property":{pattern:/((?:^|[,{])[ \t]*)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*:)/m,lookbehind:!0,alias:"property"}}),be.languages.markup&&(be.languages.markup.tag.addInlined("script","javascript"),be.languages.markup.tag.addAttribute(/on(?:abort|blur|change|click|composition(?:end|start|update)|dblclick|error|focus(?:in|out)?|key(?:down|up)|load|mouse(?:down|enter|leave|move|out|over|up)|reset|resize|scroll|select|slotchange|submit|unload|wheel)/.source,"javascript")),be.languages.js=be.languages.javascript,be.languages.actionscript=be.languages.extend("javascript",{keyword:/\b(?:as|break|case|catch|class|const|default|delete|do|dynamic|each|else|extends|final|finally|for|function|get|if|implements|import|in|include|instanceof|interface|internal|is|namespace|native|new|null|override|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|use|var|void|while|with)\b/,operator:/\+\+|--|(?:[+\-*\/%^]|&&?|\|\|?|<<?|>>?>?|[!=]=?)=?|[~?@]/}),be.languages.actionscript["class-name"].alias="function",delete be.languages.actionscript.parameter,delete be.languages.actionscript["literal-property"],be.languages.markup&&be.languages.insertBefore("actionscript","string",{xml:{pattern:/(^|[^.])<\/?\w+(?:\s+[^\s>\/=]+=("|')(?:\\[\s\S]|(?!\2)[^\\])*\2)*\s*\/?>/,lookbehind:!0,inside:be.languages.markup}}),function(e){var t=/#(?!\{).+/,n={pattern:/#\{[^}]+\}/,alias:"variable"};e.languages.coffeescript=e.languages.extend("javascript",{comment:t,string:[{pattern:/'(?:\\[\s\S]|[^\\'])*'/,greedy:!0},{pattern:/"(?:\\[\s\S]|[^\\"])*"/,greedy:!0,inside:{interpolation:n}}],keyword:/\b(?:and|break|by|catch|class|continue|debugger|delete|do|each|else|extend|extends|false|finally|for|if|in|instanceof|is|isnt|let|loop|namespace|new|no|not|null|of|off|on|or|own|return|super|switch|then|this|throw|true|try|typeof|undefined|unless|until|when|while|window|with|yes|yield)\b/,"class-member":{pattern:/@(?!\d)\w+/,alias:"variable"}}),e.languages.insertBefore("coffeescript","comment",{"multiline-comment":{pattern:/###[\s\S]+?###/,alias:"comment"},"block-regex":{pattern:/\/{3}[\s\S]*?\/{3}/,alias:"regex",inside:{comment:t,interpolation:n}}}),e.languages.insertBefore("coffeescript","string",{"inline-javascript":{pattern:/`(?:\\[\s\S]|[^\\`])*`/,inside:{delimiter:{pattern:/^`|`$/,alias:"punctuation"},script:{pattern:/[\s\S]+/,alias:"language-javascript",inside:e.languages.javascript}}},"multiline-string":[{pattern:/'''[\s\S]*?'''/,greedy:!0,alias:"string"},{pattern:/"""[\s\S]*?"""/,greedy:!0,alias:"string",inside:{interpolation:n}}]}),e.languages.insertBefore("coffeescript","keyword",{property:/(?!\d)\w+(?=\s*:(?!:))/}),delete e.languages.coffeescript["template-string"],e.languages.coffee=e.languages.coffeescript}(be),function(e){var t=e.languages.javadoclike={parameter:{pattern:/(^[\t ]*(?:\/{3}|\*|\/\*\*)\s*@(?:arg|arguments|param)\s+)\w+/m,lookbehind:!0},keyword:{pattern:/(^[\t ]*(?:\/{3}|\*|\/\*\*)\s*|\{)@[a-z][a-zA-Z-]+\b/m,lookbehind:!0},punctuation:/[{}]/};Object.defineProperty(t,"addSupport",{value:function(n,r){(n=typeof n=="string"?[n]:n).forEach(function(i){var a=function(h){h.inside||(h.inside={}),h.inside.rest=r},o="doc-comment";if(l=e.languages[i]){var l,c=l[o];if((c=c||(l=e.languages.insertBefore(i,"comment",{"doc-comment":{pattern:/(^|[^\\])\/\*\*[^/][\s\S]*?(?:\*\/|$)/,lookbehind:!0,alias:"comment"}}))[o])instanceof RegExp&&(c=l[o]={pattern:c}),Array.isArray(c))for(var f=0,d=c.length;f<d;f++)c[f]instanceof RegExp&&(c[f]={pattern:c[f]}),a(c[f]);else a(c)}})}}),t.addSupport(["java","javascript","php"],t)}(be),function(e){var t=/(?:"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n])*')/,t=(e.languages.css={comment:/\/\*[\s\S]*?\*\//,atrule:{pattern:RegExp("@[\\w-](?:"+/[^;{\s"']|\s+(?!\s)/.source+"|"+t.source+")*?"+/(?:;|(?=\s*\{))/.source),inside:{rule:/^@[\w-]+/,"selector-function-argument":{pattern:/(\bselector\s*\(\s*(?![\s)]))(?:[^()\s]|\s+(?![\s)])|\((?:[^()]|\([^()]*\))*\))+(?=\s*\))/,lookbehind:!0,alias:"selector"},keyword:{pattern:/(^|[^\w-])(?:and|not|only|or)(?![\w-])/,lookbehind:!0}}},url:{pattern:RegExp("\\burl\\((?:"+t.source+"|"+/(?:[^\\\r\n()"']|\\[\s\S])*/.source+")\\)","i"),greedy:!0,inside:{function:/^url/i,punctuation:/^\(|\)$/,string:{pattern:RegExp("^"+t.source+"$"),alias:"url"}}},selector:{pattern:RegExp(`(^|[{}\\s])[^{}\\s](?:[^{};"'\\s]|\\s+(?![\\s{])|`+t.source+")*(?=\\s*\\{)"),lookbehind:!0},string:{pattern:t,greedy:!0},property:{pattern:/(^|[^-\w\xA0-\uFFFF])(?!\s)[-_a-z\xA0-\uFFFF](?:(?!\s)[-\w\xA0-\uFFFF])*(?=\s*:)/i,lookbehind:!0},important:/!important\b/i,function:{pattern:/(^|[^-a-z0-9])[-a-z0-9]+(?=\()/i,lookbehind:!0},punctuation:/[(){};:,]/},e.languages.css.atrule.inside.rest=e.languages.css,e.languages.markup);t&&(t.tag.addInlined("style","css"),t.tag.addAttribute("style","css"))}(be),function(e){var t=/("|')(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,t=(e.languages.css.selector={pattern:e.languages.css.selector.pattern,lookbehind:!0,inside:t={"pseudo-element":/:(?:after|before|first-letter|first-line|selection)|::[-\w]+/,"pseudo-class":/:[-\w]+/,class:/\.[-\w]+/,id:/#[-\w]+/,attribute:{pattern:RegExp(`\\[(?:[^[\\]"']|`+t.source+")*\\]"),greedy:!0,inside:{punctuation:/^\[|\]$/,"case-sensitivity":{pattern:/(\s)[si]$/i,lookbehind:!0,alias:"keyword"},namespace:{pattern:/^(\s*)(?:(?!\s)[-*\w\xA0-\uFFFF])*\|(?!=)/,lookbehind:!0,inside:{punctuation:/\|$/}},"attr-name":{pattern:/^(\s*)(?:(?!\s)[-\w\xA0-\uFFFF])+/,lookbehind:!0},"attr-value":[t,{pattern:/(=\s*)(?:(?!\s)[-\w\xA0-\uFFFF])+(?=\s*$)/,lookbehind:!0}],operator:/[|~*^$]?=/}},"n-th":[{pattern:/(\(\s*)[+-]?\d*[\dn](?:\s*[+-]\s*\d+)?(?=\s*\))/,lookbehind:!0,inside:{number:/[\dn]+/,operator:/[+-]/}},{pattern:/(\(\s*)(?:even|odd)(?=\s*\))/i,lookbehind:!0}],combinator:/>|\+|~|\|\|/,punctuation:/[(),]/}},e.languages.css.atrule.inside["selector-function-argument"].inside=t,e.languages.insertBefore("css","property",{variable:{pattern:/(^|[^-\w\xA0-\uFFFF])--(?!\s)[-_a-z\xA0-\uFFFF](?:(?!\s)[-\w\xA0-\uFFFF])*/i,lookbehind:!0}}),{pattern:/(\b\d+)(?:%|[a-z]+(?![\w-]))/,lookbehind:!0}),n={pattern:/(^|[^\w.-])-?(?:\d+(?:\.\d+)?|\.\d+)/,lookbehind:!0};e.languages.insertBefore("css","function",{operator:{pattern:/(\s)[+\-*\/](?=\s)/,lookbehind:!0},hexcode:{pattern:/\B#[\da-f]{3,8}\b/i,alias:"color"},color:[{pattern:/(^|[^\w-])(?:AliceBlue|AntiqueWhite|Aqua|Aquamarine|Azure|Beige|Bisque|Black|BlanchedAlmond|Blue|BlueViolet|Brown|BurlyWood|CadetBlue|Chartreuse|Chocolate|Coral|CornflowerBlue|Cornsilk|Crimson|Cyan|DarkBlue|DarkCyan|DarkGoldenRod|DarkGr[ae]y|DarkGreen|DarkKhaki|DarkMagenta|DarkOliveGreen|DarkOrange|DarkOrchid|DarkRed|DarkSalmon|DarkSeaGreen|DarkSlateBlue|DarkSlateGr[ae]y|DarkTurquoise|DarkViolet|DeepPink|DeepSkyBlue|DimGr[ae]y|DodgerBlue|FireBrick|FloralWhite|ForestGreen|Fuchsia|Gainsboro|GhostWhite|Gold|GoldenRod|Gr[ae]y|Green|GreenYellow|HoneyDew|HotPink|IndianRed|Indigo|Ivory|Khaki|Lavender|LavenderBlush|LawnGreen|LemonChiffon|LightBlue|LightCoral|LightCyan|LightGoldenRodYellow|LightGr[ae]y|LightGreen|LightPink|LightSalmon|LightSeaGreen|LightSkyBlue|LightSlateGr[ae]y|LightSteelBlue|LightYellow|Lime|LimeGreen|Linen|Magenta|Maroon|MediumAquaMarine|MediumBlue|MediumOrchid|MediumPurple|MediumSeaGreen|MediumSlateBlue|MediumSpringGreen|MediumTurquoise|MediumVioletRed|MidnightBlue|MintCream|MistyRose|Moccasin|NavajoWhite|Navy|OldLace|Olive|OliveDrab|Orange|OrangeRed|Orchid|PaleGoldenRod|PaleGreen|PaleTurquoise|PaleVioletRed|PapayaWhip|PeachPuff|Peru|Pink|Plum|PowderBlue|Purple|RebeccaPurple|Red|RosyBrown|RoyalBlue|SaddleBrown|Salmon|SandyBrown|SeaGreen|SeaShell|Sienna|Silver|SkyBlue|SlateBlue|SlateGr[ae]y|Snow|SpringGreen|SteelBlue|Tan|Teal|Thistle|Tomato|Transparent|Turquoise|Violet|Wheat|White|WhiteSmoke|Yellow|YellowGreen)(?![\w-])/i,lookbehind:!0},{pattern:/\b(?:hsl|rgb)\(\s*\d{1,3}\s*,\s*\d{1,3}%?\s*,\s*\d{1,3}%?\s*\)\B|\b(?:hsl|rgb)a\(\s*\d{1,3}\s*,\s*\d{1,3}%?\s*,\s*\d{1,3}%?\s*,\s*(?:0|0?\.\d+|1)\s*\)\B/i,inside:{unit:t,number:n,function:/[\w-]+(?=\()/,punctuation:/[(),]/}}],entity:/\\[\da-f]{1,8}/i,unit:t,number:n})}(be),function(e){var t=/[*&][^\s[\]{},]+/,n=/!(?:<[\w\-%#;/?:@&=+$,.!~*'()[\]]+>|(?:[a-zA-Z\d-]*!)?[\w\-%#;/?:@&=+$.~*'()]+)?/,r="(?:"+n.source+"(?:[ ]+"+t.source+")?|"+t.source+"(?:[ ]+"+n.source+")?)",i=/(?:[^\s\x00-\x08\x0e-\x1f!"#%&'*,\-:>?@[\]`{|}\x7f-\x84\x86-\x9f\ud800-\udfff\ufffe\uffff]|[?:-]<PLAIN>)(?:[ \t]*(?:(?![#:])<PLAIN>|:<PLAIN>))*/.source.replace(/<PLAIN>/g,function(){return/[^\s\x00-\x08\x0e-\x1f,[\]{}\x7f-\x84\x86-\x9f\ud800-\udfff\ufffe\uffff]/.source}),a=/"(?:[^"\\\r\n]|\\.)*"|'(?:[^'\\\r\n]|\\.)*'/.source;function o(l,c){c=(c||"").replace(/m/g,"")+"m";var f=/([:\-,[{]\s*(?:\s<<prop>>[ \t]+)?)(?:<<value>>)(?=[ \t]*(?:$|,|\]|\}|(?:[\r\n]\s*)?#))/.source.replace(/<<prop>>/g,function(){return r}).replace(/<<value>>/g,function(){return l});return RegExp(f,c)}e.languages.yaml={scalar:{pattern:RegExp(/([\-:]\s*(?:\s<<prop>>[ \t]+)?[|>])[ \t]*(?:((?:\r?\n|\r)[ \t]+)\S[^\r\n]*(?:\2[^\r\n]+)*)/.source.replace(/<<prop>>/g,function(){return r})),lookbehind:!0,alias:"string"},comment:/#.*/,key:{pattern:RegExp(/((?:^|[:\-,[{\r\n?])[ \t]*(?:<<prop>>[ \t]+)?)<<key>>(?=\s*:\s)/.source.replace(/<<prop>>/g,function(){return r}).replace(/<<key>>/g,function(){return"(?:"+i+"|"+a+")"})),lookbehind:!0,greedy:!0,alias:"atrule"},directive:{pattern:/(^[ \t]*)%.+/m,lookbehind:!0,alias:"important"},datetime:{pattern:o(/\d{4}-\d\d?-\d\d?(?:[tT]|[ \t]+)\d\d?:\d{2}:\d{2}(?:\.\d*)?(?:[ \t]*(?:Z|[-+]\d\d?(?::\d{2})?))?|\d{4}-\d{2}-\d{2}|\d\d?:\d{2}(?::\d{2}(?:\.\d*)?)?/.source),lookbehind:!0,alias:"number"},boolean:{pattern:o(/false|true/.source,"i"),lookbehind:!0,alias:"important"},null:{pattern:o(/null|~/.source,"i"),lookbehind:!0,alias:"important"},string:{pattern:o(a),lookbehind:!0,greedy:!0},number:{pattern:o(/[+-]?(?:0x[\da-f]+|0o[0-7]+|(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?|\.inf|\.nan)/.source,"i"),lookbehind:!0},tag:n,important:t,punctuation:/---|[:[\]{}\-,|>?]|\.\.\./},e.languages.yml=e.languages.yaml}(be),function(e){var t=/(?:\\.|[^\\\n\r]|(?:\n|\r\n?)(?![\r\n]))/.source;function n(f){return f=f.replace(/<inner>/g,function(){return t}),RegExp(/((?:^|[^\\])(?:\\{2})*)/.source+"(?:"+f+")")}var r=/(?:\\.|``(?:[^`\r\n]|`(?!`))+``|`[^`\r\n]+`|[^\\|\r\n`])+/.source,i=/\|?__(?:\|__)+\|?(?:(?:\n|\r\n?)|(?![\s\S]))/.source.replace(/__/g,function(){return r}),a=/\|?[ \t]*:?-{3,}:?[ \t]*(?:\|[ \t]*:?-{3,}:?[ \t]*)+\|?(?:\n|\r\n?)/.source,o=(e.languages.markdown=e.languages.extend("markup",{}),e.languages.insertBefore("markdown","prolog",{"front-matter-block":{pattern:/(^(?:\s*[\r\n])?)---(?!.)[\s\S]*?[\r\n]---(?!.)/,lookbehind:!0,greedy:!0,inside:{punctuation:/^---|---$/,"front-matter":{pattern:/\S+(?:\s+\S+)*/,alias:["yaml","language-yaml"],inside:e.languages.yaml}}},blockquote:{pattern:/^>(?:[\t ]*>)*/m,alias:"punctuation"},table:{pattern:RegExp("^"+i+a+"(?:"+i+")*","m"),inside:{"table-data-rows":{pattern:RegExp("^("+i+a+")(?:"+i+")*$"),lookbehind:!0,inside:{"table-data":{pattern:RegExp(r),inside:e.languages.markdown},punctuation:/\|/}},"table-line":{pattern:RegExp("^("+i+")"+a+"$"),lookbehind:!0,inside:{punctuation:/\||:?-{3,}:?/}},"table-header-row":{pattern:RegExp("^"+i+"$"),inside:{"table-header":{pattern:RegExp(r),alias:"important",inside:e.languages.markdown},punctuation:/\|/}}}},code:[{pattern:/((?:^|\n)[ \t]*\n|(?:^|\r\n?)[ \t]*\r\n?)(?: {4}|\t).+(?:(?:\n|\r\n?)(?: {4}|\t).+)*/,lookbehind:!0,alias:"keyword"},{pattern:/^```[\s\S]*?^```$/m,greedy:!0,inside:{"code-block":{pattern:/^(```.*(?:\n|\r\n?))[\s\S]+?(?=(?:\n|\r\n?)^```$)/m,lookbehind:!0},"code-language":{pattern:/^(```).+/,lookbehind:!0},punctuation:/```/}}],title:[{pattern:/\S.*(?:\n|\r\n?)(?:==+|--+)(?=[ \t]*$)/m,alias:"important",inside:{punctuation:/==+$|--+$/}},{pattern:/(^\s*)#.+/m,lookbehind:!0,alias:"important",inside:{punctuation:/^#+|#+$/}}],hr:{pattern:/(^\s*)([*-])(?:[\t ]*\2){2,}(?=\s*$)/m,lookbehind:!0,alias:"punctuation"},list:{pattern:/(^\s*)(?:[*+-]|\d+\.)(?=[\t ].)/m,lookbehind:!0,alias:"punctuation"},"url-reference":{pattern:/!?\[[^\]]+\]:[\t ]+(?:\S+|<(?:\\.|[^>\\])+>)(?:[\t ]+(?:"(?:\\.|[^"\\])*"|'(?:\\.|[^'\\])*'|\((?:\\.|[^)\\])*\)))?/,inside:{variable:{pattern:/^(!?\[)[^\]]+/,lookbehind:!0},string:/(?:"(?:\\.|[^"\\])*"|'(?:\\.|[^'\\])*'|\((?:\\.|[^)\\])*\))$/,punctuation:/^[\[\]!:]|[<>]/},alias:"url"},bold:{pattern:n(/\b__(?:(?!_)<inner>|_(?:(?!_)<inner>)+_)+__\b|\*\*(?:(?!\*)<inner>|\*(?:(?!\*)<inner>)+\*)+\*\*/.source),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^..)[\s\S]+(?=..$)/,lookbehind:!0,inside:{}},punctuation:/\*\*|__/}},italic:{pattern:n(/\b_(?:(?!_)<inner>|__(?:(?!_)<inner>)+__)+_\b|\*(?:(?!\*)<inner>|\*\*(?:(?!\*)<inner>)+\*\*)+\*/.source),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^.)[\s\S]+(?=.$)/,lookbehind:!0,inside:{}},punctuation:/[*_]/}},strike:{pattern:n(/(~~?)(?:(?!~)<inner>)+\2/.source),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^~~?)[\s\S]+(?=\1$)/,lookbehind:!0,inside:{}},punctuation:/~~?/}},"code-snippet":{pattern:/(^|[^\\`])(?:``[^`\r\n]+(?:`[^`\r\n]+)*``(?!`)|`[^`\r\n]+`(?!`))/,lookbehind:!0,greedy:!0,alias:["code","keyword"]},url:{pattern:n(/!?\[(?:(?!\])<inner>)+\](?:\([^\s)]+(?:[\t ]+"(?:\\.|[^"\\])*")?\)|[ \t]?\[(?:(?!\])<inner>)+\])/.source),lookbehind:!0,greedy:!0,inside:{operator:/^!/,content:{pattern:/(^\[)[^\]]+(?=\])/,lookbehind:!0,inside:{}},variable:{pattern:/(^\][ \t]?\[)[^\]]+(?=\]$)/,lookbehind:!0},url:{pattern:/(^\]\()[^\s)]+/,lookbehind:!0},string:{pattern:/(^[ \t]+)"(?:\\.|[^"\\])*"(?=\)$)/,lookbehind:!0}}}}),["url","bold","italic","strike"].forEach(function(f){["url","bold","italic","strike","code-snippet"].forEach(function(d){f!==d&&(e.languages.markdown[f].inside.content.inside[d]=e.languages.markdown[d])})}),e.hooks.add("after-tokenize",function(f){f.language!=="markdown"&&f.language!=="md"||function d(h){if(h&&typeof h!="string")for(var m=0,g=h.length;m<g;m++){var v,w=h[m];w.type!=="code"?d(w.content):(v=w.content[1],w=w.content[3],v&&w&&v.type==="code-language"&&w.type==="code-block"&&typeof v.content=="string"&&(v=v.content.replace(/\b#/g,"sharp").replace(/\b\+\+/g,"pp"),v="language-"+(v=(/[a-z][\w-]*/i.exec(v)||[""])[0].toLowerCase()),w.alias?typeof w.alias=="string"?w.alias=[w.alias,v]:w.alias.push(v):w.alias=[v]))}}(f.tokens)}),e.hooks.add("wrap",function(f){if(f.type==="code-block"){for(var d="",h=0,m=f.classes.length;h<m;h++){var g=f.classes[h],g=/language-(.+)/.exec(g);if(g){d=g[1];break}}var v,w=e.languages[d];w?f.content=e.highlight(function(b){return b=b.replace(o,""),b=b.replace(/&(\w{1,8}|#x?[\da-f]{1,8});/gi,function(_,S){var x;return(S=S.toLowerCase())[0]==="#"?(x=S[1]==="x"?parseInt(S.slice(2),16):Number(S.slice(1)),c(x)):l[S]||_})}(f.content),w,d):d&&d!=="none"&&e.plugins.autoloader&&(v="md-"+new Date().valueOf()+"-"+Math.floor(1e16*Math.random()),f.attributes.id=v,e.plugins.autoloader.loadLanguages(d,function(){var b=document.getElementById(v);b&&(b.innerHTML=e.highlight(b.textContent,e.languages[d],d))}))}}),RegExp(e.languages.markup.tag.pattern.source,"gi")),l={amp:"&",lt:"<",gt:">",quot:'"'},c=String.fromCodePoint||String.fromCharCode;e.languages.md=e.languages.markdown}(be),be.languages.graphql={comment:/#.*/,description:{pattern:/(?:"""(?:[^"]|(?!""")")*"""|"(?:\\.|[^\\"\r\n])*")(?=\s*[a-z_])/i,greedy:!0,alias:"string",inside:{"language-markdown":{pattern:/(^"(?:"")?)(?!\1)[\s\S]+(?=\1$)/,lookbehind:!0,inside:be.languages.markdown}}},string:{pattern:/"""(?:[^"]|(?!""")")*"""|"(?:\\.|[^\\"\r\n])*"/,greedy:!0},number:/(?:\B-|\b)\d+(?:\.\d+)?(?:e[+-]?\d+)?\b/i,boolean:/\b(?:false|true)\b/,variable:/\$[a-z_]\w*/i,directive:{pattern:/@[a-z_]\w*/i,alias:"function"},"attr-name":{pattern:/\b[a-z_]\w*(?=\s*(?:\((?:[^()"]|"(?:\\.|[^\\"\r\n])*")*\))?:)/i,greedy:!0},"atom-input":{pattern:/\b[A-Z]\w*Input\b/,alias:"class-name"},scalar:/\b(?:Boolean|Float|ID|Int|String)\b/,constant:/\b[A-Z][A-Z_\d]*\b/,"class-name":{pattern:/(\b(?:enum|implements|interface|on|scalar|type|union)\s+|&\s*|:\s*|\[)[A-Z_]\w*/,lookbehind:!0},fragment:{pattern:/(\bfragment\s+|\.{3}\s*(?!on\b))[a-zA-Z_]\w*/,lookbehind:!0,alias:"function"},"definition-mutation":{pattern:/(\bmutation\s+)[a-zA-Z_]\w*/,lookbehind:!0,alias:"function"},"definition-query":{pattern:/(\bquery\s+)[a-zA-Z_]\w*/,lookbehind:!0,alias:"function"},keyword:/\b(?:directive|enum|extend|fragment|implements|input|interface|mutation|on|query|repeatable|scalar|schema|subscription|type|union)\b/,operator:/[!=|&]|\.{3}/,"property-query":/\w+(?=\s*\()/,object:/\w+(?=\s*\{)/,punctuation:/[!(){}\[\]:=,]/,property:/\w+/},be.hooks.add("after-tokenize",function(e){if(e.language==="graphql")for(var t=e.tokens.filter(function(v){return typeof v!="string"&&v.type!=="comment"&&v.type!=="scalar"}),n=0;n<t.length;){var r=t[n++];if(r.type==="keyword"&&r.content==="mutation"){var i=[];if(h(["definition-mutation","punctuation"])&&d(1).content==="("){n+=2;var a=m(/^\($/,/^\)$/);if(a===-1)continue;for(;n<a;n++){var o=d(0);o.type==="variable"&&(g(o,"variable-input"),i.push(o.content))}n=a+1}if(h(["punctuation","property-query"])&&d(0).content==="{"&&(n++,g(d(0),"property-mutation"),0<i.length)){var l=m(/^\{$/,/^\}$/);if(l!==-1)for(var c=n;c<l;c++){var f=t[c];f.type==="variable"&&0<=i.indexOf(f.content)&&g(f,"variable-input")}}}}function d(v){return t[n+v]}function h(v,w){w=w||0;for(var b=0;b<v.length;b++){var _=d(b+w);if(!_||_.type!==v[b])return}return 1}function m(v,w){for(var b=1,_=n;_<t.length;_++){var S=t[_],x=S.content;if(S.type==="punctuation"&&typeof x=="string"){if(v.test(x))b++;else if(w.test(x)&&--b===0)return _}}return-1}function g(v,w){var b=v.alias;b?Array.isArray(b)||(v.alias=b=[b]):v.alias=b=[],b.push(w)}}),be.languages.sql={comment:{pattern:/(^|[^\\])(?:\/\*[\s\S]*?\*\/|(?:--|\/\/|#).*)/,lookbehind:!0},variable:[{pattern:/@(["'`])(?:\\[\s\S]|(?!\1)[^\\])+\1/,greedy:!0},/@[\w.$]+/],string:{pattern:/(^|[^@\\])("|')(?:\\[\s\S]|(?!\2)[^\\]|\2\2)*\2/,greedy:!0,lookbehind:!0},identifier:{pattern:/(^|[^@\\])`(?:\\[\s\S]|[^`\\]|``)*`/,greedy:!0,lookbehind:!0,inside:{punctuation:/^`|`$/}},function:/\b(?:AVG|COUNT|FIRST|FORMAT|LAST|LCASE|LEN|MAX|MID|MIN|MOD|NOW|ROUND|SUM|UCASE)(?=\s*\()/i,keyword:/\b(?:ACTION|ADD|AFTER|ALGORITHM|ALL|ALTER|ANALYZE|ANY|APPLY|AS|ASC|AUTHORIZATION|AUTO_INCREMENT|BACKUP|BDB|BEGIN|BERKELEYDB|BIGINT|BINARY|BIT|BLOB|BOOL|BOOLEAN|BREAK|BROWSE|BTREE|BULK|BY|CALL|CASCADED?|CASE|CHAIN|CHAR(?:ACTER|SET)?|CHECK(?:POINT)?|CLOSE|CLUSTERED|COALESCE|COLLATE|COLUMNS?|COMMENT|COMMIT(?:TED)?|COMPUTE|CONNECT|CONSISTENT|CONSTRAINT|CONTAINS(?:TABLE)?|CONTINUE|CONVERT|CREATE|CROSS|CURRENT(?:_DATE|_TIME|_TIMESTAMP|_USER)?|CURSOR|CYCLE|DATA(?:BASES?)?|DATE(?:TIME)?|DAY|DBCC|DEALLOCATE|DEC|DECIMAL|DECLARE|DEFAULT|DEFINER|DELAYED|DELETE|DELIMITERS?|DENY|DESC|DESCRIBE|DETERMINISTIC|DISABLE|DISCARD|DISK|DISTINCT|DISTINCTROW|DISTRIBUTED|DO|DOUBLE|DROP|DUMMY|DUMP(?:FILE)?|DUPLICATE|ELSE(?:IF)?|ENABLE|ENCLOSED|END|ENGINE|ENUM|ERRLVL|ERRORS|ESCAPED?|EXCEPT|EXEC(?:UTE)?|EXISTS|EXIT|EXPLAIN|EXTENDED|FETCH|FIELDS|FILE|FILLFACTOR|FIRST|FIXED|FLOAT|FOLLOWING|FOR(?: EACH ROW)?|FORCE|FOREIGN|FREETEXT(?:TABLE)?|FROM|FULL|FUNCTION|GEOMETRY(?:COLLECTION)?|GLOBAL|GOTO|GRANT|GROUP|HANDLER|HASH|HAVING|HOLDLOCK|HOUR|IDENTITY(?:COL|_INSERT)?|IF|IGNORE|IMPORT|INDEX|INFILE|INNER|INNODB|INOUT|INSERT|INT|INTEGER|INTERSECT|INTERVAL|INTO|INVOKER|ISOLATION|ITERATE|JOIN|KEYS?|KILL|LANGUAGE|LAST|LEAVE|LEFT|LEVEL|LIMIT|LINENO|LINES|LINESTRING|LOAD|LOCAL|LOCK|LONG(?:BLOB|TEXT)|LOOP|MATCH(?:ED)?|MEDIUM(?:BLOB|INT|TEXT)|MERGE|MIDDLEINT|MINUTE|MODE|MODIFIES|MODIFY|MONTH|MULTI(?:LINESTRING|POINT|POLYGON)|NATIONAL|NATURAL|NCHAR|NEXT|NO|NONCLUSTERED|NULLIF|NUMERIC|OFF?|OFFSETS?|ON|OPEN(?:DATASOURCE|QUERY|ROWSET)?|OPTIMIZE|OPTION(?:ALLY)?|ORDER|OUT(?:ER|FILE)?|OVER|PARTIAL|PARTITION|PERCENT|PIVOT|PLAN|POINT|POLYGON|PRECEDING|PRECISION|PREPARE|PREV|PRIMARY|PRINT|PRIVILEGES|PROC(?:EDURE)?|PUBLIC|PURGE|QUICK|RAISERROR|READS?|REAL|RECONFIGURE|REFERENCES|RELEASE|RENAME|REPEAT(?:ABLE)?|REPLACE|REPLICATION|REQUIRE|RESIGNAL|RESTORE|RESTRICT|RETURN(?:ING|S)?|REVOKE|RIGHT|ROLLBACK|ROUTINE|ROW(?:COUNT|GUIDCOL|S)?|RTREE|RULE|SAVE(?:POINT)?|SCHEMA|SECOND|SELECT|SERIAL(?:IZABLE)?|SESSION(?:_USER)?|SET(?:USER)?|SHARE|SHOW|SHUTDOWN|SIMPLE|SMALLINT|SNAPSHOT|SOME|SONAME|SQL|START(?:ING)?|STATISTICS|STATUS|STRIPED|SYSTEM_USER|TABLES?|TABLESPACE|TEMP(?:ORARY|TABLE)?|TERMINATED|TEXT(?:SIZE)?|THEN|TIME(?:STAMP)?|TINY(?:BLOB|INT|TEXT)|TOP?|TRAN(?:SACTIONS?)?|TRIGGER|TRUNCATE|TSEQUAL|TYPES?|UNBOUNDED|UNCOMMITTED|UNDEFINED|UNION|UNIQUE|UNLOCK|UNPIVOT|UNSIGNED|UPDATE(?:TEXT)?|USAGE|USE|USER|USING|VALUES?|VAR(?:BINARY|CHAR|CHARACTER|YING)|VIEW|WAITFOR|WARNINGS|WHEN|WHERE|WHILE|WITH(?: ROLLUP|IN)?|WORK|WRITE(?:TEXT)?|YEAR)\b/i,boolean:/\b(?:FALSE|NULL|TRUE)\b/i,number:/\b0x[\da-f]+\b|\b\d+(?:\.\d*)?|\B\.\d+\b/i,operator:/[-+*\/=%^~]|&&?|\|\|?|!=?|<(?:=>?|<|>)?|>[>=]?|\b(?:AND|BETWEEN|DIV|ILIKE|IN|IS|LIKE|NOT|OR|REGEXP|RLIKE|SOUNDS LIKE|XOR)\b/i,punctuation:/[;[\]()`,.]/},function(e){var t=e.languages.javascript["template-string"],n=t.pattern.source,r=t.inside.interpolation,i=r.inside["interpolation-punctuation"],a=r.pattern.source;function o(h,m){if(e.languages[h])return{pattern:RegExp("((?:"+m+")\\s*)"+n),lookbehind:!0,greedy:!0,inside:{"template-punctuation":{pattern:/^`|`$/,alias:"string"},"embedded-code":{pattern:/[\s\S]+/,alias:h}}}}function l(h,m,g){return h={code:h,grammar:m,language:g},e.hooks.run("before-tokenize",h),h.tokens=e.tokenize(h.code,h.grammar),e.hooks.run("after-tokenize",h),h.tokens}function c(h,m,g){var b=e.tokenize(h,{interpolation:{pattern:RegExp(a),lookbehind:!0}}),v=0,w={},b=l(b.map(function(S){if(typeof S=="string")return S;for(var x,k,S=S.content;h.indexOf((k=v++,x="___"+g.toUpperCase()+"_"+k+"___"))!==-1;);return w[x]=S,x}).join(""),m,g),_=Object.keys(w);return v=0,function S(x){for(var k=0;k<x.length;k++){if(v>=_.length)return;var A,T,O,$,I,M,z,L=x[k];typeof L=="string"||typeof L.content=="string"?(A=_[v],(z=(M=typeof L=="string"?L:L.content).indexOf(A))!==-1&&(++v,T=M.substring(0,z),I=w[A],O=void 0,($={})["interpolation-punctuation"]=i,($=e.tokenize(I,$)).length===3&&((O=[1,1]).push.apply(O,l($[1],e.languages.javascript,"javascript")),$.splice.apply($,O)),O=new e.Token("interpolation",$,r.alias,I),$=M.substring(z+A.length),I=[],T&&I.push(T),I.push(O),$&&(S(M=[$]),I.push.apply(I,M)),typeof L=="string"?(x.splice.apply(x,[k,1].concat(I)),k+=I.length-1):L.content=I)):(z=L.content,Array.isArray(z)?S(z):S([z]))}}(b),new e.Token(g,b,"language-"+g,h)}e.languages.javascript["template-string"]=[o("css",/\b(?:styled(?:\([^)]*\))?(?:\s*\.\s*\w+(?:\([^)]*\))*)*|css(?:\s*\.\s*(?:global|resolve))?|createGlobalStyle|keyframes)/.source),o("html",/\bhtml|\.\s*(?:inner|outer)HTML\s*\+?=/.source),o("svg",/\bsvg/.source),o("markdown",/\b(?:markdown|md)/.source),o("graphql",/\b(?:gql|graphql(?:\s*\.\s*experimental)?)/.source),o("sql",/\bsql/.source),t].filter(Boolean);var f={javascript:!0,js:!0,typescript:!0,ts:!0,jsx:!0,tsx:!0};function d(h){return typeof h=="string"?h:Array.isArray(h)?h.map(d).join(""):d(h.content)}e.hooks.add("after-tokenize",function(h){h.language in f&&function m(g){for(var v=0,w=g.length;v<w;v++){var b,_,S,x=g[v];typeof x!="string"&&(b=x.content,Array.isArray(b)?x.type==="template-string"?(x=b[1],b.length===3&&typeof x!="string"&&x.type==="embedded-code"&&(_=d(x),x=x.alias,x=Array.isArray(x)?x[0]:x,S=e.languages[x])&&(b[1]=c(_,S,x))):m(b):typeof b!="string"&&m([b]))}}(h.tokens)})}(be),function(e){e.languages.typescript=e.languages.extend("javascript",{"class-name":{pattern:/(\b(?:class|extends|implements|instanceof|interface|new|type)\s+)(?!keyof\b)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?:\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>)?/,lookbehind:!0,greedy:!0,inside:null},builtin:/\b(?:Array|Function|Promise|any|boolean|console|never|number|string|symbol|unknown)\b/}),e.languages.typescript.keyword.push(/\b(?:abstract|declare|is|keyof|readonly|require)\b/,/\b(?:asserts|infer|interface|module|namespace|type)\b(?=\s*(?:[{_$a-zA-Z\xA0-\uFFFF]|$))/,/\btype\b(?=\s*(?:[\{*]|$))/),delete e.languages.typescript.parameter,delete e.languages.typescript["literal-property"];var t=e.languages.extend("typescript",{});delete t["class-name"],e.languages.typescript["class-name"].inside=t,e.languages.insertBefore("typescript","function",{decorator:{pattern:/@[$\w\xA0-\uFFFF]+/,inside:{at:{pattern:/^@/,alias:"operator"},function:/^[\s\S]+/}},"generic-function":{pattern:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>(?=\s*\()/,greedy:!0,inside:{function:/^#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*/,generic:{pattern:/<[\s\S]+/,alias:"class-name",inside:t}}}}),e.languages.ts=e.languages.typescript}(be),function(e){var t=e.languages.javascript,n=/\{(?:[^{}]|\{(?:[^{}]|\{[^{}]*\})*\})+\}/.source,r="(@(?:arg|argument|param|property)\\s+(?:"+n+"\\s+)?)";e.languages.jsdoc=e.languages.extend("javadoclike",{parameter:{pattern:RegExp(r+/(?:(?!\s)[$\w\xA0-\uFFFF.])+(?=\s|$)/.source),lookbehind:!0,inside:{punctuation:/\./}}}),e.languages.insertBefore("jsdoc","keyword",{"optional-parameter":{pattern:RegExp(r+/\[(?:(?!\s)[$\w\xA0-\uFFFF.])+(?:=[^[\]]+)?\](?=\s|$)/.source),lookbehind:!0,inside:{parameter:{pattern:/(^\[)[$\w\xA0-\uFFFF\.]+/,lookbehind:!0,inside:{punctuation:/\./}},code:{pattern:/(=)[\s\S]*(?=\]$)/,lookbehind:!0,inside:t,alias:"language-javascript"},punctuation:/[=[\]]/}},"class-name":[{pattern:RegExp(/(@(?:augments|class|extends|interface|memberof!?|template|this|typedef)\s+(?:<TYPE>\s+)?)[A-Z]\w*(?:\.[A-Z]\w*)*/.source.replace(/<TYPE>/g,function(){return n})),lookbehind:!0,inside:{punctuation:/\./}},{pattern:RegExp("(@[a-z]+\\s+)"+n),lookbehind:!0,inside:{string:t.string,number:t.number,boolean:t.boolean,keyword:e.languages.typescript.keyword,operator:/=>|\.\.\.|[&|?:*]/,punctuation:/[.,;=<>{}()[\]]/}}],example:{pattern:/(@example\s+(?!\s))(?:[^@\s]|\s+(?!\s))+?(?=\s*(?:\*\s*)?(?:@\w|\*\/))/,lookbehind:!0,inside:{code:{pattern:/^([\t ]*(?:\*\s*)?)\S.*$/m,lookbehind:!0,inside:t,alias:"language-javascript"}}}}),e.languages.javadoclike.addSupport("javascript",e.languages.jsdoc)}(be),function(e){e.languages.flow=e.languages.extend("javascript",{}),e.languages.insertBefore("flow","keyword",{type:[{pattern:/\b(?:[Bb]oolean|Function|[Nn]umber|[Ss]tring|[Ss]ymbol|any|mixed|null|void)\b/,alias:"class-name"}]}),e.languages.flow["function-variable"].pattern=/(?!\s)[_$a-z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*=\s*(?:function\b|(?:\([^()]*\)(?:\s*:\s*\w+)?|(?!\s)[_$a-z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)\s*=>))/i,delete e.languages.flow.parameter,e.languages.insertBefore("flow","operator",{"flow-punctuation":{pattern:/\{\||\|\}/,alias:"punctuation"}}),Array.isArray(e.languages.flow.keyword)||(e.languages.flow.keyword=[e.languages.flow.keyword]),e.languages.flow.keyword.unshift({pattern:/(^|[^$]\b)(?:Class|declare|opaque|type)\b(?!\$)/,lookbehind:!0},{pattern:/(^|[^$]\B)\$(?:Diff|Enum|Exact|Keys|ObjMap|PropertyType|Record|Shape|Subtype|Supertype|await)\b(?!\$)/,lookbehind:!0})}(be),be.languages.n4js=be.languages.extend("javascript",{keyword:/\b(?:Array|any|boolean|break|case|catch|class|const|constructor|continue|debugger|declare|default|delete|do|else|enum|export|extends|false|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|module|new|null|number|package|private|protected|public|return|set|static|string|super|switch|this|throw|true|try|typeof|var|void|while|with|yield)\b/}),be.languages.insertBefore("n4js","constant",{annotation:{pattern:/@+\w+/,alias:"operator"}}),be.languages.n4jsd=be.languages.n4js,function(e){function t(o,l){return RegExp(o.replace(/<ID>/g,function(){return/(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*/.source}),l)}e.languages.insertBefore("javascript","function-variable",{"method-variable":{pattern:RegExp("(\\.\\s*)"+e.languages.javascript["function-variable"].pattern.source),lookbehind:!0,alias:["function-variable","method","function","property-access"]}}),e.languages.insertBefore("javascript","function",{method:{pattern:RegExp("(\\.\\s*)"+e.languages.javascript.function.source),lookbehind:!0,alias:["function","property-access"]}}),e.languages.insertBefore("javascript","constant",{"known-class-name":[{pattern:/\b(?:(?:Float(?:32|64)|(?:Int|Uint)(?:8|16|32)|Uint8Clamped)?Array|ArrayBuffer|BigInt|Boolean|DataView|Date|Error|Function|Intl|JSON|(?:Weak)?(?:Map|Set)|Math|Number|Object|Promise|Proxy|Reflect|RegExp|String|Symbol|WebAssembly)\b/,alias:"class-name"},{pattern:/\b(?:[A-Z]\w*)Error\b/,alias:"class-name"}]}),e.languages.insertBefore("javascript","keyword",{imports:{pattern:t(/(\bimport\b\s*)(?:<ID>(?:\s*,\s*(?:\*\s*as\s+<ID>|\{[^{}]*\}))?|\*\s*as\s+<ID>|\{[^{}]*\})(?=\s*\bfrom\b)/.source),lookbehind:!0,inside:e.languages.javascript},exports:{pattern:t(/(\bexport\b\s*)(?:\*(?:\s*as\s+<ID>)?(?=\s*\bfrom\b)|\{[^{}]*\})/.source),lookbehind:!0,inside:e.languages.javascript}}),e.languages.javascript.keyword.unshift({pattern:/\b(?:as|default|export|from|import)\b/,alias:"module"},{pattern:/\b(?:await|break|catch|continue|do|else|finally|for|if|return|switch|throw|try|while|yield)\b/,alias:"control-flow"},{pattern:/\bnull\b/,alias:["null","nil"]},{pattern:/\bundefined\b/,alias:"nil"}),e.languages.insertBefore("javascript","operator",{spread:{pattern:/\.{3}/,alias:"operator"},arrow:{pattern:/=>/,alias:"operator"}}),e.languages.insertBefore("javascript","punctuation",{"property-access":{pattern:t(/(\.\s*)#?<ID>/.source),lookbehind:!0},"maybe-class-name":{pattern:/(^|[^$\w\xA0-\uFFFF])[A-Z][$\w\xA0-\uFFFF]+/,lookbehind:!0},dom:{pattern:/\b(?:document|(?:local|session)Storage|location|navigator|performance|window)\b/,alias:"variable"},console:{pattern:/\bconsole(?=\s*\.)/,alias:"class-name"}});for(var n=["function","function-variable","method","method-variable","property-access"],r=0;r<n.length;r++){var a=n[r],i=e.languages.javascript[a],a=(i=e.util.type(i)==="RegExp"?e.languages.javascript[a]={pattern:i}:i).inside||{};(i.inside=a)["maybe-class-name"]=/^[A-Z][\s\S]*/}}(be),function(e){var t=e.util.clone(e.languages.javascript),n=/(?:\s|\/\/.*(?!.)|\/\*(?:[^*]|\*(?!\/))\*\/)/.source,r=/(?:\{(?:\{(?:\{[^{}]*\}|[^{}])*\}|[^{}])*\})/.source,i=/(?:\{<S>*\.{3}(?:[^{}]|<BRACES>)*\})/.source;function a(c,f){return c=c.replace(/<S>/g,function(){return n}).replace(/<BRACES>/g,function(){return r}).replace(/<SPREAD>/g,function(){return i}),RegExp(c,f)}i=a(i).source,e.languages.jsx=e.languages.extend("markup",t),e.languages.jsx.tag.pattern=a(/<\/?(?:[\w.:-]+(?:<S>+(?:[\w.:$-]+(?:=(?:"(?:\\[\s\S]|[^\\"])*"|'(?:\\[\s\S]|[^\\'])*'|[^\s{'"/>=]+|<BRACES>))?|<SPREAD>))*<S>*\/?)?>/.source),e.languages.jsx.tag.inside.tag.pattern=/^<\/?[^\s>\/]*/,e.languages.jsx.tag.inside["attr-value"].pattern=/=(?!\{)(?:"(?:\\[\s\S]|[^\\"])*"|'(?:\\[\s\S]|[^\\'])*'|[^\s'">]+)/,e.languages.jsx.tag.inside.tag.inside["class-name"]=/^[A-Z]\w*(?:\.[A-Z]\w*)*$/,e.languages.jsx.tag.inside.comment=t.comment,e.languages.insertBefore("inside","attr-name",{spread:{pattern:a(/<SPREAD>/.source),inside:e.languages.jsx}},e.languages.jsx.tag),e.languages.insertBefore("inside","special-attr",{script:{pattern:a(/=<BRACES>/.source),alias:"language-javascript",inside:{"script-punctuation":{pattern:/^=(?=\{)/,alias:"punctuation"},rest:e.languages.jsx}}},e.languages.jsx.tag);function o(c){for(var f=[],d=0;d<c.length;d++){var h=c[d],m=!1;typeof h!="string"&&(h.type==="tag"&&h.content[0]&&h.content[0].type==="tag"?h.content[0].content[0].content==="</"?0<f.length&&f[f.length-1].tagName===l(h.content[0].content[1])&&f.pop():h.content[h.content.length-1].content!=="/>"&&f.push({tagName:l(h.content[0].content[1]),openedBraces:0}):0<f.length&&h.type==="punctuation"&&h.content==="{"?f[f.length-1].openedBraces++:0<f.length&&0<f[f.length-1].openedBraces&&h.type==="punctuation"&&h.content==="}"?f[f.length-1].openedBraces--:m=!0),(m||typeof h=="string")&&0<f.length&&f[f.length-1].openedBraces===0&&(m=l(h),d<c.length-1&&(typeof c[d+1]=="string"||c[d+1].type==="plain-text")&&(m+=l(c[d+1]),c.splice(d+1,1)),0<d&&(typeof c[d-1]=="string"||c[d-1].type==="plain-text")&&(m=l(c[d-1])+m,c.splice(d-1,1),d--),c[d]=new e.Token("plain-text",m,null,m)),h.content&&typeof h.content!="string"&&o(h.content)}}var l=function(c){return c?typeof c=="string"?c:typeof c.content=="string"?c.content:c.content.map(l).join(""):""};e.hooks.add("after-tokenize",function(c){c.language!=="jsx"&&c.language!=="tsx"||o(c.tokens)})}(be),function(e){var t=e.util.clone(e.languages.typescript),t=(e.languages.tsx=e.languages.extend("jsx",t),delete e.languages.tsx.parameter,delete e.languages.tsx["literal-property"],e.languages.tsx.tag);t.pattern=RegExp(/(^|[^\w$]|(?=<\/))/.source+"(?:"+t.pattern.source+")",t.pattern.flags),t.lookbehind=!0}(be),be.languages.swift={comment:{pattern:/(^|[^\\:])(?:\/\/.*|\/\*(?:[^/*]|\/(?!\*)|\*(?!\/)|\/\*(?:[^*]|\*(?!\/))*\*\/)*\*\/)/,lookbehind:!0,greedy:!0},"string-literal":[{pattern:RegExp(/(^|[^"#])/.source+"(?:"+/"(?:\\(?:\((?:[^()]|\([^()]*\))*\)|\r\n|[^(])|[^\\\r\n"])*"/.source+"|"+/"""(?:\\(?:\((?:[^()]|\([^()]*\))*\)|[^(])|[^\\"]|"(?!""))*"""/.source+")"+/(?!["#])/.source),lookbehind:!0,greedy:!0,inside:{interpolation:{pattern:/(\\\()(?:[^()]|\([^()]*\))*(?=\))/,lookbehind:!0,inside:null},"interpolation-punctuation":{pattern:/^\)|\\\($/,alias:"punctuation"},punctuation:/\\(?=[\r\n])/,string:/[\s\S]+/}},{pattern:RegExp(/(^|[^"#])(#+)/.source+"(?:"+/"(?:\\(?:#+\((?:[^()]|\([^()]*\))*\)|\r\n|[^#])|[^\\\r\n])*?"/.source+"|"+/"""(?:\\(?:#+\((?:[^()]|\([^()]*\))*\)|[^#])|[^\\])*?"""/.source+")\\2"),lookbehind:!0,greedy:!0,inside:{interpolation:{pattern:/(\\#+\()(?:[^()]|\([^()]*\))*(?=\))/,lookbehind:!0,inside:null},"interpolation-punctuation":{pattern:/^\)|\\#+\($/,alias:"punctuation"},string:/[\s\S]+/}}],directive:{pattern:RegExp(/#/.source+"(?:"+/(?:elseif|if)\b/.source+"(?:[ ]*"+/(?:![ \t]*)?(?:\b\w+\b(?:[ \t]*\((?:[^()]|\([^()]*\))*\))?|\((?:[^()]|\([^()]*\))*\))(?:[ \t]*(?:&&|\|\|))?/.source+")+|"+/(?:else|endif)\b/.source+")"),alias:"property",inside:{"directive-name":/^#\w+/,boolean:/\b(?:false|true)\b/,number:/\b\d+(?:\.\d+)*\b/,operator:/!|&&|\|\||[<>]=?/,punctuation:/[(),]/}},literal:{pattern:/#(?:colorLiteral|column|dsohandle|file(?:ID|Literal|Path)?|function|imageLiteral|line)\b/,alias:"constant"},"other-directive":{pattern:/#\w+\b/,alias:"property"},attribute:{pattern:/@\w+/,alias:"atrule"},"function-definition":{pattern:/(\bfunc\s+)\w+/,lookbehind:!0,alias:"function"},label:{pattern:/\b(break|continue)\s+\w+|\b[a-zA-Z_]\w*(?=\s*:\s*(?:for|repeat|while)\b)/,lookbehind:!0,alias:"important"},keyword:/\b(?:Any|Protocol|Self|Type|actor|as|assignment|associatedtype|associativity|async|await|break|case|catch|class|continue|convenience|default|defer|deinit|didSet|do|dynamic|else|enum|extension|fallthrough|fileprivate|final|for|func|get|guard|higherThan|if|import|in|indirect|infix|init|inout|internal|is|isolated|lazy|left|let|lowerThan|mutating|none|nonisolated|nonmutating|open|operator|optional|override|postfix|precedencegroup|prefix|private|protocol|public|repeat|required|rethrows|return|right|safe|self|set|some|static|struct|subscript|super|switch|throw|throws|try|typealias|unowned|unsafe|var|weak|where|while|willSet)\b/,boolean:/\b(?:false|true)\b/,nil:{pattern:/\bnil\b/,alias:"constant"},"short-argument":/\$\d+\b/,omit:{pattern:/\b_\b/,alias:"keyword"},number:/\b(?:[\d_]+(?:\.[\de_]+)?|0x[a-f0-9_]+(?:\.[a-f0-9p_]+)?|0b[01_]+|0o[0-7_]+)\b/i,"class-name":/\b[A-Z](?:[A-Z_\d]*[a-z]\w*)?\b/,function:/\b[a-z_]\w*(?=\s*\()/i,constant:/\b(?:[A-Z_]{2,}|k[A-Z][A-Za-z_]+)\b/,operator:/[-+*/%=!<>&|^~?]+|\.[.\-+*/%=!<>&|^~?]+/,punctuation:/[{}[\]();,.:\\]/},be.languages.swift["string-literal"].forEach(function(e){e.inside.interpolation.inside=be.languages.swift}),function(e){e.languages.kotlin=e.languages.extend("clike",{keyword:{pattern:/(^|[^.])\b(?:abstract|actual|annotation|as|break|by|catch|class|companion|const|constructor|continue|crossinline|data|do|dynamic|else|enum|expect|external|final|finally|for|fun|get|if|import|in|infix|init|inline|inner|interface|internal|is|lateinit|noinline|null|object|open|operator|out|override|package|private|protected|public|reified|return|sealed|set|super|suspend|tailrec|this|throw|to|try|typealias|val|var|vararg|when|where|while)\b/,lookbehind:!0},function:[{pattern:/(?:`[^\r\n`]+`|\b\w+)(?=\s*\()/,greedy:!0},{pattern:/(\.)(?:`[^\r\n`]+`|\w+)(?=\s*\{)/,lookbehind:!0,greedy:!0}],number:/\b(?:0[xX][\da-fA-F]+(?:_[\da-fA-F]+)*|0[bB][01]+(?:_[01]+)*|\d+(?:_\d+)*(?:\.\d+(?:_\d+)*)?(?:[eE][+-]?\d+(?:_\d+)*)?[fFL]?)\b/,operator:/\+[+=]?|-[-=>]?|==?=?|!(?:!|==?)?|[\/*%<>]=?|[?:]:?|\.\.|&&|\|\||\b(?:and|inv|or|shl|shr|ushr|xor)\b/}),delete e.languages.kotlin["class-name"];var t={"interpolation-punctuation":{pattern:/^\$\{?|\}$/,alias:"punctuation"},expression:{pattern:/[\s\S]+/,inside:e.languages.kotlin}};e.languages.insertBefore("kotlin","string",{"string-literal":[{pattern:/"""(?:[^$]|\$(?:(?!\{)|\{[^{}]*\}))*?"""/,alias:"multiline",inside:{interpolation:{pattern:/\$(?:[a-z_]\w*|\{[^{}]*\})/i,inside:t},string:/[\s\S]+/}},{pattern:/"(?:[^"\\\r\n$]|\\.|\$(?:(?!\{)|\{[^{}]*\}))*"/,alias:"singleline",inside:{interpolation:{pattern:/((?:^|[^\\])(?:\\{2})*)\$(?:[a-z_]\w*|\{[^{}]*\})/i,lookbehind:!0,inside:t},string:/[\s\S]+/}}],char:{pattern:/'(?:[^'\\\r\n]|\\(?:.|u[a-fA-F0-9]{0,4}))'/,greedy:!0}}),delete e.languages.kotlin.string,e.languages.insertBefore("kotlin","keyword",{annotation:{pattern:/\B@(?:\w+:)?(?:[A-Z]\w*|\[[^\]]+\])/,alias:"builtin"}}),e.languages.insertBefore("kotlin","function",{label:{pattern:/\b\w+@|@\w+\b/,alias:"symbol"}}),e.languages.kt=e.languages.kotlin,e.languages.kts=e.languages.kotlin}(be),be.languages.c=be.languages.extend("clike",{comment:{pattern:/\/\/(?:[^\r\n\\]|\\(?:\r\n?|\n|(?![\r\n])))*|\/\*[\s\S]*?(?:\*\/|$)/,greedy:!0},string:{pattern:/"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"/,greedy:!0},"class-name":{pattern:/(\b(?:enum|struct)\s+(?:__attribute__\s*\(\([\s\S]*?\)\)\s*)?)\w+|\b[a-z]\w*_t\b/,lookbehind:!0},keyword:/\b(?:_Alignas|_Alignof|_Atomic|_Bool|_Complex|_Generic|_Imaginary|_Noreturn|_Static_assert|_Thread_local|__attribute__|asm|auto|break|case|char|const|continue|default|do|double|else|enum|extern|float|for|goto|if|inline|int|long|register|return|short|signed|sizeof|static|struct|switch|typedef|typeof|union|unsigned|void|volatile|while)\b/,function:/\b[a-z_]\w*(?=\s*\()/i,number:/(?:\b0x(?:[\da-f]+(?:\.[\da-f]*)?|\.[\da-f]+)(?:p[+-]?\d+)?|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?)[ful]{0,4}/i,operator:/>>=?|<<=?|->|([-+&|:])\1|[?:~]|[-+*/%&|^!=<>]=?/}),be.languages.insertBefore("c","string",{char:{pattern:/'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n]){0,32}'/,greedy:!0}}),be.languages.insertBefore("c","string",{macro:{pattern:/(^[\t ]*)#\s*[a-z](?:[^\r\n\\/]|\/(?!\*)|\/\*(?:[^*]|\*(?!\/))*\*\/|\\(?:\r\n|[\s\S]))*/im,lookbehind:!0,greedy:!0,alias:"property",inside:{string:[{pattern:/^(#\s*include\s*)<[^>]+>/,lookbehind:!0},be.languages.c.string],char:be.languages.c.char,comment:be.languages.c.comment,"macro-name":[{pattern:/(^#\s*define\s+)\w+\b(?!\()/i,lookbehind:!0},{pattern:/(^#\s*define\s+)\w+\b(?=\()/i,lookbehind:!0,alias:"function"}],directive:{pattern:/^(#\s*)[a-z]+/,lookbehind:!0,alias:"keyword"},"directive-hash":/^#/,punctuation:/##|\\(?=[\r\n])/,expression:{pattern:/\S[\s\S]*/,inside:be.languages.c}}}}),be.languages.insertBefore("c","function",{constant:/\b(?:EOF|NULL|SEEK_CUR|SEEK_END|SEEK_SET|__DATE__|__FILE__|__LINE__|__TIMESTAMP__|__TIME__|__func__|stderr|stdin|stdout)\b/}),delete be.languages.c.boolean,be.languages.objectivec=be.languages.extend("c",{string:{pattern:/@?"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"/,greedy:!0},keyword:/\b(?:asm|auto|break|case|char|const|continue|default|do|double|else|enum|extern|float|for|goto|if|in|inline|int|long|register|return|self|short|signed|sizeof|static|struct|super|switch|typedef|typeof|union|unsigned|void|volatile|while)\b|(?:@interface|@end|@implementation|@protocol|@class|@public|@protected|@private|@property|@try|@catch|@finally|@throw|@synthesize|@dynamic|@selector)\b/,operator:/-[->]?|\+\+?|!=?|<<?=?|>>?=?|==?|&&?|\|\|?|[~^%?*\/@]/}),delete be.languages.objectivec["class-name"],be.languages.objc=be.languages.objectivec,be.languages.reason=be.languages.extend("clike",{string:{pattern:/"(?:\\(?:\r\n|[\s\S])|[^\\\r\n"])*"/,greedy:!0},"class-name":/\b[A-Z]\w*/,keyword:/\b(?:and|as|assert|begin|class|constraint|do|done|downto|else|end|exception|external|for|fun|function|functor|if|in|include|inherit|initializer|lazy|let|method|module|mutable|new|nonrec|object|of|open|or|private|rec|sig|struct|switch|then|to|try|type|val|virtual|when|while|with)\b/,operator:/\.{3}|:[:=]|\|>|->|=(?:==?|>)?|<=?|>=?|[|^?'#!~`]|[+\-*\/]\.?|\b(?:asr|land|lor|lsl|lsr|lxor|mod)\b/}),be.languages.insertBefore("reason","class-name",{char:{pattern:/'(?:\\x[\da-f]{2}|\\o[0-3][0-7][0-7]|\\\d{3}|\\.|[^'\\\r\n])'/,greedy:!0},constructor:/\b[A-Z]\w*\b(?!\s*\.)/,label:{pattern:/\b[a-z]\w*(?=::)/,alias:"symbol"}}),delete be.languages.reason.function,function(e){for(var t=/\/\*(?:[^*/]|\*(?!\/)|\/(?!\*)|<self>)*\*\//.source,n=0;n<2;n++)t=t.replace(/<self>/g,function(){return t});t=t.replace(/<self>/g,function(){return/[^\s\S]/.source}),e.languages.rust={comment:[{pattern:RegExp(/(^|[^\\])/.source+t),lookbehind:!0,greedy:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0,greedy:!0}],string:{pattern:/b?"(?:\\[\s\S]|[^\\"])*"|b?r(#*)"(?:[^"]|"(?!\1))*"\1/,greedy:!0},char:{pattern:/b?'(?:\\(?:x[0-7][\da-fA-F]|u\{(?:[\da-fA-F]_*){1,6}\}|.)|[^\\\r\n\t'])'/,greedy:!0},attribute:{pattern:/#!?\[(?:[^\[\]"]|"(?:\\[\s\S]|[^\\"])*")*\]/,greedy:!0,alias:"attr-name",inside:{string:null}},"closure-params":{pattern:/([=(,:]\s*|\bmove\s*)\|[^|]*\||\|[^|]*\|(?=\s*(?:\{|->))/,lookbehind:!0,greedy:!0,inside:{"closure-punctuation":{pattern:/^\||\|$/,alias:"punctuation"},rest:null}},"lifetime-annotation":{pattern:/'\w+/,alias:"symbol"},"fragment-specifier":{pattern:/(\$\w+:)[a-z]+/,lookbehind:!0,alias:"punctuation"},variable:/\$\w+/,"function-definition":{pattern:/(\bfn\s+)\w+/,lookbehind:!0,alias:"function"},"type-definition":{pattern:/(\b(?:enum|struct|trait|type|union)\s+)\w+/,lookbehind:!0,alias:"class-name"},"module-declaration":[{pattern:/(\b(?:crate|mod)\s+)[a-z][a-z_\d]*/,lookbehind:!0,alias:"namespace"},{pattern:/(\b(?:crate|self|super)\s*)::\s*[a-z][a-z_\d]*\b(?:\s*::(?:\s*[a-z][a-z_\d]*\s*::)*)?/,lookbehind:!0,alias:"namespace",inside:{punctuation:/::/}}],keyword:[/\b(?:Self|abstract|as|async|await|become|box|break|const|continue|crate|do|dyn|else|enum|extern|final|fn|for|if|impl|in|let|loop|macro|match|mod|move|mut|override|priv|pub|ref|return|self|static|struct|super|trait|try|type|typeof|union|unsafe|unsized|use|virtual|where|while|yield)\b/,/\b(?:bool|char|f(?:32|64)|[ui](?:8|16|32|64|128|size)|str)\b/],function:/\b[a-z_]\w*(?=\s*(?:::\s*<|\())/,macro:{pattern:/\b\w+!/,alias:"property"},constant:/\b[A-Z_][A-Z_\d]+\b/,"class-name":/\b[A-Z]\w*\b/,namespace:{pattern:/(?:\b[a-z][a-z_\d]*\s*::\s*)*\b[a-z][a-z_\d]*\s*::(?!\s*<)/,inside:{punctuation:/::/}},number:/\b(?:0x[\dA-Fa-f](?:_?[\dA-Fa-f])*|0o[0-7](?:_?[0-7])*|0b[01](?:_?[01])*|(?:(?:\d(?:_?\d)*)?\.)?\d(?:_?\d)*(?:[Ee][+-]?\d+)?)(?:_?(?:f32|f64|[iu](?:8|16|32|64|size)?))?\b/,boolean:/\b(?:false|true)\b/,punctuation:/->|\.\.=|\.{1,3}|::|[{}[\];(),:]/,operator:/[-+*\/%!^]=?|=[=>]?|&[&=]?|\|[|=]?|<<?=?|>>?=?|[@?]/},e.languages.rust["closure-params"].inside.rest=e.languages.rust,e.languages.rust.attribute.inside.string=e.languages.rust.string}(be),be.languages.go=be.languages.extend("clike",{string:{pattern:/(^|[^\\])"(?:\\.|[^"\\\r\n])*"|`[^`]*`/,lookbehind:!0,greedy:!0},keyword:/\b(?:break|case|chan|const|continue|default|defer|else|fallthrough|for|func|go(?:to)?|if|import|interface|map|package|range|return|select|struct|switch|type|var)\b/,boolean:/\b(?:_|false|iota|nil|true)\b/,number:[/\b0(?:b[01_]+|o[0-7_]+)i?\b/i,/\b0x(?:[a-f\d_]+(?:\.[a-f\d_]*)?|\.[a-f\d_]+)(?:p[+-]?\d+(?:_\d+)*)?i?(?!\w)/i,/(?:\b\d[\d_]*(?:\.[\d_]*)?|\B\.\d[\d_]*)(?:e[+-]?[\d_]+)?i?(?!\w)/i],operator:/[*\/%^!=]=?|\+[=+]?|-[=-]?|\|[=|]?|&(?:=|&|\^=?)?|>(?:>=?|=)?|<(?:<=?|=|-)?|:=|\.\.\./,builtin:/\b(?:append|bool|byte|cap|close|complex|complex(?:64|128)|copy|delete|error|float(?:32|64)|u?int(?:8|16|32|64)?|imag|len|make|new|panic|print(?:ln)?|real|recover|rune|string|uintptr)\b/}),be.languages.insertBefore("go","string",{char:{pattern:/'(?:\\.|[^'\\\r\n]){0,10}'/,greedy:!0}}),delete be.languages.go["class-name"],function(e){var t=/\b(?:alignas|alignof|asm|auto|bool|break|case|catch|char|char16_t|char32_t|char8_t|class|co_await|co_return|co_yield|compl|concept|const|const_cast|consteval|constexpr|constinit|continue|decltype|default|delete|do|double|dynamic_cast|else|enum|explicit|export|extern|final|float|for|friend|goto|if|import|inline|int|int16_t|int32_t|int64_t|int8_t|long|module|mutable|namespace|new|noexcept|nullptr|operator|override|private|protected|public|register|reinterpret_cast|requires|return|short|signed|sizeof|static|static_assert|static_cast|struct|switch|template|this|thread_local|throw|try|typedef|typeid|typename|uint16_t|uint32_t|uint64_t|uint8_t|union|unsigned|using|virtual|void|volatile|wchar_t|while)\b/,n=/\b(?!<keyword>)\w+(?:\s*\.\s*\w+)*\b/.source.replace(/<keyword>/g,function(){return t.source});e.languages.cpp=e.languages.extend("c",{"class-name":[{pattern:RegExp(/(\b(?:class|concept|enum|struct|typename)\s+)(?!<keyword>)\w+/.source.replace(/<keyword>/g,function(){return t.source})),lookbehind:!0},/\b[A-Z]\w*(?=\s*::\s*\w+\s*\()/,/\b[A-Z_]\w*(?=\s*::\s*~\w+\s*\()/i,/\b\w+(?=\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>\s*::\s*\w+\s*\()/],keyword:t,number:{pattern:/(?:\b0b[01']+|\b0x(?:[\da-f']+(?:\.[\da-f']*)?|\.[\da-f']+)(?:p[+-]?[\d']+)?|(?:\b[\d']+(?:\.[\d']*)?|\B\.[\d']+)(?:e[+-]?[\d']+)?)[ful]{0,4}/i,greedy:!0},operator:/>>=?|<<=?|->|--|\+\+|&&|\|\||[?:~]|<=>|[-+*/%&|^!=<>]=?|\b(?:and|and_eq|bitand|bitor|not|not_eq|or|or_eq|xor|xor_eq)\b/,boolean:/\b(?:false|true)\b/}),e.languages.insertBefore("cpp","string",{module:{pattern:RegExp(/(\b(?:import|module)\s+)/.source+"(?:"+/"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|<[^<>\r\n]*>/.source+"|"+/<mod-name>(?:\s*:\s*<mod-name>)?|:\s*<mod-name>/.source.replace(/<mod-name>/g,function(){return n})+")"),lookbehind:!0,greedy:!0,inside:{string:/^[<"][\s\S]+/,operator:/:/,punctuation:/\./}},"raw-string":{pattern:/R"([^()\\ ]{0,16})\([\s\S]*?\)\1"/,alias:"string",greedy:!0}}),e.languages.insertBefore("cpp","keyword",{"generic-function":{pattern:/\b(?!operator\b)[a-z_]\w*\s*<(?:[^<>]|<[^<>]*>)*>(?=\s*\()/i,inside:{function:/^\w+/,generic:{pattern:/<[\s\S]+/,alias:"class-name",inside:e.languages.cpp}}}}),e.languages.insertBefore("cpp","operator",{"double-colon":{pattern:/::/,alias:"punctuation"}}),e.languages.insertBefore("cpp","class-name",{"base-clause":{pattern:/(\b(?:class|struct)\s+\w+\s*:\s*)[^;{}"'\s]+(?:\s+[^;{}"'\s]+)*(?=\s*[;{])/,lookbehind:!0,greedy:!0,inside:e.languages.extend("cpp",{})}}),e.languages.insertBefore("inside","double-colon",{"class-name":/\b[a-z_]\w*\b(?!\s*::)/i},e.languages.cpp["base-clause"])}(be),be.languages.python={comment:{pattern:/(^|[^\\])#.*/,lookbehind:!0,greedy:!0},"string-interpolation":{pattern:/(?:f|fr|rf)(?:("""|''')[\s\S]*?\1|("|')(?:\\.|(?!\2)[^\\\r\n])*\2)/i,greedy:!0,inside:{interpolation:{pattern:/((?:^|[^{])(?:\{\{)*)\{(?!\{)(?:[^{}]|\{(?!\{)(?:[^{}]|\{(?!\{)(?:[^{}])+\})+\})+\}/,lookbehind:!0,inside:{"format-spec":{pattern:/(:)[^:(){}]+(?=\}$)/,lookbehind:!0},"conversion-option":{pattern://,alias:"punctuation"},rest:null}},string:/[\s\S]+/}},"triple-quoted-string":{pattern:/(?:[rub]|br|rb)?("""|''')[\s\S]*?\1/i,greedy:!0,alias:"string"},string:{pattern:/(?:[rub]|br|rb)?("|')(?:\\.|(?!\1)[^\\\r\n])*\1/i,greedy:!0},function:{pattern:/((?:^|\s)def[ \t]+)[a-zA-Z_]\w*(?=\s*\()/g,lookbehind:!0},"class-name":{pattern:/(\bclass\s+)\w+/i,lookbehind:!0},decorator:{pattern:/(^[\t ]*)@\w+(?:\.\w+)*/m,lookbehind:!0,alias:["annotation","punctuation"],inside:{punctuation:/\./}},keyword:/\b(?:_(?=\s*:)|and|as|assert|async|await|break|case|class|continue|def|del|elif|else|except|exec|finally|for|from|global|if|import|in|is|lambda|match|nonlocal|not|or|pass|print|raise|return|try|while|with|yield)\b/,builtin:/\b(?:__import__|abs|all|any|apply|ascii|basestring|bin|bool|buffer|bytearray|bytes|callable|chr|classmethod|cmp|coerce|compile|complex|delattr|dict|dir|divmod|enumerate|eval|execfile|file|filter|float|format|frozenset|getattr|globals|hasattr|hash|help|hex|id|input|int|intern|isinstance|issubclass|iter|len|list|locals|long|map|max|memoryview|min|next|object|oct|open|ord|pow|property|range|raw_input|reduce|reload|repr|reversed|round|set|setattr|slice|sorted|staticmethod|str|sum|super|tuple|type|unichr|unicode|vars|xrange|zip)\b/,boolean:/\b(?:False|None|True)\b/,number:/\b0(?:b(?:_?[01])+|o(?:_?[0-7])+|x(?:_?[a-f0-9])+)\b|(?:\b\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\B\.\d+(?:_\d+)*)(?:e[+-]?\d+(?:_\d+)*)?j?(?!\w)/i,operator:/[-+%=]=?|!=|:=|\*\*?=?|\/\/?=?|<[<=>]?|>[=>]?|[&|^~]/,punctuation:/[{}[\];(),.:]/},be.languages.python["string-interpolation"].inside.interpolation.inside.rest=be.languages.python,be.languages.py=be.languages.python,be.languages.json={property:{pattern:/(^|[^\\])"(?:\\.|[^\\"\r\n])*"(?=\s*:)/,lookbehind:!0,greedy:!0},string:{pattern:/(^|[^\\])"(?:\\.|[^\\"\r\n])*"(?!\s*:)/,lookbehind:!0,greedy:!0},comment:{pattern:/\/\/.*|\/\*[\s\S]*?(?:\*\/|$)/,greedy:!0},number:/-?\b\d+(?:\.\d+)?(?:e[+-]?\d+)?\b/i,punctuation:/[{}[\],]/,operator:/:/,boolean:/\b(?:false|true)\b/,null:{pattern:/\bnull\b/,alias:"keyword"}},be.languages.webmanifest=be.languages.json;var q5={};vK(q5,{dracula:()=>EK,duotoneDark:()=>AK,duotoneLight:()=>CK,github:()=>OK,gruvboxMaterialDark:()=>aX,gruvboxMaterialLight:()=>oX,jettwaveDark:()=>WK,jettwaveLight:()=>JK,nightOwl:()=>jK,nightOwlLight:()=>$K,oceanicNext:()=>IK,okaidia:()=>LK,oneDark:()=>tX,oneLight:()=>rX,palenight:()=>qK,shadesOfPurple:()=>BK,synthwave84:()=>VK,ultramin:()=>GK,vsDark:()=>F5,vsLight:()=>KK});var SK={plain:{color:"#F8F8F2",backgroundColor:"#282A36"},styles:[{types:["prolog","constant","builtin"],style:{color:"rgb(189, 147, 249)"}},{types:["inserted","function"],style:{color:"rgb(80, 250, 123)"}},{types:["deleted"],style:{color:"rgb(255, 85, 85)"}},{types:["changed"],style:{color:"rgb(255, 184, 108)"}},{types:["punctuation","symbol"],style:{color:"rgb(248, 248, 242)"}},{types:["string","char","tag","selector"],style:{color:"rgb(255, 121, 198)"}},{types:["keyword","variable"],style:{color:"rgb(189, 147, 249)",fontStyle:"italic"}},{types:["comment"],style:{color:"rgb(98, 114, 164)"}},{types:["attr-name"],style:{color:"rgb(241, 250, 140)"}}]},EK=SK,kK={plain:{backgroundColor:"#2a2734",color:"#9a86fd"},styles:[{types:["comment","prolog","doctype","cdata","punctuation"],style:{color:"#6c6783"}},{types:["namespace"],style:{opacity:.7}},{types:["tag","operator","number"],style:{color:"#e09142"}},{types:["property","function"],style:{color:"#9a86fd"}},{types:["tag-id","selector","atrule-id"],style:{color:"#eeebff"}},{types:["attr-name"],style:{color:"#c4b9fe"}},{types:["boolean","string","entity","url","attr-value","keyword","control","directive","unit","statement","regex","atrule","placeholder","variable"],style:{color:"#ffcc99"}},{types:["deleted"],style:{textDecorationLine:"line-through"}},{types:["inserted"],style:{textDecorationLine:"underline"}},{types:["italic"],style:{fontStyle:"italic"}},{types:["important","bold"],style:{fontWeight:"bold"}},{types:["important"],style:{color:"#c4b9fe"}}]},AK=kK,TK={plain:{backgroundColor:"#faf8f5",color:"#728fcb"},styles:[{types:["comment","prolog","doctype","cdata","punctuation"],style:{color:"#b6ad9a"}},{types:["namespace"],style:{opacity:.7}},{types:["tag","operator","number"],style:{color:"#063289"}},{types:["property","function"],style:{color:"#b29762"}},{types:["tag-id","selector","atrule-id"],style:{color:"#2d2006"}},{types:["attr-name"],style:{color:"#896724"}},{types:["boolean","string","entity","url","attr-value","keyword","control","directive","unit","statement","regex","atrule"],style:{color:"#728fcb"}},{types:["placeholder","variable"],style:{color:"#93abdc"}},{types:["deleted"],style:{textDecorationLine:"line-through"}},{types:["inserted"],style:{textDecorationLine:"underline"}},{types:["italic"],style:{fontStyle:"italic"}},{types:["important","bold"],style:{fontWeight:"bold"}},{types:["important"],style:{color:"#896724"}}]},CK=TK,NK={plain:{color:"#393A34",backgroundColor:"#f6f8fa"},styles:[{types:["comment","prolog","doctype","cdata"],style:{color:"#999988",fontStyle:"italic"}},{types:["namespace"],style:{opacity:.7}},{types:["string","attr-value"],style:{color:"#e3116c"}},{types:["punctuation","operator"],style:{color:"#393A34"}},{types:["entity","url","symbol","number","boolean","variable","constant","property","regex","inserted"],style:{color:"#36acaa"}},{types:["atrule","keyword","attr-name","selector"],style:{color:"#00a4db"}},{types:["function","deleted","tag"],style:{color:"#d73a49"}},{types:["function-variable"],style:{color:"#6f42c1"}},{types:["tag","selector","keyword"],style:{color:"#00009f"}}]},OK=NK,RK={plain:{color:"#d6deeb",backgroundColor:"#011627"},styles:[{types:["changed"],style:{color:"rgb(162, 191, 252)",fontStyle:"italic"}},{types:["deleted"],style:{color:"rgba(239, 83, 80, 0.56)",fontStyle:"italic"}},{types:["inserted","attr-name"],style:{color:"rgb(173, 219, 103)",fontStyle:"italic"}},{types:["comment"],style:{color:"rgb(99, 119, 119)",fontStyle:"italic"}},{types:["string","url"],style:{color:"rgb(173, 219, 103)"}},{types:["variable"],style:{color:"rgb(214, 222, 235)"}},{types:["number"],style:{color:"rgb(247, 140, 108)"}},{types:["builtin","char","constant","function"],style:{color:"rgb(130, 170, 255)"}},{types:["punctuation"],style:{color:"rgb(199, 146, 234)"}},{types:["selector","doctype"],style:{color:"rgb(199, 146, 234)",fontStyle:"italic"}},{types:["class-name"],style:{color:"rgb(255, 203, 139)"}},{types:["tag","operator","keyword"],style:{color:"rgb(127, 219, 202)"}},{types:["boolean"],style:{color:"rgb(255, 88, 116)"}},{types:["property"],style:{color:"rgb(128, 203, 196)"}},{types:["namespace"],style:{color:"rgb(178, 204, 214)"}}]},jK=RK,MK={plain:{color:"#403f53",backgroundColor:"#FBFBFB"},styles:[{types:["changed"],style:{color:"rgb(162, 191, 252)",fontStyle:"italic"}},{types:["deleted"],style:{color:"rgba(239, 83, 80, 0.56)",fontStyle:"italic"}},{types:["inserted","attr-name"],style:{color:"rgb(72, 118, 214)",fontStyle:"italic"}},{types:["comment"],style:{color:"rgb(152, 159, 177)",fontStyle:"italic"}},{types:["string","builtin","char","constant","url"],style:{color:"rgb(72, 118, 214)"}},{types:["variable"],style:{color:"rgb(201, 103, 101)"}},{types:["number"],style:{color:"rgb(170, 9, 130)"}},{types:["punctuation"],style:{color:"rgb(153, 76, 195)"}},{types:["function","selector","doctype"],style:{color:"rgb(153, 76, 195)",fontStyle:"italic"}},{types:["class-name"],style:{color:"rgb(17, 17, 17)"}},{types:["tag"],style:{color:"rgb(153, 76, 195)"}},{types:["operator","property","keyword","namespace"],style:{color:"rgb(12, 150, 155)"}},{types:["boolean"],style:{color:"rgb(188, 84, 84)"}}]},$K=MK,Xn={char:"#D8DEE9",comment:"#999999",keyword:"#c5a5c5",primitive:"#5a9bcf",string:"#8dc891",variable:"#d7deea",boolean:"#ff8b50",tag:"#fc929e",function:"#79b6f2",className:"#FAC863"},DK={plain:{backgroundColor:"#282c34",color:"#ffffff"},styles:[{types:["attr-name"],style:{color:Xn.keyword}},{types:["attr-value"],style:{color:Xn.string}},{types:["comment","block-comment","prolog","doctype","cdata","shebang"],style:{color:Xn.comment}},{types:["property","number","function-name","constant","symbol","deleted"],style:{color:Xn.primitive}},{types:["boolean"],style:{color:Xn.boolean}},{types:["tag"],style:{color:Xn.tag}},{types:["string"],style:{color:Xn.string}},{types:["punctuation"],style:{color:Xn.string}},{types:["selector","char","builtin","inserted"],style:{color:Xn.char}},{types:["function"],style:{color:Xn.function}},{types:["operator","entity","url","variable"],style:{color:Xn.variable}},{types:["keyword"],style:{color:Xn.keyword}},{types:["atrule","class-name"],style:{color:Xn.className}},{types:["important"],style:{fontWeight:"400"}},{types:["bold"],style:{fontWeight:"bold"}},{types:["italic"],style:{fontStyle:"italic"}},{types:["namespace"],style:{opacity:.7}}]},IK=DK,PK={plain:{color:"#f8f8f2",backgroundColor:"#272822"},styles:[{types:["changed"],style:{color:"rgb(162, 191, 252)",fontStyle:"italic"}},{types:["deleted"],style:{color:"#f92672",fontStyle:"italic"}},{types:["inserted"],style:{color:"rgb(173, 219, 103)",fontStyle:"italic"}},{types:["comment"],style:{color:"#8292a2",fontStyle:"italic"}},{types:["string","url"],style:{color:"#a6e22e"}},{types:["variable"],style:{color:"#f8f8f2"}},{types:["number"],style:{color:"#ae81ff"}},{types:["builtin","char","constant","function","class-name"],style:{color:"#e6db74"}},{types:["punctuation"],style:{color:"#f8f8f2"}},{types:["selector","doctype"],style:{color:"#a6e22e",fontStyle:"italic"}},{types:["tag","operator","keyword"],style:{color:"#66d9ef"}},{types:["boolean"],style:{color:"#ae81ff"}},{types:["namespace"],style:{color:"rgb(178, 204, 214)",opacity:.7}},{types:["tag","property"],style:{color:"#f92672"}},{types:["attr-name"],style:{color:"#a6e22e !important"}},{types:["doctype"],style:{color:"#8292a2"}},{types:["rule"],style:{color:"#e6db74"}}]},LK=PK,zK={plain:{color:"#bfc7d5",backgroundColor:"#292d3e"},styles:[{types:["comment"],style:{color:"rgb(105, 112, 152)",fontStyle:"italic"}},{types:["string","inserted"],style:{color:"rgb(195, 232, 141)"}},{types:["number"],style:{color:"rgb(247, 140, 108)"}},{types:["builtin","char","constant","function"],style:{color:"rgb(130, 170, 255)"}},{types:["punctuation","selector"],style:{color:"rgb(199, 146, 234)"}},{types:["variable"],style:{color:"rgb(191, 199, 213)"}},{types:["class-name","attr-name"],style:{color:"rgb(255, 203, 107)"}},{types:["tag","deleted"],style:{color:"rgb(255, 85, 114)"}},{types:["operator"],style:{color:"rgb(137, 221, 255)"}},{types:["boolean"],style:{color:"rgb(255, 88, 116)"}},{types:["keyword"],style:{fontStyle:"italic"}},{types:["doctype"],style:{color:"rgb(199, 146, 234)",fontStyle:"italic"}},{types:["namespace"],style:{color:"rgb(178, 204, 214)"}},{types:["url"],style:{color:"rgb(221, 221, 221)"}}]},qK=zK,FK={plain:{color:"#9EFEFF",backgroundColor:"#2D2A55"},styles:[{types:["changed"],style:{color:"rgb(255, 238, 128)"}},{types:["deleted"],style:{color:"rgba(239, 83, 80, 0.56)"}},{types:["inserted"],style:{color:"rgb(173, 219, 103)"}},{types:["comment"],style:{color:"rgb(179, 98, 255)",fontStyle:"italic"}},{types:["punctuation"],style:{color:"rgb(255, 255, 255)"}},{types:["constant"],style:{color:"rgb(255, 98, 140)"}},{types:["string","url"],style:{color:"rgb(165, 255, 144)"}},{types:["variable"],style:{color:"rgb(255, 238, 128)"}},{types:["number","boolean"],style:{color:"rgb(255, 98, 140)"}},{types:["attr-name"],style:{color:"rgb(255, 180, 84)"}},{types:["keyword","operator","property","namespace","tag","selector","doctype"],style:{color:"rgb(255, 157, 0)"}},{types:["builtin","char","constant","function","class-name"],style:{color:"rgb(250, 208, 0)"}}]},BK=FK,UK={plain:{backgroundColor:"linear-gradient(to bottom, #2a2139 75%, #34294f)",backgroundImage:"#34294f",color:"#f92aad",textShadow:"0 0 2px #100c0f, 0 0 5px #dc078e33, 0 0 10px #fff3"},styles:[{types:["comment","block-comment","prolog","doctype","cdata"],style:{color:"#495495",fontStyle:"italic"}},{types:["punctuation"],style:{color:"#ccc"}},{types:["tag","attr-name","namespace","number","unit","hexcode","deleted"],style:{color:"#e2777a"}},{types:["property","selector"],style:{color:"#72f1b8",textShadow:"0 0 2px #100c0f, 0 0 10px #257c5575, 0 0 35px #21272475"}},{types:["function-name"],style:{color:"#6196cc"}},{types:["boolean","selector-id","function"],style:{color:"#fdfdfd",textShadow:"0 0 2px #001716, 0 0 3px #03edf975, 0 0 5px #03edf975, 0 0 8px #03edf975"}},{types:["class-name","maybe-class-name","builtin"],style:{color:"#fff5f6",textShadow:"0 0 2px #000, 0 0 10px #fc1f2c75, 0 0 5px #fc1f2c75, 0 0 25px #fc1f2c75"}},{types:["constant","symbol"],style:{color:"#f92aad",textShadow:"0 0 2px #100c0f, 0 0 5px #dc078e33, 0 0 10px #fff3"}},{types:["important","atrule","keyword","selector-class"],style:{color:"#f4eee4",textShadow:"0 0 2px #393a33, 0 0 8px #f39f0575, 0 0 2px #f39f0575"}},{types:["string","char","attr-value","regex","variable"],style:{color:"#f87c32"}},{types:["parameter"],style:{fontStyle:"italic"}},{types:["entity","url"],style:{color:"#67cdcc"}},{types:["operator"],style:{color:"ffffffee"}},{types:["important","bold"],style:{fontWeight:"bold"}},{types:["italic"],style:{fontStyle:"italic"}},{types:["entity"],style:{cursor:"help"}},{types:["inserted"],style:{color:"green"}}]},VK=UK,HK={plain:{color:"#282a2e",backgroundColor:"#ffffff"},styles:[{types:["comment"],style:{color:"rgb(197, 200, 198)"}},{types:["string","number","builtin","variable"],style:{color:"rgb(150, 152, 150)"}},{types:["class-name","function","tag","attr-name"],style:{color:"rgb(40, 42, 46)"}}]},GK=HK,YK={plain:{color:"#9CDCFE",backgroundColor:"#1E1E1E"},styles:[{types:["prolog"],style:{color:"rgb(0, 0, 128)"}},{types:["comment"],style:{color:"rgb(106, 153, 85)"}},{types:["builtin","changed","keyword","interpolation-punctuation"],style:{color:"rgb(86, 156, 214)"}},{types:["number","inserted"],style:{color:"rgb(181, 206, 168)"}},{types:["constant"],style:{color:"rgb(100, 102, 149)"}},{types:["attr-name","variable"],style:{color:"rgb(156, 220, 254)"}},{types:["deleted","string","attr-value","template-punctuation"],style:{color:"rgb(206, 145, 120)"}},{types:["selector"],style:{color:"rgb(215, 186, 125)"}},{types:["tag"],style:{color:"rgb(78, 201, 176)"}},{types:["tag"],languages:["markup"],style:{color:"rgb(86, 156, 214)"}},{types:["punctuation","operator"],style:{color:"rgb(212, 212, 212)"}},{types:["punctuation"],languages:["markup"],style:{color:"#808080"}},{types:["function"],style:{color:"rgb(220, 220, 170)"}},{types:["class-name"],style:{color:"rgb(78, 201, 176)"}},{types:["char"],style:{color:"rgb(209, 105, 105)"}}]},F5=YK,ZK={plain:{color:"#000000",backgroundColor:"#ffffff"},styles:[{types:["comment"],style:{color:"rgb(0, 128, 0)"}},{types:["builtin"],style:{color:"rgb(0, 112, 193)"}},{types:["number","variable","inserted"],style:{color:"rgb(9, 134, 88)"}},{types:["operator"],style:{color:"rgb(0, 0, 0)"}},{types:["constant","char"],style:{color:"rgb(129, 31, 63)"}},{types:["tag"],style:{color:"rgb(128, 0, 0)"}},{types:["attr-name"],style:{color:"rgb(255, 0, 0)"}},{types:["deleted","string"],style:{color:"rgb(163, 21, 21)"}},{types:["changed","punctuation"],style:{color:"rgb(4, 81, 165)"}},{types:["function","keyword"],style:{color:"rgb(0, 0, 255)"}},{types:["class-name"],style:{color:"rgb(38, 127, 153)"}}]},KK=ZK,XK={plain:{color:"#f8fafc",backgroundColor:"#011627"},styles:[{types:["prolog"],style:{color:"#000080"}},{types:["comment"],style:{color:"#6A9955"}},{types:["builtin","changed","keyword","interpolation-punctuation"],style:{color:"#569CD6"}},{types:["number","inserted"],style:{color:"#B5CEA8"}},{types:["constant"],style:{color:"#f8fafc"}},{types:["attr-name","variable"],style:{color:"#9CDCFE"}},{types:["deleted","string","attr-value","template-punctuation"],style:{color:"#cbd5e1"}},{types:["selector"],style:{color:"#D7BA7D"}},{types:["tag"],style:{color:"#0ea5e9"}},{types:["tag"],languages:["markup"],style:{color:"#0ea5e9"}},{types:["punctuation","operator"],style:{color:"#D4D4D4"}},{types:["punctuation"],languages:["markup"],style:{color:"#808080"}},{types:["function"],style:{color:"#7dd3fc"}},{types:["class-name"],style:{color:"#0ea5e9"}},{types:["char"],style:{color:"#D16969"}}]},WK=XK,QK={plain:{color:"#0f172a",backgroundColor:"#f1f5f9"},styles:[{types:["prolog"],style:{color:"#000080"}},{types:["comment"],style:{color:"#6A9955"}},{types:["builtin","changed","keyword","interpolation-punctuation"],style:{color:"#0c4a6e"}},{types:["number","inserted"],style:{color:"#B5CEA8"}},{types:["constant"],style:{color:"#0f172a"}},{types:["attr-name","variable"],style:{color:"#0c4a6e"}},{types:["deleted","string","attr-value","template-punctuation"],style:{color:"#64748b"}},{types:["selector"],style:{color:"#D7BA7D"}},{types:["tag"],style:{color:"#0ea5e9"}},{types:["tag"],languages:["markup"],style:{color:"#0ea5e9"}},{types:["punctuation","operator"],style:{color:"#475569"}},{types:["punctuation"],languages:["markup"],style:{color:"#808080"}},{types:["function"],style:{color:"#0e7490"}},{types:["class-name"],style:{color:"#0ea5e9"}},{types:["char"],style:{color:"#D16969"}}]},JK=QK,eX={plain:{backgroundColor:"hsl(220, 13%, 18%)",color:"hsl(220, 14%, 71%)",textShadow:"0 1px rgba(0, 0, 0, 0.3)"},styles:[{types:["comment","prolog","cdata"],style:{color:"hsl(220, 10%, 40%)"}},{types:["doctype","punctuation","entity"],style:{color:"hsl(220, 14%, 71%)"}},{types:["attr-name","class-name","maybe-class-name","boolean","constant","number","atrule"],style:{color:"hsl(29, 54%, 61%)"}},{types:["keyword"],style:{color:"hsl(286, 60%, 67%)"}},{types:["property","tag","symbol","deleted","important"],style:{color:"hsl(355, 65%, 65%)"}},{types:["selector","string","char","builtin","inserted","regex","attr-value"],style:{color:"hsl(95, 38%, 62%)"}},{types:["variable","operator","function"],style:{color:"hsl(207, 82%, 66%)"}},{types:["url"],style:{color:"hsl(187, 47%, 55%)"}},{types:["deleted"],style:{textDecorationLine:"line-through"}},{types:["inserted"],style:{textDecorationLine:"underline"}},{types:["italic"],style:{fontStyle:"italic"}},{types:["important","bold"],style:{fontWeight:"bold"}},{types:["important"],style:{color:"hsl(220, 14%, 71%)"}}]},tX=eX,nX={plain:{backgroundColor:"hsl(230, 1%, 98%)",color:"hsl(230, 8%, 24%)"},styles:[{types:["comment","prolog","cdata"],style:{color:"hsl(230, 4%, 64%)"}},{types:["doctype","punctuation","entity"],style:{color:"hsl(230, 8%, 24%)"}},{types:["attr-name","class-name","boolean","constant","number","atrule"],style:{color:"hsl(35, 99%, 36%)"}},{types:["keyword"],style:{color:"hsl(301, 63%, 40%)"}},{types:["property","tag","symbol","deleted","important"],style:{color:"hsl(5, 74%, 59%)"}},{types:["selector","string","char","builtin","inserted","regex","attr-value","punctuation"],style:{color:"hsl(119, 34%, 47%)"}},{types:["variable","operator","function"],style:{color:"hsl(221, 87%, 60%)"}},{types:["url"],style:{color:"hsl(198, 99%, 37%)"}},{types:["deleted"],style:{textDecorationLine:"line-through"}},{types:["inserted"],style:{textDecorationLine:"underline"}},{types:["italic"],style:{fontStyle:"italic"}},{types:["important","bold"],style:{fontWeight:"bold"}},{types:["important"],style:{color:"hsl(230, 8%, 24%)"}}]},rX=nX,iX={plain:{color:"#ebdbb2",backgroundColor:"#292828"},styles:[{types:["imports","class-name","maybe-class-name","constant","doctype","builtin","function"],style:{color:"#d8a657"}},{types:["property-access"],style:{color:"#7daea3"}},{types:["tag"],style:{color:"#e78a4e"}},{types:["attr-name","char","url","regex"],style:{color:"#a9b665"}},{types:["attr-value","string"],style:{color:"#89b482"}},{types:["comment","prolog","cdata","operator","inserted"],style:{color:"#a89984"}},{types:["delimiter","boolean","keyword","selector","important","atrule","property","variable","deleted"],style:{color:"#ea6962"}},{types:["entity","number","symbol"],style:{color:"#d3869b"}}]},aX=iX,sX={plain:{color:"#654735",backgroundColor:"#f9f5d7"},styles:[{types:["delimiter","boolean","keyword","selector","important","atrule","property","variable","deleted"],style:{color:"#af2528"}},{types:["imports","class-name","maybe-class-name","constant","doctype","builtin"],style:{color:"#b4730e"}},{types:["string","attr-value"],style:{color:"#477a5b"}},{types:["property-access"],style:{color:"#266b79"}},{types:["function","attr-name","char","url"],style:{color:"#72761e"}},{types:["tag"],style:{color:"#b94c07"}},{types:["comment","prolog","cdata","operator","inserted"],style:{color:"#a89984"}},{types:["entity","number","symbol"],style:{color:"#924f79"}}]},oX=sX,lX=e=>ee.useCallback(t=>{var n=t,{className:r,style:i,line:a}=n,o=z5(n,["className","style","line"]);const l=Op(Xr({},o),{className:I5("token-line",r)});return typeof e=="object"&&"plain"in e&&(l.style=e.plain),typeof i=="object"&&(l.style=Xr(Xr({},l.style||{}),i)),l},[e]),uX=e=>{const t=ee.useCallback(({types:n,empty:r})=>{if(e!=null){{if(n.length===1&&n[0]==="plain")return r!=null?{display:"inline-block"}:void 0;if(n.length===1&&r!=null)return e[n[0]]}return Object.assign(r!=null?{display:"inline-block"}:{},...n.map(i=>e[i]))}},[e]);return ee.useCallback(n=>{var r=n,{token:i,className:a,style:o}=r,l=z5(r,["token","className","style"]);const c=Op(Xr({},l),{className:I5("token",...i.types,a),children:i.content,style:t(i)});return o!=null&&(c.style=Xr(Xr({},c.style||{}),o)),c},[t])},cX=/\r\n|\r|\n/,xN=e=>{e.length===0?e.push({types:["plain"],content:`
|
|
106
106
|
`,empty:!0}):e.length===1&&e[0].content===""&&(e[0].content=`
|
|
107
107
|
`,e[0].empty=!0)},wN=(e,t)=>{const n=e.length;return n>0&&e[n-1]===t?e:e.concat(t)},fX=e=>{const t=[[]],n=[e],r=[0],i=[e.length];let a=0,o=0,l=[];const c=[l];for(;o>-1;){for(;(a=r[o]++)<i[o];){let f,d=t[o];const m=n[o][a];if(typeof m=="string"?(d=o>0?d:["plain"],f=m):(d=wN(d,m.type),m.alias&&(d=wN(d,m.alias)),f=m.content),typeof f!="string"){o++,t.push(d),n.push(f),r.push(0),i.push(f.length);continue}const g=f.split(cX),v=g.length;l.push({types:d,content:g[0]});for(let w=1;w<v;w++)xN(l),c.push(l=[]),l.push({types:d,content:g[w]})}o--,t.pop(),n.pop(),r.pop(),i.pop()}return xN(l),c},SN=fX,dX=({prism:e,code:t,grammar:n,language:r})=>ee.useMemo(()=>{if(n==null)return SN([t]);const i={code:t,grammar:n,language:r,tokens:[]};return e.hooks.run("before-tokenize",i),i.tokens=e.tokenize(t,n),e.hooks.run("after-tokenize",i),SN(i.tokens)},[t,n,r,e]),hX=(e,t)=>{const{plain:n}=e,r=e.styles.reduce((i,a)=>{const{languages:o,style:l}=a;return o&&!o.includes(t)||a.types.forEach(c=>{const f=Xr(Xr({},i[c]),l);i[c]=f}),i},{});return r.root=n,r.plain=Op(Xr({},n),{backgroundColor:void 0}),r},pX=hX,mX=({children:e,language:t,code:n,theme:r,prism:i})=>{const a=t.toLowerCase(),o=pX(r,a),l=lX(o),c=uX(o),f=i.languages[a],d=dX({prism:i,language:a,code:n,grammar:f});return e({tokens:d,className:`prism-code language-${a}`,style:o!=null?o.root:{},getLineProps:l,getTokenProps:c})},gX=e=>ee.createElement(mX,Op(Xr({},e),{prism:e.prism||be,theme:e.theme||F5,code:e.code,language:e.language}));/*! Bundled license information:
|
package/dist/index.html
CHANGED
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
padding: 0;
|
|
13
13
|
}
|
|
14
14
|
</style>
|
|
15
|
-
<script type="module" crossorigin src="/assets/index-
|
|
15
|
+
<script type="module" crossorigin src="/assets/index-D0PkMdMB.js"></script>
|
|
16
16
|
<link rel="stylesheet" crossorigin href="/assets/index-CxJFC_XA.css">
|
|
17
17
|
</head>
|
|
18
18
|
<body>
|
package/package.json
CHANGED
package/src/chat/store/index.ts
CHANGED
|
@@ -39,13 +39,13 @@ const db = new FullTextSearchService({
|
|
|
39
39
|
db.initialize();
|
|
40
40
|
console.log(db);
|
|
41
41
|
export const memoryTool = createMemoryTool(db);
|
|
42
|
-
const defaultHeaders = JSON.parse(localStorage.getItem("code") || "
|
|
42
|
+
const defaultHeaders = JSON.parse(localStorage.getItem("code") || "[]");
|
|
43
43
|
|
|
44
44
|
export const globalChatStore = createChatStore(
|
|
45
45
|
localStorage.getItem("defaultAgent") || "",
|
|
46
46
|
{
|
|
47
47
|
apiUrl: localStorage.getItem("apiUrl") || "http://localhost:8123",
|
|
48
|
-
defaultHeaders,
|
|
48
|
+
defaultHeaders: Object.fromEntries(defaultHeaders.map((i: { key: string; value: string }) => [i.key, i.value])),
|
|
49
49
|
callerOptions: {
|
|
50
50
|
// 携带 cookie 的写法
|
|
51
51
|
fetch: F,
|