signalpilot-ai-internal 0.10.22__py3-none-any.whl → 0.11.24__py3-none-any.whl
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.
- signalpilot_ai_internal/_version.py +1 -1
- signalpilot_ai_internal/cache_service.py +22 -21
- signalpilot_ai_internal/composio_handlers.py +224 -0
- signalpilot_ai_internal/composio_service.py +511 -0
- signalpilot_ai_internal/database_config_handlers.py +182 -0
- signalpilot_ai_internal/database_config_service.py +166 -0
- signalpilot_ai_internal/databricks_schema_service.py +19 -14
- signalpilot_ai_internal/file_scanner_service.py +5 -146
- signalpilot_ai_internal/handlers.py +317 -8
- signalpilot_ai_internal/integrations_config.py +256 -0
- signalpilot_ai_internal/log_utils.py +31 -0
- signalpilot_ai_internal/mcp_handlers.py +33 -9
- signalpilot_ai_internal/mcp_service.py +94 -142
- signalpilot_ai_internal/oauth_token_store.py +141 -0
- signalpilot_ai_internal/schema_search_config.yml +17 -11
- signalpilot_ai_internal/schema_search_service.py +30 -10
- signalpilot_ai_internal/signalpilot_home.py +961 -0
- signalpilot_ai_internal/snowflake_schema_service.py +2 -0
- signalpilot_ai_internal/unified_database_schema_service.py +2 -0
- signalpilot_ai_internal-0.10.22.data/data/share/jupyter/labextensions/signalpilot-ai-internal/schemas/signalpilot-ai-internal/package.json.orig → signalpilot_ai_internal-0.11.24.data/data/share/jupyter/labextensions/signalpilot-ai-internal/package.json +15 -48
- signalpilot_ai_internal-0.10.22.data/data/share/jupyter/labextensions/signalpilot-ai-internal/package.json → signalpilot_ai_internal-0.11.24.data/data/share/jupyter/labextensions/signalpilot-ai-internal/schemas/signalpilot-ai-internal/package.json.orig +9 -52
- signalpilot_ai_internal-0.11.24.data/data/share/jupyter/labextensions/signalpilot-ai-internal/static/122.bab318d6caadb055e29c.js +1 -0
- signalpilot_ai_internal-0.11.24.data/data/share/jupyter/labextensions/signalpilot-ai-internal/static/129.868ca665e6fc225c20a0.js +1 -0
- signalpilot_ai_internal-0.11.24.data/data/share/jupyter/labextensions/signalpilot-ai-internal/static/179.fd45a2e75d471d0aa3b9.js +7 -0
- signalpilot_ai_internal-0.11.24.data/data/share/jupyter/labextensions/signalpilot-ai-internal/static/220.81105a94aa873fc51a94.js +1 -0
- signalpilot_ai_internal-0.11.24.data/data/share/jupyter/labextensions/signalpilot-ai-internal/static/262.a002dd4630d3b6404a90.js +1 -0
- signalpilot_ai_internal-0.11.24.data/data/share/jupyter/labextensions/signalpilot-ai-internal/static/353.cc6f6ecacd703bcdb468.js +1 -0
- signalpilot_ai_internal-0.11.24.data/data/share/jupyter/labextensions/signalpilot-ai-internal/static/364.817a883549d55a0e0576.js +1 -0
- signalpilot_ai_internal-0.11.24.data/data/share/jupyter/labextensions/signalpilot-ai-internal/static/384.a4daecd44f1e9364e44a.js +1 -0
- signalpilot_ai_internal-0.11.24.data/data/share/jupyter/labextensions/signalpilot-ai-internal/static/439.667225aab294fb5ed161.js +1 -0
- signalpilot_ai_internal-0.11.24.data/data/share/jupyter/labextensions/signalpilot-ai-internal/static/447.8138af2522716e5a926f.js +1 -0
- signalpilot_ai_internal-0.11.24.data/data/share/jupyter/labextensions/signalpilot-ai-internal/static/476.925c73e32f3c07448da0.js +1 -0
- signalpilot_ai_internal-0.11.24.data/data/share/jupyter/labextensions/signalpilot-ai-internal/static/477.aaa4cc9e87801fb45f5b.js +1 -0
- signalpilot_ai_internal-0.11.24.data/data/share/jupyter/labextensions/signalpilot-ai-internal/static/481.370056149a59022b700c.js +1 -0
- signalpilot_ai_internal-0.11.24.data/data/share/jupyter/labextensions/signalpilot-ai-internal/static/510.868ca665e6fc225c20a0.js +1 -0
- signalpilot_ai_internal-0.11.24.data/data/share/jupyter/labextensions/signalpilot-ai-internal/static/512.835f97f7ccfc70ff5c93.js +1 -0
- signalpilot_ai_internal-0.11.24.data/data/share/jupyter/labextensions/signalpilot-ai-internal/static/57.6c13335f73de089d6b1e.js +1 -0
- signalpilot_ai_internal-0.11.24.data/data/share/jupyter/labextensions/signalpilot-ai-internal/static/574.ad2709e91ebcac5bbe68.js +1 -0
- signalpilot_ai_internal-0.11.24.data/data/share/jupyter/labextensions/signalpilot-ai-internal/static/635.bddbab8e464fe31f0393.js +1 -0
- signalpilot_ai_internal-0.11.24.data/data/share/jupyter/labextensions/signalpilot-ai-internal/static/713.fda1bcdb10497b0a6ade.js +1 -0
- signalpilot_ai_internal-0.11.24.data/data/share/jupyter/labextensions/signalpilot-ai-internal/static/741.d046701f475fcbf6697d.js +1 -0
- signalpilot_ai_internal-0.11.24.data/data/share/jupyter/labextensions/signalpilot-ai-internal/static/785.c306dffd4cfe8a613d13.js +1 -0
- signalpilot_ai_internal-0.11.24.data/data/share/jupyter/labextensions/signalpilot-ai-internal/static/801.e39898b6f336539f228c.js +1 -0
- signalpilot_ai_internal-0.11.24.data/data/share/jupyter/labextensions/signalpilot-ai-internal/static/880.77cc0ca10a1860df1b52.js +1 -0
- signalpilot_ai_internal-0.11.24.data/data/share/jupyter/labextensions/signalpilot-ai-internal/static/936.4e2850b2af985ed0d378.js +1 -0
- signalpilot_ai_internal-0.11.24.data/data/share/jupyter/labextensions/signalpilot-ai-internal/static/956.eeffe67d7781fd63ef4b.js +2 -0
- signalpilot_ai_internal-0.11.24.data/data/share/jupyter/labextensions/signalpilot-ai-internal/static/remoteEntry.055f50d20a31f3068c72.js +1 -0
- {signalpilot_ai_internal-0.10.22.data → signalpilot_ai_internal-0.11.24.data}/data/share/jupyter/labextensions/signalpilot-ai-internal/static/third-party-licenses.json +29 -29
- {signalpilot_ai_internal-0.10.22.dist-info → signalpilot_ai_internal-0.11.24.dist-info}/METADATA +13 -31
- signalpilot_ai_internal-0.11.24.dist-info/RECORD +66 -0
- signalpilot_ai_internal-0.11.24.dist-info/licenses/LICENSE +7 -0
- signalpilot_ai_internal-0.10.22.data/data/share/jupyter/labextensions/signalpilot-ai-internal/static/110.224e83db03814fd03955.js +0 -7
- signalpilot_ai_internal-0.10.22.data/data/share/jupyter/labextensions/signalpilot-ai-internal/static/122.e2dadf63dc64d7b5f1ee.js +0 -1
- signalpilot_ai_internal-0.10.22.data/data/share/jupyter/labextensions/signalpilot-ai-internal/static/220.328403b5545f268b95c6.js +0 -1
- signalpilot_ai_internal-0.10.22.data/data/share/jupyter/labextensions/signalpilot-ai-internal/static/262.726e1da31a50868cb297.js +0 -1
- signalpilot_ai_internal-0.10.22.data/data/share/jupyter/labextensions/signalpilot-ai-internal/static/353.972abe1d2d66f083f9cc.js +0 -1
- signalpilot_ai_internal-0.10.22.data/data/share/jupyter/labextensions/signalpilot-ai-internal/static/364.dbec4c2dc12e7b050dcc.js +0 -1
- signalpilot_ai_internal-0.10.22.data/data/share/jupyter/labextensions/signalpilot-ai-internal/static/384.fa432bdb7fb6b1c95ad6.js +0 -1
- signalpilot_ai_internal-0.10.22.data/data/share/jupyter/labextensions/signalpilot-ai-internal/static/439.37e271d7a80336daabe2.js +0 -1
- signalpilot_ai_internal-0.10.22.data/data/share/jupyter/labextensions/signalpilot-ai-internal/static/476.ad22ccddd74ee306fb56.js +0 -1
- signalpilot_ai_internal-0.10.22.data/data/share/jupyter/labextensions/signalpilot-ai-internal/static/481.73c7a9290b7d35a8b9c1.js +0 -1
- signalpilot_ai_internal-0.10.22.data/data/share/jupyter/labextensions/signalpilot-ai-internal/static/512.b58fc0093d080b8ee61c.js +0 -1
- signalpilot_ai_internal-0.10.22.data/data/share/jupyter/labextensions/signalpilot-ai-internal/static/553.b4042a795c91d9ff71ef.js +0 -2
- signalpilot_ai_internal-0.10.22.data/data/share/jupyter/labextensions/signalpilot-ai-internal/static/57.c4232851631fb2e7e59a.js +0 -1
- signalpilot_ai_internal-0.10.22.data/data/share/jupyter/labextensions/signalpilot-ai-internal/static/635.9720593ee20b768da3ca.js +0 -1
- signalpilot_ai_internal-0.10.22.data/data/share/jupyter/labextensions/signalpilot-ai-internal/static/713.8e6edc9a965bdd578ca7.js +0 -1
- signalpilot_ai_internal-0.10.22.data/data/share/jupyter/labextensions/signalpilot-ai-internal/static/726.318e4e791edb63cc788f.js +0 -1
- signalpilot_ai_internal-0.10.22.data/data/share/jupyter/labextensions/signalpilot-ai-internal/static/741.dc49867fafb03ea2ba4d.js +0 -1
- signalpilot_ai_internal-0.10.22.data/data/share/jupyter/labextensions/signalpilot-ai-internal/static/742.91e7b516c8699eea3373.js +0 -1
- signalpilot_ai_internal-0.10.22.data/data/share/jupyter/labextensions/signalpilot-ai-internal/static/785.2d75de1a8d2c3131a8db.js +0 -1
- signalpilot_ai_internal-0.10.22.data/data/share/jupyter/labextensions/signalpilot-ai-internal/static/801.ca9e114a30896b669a3c.js +0 -1
- signalpilot_ai_internal-0.10.22.data/data/share/jupyter/labextensions/signalpilot-ai-internal/static/880.d9914229e4f120e7e9e4.js +0 -1
- signalpilot_ai_internal-0.10.22.data/data/share/jupyter/labextensions/signalpilot-ai-internal/static/888.34054db17bcf6e87ec95.js +0 -1
- signalpilot_ai_internal-0.10.22.data/data/share/jupyter/labextensions/signalpilot-ai-internal/static/936.d80de1e4da5b520d2f3b.js +0 -1
- signalpilot_ai_internal-0.10.22.data/data/share/jupyter/labextensions/signalpilot-ai-internal/static/remoteEntry.b63c429ca81e743b403c.js +0 -1
- signalpilot_ai_internal-0.10.22.dist-info/RECORD +0 -56
- signalpilot_ai_internal-0.10.22.dist-info/licenses/LICENSE +0 -29
- {signalpilot_ai_internal-0.10.22.data → signalpilot_ai_internal-0.11.24.data}/data/etc/jupyter/jupyter_server_config.d/signalpilot_ai.json +0 -0
- {signalpilot_ai_internal-0.10.22.data → signalpilot_ai_internal-0.11.24.data}/data/share/jupyter/labextensions/signalpilot-ai-internal/install.json +0 -0
- {signalpilot_ai_internal-0.10.22.data → signalpilot_ai_internal-0.11.24.data}/data/share/jupyter/labextensions/signalpilot-ai-internal/schemas/signalpilot-ai-internal/plugin.json +0 -0
- /signalpilot_ai_internal-0.10.22.data/data/share/jupyter/labextensions/signalpilot-ai-internal/static/553.b4042a795c91d9ff71ef.js.LICENSE.txt → /signalpilot_ai_internal-0.11.24.data/data/share/jupyter/labextensions/signalpilot-ai-internal/static/956.eeffe67d7781fd63ef4b.js.LICENSE.txt +0 -0
- {signalpilot_ai_internal-0.10.22.data → signalpilot_ai_internal-0.11.24.data}/data/share/jupyter/labextensions/signalpilot-ai-internal/static/style.js +0 -0
- {signalpilot_ai_internal-0.10.22.dist-info → signalpilot_ai_internal-0.11.24.dist-info}/WHEEL +0 -0
|
@@ -1 +0,0 @@
|
|
|
1
|
-
(self.webpackChunksignalpilot_ai_internal=self.webpackChunksignalpilot_ai_internal||[]).push([[122],{2122:(e,t,n)=>{"use strict";var i,s;n.r(t),n.d(t,{defaultDiff2HtmlConfig:()=>P,html:()=>V,parse:()=>_}),function(e){e.INSERT="insert",e.DELETE="delete",e.CONTEXT="context"}(i||(i={})),function(e){e.AUTO="auto",e.DARK="dark",e.LIGHT="light"}(s||(s={}));const r=RegExp("["+["-","[","]","/","{","}","(",")","*","+","?",".","\\","^","$","|"].join("\\")+"]","g");function a(e){return e?e.replace(/\\/g,"/"):e}function l(e){const t=e.length;let n=-1/0;for(let i=0;i<t;i++)n=Math.max(n,e[i]);return n}function o(e,t){const n=e.split(".");return n.length>1?n[n.length-1]:t}function c(e,t){return t.reduce((t,n)=>t||e.startsWith(n),!1)}const d=["a/","b/","i/","w/","c/","o/"];function h(e,t,n){const i=void 0!==n?[...d,n]:d,s=t?new RegExp(`^${a=t,a.replace(r,"\\$&")} "?(.+?)"?$`):new RegExp('^"?(.+?)"?$');var a;const[,l=""]=s.exec(e)||[],o=i.find(e=>0===l.indexOf(e));return(o?l.slice(o.length):l).replace(/\s+\d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2}(?:\.\d+)? [+-]\d{4}.*$/,"")}function f(e,t={}){const n=[];let s=null,r=null,a=null,l=null,d=null,f=null,b=null;const u="--- ",p="+++ ",g="@@",m=/^old mode (\d{6})/,v=/^new mode (\d{6})/,w=/^deleted file mode (\d{6})/,x=/^new file mode (\d{6})/,y=/^copy from "?(.+)"?/,N=/^copy to "?(.+)"?/,T=/^rename from "?(.+)"?/,E=/^rename to "?(.+)"?/,C=/^similarity index (\d+)%/,S=/^dissimilarity index (\d+)%/,L=/^index ([\da-z]+)\.\.([\da-z]+)\s*(\d{6})?/,k=/^Binary files (.*) and (.*) differ/,H=/^GIT binary patch/,O=/^index ([\da-z]+),([\da-z]+)\.\.([\da-z]+)/,j=/^mode (\d{6}),(\d{6})\.\.(\d{6})/,I=/^new file mode (\d{6})/,M=/^deleted file mode (\d{6}),(\d{6})/,A=e.replace(/\/g,"").replace(/\r\n?/g,"\n").split("\n");function D(){null!==r&&null!==s&&(s.blocks.push(r),r=null)}function W(){null!==s&&(s.oldName||null===f||(s.oldName=f),s.newName||null===b||(s.newName=b),s.newName&&(n.push(s),s=null)),f=null,b=null}function F(){D(),W(),s={blocks:[],deletedLines:0,addedLines:0}}function B(e){let t;D(),null!==s&&((t=/^@@ -(\d+)(?:,\d+)? \+(\d+)(?:,\d+)? @@.*/.exec(e))?(s.isCombined=!1,a=parseInt(t[1],10),d=parseInt(t[2],10)):(t=/^@@@ -(\d+)(?:,\d+)? -(\d+)(?:,\d+)? \+(\d+)(?:,\d+)? @@@.*/.exec(e))?(s.isCombined=!0,a=parseInt(t[1],10),l=parseInt(t[2],10),d=parseInt(t[3],10)):(e.startsWith(g)&&console.error("Failed to parse lines, starting in 0!"),a=0,d=0,s.isCombined=!1)),r={lines:[],oldStartLine:a,oldStartLine2:l,newStartLine:d,header:e}}return A.forEach((e,l)=>{if(!e||e.startsWith("*"))return;let D;const W=A[l-1],z=A[l+1],R=A[l+2];if(e.startsWith("diff --git")||e.startsWith("diff --combined")){if(F(),(D=/^diff --git "?([a-ciow]\/.+)"? "?([a-ciow]\/.+)"?/.exec(e))&&(f=h(D[1],void 0,t.dstPrefix),b=h(D[2],void 0,t.srcPrefix)),null===s)throw new Error("Where is my file !!!");return void(s.isGitDiff=!0)}if(e.startsWith("Binary files")&&!(null==s?void 0:s.isGitDiff)){if(F(),(D=/^Binary files "?([a-ciow]\/.+)"? and "?([a-ciow]\/.+)"? differ/.exec(e))&&(f=h(D[1],void 0,t.dstPrefix),b=h(D[2],void 0,t.srcPrefix)),null===s)throw new Error("Where is my file !!!");return void(s.isBinary=!0)}if((!s||!s.isGitDiff&&s&&e.startsWith(u)&&z.startsWith(p)&&R.startsWith(g))&&F(),null==s?void 0:s.isTooBig)return;if(s&&("number"==typeof t.diffMaxChanges&&s.addedLines+s.deletedLines>t.diffMaxChanges||"number"==typeof t.diffMaxLineLength&&e.length>t.diffMaxLineLength))return s.isTooBig=!0,s.addedLines=0,s.deletedLines=0,s.blocks=[],r=null,void B("function"==typeof t.diffTooBigMessage?t.diffTooBigMessage(n.length):"Diff too big to be displayed");if(e.startsWith(u)&&z.startsWith(p)||e.startsWith(p)&&W.startsWith(u)){if(s&&!s.oldName&&e.startsWith("--- ")&&(D=function(e,t){return h(e,"---",t)}(e,t.srcPrefix)))return s.oldName=D,void(s.language=o(s.oldName,s.language));if(s&&!s.newName&&e.startsWith("+++ ")&&(D=function(e,t){return h(e,"+++",t)}(e,t.dstPrefix)))return s.newName=D,void(s.language=o(s.newName,s.language))}if(s&&(e.startsWith(g)||s.isGitDiff&&s.oldName&&s.newName&&!r))return void B(e);if(r&&(e.startsWith("+")||e.startsWith("-")||e.startsWith(" ")))return void function(e){if(null===s||null===r||null===a||null===d)return;const t={content:e},n=s.isCombined?["+ "," +","++"]:["+"],l=s.isCombined?["- "," -","--"]:["-"];c(e,n)?(s.addedLines++,t.type=i.INSERT,t.oldNumber=void 0,t.newNumber=d++):c(e,l)?(s.deletedLines++,t.type=i.DELETE,t.oldNumber=a++,t.newNumber=void 0):(t.type=i.CONTEXT,t.oldNumber=a++,t.newNumber=d++),r.lines.push(t)}(e);const U=!function(e,t){let n=t;for(;n<A.length-3;){if(e.startsWith("diff"))return!1;if(A[n].startsWith(u)&&A[n+1].startsWith(p)&&A[n+2].startsWith(g))return!0;n++}return!1}(e,l);if(null===s)throw new Error("Where is my file !!!");(D=m.exec(e))?s.oldMode=D[1]:(D=v.exec(e))?s.newMode=D[1]:(D=w.exec(e))?(s.deletedFileMode=D[1],s.isDeleted=!0):(D=x.exec(e))?(s.newFileMode=D[1],s.isNew=!0):(D=y.exec(e))?(U&&(s.oldName=D[1]),s.isCopy=!0):(D=N.exec(e))?(U&&(s.newName=D[1]),s.isCopy=!0):(D=T.exec(e))?(U&&(s.oldName=D[1]),s.isRename=!0):(D=E.exec(e))?(U&&(s.newName=D[1]),s.isRename=!0):(D=k.exec(e))?(s.isBinary=!0,s.oldName=h(D[1],void 0,t.srcPrefix),s.newName=h(D[2],void 0,t.dstPrefix),B("Binary file")):H.test(e)?(s.isBinary=!0,B(e)):(D=C.exec(e))?s.unchangedPercentage=parseInt(D[1],10):(D=S.exec(e))?s.changedPercentage=parseInt(D[1],10):(D=L.exec(e))?(s.checksumBefore=D[1],s.checksumAfter=D[2],D[3]&&(s.mode=D[3])):(D=O.exec(e))?(s.checksumBefore=[D[2],D[3]],s.checksumAfter=D[1]):(D=j.exec(e))?(s.oldMode=[D[2],D[3]],s.newMode=D[1]):(D=I.exec(e))?(s.newFileMode=D[1],s.isNew=!0):(D=M.exec(e))&&(s.deletedFileMode=D[1],s.isDeleted=!0)}),D(),W(),n}var b=n(73379);function u(e){return(t,n)=>{const i=e(t).trim(),s=e(n).trim();return function(e,t){if(0===e.length)return t.length;if(0===t.length)return e.length;const n=[];let i,s;for(i=0;i<=t.length;i++)n[i]=[i];for(s=0;s<=e.length;s++)n[0][s]=s;for(i=1;i<=t.length;i++)for(s=1;s<=e.length;s++)t.charAt(i-1)===e.charAt(s-1)?n[i][s]=n[i-1][s-1]:n[i][s]=Math.min(n[i-1][s-1]+1,Math.min(n[i][s-1]+1,n[i-1][s]+1));return n[t.length][e.length]}(i,s)/(i.length+s.length)}}function p(e){return function t(n,i,s=0,r=new Map){const a=function(t,n,i=new Map){let s,r=1/0;for(let a=0;a<t.length;++a)for(let l=0;l<n.length;++l){const o=JSON.stringify([t[a],n[l]]);let c;i.has(o)&&(c=i.get(o))||(c=e(t[a],n[l]),i.set(o,c)),c<r&&(r=c,s={indexA:a,indexB:l,score:r})}return s}(n,i,r);if(!a||n.length+i.length<3)return[[n,i]];const l=n.slice(0,a.indexA),o=i.slice(0,a.indexB),c=[n[a.indexA]],d=[i[a.indexB]],h=a.indexA+1,f=a.indexB+1,b=n.slice(h),u=i.slice(f),p=t(l,o,s+1,r),g=t(c,d,s+1,r),m=t(b,u,s+1,r);let v=g;return(a.indexA>0||a.indexB>0)&&(v=p.concat(v)),(n.length>h||i.length>f)&&(v=v.concat(m)),v}}const g={INSERTS:"d2h-ins",DELETES:"d2h-del",CONTEXT:"d2h-cntx",INFO:"d2h-info",INSERT_CHANGES:"d2h-ins d2h-change",DELETE_CHANGES:"d2h-del d2h-change"},m={matching:"none",matchWordsThreshold:.25,maxLineLengthHighlight:1e4,diffStyle:"word",colorScheme:s.LIGHT},v="/",w=u(e=>e.value),x=p(w);function y(e){return-1!==e.indexOf("dev/null")}function N(e){return e.replace(/(<del[^>]*>((.|\n)*?)<\/del>)/g,"")}function T(e){switch(e){case i.CONTEXT:return g.CONTEXT;case i.INSERT:return g.INSERTS;case i.DELETE:return g.DELETES}}function E(e){switch(e){case s.DARK:return"d2h-dark-color-scheme";case s.AUTO:return"d2h-auto-color-scheme";case s.LIGHT:default:return"d2h-light-color-scheme"}}function C(e){return e.slice(0).replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'").replace(/\//g,"/")}function S(e,t,n=!0){const i=function(e){return e?2:1}(t);return{prefix:e.substring(0,i),content:n?C(e.substring(i)):e.substring(i)}}function L(e){const t=a(e.oldName),n=a(e.newName);if(t===n||y(t)||y(n))return y(n)?t:n;{const e=[],i=[],s=t.split(v),r=n.split(v);let a=0,l=s.length-1,o=r.length-1;for(;a<l&&a<o&&s[a]===r[a];)e.push(r[a]),a+=1;for(;l>a&&o>a&&s[l]===r[o];)i.unshift(r[o]),l-=1,o-=1;const c=e.join(v),d=i.join(v),h=s.slice(a,l+1).join(v),f=r.slice(a,o+1).join(v);return c.length&&d.length?c+v+"{"+h+" → "+f+"}"+v+d:c.length?c+v+"{"+h+" → "+f+"}":d.length?"{"+h+" → "+f+"}"+v+d:t+" → "+n}}function k(e){return`d2h-${function(e){let t,n,i,s=0;for(t=0,i=e.length;t<i;t++)n=e.charCodeAt(t),s=(s<<5)-s+n,s|=0;return s}(L(e)).toString().slice(-6)}`}function H(e){let t="file-changed";return e.isRename||e.isCopy?t="file-renamed":e.isNew?t="file-added":e.isDeleted?t="file-deleted":e.newName!==e.oldName&&(t="file-renamed"),t}function O(e,t,n,i={}){const{matching:s,maxLineLengthHighlight:r,matchWordsThreshold:a,diffStyle:l}=Object.assign(Object.assign({},m),i),o=S(e,n,!1),c=S(t,n,!1);if(o.content.length>r||c.content.length>r)return{oldLine:{prefix:o.prefix,content:C(o.content)},newLine:{prefix:c.prefix,content:C(c.content)}};const d="char"===l?b.diffChars(o.content,c.content):b.diffWordsWithSpace(o.content,c.content),h=[];if("word"===l&&"words"===s){const e=d.filter(e=>e.removed),t=d.filter(e=>e.added);x(t,e).forEach(e=>{1===e[0].length&&1===e[1].length&&w(e[0][0],e[1][0])<a&&(h.push(e[0][0]),h.push(e[1][0]))})}const f=d.reduce((e,t)=>{const n=t.added?"ins":t.removed?"del":null,i=h.indexOf(t)>-1?' class="d2h-change"':"",s=C(t.value);return null!==n?`${e}<${n}${i}>${s}</${n}>`:`${e}${s}`},"");return{oldLine:{prefix:o.prefix,content:(u=f,u.replace(/(<ins[^>]*>((.|\n)*?)<\/ins>)/g,""))},newLine:{prefix:c.prefix,content:N(f)}};var u}const j="file-summary",I={colorScheme:m.colorScheme};class M{constructor(e,t={}){this.hoganUtils=e,this.config=Object.assign(Object.assign({},I),t)}render(e){const t=e.map(e=>this.hoganUtils.render(j,"line",{fileHtmlId:k(e),oldName:e.oldName,newName:e.newName,fileName:L(e),deletedLines:"-"+e.deletedLines,addedLines:"+"+e.addedLines},{fileIcon:this.hoganUtils.template("icon",H(e))})).join("\n");return this.hoganUtils.render(j,"wrapper",{colorScheme:E(this.config.colorScheme),filesNumber:e.length,files:t})}}const A=Object.assign(Object.assign({},m),{renderNothingWhenEmpty:!1,matchingMaxComparisons:2500,maxLineSizeInBlockForComparison:200}),D="generic",W="line-by-line";class F{constructor(e,t={}){this.hoganUtils=e,this.config=Object.assign(Object.assign({},A),t)}render(e){const t=e.map(e=>{let t;return t=e.blocks.length?this.generateFileHtml(e):this.generateEmptyDiff(),this.makeFileDiffHtml(e,t)}).join("\n");return this.hoganUtils.render(D,"wrapper",{colorScheme:E(this.config.colorScheme),content:t})}makeFileDiffHtml(e,t){if(this.config.renderNothingWhenEmpty&&Array.isArray(e.blocks)&&0===e.blocks.length)return"";const n=this.hoganUtils.template(W,"file-diff"),i=this.hoganUtils.template(D,"file-path"),s=this.hoganUtils.template("icon","file"),r=this.hoganUtils.template("tag",H(e));return n.render({file:e,fileHtmlId:k(e),diffs:t,filePath:i.render({fileDiffName:L(e)},{fileIcon:s,fileTag:r})})}generateEmptyDiff(){return this.hoganUtils.render(D,"empty-diff",{contentClass:"d2h-code-line",CSSLineClass:g})}generateFileHtml(e){const t=p(u(t=>S(t.content,e.isCombined).content));return e.blocks.map(n=>{let i=this.hoganUtils.render(D,"block-header",{CSSLineClass:g,blockHeader:e.isTooBig?n.header:C(n.header),lineClass:"d2h-code-linenumber",contentClass:"d2h-code-line"});return this.applyLineGroupping(n).forEach(([n,s,r])=>{if(s.length&&r.length&&!n.length)this.applyRematchMatching(s,r,t).map(([t,n])=>{const{left:s,right:r}=this.processChangedLines(e,e.isCombined,t,n);i+=s,i+=r});else if(n.length)n.forEach(t=>{const{prefix:n,content:s}=S(t.content,e.isCombined);i+=this.generateSingleLineHtml(e,{type:g.CONTEXT,prefix:n,content:s,oldNumber:t.oldNumber,newNumber:t.newNumber})});else if(s.length||r.length){const{left:t,right:n}=this.processChangedLines(e,e.isCombined,s,r);i+=t,i+=n}else console.error("Unknown state reached while processing groups of lines",n,s,r)}),i}).join("\n")}applyLineGroupping(e){const t=[];let n=[],s=[];for(let r=0;r<e.lines.length;r++){const a=e.lines[r];(a.type!==i.INSERT&&s.length||a.type===i.CONTEXT&&n.length>0)&&(t.push([[],n,s]),n=[],s=[]),a.type===i.CONTEXT?t.push([[a],[],[]]):a.type===i.INSERT&&0===n.length?t.push([[],[],[a]]):a.type===i.INSERT&&n.length>0?s.push(a):a.type===i.DELETE&&n.push(a)}return(n.length||s.length)&&(t.push([[],n,s]),n=[],s=[]),t}applyRematchMatching(e,t,n){const i=e.length*t.length,s=l(e.concat(t).map(e=>e.content.length));return i<this.config.matchingMaxComparisons&&s<this.config.maxLineSizeInBlockForComparison&&("lines"===this.config.matching||"words"===this.config.matching)?n(e,t):[[e,t]]}processChangedLines(e,t,n,i){const s={right:"",left:""},r=Math.max(n.length,i.length);for(let a=0;a<r;a++){const r=n[a],l=i[a],o=void 0!==r&&void 0!==l?O(r.content,l.content,t,this.config):void 0,c=void 0!==r&&void 0!==r.oldNumber?Object.assign(Object.assign({},void 0!==o?{prefix:o.oldLine.prefix,content:o.oldLine.content,type:g.DELETE_CHANGES}:Object.assign(Object.assign({},S(r.content,t)),{type:T(r.type)})),{oldNumber:r.oldNumber,newNumber:r.newNumber}):void 0,d=void 0!==l&&void 0!==l.newNumber?Object.assign(Object.assign({},void 0!==o?{prefix:o.newLine.prefix,content:o.newLine.content,type:g.INSERT_CHANGES}:Object.assign(Object.assign({},S(l.content,t)),{type:T(l.type)})),{oldNumber:l.oldNumber,newNumber:l.newNumber}):void 0,{left:h,right:f}=this.generateLineHtml(e,c,d);s.left+=h,s.right+=f}return s}generateLineHtml(e,t,n){return{left:this.generateSingleLineHtml(e,t),right:this.generateSingleLineHtml(e,n)}}generateSingleLineHtml(e,t){if(void 0===t)return"";const n=this.hoganUtils.render(W,"numbers",{oldNumber:t.oldNumber||"",newNumber:t.newNumber||""});return this.hoganUtils.render(D,"line",{type:t.type,lineClass:"d2h-code-linenumber",contentClass:"d2h-code-line",prefix:" "===t.prefix?" ":t.prefix,content:t.content,lineNumber:n,line:t,file:e})}}const B=Object.assign(Object.assign({},m),{renderNothingWhenEmpty:!1,matchingMaxComparisons:2500,maxLineSizeInBlockForComparison:200}),z="generic";class R{constructor(e,t={}){this.hoganUtils=e,this.config=Object.assign(Object.assign({},B),t)}render(e){const t=e.map(e=>{let t;return t=e.blocks.length?this.generateFileHtml(e):this.generateEmptyDiff(),this.makeFileDiffHtml(e,t)}).join("\n");return this.hoganUtils.render(z,"wrapper",{colorScheme:E(this.config.colorScheme),content:t})}makeFileDiffHtml(e,t){if(this.config.renderNothingWhenEmpty&&Array.isArray(e.blocks)&&0===e.blocks.length)return"";const n=this.hoganUtils.template("side-by-side","file-diff"),i=this.hoganUtils.template(z,"file-path"),s=this.hoganUtils.template("icon","file"),r=this.hoganUtils.template("tag",H(e));return n.render({file:e,fileHtmlId:k(e),diffs:t,filePath:i.render({fileDiffName:L(e)},{fileIcon:s,fileTag:r})})}generateEmptyDiff(){return{right:"",left:this.hoganUtils.render(z,"empty-diff",{contentClass:"d2h-code-side-line",CSSLineClass:g})}}generateFileHtml(e){const t=p(u(t=>S(t.content,e.isCombined).content));return e.blocks.map(n=>{const i={left:this.makeHeaderHtml(n.header,e),right:this.makeHeaderHtml("")};return this.applyLineGroupping(n).forEach(([n,s,r])=>{if(s.length&&r.length&&!n.length)this.applyRematchMatching(s,r,t).map(([t,n])=>{const{left:s,right:r}=this.processChangedLines(e.isCombined,t,n);i.left+=s,i.right+=r});else if(n.length)n.forEach(t=>{const{prefix:n,content:s}=S(t.content,e.isCombined),{left:r,right:a}=this.generateLineHtml({type:g.CONTEXT,prefix:n,content:s,number:t.oldNumber},{type:g.CONTEXT,prefix:n,content:s,number:t.newNumber});i.left+=r,i.right+=a});else if(s.length||r.length){const{left:t,right:n}=this.processChangedLines(e.isCombined,s,r);i.left+=t,i.right+=n}else console.error("Unknown state reached while processing groups of lines",n,s,r)}),i}).reduce((e,t)=>({left:e.left+t.left,right:e.right+t.right}),{left:"",right:""})}applyLineGroupping(e){const t=[];let n=[],s=[];for(let r=0;r<e.lines.length;r++){const a=e.lines[r];(a.type!==i.INSERT&&s.length||a.type===i.CONTEXT&&n.length>0)&&(t.push([[],n,s]),n=[],s=[]),a.type===i.CONTEXT?t.push([[a],[],[]]):a.type===i.INSERT&&0===n.length?t.push([[],[],[a]]):a.type===i.INSERT&&n.length>0?s.push(a):a.type===i.DELETE&&n.push(a)}return(n.length||s.length)&&(t.push([[],n,s]),n=[],s=[]),t}applyRematchMatching(e,t,n){const i=e.length*t.length,s=l(e.concat(t).map(e=>e.content.length));return i<this.config.matchingMaxComparisons&&s<this.config.maxLineSizeInBlockForComparison&&("lines"===this.config.matching||"words"===this.config.matching)?n(e,t):[[e,t]]}makeHeaderHtml(e,t){return this.hoganUtils.render(z,"block-header",{CSSLineClass:g,blockHeader:(null==t?void 0:t.isTooBig)?e:C(e),lineClass:"d2h-code-side-linenumber",contentClass:"d2h-code-side-line"})}processChangedLines(e,t,n){const i={right:"",left:""},s=Math.max(t.length,n.length);for(let r=0;r<s;r++){const s=t[r],a=n[r],l=void 0!==s&&void 0!==a?O(s.content,a.content,e,this.config):void 0,o=void 0!==s&&void 0!==s.oldNumber?Object.assign(Object.assign({},void 0!==l?{prefix:l.oldLine.prefix,content:l.oldLine.content,type:g.DELETE_CHANGES}:Object.assign(Object.assign({},S(s.content,e)),{type:T(s.type)})),{number:s.oldNumber}):void 0,c=void 0!==a&&void 0!==a.newNumber?Object.assign(Object.assign({},void 0!==l?{prefix:l.newLine.prefix,content:l.newLine.content,type:g.INSERT_CHANGES}:Object.assign(Object.assign({},S(a.content,e)),{type:T(a.type)})),{number:a.newNumber}):void 0,{left:d,right:h}=this.generateLineHtml(o,c);i.left+=d,i.right+=h}return i}generateLineHtml(e,t){return{left:this.generateSingleHtml(e),right:this.generateSingleHtml(t)}}generateSingleHtml(e){const t="d2h-code-side-linenumber",n="d2h-code-side-line";return this.hoganUtils.render(z,"line",{type:(null==e?void 0:e.type)||`${g.CONTEXT} d2h-emptyplaceholder`,lineClass:void 0!==e?t:`${t} d2h-code-side-emptyplaceholder`,contentClass:void 0!==e?n:`${n} d2h-code-side-emptyplaceholder`,prefix:" "===(null==e?void 0:e.prefix)?" ":null==e?void 0:e.prefix,content:null==e?void 0:e.content,lineNumber:null==e?void 0:e.number})}}var U=n(34714);const $={};$["file-summary-line"]=new U.Template({code:function(e,t,n){var i=this;return i.b(n=n||""),i.b('<li class="d2h-file-list-line">'),i.b("\n"+n),i.b(' <span class="d2h-file-name-wrapper">'),i.b("\n"+n),i.b(i.rp("<fileIcon0",e,t," ")),i.b(' <a href="#'),i.b(i.v(i.f("fileHtmlId",e,t,0))),i.b('" class="d2h-file-name">'),i.b(i.v(i.f("fileName",e,t,0))),i.b("</a>"),i.b("\n"+n),i.b(' <span class="d2h-file-stats">'),i.b("\n"+n),i.b(' <span class="d2h-lines-added">'),i.b(i.v(i.f("addedLines",e,t,0))),i.b("</span>"),i.b("\n"+n),i.b(' <span class="d2h-lines-deleted">'),i.b(i.v(i.f("deletedLines",e,t,0))),i.b("</span>"),i.b("\n"+n),i.b(" </span>"),i.b("\n"+n),i.b(" </span>"),i.b("\n"+n),i.b("</li>"),i.fl()},partials:{"<fileIcon0":{name:"fileIcon",partials:{},subs:{}}},subs:{}}),$["file-summary-wrapper"]=new U.Template({code:function(e,t,n){var i=this;return i.b(n=n||""),i.b('<div class="d2h-file-list-wrapper '),i.b(i.v(i.f("colorScheme",e,t,0))),i.b('">'),i.b("\n"+n),i.b(' <div class="d2h-file-list-header">'),i.b("\n"+n),i.b(' <span class="d2h-file-list-title">Files changed ('),i.b(i.v(i.f("filesNumber",e,t,0))),i.b(")</span>"),i.b("\n"+n),i.b(' <a class="d2h-file-switch d2h-hide">hide</a>'),i.b("\n"+n),i.b(' <a class="d2h-file-switch d2h-show">show</a>'),i.b("\n"+n),i.b(" </div>"),i.b("\n"+n),i.b(' <ol class="d2h-file-list">'),i.b("\n"+n),i.b(" "),i.b(i.t(i.f("files",e,t,0))),i.b("\n"+n),i.b(" </ol>"),i.b("\n"+n),i.b("</div>"),i.fl()},partials:{},subs:{}}),$["generic-block-header"]=new U.Template({code:function(e,t,n){var i=this;return i.b(n=n||""),i.b("<tr>"),i.b("\n"+n),i.b(' <td class="'),i.b(i.v(i.f("lineClass",e,t,0))),i.b(" "),i.b(i.v(i.d("CSSLineClass.INFO",e,t,0))),i.b('"></td>'),i.b("\n"+n),i.b(' <td class="'),i.b(i.v(i.d("CSSLineClass.INFO",e,t,0))),i.b('">'),i.b("\n"+n),i.b(' <div class="'),i.b(i.v(i.f("contentClass",e,t,0))),i.b('">'),i.s(i.f("blockHeader",e,t,1),e,t,0,156,173,"{{ }}")&&(i.rs(e,t,function(e,t,n){n.b(n.t(n.f("blockHeader",e,t,0)))}),e.pop()),i.s(i.f("blockHeader",e,t,1),e,t,1,0,0,"")||i.b(" "),i.b("</div>"),i.b("\n"+n),i.b(" </td>"),i.b("\n"+n),i.b("</tr>"),i.fl()},partials:{},subs:{}}),$["generic-empty-diff"]=new U.Template({code:function(e,t,n){var i=this;return i.b(n=n||""),i.b("<tr>"),i.b("\n"+n),i.b(' <td class="'),i.b(i.v(i.d("CSSLineClass.INFO",e,t,0))),i.b('">'),i.b("\n"+n),i.b(' <div class="'),i.b(i.v(i.f("contentClass",e,t,0))),i.b('">'),i.b("\n"+n),i.b(" File without changes"),i.b("\n"+n),i.b(" </div>"),i.b("\n"+n),i.b(" </td>"),i.b("\n"+n),i.b("</tr>"),i.fl()},partials:{},subs:{}}),$["generic-file-path"]=new U.Template({code:function(e,t,n){var i=this;return i.b(n=n||""),i.b('<span class="d2h-file-name-wrapper">'),i.b("\n"+n),i.b(i.rp("<fileIcon0",e,t," ")),i.b(' <span class="d2h-file-name">'),i.b(i.v(i.f("fileDiffName",e,t,0))),i.b("</span>"),i.b("\n"+n),i.b(i.rp("<fileTag1",e,t," ")),i.b("</span>"),i.b("\n"+n),i.b('<label class="d2h-file-collapse">'),i.b("\n"+n),i.b(' <input class="d2h-file-collapse-input" type="checkbox" name="viewed" value="viewed">'),i.b("\n"+n),i.b(" Viewed"),i.b("\n"+n),i.b("</label>"),i.fl()},partials:{"<fileIcon0":{name:"fileIcon",partials:{},subs:{}},"<fileTag1":{name:"fileTag",partials:{},subs:{}}},subs:{}}),$["generic-line"]=new U.Template({code:function(e,t,n){var i=this;return i.b(n=n||""),i.b("<tr>"),i.b("\n"+n),i.b(' <td class="'),i.b(i.v(i.f("lineClass",e,t,0))),i.b(" "),i.b(i.v(i.f("type",e,t,0))),i.b('">'),i.b("\n"+n),i.b(" "),i.b(i.t(i.f("lineNumber",e,t,0))),i.b("\n"+n),i.b(" </td>"),i.b("\n"+n),i.b(' <td class="'),i.b(i.v(i.f("type",e,t,0))),i.b('">'),i.b("\n"+n),i.b(' <div class="'),i.b(i.v(i.f("contentClass",e,t,0))),i.b('">'),i.b("\n"+n),i.s(i.f("prefix",e,t,1),e,t,0,162,238,"{{ }}")&&(i.rs(e,t,function(e,t,i){i.b(' <span class="d2h-code-line-prefix">'),i.b(i.t(i.f("prefix",e,t,0))),i.b("</span>"),i.b("\n"+n)}),e.pop()),i.s(i.f("prefix",e,t,1),e,t,1,0,0,"")||(i.b(' <span class="d2h-code-line-prefix"> </span>'),i.b("\n"+n)),i.s(i.f("content",e,t,1),e,t,0,371,445,"{{ }}")&&(i.rs(e,t,function(e,t,i){i.b(' <span class="d2h-code-line-ctn">'),i.b(i.t(i.f("content",e,t,0))),i.b("</span>"),i.b("\n"+n)}),e.pop()),i.s(i.f("content",e,t,1),e,t,1,0,0,"")||(i.b(' <span class="d2h-code-line-ctn"><br></span>'),i.b("\n"+n)),i.b(" </div>"),i.b("\n"+n),i.b(" </td>"),i.b("\n"+n),i.b("</tr>"),i.fl()},partials:{},subs:{}}),$["generic-wrapper"]=new U.Template({code:function(e,t,n){var i=this;return i.b(n=n||""),i.b('<div class="d2h-wrapper '),i.b(i.v(i.f("colorScheme",e,t,0))),i.b('">'),i.b("\n"+n),i.b(" "),i.b(i.t(i.f("content",e,t,0))),i.b("\n"+n),i.b("</div>"),i.fl()},partials:{},subs:{}}),$["icon-file-added"]=new U.Template({code:function(e,t,n){var i=this;return i.b(n=n||""),i.b('<svg aria-hidden="true" class="d2h-icon d2h-added" height="16" title="added" version="1.1" viewBox="0 0 14 16"'),i.b("\n"+n),i.b(' width="14">'),i.b("\n"+n),i.b(' <path d="M13 1H1C0.45 1 0 1.45 0 2v12c0 0.55 0.45 1 1 1h12c0.55 0 1-0.45 1-1V2c0-0.55-0.45-1-1-1z m0 13H1V2h12v12zM6 9H3V7h3V4h2v3h3v2H8v3H6V9z"></path>'),i.b("\n"+n),i.b("</svg>"),i.fl()},partials:{},subs:{}}),$["icon-file-changed"]=new U.Template({code:function(e,t,n){var i=this;return i.b(n=n||""),i.b('<svg aria-hidden="true" class="d2h-icon d2h-changed" height="16" title="modified" version="1.1"'),i.b("\n"+n),i.b(' viewBox="0 0 14 16" width="14">'),i.b("\n"+n),i.b(' <path d="M13 1H1C0.45 1 0 1.45 0 2v12c0 0.55 0.45 1 1 1h12c0.55 0 1-0.45 1-1V2c0-0.55-0.45-1-1-1z m0 13H1V2h12v12zM4 8c0-1.66 1.34-3 3-3s3 1.34 3 3-1.34 3-3 3-3-1.34-3-3z"></path>'),i.b("\n"+n),i.b("</svg>"),i.fl()},partials:{},subs:{}}),$["icon-file-deleted"]=new U.Template({code:function(e,t,n){var i=this;return i.b(n=n||""),i.b('<svg aria-hidden="true" class="d2h-icon d2h-deleted" height="16" title="removed" version="1.1"'),i.b("\n"+n),i.b(' viewBox="0 0 14 16" width="14">'),i.b("\n"+n),i.b(' <path d="M13 1H1C0.45 1 0 1.45 0 2v12c0 0.55 0.45 1 1 1h12c0.55 0 1-0.45 1-1V2c0-0.55-0.45-1-1-1z m0 13H1V2h12v12zM11 9H3V7h8v2z"></path>'),i.b("\n"+n),i.b("</svg>"),i.fl()},partials:{},subs:{}}),$["icon-file-renamed"]=new U.Template({code:function(e,t,n){var i=this;return i.b(n=n||""),i.b('<svg aria-hidden="true" class="d2h-icon d2h-moved" height="16" title="renamed" version="1.1"'),i.b("\n"+n),i.b(' viewBox="0 0 14 16" width="14">'),i.b("\n"+n),i.b(' <path d="M6 9H3V7h3V4l5 4-5 4V9z m8-7v12c0 0.55-0.45 1-1 1H1c-0.55 0-1-0.45-1-1V2c0-0.55 0.45-1 1-1h12c0.55 0 1 0.45 1 1z m-1 0H1v12h12V2z"></path>'),i.b("\n"+n),i.b("</svg>"),i.fl()},partials:{},subs:{}}),$["icon-file"]=new U.Template({code:function(e,t,n){var i=this;return i.b(n=n||""),i.b('<svg aria-hidden="true" class="d2h-icon" height="16" version="1.1" viewBox="0 0 12 16" width="12">'),i.b("\n"+n),i.b(' <path d="M6 5H2v-1h4v1zM2 8h7v-1H2v1z m0 2h7v-1H2v1z m0 2h7v-1H2v1z m10-7.5v9.5c0 0.55-0.45 1-1 1H1c-0.55 0-1-0.45-1-1V2c0-0.55 0.45-1 1-1h7.5l3.5 3.5z m-1 0.5L8 2H1v12h10V5z"></path>'),i.b("\n"+n),i.b("</svg>"),i.fl()},partials:{},subs:{}}),$["line-by-line-file-diff"]=new U.Template({code:function(e,t,n){var i=this;return i.b(n=n||""),i.b('<div id="'),i.b(i.v(i.f("fileHtmlId",e,t,0))),i.b('" class="d2h-file-wrapper" data-lang="'),i.b(i.v(i.d("file.language",e,t,0))),i.b('">'),i.b("\n"+n),i.b(' <div class="d2h-file-header">'),i.b("\n"+n),i.b(" "),i.b(i.t(i.f("filePath",e,t,0))),i.b("\n"+n),i.b(" </div>"),i.b("\n"+n),i.b(' <div class="d2h-file-diff">'),i.b("\n"+n),i.b(' <div class="d2h-code-wrapper">'),i.b("\n"+n),i.b(' <table class="d2h-diff-table">'),i.b("\n"+n),i.b(' <tbody class="d2h-diff-tbody">'),i.b("\n"+n),i.b(" "),i.b(i.t(i.f("diffs",e,t,0))),i.b("\n"+n),i.b(" </tbody>"),i.b("\n"+n),i.b(" </table>"),i.b("\n"+n),i.b(" </div>"),i.b("\n"+n),i.b(" </div>"),i.b("\n"+n),i.b("</div>"),i.fl()},partials:{},subs:{}}),$["line-by-line-numbers"]=new U.Template({code:function(e,t,n){var i=this;return i.b(n=n||""),i.b('<div class="line-num1">'),i.b(i.v(i.f("oldNumber",e,t,0))),i.b("</div>"),i.b("\n"+n),i.b('<div class="line-num2">'),i.b(i.v(i.f("newNumber",e,t,0))),i.b("</div>"),i.fl()},partials:{},subs:{}}),$["side-by-side-file-diff"]=new U.Template({code:function(e,t,n){var i=this;return i.b(n=n||""),i.b('<div id="'),i.b(i.v(i.f("fileHtmlId",e,t,0))),i.b('" class="d2h-file-wrapper" data-lang="'),i.b(i.v(i.d("file.language",e,t,0))),i.b('">'),i.b("\n"+n),i.b(' <div class="d2h-file-header">'),i.b("\n"+n),i.b(" "),i.b(i.t(i.f("filePath",e,t,0))),i.b("\n"+n),i.b(" </div>"),i.b("\n"+n),i.b(' <div class="d2h-files-diff">'),i.b("\n"+n),i.b(' <div class="d2h-file-side-diff">'),i.b("\n"+n),i.b(' <div class="d2h-code-wrapper">'),i.b("\n"+n),i.b(' <table class="d2h-diff-table">'),i.b("\n"+n),i.b(' <tbody class="d2h-diff-tbody">'),i.b("\n"+n),i.b(" "),i.b(i.t(i.d("diffs.left",e,t,0))),i.b("\n"+n),i.b(" </tbody>"),i.b("\n"+n),i.b(" </table>"),i.b("\n"+n),i.b(" </div>"),i.b("\n"+n),i.b(" </div>"),i.b("\n"+n),i.b(' <div class="d2h-file-side-diff">'),i.b("\n"+n),i.b(' <div class="d2h-code-wrapper">'),i.b("\n"+n),i.b(' <table class="d2h-diff-table">'),i.b("\n"+n),i.b(' <tbody class="d2h-diff-tbody">'),i.b("\n"+n),i.b(" "),i.b(i.t(i.d("diffs.right",e,t,0))),i.b("\n"+n),i.b(" </tbody>"),i.b("\n"+n),i.b(" </table>"),i.b("\n"+n),i.b(" </div>"),i.b("\n"+n),i.b(" </div>"),i.b("\n"+n),i.b(" </div>"),i.b("\n"+n),i.b("</div>"),i.fl()},partials:{},subs:{}}),$["tag-file-added"]=new U.Template({code:function(e,t,n){var i=this;return i.b(n=n||""),i.b('<span class="d2h-tag d2h-added d2h-added-tag">ADDED</span>'),i.fl()},partials:{},subs:{}}),$["tag-file-changed"]=new U.Template({code:function(e,t,n){var i=this;return i.b(n=n||""),i.b('<span class="d2h-tag d2h-changed d2h-changed-tag">CHANGED</span>'),i.fl()},partials:{},subs:{}}),$["tag-file-deleted"]=new U.Template({code:function(e,t,n){var i=this;return i.b(n=n||""),i.b('<span class="d2h-tag d2h-deleted d2h-deleted-tag">DELETED</span>'),i.fl()},partials:{},subs:{}}),$["tag-file-renamed"]=new U.Template({code:function(e,t,n){var i=this;return i.b(n=n||""),i.b('<span class="d2h-tag d2h-moved d2h-moved-tag">RENAMED</span>'),i.fl()},partials:{},subs:{}});class G{constructor({compiledTemplates:e={},rawTemplates:t={}}){const n=Object.entries(t).reduce((e,[t,n])=>{const i=U.compile(n,{asString:!1});return Object.assign(Object.assign({},e),{[t]:i})},{});this.preCompiledTemplates=Object.assign(Object.assign(Object.assign({},$),e),n)}static compile(e){return U.compile(e,{asString:!1})}render(e,t,n,i,s){const r=this.templateKey(e,t);try{return this.preCompiledTemplates[r].render(n,i,s)}catch(e){throw new Error(`Could not find template to render '${r}'`)}}template(e,t){return this.preCompiledTemplates[this.templateKey(e,t)]}templateKey(e,t){return`${e}-${t}`}}const P=Object.assign(Object.assign(Object.assign({},A),B),{outputFormat:"line-by-line",drawFileList:!0});function _(e,t={}){return f(e,Object.assign(Object.assign({},P),t))}function V(e,t={}){const n=Object.assign(Object.assign({},P),t),i="string"==typeof e?f(e,n):e,s=new G(n),{colorScheme:r}=n,a={colorScheme:r};return(n.drawFileList?new M(s,a).render(i):"")+("side-by-side"===n.outputFormat?new R(s,n).render(i):new F(s,n).render(i))}},29110:(e,t)=>{!function(e){var t=/\S/,n=/\"/g,i=/\n/g,s=/\r/g,r=/\\/g,a=/\u2028/,l=/\u2029/;function o(e){"}"===e.n.substr(e.n.length-1)&&(e.n=e.n.substring(0,e.n.length-1))}function c(e){return e.trim?e.trim():e.replace(/^\s*|\s*$/g,"")}function d(e,t,n){if(t.charAt(n)!=e.charAt(0))return!1;for(var i=1,s=e.length;i<s;i++)if(t.charAt(n+i)!=e.charAt(i))return!1;return!0}e.tags={"#":1,"^":2,"<":3,$:4,"/":5,"!":6,">":7,"=":8,_v:9,"{":10,"&":11,_t:12},e.scan=function(n,i){var s=n.length,r=0,a=null,l=null,h="",f=[],b=!1,u=0,p=0,g="{{",m="}}";function v(){h.length>0&&(f.push({tag:"_t",text:new String(h)}),h="")}function w(n,i){if(v(),n&&function(){for(var n=!0,i=p;i<f.length;i++)if(!(n=e.tags[f[i].tag]<e.tags._v||"_t"==f[i].tag&&null===f[i].text.match(t)))return!1;return n}())for(var s,r=p;r<f.length;r++)f[r].text&&((s=f[r+1])&&">"==s.tag&&(s.indent=f[r].text.toString()),f.splice(r,1));else i||f.push({tag:"\n"});b=!1,p=f.length}function x(e,t){var n="="+m,i=e.indexOf(n,t),s=c(e.substring(e.indexOf("=",t)+1,i)).split(" ");return g=s[0],m=s[s.length-1],i+n.length-1}for(i&&(i=i.split(" "),g=i[0],m=i[1]),u=0;u<s;u++)0==r?d(g,n,u)?(--u,v(),r=1):"\n"==n.charAt(u)?w(b):h+=n.charAt(u):1==r?(u+=g.length-1,"="==(a=(l=e.tags[n.charAt(u+1)])?n.charAt(u+1):"_v")?(u=x(n,u),r=0):(l&&u++,r=2),b=u):d(m,n,u)?(f.push({tag:a,n:c(h),otag:g,ctag:m,i:"/"==a?b-g.length:u+m.length}),h="",u+=m.length-1,r=0,"{"==a&&("}}"==m?u++:o(f[f.length-1]))):h+=n.charAt(u);return w(b,!0),f};var h={_t:!0,"\n":!0,$:!0,"/":!0};function f(t,n,i,s){var r,a=[],l=null,o=null;for(r=i[i.length-1];t.length>0;){if(o=t.shift(),r&&"<"==r.tag&&!(o.tag in h))throw new Error("Illegal content in < super tag.");if(e.tags[o.tag]<=e.tags.$||b(o,s))i.push(o),o.nodes=f(t,o.tag,i,s);else{if("/"==o.tag){if(0===i.length)throw new Error("Closing tag without opener: /"+o.n);if(l=i.pop(),o.n!=l.n&&!u(o.n,l.n,s))throw new Error("Nesting error: "+l.n+" vs. "+o.n);return l.end=o.i,a}"\n"==o.tag&&(o.last=0==t.length||"\n"==t[0].tag)}a.push(o)}if(i.length>0)throw new Error("missing closing tag: "+i.pop().n);return a}function b(e,t){for(var n=0,i=t.length;n<i;n++)if(t[n].o==e.n)return e.tag="#",!0}function u(e,t,n){for(var i=0,s=n.length;i<s;i++)if(n[i].c==e&&n[i].o==t)return!0}function p(e){var t=[];for(var n in e.partials)t.push('"'+m(n)+'":{name:"'+m(e.partials[n].name)+'", '+p(e.partials[n])+"}");return"partials: {"+t.join(",")+"}, subs: "+function(e){var t=[];for(var n in e)t.push('"'+m(n)+'": function(c,p,t,i) {'+e[n]+"}");return"{ "+t.join(",")+" }"}(e.subs)}e.stringify=function(t,n,i){return"{code: function (c,p,i) { "+e.wrapMain(t.code)+" },"+p(t)+"}"};var g=0;function m(e){return e.replace(r,"\\\\").replace(n,'\\"').replace(i,"\\n").replace(s,"\\r").replace(a,"\\u2028").replace(l,"\\u2029")}function v(e){return~e.indexOf(".")?"d":"f"}function w(e,t){var n="<"+(t.prefix||"")+e.n+g++;return t.partials[n]={name:e.n,partials:{}},t.code+='t.b(t.rp("'+m(n)+'",c,p,"'+(e.indent||"")+'"));',n}function x(e,t){t.code+="t.b(t.t(t."+v(e.n)+'("'+m(e.n)+'",c,p,0)));'}function y(e){return"t.b("+e+");"}e.generate=function(t,n,i){g=0;var s={code:"",subs:{},partials:{}};return e.walk(t,s),i.asString?this.stringify(s,n,i):this.makeTemplate(s,n,i)},e.wrapMain=function(e){return'var t=this;t.b(i=i||"");'+e+"return t.fl();"},e.template=e.Template,e.makeTemplate=function(e,t,n){var i=this.makePartials(e);return i.code=new Function("c","p","i",this.wrapMain(e.code)),new this.template(i,t,this,n)},e.makePartials=function(e){var t,n={subs:{},partials:e.partials,name:e.name};for(t in n.partials)n.partials[t]=this.makePartials(n.partials[t]);for(t in e.subs)n.subs[t]=new Function("c","p","t","i",e.subs[t]);return n},e.codegen={"#":function(t,n){n.code+="if(t.s(t."+v(t.n)+'("'+m(t.n)+'",c,p,1),c,p,0,'+t.i+","+t.end+',"'+t.otag+" "+t.ctag+'")){t.rs(c,p,function(c,p,t){',e.walk(t.nodes,n),n.code+="});c.pop();}"},"^":function(t,n){n.code+="if(!t.s(t."+v(t.n)+'("'+m(t.n)+'",c,p,1),c,p,1,0,0,"")){',e.walk(t.nodes,n),n.code+="};"},">":w,"<":function(t,n){var i={partials:{},code:"",subs:{},inPartial:!0};e.walk(t.nodes,i);var s=n.partials[w(t,n)];s.subs=i.subs,s.partials=i.partials},$:function(t,n){var i={subs:{},code:"",partials:n.partials,prefix:t.n};e.walk(t.nodes,i),n.subs[t.n]=i.code,n.inPartial||(n.code+='t.sub("'+m(t.n)+'",c,p,i);')},"\n":function(e,t){t.code+=y('"\\n"'+(e.last?"":" + i"))},_v:function(e,t){t.code+="t.b(t.v(t."+v(e.n)+'("'+m(e.n)+'",c,p,0)));'},_t:function(e,t){t.code+=y('"'+m(e.text)+'"')},"{":x,"&":x},e.walk=function(t,n){for(var i,s=0,r=t.length;s<r;s++)(i=e.codegen[t[s].tag])&&i(t[s],n);return n},e.parse=function(e,t,n){return f(e,0,[],(n=n||{}).sectionTags||[])},e.cache={},e.cacheKey=function(e,t){return[e,!!t.asString,!!t.disableLambda,t.delimiters,!!t.modelGet].join("||")},e.compile=function(t,n){n=n||{};var i=e.cacheKey(t,n),s=this.cache[i];if(s){var r=s.partials;for(var a in r)delete r[a].instance;return s}return s=this.generate(this.parse(this.scan(t,n.delimiters),t,n),t,n),this.cache[i]=s}}(t)},34714:(e,t,n)=>{var i=n(29110);i.Template=n(59549).Template,i.template=i.Template,e.exports=i},59549:(e,t)=>{!function(e){function t(e,t,n){var i;return t&&"object"==typeof t&&(void 0!==t[e]?i=t[e]:n&&t.get&&"function"==typeof t.get&&(i=t.get(e))),i}e.Template=function(e,t,n,i){e=e||{},this.r=e.code||this.r,this.c=n,this.options=i||{},this.text=t||"",this.partials=e.partials||{},this.subs=e.subs||{},this.buf=""},e.Template.prototype={r:function(e,t,n){return""},v:function(e){return e=o(e),l.test(e)?e.replace(n,"&").replace(i,"<").replace(s,">").replace(r,"'").replace(a,"""):e},t:o,render:function(e,t,n){return this.ri([e],t||{},n)},ri:function(e,t,n){return this.r(e,t,n)},ep:function(e,t){var n=this.partials[e],i=t[n.name];if(n.instance&&n.base==i)return n.instance;if("string"==typeof i){if(!this.c)throw new Error("No compiler available.");i=this.c.compile(i,this.options)}if(!i)return null;if(this.partials[e].base=i,n.subs){for(key in t.stackText||(t.stackText={}),n.subs)t.stackText[key]||(t.stackText[key]=void 0!==this.activeSub&&t.stackText[this.activeSub]?t.stackText[this.activeSub]:this.text);i=function(e,t,n,i,s,r){function a(){}function l(){}var o;a.prototype=e,l.prototype=e.subs;var c=new a;for(o in c.subs=new l,c.subsText={},c.buf="",i=i||{},c.stackSubs=i,c.subsText=r,t)i[o]||(i[o]=t[o]);for(o in i)c.subs[o]=i[o];for(o in s=s||{},c.stackPartials=s,n)s[o]||(s[o]=n[o]);for(o in s)c.partials[o]=s[o];return c}(i,n.subs,n.partials,this.stackSubs,this.stackPartials,t.stackText)}return this.partials[e].instance=i,i},rp:function(e,t,n,i){var s=this.ep(e,n);return s?s.ri(t,n,i):""},rs:function(e,t,n){var i=e[e.length-1];if(c(i))for(var s=0;s<i.length;s++)e.push(i[s]),n(e,t,this),e.pop();else n(e,t,this)},s:function(e,t,n,i,s,r,a){var l;return(!c(e)||0!==e.length)&&("function"==typeof e&&(e=this.ms(e,t,n,i,s,r,a)),l=!!e,!i&&l&&t&&t.push("object"==typeof e?e:t[t.length-1]),l)},d:function(e,n,i,s){var r,a=e.split("."),l=this.f(a[0],n,i,s),o=this.options.modelGet,d=null;if("."===e&&c(n[n.length-2]))l=n[n.length-1];else for(var h=1;h<a.length;h++)void 0!==(r=t(a[h],l,o))?(d=l,l=r):l="";return!(s&&!l)&&(s||"function"!=typeof l||(n.push(d),l=this.mv(l,n,i),n.pop()),l)},f:function(e,n,i,s){for(var r=!1,a=!1,l=this.options.modelGet,o=n.length-1;o>=0;o--)if(void 0!==(r=t(e,n[o],l))){a=!0;break}return a?(s||"function"!=typeof r||(r=this.mv(r,n,i)),r):!s&&""},ls:function(e,t,n,i,s){var r=this.options.delimiters;return this.options.delimiters=s,this.b(this.ct(o(e.call(t,i)),t,n)),this.options.delimiters=r,!1},ct:function(e,t,n){if(this.options.disableLambda)throw new Error("Lambda features disabled.");return this.c.compile(e,this.options).render(t,n)},b:function(e){this.buf+=e},fl:function(){var e=this.buf;return this.buf="",e},ms:function(e,t,n,i,s,r,a){var l,o=t[t.length-1],c=e.call(o);return"function"==typeof c?!!i||(l=this.activeSub&&this.subsText&&this.subsText[this.activeSub]?this.subsText[this.activeSub]:this.text,this.ls(c,o,n,l.substring(s,r),a)):c},mv:function(e,t,n){var i=t[t.length-1],s=e.call(i);return"function"==typeof s?this.ct(o(s.call(i)),i,n):s},sub:function(e,t,n,i){var s=this.subs[e];s&&(this.activeSub=e,s(t,n,this,i),this.activeSub=!1)}};var n=/&/g,i=/</g,s=/>/g,r=/\'/g,a=/\"/g,l=/[&<>\"\']/;function o(e){return String(null==e?"":e)}var c=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)}}(t)}}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";(self.webpackChunksignalpilot_ai_internal=self.webpackChunksignalpilot_ai_internal||[]).push([[220],{24474:(t,r)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.Allow=r.ALL=r.COLLECTION=r.ATOM=r.SPECIAL=r.INF=r._INFINITY=r.INFINITY=r.NAN=r.BOOL=r.NULL=r.OBJ=r.ARR=r.NUM=r.STR=void 0,r.STR=1,r.NUM=2,r.ARR=4,r.OBJ=8,r.NULL=16,r.BOOL=32,r.NAN=64,r.INFINITY=128,r._INFINITY=256,r.INF=r.INFINITY|r._INFINITY,r.SPECIAL=r.NULL|r.BOOL|r.INF|r.NAN,r.ATOM=r.STR|r.NUM|r.SPECIAL,r.COLLECTION=r.ARR|r.OBJ,r.ALL=r.ATOM|r.COLLECTION,r.Allow={STR:r.STR,NUM:r.NUM,ARR:r.ARR,OBJ:r.OBJ,NULL:r.NULL,BOOL:r.BOOL,NAN:r.NAN,INFINITY:r.INFINITY,_INFINITY:r._INFINITY,INF:r.INF,SPECIAL:r.SPECIAL,ATOM:r.ATOM,COLLECTION:r.COLLECTION,ALL:r.ALL},r.default=r.Allow},69220:function(t,r,e){var n=this&&this.__createBinding||(Object.create?function(t,r,e,n){void 0===n&&(n=e);var s=Object.getOwnPropertyDescriptor(r,e);s&&!("get"in s?!r.__esModule:s.writable||s.configurable)||(s={enumerable:!0,get:function(){return r[e]}}),Object.defineProperty(t,n,s)}:function(t,r,e,n){void 0===n&&(n=e),t[n]=r[e]}),s=this&&this.__exportStar||function(t,r){for(var e in t)"default"===e||Object.prototype.hasOwnProperty.call(r,e)||n(r,t,e)};Object.defineProperty(r,"__esModule",{value:!0}),r.Allow=r.MalformedJSON=r.PartialJSON=r.parseJSON=r.parse=void 0;const i=e(24474);Object.defineProperty(r,"Allow",{enumerable:!0,get:function(){return i.Allow}}),s(e(24474),r);class l extends Error{}r.PartialJSON=l;class o extends Error{}function N(t,r=i.Allow.ALL){if("string"!=typeof t)throw new TypeError("expecting str, got "+typeof t);if(!t.trim())throw new Error(`${t} is empty`);return a(t.trim(),r)}r.MalformedJSON=o,r.parseJSON=N;const a=(t,r)=>{const e=t.length;let n=0;const s=t=>{throw new l(`${t} at position ${n}`)},N=t=>{throw new o(`${t} at position ${n}`)},a=()=>(f(),n>=e&&s("Unexpected end of input"),'"'===t[n]?u():"{"===t[n]?O():"["===t[n]?c():"null"===t.substring(n,n+4)||i.Allow.NULL&r&&e-n<4&&"null".startsWith(t.substring(n))?(n+=4,null):"true"===t.substring(n,n+4)||i.Allow.BOOL&r&&e-n<4&&"true".startsWith(t.substring(n))?(n+=4,!0):"false"===t.substring(n,n+5)||i.Allow.BOOL&r&&e-n<5&&"false".startsWith(t.substring(n))?(n+=5,!1):"Infinity"===t.substring(n,n+8)||i.Allow.INFINITY&r&&e-n<8&&"Infinity".startsWith(t.substring(n))?(n+=8,1/0):"-Infinity"===t.substring(n,n+9)||i.Allow._INFINITY&r&&1<e-n&&e-n<9&&"-Infinity".startsWith(t.substring(n))?(n+=9,-1/0):"NaN"===t.substring(n,n+3)||i.Allow.NAN&r&&e-n<3&&"NaN".startsWith(t.substring(n))?(n+=3,NaN):I()),u=()=>{const l=n;let o=!1;for(n++;n<e&&('"'!==t[n]||o&&"\\"===t[n-1]);)o="\\"===t[n]&&!o,n++;if('"'==t.charAt(n))try{return JSON.parse(t.substring(l,++n-Number(o)))}catch(t){N(String(t))}else if(i.Allow.STR&r)try{return JSON.parse(t.substring(l,n-Number(o))+'"')}catch(r){return JSON.parse(t.substring(l,t.lastIndexOf("\\"))+'"')}s("Unterminated string literal")},O=()=>{n++,f();const l={};try{for(;"}"!==t[n];){if(f(),n>=e&&i.Allow.OBJ&r)return l;const s=u();f(),n++;try{const t=a();l[s]=t}catch(t){if(i.Allow.OBJ&r)return l;throw t}f(),","===t[n]&&n++}}catch(t){if(i.Allow.OBJ&r)return l;s("Expected '}' at end of object")}return n++,l},c=()=>{n++;const e=[];try{for(;"]"!==t[n];)e.push(a()),f(),","===t[n]&&n++}catch(t){if(i.Allow.ARR&r)return e;s("Expected ']' at end of array")}return n++,e},I=()=>{if(0===n){"-"===t&&N("Not sure what '-' is");try{return JSON.parse(t)}catch(e){if(i.Allow.NUM&r)try{return JSON.parse(t.substring(0,t.lastIndexOf("e")))}catch(t){}N(String(e))}}const l=n;for("-"===t[n]&&n++;t[n]&&-1===",]}".indexOf(t[n]);)n++;n!=e||i.Allow.NUM&r||s("Unterminated number literal");try{return JSON.parse(t.substring(l,n))}catch(r){"-"===t.substring(l,n)&&s("Not sure what '-' is");try{return JSON.parse(t.substring(l,t.lastIndexOf("e")))}catch(t){N(String(t))}}},f=()=>{for(;n<e&&" \n\r\t".includes(t[n]);)n++};return a()},u=N;r.parse=u}}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";(self.webpackChunksignalpilot_ai_internal=self.webpackChunksignalpilot_ai_internal||[]).push([[262],{78262:(n,t,e)=>{e.r(t),e.d(t,{MAX:()=>r,NIL:()=>o,parse:()=>i,stringify:()=>a,v1:()=>p,v1ToV6:()=>U,v3:()=>_,v4:()=>C,v5:()=>N,v6:()=>j,v6ToV1:()=>O,v7:()=>z,validate:()=>s,version:()=>B});const r="ffffffff-ffff-ffff-ffff-ffffffffffff",o="00000000-0000-0000-0000-000000000000",f=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-8][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/i,s=function(n){return"string"==typeof n&&f.test(n)},i=function(n){if(!s(n))throw TypeError("Invalid UUID");let t;return Uint8Array.of((t=parseInt(n.slice(0,8),16))>>>24,t>>>16&255,t>>>8&255,255&t,(t=parseInt(n.slice(9,13),16))>>>8,255&t,(t=parseInt(n.slice(14,18),16))>>>8,255&t,(t=parseInt(n.slice(19,23),16))>>>8,255&t,(t=parseInt(n.slice(24,36),16))/1099511627776&255,t/4294967296&255,t>>>24&255,t>>>16&255,t>>>8&255,255&t)},c=[];for(let n=0;n<256;++n)c.push((n+256).toString(16).slice(1));function u(n,t=0){return(c[n[t+0]]+c[n[t+1]]+c[n[t+2]]+c[n[t+3]]+"-"+c[n[t+4]]+c[n[t+5]]+"-"+c[n[t+6]]+c[n[t+7]]+"-"+c[n[t+8]]+c[n[t+9]]+"-"+c[n[t+10]]+c[n[t+11]]+c[n[t+12]]+c[n[t+13]]+c[n[t+14]]+c[n[t+15]]).toLowerCase()}const a=function(n,t=0){const e=u(n,t);if(!s(e))throw TypeError("Stringified UUID is invalid");return e};let l;const d=new Uint8Array(16);function g(){if(!l){if("undefined"==typeof crypto||!crypto.getRandomValues)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");l=crypto.getRandomValues.bind(crypto)}return l(d)}const h={};function y(n,t,e,r,o,f,s=0){if(n.length<16)throw new Error("Random bytes length must be >= 16");if(f){if(s<0||s+16>f.length)throw new RangeError(`UUID byte range ${s}:${s+15} is out of buffer bounds`)}else f=new Uint8Array(16),s=0;t??=Date.now(),e??=0,r??=16383&(n[8]<<8|n[9]),o??=n.slice(10,16);const i=(1e4*(268435455&(t+=122192928e5))+e)%4294967296;f[s++]=i>>>24&255,f[s++]=i>>>16&255,f[s++]=i>>>8&255,f[s++]=255&i;const c=t/4294967296*1e4&268435455;f[s++]=c>>>8&255,f[s++]=255&c,f[s++]=c>>>24&15|16,f[s++]=c>>>16&255,f[s++]=r>>>8|128,f[s++]=255&r;for(let n=0;n<6;++n)f[s++]=o[n];return f}const p=function(n,t,e){let r;const o=n?._v6??!1;if(n){const t=Object.keys(n);1===t.length&&"_v6"===t[0]&&(n=void 0)}if(n)r=y(n.random??n.rng?.()??g(),n.msecs,n.nsecs,n.clockseq,n.node,t,e);else{const n=Date.now(),f=g();!function(n,t,e){n.msecs??=-1/0,n.nsecs??=0,t===n.msecs?(n.nsecs++,n.nsecs>=1e4&&(n.node=void 0,n.nsecs=0)):t>n.msecs?n.nsecs=0:t<n.msecs&&(n.node=void 0),n.node||(n.node=e.slice(10,16),n.node[0]|=1,n.clockseq=16383&(e[8]<<8|e[9])),n.msecs=t}(h,n,f),r=y(f,h.msecs,h.nsecs,o?void 0:h.clockseq,o?void 0:h.node,t,e)}return t??u(r)};function U(n){const t=function(n){return Uint8Array.of((15&n[6])<<4|n[7]>>4&15,(15&n[7])<<4|(240&n[4])>>4,(15&n[4])<<4|(240&n[5])>>4,(15&n[5])<<4|(240&n[0])>>4,(15&n[0])<<4|(240&n[1])>>4,(15&n[1])<<4|(240&n[2])>>4,96|15&n[2],n[3],n[8],n[9],n[10],n[11],n[12],n[13],n[14],n[15])}("string"==typeof n?i(n):n);return"string"==typeof n?u(t):t}function w(n){return 14+(n+64>>>9<<4)+1}function m(n,t){const e=(65535&n)+(65535&t);return(n>>16)+(t>>16)+(e>>16)<<16|65535&e}function b(n,t,e,r,o,f){return m((s=m(m(t,n),m(r,f)))<<(i=o)|s>>>32-i,e);var s,i}function v(n,t,e,r,o,f,s){return b(t&e|~t&r,n,t,o,f,s)}function A(n,t,e,r,o,f,s){return b(t&r|e&~r,n,t,o,f,s)}function I(n,t,e,r,o,f,s){return b(t^e^r,n,t,o,f,s)}function D(n,t,e,r,o,f,s){return b(e^(t|~r),n,t,o,f,s)}const R=function(n){return function(n){const t=new Uint8Array(4*n.length);for(let e=0;e<4*n.length;e++)t[e]=n[e>>2]>>>e%4*8&255;return t}(function(n,t){const e=new Uint32Array(w(t)).fill(0);e.set(n),e[t>>5]|=128<<t%32,e[e.length-1]=t,n=e;let r=1732584193,o=-271733879,f=-1732584194,s=271733878;for(let t=0;t<n.length;t+=16){const e=r,i=o,c=f,u=s;r=v(r,o,f,s,n[t],7,-680876936),s=v(s,r,o,f,n[t+1],12,-389564586),f=v(f,s,r,o,n[t+2],17,606105819),o=v(o,f,s,r,n[t+3],22,-1044525330),r=v(r,o,f,s,n[t+4],7,-176418897),s=v(s,r,o,f,n[t+5],12,1200080426),f=v(f,s,r,o,n[t+6],17,-1473231341),o=v(o,f,s,r,n[t+7],22,-45705983),r=v(r,o,f,s,n[t+8],7,1770035416),s=v(s,r,o,f,n[t+9],12,-1958414417),f=v(f,s,r,o,n[t+10],17,-42063),o=v(o,f,s,r,n[t+11],22,-1990404162),r=v(r,o,f,s,n[t+12],7,1804603682),s=v(s,r,o,f,n[t+13],12,-40341101),f=v(f,s,r,o,n[t+14],17,-1502002290),o=v(o,f,s,r,n[t+15],22,1236535329),r=A(r,o,f,s,n[t+1],5,-165796510),s=A(s,r,o,f,n[t+6],9,-1069501632),f=A(f,s,r,o,n[t+11],14,643717713),o=A(o,f,s,r,n[t],20,-373897302),r=A(r,o,f,s,n[t+5],5,-701558691),s=A(s,r,o,f,n[t+10],9,38016083),f=A(f,s,r,o,n[t+15],14,-660478335),o=A(o,f,s,r,n[t+4],20,-405537848),r=A(r,o,f,s,n[t+9],5,568446438),s=A(s,r,o,f,n[t+14],9,-1019803690),f=A(f,s,r,o,n[t+3],14,-187363961),o=A(o,f,s,r,n[t+8],20,1163531501),r=A(r,o,f,s,n[t+13],5,-1444681467),s=A(s,r,o,f,n[t+2],9,-51403784),f=A(f,s,r,o,n[t+7],14,1735328473),o=A(o,f,s,r,n[t+12],20,-1926607734),r=I(r,o,f,s,n[t+5],4,-378558),s=I(s,r,o,f,n[t+8],11,-2022574463),f=I(f,s,r,o,n[t+11],16,1839030562),o=I(o,f,s,r,n[t+14],23,-35309556),r=I(r,o,f,s,n[t+1],4,-1530992060),s=I(s,r,o,f,n[t+4],11,1272893353),f=I(f,s,r,o,n[t+7],16,-155497632),o=I(o,f,s,r,n[t+10],23,-1094730640),r=I(r,o,f,s,n[t+13],4,681279174),s=I(s,r,o,f,n[t],11,-358537222),f=I(f,s,r,o,n[t+3],16,-722521979),o=I(o,f,s,r,n[t+6],23,76029189),r=I(r,o,f,s,n[t+9],4,-640364487),s=I(s,r,o,f,n[t+12],11,-421815835),f=I(f,s,r,o,n[t+15],16,530742520),o=I(o,f,s,r,n[t+2],23,-995338651),r=D(r,o,f,s,n[t],6,-198630844),s=D(s,r,o,f,n[t+7],10,1126891415),f=D(f,s,r,o,n[t+14],15,-1416354905),o=D(o,f,s,r,n[t+5],21,-57434055),r=D(r,o,f,s,n[t+12],6,1700485571),s=D(s,r,o,f,n[t+3],10,-1894986606),f=D(f,s,r,o,n[t+10],15,-1051523),o=D(o,f,s,r,n[t+1],21,-2054922799),r=D(r,o,f,s,n[t+8],6,1873313359),s=D(s,r,o,f,n[t+15],10,-30611744),f=D(f,s,r,o,n[t+6],15,-1560198380),o=D(o,f,s,r,n[t+13],21,1309151649),r=D(r,o,f,s,n[t+4],6,-145523070),s=D(s,r,o,f,n[t+11],10,-1120210379),f=D(f,s,r,o,n[t+2],15,718787259),o=D(o,f,s,r,n[t+9],21,-343485551),r=m(r,e),o=m(o,i),f=m(f,c),s=m(s,u)}return Uint32Array.of(r,o,f,s)}(function(n){if(0===n.length)return new Uint32Array;const t=new Uint32Array(w(8*n.length)).fill(0);for(let e=0;e<n.length;e++)t[e>>2]|=(255&n[e])<<e%4*8;return t}(n),8*n.length))},E="6ba7b810-9dad-11d1-80b4-00c04fd430c8",q="6ba7b811-9dad-11d1-80b4-00c04fd430c8";function k(n,t,e,r,o,f){const s="string"==typeof e?function(n){n=unescape(encodeURIComponent(n));const t=new Uint8Array(n.length);for(let e=0;e<n.length;++e)t[e]=n.charCodeAt(e);return t}(e):e,c="string"==typeof r?i(r):r;if("string"==typeof r&&(r=i(r)),16!==r?.length)throw TypeError("Namespace must be array-like (16 iterable integer values, 0-255)");let a=new Uint8Array(16+s.length);if(a.set(c),a.set(s,c.length),a=t(a),a[6]=15&a[6]|n,a[8]=63&a[8]|128,o){f=f||0;for(let n=0;n<16;++n)o[f+n]=a[n];return o}return u(a)}function $(n,t,e,r){return k(48,R,n,t,e,r)}$.DNS=E,$.URL=q;const _=$,T={randomUUID:"undefined"!=typeof crypto&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)},C=function(n,t,e){if(T.randomUUID&&!t&&!n)return T.randomUUID();const r=(n=n||{}).random??n.rng?.()??g();if(r.length<16)throw new Error("Random bytes length must be >= 16");if(r[6]=15&r[6]|64,r[8]=63&r[8]|128,t){if((e=e||0)<0||e+16>t.length)throw new RangeError(`UUID byte range ${e}:${e+15} is out of buffer bounds`);for(let n=0;n<16;++n)t[e+n]=r[n];return t}return u(r)};function M(n,t,e,r){switch(n){case 0:return t&e^~t&r;case 1:case 3:return t^e^r;case 2:return t&e^t&r^e&r}}function S(n,t){return n<<t|n>>>32-t}const V=function(n){const t=[1518500249,1859775393,2400959708,3395469782],e=[1732584193,4023233417,2562383102,271733878,3285377520],r=new Uint8Array(n.length+1);r.set(n),r[n.length]=128;const o=(n=r).length/4+2,f=Math.ceil(o/16),s=new Array(f);for(let t=0;t<f;++t){const e=new Uint32Array(16);for(let r=0;r<16;++r)e[r]=n[64*t+4*r]<<24|n[64*t+4*r+1]<<16|n[64*t+4*r+2]<<8|n[64*t+4*r+3];s[t]=e}s[f-1][14]=8*(n.length-1)/Math.pow(2,32),s[f-1][14]=Math.floor(s[f-1][14]),s[f-1][15]=8*(n.length-1)&4294967295;for(let n=0;n<f;++n){const r=new Uint32Array(80);for(let t=0;t<16;++t)r[t]=s[n][t];for(let n=16;n<80;++n)r[n]=S(r[n-3]^r[n-8]^r[n-14]^r[n-16],1);let o=e[0],f=e[1],i=e[2],c=e[3],u=e[4];for(let n=0;n<80;++n){const e=Math.floor(n/20),s=S(o,5)+M(e,f,i,c)+u+t[e]+r[n]>>>0;u=c,c=i,i=S(f,30)>>>0,f=o,o=s}e[0]=e[0]+o>>>0,e[1]=e[1]+f>>>0,e[2]=e[2]+i>>>0,e[3]=e[3]+c>>>0,e[4]=e[4]+u>>>0}return Uint8Array.of(e[0]>>24,e[0]>>16,e[0]>>8,e[0],e[1]>>24,e[1]>>16,e[1]>>8,e[1],e[2]>>24,e[2]>>16,e[2]>>8,e[2],e[3]>>24,e[3]>>16,e[3]>>8,e[3],e[4]>>24,e[4]>>16,e[4]>>8,e[4])};function L(n,t,e,r){return k(80,V,n,t,e,r)}L.DNS=E,L.URL=q;const N=L,j=function(n,t,e){n??={},e??=0;let r=p({...n,_v6:!0},new Uint8Array(16));if(r=U(r),t){for(let n=0;n<16;n++)t[e+n]=r[n];return t}return u(r)};function O(n){const t=(e="string"==typeof n?i(n):n,Uint8Array.of((15&e[3])<<4|e[4]>>4&15,(15&e[4])<<4|(240&e[5])>>4,(15&e[5])<<4|15&e[6],e[7],(15&e[1])<<4|(240&e[2])>>4,(15&e[2])<<4|(240&e[3])>>4,16|(240&e[0])>>4,(15&e[0])<<4|(240&e[1])>>4,e[8],e[9],e[10],e[11],e[12],e[13],e[14],e[15]));var e;return"string"==typeof n?u(t):t}const X={};function x(n,t,e,r,o=0){if(n.length<16)throw new Error("Random bytes length must be >= 16");if(r){if(o<0||o+16>r.length)throw new RangeError(`UUID byte range ${o}:${o+15} is out of buffer bounds`)}else r=new Uint8Array(16),o=0;return t??=Date.now(),e??=127*n[6]<<24|n[7]<<16|n[8]<<8|n[9],r[o++]=t/1099511627776&255,r[o++]=t/4294967296&255,r[o++]=t/16777216&255,r[o++]=t/65536&255,r[o++]=t/256&255,r[o++]=255&t,r[o++]=112|e>>>28&15,r[o++]=e>>>20&255,r[o++]=128|e>>>14&63,r[o++]=e>>>6&255,r[o++]=e<<2&255|3&n[10],r[o++]=n[11],r[o++]=n[12],r[o++]=n[13],r[o++]=n[14],r[o++]=n[15],r}const z=function(n,t,e){let r;if(n)r=x(n.random??n.rng?.()??g(),n.msecs,n.seq,t,e);else{const n=Date.now(),o=g();!function(n,t,e){n.msecs??=-1/0,n.seq??=0,t>n.msecs?(n.seq=e[6]<<23|e[7]<<16|e[8]<<8|e[9],n.msecs=t):(n.seq=n.seq+1|0,0===n.seq&&n.msecs++)}(X,n,o),r=x(o,X.msecs,X.seq,t,e)}return t??u(r)},B=function(n){if(!s(n))throw TypeError("Invalid UUID");return parseInt(n.slice(14,15),16)}}}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";(self.webpackChunksignalpilot_ai_internal=self.webpackChunksignalpilot_ai_internal||[]).push([[353],{44353:(e,t,n)=>{n.d(t,{b6:()=>A,cL:()=>L,g_:()=>y,pw:()=>Ie});var r=n(60195),o=n(45024),l=n(72084),i=n(3708);function s(e,t){return({state:n,dispatch:r})=>{if(n.readOnly)return!1;let o=e(t,n);return!!o&&(r(n.update(o)),!0)}}const a=s(m,0),c=s(d,0),f=s((e,t)=>d(e,t,function(e){let t=[];for(let n of e.selection.ranges){let r=e.doc.lineAt(n.from),o=n.to<=r.to?r:e.doc.lineAt(n.to);o.from>r.from&&o.from==n.to&&(o=n.to==r.to+1?r:e.doc.lineAt(n.to-1));let l=t.length-1;l>=0&&t[l].to>r.from?t[l].to=o.to:t.push({from:r.from+/^\s*/.exec(r.text)[0].length,to:o.to})}return t}(t)),0);function u(e,t){let n=e.languageDataAt("commentTokens",t,1);return n.length?n[0]:{}}const h=50;function d(e,t,n=t.selection.ranges){let r=n.map(e=>u(t,e.from).block);if(!r.every(e=>e))return null;let o=n.map((e,n)=>function(e,{open:t,close:n},r,o){let l,i,s=e.sliceDoc(r-h,r),a=e.sliceDoc(o,o+h),c=/\s*$/.exec(s)[0].length,f=/^\s*/.exec(a)[0].length,u=s.length-c;if(s.slice(u-t.length,u)==t&&a.slice(f,f+n.length)==n)return{open:{pos:r-c,margin:c&&1},close:{pos:o+f,margin:f&&1}};o-r<=2*h?l=i=e.sliceDoc(r,o):(l=e.sliceDoc(r,r+h),i=e.sliceDoc(o-h,o));let d=/^\s*/.exec(l)[0].length,m=/\s*$/.exec(i)[0].length,p=i.length-m-n.length;return l.slice(d,d+t.length)==t&&i.slice(p,p+n.length)==n?{open:{pos:r+d+t.length,margin:/\s/.test(l.charAt(d+t.length))?1:0},close:{pos:o-m-n.length,margin:/\s/.test(i.charAt(p-1))?1:0}}:null}(t,r[n],e.from,e.to));if(2!=e&&!o.every(e=>e))return{changes:t.changes(n.map((e,t)=>o[t]?[]:[{from:e.from,insert:r[t].open+" "},{from:e.to,insert:" "+r[t].close}]))};if(1!=e&&o.some(e=>e)){let e=[];for(let t,n=0;n<o.length;n++)if(t=o[n]){let o=r[n],{open:l,close:i}=t;e.push({from:l.pos-o.open.length,to:l.pos+l.margin},{from:i.pos-i.margin,to:i.pos+o.close.length})}return{changes:e}}return null}function m(e,t,n=t.selection.ranges){let r=[],o=-1;for(let{from:e,to:l}of n){let n=r.length,i=1e9,s=u(t,e).line;if(s){for(let n=e;n<=l;){let a=t.doc.lineAt(n);if(a.from>o&&(e==l||l>a.from)){o=a.from;let e=/^\s*/.exec(a.text)[0].length,t=e==a.length,n=a.text.slice(e,e+s.length)==s?e:-1;e<a.text.length&&e<i&&(i=e),r.push({line:a,comment:n,token:s,indent:e,empty:t,single:!1})}n=a.to+1}if(i<1e9)for(let e=n;e<r.length;e++)r[e].indent<r[e].line.text.length&&(r[e].indent=i);r.length==n+1&&(r[n].single=!0)}}if(2!=e&&r.some(e=>e.comment<0&&(!e.empty||e.single))){let e=[];for(let{line:t,token:n,indent:o,empty:l,single:i}of r)!i&&l||e.push({from:t.from+o,insert:n+" "});let n=t.changes(e);return{changes:n,selection:t.selection.map(n,1)}}if(1!=e&&r.some(e=>e.comment>=0)){let e=[];for(let{line:t,comment:n,token:o}of r)if(n>=0){let r=t.from+n,l=r+o.length;" "==t.text[l-t.from]&&l++,e.push({from:r,to:l})}return{changes:e}}return null}const p=r.Annotation.define(),g=r.Annotation.define(),y=r.Facet.define(),k=r.Facet.define({combine:e=>(0,r.combineConfig)(e,{minDepth:100,newGroupDelay:500,joinToEvent:(e,t)=>t},{minDepth:Math.max,newGroupDelay:Math.min,joinToEvent:(e,t)=>(n,r)=>e(n,r)||t(n,r)})}),v=r.StateField.define({create:()=>J.empty,update(e,t){let n=t.state.facet(k),o=t.annotation(p);if(o){let r=C.fromTransaction(t,o.selection),l=o.side,i=0==l?e.undone:e.done;return i=r?M(i,i.length,n.minDepth,r):T(i,t.startState.selection),new J(0==l?o.rest:i,0==l?i:o.rest)}let l=t.annotation(g);if("full"!=l&&"before"!=l||(e=e.isolate()),!1===t.annotation(r.Transaction.addToHistory))return t.changes.empty?e:e.addMapping(t.changes.desc);let i=C.fromTransaction(t),s=t.annotation(r.Transaction.time),a=t.annotation(r.Transaction.userEvent);return i?e=e.addChanges(i,s,a,n,t):t.selection&&(e=e.addSelection(t.startState.selection,s,a,n.newGroupDelay)),"full"!=l&&"after"!=l||(e=e.isolate()),e},toJSON:e=>({done:e.done.map(e=>e.toJSON()),undone:e.undone.map(e=>e.toJSON())}),fromJSON:e=>new J(e.done.map(C.fromJSON),e.undone.map(C.fromJSON))});function A(e={}){return[v,k.of(e),o.EditorView.domEventHandlers({beforeinput(e,t){let n="historyUndo"==e.inputType?w:"historyRedo"==e.inputType?E:null;return!!n&&(e.preventDefault(),n(t))}})]}function S(e,t){return function({state:n,dispatch:r}){if(!t&&n.readOnly)return!1;let o=n.field(v,!1);if(!o)return!1;let l=o.pop(e,n,t);return!!l&&(r(l),!0)}}const w=S(0,!1),E=S(1,!1),D=S(0,!0),x=S(1,!0);class C{constructor(e,t,n,r,o){this.changes=e,this.effects=t,this.mapped=n,this.startSelection=r,this.selectionsAfter=o}setSelAfter(e){return new C(this.changes,this.effects,this.mapped,this.startSelection,e)}toJSON(){var e,t,n;return{changes:null===(e=this.changes)||void 0===e?void 0:e.toJSON(),mapped:null===(t=this.mapped)||void 0===t?void 0:t.toJSON(),startSelection:null===(n=this.startSelection)||void 0===n?void 0:n.toJSON(),selectionsAfter:this.selectionsAfter.map(e=>e.toJSON())}}static fromJSON(e){return new C(e.changes&&r.ChangeSet.fromJSON(e.changes),[],e.mapped&&r.ChangeDesc.fromJSON(e.mapped),e.startSelection&&r.EditorSelection.fromJSON(e.startSelection),e.selectionsAfter.map(r.EditorSelection.fromJSON))}static fromTransaction(e,t){let n=b;for(let t of e.startState.facet(y)){let r=t(e);r.length&&(n=n.concat(r))}return!n.length&&e.changes.empty?null:new C(e.changes.invert(e.startState.doc),n,void 0,t||e.startState.selection,b)}static selection(e){return new C(void 0,b,void 0,void 0,e)}}function M(e,t,n,r){let o=t+1>n+20?t-n-1:0,l=e.slice(o,t);return l.push(r),l}function B(e,t){return e.length?t.length?e.concat(t):e:t}const b=[],O=200;function T(e,t){if(e.length){let n=e[e.length-1],r=n.selectionsAfter.slice(Math.max(0,n.selectionsAfter.length-O));return r.length&&r[r.length-1].eq(t)?e:(r.push(t),M(e,e.length-1,1e9,n.setSelAfter(r)))}return[C.selection([t])]}function I(e){let t=e[e.length-1],n=e.slice();return n[e.length-1]=t.setSelAfter(t.selectionsAfter.slice(0,t.selectionsAfter.length-1)),n}function V(e,t){if(!e.length)return e;let n=e.length,r=b;for(;n;){let o=N(e[n-1],t,r);if(o.changes&&!o.changes.empty||o.effects.length){let t=e.slice(0,n);return t[n-1]=o,t}t=o.mapped,n--,r=o.selectionsAfter}return r.length?[C.selection(r)]:b}function N(e,t,n){let o=B(e.selectionsAfter.length?e.selectionsAfter.map(e=>e.map(t)):b,n);if(!e.changes)return C.selection(o);let l=e.changes.map(t),i=t.mapDesc(e.changes,!0),s=e.mapped?e.mapped.composeDesc(i):i;return new C(l,r.StateEffect.mapEffects(e.effects,t),s,e.startSelection.map(i),o)}const R=/^(input\.type|delete)($|\.)/;class J{constructor(e,t,n=0,r=void 0){this.done=e,this.undone=t,this.prevTime=n,this.prevUserEvent=r}isolate(){return this.prevTime?new J(this.done,this.undone):this}addChanges(e,t,n,o,l){let i=this.done,s=i[i.length-1];return i=s&&s.changes&&!s.changes.empty&&e.changes&&(!n||R.test(n))&&(!s.selectionsAfter.length&&t-this.prevTime<o.newGroupDelay&&o.joinToEvent(l,function(e,t){let n=[],r=!1;return e.iterChangedRanges((e,t)=>n.push(e,t)),t.iterChangedRanges((e,t,o,l)=>{for(let e=0;e<n.length;){let t=n[e++],i=n[e++];l>=t&&o<=i&&(r=!0)}}),r}(s.changes,e.changes))||"input.type.compose"==n)?M(i,i.length-1,o.minDepth,new C(e.changes.compose(s.changes),B(r.StateEffect.mapEffects(e.effects,s.changes),s.effects),s.mapped,s.startSelection,b)):M(i,i.length,o.minDepth,e),new J(i,b,t,n)}addSelection(e,t,n,r){let o=this.done.length?this.done[this.done.length-1].selectionsAfter:b;return o.length>0&&t-this.prevTime<r&&n==this.prevUserEvent&&n&&/^select($|\.)/.test(n)&&(l=o[o.length-1],i=e,l.ranges.length==i.ranges.length&&0===l.ranges.filter((e,t)=>e.empty!=i.ranges[t].empty).length)?this:new J(T(this.done,e),this.undone,t,n);var l,i}addMapping(e){return new J(V(this.done,e),V(this.undone,e),this.prevTime,this.prevUserEvent)}pop(e,t,n){let r=0==e?this.done:this.undone;if(0==r.length)return null;let o=r[r.length-1],l=o.selectionsAfter[0]||t.selection;if(n&&o.selectionsAfter.length)return t.update({selection:o.selectionsAfter[o.selectionsAfter.length-1],annotations:p.of({side:e,rest:I(r),selection:l}),userEvent:0==e?"select.undo":"select.redo",scrollIntoView:!0});if(o.changes){let n=1==r.length?b:r.slice(0,r.length-1);return o.mapped&&(n=V(n,o.mapped)),t.update({changes:o.changes,selection:o.startSelection,effects:o.effects,annotations:p.of({side:e,rest:n,selection:l}),filter:!1,userEvent:0==e?"undo":"redo",scrollIntoView:!0})}return null}}J.empty=new J(b,b);const L=[{key:"Mod-z",run:w,preventDefault:!0},{key:"Mod-y",mac:"Mod-Shift-z",run:E,preventDefault:!0},{linux:"Ctrl-Shift-z",run:E,preventDefault:!0},{key:"Mod-u",run:D,preventDefault:!0},{key:"Alt-u",mac:"Mod-Shift-u",run:x,preventDefault:!0}];function U(e,t){return r.EditorSelection.create(e.ranges.map(t),e.mainIndex)}function H(e,t){return e.update({selection:t,scrollIntoView:!0,userEvent:"select"})}function P({state:e,dispatch:t},n){let r=U(e.selection,n);return!r.eq(e.selection,!0)&&(t(H(e,r)),!0)}function z(e,t){return r.EditorSelection.cursor(t?e.to:e.from)}function G(e,t){return P(e,n=>n.empty?e.moveByChar(n,t):z(n,t))}function q(e){return e.textDirectionAt(e.state.selection.main.head)==o.Direction.LTR}const _=e=>G(e,!q(e)),j=e=>G(e,q(e));function F(e,t){return P(e,n=>n.empty?e.moveByGroup(n,t):z(n,t))}function $(e,t,n){if(t.type.prop(n))return!0;let r=t.to-t.from;return r&&(r>2||/[^\s,.;:]/.test(e.sliceDoc(t.from,t.to)))||t.firstChild}function W(e,t,n){let o,s,a=(0,l.syntaxTree)(e).resolveInner(t.head),c=n?i.NodeProp.closedBy:i.NodeProp.openedBy;for(let r=t.head;;){let t=n?a.childAfter(r):a.childBefore(r);if(!t)break;$(e,t,c)?a=t:r=n?t.to:t.from}return s=a.type.prop(c)&&(o=n?(0,l.matchBrackets)(e,a.from,1):(0,l.matchBrackets)(e,a.to,-1))&&o.matched?n?o.end.to:o.end.from:n?a.to:a.from,r.EditorSelection.cursor(s,n?-1:1)}function K(e,t){return P(e,n=>{if(!n.empty)return z(n,t);let r=e.moveVertically(n,t);return r.head!=n.head?r:e.moveToLineBoundary(n,t)})}"undefined"!=typeof Intl&&Intl.Segmenter;const Q=e=>K(e,!1),X=e=>K(e,!0);function Y(e){let t,n=e.scrollDOM.clientHeight<e.scrollDOM.scrollHeight-2,r=0,l=0;if(n){for(let t of e.state.facet(o.EditorView.scrollMargins)){let n=t(e);(null==n?void 0:n.top)&&(r=Math.max(null==n?void 0:n.top,r)),(null==n?void 0:n.bottom)&&(l=Math.max(null==n?void 0:n.bottom,l))}t=e.scrollDOM.clientHeight-r-l}else t=(e.dom.ownerDocument.defaultView||window).innerHeight;return{marginTop:r,marginBottom:l,selfScroll:n,height:Math.max(e.defaultLineHeight,t-5)}}function Z(e,t){let n,r=Y(e),{state:l}=e,i=U(l.selection,n=>n.empty?e.moveVertically(n,t,r.height):z(n,t));if(i.eq(l.selection))return!1;if(r.selfScroll){let t=e.coordsAtPos(l.selection.main.head),s=e.scrollDOM.getBoundingClientRect(),a=s.top+r.marginTop,c=s.bottom-r.marginBottom;t&&t.top>a&&t.bottom<c&&(n=o.EditorView.scrollIntoView(i.main.head,{y:"start",yMargin:t.top-a}))}return e.dispatch(H(l,i),{effects:n}),!0}const ee=e=>Z(e,!1),te=e=>Z(e,!0);function ne(e,t,n){let o=e.lineBlockAt(t.head),l=e.moveToLineBoundary(t,n);if(l.head==t.head&&l.head!=(n?o.to:o.from)&&(l=e.moveToLineBoundary(t,n,!1)),!n&&l.head==o.from&&o.length){let n=/^\s*/.exec(e.state.sliceDoc(o.from,Math.min(o.from+100,o.to)))[0].length;n&&t.head!=o.from+n&&(l=r.EditorSelection.cursor(o.from+n))}return l}function re(e,t){let n=U(e.state.selection,e=>{let n=t(e);return r.EditorSelection.range(e.anchor,n.head,n.goalColumn,n.bidiLevel||void 0)});return!n.eq(e.state.selection)&&(e.dispatch(H(e.state,n)),!0)}function oe(e,t){return re(e,n=>e.moveByChar(n,t))}const le=e=>oe(e,!q(e)),ie=e=>oe(e,q(e));function se(e,t){return re(e,n=>e.moveByGroup(n,t))}function ae(e,t){return re(e,n=>e.moveVertically(n,t))}const ce=e=>ae(e,!1),fe=e=>ae(e,!0);function ue(e,t){return re(e,n=>e.moveVertically(n,t,Y(e).height))}const he=e=>ue(e,!1),de=e=>ue(e,!0),me=({state:e,dispatch:t})=>(t(H(e,{anchor:0})),!0),pe=({state:e,dispatch:t})=>(t(H(e,{anchor:e.doc.length})),!0),ge=({state:e,dispatch:t})=>(t(H(e,{anchor:e.selection.main.anchor,head:0})),!0),ye=({state:e,dispatch:t})=>(t(H(e,{anchor:e.selection.main.anchor,head:e.doc.length})),!0);function ke(e,t){let{state:n}=e,o=n.selection,l=n.selection.ranges.slice();for(let r of n.selection.ranges){let o=n.doc.lineAt(r.head);if(t?o.to<e.state.doc.length:o.from>0)for(let n=r;;){let r=e.moveVertically(n,t);if(r.head<o.from||r.head>o.to){l.some(e=>e.head==r.head)||l.push(r);break}if(r.head==n.head)break;n=r}}return l.length!=o.ranges.length&&(e.dispatch(H(n,r.EditorSelection.create(l,l.length-1))),!0)}function ve(e,t){if(e.state.readOnly)return!1;let n="delete.selection",{state:l}=e,i=l.changeByRange(o=>{let{from:l,to:i}=o;if(l==i){let r=t(o);r<l?(n="delete.backward",r=Ae(e,r,!1)):r>l&&(n="delete.forward",r=Ae(e,r,!0)),l=Math.min(l,r),i=Math.max(i,r)}else l=Ae(e,l,!1),i=Ae(e,i,!0);return l==i?{range:o}:{changes:{from:l,to:i},range:r.EditorSelection.cursor(l,l<o.head?-1:1)}});return!i.changes.empty&&(e.dispatch(l.update(i,{scrollIntoView:!0,userEvent:n,effects:"delete.selection"==n?o.EditorView.announce.of(l.phrase("Selection deleted")):void 0})),!0)}function Ae(e,t,n){if(e instanceof o.EditorView)for(let r of e.state.facet(o.EditorView.atomicRanges).map(t=>t(e)))r.between(t,t,(e,r)=>{e<t&&r>t&&(t=n?r:e)});return t}const Se=(e,t,n)=>ve(e,o=>{let i,s,a=o.from,{state:c}=e,f=c.doc.lineAt(a);if(n&&!t&&a>f.from&&a<f.from+200&&!/[^ \t]/.test(i=f.text.slice(0,a-f.from))){if("\t"==i[i.length-1])return a-1;let e=(0,r.countColumn)(i,c.tabSize)%(0,l.getIndentUnit)(c)||(0,l.getIndentUnit)(c);for(let t=0;t<e&&" "==i[i.length-1-t];t++)a--;s=a}else s=(0,r.findClusterBreak)(f.text,a-f.from,t,t)+f.from,s==a&&f.number!=(t?c.doc.lines:1)?s+=t?1:-1:!t&&/[\ufe00-\ufe0f]/.test(f.text.slice(s-f.from,a-f.from))&&(s=(0,r.findClusterBreak)(f.text,s-f.from,!1,!1)+f.from);return s}),we=e=>Se(e,!1,!0),Ee=e=>Se(e,!0,!1),De=(e,t)=>ve(e,n=>{let o=n.head,{state:l}=e,i=l.doc.lineAt(o),s=l.charCategorizer(o);for(let e=null;;){if(o==(t?i.to:i.from)){o==n.head&&i.number!=(t?l.doc.lines:1)&&(o+=t?1:-1);break}let a=(0,r.findClusterBreak)(i.text,o-i.from,t)+i.from,c=i.text.slice(Math.min(o,a)-i.from,Math.max(o,a)-i.from),f=s(c);if(null!=e&&f!=e)break;" "==c&&o==n.head||(e=f),o=a}return o}),xe=e=>De(e,!1);function Ce(e){let t=[],n=-1;for(let r of e.selection.ranges){let o=e.doc.lineAt(r.from),l=e.doc.lineAt(r.to);if(r.empty||r.to!=l.from||(l=e.doc.lineAt(r.to-1)),n>=o.number){let e=t[t.length-1];e.to=l.to,e.ranges.push(r)}else t.push({from:o.from,to:l.to,ranges:[r]});n=l.number+1}return t}function Me(e,t,n){if(e.readOnly)return!1;let o=[],l=[];for(let t of Ce(e)){if(n?t.to==e.doc.length:0==t.from)continue;let i=e.doc.lineAt(n?t.to+1:t.from-1),s=i.length+1;if(n){o.push({from:t.to,to:i.to},{from:t.from,insert:i.text+e.lineBreak});for(let n of t.ranges)l.push(r.EditorSelection.range(Math.min(e.doc.length,n.anchor+s),Math.min(e.doc.length,n.head+s)))}else{o.push({from:i.from,to:t.from},{from:t.to,insert:e.lineBreak+i.text});for(let e of t.ranges)l.push(r.EditorSelection.range(e.anchor-s,e.head-s))}}return!!o.length&&(t(e.update({changes:o,scrollIntoView:!0,selection:r.EditorSelection.create(l,e.selection.mainIndex),userEvent:"move.line"})),!0)}function Be(e,t,n){if(e.readOnly)return!1;let r=[];for(let t of Ce(e))n?r.push({from:t.from,insert:e.doc.slice(t.from,t.to)+e.lineBreak}):r.push({from:t.to,insert:e.lineBreak+e.doc.slice(t.from,t.to)});return t(e.update({changes:r,scrollIntoView:!0,userEvent:"input.copyline"})),!0}const be=Oe(!1);function Oe(e){return({state:t,dispatch:n})=>{if(t.readOnly)return!1;let o=t.changeByRange(n=>{let{from:o,to:s}=n,a=t.doc.lineAt(o),c=!e&&o==s&&function(e,t){if(/\(\)|\[\]|\{\}/.test(e.sliceDoc(t-1,t+1)))return{from:t,to:t};let n,r=(0,l.syntaxTree)(e).resolveInner(t),o=r.childBefore(t),s=r.childAfter(t);return o&&s&&o.to<=t&&s.from>=t&&(n=o.type.prop(i.NodeProp.closedBy))&&n.indexOf(s.name)>-1&&e.doc.lineAt(o.to).from==e.doc.lineAt(s.from).from&&!/\S/.test(e.sliceDoc(o.to,s.from))?{from:o.to,to:s.from}:null}(t,o);e&&(o=s=(s<=a.to?a:t.doc.lineAt(s)).to);let f=new l.IndentContext(t,{simulateBreak:o,simulateDoubleBreak:!!c}),u=(0,l.getIndentation)(f,o);for(null==u&&(u=(0,r.countColumn)(/^\s*/.exec(t.doc.lineAt(o).text)[0],t.tabSize));s<a.to&&/\s/.test(a.text[s-a.from]);)s++;c?({from:o,to:s}=c):o>a.from&&o<a.from+100&&!/\S/.test(a.text.slice(0,o))&&(o=a.from);let h=["",(0,l.indentString)(t,u)];return c&&h.push((0,l.indentString)(t,f.lineIndent(a.from,-1))),{changes:{from:o,to:s,insert:r.Text.of(h)},range:r.EditorSelection.cursor(o+1+h[1].length)}});return n(t.update(o,{scrollIntoView:!0,userEvent:"input"})),!0}}function Te(e,t){let n=-1;return e.changeByRange(o=>{let l=[];for(let r=o.from;r<=o.to;){let i=e.doc.lineAt(r);i.number>n&&(o.empty||o.to>i.from)&&(t(i,l,o),n=i.number),r=i.to+1}let i=e.changes(l);return{changes:l,range:r.EditorSelection.range(i.mapPos(o.anchor,1),i.mapPos(o.head,1))}})}const Ie=[{key:"Alt-ArrowLeft",mac:"Ctrl-ArrowLeft",run:e=>P(e,t=>W(e.state,t,!q(e))),shift:e=>re(e,t=>W(e.state,t,!q(e)))},{key:"Alt-ArrowRight",mac:"Ctrl-ArrowRight",run:e=>P(e,t=>W(e.state,t,q(e))),shift:e=>re(e,t=>W(e.state,t,q(e)))},{key:"Alt-ArrowUp",run:({state:e,dispatch:t})=>Me(e,t,!1)},{key:"Shift-Alt-ArrowUp",run:({state:e,dispatch:t})=>Be(e,t,!1)},{key:"Alt-ArrowDown",run:({state:e,dispatch:t})=>Me(e,t,!0)},{key:"Shift-Alt-ArrowDown",run:({state:e,dispatch:t})=>Be(e,t,!0)},{key:"Mod-Alt-ArrowUp",run:e=>ke(e,!1)},{key:"Mod-Alt-ArrowDown",run:e=>ke(e,!0)},{key:"Escape",run:({state:e,dispatch:t})=>{let n=e.selection,o=null;return n.ranges.length>1?o=r.EditorSelection.create([n.main]):n.main.empty||(o=r.EditorSelection.create([r.EditorSelection.cursor(n.main.head)])),!!o&&(t(H(e,o)),!0)}},{key:"Mod-Enter",run:Oe(!0)},{key:"Alt-l",mac:"Ctrl-l",run:({state:e,dispatch:t})=>{let n=Ce(e).map(({from:t,to:n})=>r.EditorSelection.range(t,Math.min(n+1,e.doc.length)));return t(e.update({selection:r.EditorSelection.create(n),userEvent:"select"})),!0}},{key:"Mod-i",run:({state:e,dispatch:t})=>{let n=U(e.selection,t=>{let n=(0,l.syntaxTree)(e),o=n.resolveStack(t.from,1);if(t.empty){let e=n.resolveStack(t.from,-1);e.node.from>=o.node.from&&e.node.to<=o.node.to&&(o=e)}for(let e=o;e;e=e.next){let{node:n}=e;if((n.from<t.from&&n.to>=t.to||n.to>t.to&&n.from<=t.from)&&e.next)return r.EditorSelection.range(n.to,n.from)}return t});return!n.eq(e.selection)&&(t(H(e,n)),!0)},preventDefault:!0},{key:"Mod-[",run:({state:e,dispatch:t})=>!e.readOnly&&(t(e.update(Te(e,(t,n)=>{let o=/^\s*/.exec(t.text)[0];if(!o)return;let i=(0,r.countColumn)(o,e.tabSize),s=0,a=(0,l.indentString)(e,Math.max(0,i-(0,l.getIndentUnit)(e)));for(;s<o.length&&s<a.length&&o.charCodeAt(s)==a.charCodeAt(s);)s++;n.push({from:t.from+s,to:t.from+o.length,insert:a.slice(s)})}),{userEvent:"delete.dedent"})),!0)},{key:"Mod-]",run:({state:e,dispatch:t})=>!e.readOnly&&(t(e.update(Te(e,(t,n)=>{n.push({from:t.from,insert:e.facet(l.indentUnit)})}),{userEvent:"input.indent"})),!0)},{key:"Mod-Alt-\\",run:({state:e,dispatch:t})=>{if(e.readOnly)return!1;let n=Object.create(null),r=new l.IndentContext(e,{overrideIndentation:e=>{let t=n[e];return null==t?-1:t}}),o=Te(e,(t,o,i)=>{let s=(0,l.getIndentation)(r,t.from);if(null==s)return;/\S/.test(t.text)||(s=0);let a=/^\s*/.exec(t.text)[0],c=(0,l.indentString)(e,s);(a!=c||i.from<t.from+a.length)&&(n[t.from]=s,o.push({from:t.from,to:t.from+a.length,insert:c}))});return o.changes.empty||t(e.update(o,{userEvent:"indent"})),!0}},{key:"Shift-Mod-k",run:e=>{if(e.state.readOnly)return!1;let{state:t}=e,n=t.changes(Ce(t).map(({from:e,to:n})=>(e>0?e--:n<t.doc.length&&n++,{from:e,to:n}))),r=U(t.selection,t=>{let n;if(e.lineWrapping){let r=e.lineBlockAt(t.head),o=e.coordsAtPos(t.head,t.assoc||1);o&&(n=r.bottom+e.documentTop-o.bottom+e.defaultLineHeight/2)}return e.moveVertically(t,!0,n)}).map(n);return e.dispatch({changes:n,selection:r,scrollIntoView:!0,userEvent:"delete.line"}),!0}},{key:"Shift-Mod-\\",run:({state:e,dispatch:t})=>function(e,t,n){let o=!1,i=U(e.selection,t=>{let i=(0,l.matchBrackets)(e,t.head,-1)||(0,l.matchBrackets)(e,t.head,1)||t.head>0&&(0,l.matchBrackets)(e,t.head-1,1)||t.head<e.doc.length&&(0,l.matchBrackets)(e,t.head+1,-1);if(!i||!i.end)return t;o=!0;let s=i.start.from==t.head?i.end.to:i.end.from;return n?r.EditorSelection.range(t.anchor,s):r.EditorSelection.cursor(s)});return!!o&&(t(H(e,i)),!0)}(e,t,!1)},{key:"Mod-/",run:e=>{let{state:t}=e,n=t.doc.lineAt(t.selection.main.from),r=u(e.state,n.from);return r.line?a(e):!!r.block&&f(e)}},{key:"Alt-A",run:c},{key:"Ctrl-m",mac:"Shift-Alt-m",run:e=>(e.setTabFocusMode(),!0)}].concat([{key:"ArrowLeft",run:_,shift:le,preventDefault:!0},{key:"Mod-ArrowLeft",mac:"Alt-ArrowLeft",run:e=>F(e,!q(e)),shift:e=>se(e,!q(e)),preventDefault:!0},{mac:"Cmd-ArrowLeft",run:e=>P(e,t=>ne(e,t,!q(e))),shift:e=>re(e,t=>ne(e,t,!q(e))),preventDefault:!0},{key:"ArrowRight",run:j,shift:ie,preventDefault:!0},{key:"Mod-ArrowRight",mac:"Alt-ArrowRight",run:e=>F(e,q(e)),shift:e=>se(e,q(e)),preventDefault:!0},{mac:"Cmd-ArrowRight",run:e=>P(e,t=>ne(e,t,q(e))),shift:e=>re(e,t=>ne(e,t,q(e))),preventDefault:!0},{key:"ArrowUp",run:Q,shift:ce,preventDefault:!0},{mac:"Cmd-ArrowUp",run:me,shift:ge},{mac:"Ctrl-ArrowUp",run:ee,shift:he},{key:"ArrowDown",run:X,shift:fe,preventDefault:!0},{mac:"Cmd-ArrowDown",run:pe,shift:ye},{mac:"Ctrl-ArrowDown",run:te,shift:de},{key:"PageUp",run:ee,shift:he},{key:"PageDown",run:te,shift:de},{key:"Home",run:e=>P(e,t=>ne(e,t,!1)),shift:e=>re(e,t=>ne(e,t,!1)),preventDefault:!0},{key:"Mod-Home",run:me,shift:ge},{key:"End",run:e=>P(e,t=>ne(e,t,!0)),shift:e=>re(e,t=>ne(e,t,!0)),preventDefault:!0},{key:"Mod-End",run:pe,shift:ye},{key:"Enter",run:be,shift:be},{key:"Mod-a",run:({state:e,dispatch:t})=>(t(e.update({selection:{anchor:0,head:e.doc.length},userEvent:"select"})),!0)},{key:"Backspace",run:we,shift:we,preventDefault:!0},{key:"Delete",run:Ee,preventDefault:!0},{key:"Mod-Backspace",mac:"Alt-Backspace",run:xe,preventDefault:!0},{key:"Mod-Delete",mac:"Alt-Delete",run:e=>De(e,!0),preventDefault:!0},{mac:"Mod-Backspace",run:e=>ve(e,t=>{let n=e.moveToLineBoundary(t,!1).head;return t.head>n?n:Math.max(0,t.head-1)}),preventDefault:!0},{mac:"Mod-Delete",run:e=>ve(e,t=>{let n=e.moveToLineBoundary(t,!0).head;return t.head<n?n:Math.min(e.state.doc.length,t.head+1)}),preventDefault:!0}].concat([{key:"Ctrl-b",run:_,shift:le,preventDefault:!0},{key:"Ctrl-f",run:j,shift:ie},{key:"Ctrl-p",run:Q,shift:ce},{key:"Ctrl-n",run:X,shift:fe},{key:"Ctrl-a",run:e=>P(e,t=>r.EditorSelection.cursor(e.lineBlockAt(t.head).from,1)),shift:e=>re(e,t=>r.EditorSelection.cursor(e.lineBlockAt(t.head).from))},{key:"Ctrl-e",run:e=>P(e,t=>r.EditorSelection.cursor(e.lineBlockAt(t.head).to,-1)),shift:e=>re(e,t=>r.EditorSelection.cursor(e.lineBlockAt(t.head).to))},{key:"Ctrl-d",run:Ee},{key:"Ctrl-h",run:we},{key:"Ctrl-k",run:e=>ve(e,t=>{let n=e.lineBlockAt(t.head).to;return t.head<n?n:Math.min(e.state.doc.length,t.head+1)})},{key:"Ctrl-Alt-h",run:xe},{key:"Ctrl-o",run:({state:e,dispatch:t})=>{if(e.readOnly)return!1;let n=e.changeByRange(e=>({changes:{from:e.from,to:e.to,insert:r.Text.of(["",""])},range:r.EditorSelection.cursor(e.from)}));return t(e.update(n,{scrollIntoView:!0,userEvent:"input"})),!0}},{key:"Ctrl-t",run:({state:e,dispatch:t})=>{if(e.readOnly)return!1;let n=e.changeByRange(t=>{if(!t.empty||0==t.from||t.from==e.doc.length)return{range:t};let n=t.from,o=e.doc.lineAt(n),l=n==o.from?n-1:(0,r.findClusterBreak)(o.text,n-o.from,!1)+o.from,i=n==o.to?n+1:(0,r.findClusterBreak)(o.text,n-o.from,!0)+o.from;return{changes:{from:l,to:i,insert:e.doc.slice(n,i).append(e.doc.slice(l,n))},range:r.EditorSelection.cursor(i)}});return!n.changes.empty&&(t(e.update(n,{scrollIntoView:!0,userEvent:"move.character"})),!0)}},{key:"Ctrl-v",run:te}].map(e=>({mac:e.key,run:e.run,shift:e.shift}))))}}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";(self.webpackChunksignalpilot_ai_internal=self.webpackChunksignalpilot_ai_internal||[]).push([[364],{54364:(e,t,n)=>{function s(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}n.r(t),n.d(t,{Hooks:()=>pe,Lexer:()=>oe,Marked:()=>ue,Parser:()=>he,Renderer:()=>ae,TextRenderer:()=>ce,Tokenizer:()=>le,defaults:()=>r,getDefaults:()=>s,lexer:()=>$e,marked:()=>ke,options:()=>de,parse:()=>me,parseInline:()=>we,parser:()=>ye,setOptions:()=>fe,use:()=>xe,walkTokens:()=>be});var r={async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null};function i(e){r=e}var l={exec:()=>null};function o(e,t=""){let n="string"==typeof e?e:e.source;const s={replace:(e,t)=>{let r="string"==typeof t?t:t.source;return r=r.replace(a.caret,"$1"),n=n.replace(e,r),s},getRegex:()=>new RegExp(n,t)};return s}var a={codeRemoveIndent:/^(?: {1,4}| {0,3}\t)/gm,outputLinkReplace:/\\([\[\]])/g,indentCodeCompensation:/^(\s+)(?:```)/,beginningSpace:/^\s+/,endingHash:/#$/,startingSpaceChar:/^ /,endingSpaceChar:/ $/,nonSpaceChar:/[^ ]/,newLineCharGlobal:/\n/g,tabCharGlobal:/\t/g,multipleSpaceGlobal:/\s+/g,blankLine:/^[ \t]*$/,doubleBlankLine:/\n[ \t]*\n[ \t]*$/,blockquoteStart:/^ {0,3}>/,blockquoteSetextReplace:/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,blockquoteSetextReplace2:/^ {0,3}>[ \t]?/gm,listReplaceTabs:/^\t+/,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\[[ xX]\] /,listReplaceTask:/^\[[ xX]\] +/,anyLine:/\n.*\n/,hrefBrackets:/^<(.*)>$/,tableDelimiter:/[:|]/,tableAlignChars:/^\||\| *$/g,tableRowBlankLine:/\n[ \t]*$/,tableAlignRight:/^ *-+: *$/,tableAlignCenter:/^ *:-+: *$/,tableAlignLeft:/^ *:-+ *$/,startATag:/^<a /i,endATag:/^<\/a>/i,startPreScriptTag:/^<(pre|code|kbd|script)(\s|>)/i,endPreScriptTag:/^<\/(pre|code|kbd|script)(\s|>)/i,startAngleBracket:/^</,endAngleBracket:/>$/,pedanticHrefTitle:/^([^'"]*[^\s])\s+(['"])(.*)\2/,unicodeAlphaNumeric:/[\p{L}\p{N}]/u,escapeTest:/[&<>"']/,escapeReplace:/[&<>"']/g,escapeTestNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,escapeReplaceNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,unescapeTest:/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/gi,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:e=>new RegExp(`^( {0,3}${e})((?:[\t ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ \t][^\\n]*)?(?:\\n|$))`),hrRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),fencesBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}(?:\`\`\`|~~~)`),headingBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}#`),htmlBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}<(?:[a-z].*>|!--)`,"i")},c=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,h=/(?:[*+-]|\d{1,9}[.)])/,p=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,u=o(p).replace(/bull/g,h).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/\|table/g,"").getRegex(),g=o(p).replace(/bull/g,h).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/table/g,/ {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(),k=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,d=/(?!\s*\])(?:\\.|[^\[\]\\])+/,f=o(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",d).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),x=o(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,h).getRegex(),b="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",w=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,m=o("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ \t]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ \t]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ \t]*)+\\n|$))","i").replace("comment",w).replace("tag",b).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),y=o(k).replace("hr",c).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",b).getRegex(),$={blockquote:o(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",y).getRegex(),code:/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,def:f,fences:/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,heading:/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,hr:c,html:m,lheading:u,list:x,newline:/^(?:[ \t]*(?:\n|$))+/,paragraph:y,table:l,text:/^[^\n]+/},R=o("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",c).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code","(?: {4}| {0,3}\t)[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",b).getRegex(),S={...$,lheading:g,table:R,paragraph:o(k).replace("hr",c).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",R).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",b).getRegex()},T={...$,html:o("^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:\"[^\"]*\"|'[^']*'|\\s[^'\"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))").replace("comment",w).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:l,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:o(k).replace("hr",c).replace("heading"," *#{1,6} *[^\n]").replace("lheading",u).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},z=/^( {2,}|\\)\n(?!\s*$)/,A=/[\p{P}\p{S}]/u,_=/[\s\p{P}\p{S}]/u,P=/[^\s\p{P}\p{S}]/u,I=o(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,_).getRegex(),L=/(?!~)[\p{P}\p{S}]/u,C=/^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/,B=o(C,"u").replace(/punct/g,A).getRegex(),q=o(C,"u").replace(/punct/g,L).getRegex(),E="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",v=o(E,"gu").replace(/notPunctSpace/g,P).replace(/punctSpace/g,_).replace(/punct/g,A).getRegex(),Z=o(E,"gu").replace(/notPunctSpace/g,/(?:[^\s\p{P}\p{S}]|~)/u).replace(/punctSpace/g,/(?!~)[\s\p{P}\p{S}]/u).replace(/punct/g,L).getRegex(),D=o("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,P).replace(/punctSpace/g,_).replace(/punct/g,A).getRegex(),M=o(/\\(punct)/,"gu").replace(/punct/g,A).getRegex(),O=o(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme",/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email",/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(),Q=o(w).replace("(?:--\x3e|$)","--\x3e").getRegex(),N=o("^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>").replace("comment",Q).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),j=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,G=o(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]*(?:\n[ \t]*)?)(title))?\s*\)/).replace("label",j).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),H=o(/^!?\[(label)\]\[(ref)\]/).replace("label",j).replace("ref",d).getRegex(),X=o(/^!?\[(ref)\](?:\[\])?/).replace("ref",d).getRegex(),F={_backpedal:l,anyPunctuation:M,autolink:O,blockSkip:/\[[^[\]]*?\]\((?:\\.|[^\\\(\)]|\((?:\\.|[^\\\(\)])*\))*\)|`[^`]*?`|<[^<>]*?>/g,br:z,code:/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,del:l,emStrongLDelim:B,emStrongRDelimAst:v,emStrongRDelimUnd:D,escape:/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,link:G,nolink:X,punctuation:I,reflink:H,reflinkSearch:o("reflink|nolink(?!\\()","g").replace("reflink",H).replace("nolink",X).getRegex(),tag:N,text:/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,url:l},U={...F,link:o(/^!?\[(label)\]\((.*?)\)/).replace("label",j).getRegex(),reflink:o(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",j).getRegex()},J={...F,emStrongRDelimAst:Z,emStrongLDelim:q,url:o(/^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/,"i").replace("email",/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(),_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])((?:\\.|[^\\])*?(?:\\.|[^\s~\\]))\1(?=[^~]|$)/,text:/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|https?:\/\/|ftp:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/},K={...J,br:o(z).replace("{2,}","*").getRegex(),text:o(J.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},V={normal:$,gfm:S,pedantic:T},W={normal:F,gfm:J,breaks:K,pedantic:U},Y={"&":"&","<":"<",">":">",'"':""","'":"'"},ee=e=>Y[e];function te(e,t){if(t){if(a.escapeTest.test(e))return e.replace(a.escapeReplace,ee)}else if(a.escapeTestNoEncode.test(e))return e.replace(a.escapeReplaceNoEncode,ee);return e}function ne(e){try{e=encodeURI(e).replace(a.percentDecode,"%")}catch{return null}return e}function se(e,t){const n=e.replace(a.findPipe,(e,t,n)=>{let s=!1,r=t;for(;--r>=0&&"\\"===n[r];)s=!s;return s?"|":" |"}).split(a.splitPipe);let s=0;if(n[0].trim()||n.shift(),n.length>0&&!n.at(-1)?.trim()&&n.pop(),t)if(n.length>t)n.splice(t);else for(;n.length<t;)n.push("");for(;s<n.length;s++)n[s]=n[s].trim().replace(a.slashPipe,"|");return n}function re(e,t,n){const s=e.length;if(0===s)return"";let r=0;for(;r<s;){const i=e.charAt(s-r-1);if(i!==t||n){if(i===t||!n)break;r++}else r++}return e.slice(0,s-r)}function ie(e,t,n,s,r){const i=t.href,l=t.title||null,o=e[1].replace(r.other.outputLinkReplace,"$1");s.state.inLink=!0;const a={type:"!"===e[0].charAt(0)?"image":"link",raw:n,href:i,title:l,text:o,tokens:s.inlineTokens(o)};return s.state.inLink=!1,a}var le=class{options;rules;lexer;constructor(e){this.options=e||r}space(e){const t=this.rules.block.newline.exec(e);if(t&&t[0].length>0)return{type:"space",raw:t[0]}}code(e){const t=this.rules.block.code.exec(e);if(t){const e=t[0].replace(this.rules.other.codeRemoveIndent,"");return{type:"code",raw:t[0],codeBlockStyle:"indented",text:this.options.pedantic?e:re(e,"\n")}}}fences(e){const t=this.rules.block.fences.exec(e);if(t){const e=t[0],n=function(e,t,n){const s=e.match(n.other.indentCodeCompensation);if(null===s)return t;const r=s[1];return t.split("\n").map(e=>{const t=e.match(n.other.beginningSpace);if(null===t)return e;const[s]=t;return s.length>=r.length?e.slice(r.length):e}).join("\n")}(e,t[3]||"",this.rules);return{type:"code",raw:e,lang:t[2]?t[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):t[2],text:n}}}heading(e){const t=this.rules.block.heading.exec(e);if(t){let e=t[2].trim();if(this.rules.other.endingHash.test(e)){const t=re(e,"#");this.options.pedantic?e=t.trim():t&&!this.rules.other.endingSpaceChar.test(t)||(e=t.trim())}return{type:"heading",raw:t[0],depth:t[1].length,text:e,tokens:this.lexer.inline(e)}}}hr(e){const t=this.rules.block.hr.exec(e);if(t)return{type:"hr",raw:re(t[0],"\n")}}blockquote(e){const t=this.rules.block.blockquote.exec(e);if(t){let e=re(t[0],"\n").split("\n"),n="",s="";const r=[];for(;e.length>0;){let t=!1;const i=[];let l;for(l=0;l<e.length;l++)if(this.rules.other.blockquoteStart.test(e[l]))i.push(e[l]),t=!0;else{if(t)break;i.push(e[l])}e=e.slice(l);const o=i.join("\n"),a=o.replace(this.rules.other.blockquoteSetextReplace,"\n $1").replace(this.rules.other.blockquoteSetextReplace2,"");n=n?`${n}\n${o}`:o,s=s?`${s}\n${a}`:a;const c=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTokens(a,r,!0),this.lexer.state.top=c,0===e.length)break;const h=r.at(-1);if("code"===h?.type)break;if("blockquote"===h?.type){const t=h,i=t.raw+"\n"+e.join("\n"),l=this.blockquote(i);r[r.length-1]=l,n=n.substring(0,n.length-t.raw.length)+l.raw,s=s.substring(0,s.length-t.text.length)+l.text;break}if("list"===h?.type){const t=h,i=t.raw+"\n"+e.join("\n"),l=this.list(i);r[r.length-1]=l,n=n.substring(0,n.length-h.raw.length)+l.raw,s=s.substring(0,s.length-t.raw.length)+l.raw,e=i.substring(r.at(-1).raw.length).split("\n");continue}}return{type:"blockquote",raw:n,tokens:r,text:s}}}list(e){let t=this.rules.block.list.exec(e);if(t){let n=t[1].trim();const s=n.length>1,r={type:"list",raw:"",ordered:s,start:s?+n.slice(0,-1):"",loose:!1,items:[]};n=s?`\\d{1,9}\\${n.slice(-1)}`:`\\${n}`,this.options.pedantic&&(n=s?n:"[*+-]");const i=this.rules.other.listItemRegex(n);let l=!1;for(;e;){let n=!1,s="",o="";if(!(t=i.exec(e)))break;if(this.rules.block.hr.test(e))break;s=t[0],e=e.substring(s.length);let a=t[2].split("\n",1)[0].replace(this.rules.other.listReplaceTabs,e=>" ".repeat(3*e.length)),c=e.split("\n",1)[0],h=!a.trim(),p=0;if(this.options.pedantic?(p=2,o=a.trimStart()):h?p=t[1].length+1:(p=t[2].search(this.rules.other.nonSpaceChar),p=p>4?1:p,o=a.slice(p),p+=t[1].length),h&&this.rules.other.blankLine.test(c)&&(s+=c+"\n",e=e.substring(c.length+1),n=!0),!n){const t=this.rules.other.nextBulletRegex(p),n=this.rules.other.hrRegex(p),r=this.rules.other.fencesBeginRegex(p),i=this.rules.other.headingBeginRegex(p),l=this.rules.other.htmlBeginRegex(p);for(;e;){const u=e.split("\n",1)[0];let g;if(c=u,this.options.pedantic?(c=c.replace(this.rules.other.listReplaceNesting," "),g=c):g=c.replace(this.rules.other.tabCharGlobal," "),r.test(c))break;if(i.test(c))break;if(l.test(c))break;if(t.test(c))break;if(n.test(c))break;if(g.search(this.rules.other.nonSpaceChar)>=p||!c.trim())o+="\n"+g.slice(p);else{if(h)break;if(a.replace(this.rules.other.tabCharGlobal," ").search(this.rules.other.nonSpaceChar)>=4)break;if(r.test(a))break;if(i.test(a))break;if(n.test(a))break;o+="\n"+c}h||c.trim()||(h=!0),s+=u+"\n",e=e.substring(u.length+1),a=g.slice(p)}}r.loose||(l?r.loose=!0:this.rules.other.doubleBlankLine.test(s)&&(l=!0));let u,g=null;this.options.gfm&&(g=this.rules.other.listIsTask.exec(o),g&&(u="[ ] "!==g[0],o=o.replace(this.rules.other.listReplaceTask,""))),r.items.push({type:"list_item",raw:s,task:!!g,checked:u,loose:!1,text:o,tokens:[]}),r.raw+=s}const o=r.items.at(-1);if(!o)return;o.raw=o.raw.trimEnd(),o.text=o.text.trimEnd(),r.raw=r.raw.trimEnd();for(let e=0;e<r.items.length;e++)if(this.lexer.state.top=!1,r.items[e].tokens=this.lexer.blockTokens(r.items[e].text,[]),!r.loose){const t=r.items[e].tokens.filter(e=>"space"===e.type),n=t.length>0&&t.some(e=>this.rules.other.anyLine.test(e.raw));r.loose=n}if(r.loose)for(let e=0;e<r.items.length;e++)r.items[e].loose=!0;return r}}html(e){const t=this.rules.block.html.exec(e);if(t)return{type:"html",block:!0,raw:t[0],pre:"pre"===t[1]||"script"===t[1]||"style"===t[1],text:t[0]}}def(e){const t=this.rules.block.def.exec(e);if(t){const e=t[1].toLowerCase().replace(this.rules.other.multipleSpaceGlobal," "),n=t[2]?t[2].replace(this.rules.other.hrefBrackets,"$1").replace(this.rules.inline.anyPunctuation,"$1"):"",s=t[3]?t[3].substring(1,t[3].length-1).replace(this.rules.inline.anyPunctuation,"$1"):t[3];return{type:"def",tag:e,raw:t[0],href:n,title:s}}}table(e){const t=this.rules.block.table.exec(e);if(!t)return;if(!this.rules.other.tableDelimiter.test(t[2]))return;const n=se(t[1]),s=t[2].replace(this.rules.other.tableAlignChars,"").split("|"),r=t[3]?.trim()?t[3].replace(this.rules.other.tableRowBlankLine,"").split("\n"):[],i={type:"table",raw:t[0],header:[],align:[],rows:[]};if(n.length===s.length){for(const e of s)this.rules.other.tableAlignRight.test(e)?i.align.push("right"):this.rules.other.tableAlignCenter.test(e)?i.align.push("center"):this.rules.other.tableAlignLeft.test(e)?i.align.push("left"):i.align.push(null);for(let e=0;e<n.length;e++)i.header.push({text:n[e],tokens:this.lexer.inline(n[e]),header:!0,align:i.align[e]});for(const e of r)i.rows.push(se(e,i.header.length).map((e,t)=>({text:e,tokens:this.lexer.inline(e),header:!1,align:i.align[t]})));return i}}lheading(e){const t=this.rules.block.lheading.exec(e);if(t)return{type:"heading",raw:t[0],depth:"="===t[2].charAt(0)?1:2,text:t[1],tokens:this.lexer.inline(t[1])}}paragraph(e){const t=this.rules.block.paragraph.exec(e);if(t){const e="\n"===t[1].charAt(t[1].length-1)?t[1].slice(0,-1):t[1];return{type:"paragraph",raw:t[0],text:e,tokens:this.lexer.inline(e)}}}text(e){const t=this.rules.block.text.exec(e);if(t)return{type:"text",raw:t[0],text:t[0],tokens:this.lexer.inline(t[0])}}escape(e){const t=this.rules.inline.escape.exec(e);if(t)return{type:"escape",raw:t[0],text:t[1]}}tag(e){const t=this.rules.inline.tag.exec(e);if(t)return!this.lexer.state.inLink&&this.rules.other.startATag.test(t[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&this.rules.other.endATag.test(t[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&this.rules.other.startPreScriptTag.test(t[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&this.rules.other.endPreScriptTag.test(t[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:t[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:t[0]}}link(e){const t=this.rules.inline.link.exec(e);if(t){const e=t[2].trim();if(!this.options.pedantic&&this.rules.other.startAngleBracket.test(e)){if(!this.rules.other.endAngleBracket.test(e))return;const t=re(e.slice(0,-1),"\\");if((e.length-t.length)%2==0)return}else{const e=function(e,t){if(-1===e.indexOf(t[1]))return-1;let n=0;for(let s=0;s<e.length;s++)if("\\"===e[s])s++;else if(e[s]===t[0])n++;else if(e[s]===t[1]&&(n--,n<0))return s;return n>0?-2:-1}(t[2],"()");if(-2===e)return;if(e>-1){const n=(0===t[0].indexOf("!")?5:4)+t[1].length+e;t[2]=t[2].substring(0,e),t[0]=t[0].substring(0,n).trim(),t[3]=""}}let n=t[2],s="";if(this.options.pedantic){const e=this.rules.other.pedanticHrefTitle.exec(n);e&&(n=e[1],s=e[3])}else s=t[3]?t[3].slice(1,-1):"";return n=n.trim(),this.rules.other.startAngleBracket.test(n)&&(n=this.options.pedantic&&!this.rules.other.endAngleBracket.test(e)?n.slice(1):n.slice(1,-1)),ie(t,{href:n?n.replace(this.rules.inline.anyPunctuation,"$1"):n,title:s?s.replace(this.rules.inline.anyPunctuation,"$1"):s},t[0],this.lexer,this.rules)}}reflink(e,t){let n;if((n=this.rules.inline.reflink.exec(e))||(n=this.rules.inline.nolink.exec(e))){const e=t[(n[2]||n[1]).replace(this.rules.other.multipleSpaceGlobal," ").toLowerCase()];if(!e){const e=n[0].charAt(0);return{type:"text",raw:e,text:e}}return ie(n,e,n[0],this.lexer,this.rules)}}emStrong(e,t,n=""){let s=this.rules.inline.emStrongLDelim.exec(e);if(s&&(!s[3]||!n.match(this.rules.other.unicodeAlphaNumeric))&&(!s[1]&&!s[2]||!n||this.rules.inline.punctuation.exec(n))){const n=[...s[0]].length-1;let r,i,l=n,o=0;const a="*"===s[0][0]?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(a.lastIndex=0,t=t.slice(-1*e.length+n);null!=(s=a.exec(t));){if(r=s[1]||s[2]||s[3]||s[4]||s[5]||s[6],!r)continue;if(i=[...r].length,s[3]||s[4]){l+=i;continue}if((s[5]||s[6])&&n%3&&!((n+i)%3)){o+=i;continue}if(l-=i,l>0)continue;i=Math.min(i,i+l+o);const t=[...s[0]][0].length,a=e.slice(0,n+s.index+t+i);if(Math.min(n,i)%2){const e=a.slice(1,-1);return{type:"em",raw:a,text:e,tokens:this.lexer.inlineTokens(e)}}const c=a.slice(2,-2);return{type:"strong",raw:a,text:c,tokens:this.lexer.inlineTokens(c)}}}}codespan(e){const t=this.rules.inline.code.exec(e);if(t){let e=t[2].replace(this.rules.other.newLineCharGlobal," ");const n=this.rules.other.nonSpaceChar.test(e),s=this.rules.other.startingSpaceChar.test(e)&&this.rules.other.endingSpaceChar.test(e);return n&&s&&(e=e.substring(1,e.length-1)),{type:"codespan",raw:t[0],text:e}}}br(e){const t=this.rules.inline.br.exec(e);if(t)return{type:"br",raw:t[0]}}del(e){const t=this.rules.inline.del.exec(e);if(t)return{type:"del",raw:t[0],text:t[2],tokens:this.lexer.inlineTokens(t[2])}}autolink(e){const t=this.rules.inline.autolink.exec(e);if(t){let e,n;return"@"===t[2]?(e=t[1],n="mailto:"+e):(e=t[1],n=e),{type:"link",raw:t[0],text:e,href:n,tokens:[{type:"text",raw:e,text:e}]}}}url(e){let t;if(t=this.rules.inline.url.exec(e)){let e,n;if("@"===t[2])e=t[0],n="mailto:"+e;else{let s;do{s=t[0],t[0]=this.rules.inline._backpedal.exec(t[0])?.[0]??""}while(s!==t[0]);e=t[0],n="www."===t[1]?"http://"+t[0]:t[0]}return{type:"link",raw:t[0],text:e,href:n,tokens:[{type:"text",raw:e,text:e}]}}}inlineText(e){const t=this.rules.inline.text.exec(e);if(t){const e=this.lexer.state.inRawBlock;return{type:"text",raw:t[0],text:t[0],escaped:e}}}},oe=class e{tokens;options;state;tokenizer;inlineQueue;constructor(e){this.tokens=[],this.tokens.links=Object.create(null),this.options=e||r,this.options.tokenizer=this.options.tokenizer||new le,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,this.tokenizer.lexer=this,this.inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,top:!0};const t={other:a,block:V.normal,inline:W.normal};this.options.pedantic?(t.block=V.pedantic,t.inline=W.pedantic):this.options.gfm&&(t.block=V.gfm,this.options.breaks?t.inline=W.breaks:t.inline=W.gfm),this.tokenizer.rules=t}static get rules(){return{block:V,inline:W}}static lex(t,n){return new e(n).lex(t)}static lexInline(t,n){return new e(n).inlineTokens(t)}lex(e){e=e.replace(a.carriageReturn,"\n"),this.blockTokens(e,this.tokens);for(let e=0;e<this.inlineQueue.length;e++){const t=this.inlineQueue[e];this.inlineTokens(t.src,t.tokens)}return this.inlineQueue=[],this.tokens}blockTokens(e,t=[],n=!1){for(this.options.pedantic&&(e=e.replace(a.tabCharGlobal," ").replace(a.spaceLine,""));e;){let s;if(this.options.extensions?.block?.some(n=>!!(s=n.call({lexer:this},e,t))&&(e=e.substring(s.raw.length),t.push(s),!0)))continue;if(s=this.tokenizer.space(e)){e=e.substring(s.raw.length);const n=t.at(-1);1===s.raw.length&&void 0!==n?n.raw+="\n":t.push(s);continue}if(s=this.tokenizer.code(e)){e=e.substring(s.raw.length);const n=t.at(-1);"paragraph"===n?.type||"text"===n?.type?(n.raw+="\n"+s.raw,n.text+="\n"+s.text,this.inlineQueue.at(-1).src=n.text):t.push(s);continue}if(s=this.tokenizer.fences(e)){e=e.substring(s.raw.length),t.push(s);continue}if(s=this.tokenizer.heading(e)){e=e.substring(s.raw.length),t.push(s);continue}if(s=this.tokenizer.hr(e)){e=e.substring(s.raw.length),t.push(s);continue}if(s=this.tokenizer.blockquote(e)){e=e.substring(s.raw.length),t.push(s);continue}if(s=this.tokenizer.list(e)){e=e.substring(s.raw.length),t.push(s);continue}if(s=this.tokenizer.html(e)){e=e.substring(s.raw.length),t.push(s);continue}if(s=this.tokenizer.def(e)){e=e.substring(s.raw.length);const n=t.at(-1);"paragraph"===n?.type||"text"===n?.type?(n.raw+="\n"+s.raw,n.text+="\n"+s.raw,this.inlineQueue.at(-1).src=n.text):this.tokens.links[s.tag]||(this.tokens.links[s.tag]={href:s.href,title:s.title});continue}if(s=this.tokenizer.table(e)){e=e.substring(s.raw.length),t.push(s);continue}if(s=this.tokenizer.lheading(e)){e=e.substring(s.raw.length),t.push(s);continue}let r=e;if(this.options.extensions?.startBlock){let t=1/0;const n=e.slice(1);let s;this.options.extensions.startBlock.forEach(e=>{s=e.call({lexer:this},n),"number"==typeof s&&s>=0&&(t=Math.min(t,s))}),t<1/0&&t>=0&&(r=e.substring(0,t+1))}if(this.state.top&&(s=this.tokenizer.paragraph(r))){const i=t.at(-1);n&&"paragraph"===i?.type?(i.raw+="\n"+s.raw,i.text+="\n"+s.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=i.text):t.push(s),n=r.length!==e.length,e=e.substring(s.raw.length);continue}if(s=this.tokenizer.text(e)){e=e.substring(s.raw.length);const n=t.at(-1);"text"===n?.type?(n.raw+="\n"+s.raw,n.text+="\n"+s.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=n.text):t.push(s);continue}if(e){const t="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(t);break}throw new Error(t)}}return this.state.top=!0,t}inline(e,t=[]){return this.inlineQueue.push({src:e,tokens:t}),t}inlineTokens(e,t=[]){let n=e,s=null;if(this.tokens.links){const e=Object.keys(this.tokens.links);if(e.length>0)for(;null!=(s=this.tokenizer.rules.inline.reflinkSearch.exec(n));)e.includes(s[0].slice(s[0].lastIndexOf("[")+1,-1))&&(n=n.slice(0,s.index)+"["+"a".repeat(s[0].length-2)+"]"+n.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;null!=(s=this.tokenizer.rules.inline.anyPunctuation.exec(n));)n=n.slice(0,s.index)+"++"+n.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);for(;null!=(s=this.tokenizer.rules.inline.blockSkip.exec(n));)n=n.slice(0,s.index)+"["+"a".repeat(s[0].length-2)+"]"+n.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);let r=!1,i="";for(;e;){let s;if(r||(i=""),r=!1,this.options.extensions?.inline?.some(n=>!!(s=n.call({lexer:this},e,t))&&(e=e.substring(s.raw.length),t.push(s),!0)))continue;if(s=this.tokenizer.escape(e)){e=e.substring(s.raw.length),t.push(s);continue}if(s=this.tokenizer.tag(e)){e=e.substring(s.raw.length),t.push(s);continue}if(s=this.tokenizer.link(e)){e=e.substring(s.raw.length),t.push(s);continue}if(s=this.tokenizer.reflink(e,this.tokens.links)){e=e.substring(s.raw.length);const n=t.at(-1);"text"===s.type&&"text"===n?.type?(n.raw+=s.raw,n.text+=s.text):t.push(s);continue}if(s=this.tokenizer.emStrong(e,n,i)){e=e.substring(s.raw.length),t.push(s);continue}if(s=this.tokenizer.codespan(e)){e=e.substring(s.raw.length),t.push(s);continue}if(s=this.tokenizer.br(e)){e=e.substring(s.raw.length),t.push(s);continue}if(s=this.tokenizer.del(e)){e=e.substring(s.raw.length),t.push(s);continue}if(s=this.tokenizer.autolink(e)){e=e.substring(s.raw.length),t.push(s);continue}if(!this.state.inLink&&(s=this.tokenizer.url(e))){e=e.substring(s.raw.length),t.push(s);continue}let l=e;if(this.options.extensions?.startInline){let t=1/0;const n=e.slice(1);let s;this.options.extensions.startInline.forEach(e=>{s=e.call({lexer:this},n),"number"==typeof s&&s>=0&&(t=Math.min(t,s))}),t<1/0&&t>=0&&(l=e.substring(0,t+1))}if(s=this.tokenizer.inlineText(l)){e=e.substring(s.raw.length),"_"!==s.raw.slice(-1)&&(i=s.raw.slice(-1)),r=!0;const n=t.at(-1);"text"===n?.type?(n.raw+=s.raw,n.text+=s.text):t.push(s);continue}if(e){const t="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(t);break}throw new Error(t)}}return t}},ae=class{options;parser;constructor(e){this.options=e||r}space(e){return""}code({text:e,lang:t,escaped:n}){const s=(t||"").match(a.notSpaceStart)?.[0],r=e.replace(a.endingNewline,"")+"\n";return s?'<pre><code class="language-'+te(s)+'">'+(n?r:te(r,!0))+"</code></pre>\n":"<pre><code>"+(n?r:te(r,!0))+"</code></pre>\n"}blockquote({tokens:e}){return`<blockquote>\n${this.parser.parse(e)}</blockquote>\n`}html({text:e}){return e}heading({tokens:e,depth:t}){return`<h${t}>${this.parser.parseInline(e)}</h${t}>\n`}hr(e){return"<hr>\n"}list(e){const t=e.ordered,n=e.start;let s="";for(let t=0;t<e.items.length;t++){const n=e.items[t];s+=this.listitem(n)}const r=t?"ol":"ul";return"<"+r+(t&&1!==n?' start="'+n+'"':"")+">\n"+s+"</"+r+">\n"}listitem(e){let t="";if(e.task){const n=this.checkbox({checked:!!e.checked});e.loose?"paragraph"===e.tokens[0]?.type?(e.tokens[0].text=n+" "+e.tokens[0].text,e.tokens[0].tokens&&e.tokens[0].tokens.length>0&&"text"===e.tokens[0].tokens[0].type&&(e.tokens[0].tokens[0].text=n+" "+te(e.tokens[0].tokens[0].text),e.tokens[0].tokens[0].escaped=!0)):e.tokens.unshift({type:"text",raw:n+" ",text:n+" ",escaped:!0}):t+=n+" "}return t+=this.parser.parse(e.tokens,!!e.loose),`<li>${t}</li>\n`}checkbox({checked:e}){return"<input "+(e?'checked="" ':"")+'disabled="" type="checkbox">'}paragraph({tokens:e}){return`<p>${this.parser.parseInline(e)}</p>\n`}table(e){let t="",n="";for(let t=0;t<e.header.length;t++)n+=this.tablecell(e.header[t]);t+=this.tablerow({text:n});let s="";for(let t=0;t<e.rows.length;t++){const r=e.rows[t];n="";for(let e=0;e<r.length;e++)n+=this.tablecell(r[e]);s+=this.tablerow({text:n})}return s&&(s=`<tbody>${s}</tbody>`),"<table>\n<thead>\n"+t+"</thead>\n"+s+"</table>\n"}tablerow({text:e}){return`<tr>\n${e}</tr>\n`}tablecell(e){const t=this.parser.parseInline(e.tokens),n=e.header?"th":"td";return(e.align?`<${n} align="${e.align}">`:`<${n}>`)+t+`</${n}>\n`}strong({tokens:e}){return`<strong>${this.parser.parseInline(e)}</strong>`}em({tokens:e}){return`<em>${this.parser.parseInline(e)}</em>`}codespan({text:e}){return`<code>${te(e,!0)}</code>`}br(e){return"<br>"}del({tokens:e}){return`<del>${this.parser.parseInline(e)}</del>`}link({href:e,title:t,tokens:n}){const s=this.parser.parseInline(n),r=ne(e);if(null===r)return s;let i='<a href="'+(e=r)+'"';return t&&(i+=' title="'+te(t)+'"'),i+=">"+s+"</a>",i}image({href:e,title:t,text:n,tokens:s}){s&&(n=this.parser.parseInline(s,this.parser.textRenderer));const r=ne(e);if(null===r)return te(n);let i=`<img src="${e=r}" alt="${n}"`;return t&&(i+=` title="${te(t)}"`),i+=">",i}text(e){return"tokens"in e&&e.tokens?this.parser.parseInline(e.tokens):"escaped"in e&&e.escaped?e.text:te(e.text)}},ce=class{strong({text:e}){return e}em({text:e}){return e}codespan({text:e}){return e}del({text:e}){return e}html({text:e}){return e}text({text:e}){return e}link({text:e}){return""+e}image({text:e}){return""+e}br(){return""}},he=class e{options;renderer;textRenderer;constructor(e){this.options=e||r,this.options.renderer=this.options.renderer||new ae,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new ce}static parse(t,n){return new e(n).parse(t)}static parseInline(t,n){return new e(n).parseInline(t)}parse(e,t=!0){let n="";for(let s=0;s<e.length;s++){const r=e[s];if(this.options.extensions?.renderers?.[r.type]){const e=r,t=this.options.extensions.renderers[e.type].call({parser:this},e);if(!1!==t||!["space","hr","heading","code","table","blockquote","list","html","paragraph","text"].includes(e.type)){n+=t||"";continue}}const i=r;switch(i.type){case"space":n+=this.renderer.space(i);continue;case"hr":n+=this.renderer.hr(i);continue;case"heading":n+=this.renderer.heading(i);continue;case"code":n+=this.renderer.code(i);continue;case"table":n+=this.renderer.table(i);continue;case"blockquote":n+=this.renderer.blockquote(i);continue;case"list":n+=this.renderer.list(i);continue;case"html":n+=this.renderer.html(i);continue;case"paragraph":n+=this.renderer.paragraph(i);continue;case"text":{let r=i,l=this.renderer.text(r);for(;s+1<e.length&&"text"===e[s+1].type;)r=e[++s],l+="\n"+this.renderer.text(r);n+=t?this.renderer.paragraph({type:"paragraph",raw:l,text:l,tokens:[{type:"text",raw:l,text:l,escaped:!0}]}):l;continue}default:{const e='Token with "'+i.type+'" type was not found.';if(this.options.silent)return console.error(e),"";throw new Error(e)}}}return n}parseInline(e,t=this.renderer){let n="";for(let s=0;s<e.length;s++){const r=e[s];if(this.options.extensions?.renderers?.[r.type]){const e=this.options.extensions.renderers[r.type].call({parser:this},r);if(!1!==e||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(r.type)){n+=e||"";continue}}const i=r;switch(i.type){case"escape":case"text":n+=t.text(i);break;case"html":n+=t.html(i);break;case"link":n+=t.link(i);break;case"image":n+=t.image(i);break;case"strong":n+=t.strong(i);break;case"em":n+=t.em(i);break;case"codespan":n+=t.codespan(i);break;case"br":n+=t.br(i);break;case"del":n+=t.del(i);break;default:{const e='Token with "'+i.type+'" type was not found.';if(this.options.silent)return console.error(e),"";throw new Error(e)}}}return n}},pe=class{options;block;constructor(e){this.options=e||r}static passThroughHooks=new Set(["preprocess","postprocess","processAllTokens"]);preprocess(e){return e}postprocess(e){return e}processAllTokens(e){return e}provideLexer(){return this.block?oe.lex:oe.lexInline}provideParser(){return this.block?he.parse:he.parseInline}},ue=class{defaults={async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null};options=this.setOptions;parse=this.parseMarkdown(!0);parseInline=this.parseMarkdown(!1);Parser=he;Renderer=ae;TextRenderer=ce;Lexer=oe;Tokenizer=le;Hooks=pe;constructor(...e){this.use(...e)}walkTokens(e,t){let n=[];for(const s of e)switch(n=n.concat(t.call(this,s)),s.type){case"table":{const e=s;for(const s of e.header)n=n.concat(this.walkTokens(s.tokens,t));for(const s of e.rows)for(const e of s)n=n.concat(this.walkTokens(e.tokens,t));break}case"list":{const e=s;n=n.concat(this.walkTokens(e.items,t));break}default:{const e=s;this.defaults.extensions?.childTokens?.[e.type]?this.defaults.extensions.childTokens[e.type].forEach(s=>{const r=e[s].flat(1/0);n=n.concat(this.walkTokens(r,t))}):e.tokens&&(n=n.concat(this.walkTokens(e.tokens,t)))}}return n}use(...e){const t=this.defaults.extensions||{renderers:{},childTokens:{}};return e.forEach(e=>{const n={...e};if(n.async=this.defaults.async||n.async||!1,e.extensions&&(e.extensions.forEach(e=>{if(!e.name)throw new Error("extension name required");if("renderer"in e){const n=t.renderers[e.name];t.renderers[e.name]=n?function(...t){let s=e.renderer.apply(this,t);return!1===s&&(s=n.apply(this,t)),s}:e.renderer}if("tokenizer"in e){if(!e.level||"block"!==e.level&&"inline"!==e.level)throw new Error("extension level must be 'block' or 'inline'");const n=t[e.level];n?n.unshift(e.tokenizer):t[e.level]=[e.tokenizer],e.start&&("block"===e.level?t.startBlock?t.startBlock.push(e.start):t.startBlock=[e.start]:"inline"===e.level&&(t.startInline?t.startInline.push(e.start):t.startInline=[e.start]))}"childTokens"in e&&e.childTokens&&(t.childTokens[e.name]=e.childTokens)}),n.extensions=t),e.renderer){const t=this.defaults.renderer||new ae(this.defaults);for(const n in e.renderer){if(!(n in t))throw new Error(`renderer '${n}' does not exist`);if(["options","parser"].includes(n))continue;const s=n,r=e.renderer[s],i=t[s];t[s]=(...e)=>{let n=r.apply(t,e);return!1===n&&(n=i.apply(t,e)),n||""}}n.renderer=t}if(e.tokenizer){const t=this.defaults.tokenizer||new le(this.defaults);for(const n in e.tokenizer){if(!(n in t))throw new Error(`tokenizer '${n}' does not exist`);if(["options","rules","lexer"].includes(n))continue;const s=n,r=e.tokenizer[s],i=t[s];t[s]=(...e)=>{let n=r.apply(t,e);return!1===n&&(n=i.apply(t,e)),n}}n.tokenizer=t}if(e.hooks){const t=this.defaults.hooks||new pe;for(const n in e.hooks){if(!(n in t))throw new Error(`hook '${n}' does not exist`);if(["options","block"].includes(n))continue;const s=n,r=e.hooks[s],i=t[s];pe.passThroughHooks.has(n)?t[s]=e=>{if(this.defaults.async)return Promise.resolve(r.call(t,e)).then(e=>i.call(t,e));const n=r.call(t,e);return i.call(t,n)}:t[s]=(...e)=>{let n=r.apply(t,e);return!1===n&&(n=i.apply(t,e)),n}}n.hooks=t}if(e.walkTokens){const t=this.defaults.walkTokens,s=e.walkTokens;n.walkTokens=function(e){let n=[];return n.push(s.call(this,e)),t&&(n=n.concat(t.call(this,e))),n}}this.defaults={...this.defaults,...n}}),this}setOptions(e){return this.defaults={...this.defaults,...e},this}lexer(e,t){return oe.lex(e,t??this.defaults)}parser(e,t){return he.parse(e,t??this.defaults)}parseMarkdown(e){return(t,n)=>{const s={...n},r={...this.defaults,...s},i=this.onError(!!r.silent,!!r.async);if(!0===this.defaults.async&&!1===s.async)return i(new Error("marked(): The async option was set to true by an extension. Remove async: false from the parse options object to return a Promise."));if(null==t)return i(new Error("marked(): input parameter is undefined or null"));if("string"!=typeof t)return i(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(t)+", string expected"));r.hooks&&(r.hooks.options=r,r.hooks.block=e);const l=r.hooks?r.hooks.provideLexer():e?oe.lex:oe.lexInline,o=r.hooks?r.hooks.provideParser():e?he.parse:he.parseInline;if(r.async)return Promise.resolve(r.hooks?r.hooks.preprocess(t):t).then(e=>l(e,r)).then(e=>r.hooks?r.hooks.processAllTokens(e):e).then(e=>r.walkTokens?Promise.all(this.walkTokens(e,r.walkTokens)).then(()=>e):e).then(e=>o(e,r)).then(e=>r.hooks?r.hooks.postprocess(e):e).catch(i);try{r.hooks&&(t=r.hooks.preprocess(t));let e=l(t,r);r.hooks&&(e=r.hooks.processAllTokens(e)),r.walkTokens&&this.walkTokens(e,r.walkTokens);let n=o(e,r);return r.hooks&&(n=r.hooks.postprocess(n)),n}catch(e){return i(e)}}}onError(e,t){return n=>{if(n.message+="\nPlease report this to https://github.com/markedjs/marked.",e){const e="<p>An error occurred:</p><pre>"+te(n.message+"",!0)+"</pre>";return t?Promise.resolve(e):e}if(t)return Promise.reject(n);throw n}}},ge=new ue;function ke(e,t){return ge.parse(e,t)}ke.options=ke.setOptions=function(e){return ge.setOptions(e),ke.defaults=ge.defaults,i(ke.defaults),ke},ke.getDefaults=s,ke.defaults=r,ke.use=function(...e){return ge.use(...e),ke.defaults=ge.defaults,i(ke.defaults),ke},ke.walkTokens=function(e,t){return ge.walkTokens(e,t)},ke.parseInline=ge.parseInline,ke.Parser=he,ke.parser=he.parse,ke.Renderer=ae,ke.TextRenderer=ce,ke.Lexer=oe,ke.lexer=oe.lex,ke.Tokenizer=le,ke.Hooks=pe,ke.parse=ke;var de=ke.options,fe=ke.setOptions,xe=ke.use,be=ke.walkTokens,we=ke.parseInline,me=ke,ye=he.parse,$e=oe.lex}}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";(self.webpackChunksignalpilot_ai_internal=self.webpackChunksignalpilot_ai_internal||[]).push([[384],{72384:(t,e,n)=>{function s(t){return Array.isArray?Array.isArray(t):"[object Array]"===h(t)}function i(t){return"string"==typeof t}function r(t){return"number"==typeof t}function u(t){return"object"==typeof t}function c(t){return null!=t}function o(t){return!t.trim().length}function h(t){return null==t?void 0===t?"[object Undefined]":"[object Null]":Object.prototype.toString.call(t)}n.r(e),n.d(e,{default:()=>K});const a=Object.prototype.hasOwnProperty;class l{constructor(t){this._keys=[],this._keyMap={};let e=0;t.forEach(t=>{let n=d(t);this._keys.push(n),this._keyMap[n.id]=n,e+=n.weight}),this._keys.forEach(t=>{t.weight/=e})}get(t){return this._keyMap[t]}keys(){return this._keys}toJSON(){return JSON.stringify(this._keys)}}function d(t){let e=null,n=null,r=null,u=1,c=null;if(i(t)||s(t))r=t,e=g(t),n=f(t);else{if(!a.call(t,"name"))throw new Error("Missing name property in key");const s=t.name;if(r=s,a.call(t,"weight")&&(u=t.weight,u<=0))throw new Error((t=>`Property 'weight' in key '${t}' must be a positive integer`)(s));e=g(s),n=f(s),c=t.getFn}return{path:e,id:n,weight:u,src:r,getFn:c}}function g(t){return s(t)?t:t.split(".")}function f(t){return s(t)?t.join("."):t}var A={isCaseSensitive:!1,ignoreDiacritics:!1,includeScore:!1,keys:[],shouldSort:!0,sortFn:(t,e)=>t.score===e.score?t.idx<e.idx?-1:1:t.score<e.score?-1:1,includeMatches:!1,findAllMatches:!1,minMatchCharLength:1,location:0,threshold:.6,distance:100,useExtendedSearch:!1,getFn:function(t,e){let n=[],o=!1;const a=(t,e,l)=>{if(c(t))if(e[l]){const d=t[e[l]];if(!c(d))return;if(l===e.length-1&&(i(d)||r(d)||function(t){return!0===t||!1===t||function(t){return u(t)&&null!==t}(t)&&"[object Boolean]"==h(t)}(d)))n.push(function(t){return null==t?"":function(t){if("string"==typeof t)return t;let e=t+"";return"0"==e&&1/t==-1/0?"-0":e}(t)}(d));else if(s(d)){o=!0;for(let t=0,n=d.length;t<n;t+=1)a(d[t],e,l+1)}else e.length&&a(d,e,l+1)}else n.push(t)};return a(t,i(e)?e.split("."):e,0),o?n:n[0]},ignoreLocation:!1,ignoreFieldNorm:!1,fieldNormWeight:1};const p=/[^ ]+/g;class C{constructor({getFn:t=A.getFn,fieldNormWeight:e=A.fieldNormWeight}={}){this.norm=function(t=1,e=3){const n=new Map,s=Math.pow(10,e);return{get(e){const i=e.match(p).length;if(n.has(i))return n.get(i);const r=1/Math.pow(i,.5*t),u=parseFloat(Math.round(r*s)/s);return n.set(i,u),u},clear(){n.clear()}}}(e,3),this.getFn=t,this.isCreated=!1,this.setIndexRecords()}setSources(t=[]){this.docs=t}setIndexRecords(t=[]){this.records=t}setKeys(t=[]){this.keys=t,this._keysMap={},t.forEach((t,e)=>{this._keysMap[t.id]=e})}create(){!this.isCreated&&this.docs.length&&(this.isCreated=!0,i(this.docs[0])?this.docs.forEach((t,e)=>{this._addString(t,e)}):this.docs.forEach((t,e)=>{this._addObject(t,e)}),this.norm.clear())}add(t){const e=this.size();i(t)?this._addString(t,e):this._addObject(t,e)}removeAt(t){this.records.splice(t,1);for(let e=t,n=this.size();e<n;e+=1)this.records[e].i-=1}getValueForItemAtKeyId(t,e){return t[this._keysMap[e]]}size(){return this.records.length}_addString(t,e){if(!c(t)||o(t))return;let n={v:t,i:e,n:this.norm.get(t)};this.records.push(n)}_addObject(t,e){let n={i:e,$:{}};this.keys.forEach((e,r)=>{let u=e.getFn?e.getFn(t):this.getFn(t,e.path);if(c(u))if(s(u)){let t=[];const e=[{nestedArrIndex:-1,value:u}];for(;e.length;){const{nestedArrIndex:n,value:r}=e.pop();if(c(r))if(i(r)&&!o(r)){let e={v:r,i:n,n:this.norm.get(r)};t.push(e)}else s(r)&&r.forEach((t,n)=>{e.push({nestedArrIndex:n,value:t})})}n.$[r]=t}else if(i(u)&&!o(u)){let t={v:u,n:this.norm.get(u)};n.$[r]=t}}),this.records.push(n)}toJSON(){return{keys:this.keys,records:this.records}}}function m(t,e,{getFn:n=A.getFn,fieldNormWeight:s=A.fieldNormWeight}={}){const i=new C({getFn:n,fieldNormWeight:s});return i.setKeys(t.map(d)),i.setSources(e),i.create(),i}function F(t,{errors:e=0,currentLocation:n=0,expectedLocation:s=0,distance:i=A.distance,ignoreLocation:r=A.ignoreLocation}={}){const u=e/t.length;if(r)return u;const c=Math.abs(s-n);return i?u+c/i:c?1:u}const M=32;function E(t){let e={};for(let n=0,s=t.length;n<s;n+=1){const i=t.charAt(n);e[i]=(e[i]||0)|1<<s-n-1}return e}const D=String.prototype.normalize?t=>t.normalize("NFD").replace(/[\u0300-\u036F\u0483-\u0489\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u0610-\u061A\u064B-\u065F\u0670\u06D6-\u06DC\u06DF-\u06E4\u06E7\u06E8\u06EA-\u06ED\u0711\u0730-\u074A\u07A6-\u07B0\u07EB-\u07F3\u07FD\u0816-\u0819\u081B-\u0823\u0825-\u0827\u0829-\u082D\u0859-\u085B\u08D3-\u08E1\u08E3-\u0903\u093A-\u093C\u093E-\u094F\u0951-\u0957\u0962\u0963\u0981-\u0983\u09BC\u09BE-\u09C4\u09C7\u09C8\u09CB-\u09CD\u09D7\u09E2\u09E3\u09FE\u0A01-\u0A03\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A70\u0A71\u0A75\u0A81-\u0A83\u0ABC\u0ABE-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AE2\u0AE3\u0AFA-\u0AFF\u0B01-\u0B03\u0B3C\u0B3E-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B62\u0B63\u0B82\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD7\u0C00-\u0C04\u0C3E-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C62\u0C63\u0C81-\u0C83\u0CBC\u0CBE-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CE2\u0CE3\u0D00-\u0D03\u0D3B\u0D3C\u0D3E-\u0D44\u0D46-\u0D48\u0D4A-\u0D4D\u0D57\u0D62\u0D63\u0D82\u0D83\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DF2\u0DF3\u0E31\u0E34-\u0E3A\u0E47-\u0E4E\u0EB1\u0EB4-\u0EB9\u0EBB\u0EBC\u0EC8-\u0ECD\u0F18\u0F19\u0F35\u0F37\u0F39\u0F3E\u0F3F\u0F71-\u0F84\u0F86\u0F87\u0F8D-\u0F97\u0F99-\u0FBC\u0FC6\u102B-\u103E\u1056-\u1059\u105E-\u1060\u1062-\u1064\u1067-\u106D\u1071-\u1074\u1082-\u108D\u108F\u109A-\u109D\u135D-\u135F\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17B4-\u17D3\u17DD\u180B-\u180D\u1885\u1886\u18A9\u1920-\u192B\u1930-\u193B\u1A17-\u1A1B\u1A55-\u1A5E\u1A60-\u1A7C\u1A7F\u1AB0-\u1ABE\u1B00-\u1B04\u1B34-\u1B44\u1B6B-\u1B73\u1B80-\u1B82\u1BA1-\u1BAD\u1BE6-\u1BF3\u1C24-\u1C37\u1CD0-\u1CD2\u1CD4-\u1CE8\u1CED\u1CF2-\u1CF4\u1CF7-\u1CF9\u1DC0-\u1DF9\u1DFB-\u1DFF\u20D0-\u20F0\u2CEF-\u2CF1\u2D7F\u2DE0-\u2DFF\u302A-\u302F\u3099\u309A\uA66F-\uA672\uA674-\uA67D\uA69E\uA69F\uA6F0\uA6F1\uA802\uA806\uA80B\uA823-\uA827\uA880\uA881\uA8B4-\uA8C5\uA8E0-\uA8F1\uA8FF\uA926-\uA92D\uA947-\uA953\uA980-\uA983\uA9B3-\uA9C0\uA9E5\uAA29-\uAA36\uAA43\uAA4C\uAA4D\uAA7B-\uAA7D\uAAB0\uAAB2-\uAAB4\uAAB7\uAAB8\uAABE\uAABF\uAAC1\uAAEB-\uAAEF\uAAF5\uAAF6\uABE3-\uABEA\uABEC\uABED\uFB1E\uFE00-\uFE0F\uFE20-\uFE2F]/g,""):t=>t;class y{constructor(t,{location:e=A.location,threshold:n=A.threshold,distance:s=A.distance,includeMatches:i=A.includeMatches,findAllMatches:r=A.findAllMatches,minMatchCharLength:u=A.minMatchCharLength,isCaseSensitive:c=A.isCaseSensitive,ignoreDiacritics:o=A.ignoreDiacritics,ignoreLocation:h=A.ignoreLocation}={}){if(this.options={location:e,threshold:n,distance:s,includeMatches:i,findAllMatches:r,minMatchCharLength:u,isCaseSensitive:c,ignoreDiacritics:o,ignoreLocation:h},t=c?t:t.toLowerCase(),t=o?D(t):t,this.pattern=t,this.chunks=[],!this.pattern.length)return;const a=(t,e)=>{this.chunks.push({pattern:t,alphabet:E(t),startIndex:e})},l=this.pattern.length;if(l>M){let t=0;const e=l%M,n=l-e;for(;t<n;)a(this.pattern.substr(t,M),t),t+=M;if(e){const t=l-M;a(this.pattern.substr(t),t)}}else a(this.pattern,0)}searchIn(t){const{isCaseSensitive:e,ignoreDiacritics:n,includeMatches:s}=this.options;if(t=e?t:t.toLowerCase(),t=n?D(t):t,this.pattern===t){let e={isMatch:!0,score:0};return s&&(e.indices=[[0,t.length-1]]),e}const{location:i,distance:r,threshold:u,findAllMatches:c,minMatchCharLength:o,ignoreLocation:h}=this.options;let a=[],l=0,d=!1;this.chunks.forEach(({pattern:e,alphabet:n,startIndex:g})=>{const{isMatch:f,score:p,indices:C}=function(t,e,n,{location:s=A.location,distance:i=A.distance,threshold:r=A.threshold,findAllMatches:u=A.findAllMatches,minMatchCharLength:c=A.minMatchCharLength,includeMatches:o=A.includeMatches,ignoreLocation:h=A.ignoreLocation}={}){if(e.length>M)throw new Error("Pattern length exceeds max of 32.");const a=e.length,l=t.length,d=Math.max(0,Math.min(s,l));let g=r,f=d;const p=c>1||o,C=p?Array(l):[];let m;for(;(m=t.indexOf(e,f))>-1;){let t=F(e,{currentLocation:m,expectedLocation:d,distance:i,ignoreLocation:h});if(g=Math.min(t,g),f=m+a,p){let t=0;for(;t<a;)C[m+t]=1,t+=1}}f=-1;let E=[],D=1,y=a+l;const B=1<<a-1;for(let s=0;s<a;s+=1){let r=0,c=y;for(;r<c;)F(e,{errors:s,currentLocation:d+c,expectedLocation:d,distance:i,ignoreLocation:h})<=g?r=c:y=c,c=Math.floor((y-r)/2+r);y=c;let o=Math.max(1,d-c+1),A=u?l:Math.min(d+c,l)+a,m=Array(A+2);m[A+1]=(1<<s)-1;for(let r=A;r>=o;r-=1){let u=r-1,c=n[t.charAt(u)];if(p&&(C[u]=+!!c),m[r]=(m[r+1]<<1|1)&c,s&&(m[r]|=(E[r+1]|E[r])<<1|1|E[r+1]),m[r]&B&&(D=F(e,{errors:s,currentLocation:u,expectedLocation:d,distance:i,ignoreLocation:h}),D<=g)){if(g=D,f=u,f<=d)break;o=Math.max(1,2*d-f)}}if(F(e,{errors:s+1,currentLocation:d,expectedLocation:d,distance:i,ignoreLocation:h})>g)break;E=m}const x={isMatch:f>=0,score:Math.max(.001,D)};if(p){const t=function(t=[],e=A.minMatchCharLength){let n=[],s=-1,i=-1,r=0;for(let u=t.length;r<u;r+=1){let u=t[r];u&&-1===s?s=r:u||-1===s||(i=r-1,i-s+1>=e&&n.push([s,i]),s=-1)}return t[r-1]&&r-s>=e&&n.push([s,r-1]),n}(C,c);t.length?o&&(x.indices=t):x.isMatch=!1}return x}(t,e,n,{location:i+g,distance:r,threshold:u,findAllMatches:c,minMatchCharLength:o,includeMatches:s,ignoreLocation:h});f&&(d=!0),l+=p,f&&C&&(a=[...a,...C])});let g={isMatch:d,score:d?l/this.chunks.length:1};return d&&s&&(g.indices=a),g}}class B{constructor(t){this.pattern=t}static isMultiMatch(t){return x(t,this.multiRegex)}static isSingleMatch(t){return x(t,this.singleRegex)}search(){}}function x(t,e){const n=t.match(e);return n?n[1]:null}class L extends B{constructor(t,{location:e=A.location,threshold:n=A.threshold,distance:s=A.distance,includeMatches:i=A.includeMatches,findAllMatches:r=A.findAllMatches,minMatchCharLength:u=A.minMatchCharLength,isCaseSensitive:c=A.isCaseSensitive,ignoreDiacritics:o=A.ignoreDiacritics,ignoreLocation:h=A.ignoreLocation}={}){super(t),this._bitapSearch=new y(t,{location:e,threshold:n,distance:s,includeMatches:i,findAllMatches:r,minMatchCharLength:u,isCaseSensitive:c,ignoreDiacritics:o,ignoreLocation:h})}static get type(){return"fuzzy"}static get multiRegex(){return/^"(.*)"$/}static get singleRegex(){return/^(.*)$/}search(t){return this._bitapSearch.searchIn(t)}}class k extends B{constructor(t){super(t)}static get type(){return"include"}static get multiRegex(){return/^'"(.*)"$/}static get singleRegex(){return/^'(.*)$/}search(t){let e,n=0;const s=[],i=this.pattern.length;for(;(e=t.indexOf(this.pattern,n))>-1;)n=e+i,s.push([e,n-1]);const r=!!s.length;return{isMatch:r,score:r?0:1,indices:s}}}const _=[class extends B{constructor(t){super(t)}static get type(){return"exact"}static get multiRegex(){return/^="(.*)"$/}static get singleRegex(){return/^=(.*)$/}search(t){const e=t===this.pattern;return{isMatch:e,score:e?0:1,indices:[0,this.pattern.length-1]}}},k,class extends B{constructor(t){super(t)}static get type(){return"prefix-exact"}static get multiRegex(){return/^\^"(.*)"$/}static get singleRegex(){return/^\^(.*)$/}search(t){const e=t.startsWith(this.pattern);return{isMatch:e,score:e?0:1,indices:[0,this.pattern.length-1]}}},class extends B{constructor(t){super(t)}static get type(){return"inverse-prefix-exact"}static get multiRegex(){return/^!\^"(.*)"$/}static get singleRegex(){return/^!\^(.*)$/}search(t){const e=!t.startsWith(this.pattern);return{isMatch:e,score:e?0:1,indices:[0,t.length-1]}}},class extends B{constructor(t){super(t)}static get type(){return"inverse-suffix-exact"}static get multiRegex(){return/^!"(.*)"\$$/}static get singleRegex(){return/^!(.*)\$$/}search(t){const e=!t.endsWith(this.pattern);return{isMatch:e,score:e?0:1,indices:[0,t.length-1]}}},class extends B{constructor(t){super(t)}static get type(){return"suffix-exact"}static get multiRegex(){return/^"(.*)"\$$/}static get singleRegex(){return/^(.*)\$$/}search(t){const e=t.endsWith(this.pattern);return{isMatch:e,score:e?0:1,indices:[t.length-this.pattern.length,t.length-1]}}},class extends B{constructor(t){super(t)}static get type(){return"inverse-exact"}static get multiRegex(){return/^!"(.*)"$/}static get singleRegex(){return/^!(.*)$/}search(t){const e=-1===t.indexOf(this.pattern);return{isMatch:e,score:e?0:1,indices:[0,t.length-1]}}},L],v=_.length,S=/ +(?=(?:[^\"]*\"[^\"]*\")*[^\"]*$)/,w=new Set([L.type,k.type]);const I=[];function $(t,e){for(let n=0,s=I.length;n<s;n+=1){let s=I[n];if(s.condition(t,e))return new s(t,e)}return new y(t,e)}const b="$and",N="$path",R=t=>!(!t[b]&&!t.$or),O=t=>({[b]:Object.keys(t).map(e=>({[e]:t[e]}))});function j(t,e,{auto:n=!0}={}){const r=t=>{let c=Object.keys(t);const o=(t=>!!t[N])(t);if(!o&&c.length>1&&!R(t))return r(O(t));if((t=>!s(t)&&u(t)&&!R(t))(t)){const s=o?t[N]:c[0],r=o?t.$val:t[s];if(!i(r))throw new Error((t=>`Invalid value for key ${t}`)(s));const u={keyId:f(s),pattern:r};return n&&(u.searcher=$(r,e)),u}let h={children:[],operator:c[0]};return c.forEach(e=>{const n=t[e];s(n)&&n.forEach(t=>{h.children.push(r(t))})}),h};return R(t)||(t=O(t)),r(t)}function W(t,e){const n=t.matches;e.matches=[],c(n)&&n.forEach(t=>{if(!c(t.indices)||!t.indices.length)return;const{indices:n,value:s}=t;let i={indices:n,value:s};t.key&&(i.key=t.key.src),t.idx>-1&&(i.refIndex=t.idx),e.matches.push(i)})}function z(t,e){e.score=t.score}class K{constructor(t,e={},n){this.options={...A,...e},this.options.useExtendedSearch,this._keyStore=new l(this.options.keys),this.setCollection(t,n)}setCollection(t,e){if(this._docs=t,e&&!(e instanceof C))throw new Error("Incorrect 'index' type");this._myIndex=e||m(this.options.keys,this._docs,{getFn:this.options.getFn,fieldNormWeight:this.options.fieldNormWeight})}add(t){c(t)&&(this._docs.push(t),this._myIndex.add(t))}remove(t=()=>!1){const e=[];for(let n=0,s=this._docs.length;n<s;n+=1){const i=this._docs[n];t(i,n)&&(this.removeAt(n),n-=1,s-=1,e.push(i))}return e}removeAt(t){this._docs.splice(t,1),this._myIndex.removeAt(t)}getIndex(){return this._myIndex}search(t,{limit:e=-1}={}){const{includeMatches:n,includeScore:s,shouldSort:u,sortFn:c,ignoreFieldNorm:o}=this.options;let h=i(t)?i(this._docs[0])?this._searchStringList(t):this._searchObjectList(t):this._searchLogical(t);return function(t,{ignoreFieldNorm:e=A.ignoreFieldNorm}){t.forEach(t=>{let n=1;t.matches.forEach(({key:t,norm:s,score:i})=>{const r=t?t.weight:null;n*=Math.pow(0===i&&r?Number.EPSILON:i,(r||1)*(e?1:s))}),t.score=n})}(h,{ignoreFieldNorm:o}),u&&h.sort(c),r(e)&&e>-1&&(h=h.slice(0,e)),function(t,e,{includeMatches:n=A.includeMatches,includeScore:s=A.includeScore}={}){const i=[];return n&&i.push(W),s&&i.push(z),t.map(t=>{const{idx:n}=t,s={item:e[n],refIndex:n};return i.length&&i.forEach(e=>{e(t,s)}),s})}(h,this._docs,{includeMatches:n,includeScore:s})}_searchStringList(t){const e=$(t,this.options),{records:n}=this._myIndex,s=[];return n.forEach(({v:t,i:n,n:i})=>{if(!c(t))return;const{isMatch:r,score:u,indices:o}=e.searchIn(t);r&&s.push({item:t,idx:n,matches:[{score:u,value:t,norm:i,indices:o}]})}),s}_searchLogical(t){const e=j(t,this.options),n=(t,e,s)=>{if(!t.children){const{keyId:n,searcher:i}=t,r=this._findMatches({key:this._keyStore.get(n),value:this._myIndex.getValueForItemAtKeyId(e,n),searcher:i});return r&&r.length?[{idx:s,item:e,matches:r}]:[]}const i=[];for(let r=0,u=t.children.length;r<u;r+=1){const u=t.children[r],c=n(u,e,s);if(c.length)i.push(...c);else if(t.operator===b)return[]}return i},s=this._myIndex.records,i={},r=[];return s.forEach(({$:t,i:s})=>{if(c(t)){let u=n(e,t,s);u.length&&(i[s]||(i[s]={idx:s,item:t,matches:[]},r.push(i[s])),u.forEach(({matches:t})=>{i[s].matches.push(...t)}))}}),r}_searchObjectList(t){const e=$(t,this.options),{keys:n,records:s}=this._myIndex,i=[];return s.forEach(({$:t,i:s})=>{if(!c(t))return;let r=[];n.forEach((n,s)=>{r.push(...this._findMatches({key:n,value:t[s],searcher:e}))}),r.length&&i.push({idx:s,item:t,matches:r})}),i}_findMatches({key:t,value:e,searcher:n}){if(!c(e))return[];let i=[];if(s(e))e.forEach(({v:e,i:s,n:r})=>{if(!c(e))return;const{isMatch:u,score:o,indices:h}=n.searchIn(e);u&&i.push({score:o,key:t,value:e,idx:s,norm:r,indices:h})});else{const{v:s,n:r}=e,{isMatch:u,score:c,indices:o}=n.searchIn(s);u&&i.push({score:c,key:t,value:s,norm:r,indices:o})}return i}}K.version="7.1.0",K.createIndex=m,K.parseIndex=function(t,{getFn:e=A.getFn,fieldNormWeight:n=A.fieldNormWeight}={}){const{keys:s,records:i}=t,r=new C({getFn:e,fieldNormWeight:n});return r.setKeys(s),r.setIndexRecords(i),r},K.config=A,K.parseQuery=j,function(...t){I.push(...t)}(class{constructor(t,{isCaseSensitive:e=A.isCaseSensitive,ignoreDiacritics:n=A.ignoreDiacritics,includeMatches:s=A.includeMatches,minMatchCharLength:i=A.minMatchCharLength,ignoreLocation:r=A.ignoreLocation,findAllMatches:u=A.findAllMatches,location:c=A.location,threshold:o=A.threshold,distance:h=A.distance}={}){this.query=null,this.options={isCaseSensitive:e,ignoreDiacritics:n,includeMatches:s,minMatchCharLength:i,findAllMatches:u,ignoreLocation:r,location:c,threshold:o,distance:h},t=e?t:t.toLowerCase(),t=n?D(t):t,this.pattern=t,this.query=function(t,e={}){return t.split("|").map(t=>{let n=t.trim().split(S).filter(t=>t&&!!t.trim()),s=[];for(let t=0,i=n.length;t<i;t+=1){const i=n[t];let r=!1,u=-1;for(;!r&&++u<v;){const t=_[u];let n=t.isMultiMatch(i);n&&(s.push(new t(n,e)),r=!0)}if(!r)for(u=-1;++u<v;){const t=_[u];let n=t.isSingleMatch(i);if(n){s.push(new t(n,e));break}}}return s})}(this.pattern,this.options)}static condition(t,e){return e.useExtendedSearch}searchIn(t){const e=this.query;if(!e)return{isMatch:!1,score:1};const{includeMatches:n,isCaseSensitive:s,ignoreDiacritics:i}=this.options;t=s?t:t.toLowerCase(),t=i?D(t):t;let r=0,u=[],c=0;for(let s=0,i=e.length;s<i;s+=1){const i=e[s];u.length=0,r=0;for(let e=0,s=i.length;e<s;e+=1){const s=i[e],{isMatch:o,indices:h,score:a}=s.search(t);if(!o){c=0,r=0,u.length=0;break}if(r+=1,c+=a,n){const t=s.constructor.type;w.has(t)?u=[...u,...h]:u.push(h)}}if(r){let t={isMatch:!0,score:c/r};return n&&(t.indices=u),t}}return{isMatch:!1,score:1}}})}}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";(self.webpackChunksignalpilot_ai_internal=self.webpackChunksignalpilot_ai_internal||[]).push([[439],{45439:(n,r)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.parse=r.enableErrorLogging=r.disableErrorLogging=r.setErrorLogger=void 0;let t=console.error;function e(n){if(void 0!==n){if(null===n)return null;if(""===n)return"";n=n.replace(/\\+$/,n=>n.length%2==0?n:n.slice(0,-1));try{return JSON.parse(n)}catch(r){const[t,i]=":"===n.trimLeft()[0]?s(n,r):s(n,r,h);if(e.lastParseReminding=i,e.onExtraToken&&i.length>0){const r=i.trimRight();e.lastParseReminding=r,r.length>0&&e.onExtraToken(n,t,r)}return t}}}function s(n,r,e){const s=o[n[0]]||e;if(!s)throw t(`no parser registered for ${JSON.stringify(n[0])}:`,{s:n}),r;return s(n,r)}function i(n,r,t){return'"'===n[0]?g(n):"'"===n[0]?b(n):h(n,0,t)}r.setErrorLogger=function(n){t=n},r.disableErrorLogging=function(){t=()=>{}},r.enableErrorLogging=function(){t=console.error},r.parse=e,function(n){n.onExtraToken=(n,r,e)=>{t("parsed json with extra tokens:",{text:n,data:r,reminding:e})}}(e=r.parse||(r.parse={}));const o={};function u(n){return n.trimLeft()}function c(n,r){return s(n=u(n),r)}o[" "]=c,o["\r"]=c,o["\n"]=c,o["\t"]=c,o["["]=function(n,r){const t=[];for(n=u(n=n.substr(1));n.length>0;){if("]"===n[0]){n=n.substr(1);break}const e=s(n,r,(n,r)=>h(n,0,[",","]"]));t.push(e[0]),","===(n=u(n=e[1]))[0]&&(n=u(n=n.substring(1)))}return[t,n]};for(const n of"0123456789.-".slice())o[n]=l;function l(n){for(let r=0;r<n.length;r++){const t=n[r];if(o[t]===l)continue;const e=n.substring(0,r);return n=n.substring(r),[f(e),n]}return[f(n),""]}function f(n){if("-"===n)return-0;const r=+n;return Number.isNaN(r)?n:r}function g(n){for(let r=1;r<n.length;r++){const t=n[r];if("\\"!==t){if('"'===t){const t=a(n.substring(0,r+1));return n=n.substring(r+1),[JSON.parse(t),n]}}else r++}return[JSON.parse(a(n)+'"'),""]}function a(n){return n.replace(/\n/g,"\\n").replace(/\t/g,"\\t").replace(/\r/g,"\\r")}function b(n){for(let r=1;r<n.length;r++){const t=n[r];if("\\"!==t){if("'"===t){const t=a(n.substring(0,r+1));return n=n.substring(r+1),[JSON.parse('"'+t.slice(1,-1)+'"'),n]}}else r++}return[JSON.parse('"'+a(n.slice(1))+'"'),""]}function h(n,r,t=[" "]){const e=Math.min(...t.map(r=>{const t=n.indexOf(r);return-1===t?n.length:t}));return[n.substring(0,e).trim(),n.substring(e)]}function p(n,r,e,s){for(let t=r.length;t>=1;t--)if(n.startsWith(r.slice(0,t)))return[e,n.slice(t)];{const e=JSON.stringify(n.slice(0,r.length));throw t(`unknown token starting with ${e}:`,{s:n}),s}}o['"']=g,o["'"]=b,o["{"]=function(n,r){const t={};for(n=u(n=n.substr(1));n.length>0;){if("}"===n[0]){n=n.substr(1);break}const e=i(n,0,[":","}"]),o=e[0];if(":"!==(n=u(n=e[1]))[0]){t[o]=void 0;break}if(0===(n=u(n=n.substr(1))).length){t[o]=void 0;break}const c=s(n,r);t[o]=c[0],","===(n=u(n=c[1]))[0]&&(n=u(n=n.substr(1)))}return[t,n]},o.t=function(n,r){return p(n,"true",!0,r)},o.f=function(n,r){return p(n,"false",!1,r)},o.n=function(n,r){return p(n,"null",null,r)}}}]);
|