@mohsinonxrm/pptb-dataverse-request-studio 1.4.0-beta.1 → 1.4.0-beta.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (40) hide show
  1. package/CHANGELOG.md +118 -0
  2. package/README.md +12 -7
  3. package/dist/assets/{AssociateMode-BVHaHiUu.js → AssociateMode-d9KnV2ms.js} +1 -1
  4. package/dist/assets/{AssociateTargetsEditor-C-QKaWaJ.js → AssociateTargetsEditor-CuQhdosb.js} +1 -1
  5. package/dist/assets/{BatchMode-D1J8HcNO.js → BatchMode-CHTXXyh5.js} +9 -9
  6. package/dist/assets/{BinaryColumnPickers-DLIbx4hp.js → BinaryColumnPickers-xRDRVLGn.js} +1 -1
  7. package/dist/assets/BulkDeleteMode-8wZ9ILFr.js +1 -0
  8. package/dist/assets/BulkWriteMode-Rw-BEdWo.js +6 -0
  9. package/dist/assets/{DisassociateMode-BwMK4UvP.js → DisassociateMode-CKUtzpgc.js} +1 -1
  10. package/dist/assets/ExecuteWorkflowMode-lUjZeNYk.js +1 -0
  11. package/dist/assets/{ManageFileMode-DP3KXgFw.js → ManageFileMode-BWGAVS0m.js} +1 -1
  12. package/dist/assets/{ManageImageMode-F0Dki5VQ.js → ManageImageMode-BrOtm2A4.js} +1 -1
  13. package/dist/assets/{MergeMode-PeKTZ75X.js → MergeMode-dDHs2-no.js} +1 -1
  14. package/dist/assets/PredefinedQueryMode-B4zzRppz.js +1 -0
  15. package/dist/assets/RetrieveNextLinkMode-bLLnlOMS.js +1 -0
  16. package/dist/assets/{cssMode-DXyl4xBX.js → cssMode-DL5lLcAs.js} +1 -1
  17. package/dist/assets/{freemarker2-CR_qGQP2.js → freemarker2-BCOyezro.js} +1 -1
  18. package/dist/assets/{handlebars-Buz2RscQ.js → handlebars-OAtZzz2T.js} +1 -1
  19. package/dist/assets/{html-B66Hfdqd.js → html-DEDOENUr.js} +1 -1
  20. package/dist/assets/{htmlMode-3ft3GC0g.js → htmlMode-CbTgJqB3.js} +1 -1
  21. package/dist/assets/index-DGsVifiB.js +702 -0
  22. package/dist/assets/{javascript-Cy8u5Pbx.js → javascript-CZCBdW2I.js} +1 -1
  23. package/dist/assets/{jsonMode-CvLp-1ik.js → jsonMode-DlcExoVE.js} +1 -1
  24. package/dist/assets/{liquid-BxIE_8lr.js → liquid-DqAKLfE-.js} +1 -1
  25. package/dist/assets/{mdx-Bbo0ENZs.js → mdx-NkZXeCnk.js} +1 -1
  26. package/dist/assets/{monacoSetup-C4aSY1Tw.js → monacoSetup-BIbZ_vQb.js} +176 -175
  27. package/dist/assets/{python-B6K3FYWG.js → python-DewoE6OC.js} +1 -1
  28. package/dist/assets/{razor-7sN2ZaJq.js → razor-41Lf02tV.js} +1 -1
  29. package/dist/assets/{tsMode-CIH2Hja3.js → tsMode-DRTJQ7Fk.js} +1 -1
  30. package/dist/assets/{typescript-rqW7IEk7.js → typescript-C7yUoo-S.js} +1 -1
  31. package/dist/assets/{xml-Bm2nJGx3.js → xml-D8F8OJXA.js} +1 -1
  32. package/dist/assets/{yaml-Z6ahf7o7.js → yaml-DGFY75wt.js} +1 -1
  33. package/dist/index.html +1 -1
  34. package/package.json +6 -1
  35. package/dist/assets/BulkDeleteMode-CFcjcWta.js +0 -1
  36. package/dist/assets/BulkWriteMode-C3ZGwTjw.js +0 -6
  37. package/dist/assets/ExecuteWorkflowMode-CkZdayJ4.js +0 -1
  38. package/dist/assets/PredefinedQueryMode-CDuc-WrN.js +0 -1
  39. package/dist/assets/RetrieveNextLinkMode-DenFlpEh.js +0 -1
  40. package/dist/assets/index-C4fO68cu.js +0 -704
@@ -1 +1 @@
1
- import{m as o}from"./monacoSetup-C4aSY1Tw.js";import"./index-C4fO68cu.js";var a=Object.defineProperty,l=Object.getOwnPropertyDescriptor,p=Object.getOwnPropertyNames,c=Object.prototype.hasOwnProperty,g=(t,e,n,s)=>{if(e&&typeof e=="object"||typeof e=="function")for(let r of p(e))!c.call(t,r)&&r!==n&&a(t,r,{get:()=>e[r],enumerable:!(s=l(e,r))||s.enumerable});return t},d=(t,e,n)=>(g(t,e,"default"),n),i={};d(i,o);var f={comments:{lineComment:"#",blockComment:["'''","'''"]},brackets:[["{","}"],["[","]"],["(",")"]],autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"',notIn:["string"]},{open:"'",close:"'",notIn:["string","comment"]}],surroundingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"}],onEnterRules:[{beforeText:new RegExp("^\\s*(?:def|class|for|if|elif|else|while|try|with|finally|except|async|match|case).*?:\\s*$"),action:{indentAction:i.languages.IndentAction.Indent}}],folding:{offSide:!0,markers:{start:new RegExp("^\\s*#region\\b"),end:new RegExp("^\\s*#endregion\\b")}}},b={defaultToken:"",tokenPostfix:".python",keywords:["False","None","True","_","and","as","assert","async","await","break","case","class","continue","def","del","elif","else","except","exec","finally","for","from","global","if","import","in","is","lambda","match","nonlocal","not","or","pass","print","raise","return","try","type","while","with","yield","int","float","long","complex","hex","abs","all","any","apply","basestring","bin","bool","buffer","bytearray","callable","chr","classmethod","cmp","coerce","compile","complex","delattr","dict","dir","divmod","enumerate","eval","execfile","file","filter","format","frozenset","getattr","globals","hasattr","hash","help","id","input","intern","isinstance","issubclass","iter","len","locals","list","map","max","memoryview","min","next","object","oct","open","ord","pow","print","property","reversed","range","raw_input","reduce","reload","repr","reversed","round","self","set","setattr","slice","sorted","staticmethod","str","sum","super","tuple","type","unichr","unicode","vars","xrange","zip","__dict__","__methods__","__members__","__class__","__bases__","__name__","__mro__","__subclasses__","__init__","__import__"],brackets:[{open:"{",close:"}",token:"delimiter.curly"},{open:"[",close:"]",token:"delimiter.bracket"},{open:"(",close:")",token:"delimiter.parenthesis"}],tokenizer:{root:[{include:"@whitespace"},{include:"@numbers"},{include:"@strings"},[/[,:;]/,"delimiter"],[/[{}\[\]()]/,"@brackets"],[/@[a-zA-Z_]\w*/,"tag"],[/[a-zA-Z_]\w*/,{cases:{"@keywords":"keyword","@default":"identifier"}}]],whitespace:[[/\s+/,"white"],[/(^#.*$)/,"comment"],[/'''/,"string","@endDocString"],[/"""/,"string","@endDblDocString"]],endDocString:[[/[^']+/,"string"],[/\\'/,"string"],[/'''/,"string","@popall"],[/'/,"string"]],endDblDocString:[[/[^"]+/,"string"],[/\\"/,"string"],[/"""/,"string","@popall"],[/"/,"string"]],numbers:[[/-?0x([abcdef]|[ABCDEF]|\d)+[lL]?/,"number.hex"],[/-?(\d*\.)?\d+([eE][+\-]?\d+)?[jJ]?[lL]?/,"number"]],strings:[[/'$/,"string.escape","@popall"],[/f'{1,3}/,"string.escape","@fStringBody"],[/'/,"string.escape","@stringBody"],[/"$/,"string.escape","@popall"],[/f"{1,3}/,"string.escape","@fDblStringBody"],[/"/,"string.escape","@dblStringBody"]],fStringBody:[[/[^\\'\{\}]+$/,"string","@popall"],[/[^\\'\{\}]+/,"string"],[/\{[^\}':!=]+/,"identifier","@fStringDetail"],[/\\./,"string"],[/'/,"string.escape","@popall"],[/\\$/,"string"]],stringBody:[[/[^\\']+$/,"string","@popall"],[/[^\\']+/,"string"],[/\\./,"string"],[/'/,"string.escape","@popall"],[/\\$/,"string"]],fDblStringBody:[[/[^\\"\{\}]+$/,"string","@popall"],[/[^\\"\{\}]+/,"string"],[/\{[^\}':!=]+/,"identifier","@fStringDetail"],[/\\./,"string"],[/"/,"string.escape","@popall"],[/\\$/,"string"]],dblStringBody:[[/[^\\"]+$/,"string","@popall"],[/[^\\"]+/,"string"],[/\\./,"string"],[/"/,"string.escape","@popall"],[/\\$/,"string"]],fStringDetail:[[/[:][^}]+/,"string"],[/[!][ars]/,"string"],[/=/,"string"],[/\}/,"identifier","@pop"]]}};export{f as conf,b as language};
1
+ import{m as o}from"./monacoSetup-BIbZ_vQb.js";import"./index-DGsVifiB.js";var a=Object.defineProperty,l=Object.getOwnPropertyDescriptor,p=Object.getOwnPropertyNames,c=Object.prototype.hasOwnProperty,g=(t,e,n,s)=>{if(e&&typeof e=="object"||typeof e=="function")for(let r of p(e))!c.call(t,r)&&r!==n&&a(t,r,{get:()=>e[r],enumerable:!(s=l(e,r))||s.enumerable});return t},d=(t,e,n)=>(g(t,e,"default"),n),i={};d(i,o);var f={comments:{lineComment:"#",blockComment:["'''","'''"]},brackets:[["{","}"],["[","]"],["(",")"]],autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"',notIn:["string"]},{open:"'",close:"'",notIn:["string","comment"]}],surroundingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"}],onEnterRules:[{beforeText:new RegExp("^\\s*(?:def|class|for|if|elif|else|while|try|with|finally|except|async|match|case).*?:\\s*$"),action:{indentAction:i.languages.IndentAction.Indent}}],folding:{offSide:!0,markers:{start:new RegExp("^\\s*#region\\b"),end:new RegExp("^\\s*#endregion\\b")}}},b={defaultToken:"",tokenPostfix:".python",keywords:["False","None","True","_","and","as","assert","async","await","break","case","class","continue","def","del","elif","else","except","exec","finally","for","from","global","if","import","in","is","lambda","match","nonlocal","not","or","pass","print","raise","return","try","type","while","with","yield","int","float","long","complex","hex","abs","all","any","apply","basestring","bin","bool","buffer","bytearray","callable","chr","classmethod","cmp","coerce","compile","complex","delattr","dict","dir","divmod","enumerate","eval","execfile","file","filter","format","frozenset","getattr","globals","hasattr","hash","help","id","input","intern","isinstance","issubclass","iter","len","locals","list","map","max","memoryview","min","next","object","oct","open","ord","pow","print","property","reversed","range","raw_input","reduce","reload","repr","reversed","round","self","set","setattr","slice","sorted","staticmethod","str","sum","super","tuple","type","unichr","unicode","vars","xrange","zip","__dict__","__methods__","__members__","__class__","__bases__","__name__","__mro__","__subclasses__","__init__","__import__"],brackets:[{open:"{",close:"}",token:"delimiter.curly"},{open:"[",close:"]",token:"delimiter.bracket"},{open:"(",close:")",token:"delimiter.parenthesis"}],tokenizer:{root:[{include:"@whitespace"},{include:"@numbers"},{include:"@strings"},[/[,:;]/,"delimiter"],[/[{}\[\]()]/,"@brackets"],[/@[a-zA-Z_]\w*/,"tag"],[/[a-zA-Z_]\w*/,{cases:{"@keywords":"keyword","@default":"identifier"}}]],whitespace:[[/\s+/,"white"],[/(^#.*$)/,"comment"],[/'''/,"string","@endDocString"],[/"""/,"string","@endDblDocString"]],endDocString:[[/[^']+/,"string"],[/\\'/,"string"],[/'''/,"string","@popall"],[/'/,"string"]],endDblDocString:[[/[^"]+/,"string"],[/\\"/,"string"],[/"""/,"string","@popall"],[/"/,"string"]],numbers:[[/-?0x([abcdef]|[ABCDEF]|\d)+[lL]?/,"number.hex"],[/-?(\d*\.)?\d+([eE][+\-]?\d+)?[jJ]?[lL]?/,"number"]],strings:[[/'$/,"string.escape","@popall"],[/f'{1,3}/,"string.escape","@fStringBody"],[/'/,"string.escape","@stringBody"],[/"$/,"string.escape","@popall"],[/f"{1,3}/,"string.escape","@fDblStringBody"],[/"/,"string.escape","@dblStringBody"]],fStringBody:[[/[^\\'\{\}]+$/,"string","@popall"],[/[^\\'\{\}]+/,"string"],[/\{[^\}':!=]+/,"identifier","@fStringDetail"],[/\\./,"string"],[/'/,"string.escape","@popall"],[/\\$/,"string"]],stringBody:[[/[^\\']+$/,"string","@popall"],[/[^\\']+/,"string"],[/\\./,"string"],[/'/,"string.escape","@popall"],[/\\$/,"string"]],fDblStringBody:[[/[^\\"\{\}]+$/,"string","@popall"],[/[^\\"\{\}]+/,"string"],[/\{[^\}':!=]+/,"identifier","@fStringDetail"],[/\\./,"string"],[/"/,"string.escape","@popall"],[/\\$/,"string"]],dblStringBody:[[/[^\\"]+$/,"string","@popall"],[/[^\\"]+/,"string"],[/\\./,"string"],[/"/,"string.escape","@popall"],[/\\$/,"string"]],fStringDetail:[[/[:][^}]+/,"string"],[/[!][ars]/,"string"],[/=/,"string"],[/\}/,"identifier","@pop"]]}};export{f as conf,b as language};
@@ -1 +1 @@
1
- import{m}from"./monacoSetup-C4aSY1Tw.js";import"./index-C4fO68cu.js";var s=Object.defineProperty,c=Object.getOwnPropertyDescriptor,l=Object.getOwnPropertyNames,d=Object.prototype.hasOwnProperty,p=(t,e,o,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let r of l(e))!d.call(t,r)&&r!==o&&s(t,r,{get:()=>e[r],enumerable:!(n=c(e,r))||n.enumerable});return t},h=(t,e,o)=>(p(t,e,"default"),o),a={};h(a,m);var i=["area","base","br","col","embed","hr","img","input","keygen","link","menuitem","meta","param","source","track","wbr"],y={wordPattern:/(-?\d*\.\d\w*)|([^\`\~\!\@\$\^\&\*\(\)\-\=\+\[\{\]\}\\\|\;\:\'\"\,\.\<\>\/\s]+)/g,comments:{blockComment:["<!--","-->"]},brackets:[["<!--","-->"],["<",">"],["{","}"],["(",")"]],autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"}],surroundingPairs:[{open:'"',close:'"'},{open:"'",close:"'"},{open:"<",close:">"}],onEnterRules:[{beforeText:new RegExp(`<(?!(?:${i.join("|")}))(\\w[\\w\\d]*)([^/>]*(?!/)>)[^<]*$`,"i"),afterText:/^<\/(\w[\w\d]*)\s*>$/i,action:{indentAction:a.languages.IndentAction.IndentOutdent}},{beforeText:new RegExp(`<(?!(?:${i.join("|")}))(\\w[\\w\\d]*)([^/>]*(?!/)>)[^<]*$`,"i"),action:{indentAction:a.languages.IndentAction.Indent}}]},k={defaultToken:"",tokenPostfix:"",tokenizer:{root:[[/@@@@/],[/@[^@]/,{token:"@rematch",switchTo:"@razorInSimpleState.root"}],[/<!DOCTYPE/,"metatag.html","@doctype"],[/<!--/,"comment.html","@comment"],[/(<)([\w\-]+)(\/>)/,["delimiter.html","tag.html","delimiter.html"]],[/(<)(script)/,["delimiter.html",{token:"tag.html",next:"@script"}]],[/(<)(style)/,["delimiter.html",{token:"tag.html",next:"@style"}]],[/(<)([:\w\-]+)/,["delimiter.html",{token:"tag.html",next:"@otherTag"}]],[/(<\/)([\w\-]+)/,["delimiter.html",{token:"tag.html",next:"@otherTag"}]],[/</,"delimiter.html"],[/[ \t\r\n]+/],[/[^<@]+/]],doctype:[[/@[^@]/,{token:"@rematch",switchTo:"@razorInSimpleState.comment"}],[/[^>]+/,"metatag.content.html"],[/>/,"metatag.html","@pop"]],comment:[[/@[^@]/,{token:"@rematch",switchTo:"@razorInSimpleState.comment"}],[/-->/,"comment.html","@pop"],[/[^-]+/,"comment.content.html"],[/./,"comment.content.html"]],otherTag:[[/@[^@]/,{token:"@rematch",switchTo:"@razorInSimpleState.otherTag"}],[/\/?>/,"delimiter.html","@pop"],[/"([^"]*)"/,"attribute.value"],[/'([^']*)'/,"attribute.value"],[/[\w\-]+/,"attribute.name"],[/=/,"delimiter"],[/[ \t\r\n]+/]],script:[[/@[^@]/,{token:"@rematch",switchTo:"@razorInSimpleState.script"}],[/type/,"attribute.name","@scriptAfterType"],[/"([^"]*)"/,"attribute.value"],[/'([^']*)'/,"attribute.value"],[/[\w\-]+/,"attribute.name"],[/=/,"delimiter"],[/>/,{token:"delimiter.html",next:"@scriptEmbedded.text/javascript",nextEmbedded:"text/javascript"}],[/[ \t\r\n]+/],[/(<\/)(script\s*)(>)/,["delimiter.html","tag.html",{token:"delimiter.html",next:"@pop"}]]],scriptAfterType:[[/@[^@]/,{token:"@rematch",switchTo:"@razorInSimpleState.scriptAfterType"}],[/=/,"delimiter","@scriptAfterTypeEquals"],[/>/,{token:"delimiter.html",next:"@scriptEmbedded.text/javascript",nextEmbedded:"text/javascript"}],[/[ \t\r\n]+/],[/<\/script\s*>/,{token:"@rematch",next:"@pop"}]],scriptAfterTypeEquals:[[/@[^@]/,{token:"@rematch",switchTo:"@razorInSimpleState.scriptAfterTypeEquals"}],[/"([^"]*)"/,{token:"attribute.value",switchTo:"@scriptWithCustomType.$1"}],[/'([^']*)'/,{token:"attribute.value",switchTo:"@scriptWithCustomType.$1"}],[/>/,{token:"delimiter.html",next:"@scriptEmbedded.text/javascript",nextEmbedded:"text/javascript"}],[/[ \t\r\n]+/],[/<\/script\s*>/,{token:"@rematch",next:"@pop"}]],scriptWithCustomType:[[/@[^@]/,{token:"@rematch",switchTo:"@razorInSimpleState.scriptWithCustomType.$S2"}],[/>/,{token:"delimiter.html",next:"@scriptEmbedded.$S2",nextEmbedded:"$S2"}],[/"([^"]*)"/,"attribute.value"],[/'([^']*)'/,"attribute.value"],[/[\w\-]+/,"attribute.name"],[/=/,"delimiter"],[/[ \t\r\n]+/],[/<\/script\s*>/,{token:"@rematch",next:"@pop"}]],scriptEmbedded:[[/@[^@]/,{token:"@rematch",switchTo:"@razorInEmbeddedState.scriptEmbedded.$S2",nextEmbedded:"@pop"}],[/<\/script/,{token:"@rematch",next:"@pop",nextEmbedded:"@pop"}]],style:[[/@[^@]/,{token:"@rematch",switchTo:"@razorInSimpleState.style"}],[/type/,"attribute.name","@styleAfterType"],[/"([^"]*)"/,"attribute.value"],[/'([^']*)'/,"attribute.value"],[/[\w\-]+/,"attribute.name"],[/=/,"delimiter"],[/>/,{token:"delimiter.html",next:"@styleEmbedded.text/css",nextEmbedded:"text/css"}],[/[ \t\r\n]+/],[/(<\/)(style\s*)(>)/,["delimiter.html","tag.html",{token:"delimiter.html",next:"@pop"}]]],styleAfterType:[[/@[^@]/,{token:"@rematch",switchTo:"@razorInSimpleState.styleAfterType"}],[/=/,"delimiter","@styleAfterTypeEquals"],[/>/,{token:"delimiter.html",next:"@styleEmbedded.text/css",nextEmbedded:"text/css"}],[/[ \t\r\n]+/],[/<\/style\s*>/,{token:"@rematch",next:"@pop"}]],styleAfterTypeEquals:[[/@[^@]/,{token:"@rematch",switchTo:"@razorInSimpleState.styleAfterTypeEquals"}],[/"([^"]*)"/,{token:"attribute.value",switchTo:"@styleWithCustomType.$1"}],[/'([^']*)'/,{token:"attribute.value",switchTo:"@styleWithCustomType.$1"}],[/>/,{token:"delimiter.html",next:"@styleEmbedded.text/css",nextEmbedded:"text/css"}],[/[ \t\r\n]+/],[/<\/style\s*>/,{token:"@rematch",next:"@pop"}]],styleWithCustomType:[[/@[^@]/,{token:"@rematch",switchTo:"@razorInSimpleState.styleWithCustomType.$S2"}],[/>/,{token:"delimiter.html",next:"@styleEmbedded.$S2",nextEmbedded:"$S2"}],[/"([^"]*)"/,"attribute.value"],[/'([^']*)'/,"attribute.value"],[/[\w\-]+/,"attribute.name"],[/=/,"delimiter"],[/[ \t\r\n]+/],[/<\/style\s*>/,{token:"@rematch",next:"@pop"}]],styleEmbedded:[[/@[^@]/,{token:"@rematch",switchTo:"@razorInEmbeddedState.styleEmbedded.$S2",nextEmbedded:"@pop"}],[/<\/style/,{token:"@rematch",next:"@pop",nextEmbedded:"@pop"}]],razorInSimpleState:[[/@\*/,"comment.cs","@razorBlockCommentTopLevel"],[/@[{(]/,"metatag.cs","@razorRootTopLevel"],[/(@)(\s*[\w]+)/,["metatag.cs",{token:"identifier.cs",switchTo:"@$S2.$S3"}]],[/[})]/,{token:"metatag.cs",switchTo:"@$S2.$S3"}],[/\*@/,{token:"comment.cs",switchTo:"@$S2.$S3"}]],razorInEmbeddedState:[[/@\*/,"comment.cs","@razorBlockCommentTopLevel"],[/@[{(]/,"metatag.cs","@razorRootTopLevel"],[/(@)(\s*[\w]+)/,["metatag.cs",{token:"identifier.cs",switchTo:"@$S2.$S3",nextEmbedded:"$S3"}]],[/[})]/,{token:"metatag.cs",switchTo:"@$S2.$S3",nextEmbedded:"$S3"}],[/\*@/,{token:"comment.cs",switchTo:"@$S2.$S3",nextEmbedded:"$S3"}]],razorBlockCommentTopLevel:[[/\*@/,"@rematch","@pop"],[/[^*]+/,"comment.cs"],[/./,"comment.cs"]],razorBlockComment:[[/\*@/,"comment.cs","@pop"],[/[^*]+/,"comment.cs"],[/./,"comment.cs"]],razorRootTopLevel:[[/\{/,"delimiter.bracket.cs","@razorRoot"],[/\(/,"delimiter.parenthesis.cs","@razorRoot"],[/[})]/,"@rematch","@pop"],{include:"razorCommon"}],razorRoot:[[/\{/,"delimiter.bracket.cs","@razorRoot"],[/\(/,"delimiter.parenthesis.cs","@razorRoot"],[/\}/,"delimiter.bracket.cs","@pop"],[/\)/,"delimiter.parenthesis.cs","@pop"],{include:"razorCommon"}],razorCommon:[[/[a-zA-Z_]\w*/,{cases:{"@razorKeywords":{token:"keyword.cs"},"@default":"identifier.cs"}}],[/[\[\]]/,"delimiter.array.cs"],[/[ \t\r\n]+/],[/\/\/.*$/,"comment.cs"],[/@\*/,"comment.cs","@razorBlockComment"],[/"([^"]*)"/,"string.cs"],[/'([^']*)'/,"string.cs"],[/(<)([\w\-]+)(\/>)/,["delimiter.html","tag.html","delimiter.html"]],[/(<)([\w\-]+)(>)/,["delimiter.html","tag.html","delimiter.html"]],[/(<\/)([\w\-]+)(>)/,["delimiter.html","tag.html","delimiter.html"]],[/[\+\-\*\%\&\|\^\~\!\=\<\>\/\?\;\:\.\,]/,"delimiter.cs"],[/\d*\d+[eE]([\-+]?\d+)?/,"number.float.cs"],[/\d*\.\d+([eE][\-+]?\d+)?/,"number.float.cs"],[/0[xX][0-9a-fA-F']*[0-9a-fA-F]/,"number.hex.cs"],[/0[0-7']*[0-7]/,"number.octal.cs"],[/0[bB][0-1']*[0-1]/,"number.binary.cs"],[/\d[\d']*/,"number.cs"],[/\d/,"number.cs"]]},razorKeywords:["abstract","as","async","await","base","bool","break","by","byte","case","catch","char","checked","class","const","continue","decimal","default","delegate","do","double","descending","explicit","event","extern","else","enum","false","finally","fixed","float","for","foreach","from","goto","group","if","implicit","in","int","interface","internal","into","is","lock","long","nameof","new","null","namespace","object","operator","out","override","orderby","params","private","protected","public","readonly","ref","return","switch","struct","sbyte","sealed","short","sizeof","stackalloc","static","string","select","this","throw","true","try","typeof","uint","ulong","unchecked","unsafe","ushort","using","var","virtual","volatile","void","when","while","where","yield","model","inject"],escapes:/\\(?:[abfnrtv\\"']|x[0-9A-Fa-f]{1,4}|u[0-9A-Fa-f]{4}|U[0-9A-Fa-f]{8})/};export{y as conf,k as language};
1
+ import{m}from"./monacoSetup-BIbZ_vQb.js";import"./index-DGsVifiB.js";var s=Object.defineProperty,c=Object.getOwnPropertyDescriptor,l=Object.getOwnPropertyNames,d=Object.prototype.hasOwnProperty,p=(t,e,o,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let r of l(e))!d.call(t,r)&&r!==o&&s(t,r,{get:()=>e[r],enumerable:!(n=c(e,r))||n.enumerable});return t},h=(t,e,o)=>(p(t,e,"default"),o),a={};h(a,m);var i=["area","base","br","col","embed","hr","img","input","keygen","link","menuitem","meta","param","source","track","wbr"],y={wordPattern:/(-?\d*\.\d\w*)|([^\`\~\!\@\$\^\&\*\(\)\-\=\+\[\{\]\}\\\|\;\:\'\"\,\.\<\>\/\s]+)/g,comments:{blockComment:["<!--","-->"]},brackets:[["<!--","-->"],["<",">"],["{","}"],["(",")"]],autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"}],surroundingPairs:[{open:'"',close:'"'},{open:"'",close:"'"},{open:"<",close:">"}],onEnterRules:[{beforeText:new RegExp(`<(?!(?:${i.join("|")}))(\\w[\\w\\d]*)([^/>]*(?!/)>)[^<]*$`,"i"),afterText:/^<\/(\w[\w\d]*)\s*>$/i,action:{indentAction:a.languages.IndentAction.IndentOutdent}},{beforeText:new RegExp(`<(?!(?:${i.join("|")}))(\\w[\\w\\d]*)([^/>]*(?!/)>)[^<]*$`,"i"),action:{indentAction:a.languages.IndentAction.Indent}}]},k={defaultToken:"",tokenPostfix:"",tokenizer:{root:[[/@@@@/],[/@[^@]/,{token:"@rematch",switchTo:"@razorInSimpleState.root"}],[/<!DOCTYPE/,"metatag.html","@doctype"],[/<!--/,"comment.html","@comment"],[/(<)([\w\-]+)(\/>)/,["delimiter.html","tag.html","delimiter.html"]],[/(<)(script)/,["delimiter.html",{token:"tag.html",next:"@script"}]],[/(<)(style)/,["delimiter.html",{token:"tag.html",next:"@style"}]],[/(<)([:\w\-]+)/,["delimiter.html",{token:"tag.html",next:"@otherTag"}]],[/(<\/)([\w\-]+)/,["delimiter.html",{token:"tag.html",next:"@otherTag"}]],[/</,"delimiter.html"],[/[ \t\r\n]+/],[/[^<@]+/]],doctype:[[/@[^@]/,{token:"@rematch",switchTo:"@razorInSimpleState.comment"}],[/[^>]+/,"metatag.content.html"],[/>/,"metatag.html","@pop"]],comment:[[/@[^@]/,{token:"@rematch",switchTo:"@razorInSimpleState.comment"}],[/-->/,"comment.html","@pop"],[/[^-]+/,"comment.content.html"],[/./,"comment.content.html"]],otherTag:[[/@[^@]/,{token:"@rematch",switchTo:"@razorInSimpleState.otherTag"}],[/\/?>/,"delimiter.html","@pop"],[/"([^"]*)"/,"attribute.value"],[/'([^']*)'/,"attribute.value"],[/[\w\-]+/,"attribute.name"],[/=/,"delimiter"],[/[ \t\r\n]+/]],script:[[/@[^@]/,{token:"@rematch",switchTo:"@razorInSimpleState.script"}],[/type/,"attribute.name","@scriptAfterType"],[/"([^"]*)"/,"attribute.value"],[/'([^']*)'/,"attribute.value"],[/[\w\-]+/,"attribute.name"],[/=/,"delimiter"],[/>/,{token:"delimiter.html",next:"@scriptEmbedded.text/javascript",nextEmbedded:"text/javascript"}],[/[ \t\r\n]+/],[/(<\/)(script\s*)(>)/,["delimiter.html","tag.html",{token:"delimiter.html",next:"@pop"}]]],scriptAfterType:[[/@[^@]/,{token:"@rematch",switchTo:"@razorInSimpleState.scriptAfterType"}],[/=/,"delimiter","@scriptAfterTypeEquals"],[/>/,{token:"delimiter.html",next:"@scriptEmbedded.text/javascript",nextEmbedded:"text/javascript"}],[/[ \t\r\n]+/],[/<\/script\s*>/,{token:"@rematch",next:"@pop"}]],scriptAfterTypeEquals:[[/@[^@]/,{token:"@rematch",switchTo:"@razorInSimpleState.scriptAfterTypeEquals"}],[/"([^"]*)"/,{token:"attribute.value",switchTo:"@scriptWithCustomType.$1"}],[/'([^']*)'/,{token:"attribute.value",switchTo:"@scriptWithCustomType.$1"}],[/>/,{token:"delimiter.html",next:"@scriptEmbedded.text/javascript",nextEmbedded:"text/javascript"}],[/[ \t\r\n]+/],[/<\/script\s*>/,{token:"@rematch",next:"@pop"}]],scriptWithCustomType:[[/@[^@]/,{token:"@rematch",switchTo:"@razorInSimpleState.scriptWithCustomType.$S2"}],[/>/,{token:"delimiter.html",next:"@scriptEmbedded.$S2",nextEmbedded:"$S2"}],[/"([^"]*)"/,"attribute.value"],[/'([^']*)'/,"attribute.value"],[/[\w\-]+/,"attribute.name"],[/=/,"delimiter"],[/[ \t\r\n]+/],[/<\/script\s*>/,{token:"@rematch",next:"@pop"}]],scriptEmbedded:[[/@[^@]/,{token:"@rematch",switchTo:"@razorInEmbeddedState.scriptEmbedded.$S2",nextEmbedded:"@pop"}],[/<\/script/,{token:"@rematch",next:"@pop",nextEmbedded:"@pop"}]],style:[[/@[^@]/,{token:"@rematch",switchTo:"@razorInSimpleState.style"}],[/type/,"attribute.name","@styleAfterType"],[/"([^"]*)"/,"attribute.value"],[/'([^']*)'/,"attribute.value"],[/[\w\-]+/,"attribute.name"],[/=/,"delimiter"],[/>/,{token:"delimiter.html",next:"@styleEmbedded.text/css",nextEmbedded:"text/css"}],[/[ \t\r\n]+/],[/(<\/)(style\s*)(>)/,["delimiter.html","tag.html",{token:"delimiter.html",next:"@pop"}]]],styleAfterType:[[/@[^@]/,{token:"@rematch",switchTo:"@razorInSimpleState.styleAfterType"}],[/=/,"delimiter","@styleAfterTypeEquals"],[/>/,{token:"delimiter.html",next:"@styleEmbedded.text/css",nextEmbedded:"text/css"}],[/[ \t\r\n]+/],[/<\/style\s*>/,{token:"@rematch",next:"@pop"}]],styleAfterTypeEquals:[[/@[^@]/,{token:"@rematch",switchTo:"@razorInSimpleState.styleAfterTypeEquals"}],[/"([^"]*)"/,{token:"attribute.value",switchTo:"@styleWithCustomType.$1"}],[/'([^']*)'/,{token:"attribute.value",switchTo:"@styleWithCustomType.$1"}],[/>/,{token:"delimiter.html",next:"@styleEmbedded.text/css",nextEmbedded:"text/css"}],[/[ \t\r\n]+/],[/<\/style\s*>/,{token:"@rematch",next:"@pop"}]],styleWithCustomType:[[/@[^@]/,{token:"@rematch",switchTo:"@razorInSimpleState.styleWithCustomType.$S2"}],[/>/,{token:"delimiter.html",next:"@styleEmbedded.$S2",nextEmbedded:"$S2"}],[/"([^"]*)"/,"attribute.value"],[/'([^']*)'/,"attribute.value"],[/[\w\-]+/,"attribute.name"],[/=/,"delimiter"],[/[ \t\r\n]+/],[/<\/style\s*>/,{token:"@rematch",next:"@pop"}]],styleEmbedded:[[/@[^@]/,{token:"@rematch",switchTo:"@razorInEmbeddedState.styleEmbedded.$S2",nextEmbedded:"@pop"}],[/<\/style/,{token:"@rematch",next:"@pop",nextEmbedded:"@pop"}]],razorInSimpleState:[[/@\*/,"comment.cs","@razorBlockCommentTopLevel"],[/@[{(]/,"metatag.cs","@razorRootTopLevel"],[/(@)(\s*[\w]+)/,["metatag.cs",{token:"identifier.cs",switchTo:"@$S2.$S3"}]],[/[})]/,{token:"metatag.cs",switchTo:"@$S2.$S3"}],[/\*@/,{token:"comment.cs",switchTo:"@$S2.$S3"}]],razorInEmbeddedState:[[/@\*/,"comment.cs","@razorBlockCommentTopLevel"],[/@[{(]/,"metatag.cs","@razorRootTopLevel"],[/(@)(\s*[\w]+)/,["metatag.cs",{token:"identifier.cs",switchTo:"@$S2.$S3",nextEmbedded:"$S3"}]],[/[})]/,{token:"metatag.cs",switchTo:"@$S2.$S3",nextEmbedded:"$S3"}],[/\*@/,{token:"comment.cs",switchTo:"@$S2.$S3",nextEmbedded:"$S3"}]],razorBlockCommentTopLevel:[[/\*@/,"@rematch","@pop"],[/[^*]+/,"comment.cs"],[/./,"comment.cs"]],razorBlockComment:[[/\*@/,"comment.cs","@pop"],[/[^*]+/,"comment.cs"],[/./,"comment.cs"]],razorRootTopLevel:[[/\{/,"delimiter.bracket.cs","@razorRoot"],[/\(/,"delimiter.parenthesis.cs","@razorRoot"],[/[})]/,"@rematch","@pop"],{include:"razorCommon"}],razorRoot:[[/\{/,"delimiter.bracket.cs","@razorRoot"],[/\(/,"delimiter.parenthesis.cs","@razorRoot"],[/\}/,"delimiter.bracket.cs","@pop"],[/\)/,"delimiter.parenthesis.cs","@pop"],{include:"razorCommon"}],razorCommon:[[/[a-zA-Z_]\w*/,{cases:{"@razorKeywords":{token:"keyword.cs"},"@default":"identifier.cs"}}],[/[\[\]]/,"delimiter.array.cs"],[/[ \t\r\n]+/],[/\/\/.*$/,"comment.cs"],[/@\*/,"comment.cs","@razorBlockComment"],[/"([^"]*)"/,"string.cs"],[/'([^']*)'/,"string.cs"],[/(<)([\w\-]+)(\/>)/,["delimiter.html","tag.html","delimiter.html"]],[/(<)([\w\-]+)(>)/,["delimiter.html","tag.html","delimiter.html"]],[/(<\/)([\w\-]+)(>)/,["delimiter.html","tag.html","delimiter.html"]],[/[\+\-\*\%\&\|\^\~\!\=\<\>\/\?\;\:\.\,]/,"delimiter.cs"],[/\d*\d+[eE]([\-+]?\d+)?/,"number.float.cs"],[/\d*\.\d+([eE][\-+]?\d+)?/,"number.float.cs"],[/0[xX][0-9a-fA-F']*[0-9a-fA-F]/,"number.hex.cs"],[/0[0-7']*[0-7]/,"number.octal.cs"],[/0[bB][0-1']*[0-1]/,"number.binary.cs"],[/\d[\d']*/,"number.cs"],[/\d/,"number.cs"]]},razorKeywords:["abstract","as","async","await","base","bool","break","by","byte","case","catch","char","checked","class","const","continue","decimal","default","delegate","do","double","descending","explicit","event","extern","else","enum","false","finally","fixed","float","for","foreach","from","goto","group","if","implicit","in","int","interface","internal","into","is","lock","long","nameof","new","null","namespace","object","operator","out","override","orderby","params","private","protected","public","readonly","ref","return","switch","struct","sbyte","sealed","short","sizeof","stackalloc","static","string","select","this","throw","true","try","typeof","uint","ulong","unchecked","unsafe","ushort","using","var","virtual","volatile","void","when","while","where","yield","model","inject"],escapes:/\\(?:[abfnrtv\\"']|x[0-9A-Fa-f]{1,4}|u[0-9A-Fa-f]{4}|U[0-9A-Fa-f]{8})/};export{y as conf,k as language};
@@ -1,4 +1,4 @@
1
- import{t as I,m as M}from"./monacoSetup-C4aSY1Tw.js";import"./index-C4fO68cu.js";var N=Object.defineProperty,R=Object.getOwnPropertyDescriptor,E=Object.getOwnPropertyNames,K=Object.prototype.hasOwnProperty,H=(e,t,r,a)=>{if(t&&typeof t=="object"||typeof t=="function")for(let n of E(t))!K.call(e,n)&&n!==r&&N(e,n,{get:()=>t[n],enumerable:!(a=R(t,n))||a.enumerable});return e},W=(e,t,r)=>(H(e,t,"default"),r),o={};W(o,M);function j(e,t){const r=globalThis.MonacoEnvironment;if(r?.createTrustedTypesPolicy)try{return r.createTrustedTypesPolicy(e,t)}catch(a){console.error(a);return}try{return globalThis.trustedTypes?.createPolicy(e,t)}catch(a){console.error(a);return}}var D;typeof self=="object"&&self.constructor&&self.constructor.name==="DedicatedWorkerGlobalScope"&&globalThis.workerttPolicy!==void 0?D=globalThis.workerttPolicy:D=j("defaultWorkerFactory",{createScriptURL:e=>e});function V(e){const t=e.label,r=globalThis.MonacoEnvironment;if(r){if(typeof r.getWorker=="function")return r.getWorker("workerMain.js",t);if(typeof r.getWorkerUrl=="function"){const a=r.getWorkerUrl("workerMain.js",t);return new Worker(D?D.createScriptURL(a):a,{name:t,type:"module"})}}throw new Error("You must define a function MonacoEnvironment.getWorkerUrl or MonacoEnvironment.getWorker")}function U(e){const t=Promise.resolve(V({label:e.label??"monaco-editor-worker"})).then(r=>(r.postMessage("ignore"),r.postMessage(e.createData),r));return o.editor.createWebWorker({worker:t,host:e.host,keepIdleModels:e.keepIdleModels})}var B=class{constructor(e,t){this._modeId=e,this._defaults=t,this._worker=null,this._client=null,this._configChangeListener=this._defaults.onDidChange(()=>this._stopWorker()),this._updateExtraLibsToken=0,this._extraLibsChangeListener=this._defaults.onDidExtraLibsChange(()=>this._updateExtraLibs())}dispose(){this._configChangeListener.dispose(),this._extraLibsChangeListener.dispose(),this._stopWorker()}_stopWorker(){this._worker&&(this._worker.dispose(),this._worker=null),this._client=null}async _updateExtraLibs(){if(!this._worker)return;const e=++this._updateExtraLibsToken,t=await this._worker.getProxy();this._updateExtraLibsToken===e&&t.updateExtraLibs(this._defaults.getExtraLibs())}_getClient(){return this._client||(this._client=(async()=>(this._worker=U({label:this._modeId,keepIdleModels:!0,createData:{compilerOptions:this._defaults.getCompilerOptions(),extraLibs:this._defaults.getExtraLibs(),customWorkerPath:this._defaults.workerOptions.customWorkerPath,inlayHintsOptions:this._defaults.inlayHintsOptions}}),this._defaults.getEagerModelSync()?await this._worker.withSyncedResources(o.editor.getModels().filter(e=>e.getLanguageId()===this._modeId).map(e=>e.uri)):await this._worker.getProxy()))()),this._client}async getLanguageServiceWorker(...e){const t=await this._getClient();return this._worker&&await this._worker.withSyncedResources(e),t}},i={};i["lib.d.ts"]=!0;i["lib.decorators.d.ts"]=!0;i["lib.decorators.legacy.d.ts"]=!0;i["lib.dom.asynciterable.d.ts"]=!0;i["lib.dom.d.ts"]=!0;i["lib.dom.iterable.d.ts"]=!0;i["lib.es2015.collection.d.ts"]=!0;i["lib.es2015.core.d.ts"]=!0;i["lib.es2015.d.ts"]=!0;i["lib.es2015.generator.d.ts"]=!0;i["lib.es2015.iterable.d.ts"]=!0;i["lib.es2015.promise.d.ts"]=!0;i["lib.es2015.proxy.d.ts"]=!0;i["lib.es2015.reflect.d.ts"]=!0;i["lib.es2015.symbol.d.ts"]=!0;i["lib.es2015.symbol.wellknown.d.ts"]=!0;i["lib.es2016.array.include.d.ts"]=!0;i["lib.es2016.d.ts"]=!0;i["lib.es2016.full.d.ts"]=!0;i["lib.es2016.intl.d.ts"]=!0;i["lib.es2017.d.ts"]=!0;i["lib.es2017.date.d.ts"]=!0;i["lib.es2017.full.d.ts"]=!0;i["lib.es2017.intl.d.ts"]=!0;i["lib.es2017.object.d.ts"]=!0;i["lib.es2017.sharedmemory.d.ts"]=!0;i["lib.es2017.string.d.ts"]=!0;i["lib.es2017.typedarrays.d.ts"]=!0;i["lib.es2018.asyncgenerator.d.ts"]=!0;i["lib.es2018.asynciterable.d.ts"]=!0;i["lib.es2018.d.ts"]=!0;i["lib.es2018.full.d.ts"]=!0;i["lib.es2018.intl.d.ts"]=!0;i["lib.es2018.promise.d.ts"]=!0;i["lib.es2018.regexp.d.ts"]=!0;i["lib.es2019.array.d.ts"]=!0;i["lib.es2019.d.ts"]=!0;i["lib.es2019.full.d.ts"]=!0;i["lib.es2019.intl.d.ts"]=!0;i["lib.es2019.object.d.ts"]=!0;i["lib.es2019.string.d.ts"]=!0;i["lib.es2019.symbol.d.ts"]=!0;i["lib.es2020.bigint.d.ts"]=!0;i["lib.es2020.d.ts"]=!0;i["lib.es2020.date.d.ts"]=!0;i["lib.es2020.full.d.ts"]=!0;i["lib.es2020.intl.d.ts"]=!0;i["lib.es2020.number.d.ts"]=!0;i["lib.es2020.promise.d.ts"]=!0;i["lib.es2020.sharedmemory.d.ts"]=!0;i["lib.es2020.string.d.ts"]=!0;i["lib.es2020.symbol.wellknown.d.ts"]=!0;i["lib.es2021.d.ts"]=!0;i["lib.es2021.full.d.ts"]=!0;i["lib.es2021.intl.d.ts"]=!0;i["lib.es2021.promise.d.ts"]=!0;i["lib.es2021.string.d.ts"]=!0;i["lib.es2021.weakref.d.ts"]=!0;i["lib.es2022.array.d.ts"]=!0;i["lib.es2022.d.ts"]=!0;i["lib.es2022.error.d.ts"]=!0;i["lib.es2022.full.d.ts"]=!0;i["lib.es2022.intl.d.ts"]=!0;i["lib.es2022.object.d.ts"]=!0;i["lib.es2022.regexp.d.ts"]=!0;i["lib.es2022.sharedmemory.d.ts"]=!0;i["lib.es2022.string.d.ts"]=!0;i["lib.es2023.array.d.ts"]=!0;i["lib.es2023.collection.d.ts"]=!0;i["lib.es2023.d.ts"]=!0;i["lib.es2023.full.d.ts"]=!0;i["lib.es5.d.ts"]=!0;i["lib.es6.d.ts"]=!0;i["lib.esnext.collection.d.ts"]=!0;i["lib.esnext.d.ts"]=!0;i["lib.esnext.decorators.d.ts"]=!0;i["lib.esnext.disposable.d.ts"]=!0;i["lib.esnext.full.d.ts"]=!0;i["lib.esnext.intl.d.ts"]=!0;i["lib.esnext.object.d.ts"]=!0;i["lib.esnext.promise.d.ts"]=!0;i["lib.scripthost.d.ts"]=!0;i["lib.webworker.asynciterable.d.ts"]=!0;i["lib.webworker.d.ts"]=!0;i["lib.webworker.importscripts.d.ts"]=!0;i["lib.webworker.iterable.d.ts"]=!0;function T(e,t,r=0){if(typeof e=="string")return e;if(e===void 0)return"";let a="";if(r){a+=t;for(let n=0;n<r;n++)a+=" "}if(a+=e.messageText,r++,e.next)for(const n of e.next)a+=T(n,t,r);return a}function w(e){return e?e.map(t=>t.text).join(""):""}var y=class{constructor(e){this._worker=e}_textSpanToRange(e,t){let r=e.getPositionAt(t.start),a=e.getPositionAt(t.start+t.length),{lineNumber:n,column:l}=r,{lineNumber:u,column:s}=a;return{startLineNumber:n,startColumn:l,endLineNumber:u,endColumn:s}}},$=class{constructor(e){this._worker=e,this._libFiles={},this._hasFetchedLibFiles=!1,this._fetchLibFilesPromise=null}isLibFile(e){return e&&e.path.indexOf("/lib.")===0?!!i[e.path.slice(1)]:!1}getOrCreateModel(e){const t=o.Uri.parse(e),r=o.editor.getModel(t);if(r)return r;if(this.isLibFile(t)&&this._hasFetchedLibFiles)return o.editor.createModel(this._libFiles[t.path.slice(1)],"typescript",t);const a=I.getExtraLibs()[e];return a?o.editor.createModel(a.content,"typescript",t):null}_containsLibFile(e){for(let t of e)if(this.isLibFile(t))return!0;return!1}async fetchLibFilesIfNecessary(e){this._containsLibFile(e)&&await this._fetchLibFiles()}_fetchLibFiles(){return this._fetchLibFilesPromise||(this._fetchLibFilesPromise=this._worker().then(e=>e.getLibFiles()).then(e=>{this._hasFetchedLibFiles=!0,this._libFiles=e})),this._fetchLibFilesPromise}},z=class extends y{constructor(e,t,r,a){super(a),this._libFiles=e,this._defaults=t,this._selector=r,this._disposables=[],this._listener=Object.create(null);const n=s=>{if(s.getLanguageId()!==r)return;const c=()=>{const{onlyVisible:h}=this._defaults.getDiagnosticsOptions();h?s.isAttachedToEditor()&&this._doValidate(s):this._doValidate(s)};let g;const d=s.onDidChangeContent(()=>{clearTimeout(g),g=window.setTimeout(c,500)}),b=s.onDidChangeAttached(()=>{const{onlyVisible:h}=this._defaults.getDiagnosticsOptions();h&&(s.isAttachedToEditor()?c():o.editor.setModelMarkers(s,this._selector,[]))});this._listener[s.uri.toString()]={dispose(){d.dispose(),b.dispose(),clearTimeout(g)}},c()},l=s=>{o.editor.setModelMarkers(s,this._selector,[]);const c=s.uri.toString();this._listener[c]&&(this._listener[c].dispose(),delete this._listener[c])};this._disposables.push(o.editor.onDidCreateModel(s=>n(s))),this._disposables.push(o.editor.onWillDisposeModel(l)),this._disposables.push(o.editor.onDidChangeModelLanguage(s=>{l(s.model),n(s.model)})),this._disposables.push({dispose(){for(const s of o.editor.getModels())l(s)}});const u=()=>{for(const s of o.editor.getModels())l(s),n(s)};this._disposables.push(this._defaults.onDidChange(u)),this._disposables.push(this._defaults.onDidExtraLibsChange(u)),o.editor.getModels().forEach(s=>n(s))}dispose(){this._disposables.forEach(e=>e&&e.dispose()),this._disposables=[]}async _doValidate(e){const t=await this._worker(e.uri);if(e.isDisposed())return;const r=[],{noSyntaxValidation:a,noSemanticValidation:n,noSuggestionDiagnostics:l}=this._defaults.getDiagnosticsOptions();a||r.push(t.getSyntacticDiagnostics(e.uri.toString())),n||r.push(t.getSemanticDiagnostics(e.uri.toString())),l||r.push(t.getSuggestionDiagnostics(e.uri.toString()));const u=await Promise.all(r);if(!u||e.isDisposed())return;const s=u.reduce((g,d)=>d.concat(g),[]).filter(g=>(this._defaults.getDiagnosticsOptions().diagnosticCodesToIgnore||[]).indexOf(g.code)===-1),c=s.map(g=>g.relatedInformation||[]).reduce((g,d)=>d.concat(g),[]).map(g=>g.file?o.Uri.parse(g.file.fileName):null);await this._libFiles.fetchLibFilesIfNecessary(c),!e.isDisposed()&&o.editor.setModelMarkers(e,this._selector,s.map(g=>this._convertDiagnostics(e,g)))}_convertDiagnostics(e,t){const r=t.start||0,a=t.length||1,{lineNumber:n,column:l}=e.getPositionAt(r),{lineNumber:u,column:s}=e.getPositionAt(r+a),c=[];return t.reportsUnnecessary&&c.push(o.MarkerTag.Unnecessary),t.reportsDeprecated&&c.push(o.MarkerTag.Deprecated),{severity:this._tsDiagnosticCategoryToMarkerSeverity(t.category),startLineNumber:n,startColumn:l,endLineNumber:u,endColumn:s,message:T(t.messageText,`
1
+ import{t as I,m as M}from"./monacoSetup-BIbZ_vQb.js";import"./index-DGsVifiB.js";var N=Object.defineProperty,R=Object.getOwnPropertyDescriptor,E=Object.getOwnPropertyNames,K=Object.prototype.hasOwnProperty,H=(e,t,r,a)=>{if(t&&typeof t=="object"||typeof t=="function")for(let n of E(t))!K.call(e,n)&&n!==r&&N(e,n,{get:()=>t[n],enumerable:!(a=R(t,n))||a.enumerable});return e},W=(e,t,r)=>(H(e,t,"default"),r),o={};W(o,M);function j(e,t){const r=globalThis.MonacoEnvironment;if(r?.createTrustedTypesPolicy)try{return r.createTrustedTypesPolicy(e,t)}catch(a){console.error(a);return}try{return globalThis.trustedTypes?.createPolicy(e,t)}catch(a){console.error(a);return}}var D;typeof self=="object"&&self.constructor&&self.constructor.name==="DedicatedWorkerGlobalScope"&&globalThis.workerttPolicy!==void 0?D=globalThis.workerttPolicy:D=j("defaultWorkerFactory",{createScriptURL:e=>e});function V(e){const t=e.label,r=globalThis.MonacoEnvironment;if(r){if(typeof r.getWorker=="function")return r.getWorker("workerMain.js",t);if(typeof r.getWorkerUrl=="function"){const a=r.getWorkerUrl("workerMain.js",t);return new Worker(D?D.createScriptURL(a):a,{name:t,type:"module"})}}throw new Error("You must define a function MonacoEnvironment.getWorkerUrl or MonacoEnvironment.getWorker")}function U(e){const t=Promise.resolve(V({label:e.label??"monaco-editor-worker"})).then(r=>(r.postMessage("ignore"),r.postMessage(e.createData),r));return o.editor.createWebWorker({worker:t,host:e.host,keepIdleModels:e.keepIdleModels})}var B=class{constructor(e,t){this._modeId=e,this._defaults=t,this._worker=null,this._client=null,this._configChangeListener=this._defaults.onDidChange(()=>this._stopWorker()),this._updateExtraLibsToken=0,this._extraLibsChangeListener=this._defaults.onDidExtraLibsChange(()=>this._updateExtraLibs())}dispose(){this._configChangeListener.dispose(),this._extraLibsChangeListener.dispose(),this._stopWorker()}_stopWorker(){this._worker&&(this._worker.dispose(),this._worker=null),this._client=null}async _updateExtraLibs(){if(!this._worker)return;const e=++this._updateExtraLibsToken,t=await this._worker.getProxy();this._updateExtraLibsToken===e&&t.updateExtraLibs(this._defaults.getExtraLibs())}_getClient(){return this._client||(this._client=(async()=>(this._worker=U({label:this._modeId,keepIdleModels:!0,createData:{compilerOptions:this._defaults.getCompilerOptions(),extraLibs:this._defaults.getExtraLibs(),customWorkerPath:this._defaults.workerOptions.customWorkerPath,inlayHintsOptions:this._defaults.inlayHintsOptions}}),this._defaults.getEagerModelSync()?await this._worker.withSyncedResources(o.editor.getModels().filter(e=>e.getLanguageId()===this._modeId).map(e=>e.uri)):await this._worker.getProxy()))()),this._client}async getLanguageServiceWorker(...e){const t=await this._getClient();return this._worker&&await this._worker.withSyncedResources(e),t}},i={};i["lib.d.ts"]=!0;i["lib.decorators.d.ts"]=!0;i["lib.decorators.legacy.d.ts"]=!0;i["lib.dom.asynciterable.d.ts"]=!0;i["lib.dom.d.ts"]=!0;i["lib.dom.iterable.d.ts"]=!0;i["lib.es2015.collection.d.ts"]=!0;i["lib.es2015.core.d.ts"]=!0;i["lib.es2015.d.ts"]=!0;i["lib.es2015.generator.d.ts"]=!0;i["lib.es2015.iterable.d.ts"]=!0;i["lib.es2015.promise.d.ts"]=!0;i["lib.es2015.proxy.d.ts"]=!0;i["lib.es2015.reflect.d.ts"]=!0;i["lib.es2015.symbol.d.ts"]=!0;i["lib.es2015.symbol.wellknown.d.ts"]=!0;i["lib.es2016.array.include.d.ts"]=!0;i["lib.es2016.d.ts"]=!0;i["lib.es2016.full.d.ts"]=!0;i["lib.es2016.intl.d.ts"]=!0;i["lib.es2017.d.ts"]=!0;i["lib.es2017.date.d.ts"]=!0;i["lib.es2017.full.d.ts"]=!0;i["lib.es2017.intl.d.ts"]=!0;i["lib.es2017.object.d.ts"]=!0;i["lib.es2017.sharedmemory.d.ts"]=!0;i["lib.es2017.string.d.ts"]=!0;i["lib.es2017.typedarrays.d.ts"]=!0;i["lib.es2018.asyncgenerator.d.ts"]=!0;i["lib.es2018.asynciterable.d.ts"]=!0;i["lib.es2018.d.ts"]=!0;i["lib.es2018.full.d.ts"]=!0;i["lib.es2018.intl.d.ts"]=!0;i["lib.es2018.promise.d.ts"]=!0;i["lib.es2018.regexp.d.ts"]=!0;i["lib.es2019.array.d.ts"]=!0;i["lib.es2019.d.ts"]=!0;i["lib.es2019.full.d.ts"]=!0;i["lib.es2019.intl.d.ts"]=!0;i["lib.es2019.object.d.ts"]=!0;i["lib.es2019.string.d.ts"]=!0;i["lib.es2019.symbol.d.ts"]=!0;i["lib.es2020.bigint.d.ts"]=!0;i["lib.es2020.d.ts"]=!0;i["lib.es2020.date.d.ts"]=!0;i["lib.es2020.full.d.ts"]=!0;i["lib.es2020.intl.d.ts"]=!0;i["lib.es2020.number.d.ts"]=!0;i["lib.es2020.promise.d.ts"]=!0;i["lib.es2020.sharedmemory.d.ts"]=!0;i["lib.es2020.string.d.ts"]=!0;i["lib.es2020.symbol.wellknown.d.ts"]=!0;i["lib.es2021.d.ts"]=!0;i["lib.es2021.full.d.ts"]=!0;i["lib.es2021.intl.d.ts"]=!0;i["lib.es2021.promise.d.ts"]=!0;i["lib.es2021.string.d.ts"]=!0;i["lib.es2021.weakref.d.ts"]=!0;i["lib.es2022.array.d.ts"]=!0;i["lib.es2022.d.ts"]=!0;i["lib.es2022.error.d.ts"]=!0;i["lib.es2022.full.d.ts"]=!0;i["lib.es2022.intl.d.ts"]=!0;i["lib.es2022.object.d.ts"]=!0;i["lib.es2022.regexp.d.ts"]=!0;i["lib.es2022.sharedmemory.d.ts"]=!0;i["lib.es2022.string.d.ts"]=!0;i["lib.es2023.array.d.ts"]=!0;i["lib.es2023.collection.d.ts"]=!0;i["lib.es2023.d.ts"]=!0;i["lib.es2023.full.d.ts"]=!0;i["lib.es5.d.ts"]=!0;i["lib.es6.d.ts"]=!0;i["lib.esnext.collection.d.ts"]=!0;i["lib.esnext.d.ts"]=!0;i["lib.esnext.decorators.d.ts"]=!0;i["lib.esnext.disposable.d.ts"]=!0;i["lib.esnext.full.d.ts"]=!0;i["lib.esnext.intl.d.ts"]=!0;i["lib.esnext.object.d.ts"]=!0;i["lib.esnext.promise.d.ts"]=!0;i["lib.scripthost.d.ts"]=!0;i["lib.webworker.asynciterable.d.ts"]=!0;i["lib.webworker.d.ts"]=!0;i["lib.webworker.importscripts.d.ts"]=!0;i["lib.webworker.iterable.d.ts"]=!0;function T(e,t,r=0){if(typeof e=="string")return e;if(e===void 0)return"";let a="";if(r){a+=t;for(let n=0;n<r;n++)a+=" "}if(a+=e.messageText,r++,e.next)for(const n of e.next)a+=T(n,t,r);return a}function w(e){return e?e.map(t=>t.text).join(""):""}var y=class{constructor(e){this._worker=e}_textSpanToRange(e,t){let r=e.getPositionAt(t.start),a=e.getPositionAt(t.start+t.length),{lineNumber:n,column:l}=r,{lineNumber:u,column:s}=a;return{startLineNumber:n,startColumn:l,endLineNumber:u,endColumn:s}}},$=class{constructor(e){this._worker=e,this._libFiles={},this._hasFetchedLibFiles=!1,this._fetchLibFilesPromise=null}isLibFile(e){return e&&e.path.indexOf("/lib.")===0?!!i[e.path.slice(1)]:!1}getOrCreateModel(e){const t=o.Uri.parse(e),r=o.editor.getModel(t);if(r)return r;if(this.isLibFile(t)&&this._hasFetchedLibFiles)return o.editor.createModel(this._libFiles[t.path.slice(1)],"typescript",t);const a=I.getExtraLibs()[e];return a?o.editor.createModel(a.content,"typescript",t):null}_containsLibFile(e){for(let t of e)if(this.isLibFile(t))return!0;return!1}async fetchLibFilesIfNecessary(e){this._containsLibFile(e)&&await this._fetchLibFiles()}_fetchLibFiles(){return this._fetchLibFilesPromise||(this._fetchLibFilesPromise=this._worker().then(e=>e.getLibFiles()).then(e=>{this._hasFetchedLibFiles=!0,this._libFiles=e})),this._fetchLibFilesPromise}},z=class extends y{constructor(e,t,r,a){super(a),this._libFiles=e,this._defaults=t,this._selector=r,this._disposables=[],this._listener=Object.create(null);const n=s=>{if(s.getLanguageId()!==r)return;const c=()=>{const{onlyVisible:h}=this._defaults.getDiagnosticsOptions();h?s.isAttachedToEditor()&&this._doValidate(s):this._doValidate(s)};let g;const d=s.onDidChangeContent(()=>{clearTimeout(g),g=window.setTimeout(c,500)}),b=s.onDidChangeAttached(()=>{const{onlyVisible:h}=this._defaults.getDiagnosticsOptions();h&&(s.isAttachedToEditor()?c():o.editor.setModelMarkers(s,this._selector,[]))});this._listener[s.uri.toString()]={dispose(){d.dispose(),b.dispose(),clearTimeout(g)}},c()},l=s=>{o.editor.setModelMarkers(s,this._selector,[]);const c=s.uri.toString();this._listener[c]&&(this._listener[c].dispose(),delete this._listener[c])};this._disposables.push(o.editor.onDidCreateModel(s=>n(s))),this._disposables.push(o.editor.onWillDisposeModel(l)),this._disposables.push(o.editor.onDidChangeModelLanguage(s=>{l(s.model),n(s.model)})),this._disposables.push({dispose(){for(const s of o.editor.getModels())l(s)}});const u=()=>{for(const s of o.editor.getModels())l(s),n(s)};this._disposables.push(this._defaults.onDidChange(u)),this._disposables.push(this._defaults.onDidExtraLibsChange(u)),o.editor.getModels().forEach(s=>n(s))}dispose(){this._disposables.forEach(e=>e&&e.dispose()),this._disposables=[]}async _doValidate(e){const t=await this._worker(e.uri);if(e.isDisposed())return;const r=[],{noSyntaxValidation:a,noSemanticValidation:n,noSuggestionDiagnostics:l}=this._defaults.getDiagnosticsOptions();a||r.push(t.getSyntacticDiagnostics(e.uri.toString())),n||r.push(t.getSemanticDiagnostics(e.uri.toString())),l||r.push(t.getSuggestionDiagnostics(e.uri.toString()));const u=await Promise.all(r);if(!u||e.isDisposed())return;const s=u.reduce((g,d)=>d.concat(g),[]).filter(g=>(this._defaults.getDiagnosticsOptions().diagnosticCodesToIgnore||[]).indexOf(g.code)===-1),c=s.map(g=>g.relatedInformation||[]).reduce((g,d)=>d.concat(g),[]).map(g=>g.file?o.Uri.parse(g.file.fileName):null);await this._libFiles.fetchLibFilesIfNecessary(c),!e.isDisposed()&&o.editor.setModelMarkers(e,this._selector,s.map(g=>this._convertDiagnostics(e,g)))}_convertDiagnostics(e,t){const r=t.start||0,a=t.length||1,{lineNumber:n,column:l}=e.getPositionAt(r),{lineNumber:u,column:s}=e.getPositionAt(r+a),c=[];return t.reportsUnnecessary&&c.push(o.MarkerTag.Unnecessary),t.reportsDeprecated&&c.push(o.MarkerTag.Deprecated),{severity:this._tsDiagnosticCategoryToMarkerSeverity(t.category),startLineNumber:n,startColumn:l,endLineNumber:u,endColumn:s,message:T(t.messageText,`
2
2
  `),code:t.code.toString(),tags:c,relatedInformation:this._convertRelatedInformation(e,t.relatedInformation)}}_convertRelatedInformation(e,t){if(!t)return[];const r=[];return t.forEach(a=>{let n=e;if(a.file&&(n=this._libFiles.getOrCreateModel(a.file.fileName)),!n)return;const l=a.start||0,u=a.length||1,{lineNumber:s,column:c}=n.getPositionAt(l),{lineNumber:g,column:d}=n.getPositionAt(l+u);r.push({resource:n.uri,startLineNumber:s,startColumn:c,endLineNumber:g,endColumn:d,message:T(a.messageText,`
3
3
  `)})}),r}_tsDiagnosticCategoryToMarkerSeverity(e){switch(e){case 1:return o.MarkerSeverity.Error;case 3:return o.MarkerSeverity.Info;case 0:return o.MarkerSeverity.Warning;case 2:return o.MarkerSeverity.Hint}return o.MarkerSeverity.Info}},G=class C extends y{get triggerCharacters(){return["."]}async provideCompletionItems(t,r,a,n){const l=t.getWordUntilPosition(r),u=new o.Range(r.lineNumber,l.startColumn,r.lineNumber,l.endColumn),s=t.uri,c=t.getOffsetAt(r),g=await this._worker(s);if(t.isDisposed())return;const d=await g.getCompletionsAtPosition(s.toString(),c);return!d||t.isDisposed()?void 0:{suggestions:d.entries.map(h=>{let _=u;if(h.replacementSpan){const S=t.getPositionAt(h.replacementSpan.start),x=t.getPositionAt(h.replacementSpan.start+h.replacementSpan.length);_=new o.Range(S.lineNumber,S.column,x.lineNumber,x.column)}const v=[];return h.kindModifiers!==void 0&&h.kindModifiers.indexOf("deprecated")!==-1&&v.push(o.languages.CompletionItemTag.Deprecated),{uri:s,position:r,offset:c,range:_,label:h.name,insertText:h.name,sortText:h.sortText,kind:C.convertKind(h.kind),tags:v}})}}async resolveCompletionItem(t,r){const a=t,n=a.uri,l=a.position,u=a.offset,c=await(await this._worker(n)).getCompletionEntryDetails(n.toString(),u,a.label);return c?{uri:n,position:l,label:c.name,kind:C.convertKind(c.kind),detail:w(c.displayParts),documentation:{value:C.createDocumentationString(c)}}:a}static convertKind(t){switch(t){case f.primitiveType:case f.keyword:return o.languages.CompletionItemKind.Keyword;case f.variable:case f.localVariable:return o.languages.CompletionItemKind.Variable;case f.memberVariable:case f.memberGetAccessor:case f.memberSetAccessor:return o.languages.CompletionItemKind.Field;case f.function:case f.memberFunction:case f.constructSignature:case f.callSignature:case f.indexSignature:return o.languages.CompletionItemKind.Function;case f.enum:return o.languages.CompletionItemKind.Enum;case f.module:return o.languages.CompletionItemKind.Module;case f.class:return o.languages.CompletionItemKind.Class;case f.interface:return o.languages.CompletionItemKind.Interface;case f.warning:return o.languages.CompletionItemKind.File}return o.languages.CompletionItemKind.Property}static createDocumentationString(t){let r=w(t.documentation);if(t.tags)for(const a of t.tags)r+=`
4
4
 
@@ -1 +1 @@
1
- import{m as s}from"./monacoSetup-C4aSY1Tw.js";import"./index-C4fO68cu.js";var c=Object.defineProperty,a=Object.getOwnPropertyDescriptor,p=Object.getOwnPropertyNames,g=Object.prototype.hasOwnProperty,l=(t,e,o,i)=>{if(e&&typeof e=="object"||typeof e=="function")for(let n of p(e))!g.call(t,n)&&n!==o&&c(t,n,{get:()=>e[n],enumerable:!(i=a(e,n))||i.enumerable});return t},d=(t,e,o)=>(l(t,e,"default"),o),r={};d(r,s);var b={wordPattern:/(-?\d*\.\d\w*)|([^\`\~\!\@\#\%\^\&\*\(\)\-\=\+\[\{\]\}\\\|\;\:\'\"\,\.\<\>\/\?\s]+)/g,comments:{lineComment:"//",blockComment:["/*","*/"]},brackets:[["{","}"],["[","]"],["(",")"]],onEnterRules:[{beforeText:/^\s*\/\*\*(?!\/)([^\*]|\*(?!\/))*$/,afterText:/^\s*\*\/$/,action:{indentAction:r.languages.IndentAction.IndentOutdent,appendText:" * "}},{beforeText:/^\s*\/\*\*(?!\/)([^\*]|\*(?!\/))*$/,action:{indentAction:r.languages.IndentAction.None,appendText:" * "}},{beforeText:/^(\t|(\ \ ))*\ \*(\ ([^\*]|\*(?!\/))*)?$/,action:{indentAction:r.languages.IndentAction.None,appendText:"* "}},{beforeText:/^(\t|(\ \ ))*\ \*\/\s*$/,action:{indentAction:r.languages.IndentAction.None,removeText:1}}],autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"',notIn:["string"]},{open:"'",close:"'",notIn:["string","comment"]},{open:"`",close:"`",notIn:["string","comment"]},{open:"/**",close:" */",notIn:["string"]}],folding:{markers:{start:new RegExp("^\\s*//\\s*#?region\\b"),end:new RegExp("^\\s*//\\s*#?endregion\\b")}}},u={defaultToken:"invalid",tokenPostfix:".ts",keywords:["abstract","any","as","asserts","bigint","boolean","break","case","catch","class","continue","const","constructor","debugger","declare","default","delete","do","else","enum","export","extends","false","finally","for","from","function","get","if","implements","import","in","infer","instanceof","interface","is","keyof","let","module","namespace","never","new","null","number","object","out","package","private","protected","public","override","readonly","require","global","return","satisfies","set","static","string","super","switch","symbol","this","throw","true","try","type","typeof","undefined","unique","unknown","var","void","while","with","yield","async","await","of"],operators:["<=",">=","==","!=","===","!==","=>","+","-","**","*","/","%","++","--","<<","</",">>",">>>","&","|","^","!","~","&&","||","??","?",":","=","+=","-=","*=","**=","/=","%=","<<=",">>=",">>>=","&=","|=","^=","@"],symbols:/[=><!~?:&|+\-*\/\^%]+/,escapes:/\\(?:[abfnrtv\\"']|x[0-9A-Fa-f]{1,4}|u[0-9A-Fa-f]{4}|U[0-9A-Fa-f]{8})/,digits:/\d+(_+\d+)*/,octaldigits:/[0-7]+(_+[0-7]+)*/,binarydigits:/[0-1]+(_+[0-1]+)*/,hexdigits:/[[0-9a-fA-F]+(_+[0-9a-fA-F]+)*/,regexpctl:/[(){}\[\]\$\^|\-*+?\.]/,regexpesc:/\\(?:[bBdDfnrstvwWn0\\\/]|@regexpctl|c[A-Z]|x[0-9a-fA-F]{2}|u[0-9a-fA-F]{4})/,tokenizer:{root:[[/[{}]/,"delimiter.bracket"],{include:"common"}],common:[[/#?[a-z_$][\w$]*/,{cases:{"@keywords":"keyword","@default":"identifier"}}],[/[A-Z][\w\$]*/,"type.identifier"],{include:"@whitespace"},[/\/(?=([^\\\/]|\\.)+\/([dgimsuy]*)(\s*)(\.|;|,|\)|\]|\}|$))/,{token:"regexp",bracket:"@open",next:"@regexp"}],[/[()\[\]]/,"@brackets"],[/[<>](?!@symbols)/,"@brackets"],[/!(?=([^=]|$))/,"delimiter"],[/@symbols/,{cases:{"@operators":"delimiter","@default":""}}],[/(@digits)[eE]([\-+]?(@digits))?/,"number.float"],[/(@digits)\.(@digits)([eE][\-+]?(@digits))?/,"number.float"],[/0[xX](@hexdigits)n?/,"number.hex"],[/0[oO]?(@octaldigits)n?/,"number.octal"],[/0[bB](@binarydigits)n?/,"number.binary"],[/(@digits)n?/,"number"],[/[;,.]/,"delimiter"],[/"([^"\\]|\\.)*$/,"string.invalid"],[/'([^'\\]|\\.)*$/,"string.invalid"],[/"/,"string","@string_double"],[/'/,"string","@string_single"],[/`/,"string","@string_backtick"]],whitespace:[[/[ \t\r\n]+/,""],[/\/\*\*(?!\/)/,"comment.doc","@jsdoc"],[/\/\*/,"comment","@comment"],[/\/\/.*$/,"comment"]],comment:[[/[^\/*]+/,"comment"],[/\*\//,"comment","@pop"],[/[\/*]/,"comment"]],jsdoc:[[/[^\/*]+/,"comment.doc"],[/\*\//,"comment.doc","@pop"],[/[\/*]/,"comment.doc"]],regexp:[[/(\{)(\d+(?:,\d*)?)(\})/,["regexp.escape.control","regexp.escape.control","regexp.escape.control"]],[/(\[)(\^?)(?=(?:[^\]\\\/]|\\.)+)/,["regexp.escape.control",{token:"regexp.escape.control",next:"@regexrange"}]],[/(\()(\?:|\?=|\?!)/,["regexp.escape.control","regexp.escape.control"]],[/[()]/,"regexp.escape.control"],[/@regexpctl/,"regexp.escape.control"],[/[^\\\/]/,"regexp"],[/@regexpesc/,"regexp.escape"],[/\\\./,"regexp.invalid"],[/(\/)([dgimsuy]*)/,[{token:"regexp",bracket:"@close",next:"@pop"},"keyword.other"]]],regexrange:[[/-/,"regexp.escape.control"],[/\^/,"regexp.invalid"],[/@regexpesc/,"regexp.escape"],[/[^\]]/,"regexp"],[/\]/,{token:"regexp.escape.control",next:"@pop",bracket:"@close"}]],string_double:[[/[^\\"]+/,"string"],[/@escapes/,"string.escape"],[/\\./,"string.escape.invalid"],[/"/,"string","@pop"]],string_single:[[/[^\\']+/,"string"],[/@escapes/,"string.escape"],[/\\./,"string.escape.invalid"],[/'/,"string","@pop"]],string_backtick:[[/\$\{/,{token:"delimiter.bracket",next:"@bracketCounting"}],[/[^\\`$]+/,"string"],[/@escapes/,"string.escape"],[/\\./,"string.escape.invalid"],[/`/,"string","@pop"]],bracketCounting:[[/\{/,"delimiter.bracket","@bracketCounting"],[/\}/,"delimiter.bracket","@pop"],{include:"common"}]}};export{b as conf,u as language};
1
+ import{m as s}from"./monacoSetup-BIbZ_vQb.js";import"./index-DGsVifiB.js";var c=Object.defineProperty,a=Object.getOwnPropertyDescriptor,p=Object.getOwnPropertyNames,g=Object.prototype.hasOwnProperty,l=(t,e,o,i)=>{if(e&&typeof e=="object"||typeof e=="function")for(let n of p(e))!g.call(t,n)&&n!==o&&c(t,n,{get:()=>e[n],enumerable:!(i=a(e,n))||i.enumerable});return t},d=(t,e,o)=>(l(t,e,"default"),o),r={};d(r,s);var b={wordPattern:/(-?\d*\.\d\w*)|([^\`\~\!\@\#\%\^\&\*\(\)\-\=\+\[\{\]\}\\\|\;\:\'\"\,\.\<\>\/\?\s]+)/g,comments:{lineComment:"//",blockComment:["/*","*/"]},brackets:[["{","}"],["[","]"],["(",")"]],onEnterRules:[{beforeText:/^\s*\/\*\*(?!\/)([^\*]|\*(?!\/))*$/,afterText:/^\s*\*\/$/,action:{indentAction:r.languages.IndentAction.IndentOutdent,appendText:" * "}},{beforeText:/^\s*\/\*\*(?!\/)([^\*]|\*(?!\/))*$/,action:{indentAction:r.languages.IndentAction.None,appendText:" * "}},{beforeText:/^(\t|(\ \ ))*\ \*(\ ([^\*]|\*(?!\/))*)?$/,action:{indentAction:r.languages.IndentAction.None,appendText:"* "}},{beforeText:/^(\t|(\ \ ))*\ \*\/\s*$/,action:{indentAction:r.languages.IndentAction.None,removeText:1}}],autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"',notIn:["string"]},{open:"'",close:"'",notIn:["string","comment"]},{open:"`",close:"`",notIn:["string","comment"]},{open:"/**",close:" */",notIn:["string"]}],folding:{markers:{start:new RegExp("^\\s*//\\s*#?region\\b"),end:new RegExp("^\\s*//\\s*#?endregion\\b")}}},u={defaultToken:"invalid",tokenPostfix:".ts",keywords:["abstract","any","as","asserts","bigint","boolean","break","case","catch","class","continue","const","constructor","debugger","declare","default","delete","do","else","enum","export","extends","false","finally","for","from","function","get","if","implements","import","in","infer","instanceof","interface","is","keyof","let","module","namespace","never","new","null","number","object","out","package","private","protected","public","override","readonly","require","global","return","satisfies","set","static","string","super","switch","symbol","this","throw","true","try","type","typeof","undefined","unique","unknown","var","void","while","with","yield","async","await","of"],operators:["<=",">=","==","!=","===","!==","=>","+","-","**","*","/","%","++","--","<<","</",">>",">>>","&","|","^","!","~","&&","||","??","?",":","=","+=","-=","*=","**=","/=","%=","<<=",">>=",">>>=","&=","|=","^=","@"],symbols:/[=><!~?:&|+\-*\/\^%]+/,escapes:/\\(?:[abfnrtv\\"']|x[0-9A-Fa-f]{1,4}|u[0-9A-Fa-f]{4}|U[0-9A-Fa-f]{8})/,digits:/\d+(_+\d+)*/,octaldigits:/[0-7]+(_+[0-7]+)*/,binarydigits:/[0-1]+(_+[0-1]+)*/,hexdigits:/[[0-9a-fA-F]+(_+[0-9a-fA-F]+)*/,regexpctl:/[(){}\[\]\$\^|\-*+?\.]/,regexpesc:/\\(?:[bBdDfnrstvwWn0\\\/]|@regexpctl|c[A-Z]|x[0-9a-fA-F]{2}|u[0-9a-fA-F]{4})/,tokenizer:{root:[[/[{}]/,"delimiter.bracket"],{include:"common"}],common:[[/#?[a-z_$][\w$]*/,{cases:{"@keywords":"keyword","@default":"identifier"}}],[/[A-Z][\w\$]*/,"type.identifier"],{include:"@whitespace"},[/\/(?=([^\\\/]|\\.)+\/([dgimsuy]*)(\s*)(\.|;|,|\)|\]|\}|$))/,{token:"regexp",bracket:"@open",next:"@regexp"}],[/[()\[\]]/,"@brackets"],[/[<>](?!@symbols)/,"@brackets"],[/!(?=([^=]|$))/,"delimiter"],[/@symbols/,{cases:{"@operators":"delimiter","@default":""}}],[/(@digits)[eE]([\-+]?(@digits))?/,"number.float"],[/(@digits)\.(@digits)([eE][\-+]?(@digits))?/,"number.float"],[/0[xX](@hexdigits)n?/,"number.hex"],[/0[oO]?(@octaldigits)n?/,"number.octal"],[/0[bB](@binarydigits)n?/,"number.binary"],[/(@digits)n?/,"number"],[/[;,.]/,"delimiter"],[/"([^"\\]|\\.)*$/,"string.invalid"],[/'([^'\\]|\\.)*$/,"string.invalid"],[/"/,"string","@string_double"],[/'/,"string","@string_single"],[/`/,"string","@string_backtick"]],whitespace:[[/[ \t\r\n]+/,""],[/\/\*\*(?!\/)/,"comment.doc","@jsdoc"],[/\/\*/,"comment","@comment"],[/\/\/.*$/,"comment"]],comment:[[/[^\/*]+/,"comment"],[/\*\//,"comment","@pop"],[/[\/*]/,"comment"]],jsdoc:[[/[^\/*]+/,"comment.doc"],[/\*\//,"comment.doc","@pop"],[/[\/*]/,"comment.doc"]],regexp:[[/(\{)(\d+(?:,\d*)?)(\})/,["regexp.escape.control","regexp.escape.control","regexp.escape.control"]],[/(\[)(\^?)(?=(?:[^\]\\\/]|\\.)+)/,["regexp.escape.control",{token:"regexp.escape.control",next:"@regexrange"}]],[/(\()(\?:|\?=|\?!)/,["regexp.escape.control","regexp.escape.control"]],[/[()]/,"regexp.escape.control"],[/@regexpctl/,"regexp.escape.control"],[/[^\\\/]/,"regexp"],[/@regexpesc/,"regexp.escape"],[/\\\./,"regexp.invalid"],[/(\/)([dgimsuy]*)/,[{token:"regexp",bracket:"@close",next:"@pop"},"keyword.other"]]],regexrange:[[/-/,"regexp.escape.control"],[/\^/,"regexp.invalid"],[/@regexpesc/,"regexp.escape"],[/[^\]]/,"regexp"],[/\]/,{token:"regexp.escape.control",next:"@pop",bracket:"@close"}]],string_double:[[/[^\\"]+/,"string"],[/@escapes/,"string.escape"],[/\\./,"string.escape.invalid"],[/"/,"string","@pop"]],string_single:[[/[^\\']+/,"string"],[/@escapes/,"string.escape"],[/\\./,"string.escape.invalid"],[/'/,"string","@pop"]],string_backtick:[[/\$\{/,{token:"delimiter.bracket",next:"@bracketCounting"}],[/[^\\`$]+/,"string"],[/@escapes/,"string.escape"],[/\\./,"string.escape.invalid"],[/`/,"string","@pop"]],bracketCounting:[[/\{/,"delimiter.bracket","@bracketCounting"],[/\}/,"delimiter.bracket","@pop"],{include:"common"}]}};export{b as conf,u as language};
@@ -1 +1 @@
1
- import{m as r}from"./monacoSetup-C4aSY1Tw.js";import"./index-C4fO68cu.js";var m=Object.defineProperty,c=Object.getOwnPropertyDescriptor,l=Object.getOwnPropertyNames,d=Object.prototype.hasOwnProperty,p=(t,e,o,i)=>{if(e&&typeof e=="object"||typeof e=="function")for(let n of l(e))!d.call(t,n)&&n!==o&&m(t,n,{get:()=>e[n],enumerable:!(i=c(e,n))||i.enumerable});return t},s=(t,e,o)=>(p(t,e,"default"),o),a={};s(a,r);var k={comments:{blockComment:["<!--","-->"]},brackets:[["<",">"]],autoClosingPairs:[{open:"<",close:">"},{open:"'",close:"'"},{open:'"',close:'"'}],surroundingPairs:[{open:"<",close:">"},{open:"'",close:"'"},{open:'"',close:'"'}],onEnterRules:[{beforeText:new RegExp("<([_:\\w][_:\\w-.\\d]*)([^/>]*(?!/)>)[^<]*$","i"),afterText:/^<\/([_:\w][_:\w-.\d]*)\s*>$/i,action:{indentAction:a.languages.IndentAction.IndentOutdent}},{beforeText:new RegExp("<(\\w[\\w\\d]*)([^/>]*(?!/)>)[^<]*$","i"),action:{indentAction:a.languages.IndentAction.Indent}}]},_={defaultToken:"",tokenPostfix:".xml",ignoreCase:!0,qualifiedName:/(?:[\w\.\-]+:)?[\w\.\-]+/,tokenizer:{root:[[/[^<&]+/,""],{include:"@whitespace"},[/(<)(@qualifiedName)/,[{token:"delimiter"},{token:"tag",next:"@tag"}]],[/(<\/)(@qualifiedName)(\s*)(>)/,[{token:"delimiter"},{token:"tag"},"",{token:"delimiter"}]],[/(<\?)(@qualifiedName)/,[{token:"delimiter"},{token:"metatag",next:"@tag"}]],[/(<\!)(@qualifiedName)/,[{token:"delimiter"},{token:"metatag",next:"@tag"}]],[/<\!\[CDATA\[/,{token:"delimiter.cdata",next:"@cdata"}],[/&\w+;/,"string.escape"]],cdata:[[/[^\]]+/,""],[/\]\]>/,{token:"delimiter.cdata",next:"@pop"}],[/\]/,""]],tag:[[/[ \t\r\n]+/,""],[/(@qualifiedName)(\s*=\s*)("[^"]*"|'[^']*')/,["attribute.name","","attribute.value"]],[/(@qualifiedName)(\s*=\s*)("[^">?\/]*|'[^'>?\/]*)(?=[\?\/]\>)/,["attribute.name","","attribute.value"]],[/(@qualifiedName)(\s*=\s*)("[^">]*|'[^'>]*)/,["attribute.name","","attribute.value"]],[/@qualifiedName/,"attribute.name"],[/\?>/,{token:"delimiter",next:"@pop"}],[/(\/)(>)/,[{token:"tag"},{token:"delimiter",next:"@pop"}]],[/>/,{token:"delimiter",next:"@pop"}]],whitespace:[[/[ \t\r\n]+/,""],[/<!--/,{token:"comment",next:"@comment"}]],comment:[[/[^<\-]+/,"comment.content"],[/-->/,{token:"comment",next:"@pop"}],[/<!--/,"comment.content.invalid"],[/[<\-]/,"comment.content"]]}};export{k as conf,_ as language};
1
+ import{m as r}from"./monacoSetup-BIbZ_vQb.js";import"./index-DGsVifiB.js";var m=Object.defineProperty,c=Object.getOwnPropertyDescriptor,l=Object.getOwnPropertyNames,d=Object.prototype.hasOwnProperty,p=(t,e,o,i)=>{if(e&&typeof e=="object"||typeof e=="function")for(let n of l(e))!d.call(t,n)&&n!==o&&m(t,n,{get:()=>e[n],enumerable:!(i=c(e,n))||i.enumerable});return t},s=(t,e,o)=>(p(t,e,"default"),o),a={};s(a,r);var k={comments:{blockComment:["<!--","-->"]},brackets:[["<",">"]],autoClosingPairs:[{open:"<",close:">"},{open:"'",close:"'"},{open:'"',close:'"'}],surroundingPairs:[{open:"<",close:">"},{open:"'",close:"'"},{open:'"',close:'"'}],onEnterRules:[{beforeText:new RegExp("<([_:\\w][_:\\w-.\\d]*)([^/>]*(?!/)>)[^<]*$","i"),afterText:/^<\/([_:\w][_:\w-.\d]*)\s*>$/i,action:{indentAction:a.languages.IndentAction.IndentOutdent}},{beforeText:new RegExp("<(\\w[\\w\\d]*)([^/>]*(?!/)>)[^<]*$","i"),action:{indentAction:a.languages.IndentAction.Indent}}]},_={defaultToken:"",tokenPostfix:".xml",ignoreCase:!0,qualifiedName:/(?:[\w\.\-]+:)?[\w\.\-]+/,tokenizer:{root:[[/[^<&]+/,""],{include:"@whitespace"},[/(<)(@qualifiedName)/,[{token:"delimiter"},{token:"tag",next:"@tag"}]],[/(<\/)(@qualifiedName)(\s*)(>)/,[{token:"delimiter"},{token:"tag"},"",{token:"delimiter"}]],[/(<\?)(@qualifiedName)/,[{token:"delimiter"},{token:"metatag",next:"@tag"}]],[/(<\!)(@qualifiedName)/,[{token:"delimiter"},{token:"metatag",next:"@tag"}]],[/<\!\[CDATA\[/,{token:"delimiter.cdata",next:"@cdata"}],[/&\w+;/,"string.escape"]],cdata:[[/[^\]]+/,""],[/\]\]>/,{token:"delimiter.cdata",next:"@pop"}],[/\]/,""]],tag:[[/[ \t\r\n]+/,""],[/(@qualifiedName)(\s*=\s*)("[^"]*"|'[^']*')/,["attribute.name","","attribute.value"]],[/(@qualifiedName)(\s*=\s*)("[^">?\/]*|'[^'>?\/]*)(?=[\?\/]\>)/,["attribute.name","","attribute.value"]],[/(@qualifiedName)(\s*=\s*)("[^">]*|'[^'>]*)/,["attribute.name","","attribute.value"]],[/@qualifiedName/,"attribute.name"],[/\?>/,{token:"delimiter",next:"@pop"}],[/(\/)(>)/,[{token:"tag"},{token:"delimiter",next:"@pop"}]],[/>/,{token:"delimiter",next:"@pop"}]],whitespace:[[/[ \t\r\n]+/,""],[/<!--/,{token:"comment",next:"@comment"}]],comment:[[/[^<\-]+/,"comment.content"],[/-->/,{token:"comment",next:"@pop"}],[/<!--/,"comment.content.invalid"],[/[<\-]/,"comment.content"]]}};export{k as conf,_ as language};
@@ -1 +1 @@
1
- import{m as l}from"./monacoSetup-C4aSY1Tw.js";import"./index-C4fO68cu.js";var i=Object.defineProperty,c=Object.getOwnPropertyDescriptor,u=Object.getOwnPropertyNames,s=Object.prototype.hasOwnProperty,d=(n,e,r,o)=>{if(e&&typeof e=="object"||typeof e=="function")for(let t of u(e))!s.call(n,t)&&t!==r&&i(n,t,{get:()=>e[t],enumerable:!(o=c(e,t))||o.enumerable});return n},m=(n,e,r)=>(d(n,e,"default"),r),a={};m(a,l);var f={comments:{lineComment:"#"},brackets:[["{","}"],["[","]"],["(",")"]],autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"}],surroundingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"}],folding:{offSide:!0},onEnterRules:[{beforeText:/:\s*$/,action:{indentAction:a.languages.IndentAction.Indent}}]},g={tokenPostfix:".yaml",brackets:[{token:"delimiter.bracket",open:"{",close:"}"},{token:"delimiter.square",open:"[",close:"]"}],keywords:["true","True","TRUE","false","False","FALSE","null","Null","Null","~"],numberInteger:/(?:0|[+-]?[0-9]+)/,numberFloat:/(?:0|[+-]?[0-9]+)(?:\.[0-9]+)?(?:e[-+][1-9][0-9]*)?/,numberOctal:/0o[0-7]+/,numberHex:/0x[0-9a-fA-F]+/,numberInfinity:/[+-]?\.(?:inf|Inf|INF)/,numberNaN:/\.(?:nan|Nan|NAN)/,numberDate:/\d{4}-\d\d-\d\d([Tt ]\d\d:\d\d:\d\d(\.\d+)?(( ?[+-]\d\d?(:\d\d)?)|Z)?)?/,escapes:/\\(?:[btnfr\\"']|[0-7][0-7]?|[0-3][0-7]{2})/,tokenizer:{root:[{include:"@whitespace"},{include:"@comment"},[/%[^ ]+.*$/,"meta.directive"],[/---/,"operators.directivesEnd"],[/\.{3}/,"operators.documentEnd"],[/[-?:](?= )/,"operators"],{include:"@anchor"},{include:"@tagHandle"},{include:"@flowCollections"},{include:"@blockStyle"},[/@numberInteger(?![ \t]*\S+)/,"number"],[/@numberFloat(?![ \t]*\S+)/,"number.float"],[/@numberOctal(?![ \t]*\S+)/,"number.octal"],[/@numberHex(?![ \t]*\S+)/,"number.hex"],[/@numberInfinity(?![ \t]*\S+)/,"number.infinity"],[/@numberNaN(?![ \t]*\S+)/,"number.nan"],[/@numberDate(?![ \t]*\S+)/,"number.date"],[/(".*?"|'.*?'|[^#'"]*?)([ \t]*)(:)( |$)/,["type","white","operators","white"]],{include:"@flowScalars"},[/.+?(?=(\s+#|$))/,{cases:{"@keywords":"keyword","@default":"string"}}]],object:[{include:"@whitespace"},{include:"@comment"},[/\}/,"@brackets","@pop"],[/,/,"delimiter.comma"],[/:(?= )/,"operators"],[/(?:".*?"|'.*?'|[^,\{\[]+?)(?=: )/,"type"],{include:"@flowCollections"},{include:"@flowScalars"},{include:"@tagHandle"},{include:"@anchor"},{include:"@flowNumber"},[/[^\},]+/,{cases:{"@keywords":"keyword","@default":"string"}}]],array:[{include:"@whitespace"},{include:"@comment"},[/\]/,"@brackets","@pop"],[/,/,"delimiter.comma"],{include:"@flowCollections"},{include:"@flowScalars"},{include:"@tagHandle"},{include:"@anchor"},{include:"@flowNumber"},[/[^\],]+/,{cases:{"@keywords":"keyword","@default":"string"}}]],multiString:[[/^( +).+$/,"string","@multiStringContinued.$1"]],multiStringContinued:[[/^( *).+$/,{cases:{"$1==$S2":"string","@default":{token:"@rematch",next:"@popall"}}}]],whitespace:[[/[ \t\r\n]+/,"white"]],comment:[[/#.*$/,"comment"]],flowCollections:[[/\[/,"@brackets","@array"],[/\{/,"@brackets","@object"]],flowScalars:[[/"([^"\\]|\\.)*$/,"string.invalid"],[/'([^'\\]|\\.)*$/,"string.invalid"],[/'[^']*'/,"string"],[/"/,"string","@doubleQuotedString"]],doubleQuotedString:[[/[^\\"]+/,"string"],[/@escapes/,"string.escape"],[/\\./,"string.escape.invalid"],[/"/,"string","@pop"]],blockStyle:[[/[>|][0-9]*[+-]?$/,"operators","@multiString"]],flowNumber:[[/@numberInteger(?=[ \t]*[,\]\}])/,"number"],[/@numberFloat(?=[ \t]*[,\]\}])/,"number.float"],[/@numberOctal(?=[ \t]*[,\]\}])/,"number.octal"],[/@numberHex(?=[ \t]*[,\]\}])/,"number.hex"],[/@numberInfinity(?=[ \t]*[,\]\}])/,"number.infinity"],[/@numberNaN(?=[ \t]*[,\]\}])/,"number.nan"],[/@numberDate(?=[ \t]*[,\]\}])/,"number.date"]],tagHandle:[[/\![^ ]*/,"tag"]],anchor:[[/[&*][^ ]+/,"namespace"]]}};export{f as conf,g as language};
1
+ import{m as l}from"./monacoSetup-BIbZ_vQb.js";import"./index-DGsVifiB.js";var i=Object.defineProperty,c=Object.getOwnPropertyDescriptor,u=Object.getOwnPropertyNames,s=Object.prototype.hasOwnProperty,d=(n,e,r,o)=>{if(e&&typeof e=="object"||typeof e=="function")for(let t of u(e))!s.call(n,t)&&t!==r&&i(n,t,{get:()=>e[t],enumerable:!(o=c(e,t))||o.enumerable});return n},m=(n,e,r)=>(d(n,e,"default"),r),a={};m(a,l);var f={comments:{lineComment:"#"},brackets:[["{","}"],["[","]"],["(",")"]],autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"}],surroundingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"}],folding:{offSide:!0},onEnterRules:[{beforeText:/:\s*$/,action:{indentAction:a.languages.IndentAction.Indent}}]},g={tokenPostfix:".yaml",brackets:[{token:"delimiter.bracket",open:"{",close:"}"},{token:"delimiter.square",open:"[",close:"]"}],keywords:["true","True","TRUE","false","False","FALSE","null","Null","Null","~"],numberInteger:/(?:0|[+-]?[0-9]+)/,numberFloat:/(?:0|[+-]?[0-9]+)(?:\.[0-9]+)?(?:e[-+][1-9][0-9]*)?/,numberOctal:/0o[0-7]+/,numberHex:/0x[0-9a-fA-F]+/,numberInfinity:/[+-]?\.(?:inf|Inf|INF)/,numberNaN:/\.(?:nan|Nan|NAN)/,numberDate:/\d{4}-\d\d-\d\d([Tt ]\d\d:\d\d:\d\d(\.\d+)?(( ?[+-]\d\d?(:\d\d)?)|Z)?)?/,escapes:/\\(?:[btnfr\\"']|[0-7][0-7]?|[0-3][0-7]{2})/,tokenizer:{root:[{include:"@whitespace"},{include:"@comment"},[/%[^ ]+.*$/,"meta.directive"],[/---/,"operators.directivesEnd"],[/\.{3}/,"operators.documentEnd"],[/[-?:](?= )/,"operators"],{include:"@anchor"},{include:"@tagHandle"},{include:"@flowCollections"},{include:"@blockStyle"},[/@numberInteger(?![ \t]*\S+)/,"number"],[/@numberFloat(?![ \t]*\S+)/,"number.float"],[/@numberOctal(?![ \t]*\S+)/,"number.octal"],[/@numberHex(?![ \t]*\S+)/,"number.hex"],[/@numberInfinity(?![ \t]*\S+)/,"number.infinity"],[/@numberNaN(?![ \t]*\S+)/,"number.nan"],[/@numberDate(?![ \t]*\S+)/,"number.date"],[/(".*?"|'.*?'|[^#'"]*?)([ \t]*)(:)( |$)/,["type","white","operators","white"]],{include:"@flowScalars"},[/.+?(?=(\s+#|$))/,{cases:{"@keywords":"keyword","@default":"string"}}]],object:[{include:"@whitespace"},{include:"@comment"},[/\}/,"@brackets","@pop"],[/,/,"delimiter.comma"],[/:(?= )/,"operators"],[/(?:".*?"|'.*?'|[^,\{\[]+?)(?=: )/,"type"],{include:"@flowCollections"},{include:"@flowScalars"},{include:"@tagHandle"},{include:"@anchor"},{include:"@flowNumber"},[/[^\},]+/,{cases:{"@keywords":"keyword","@default":"string"}}]],array:[{include:"@whitespace"},{include:"@comment"},[/\]/,"@brackets","@pop"],[/,/,"delimiter.comma"],{include:"@flowCollections"},{include:"@flowScalars"},{include:"@tagHandle"},{include:"@anchor"},{include:"@flowNumber"},[/[^\],]+/,{cases:{"@keywords":"keyword","@default":"string"}}]],multiString:[[/^( +).+$/,"string","@multiStringContinued.$1"]],multiStringContinued:[[/^( *).+$/,{cases:{"$1==$S2":"string","@default":{token:"@rematch",next:"@popall"}}}]],whitespace:[[/[ \t\r\n]+/,"white"]],comment:[[/#.*$/,"comment"]],flowCollections:[[/\[/,"@brackets","@array"],[/\{/,"@brackets","@object"]],flowScalars:[[/"([^"\\]|\\.)*$/,"string.invalid"],[/'([^'\\]|\\.)*$/,"string.invalid"],[/'[^']*'/,"string"],[/"/,"string","@doubleQuotedString"]],doubleQuotedString:[[/[^\\"]+/,"string"],[/@escapes/,"string.escape"],[/\\./,"string.escape.invalid"],[/"/,"string","@pop"]],blockStyle:[[/[>|][0-9]*[+-]?$/,"operators","@multiString"]],flowNumber:[[/@numberInteger(?=[ \t]*[,\]\}])/,"number"],[/@numberFloat(?=[ \t]*[,\]\}])/,"number.float"],[/@numberOctal(?=[ \t]*[,\]\}])/,"number.octal"],[/@numberHex(?=[ \t]*[,\]\}])/,"number.hex"],[/@numberInfinity(?=[ \t]*[,\]\}])/,"number.infinity"],[/@numberNaN(?=[ \t]*[,\]\}])/,"number.nan"],[/@numberDate(?=[ \t]*[,\]\}])/,"number.date"]],tagHandle:[[/\![^ ]*/,"tag"]],anchor:[[/[&*][^ ]+/,"namespace"]]}};export{f as conf,g as language};
package/dist/index.html CHANGED
@@ -292,7 +292,7 @@
292
292
  --colorNeutralForegroundOnBrand: #000000;
293
293
  }
294
294
  </style>
295
- <script type="module" crossorigin src="./assets/index-C4fO68cu.js"></script>
295
+ <script type="module" crossorigin src="./assets/index-DGsVifiB.js"></script>
296
296
  </head>
297
297
  <body>
298
298
  <div id="boot-splash">
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mohsinonxrm/pptb-dataverse-request-studio",
3
- "version": "1.4.0-beta.1",
3
+ "version": "1.4.0-beta.2",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
@@ -103,5 +103,10 @@
103
103
  "typescript": "~5.9.3",
104
104
  "vite": "^7.3.3",
105
105
  "vitest": "^5.0.5"
106
+ },
107
+ "overrides": {
108
+ "monaco-editor": {
109
+ "dompurify": "3.4.17"
110
+ }
106
111
  }
107
112
  }
@@ -1 +0,0 @@
1
- import{f as B,E as H,g as Be,a as le,b as oe,s as Ue,d as L,m as ie,c as _e,r as u,u as Xe,e as Ye,h as We,i as W,j as Ve,T as He,k as Je,F as Qe,l as ze,C as je,n as Ge,M as Se,o as Ke,L as Ze,p as et,q as t,H as tt,t as at,v as st,w as ve,x as rt,y as nt,z as lt,A as E,B as R,D as ot,R as it,U as ct,S as ut,G as dt,I as J,J as ce,K as ke,N as $,O as pt,P as z,Q as mt,V as ht,W as yt,X as A,Y as F,Z as ft,_ as bt,$ as gt,a0 as xt,a1 as jt,a2 as St,a3 as vt,a4 as N,a5 as Q,a6 as kt,a7 as wt,a8 as we,a9 as Nt,aa as ue,ab as Dt,ac as de,ad as Tt}from"./index-C4fO68cu.js";const pe={eq:"Equal",ne:"NotEqual",gt:"GreaterThan",ge:"GreaterEqual",lt:"LessThan",le:"LessEqual"},Ct=new Set(["On","OnOrAfter","OnOrBefore","Today","Tomorrow","Yesterday","Last7Days","Next7Days","LastWeek","ThisWeek","NextWeek","LastMonth","ThisMonth","NextMonth","LastYear","ThisYear","NextYear","LastXHours","LastXDays","LastXWeeks","LastXMonths","LastXYears","NextXHours","NextXDays","NextXWeeks","NextXMonths","NextXYears","OlderThanXMinutes","OlderThanXHours","OlderThanXDays","OlderThanXWeeks","OlderThanXMonths","OlderThanXYears","ThisFiscalPeriod","ThisFiscalYear","LastFiscalPeriod","LastFiscalYear","NextFiscalPeriod","NextFiscalYear","LastXFiscalPeriods","LastXFiscalYears","NextXFiscalPeriods","NextXFiscalYears","InFiscalPeriod","InFiscalYear","InFiscalPeriodAndYear","InOrAfterFiscalPeriodAndYear","InOrBeforeFiscalPeriodAndYear","Between","NotBetween","In","NotIn","ContainValues","DoesNotContainValues","Above","AboveOrEqual","Under","UnderOrEqual","NotUnder","EqualUserId","NotEqualUserId","EqualBusinessId","NotEqualBusinessId","EqualRoleBusinessId","EqualUserLanguage","EqualUserTeams","EqualUserOrUserTeams","EqualUserOrUserHierarchy","EqualUserOrUserHierarchyAndTeams"]);function me(e){switch(e?.attributeType){case"Integer":case"Picklist":case"State":case"Status":case"MultiSelectPicklist":case"EntityName":return"System.Int32";case"BigInt":return"System.Int64";case"Decimal":case"Money":return"System.Decimal";case"Double":return"System.Double";case"Boolean":return"System.Boolean";case"DateTime":return"System.DateTime";case"Uniqueidentifier":case"Lookup":case"Customer":case"Owner":return"System.Guid";default:return"System.String"}}const Et=e=>e.replace(/[[%_]/g,s=>`[${s}]`);function Rt(e,s){const a=[],l=r=>{if(r.type==="rule"){if(r.col.includes("/"))return a.push(`"${r.col}" filters on a related table — not supported in a bulk delete query.`),null;if(r.valKind==="column")return a.push(`"${r.col}" compares two columns — not supported in a bulk delete query.`),null;const c=le(r.op),p=oe(e,r.col),h=r.val??"";if(c?.kind==="null-check")return{AttributeName:r.col,Operator:r.op==="is-null"?"Null":"NotNull",Values:[]};if(c?.kind==="comparison"&&pe[r.op])return{AttributeName:r.col,Operator:pe[r.op],Values:[{Type:me(p),Value:h}]};if(c?.kind==="odata-fn"){const{value:y}=Ue(h),f=Et(y),d=r.op==="contains"?`%${f}%`:r.op==="startswith"?`${f}%`:`%${f}`;return{AttributeName:r.col,Operator:r.negated?"NotLike":"Like",Values:[{Type:"System.String",Value:d}]}}return a.push(`Operator "${r.op}" on "${r.col}" has no QueryExpression mapping.`),null}if(r.type==="function"){const c=le(r.op);if(!c||!Ct.has(r.op))return a.push(`Query function "${r.op}" has no QueryExpression mapping.`),null;if(r.negated)return a.push(`"not ${r.op}" can't be expressed in a bulk delete query.`),null;if(r.col.includes("/"))return a.push(`"${r.col}" filters on a related table — not supported in a bulk delete query.`),null;const p=c.category==="hierarchy"?e.primaryKey:r.col,h=oe(e,r.col),y=c.kind==="dv-fn-array"?r.values??[]:c.kind==="dv-fn-2"?r.vals??["",""]:c.kind==="dv-fn-0"?[]:[r.val??""],f=c.kind==="dv-fn-1-int"||c.kind==="dv-fn-2"?"System.Int32":c.kind==="dv-fn-guid"?"System.Guid":me(h);return{AttributeName:p,Operator:r.op,Values:y.map(d=>({Type:f,Value:d}))}}return null},n=r=>{r.negated&&a.push('Negated groups ("not (…)") can’t be expressed in a bulk delete query.');const c={FilterOperator:r.combinator==="or"?"Or":"And",Conditions:[],Filters:[]};for(const p of r.rules)if(p.type==="group")c.Filters.push(n(p));else if(p.type==="lambda")a.push(`"${p.nav}/${p.lambda}(…)" filters on related records — not supported in a bulk delete query.`);else{const h=l(p);h&&c.Conditions.push(h)}return c},i=n(s);return{query:a.length?null:{EntityName:e.logicalName,Criteria:i},problems:a}}const $t=/^\{?[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}\}?$/i;function he(e){const s=e.split(/[\s,;]+/).map(n=>n.trim()).filter(Boolean),a=[],l=[];for(const n of s)$t.test(n)?a.push(n.replace(/^\{|\}$/g,"").toLowerCase()):l.push(n);return{ids:[...new Set(a)],invalid:l}}const ye=e=>({"@odata.type":"Microsoft.Dynamics.CRM.activityparty",activitypartyid:e});function Ne(e){return e&&e>0?`FREQ=DAILY;INTERVAL=${Math.floor(e)}`:""}function Ot(e,s){if(e.startMode==="at"&&e.startAt){const a=new Date(e.startAt);if(!Number.isNaN(a.getTime()))return a.toISOString()}return s.toISOString()}function At(e){const s=a=>String(a).padStart(2,"0");return`${e.getFullYear()}-${s(e.getMonth()+1)}-${s(e.getDate())} ${s(e.getHours())}:${s(e.getMinutes())}`}function De(e,s){return`DRS bulk delete · ${e||"table"} · ${At(s)}`}function Te(e,s){const a=B(e.table);if(!a)return{body:null,problems:["Pick a target table first."],deletesAll:!1};const{query:l,problems:n}=Rt(a,e.filter),i=he(e.toRecipients),r=he(e.ccRecipients),c=[...n];e.jobName.trim()||c.push("Give the job a name."),(i.invalid.length||r.invalid.length)&&c.push(`Not a systemuser id: ${[...i.invalid,...r.invalid].join(", ")}`),e.sendEmail&&i.ids.length===0&&c.push("Email notification needs at least one To recipient (systemuser id)."),e.startMode==="at"&&Number.isNaN(new Date(e.startAt).getTime())&&c.push("Pick a valid start date and time."),e.recurrenceDays!==null&&!(e.recurrenceDays>=1)&&c.push("Recurrence must be every 1 day or more.");const p=!!l&&Ce(l.Criteria);return{body:l?{QuerySet:[l],JobName:e.jobName.trim(),SendEmailNotification:e.sendEmail,ToRecipients:e.sendEmail?i.ids.map(ye):[],CCRecipients:e.sendEmail?r.ids.map(ye):[],RecurrencePattern:Ne(e.recurrenceDays),StartDateTime:Ot(e,s)}:null,problems:c,deletesAll:p}}function Ce(e){return e.Conditions.length===0&&e.Filters.every(Ce)}function Ft(e){const s=B(e.table),a="/BulkDelete",l=`${H.apiBase}${a}`;return{relativeUrl:l,relativeNoBase:a,bytes:l.length,queryParts:[],entitySet:s?.entitySetName??"",entityLogical:s?.logicalName??""}}function Lt(e){const s=B(e.table);if(!s)return null;const a=Be(e.filter,s),l=n=>encodeURIComponent(n).replace(/%2F/g,"/").replace(/%2C/g,",").replace(/%3D/g,"=").replace(/%24/g,"$").replace(/%28/g,"(").replace(/%29/g,")").replace(/%20/g," ").replace(/%27/g,"'").replace(/%3A/g,":");return`${s.entitySetName}?$select=${s.primaryKey}&$count=true&$top=1`+(a?`&$filter=${l(a)}`:"")}const Ee=5e3,Mt={0:"Ready",1:"Suspended",2:"Locked",3:"Completed"},fe={0:"Waiting for resources",10:"Waiting",20:"In progress",21:"Pausing",22:"Canceling",30:"Succeeded",31:"Failed",32:"Canceled"};function Pt(e){return`asyncoperations(${e})?$select=name,statecode,statuscode,message,friendlymessage,createdon,startedon,completedon,postponeuntil,recurrencepattern`}function It(e){return`bulkdeleteoperations?$select=successcount,failurecount,statecode,statuscode,isrecurring&$filter=_asyncoperationid_value eq ${e}`}function qt(e){const{dirty:s,...a}=e;return a}function Bt(e,s){return{...s,...e,dirty:new Set}}const Re=e=>{const s=typeof e=="object"&&e!==null?e:{};return s.message??s.innererror?.message??String(e)};async function Ut(e){const s=Lt(e);if(!s)return{ok:!1,error:"Table metadata not loaded."};try{const l=(await L.queryData(s))["@odata.count"];return typeof l!="number"?{ok:!1,error:"The response had no @odata.count."}:{ok:!0,count:l,capped:l>=Ee}}catch(a){return{ok:!1,error:Re(a)}}}async function _t(e){const{body:s,problems:a}=Te(e,new Date);if(!s||a.length)return ie({statusCode:400,message:a[0]??"Request incomplete."},0);const l=performance.now();try{const n=await L.execute({operationName:"BulkDelete",operationType:"action",parameters:s});return{status:200,statusText:"OK",ms:Math.round(performance.now()-l),bytes:JSON.stringify(n??{}).length,ok:!0,outcome:"ok",body:n??{},headers:{"OData-Version":"4.0"}}}catch(n){return ie(n,Math.round(performance.now()-l))}}function Xt(e){if(!e||typeof e!="object")return null;const s=e.JobId;return typeof s=="string"?s:null}async function Yt(){const s=(await L.execute({operationName:"WhoAmI",operationType:"function"})).UserId;if(typeof s!="string")throw new Error("WhoAmI returned no UserId.");return s.toLowerCase()}async function Wt(e){try{const s=await L.queryData(Pt(e)),a=Array.isArray(s?.value)?s.value[0]??null:s??null;let l=null;try{l=(await L.queryData(It(e)))?.value?.[0]??null}catch{}return{job:a,operation:l}}catch(s){return{job:null,operation:null,error:Re(s)}}}const q="bulk-delete",C="bulk",be=5e3,V=120,ge=()=>({table:"",filter:ve(),jobName:"",sendEmail:!1,toRecipients:"",ccRecipients:"",startMode:"now",startAt:"",recurrenceDays:null,headers:dt()});function Kt({themeMode:e}){const s=_e(q),[a,l]=u.useState(()=>({...ge(),dirty:new Set})),{table:n}=Xe(a.table||null),{entities:i}=Ye(),[r,c]=u.useState("target"),[p,h]=u.useState("builder"),[y,f]=u.useState(null),[d,x]=u.useState(null),[w,j]=u.useState(!1),[g,D]=u.useState(!1),[U,S]=u.useState([]),[v,G]=u.useState(null),[K,Z]=u.useState(void 0),[ee,te]=u.useState(null),[_,$e]=u.useState(()=>new Date);u.useEffect(()=>{const o=window.setInterval(()=>$e(new Date),6e4);return()=>window.clearInterval(o)},[]);const k=B(a.table),O=u.useMemo(()=>Ft(a),[a,n]),{body:Oe,problems:X,deletesAll:M}=u.useMemo(()=>Te(a,_),[a,n,_]),P=u.useMemo(()=>We(a.filter),[a.filter]),ae=(o,m,Y)=>l(re=>{const ne=new Set(re.dirty);return ne.add(Y),{...re,[o]:m,dirty:ne}}),Ae=a.table?k?X.length>0?X[0]:a.headers.some(o=>o.enabled&&!o.name)?"Fix empty header name.":null:"Loading table metadata…":"Pick a target table first.",Fe=async()=>{D(!1),j(!0);const o=await _t(a);f(o),x(o.ok?Xt(o.body):null),j(!1),h("results"),S(m=>[{id:`r-${Date.now()}`,modeId:q,url:O.relativeUrl,method:"POST",ts:Date.now(),status:o.status,ms:o.ms},...m].slice(0,8)),l(m=>({...m,dirty:new Set}))},I=u.useMemo(()=>qt(a),[a]),Le=u.useMemo(()=>W(I),[I]),se=ee===null?!0:Le!==ee,Me=o=>{Z(o.id),te(W(o.state))},Pe=o=>{if(o.modeId!==q)return;const m=o.state;if(i.length>0&&!i.some(Y=>Y.logicalName===m.table)){G(`Can't load "${o.name}": table '${m.table}' isn't available in this environment.`);return}G(null),l(Bt(m,ge())),Z(o.id),te(W(m)),f(null),x(null),c("filter")};Ve(u.useMemo(()=>a.table?{state:I,modeId:q,dirty:se,lastSavedId:K,onSaved:Me,onLoadSaved:Pe}:null,[I,se,K,a.table]));const Ie=[{id:"target",label:"Target",meta:k?`${k.displayName} · ${k.entitySetName}`:"Pick a table",items:[{id:"target",icon:Je,iconFilled:He,label:k?.displayName??"Pick a table",dirty:a.dirty.has("target")}]},{id:"query",label:"Query",meta:P?`${P} condition${P===1?"":"s"}`:"all rows",items:[{id:"filter",icon:ze,iconFilled:Qe,label:"Criteria",code:!0,badge:M?"ALL":P||null,badgeAppearance:"tint",badgeColor:M?"danger":"brand",dirty:a.dirty.has("filter")}]},{id:"job",label:"Job",meta:a.recurrenceDays?`every ${a.recurrenceDays} d`:"run once",items:[{id:"job",icon:Ge,iconFilled:je,label:"Name & schedule",badge:a.startMode==="at"?"scheduled":null,dirty:a.dirty.has("job")},{id:"notify",icon:Ke,iconFilled:Se,label:"Email notification",badge:a.sendEmail?"on":null,dirty:a.dirty.has("notify")}]},{id:"headers",label:"Headers",meta:`${a.headers.filter(o=>o.enabled).length} active`,items:[{id:"headers",icon:et,iconFilled:Ze,label:"HTTP headers",badge:a.headers.filter(o=>o.enabled).length||null,dirty:a.dirty.has("headers")}]}];let T=null;switch(r){case"target":T=t.jsx(st,{table:a.table,onTableChange:o=>{l(m=>({...m,table:o,filter:ve(),jobName:m.jobName&&!m.jobName.startsWith("DRS bulk delete")?m.jobName:o?De(o,new Date):"",dirty:new Set(["target","filter"])})),f(null),x(null)},group:C,sub:"Rows of this table that match the query are deleted by an asynchronous system job. Switching the target clears the query."});break;case"filter":T=t.jsxs("div",{children:[t.jsx(Vt,{deletesAll:M,problems:X,tbl:k}),t.jsx(at,{table:a.table,tree:a.filter,setTree:o=>ae("filter",o,"filter"),group:C})]});break;case"job":T=t.jsx(Ht,{state:a,now:_,onChange:o=>l(m=>({...m,...o,dirty:new Set([...m.dirty,"job"])}))});break;case"notify":T=t.jsx(Jt,{state:a,onChange:o=>l(m=>({...m,...o,dirty:new Set([...m.dirty,"notify"])}))});break;case"headers":T=t.jsx(tt,{items:a.headers,setItems:o=>ae("headers",o,"headers"),group:C});break}const qe={method:"POST",built:O,headers:rt(a.headers,null),body:Oe??{},entityLogical:O.entityLogical};return t.jsxs(nt,{sidebar:t.jsx(ut,{type:s,urlPreview:O.relativeNoBase,sections:Ie,activeNode:r,onSelect:o=>{c(o),h("builder")},recents:U}),urlBar:t.jsx(ct,{method:"POST",url:O.relativeUrl,executeVerb:s.executeVerb,disabledReason:Ae,loading:w,onExecute:async()=>D(!0)}),children:[t.jsxs(lt,{tab:p,onTabChange:h,resultCount:null,children:[p==="builder"&&t.jsxs(t.Fragment,{children:[v&&t.jsx(E,{intent:"error",style:{marginBottom:12},children:t.jsx(R,{children:v})}),T]}),p==="code"&&t.jsx(ot,{themeMode:e,inputs:qe,group:C}),p==="results"&&(y?.ok&&d?t.jsx(zt,{jobId:d,result:y}):t.jsx(it,{result:y,mode:"single",table:a.table}))]}),g&&k&&t.jsx(Qt,{state:a,tbl:k,deletesAll:M,onCancel:()=>D(!1),onConfirm:Fe})]})}function Vt({deletesAll:e,problems:s,tbl:a}){if(!a)return null;const l=s.filter(n=>/bulk delete query|mapping/.test(n));return t.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:8,marginBottom:12},children:[e&&t.jsx(E,{intent:"error",layout:"multiline",children:t.jsxs(R,{children:[t.jsxs(J,{children:["No conditions — every ",a.displayName," row matches"]}),"Add at least one condition unless you really mean to empty the table."]})}),l.length>0&&t.jsx(E,{intent:"error",layout:"multiline",children:t.jsxs(R,{children:[t.jsx(J,{children:"Can't convert to a QueryExpression"}),t.jsx("ul",{style:{margin:"4px 0 0",paddingLeft:18},children:l.map(n=>t.jsx("li",{children:n},n))})]})}),t.jsx(E,{intent:"info",layout:"multiline",children:t.jsxs(R,{children:["BulkDelete takes a ",t.jsx("code",{children:"QueryExpression"}),", so this $filter is converted: comparisons, null checks, contains / starts / ends with (as ",t.jsx("code",{children:"Like"}),"), and the Dataverse query functions map 1:1. Related-table paths, any/all, column-to-column comparisons and negated groups or functions aren't supported. The confirmation counts matches with the same $filter before anything is submitted."]})})]})}function Ht({state:e,now:s,onChange:a}){return t.jsxs("div",{style:{maxWidth:640,display:"flex",flexDirection:"column",gap:14},children:[t.jsx(we,{icon:je,title:"Job",sub:"The bulk delete runs as a system job; it only deletes rows created before it starts.",group:C}),t.jsx(N,{label:"Job name",required:!0,children:t.jsx(Q,{value:e.jobName,placeholder:De(e.table,s),onChange:(l,n)=>a({jobName:n.value})})}),t.jsx(N,{label:"Start",children:t.jsxs(Nt,{value:e.startMode,onChange:(l,n)=>a({startMode:n.value}),children:[t.jsx(ue,{value:"now",label:"Immediately (StartDateTime = when you send)"}),t.jsx(ue,{value:"at",label:"At a specific time"})]})}),e.startMode==="at"&&t.jsx(N,{label:"Start date and time (your local time)",children:t.jsx(Q,{type:"datetime-local",value:e.startAt,onChange:(l,n)=>a({startAt:n.value})})}),t.jsx(z,{checked:e.recurrenceDays!==null,onChange:(l,n)=>a({recurrenceDays:n.checked?7:null}),label:"Repeat the job"}),e.recurrenceDays!==null&&t.jsx(N,{label:"Every N days",hint:t.jsxs(t.Fragment,{children:["RecurrencePattern ",t.jsx("code",{children:Ne(e.recurrenceDays)||"—"}),". A recurring job keeps deleting new matching rows until you cancel it in System Jobs."]}),children:t.jsx(Dt,{min:1,max:365,value:e.recurrenceDays,onChange:(l,n)=>{const i=n.value??Number(n.displayValue);Number.isFinite(i)&&a({recurrenceDays:Math.max(1,Math.floor(i))})}})})]})}function Jt({state:e,onChange:s}){const[a,l]=u.useState(null),n=async()=>{try{const i=await Yt();e.toRecipients.toLowerCase().includes(i)||s({toRecipients:[e.toRecipients.trim(),i].filter(Boolean).join(", ")}),l(null)}catch(i){l(i instanceof Error?i.message:String(i))}};return t.jsxs("div",{style:{maxWidth:640,display:"flex",flexDirection:"column",gap:14},children:[t.jsx(we,{icon:Se,title:"Email notification",sub:"Email users when the job finishes. Recipients are systemuser ids with a valid email address.",group:C}),t.jsx(z,{checked:e.sendEmail,onChange:(i,r)=>s({sendEmail:r.checked}),label:"Send an email when the job completes"}),e.sendEmail&&t.jsxs(t.Fragment,{children:[t.jsx(N,{label:"To (systemuser ids)",required:!0,hint:"Comma, space or new-line separated.",children:t.jsx(de,{value:e.toRecipients,onChange:(i,r)=>s({toRecipients:r.value}),rows:2})}),t.jsxs("div",{children:[t.jsx($,{icon:t.jsx(Tt,{}),onClick:()=>{n()},children:"Add me"}),a&&t.jsx(F,{style:{color:A.colorPaletteRedForeground1,marginLeft:8},children:a})]}),t.jsx(N,{label:"Cc (systemuser ids)",children:t.jsx(de,{value:e.ccRecipients,onChange:(i,r)=>s({ccRecipients:r.value}),rows:2})})]})]})}function Qt({state:e,tbl:s,deletesAll:a,onCancel:l,onConfirm:n}){const[i,r]=u.useState(null),[c,p]=u.useState(""),[h,y]=u.useState(!1);u.useEffect(()=>{let j=!1;return Ut(e).then(g=>{j||r(g)}),()=>{j=!0}},[]);const f=c.trim()===s.logicalName,d=i?.ok&&i.count===0,x=f&&i!==null&&(!a||h)&&!(d&&!e.recurrenceDays),w=e.startMode==="at"&&e.startAt?new Date(e.startAt).toLocaleString():"as soon as the system job runs";return t.jsx(ft,{open:!0,modalType:"alert",onOpenChange:(j,g)=>!g.open&&l(),children:t.jsx(bt,{style:{maxWidth:560},children:t.jsxs(gt,{children:[t.jsxs(xt,{children:["Delete ",s.displayName," rows in bulk?"]}),t.jsxs(jt,{style:{display:"flex",flexDirection:"column",gap:10},children:[t.jsx(E,{intent:"error",layout:"multiline",children:t.jsxs(R,{children:[t.jsx(J,{children:"This permanently deletes data"}),"Deleted rows can't be restored, related rows follow the table's cascade rules, plug-ins and flows on Delete run for every row, and a failed job doesn't roll back what it already deleted."]})}),t.jsx("div",{children:i===null?t.jsx(St,{size:"tiny",label:"Counting matching rows…",labelPosition:"after"}):i.ok?t.jsxs(ke,{weight:"semibold",size:400,children:[i.capped?`${Ee.toLocaleString()} or more`:i.count.toLocaleString()," ",s.displayName," row",i.count===1?"":"s"," match right now."]}):t.jsxs(F,{style:{color:A.colorPaletteRedForeground1},children:["Couldn't count matching rows: ",i.error]})}),d&&!e.recurrenceDays&&t.jsx(F,{children:"Nothing matches, so there's nothing to delete."}),t.jsxs(F,{children:["Job ",t.jsx("strong",{children:e.jobName||"(unnamed)"})," starts ",w,e.recurrenceDays?` and repeats every ${e.recurrenceDays} day${e.recurrenceDays===1?"":"s"}, deleting rows that match at each run`:"","."]}),a&&t.jsx(vt,{checked:h,onChange:(j,g)=>y(!!g.checked),label:`The query has no conditions — delete every ${s.displayName} row.`}),t.jsx(N,{label:t.jsxs(t.Fragment,{children:["Type the table name ",t.jsx("code",{children:s.logicalName})," to confirm"]}),children:t.jsx(Q,{value:c,onChange:(j,g)=>p(g.value),autoComplete:"off","aria-label":"Table logical name"})})]}),t.jsxs(kt,{children:[t.jsx($,{appearance:"secondary",onClick:l,children:"Cancel"}),t.jsx($,{appearance:"primary",icon:t.jsx(wt,{}),disabled:!x,onClick:n,style:x?{backgroundColor:A.colorPaletteRedBackground3,color:A.colorNeutralForegroundOnBrand}:void 0,children:"Submit bulk delete job"})]})]})})})}function xe(e){return typeof e=="number"?e:void 0}function b(e,s,a){if(!e)return"—";const l=e[`${s}@OData.Community.Display.V1.FormattedValue`];if(typeof l=="string")return l;const n=e[s];return a&&typeof n=="number"?a[n]??String(n):n==null||n===""?"—":String(n)}function zt({jobId:e,result:s}){const[a,l]=u.useState(null),[n,i]=u.useState(0),[r,c]=u.useState(!0),[p,h]=u.useState(!1),y=xe(a?.job?.statecode)===3,f=async()=>{const S=await Wt(e);l(S),i(v=>v+1)};u.useEffect(()=>{f()},[e]),u.useEffect(()=>{if(!r||y||n>=V)return;const S=window.setTimeout(()=>{f()},be);return()=>window.clearTimeout(S)},[r,y,n]);const d=a?.job??null,x=a?.operation??null,w=xe(d?.statuscode),j=w===30?"success":w===31||w===32?"danger":"info",g=H.host?`https://${H.host}/main.aspx?pagetype=entityrecord&etn=asyncoperation&id=${e}`:"",D={padding:"4px 12px 4px 0",verticalAlign:"top"},U=[["Job id",t.jsx("code",{children:e},"id")],["Name",b(d,"name")],["State",b(d,"statecode",Mt)],["Status",b(d,"statuscode",fe)],["Deleted",x?b(x,"successcount"):"—"],["Failed",x?b(x,"failurecount"):"—"],["Created",b(d,"createdon")],["Started",b(d,"startedon")],["Completed",b(d,"completedon")],["Recurrence",b(d,"recurrencepattern")],["Message",b(d,"friendlymessage")!=="—"?b(d,"friendlymessage"):b(d,"message")]];return t.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:12,maxWidth:760},children:[t.jsxs("div",{style:{display:"flex",alignItems:"center",gap:10,flexWrap:"wrap"},children:[t.jsx(ce,{status:"success",code:s.status,ms:s.ms}),t.jsx(ke,{weight:"semibold",children:"Bulk delete job submitted"}),a&&t.jsx(ce,{status:j,code:b(d,"statuscode",fe)})]}),t.jsxs("div",{style:{display:"flex",gap:8,flexWrap:"wrap",alignItems:"center"},children:[t.jsx($,{icon:t.jsx(pt,{}),onClick:()=>{f()},children:"Refresh"}),t.jsx(z,{checked:r&&!y&&n<V,disabled:y||n>=V,onChange:(S,v)=>c(v.checked),label:y?"Job completed":`Auto-refresh every ${be/1e3} s`}),t.jsx($,{icon:t.jsx(ht,{}),onClick:()=>{mt(e).then(()=>h(!0))},children:p?"Copied":"Copy job id"}),g&&t.jsx($,{as:"a",href:g,target:"_blank",rel:"noreferrer",icon:t.jsx(yt,{}),appearance:"subtle",children:"Open system job"})]}),a?.error&&t.jsx(E,{intent:"warning",children:t.jsxs(R,{children:["Couldn't read the job: ",a.error]})}),t.jsx("table",{style:{borderCollapse:"collapse",fontSize:13},children:t.jsx("tbody",{children:U.map(([S,v])=>t.jsxs("tr",{children:[t.jsx("td",{style:{...D,color:A.colorNeutralForeground3},children:S}),t.jsx("td",{style:D,children:v})]},S))})}),t.jsxs(F,{children:["Status comes from ",t.jsxs("code",{children:["asyncoperations(",e,")"]}),"; deleted / failed counts from the matching ",t.jsx("code",{children:"bulkdeleteoperations"})," row once the job has run."]})]})}export{Kt as BulkDeleteMode};
@@ -1,6 +0,0 @@
1
- import{f as P,E as Je,ae as Ze,af as we,b as Qe,d as je,m as ge,ag as Ye,c as Xe,r as y,u as et,e as tt,ah as st,ai as at,aj as rt,ak as nt,al as it,i as X,j as ot,am as ke,an as lt,T as dt,k as ct,ao as ve,ap as ut,aq as Se,ar as pt,L as ht,p as mt,as as fe,at as yt,q as t,Y as M,au as gt,H as ft,v as bt,x as be,y as xt,z as wt,A as $,B as R,D as jt,R as kt,U as vt,S as St,a8 as ae,N as k,av as Ct,aw as Ce,ax as $e,V as re,ay as te,a4 as $t,a5 as Re,az as Rt,aA as Mt,aB as It,I as Me,X as E,aC as ee,aD as Dt,a9 as Ft,aa as Nt,a2 as Bt,J as At,K as Ut,Q as Lt,Z as Tt,_ as Ot,$ as Et,a0 as Pt,a1 as qt,ac as Vt,a3 as _t,a6 as Kt,aE as zt,G as Gt,aF as Wt}from"./index-C4fO68cu.js";const Ie=["CreateMultiple","UpdateMultiple","UpsertMultiple","DeleteMultiple"],Ht=1e3,Jt=100,Zt=/^\{?[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}\}?$/i,De=s=>Zt.test(s.trim()),Fe=s=>s.trim().replace(/^\{|\}$/g,"").toLowerCase();let Qt=1;function G(s){return{id:typeof crypto<"u"&&typeof crypto.randomUUID=="function"?`row_${crypto.randomUUID()}`:`row_${Date.now().toString(36)}_${(Qt++).toString(36)}`,key:s?.key??"",fieldValues:s?.fieldValues??{},nullFields:s?.nullFields??[]}}function Yt(s){return G({key:"",fieldValues:Xt(s.fieldValues),nullFields:[...s.nullFields]})}function Xt(s){return JSON.parse(JSON.stringify(s))}const q={CreateMultiple:{label:"Create multiple",description:"Creates every row in one request and returns the new ids.",keyRequired:!1,allowsAlternateKey:!1,usesFields:!0,fieldPurpose:"create",successStatus:200},UpdateMultiple:{label:"Update multiple",description:"Updates rows addressed by their primary key (GUID). Send only changed columns.",keyRequired:!0,allowsAlternateKey:!1,usesFields:!0,fieldPurpose:"update",successStatus:204},UpsertMultiple:{label:"Upsert multiple",description:"Creates or updates each row, addressed by primary key or an alternate key. Needs a table that supports both CreateMultiple and UpdateMultiple.",keyRequired:!0,allowsAlternateKey:!0,usesFields:!0,fieldPurpose:"upsert",successStatus:204},DeleteMultiple:{label:"Delete multiple",description:"Deletes rows by primary key. Elastic tables only — for standard tables use Bulk Delete.",keyRequired:!0,allowsAlternateKey:!1,usesFields:!0,fieldPurpose:"update",successStatus:204}};function es(s,a){return Ze({table:s,fieldValues:a.fieldValues,nullFields:a.nullFields})}function ts(s,a,e){const r=q[s.operation],i={"@odata.type":`Microsoft.Dynamics.CRM.${a.logicalName}`},l=r.usesFields?es(s.table,e):{};Object.assign(i,l);const u=e.key.trim();let c;if(u?De(u)?i[a.primaryKey]=Fe(u):r.allowsAlternateKey?i["@odata.id"]=`${a.entitySetName}(${u})`:c=s.operation==="UpdateMultiple"?"Key must be a GUID — UpdateMultiple in the Web API does not accept alternate keys.":"Key must be a GUID.":r.keyRequired&&(c=s.operation==="UpsertMultiple"?"Missing key — a GUID or an alternate key such as name='value'.":"Missing primary key (GUID)."),!c&&s.operation!=="DeleteMultiple"&&Object.keys(l).length===0&&(c="No column values set."),!c&&s.operation==="CreateMultiple"){const o=ss(a,e);o.length>0&&(c=`Required column${o.length===1?"":"s"} unset: ${o.slice(0,3).join(", ")}${o.length>3?"…":""}`)}return{target:i,issue:c}}function ss(s,a){return s.columns.filter(e=>e.requiredLevel==="ApplicationRequired"&&e.isValidForCreate!==!1).filter(e=>{const r=a.fieldValues[e.logicalName];return r==null||r===""?!0:Array.isArray(r)?r.length===0:we(e)?!r?.id:!1}).map(e=>e.logicalName)}function Ne(s){const a=P(s.table);if(!a)return{body:{Targets:[]},issues:[]};const e=[],r=new Map;return{body:{Targets:s.rows.map((l,u)=>{const{target:c,issue:o}=ts(s,a,l);o&&e.push({rowIndex:u,rowId:l.id,message:o});const h=l.key.trim().toLowerCase();if(h){const p=r.get(h);p!==void 0?e.push({rowIndex:u,rowId:l.id,message:s.operation==="UpdateMultiple"?`Same key as row ${p+1} — UpdateMultiple applies only the first of them.`:`Same key as row ${p+1} — duplicate keys fail the request.`}):r.set(h,u)}return c})},issues:e}}function as(s){const a=P(s.table);if(!a)return{relativeUrl:"",relativeNoBase:"",bytes:0,queryParts:[],entitySet:"",entityLogical:""};const e=`/${a.entitySetName}/Microsoft.Dynamics.CRM.${s.operation}`,r=`${Je.apiBase}${e}`;return{relativeUrl:r,relativeNoBase:e,bytes:r.length,queryParts:[],entitySet:a.entitySetName,entityLogical:a.logicalName}}function rs(s){return s==="UpsertMultiple"?["CreateMultiple","UpdateMultiple"]:[s]}function ns(s,a){const e=r=>`'${r.replace(/'/g,"''")}'`;return`sdkmessagefilters?$select=sdkmessagefilterid&$filter=sdkmessageid/name eq ${e(s)} and primaryobjecttypecode eq ${e(a)}`}function is(s,a,e){const r=P(s.table);if(!s.table)return"Pick a target table first.";if(!r)return"Loading table metadata…";if(e.state==="unsupported")return e.message;if(s.rows.length===0)return"Add at least one row.";if(a.length>0){const i=a[0];return`Row ${i.rowIndex+1}: ${i.message}${a.length>1?` (+${a.length-1} more)`:""}`}return s.headers.some(i=>i.enabled&&!i.name)?"Fix empty header name.":null}function os(s,a,e){return s==="DeleteMultiple"?`DeleteMultiple isn't available for '${a}'. It's supported on elastic tables only — use the Bulk Delete mode (an asynchronous job) for standard tables.`:s==="UpsertMultiple"?`UpsertMultiple needs both CreateMultiple and UpdateMultiple, and '${a}' doesn't support ${e.join(" or ")}.`:`'${a}' doesn't support ${s} (no sdkmessagefilter for this table).`}const ls=new Set(["@key","key","id","@odata.id"]);function ds(s,a){const e=s.trim();if(!e)return{rows:[],skippedColumns:[],errors:[]};let r;if(e.startsWith("[")||e.startsWith("{")){let c;try{c=JSON.parse(e)}catch(h){return{rows:[],skippedColumns:[],errors:[`Invalid JSON: ${h instanceof Error?h.message:String(h)}`]}}const o=Array.isArray(c)?c:c&&typeof c=="object"?c.Targets??c.value:void 0;if(!Array.isArray(o))return{rows:[],skippedColumns:[],errors:['JSON must be an array of objects (or { "Targets": [ … ] }).']};r=o.filter(h=>!!h&&typeof h=="object")}else{const c=ys(e);if(c.length<2)return{rows:[],skippedColumns:[],errors:["CSV needs a header row and at least one data row."]};const[o,...h]=c;r=h.filter(p=>p.some(g=>g.trim()!=="")).map(p=>{const g={};return o.forEach((j,S)=>{const b=p[S];b!==void 0&&b!==""&&(g[j.trim()]=b)}),g})}const i=new Set,l=[];return{rows:r.map((c,o)=>{const h=G();for(const[p,g]of Object.entries(c)){const j=p.trim();if(j==="@odata.type"||j==="@odata.etag"||g===void 0)continue;if(ls.has(j.toLowerCase())||j.toLowerCase()===a.primaryKey){h.key=cs(String(g??""),a);continue}const S=/^(.+)@odata\.bind$/i.exec(j),b=us(a,S?S[1]:j);if(!b){i.add(j);continue}if(g===null){h.nullFields.push(b.logicalName);continue}const x=ps(b,g);"error"in x?l.push(`Row ${o+1}, ${j}: ${x.error}`):h.fieldValues[b.logicalName]=x.value}return h}),skippedColumns:[...i],errors:l}}function cs(s,a){const e=/^\/?([A-Za-z0-9_]+)\((.*)\)$/.exec(s.trim());return e&&e[1]===a.entitySetName?e[2]:s.trim()}function us(s,a){const e=a.toLowerCase(),r=Qe(s,e);if(r)return r;const i=s.columns.find(l=>we(l)&&e.startsWith(`${l.logicalName}_`));return i||s.columns.find(l=>l.displayName.toLowerCase()===e)}function xe(s,a){if(typeof a=="number")return a;const e=String(a).trim();return/^-?\d+$/.test(e)?Number(e):s.find(r=>r.label.toLowerCase()===e.toLowerCase())?.value}function ps(s,a){const e=typeof a=="string"?a.trim():a;switch(s.attributeType){case"Integer":case"BigInt":case"Decimal":case"Double":case"Money":{const r=typeof e=="number"?e:Number(String(e).replace(/,/g,""));return Number.isFinite(r)?(s.attributeType==="Integer"||s.attributeType==="BigInt")&&!Number.isInteger(r)?{error:`"${String(a)}" is not a whole number`}:{value:r}:{error:`"${String(a)}" is not a number`}}case"Boolean":{if(typeof e=="boolean")return{value:e};const r=String(e).toLowerCase();return["true","1","yes","y"].includes(r)?{value:!0}:["false","0","no","n"].includes(r)?{value:!1}:r===s.trueOption.label.toLowerCase()?{value:!0}:r===s.falseOption.label.toLowerCase()?{value:!1}:{error:`"${String(a)}" is not a yes/no value`}}case"Picklist":case"State":case"Status":case"EntityName":{const r=xe(s.options,e);return r===void 0?{error:`unknown choice "${String(a)}"`}:{value:r}}case"MultiSelectPicklist":{const r=Array.isArray(e)?e:String(e).split(/[,;]/).map(l=>l.trim()).filter(Boolean),i=[];for(const l of r){const u=xe(s.options,l);if(u===void 0)return{error:`unknown choice "${String(l)}"`};i.push(u)}return{value:i}}case"Lookup":case"Customer":case"Owner":{const r=String(e),i=/^\/?([A-Za-z0-9_]+)\(\{?([0-9a-fA-F-]{36})\}?\)$/.exec(r);if(i){const o=s.targets.find(h=>P(h)?.entitySetName===i[1]);return o?{value:{id:i[2].toLowerCase(),targetEntity:o}}:{error:`"${i[1]}" is not a target of ${s.logicalName}`}}const l=/^([A-Za-z0-9_]+):\s*(.+)$/.exec(r),u=l?l[1].toLowerCase():s.targets[0],c=l?l[2]:r;return De(c)?s.targets.includes(u)?{value:{id:Fe(c),targetEntity:u}}:{error:`"${u}" is not a target of ${s.logicalName}`}:{error:`"${r}" is not a GUID`}}case"File":case"Image":return{error:"file and image columns can’t be set in a bulk write"};default:return{value:typeof e=="string"?e:String(e)}}}function hs(s){const{dirty:a,...e}=s;return e}function ms(s,a){return{...a,...s,operation:Ie.includes(s.operation)?s.operation:"CreateMultiple",rows:(s.rows??[]).map(e=>({id:e.id||G().id,key:e.key??"",fieldValues:e.fieldValues??{},nullFields:e.nullFields??[]})),dirty:new Set}}function ys(s){const a=s.split(/\r?\n/,1)[0],e=a.includes(" ")&&!a.includes(",")?" ":",",r=[];let i=[],l="",u=!1;for(let c=0;c<s.length;c++){const o=s[c];if(u){o==='"'?s[c+1]==='"'?(l+='"',c++):u=!1:l+=o;continue}o==='"'&&l===""?u=!0:o===e?(i.push(l),l=""):o===`
2
- `||o==="\r"?(o==="\r"&&s[c+1]===`
3
- `&&c++,i.push(l),r.push(i),i=[],l=""):l+=o}return i.push(l),r.push(i),r}async function gs(s,a){try{const e=[];for(const r of rs(a))(await je.queryData(ns(r,s)))?.value?.length||e.push(r);return e.length===0?{state:"supported"}:{state:"unsupported",message:os(a,s,e)}}catch(e){return{state:"unknown",message:`Couldn't check ${a} availability: ${e instanceof Error?e.message:String(e)}`}}}async function fs(s,a){const{body:e,issues:r}=Ne(s);if(r.length>0)return ge({statusCode:400,message:`Row ${r[0].rowIndex+1}: ${r[0].message}`},0);const i=Ye(a),l=performance.now();try{const u=await je.execute({operationName:s.operation,operationType:"action",entityName:s.table,parameters:e},i),c=Math.round(performance.now()-l),o=u&&Object.keys(u).length>0?u:null;return{status:o?200:204,statusText:o?"OK":"No Content",ms:c,bytes:o?JSON.stringify(o).length:0,ok:!0,outcome:"ok",body:o,headers:{"OData-Version":"4.0"}}}catch(u){return ge(u,Math.round(performance.now()-l),i)}}function se(s){if(!s||typeof s!="object")return[];const a=s.Ids;return Array.isArray(a)?a.filter(e=>typeof e=="string"):[]}const z="bulk-write",D="bulk",A=100,bs=25,Be=()=>({table:"",operation:"CreateMultiple",rows:[],headers:Gt(),bypass:zt()}),xs=()=>({...Be(),dirty:new Set}),O=s=>`row:${s}`;function Rs({themeMode:s}){const a=Xe(z),[e,r]=y.useState(xs),{table:i}=et(e.table||null),{entities:l}=tt(),[u,c]=y.useState("target"),[o,h]=y.useState("builder"),[p,g]=y.useState(null),[j,S]=y.useState("CreateMultiple"),[b,x]=y.useState(!1),[W,H]=y.useState([]),[w,v]=y.useState({state:"idle"}),[J,F]=y.useState(!1),[I,U]=y.useState(null),[Z,V]=y.useState(void 0),[ne,ie]=y.useState(null),C=P(e.table),L=y.useMemo(()=>as(e),[e,i]),{body:Ae,issues:T}=y.useMemo(()=>Ne(e),[e,i]),Ue=q[e.operation];y.useEffect(()=>{if(!e.table){v({state:"idle"});return}if(!st()){v({state:"unknown",message:"Not connected to Power Platform ToolBox — availability not checked."});return}let n=!1;return v({state:"checking"}),gs(e.table,e.operation).then(d=>{n||v(d)}),()=>{n=!0}},[e.table,e.operation]);const oe=(n,d)=>{const m=new Set(n.dirty);return m.add(d),m},Q=(n,d,m)=>r(f=>({...f,[n]:d,dirty:oe(f,m)})),B=n=>r(d=>({...d,rows:n(d.rows),dirty:oe(d,"rows")})),le=(n,d)=>B(m=>m.map(f=>f.id===n?{...f,...d}:f)),Le=()=>G({fieldValues:C&&e.operation==="CreateMultiple"?Wt(C):{}}),Te=n=>{const d=Le();B(m=>[...m,d])},de=n=>{const d=e.rows.find(f=>f.id===n);if(!d)return;const m=Yt(d);B(f=>{const We=f.findIndex(He=>He.id===n),ye=[...f];return ye.splice(We+1,0,m),ye})},ce=n=>{B(d=>d.filter(m=>m.id!==n)),u===O(n)&&c("rows")},_=y.useMemo(()=>at(e.headers,e.bypass),[e.headers,e.bypass]),ue=y.useMemo(()=>[...rt(e.bypass,"bypass"),...nt({op:"create",bypass:e.bypass})],[e.bypass]),Oe=it(ue),Ee=is(e,T,w)??(w.state==="checking"?`Checking ${e.operation} availability…`:null),Pe=async()=>{x(!0);const n=e.operation,d=await fs(e,be(_,null));g(d),S(n),x(!1),h("results");const m=se(d.body);H(f=>[{id:`r-${Date.now()}`,modeId:z,url:L.relativeUrl,method:"POST",ts:Date.now(),status:d.status,ms:d.ms,rowCount:d.ok?m.length||e.rows.length:0},...f].slice(0,8)),r(f=>({...f,dirty:new Set}))},K=y.useMemo(()=>hs(e),[e]),qe=y.useMemo(()=>X(K),[K]),pe=ne===null?!0:qe!==ne,Ve=n=>{V(n.id),ie(X(n.state))},_e=n=>{if(n.modeId!==z)return;const d=n.state;if(l.length>0&&!l.some(m=>m.logicalName===d.table)){U(`Can't load "${n.name}": table '${d.table}' isn't available in this environment.`);return}U(null),r(ms(d,Be())),V(n.id),ie(X(d)),g(null),c("rows")};ot(y.useMemo(()=>e.table?{state:K,modeId:z,dirty:pe,lastSavedId:Z,onSaved:Ve,onLoadSaved:_e}:null,[K,pe,Z,e.table]));const Y=y.useMemo(()=>{const n=new Map;for(const d of T)n.has(d.rowId)||n.set(d.rowId,d.message);return n},[T]),he=(n,d)=>{const m=C?n.fieldValues[C.primaryName]:void 0,f=n.key||typeof m=="string"&&m||"";return f?`#${d+1} · ${f}`:`#${d+1}`},Ke=e.rows.slice(0,bs).map((n,d)=>{const m=Y.get(n.id),f=Object.keys(n.fieldValues).length+n.nullFields.length;return{id:O(n.id),icon:lt,iconFilled:ke,label:he(n,d),badge:m?"!":f||null,badgeAppearance:"tint",badgeColor:m?"danger":"success"}}),me=w.state==="supported"?{badge:"supported",color:"success"}:w.state==="unsupported"?{badge:"unsupported",color:"danger"}:w.state==="checking"?{badge:"…",color:"subtle"}:w.state==="unknown"?{badge:"?",color:"warning"}:{badge:null,color:"subtle"},ze=[{id:"target",label:"Target",meta:C?`${C.displayName} · ${C.entitySetName}`:"Pick a table",items:[{id:"target",icon:ct,iconFilled:dt,label:C?.displayName??"Pick a table",dirty:e.dirty.has("target")}]},{id:"operation",label:"Operation",meta:e.operation,items:[{id:"operation",icon:ut,iconFilled:ve,label:Ue.label,badge:me.badge,badgeAppearance:"tint",badgeColor:me.color,dirty:e.dirty.has("operation")}]},{id:"rows",label:"Rows",meta:`${e.rows.length} row${e.rows.length===1?"":"s"}`,items:[{id:"rows",icon:pt,iconFilled:Se,label:"All rows",badge:T.length||null,badgeAppearance:"tint",badgeColor:"danger",dirty:e.dirty.has("rows"),children:Ke}]},{id:"headers",label:"Headers",meta:`${_.filter(n=>n.enabled).length} active`,items:[{id:"headers",icon:mt,iconFilled:ht,label:"HTTP headers",badge:_.filter(n=>n.enabled).length||null,dirty:e.dirty.has("headers")},{id:"bypass",icon:fe,iconFilled:fe,label:"Bypass logic",badge:yt(e.bypass),badgeAppearance:e.bypass.businessLogic!=="none"||e.bypass.suppressFlows?"tint":"ghost",badgeColor:e.bypass.businessLogic!=="none"||e.bypass.suppressFlows?"warning":"subtle",dirty:e.dirty.has("bypass")}]}];let N=null;if(u.startsWith("row:")){const n=e.rows.findIndex(m=>O(m.id)===u),d=e.rows[n];N=d?t.jsx(vs,{row:d,index:n,count:e.rows.length,table:e.table,tbl:C,operation:e.operation,issue:Y.get(d.id),themeMode:s,onPatch:m=>le(d.id,m),onNavigate:m=>c(O(e.rows[m].id)),onBack:()=>c("rows"),onDuplicate:()=>de(d.id),onRemove:()=>ce(d.id)},d.id):t.jsx(M,{children:"That row was removed."})}else switch(u){case"target":N=t.jsx(bt,{table:e.table,onTableChange:n=>{r(d=>({...d,table:n,rows:[],dirty:new Set(["target","rows"])})),g(null)},group:D,sub:"Every row in a bulk request targets the same table. Switching the target clears the rows."});break;case"operation":N=t.jsx(ws,{operation:e.operation,setOperation:n=>Q("operation",n,"operation"),support:w,table:e.table});break;case"rows":N=t.jsx(ks,{state:e,tbl:C,issueByRow:Y,issueCount:T.length,rowLabel:he,onAdd:()=>Te(),onImport:()=>F(!0),onClear:()=>B(()=>[]),onEdit:n=>c(O(n)),onDuplicate:de,onRemove:ce,onKeyChange:(n,d)=>le(n,{key:d})});break;case"headers":N=t.jsx(ft,{items:e.headers,setItems:n=>Q("headers",n,"headers"),group:D,sendsHeaders:!0});break;case"bypass":N=t.jsx(gt,{value:e.bypass,onChange:n=>Q("bypass",n,"bypass"),group:D});break}const Ge={method:"POST",built:L,headers:be(_,null),body:Ae,entityLogical:L.entityLogical};return t.jsxs(xt,{sidebar:t.jsx(St,{type:a,urlPreview:L.relativeNoBase,sections:ze,activeNode:u,onSelect:n=>{c(n),h("builder")},recents:W}),urlBar:t.jsx(vt,{method:"POST",url:L.relativeUrl,executeVerb:a.executeVerb,disabledReason:Ee??Oe,loading:b,onExecute:Pe,advisories:ue,onAdvisoryFocus:c}),children:[t.jsxs(wt,{tab:o,onTabChange:h,resultCount:p?.ok&&se(p.body).length||null,children:[o==="builder"&&t.jsxs(t.Fragment,{children:[I&&t.jsx($,{intent:"error",style:{marginBottom:12},children:t.jsx(R,{children:I})}),N]}),o==="code"&&t.jsx(jt,{themeMode:s,inputs:Ge,group:D}),o==="results"&&(p&&p.ok?t.jsx(Cs,{result:p,operation:j}):t.jsx(kt,{result:p,mode:"single",table:e.table}))]}),t.jsx(Ss,{open:J,tbl:C,onClose:()=>F(!1),onImport:(n,d)=>{B(m=>d?n:[...m,...n]),F(!1),c("rows")}})]})}function ws({operation:s,setOperation:a,support:e,table:r}){return t.jsxs("div",{style:{maxWidth:760},children:[t.jsx(ae,{icon:ve,title:"Operation",sub:"One request, many rows of the same table. On standard tables the whole request rolls back if any row fails.",group:D}),t.jsx(Ft,{value:s,onChange:(i,l)=>a(l.value),"aria-label":"Bulk operation",children:Ie.map(i=>t.jsx(Nt,{value:i,label:t.jsxs("span",{children:[t.jsx("code",{children:i}),t.jsx("br",{}),t.jsx(M,{children:q[i].description})]})},i))}),t.jsxs("div",{style:{marginTop:16,display:"flex",flexDirection:"column",gap:8},children:[r?e.state==="checking"?t.jsx(Bt,{size:"tiny",label:`Checking ${s} availability for ${r}…`}):e.state==="supported"?t.jsx($,{intent:"success",children:t.jsxs(R,{children:[t.jsx("code",{children:r})," supports ",s,"."]})}):e.state==="unsupported"?t.jsx($,{intent:"error",layout:"multiline",children:t.jsxs(R,{children:[t.jsx(Me,{children:"Not available"}),e.message]})}):e.state==="unknown"?t.jsx($,{intent:"warning",layout:"multiline",children:t.jsx(R,{children:e.message})}):null:t.jsx($,{intent:"info",children:t.jsxs(R,{children:["Pick a table to check whether it supports ",s,"."]})}),t.jsx($,{intent:"info",layout:"multiline",children:t.jsxs(R,{children:["Availability comes from the table's ",t.jsx("code",{children:"sdkmessagefilters"}),"."," ",t.jsx("code",{children:"UpsertMultiple"})," has no filter of its own — it's available where both"," ",t.jsx("code",{children:"CreateMultiple"})," and ",t.jsx("code",{children:"UpdateMultiple"})," are. Send 100–1,000 rows per request on standard tables (",Jt," on elastic tables); there's no fixed cap, but large payloads hit size and time limits."," ",t.jsx("a",{href:"https://learn.microsoft.com/en-us/power-apps/developer/data-platform/bulk-operations",target:"_blank",rel:"noreferrer",children:"Use bulk operation messages"})]})})]})]})}function js(s,a){const e=a?.primaryKey??"primary key";switch(s){case"CreateMultiple":return`optional ${e} GUID`;case"UpsertMultiple":return`${e} GUID or key='value'`;default:return`${e} GUID`}}function ks({state:s,tbl:a,issueByRow:e,issueCount:r,rowLabel:i,onAdd:l,onImport:u,onClear:c,onEdit:o,onDuplicate:h,onRemove:p,onKeyChange:g}){const[j,S]=y.useState(0),b=Math.max(1,Math.ceil(s.rows.length/A)),x=Math.min(j,b-1),W=s.rows.slice(x*A,(x+1)*A),H=q[s.operation],w={padding:"4px 8px",borderBottom:`1px solid ${E.colorNeutralStroke2}`};return t.jsxs("div",{children:[t.jsxs(ae,{icon:Se,title:"Rows",sub:`Each row becomes one item in Targets. ${H.keyRequired?"Every row needs a key.":"A key is optional."}`,group:D,children:[t.jsx(k,{icon:t.jsx(Mt,{}),onClick:l,disabled:!a,children:"Add row"}),t.jsx(k,{icon:t.jsx(It,{}),onClick:u,disabled:!a,children:"Import CSV / JSON…"}),t.jsx(k,{icon:t.jsx(te,{}),appearance:"subtle",onClick:c,disabled:s.rows.length===0,children:"Clear"})]}),!a&&t.jsx($,{intent:"info",children:t.jsx(R,{children:"Pick a target table first."})}),s.rows.length>Ht&&t.jsx($,{intent:"warning",layout:"multiline",style:{marginBottom:8},children:t.jsxs(R,{children:[t.jsxs(Me,{children:[s.rows.length.toLocaleString()," rows"]}),"Microsoft recommends 100–1,000 rows per request. Larger requests are more likely to hit message-size or time limits, and on standard tables a failure rolls back every row. Consider splitting the rows into several requests."]})}),r>0&&t.jsx($,{intent:"error",style:{marginBottom:8},children:t.jsxs(R,{children:[r," row issue",r===1?"":"s"," — fix them before sending."]})}),a&&s.rows.length===0&&t.jsx(M,{children:"No rows yet. Add rows one by one, or import them from CSV (header row of column names — Excel copy-paste works) or a JSON array of objects."}),s.rows.length>0&&t.jsxs("table",{style:{borderCollapse:"collapse",width:"100%",fontSize:13},children:[t.jsx("thead",{children:t.jsxs("tr",{style:{textAlign:"left"},children:[t.jsx("th",{style:w,children:"#"}),t.jsx("th",{style:w,children:"Key"}),t.jsx("th",{style:w,children:"Columns"}),t.jsx("th",{style:w,children:"Status"}),t.jsx("th",{style:w,"aria-label":"Actions"})]})}),t.jsx("tbody",{children:W.map((v,J)=>{const F=x*A+J,I=[...Object.keys(v.fieldValues),...v.nullFields],U=e.get(v.id);return t.jsxs("tr",{children:[t.jsx("td",{style:w,children:F+1}),t.jsx("td",{style:{...w,minWidth:220},children:t.jsx(Re,{size:"small",value:v.key,placeholder:js(s.operation,a),onChange:(Z,V)=>g(v.id,V.value),"aria-label":`Row ${F+1} key`,style:{width:"100%"}})}),t.jsx("td",{style:w,children:t.jsx(M,{title:I.join(", "),children:I.length===0?"—":`${I.length}: ${I.slice(0,3).join(", ")}${I.length>3?"…":""}`})}),t.jsx("td",{style:w,children:U?t.jsx(M,{style:{color:E.colorPaletteRedForeground1},children:U}):t.jsx(M,{style:{color:E.colorPaletteGreenForeground1},children:"Ready"})}),t.jsxs("td",{style:{...w,whiteSpace:"nowrap"},children:[t.jsx(ee,{content:`Edit ${i(v,F)}`,relationship:"label",children:t.jsx(k,{size:"small",appearance:"subtle",icon:t.jsx(Dt,{}),onClick:()=>o(v.id)})}),t.jsx(ee,{content:"Duplicate row",relationship:"label",children:t.jsx(k,{size:"small",appearance:"subtle",icon:t.jsx(re,{}),onClick:()=>h(v.id)})}),t.jsx(ee,{content:"Remove row",relationship:"label",children:t.jsx(k,{size:"small",appearance:"subtle",icon:t.jsx(te,{}),onClick:()=>p(v.id)})})]})]},v.id)})})]}),b>1&&t.jsxs("div",{style:{display:"flex",alignItems:"center",gap:8,marginTop:8},children:[t.jsx(k,{size:"small",icon:t.jsx(Ce,{}),disabled:x===0,onClick:()=>S(x-1),"aria-label":"Previous page"}),t.jsxs(M,{children:["Rows ",x*A+1,"–",Math.min((x+1)*A,s.rows.length)," of"," ",s.rows.length]}),t.jsx(k,{size:"small",icon:t.jsx($e,{}),disabled:x>=b-1,onClick:()=>S(x+1),"aria-label":"Next page"})]})]})}function vs({row:s,index:a,count:e,table:r,tbl:i,operation:l,issue:u,themeMode:c,onPatch:o,onNavigate:h,onBack:p,onDuplicate:g,onRemove:j}){const S=q[l];return t.jsxs("div",{children:[t.jsxs(ae,{icon:ke,title:`Row ${a+1} of ${e}`,sub:l==="DeleteMultiple"?"Only the key (and partitionid on partitioned elastic tables) is needed.":void 0,group:D,children:[t.jsx(k,{icon:t.jsx(Ct,{}),appearance:"subtle",onClick:p,children:"All rows"}),t.jsx(k,{icon:t.jsx(Ce,{}),disabled:a===0,onClick:()=>h(a-1),"aria-label":"Previous row"}),t.jsx(k,{icon:t.jsx($e,{}),disabled:a>=e-1,onClick:()=>h(a+1),"aria-label":"Next row"}),t.jsx(k,{icon:t.jsx(re,{}),onClick:g,children:"Duplicate"}),t.jsx(k,{icon:t.jsx(te,{}),appearance:"subtle",onClick:j,children:"Remove"})]}),t.jsx($t,{label:S.keyRequired?"Key (required)":"Key (optional)",hint:l==="UpsertMultiple"?`A ${i?.primaryKey??"primary key"} GUID, or an alternate key segment such as name='Contoso' — sent as @odata.id.`:l==="CreateMultiple"?`Leave empty to let Dataverse assign the id, or set a ${i?.primaryKey??"primary key"} GUID.`:`The ${i?.primaryKey??"primary key"} GUID of the row.`,validationState:u?"error":"none",validationMessage:u,style:{maxWidth:520,marginBottom:12},children:t.jsx(Re,{value:s.key,onChange:(b,x)=>o({key:x.value})})}),S.usesFields&&t.jsx(Rt,{table:r,values:s.fieldValues,setValues:b=>o({fieldValues:b}),nullFields:s.nullFields,setNullFields:b=>o({nullFields:b}),group:D,themeMode:c,purpose:S.fieldPurpose})]})}function Ss({open:s,tbl:a,onClose:e,onImport:r}){const[i,l]=y.useState(""),[u,c]=y.useState(!1),o=y.useMemo(()=>a?ds(i,a):{rows:[],skippedColumns:[],errors:[]},[i,a]),h=async p=>{p&&l(await p.text())};return t.jsx(Tt,{open:s,onOpenChange:(p,g)=>!g.open&&e(),children:t.jsx(Ot,{style:{maxWidth:760},children:t.jsxs(Et,{children:[t.jsxs(Pt,{children:["Import rows",a?` into ${a.displayName}`:""]}),t.jsxs(qt,{style:{display:"flex",flexDirection:"column",gap:10},children:[t.jsxs(M,{children:["Paste CSV / tab-separated text with a header row of column logical (or display) names, or a JSON array of objects. A ",t.jsx("code",{children:a?.primaryKey??"primary key"}),","," ",t.jsx("code",{children:"id"})," or ",t.jsx("code",{children:"@key"})," column fills the row key. Lookups take a GUID (first target) or ",t.jsx("code",{children:"table:guid"}),"; choices take the value or the label."]}),t.jsx(Vt,{value:i,onChange:(p,g)=>l(g.value),rows:12,"aria-label":"Rows to import",placeholder:`name,numberofemployees
4
- Contoso,10
5
- Fabrikam,25`,textarea:{style:{fontFamily:E.fontFamilyMonospace,fontSize:12}}}),t.jsxs("div",{style:{display:"flex",alignItems:"center",gap:12,flexWrap:"wrap"},children:[t.jsx("input",{type:"file",accept:".csv,.tsv,.txt,.json","aria-label":"Load rows from a file",onChange:p=>{h(p.target.files?.[0])}}),t.jsx(_t,{checked:u,onChange:(p,g)=>c(!!g.checked),label:"Replace existing rows"})]}),i.trim()&&t.jsx($,{intent:o.errors.length?"warning":o.rows.length?"success":"info",layout:"multiline",children:t.jsxs(R,{children:[o.rows.length," row",o.rows.length===1?"":"s"," parsed.",o.skippedColumns.length>0&&t.jsxs(t.Fragment,{children:[" Skipped columns (not on this table): ",o.skippedColumns.join(", "),"."]}),o.errors.length>0&&t.jsxs("ul",{style:{margin:"4px 0 0",paddingLeft:18},children:[o.errors.slice(0,6).map(p=>t.jsx("li",{children:p},p)),o.errors.length>6&&t.jsxs("li",{children:["…and ",o.errors.length-6," more"]})]})]})})]}),t.jsxs(Kt,{children:[t.jsx(k,{appearance:"secondary",onClick:e,children:"Cancel"}),t.jsxs(k,{appearance:"primary",disabled:o.rows.length===0,onClick:()=>{r(o.rows,u),l("")},children:["Import ",o.rows.length||""," row",o.rows.length===1?"":"s"]})]})]})})})}function Cs({result:s,operation:a}){const e=se(s.body),[r,i]=y.useState(!1);return t.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:12,maxWidth:760},children:[t.jsxs("div",{style:{display:"flex",alignItems:"center",gap:10},children:[t.jsx(At,{status:"success",code:s.status,ms:s.ms}),t.jsxs(Ut,{weight:"semibold",children:[a," ",e.length>0?`created ${e.length} row${e.length===1?"":"s"}`:"completed"]})]}),e.length>0?t.jsxs(t.Fragment,{children:[t.jsx("div",{children:t.jsx(k,{icon:t.jsx(re,{}),onClick:()=>{Lt(e.join(`
6
- `)).then(()=>i(!0))},children:r?"Copied":"Copy ids"})}),t.jsx("ol",{style:{margin:0,paddingLeft:32,fontFamily:E.fontFamilyMonospace,fontSize:12,maxHeight:480,overflow:"auto"},children:e.map(l=>t.jsx("li",{children:l},l))})]}):t.jsxs(M,{children:[a," returns 204 No Content — Dataverse doesn't report per-row results for it. Every row in the request succeeded (a failure would have rolled back the request on a standard table)."]})]})}export{Rs as BulkWriteMode};
@@ -1 +0,0 @@
1
- import{b4 as Y,q as e,a_ as ye,X as p,r as l,Y as j,a2 as J,A as q,B as L,I as Q,bk as k,c as he,b5 as pe,c0 as G,c1 as ge,c2 as we,u as xe,f as ke,e as be,c3 as je,b9 as Se,i as H,j as ve,c4 as M,c5 as Ee,T as K,k as Ie,L as Te,p as Ne,H as Pe,a8 as Z,a4 as ee,b3 as Ce,x as qe,y as Le,z as Me,D as Ae,R as Re,U as We,S as $e,G as Be,bl as Fe,bi as De,b2 as X,aS as He,bm as Oe}from"./index-C4fO68cu.js";function ze({rows:i,keyWidth:s,className:d}){const t=Y(),a=s!=null?{gridTemplateColumns:`${typeof s=="number"?`${s}px`:s} 1fr`}:void 0;return e.jsx("div",{className:ye(t.kvGrid,d),style:a,children:i.map((n,m)=>e.jsx(Ve,{k:n.k,v:n.v,mono:n.mono},m))})}function Ve({k:i,v:s,mono:d}){const t=Y();return e.jsxs(e.Fragment,{children:[e.jsx("span",{className:t.kvKey,children:i}),e.jsx("span",{className:d?t.kvValMono:t.kvVal,children:s==null||s===""?e.jsx("em",{style:{color:p.colorNeutralForeground4},children:"—"}):s})]})}const Ue="http://schemas.microsoft.com/winfx/2006/xaml",_e=new Set(["InputEntities","CreatedEntities"]);function Ge(i){if(!i||typeof DOMParser>"u")return[];let s;try{s=new DOMParser().parseFromString(i,"application/xml")}catch{return[]}if(s.getElementsByTagName("parsererror").length>0)return[];const d=[],t=s.getElementsByTagNameNS(Ue,"Property");for(const a of Array.from(t)){const n=a.getAttribute("Name"),m=/^(In|InOut)Argument\((.*)\)$/.exec((a.getAttribute("Type")??"").trim());if(!n||!m||_e.has(n))continue;let h=!1,g=null;for(const o of Array.from(a.getElementsByTagName("*"))){const y=o.getAttribute("Value");o.localName==="ArgumentRequiredAttribute"&&(h=y?.toLowerCase()==="true"),o.localName==="ArgumentDescriptionAttribute"&&y&&(g=y)}d.push({name:n,direction:m[1],type:m[2].trim(),required:h,description:g})}return d}function Ke(i){return i.replace(/\b[a-z]+:/g,"")}function Xe({workflowId:i}){const[s,d]=l.useState({status:"loading"});l.useEffect(()=>{if(typeof window>"u"||!window.dataverseAPI?.queryData){d({status:"ready",args:[]});return}let a=!1;return d({status:"loading"}),window.dataverseAPI.queryData(`workflows?$select=xaml&$filter=workflowid eq ${i}`).then(n=>{if(a)return;const m=n?.value?.[0],h=typeof m?.xaml=="string"?m.xaml:null;d({status:"ready",args:Ge(h)})}).catch(n=>{a||d({status:"error",message:n instanceof Error?n.message:String(n)})}),()=>{a=!0}},[i]);const t={color:p.colorNeutralForeground3,display:"block",marginTop:10};return s.status==="loading"?e.jsxs(j,{style:{...t,display:"flex",alignItems:"center",gap:6},children:[e.jsx(J,{size:"extra-tiny"})," Reading the workflow's input arguments…"]}):s.status==="error"?e.jsxs(j,{style:t,children:["Couldn't read the workflow definition to check for input arguments: ",s.message]}):s.args.length===0?e.jsxs(j,{style:t,children:["No input arguments declared — ",e.jsx("code",{children:"EntityId"})," is the whole request body."]}):e.jsx(q,{layout:"multiline",intent:"warning",style:{marginTop:12},children:e.jsxs(L,{children:[e.jsxs(Q,{children:["This workflow declares ",s.args.length," input argument",s.args.length===1?"":"s"]}),"The Web API ",e.jsx("code",{children:"ExecuteWorkflow"})," action only takes ",e.jsx("code",{children:"EntityId"}),", so these can't be set from here; the workflow runs with their default values.",e.jsx("ul",{style:{margin:"6px 0 0",paddingLeft:18},children:s.args.map(a=>e.jsxs("li",{children:[e.jsx("code",{children:a.name})," ",e.jsx(k,{appearance:"outline",size:"small",children:Ke(a.type)}),a.direction==="InOut"&&e.jsx(k,{appearance:"tint",size:"small",style:{marginLeft:4},children:"in/out"}),a.required&&e.jsx(k,{appearance:"tint",color:"danger",size:"small",style:{marginLeft:4},children:"required"}),a.description&&e.jsxs("span",{style:{color:p.colorNeutralForeground3},children:[" — ",a.description]})]},a.name))})]})})}const Ye=()=>({workflowId:null,entityId:null,headers:Be(),dirty:new Set});function et({themeMode:i}){const s=he("exec-workflow"),d=pe("exec-workflow",G,Ye),[t,a]=l.useState(d.state),[n,m]=l.useState("pick"),[h,g]=l.useState("builder"),[o,y]=l.useState(null),[S,I]=l.useState(!1),[A,te]=l.useState([]),v=l.useMemo(()=>ge(t),[t]),re=l.useMemo(()=>we(t),[t]),[T,O]=l.useState([]),[se,R]=l.useState(!1),[ne,W]=l.useState(null);l.useEffect(()=>{let r=!1;if(typeof window>"u"||!window.dataverseAPI?.queryData){O([]),W("Workflows can only be loaded from a live Dataverse connection (PPTB).");return}return R(!0),W(null),window.dataverseAPI.queryData("workflows?$select=workflowid,name,uniquename,primaryentity,description&$filter=(statecode eq 1 and type eq 1 and ondemand eq true and category eq 0)&$orderby=name asc").then(f=>{if(r)return;const w=f?.value??[];O(w.map(x=>({id:String(x.workflowid??""),name:String(x.name??"(unnamed)"),uniqueName:x.uniquename!=null?String(x.uniquename):null,primaryEntity:String(x.primaryentity??""),description:x.description!=null?String(x.description):null}))),R(!1)}).catch(f=>{r||(W(f instanceof Error?f.message:String(f)),R(!1))}),()=>{r=!0}},[]);const c=t.workflowId?T.find(r=>r.id===t.workflowId):void 0;xe(c?.primaryEntity??null);const E=c?ke(c.primaryEntity):void 0,{entities:z}=be(),[N,$]=l.useState(d.lastSavedId),[P,B]=l.useState(d.lastSavedHash),[ae,F]=l.useState(""),D=r=>a(u=>{const f=new Set(u.dirty);return f.add(r),{...u,dirty:f}}),V=(r,u,f)=>{a(w=>({...w,[r]:u})),f&&D(f)},oe=c?t.entityId?t.headers.some(r=>r.enabled&&!r.name)?"Fix empty header name.":null:`Pick a ${c.primaryEntity} record to run the workflow on.`:"Pick a workflow.",ie=async()=>{I(!0);const r=await He.workflow(t);y(r),I(!1),g("results"),te(u=>[{id:`r-${Date.now()}`,snapshot:b,modeId:"exec-workflow",url:v.relativeUrl,method:"POST",ts:Date.now(),status:r.status,ms:r.ms,rowCount:r.ok?1:0},...u].slice(0,8)),a(u=>({...u,dirty:new Set}))},b=l.useMemo(()=>je(t),[t]);Se("exec-workflow",b,N,P);const le=l.useMemo(()=>H(b),[b]),U=P===null?!0:le!==P,de=r=>{$(r.id),B(H(r.state))},_=r=>{if(r.modeId!=="exec-workflow")return;const u=r.state,f=T.find(w=>w.id===u.workflowId);if(f&&z.length>0&&!z.some(w=>w.logicalName===f.primaryEntity)){Fe(`Can't load "${r.name}": workflow's primary entity \`${f.primaryEntity}\` isn't available in this environment.`);return}a(G(u)),$(r.id),B(H(u)),y(null),F(""),m("pick")},ce=r=>{const u=Oe(r,"exec-workflow");if(!u)return;const f=N,w=P;_(u),$(f),B(w)};ve(l.useMemo(()=>t.workflowId?{state:b,modeId:"exec-workflow",dirty:U,lastSavedId:N,onSaved:de,onLoadSaved:_}:null,[b,U,N,t.workflowId,T]));const ue=[{id:"workflow",label:"Target",meta:c?.name??"pick one",items:[{id:"pick",icon:Ee,iconFilled:M,label:c?.name??"Pick on-demand workflow",dirty:t.dirty.has("pick")}]},{id:"target",label:"Bound to",meta:c?`${E?.displayName??c.primaryEntity} record`:"—",items:[{id:"target",icon:Ie,iconFilled:K,label:t.entityId?`${E?.displayName??""} (selected)`:"Pick a record",badge:t.entityId?"✓":null,badgeAppearance:"ghost",dirty:t.dirty.has("target")}]},{id:"headers",label:"Headers",meta:`${t.headers.filter(r=>r.enabled).length} active`,items:[{id:"headers",icon:Ne,iconFilled:Te,label:"HTTP headers",badge:t.headers.filter(r=>r.enabled).length||null,dirty:t.dirty.has("headers")}]}];let C;switch(n){case"pick":C=e.jsx(Je,{workflows:T,loading:se,error:ne,workflowId:t.workflowId,setWorkflowId:r=>{a(u=>({...u,workflowId:r,entityId:null})),F(""),D("pick"),D("target")}});break;case"target":C=c?e.jsxs("div",{children:[e.jsx(Z,{icon:K,title:"Target record",sub:`The ${E?.displayName??c.primaryEntity} record the workflow operates on. Slots into the request body as "EntityId".`,group:"execute"}),e.jsxs("div",{style:{maxWidth:480},children:[e.jsx(ee,{label:`${E?.displayName??c.primaryEntity} record`,children:e.jsx(Ce,{table:c.primaryEntity,selectedId:t.entityId,onPick:r=>{V("entityId",r?.id??null,"target"),F(r?.primary??"")},placeholder:`Search ${E?.displayName??c.primaryEntity} records…`})}),e.jsx(Xe,{workflowId:c.id})]})]}):e.jsx(q,{layout:"multiline",intent:"info",children:e.jsx(L,{children:"Pick a workflow first."})});break;case"headers":C=e.jsx(Pe,{items:t.headers,setItems:r=>V("headers",r,"headers"),group:"execute"});break}const me=qe(t.headers,null),fe={method:"POST",built:v,headers:me,body:re,entityLogical:v.entityLogical};return e.jsx(Le,{sidebar:e.jsx($e,{type:s,urlPreview:v.relativeNoBase,sections:ue,activeNode:n,onSelect:r=>{m(r),g("builder")},recents:A,onRecentClick:ce}),urlBar:e.jsx(We,{method:"POST",url:v.relativeUrl,executeVerb:s.executeVerb,executeIcon:M,disabledReason:oe,loading:S,onExecute:ie}),children:e.jsxs(Me,{tab:h,onTabChange:g,resultCount:o?.ok?1:null,children:[h==="builder"&&C,h==="code"&&e.jsx(Ae,{themeMode:i,inputs:fe}),h==="results"&&e.jsx(Re,{result:o,mode:"single",table:c?.primaryEntity??"",writeContext:{operation:"workflow",table:c?.primaryEntity??"",recordId:t.entityId,recordName:ae||null,operationName:c?.name??void 0}})]})})}function Je({workflows:i,loading:s,error:d,workflowId:t,setWorkflowId:a}){const n=t?i.find(o=>o.id===t):void 0,[m,h]=l.useState("");l.useEffect(()=>{h(n?.name??"")},[n?.name]);const g=l.useMemo(()=>{const o=m.trim().toLowerCase();return!o||o===(n?.name??"").toLowerCase()?i:i.filter(y=>y.name.toLowerCase().includes(o)||(y.uniqueName?.toLowerCase().includes(o)??!1)||y.primaryEntity.toLowerCase().includes(o)||(y.description?.toLowerCase().includes(o)??!1))},[i,m,n]);return e.jsxs("div",{children:[e.jsx(Z,{icon:M,title:"On-demand workflow",sub:"Pick an activated workflow (type=Definition, category=Workflow). The workflow's primary entity drives the Target picker.",group:"execute",children:s?e.jsx(k,{appearance:"ghost",icon:e.jsx(J,{size:"extra-tiny"}),children:"loading…"}):e.jsxs(k,{appearance:"ghost",children:[i.length," workflow",i.length===1?"":"s"]})}),d&&e.jsx(q,{intent:"error",layout:"multiline",style:{marginBottom:12,maxWidth:760},children:e.jsxs(L,{children:["Couldn't load workflows: ",d]})}),e.jsxs("div",{style:{maxWidth:760},children:[e.jsx(ee,{label:"Workflow",children:e.jsxs(De,{freeform:!0,clearable:!0,value:m,selectedOptions:t?[t]:[],onChange:o=>{const y=o.target.value;h(y),y===""&&t&&a(null)},onOptionSelect:(o,y)=>{const S=y.optionValue??null;if(a(S),S){const I=i.find(A=>A.id===S);h(I?.name??"")}else h("")},placeholder:s?"Loading workflows…":i.length===0?"No activated workflows in this environment":"Search workflows…",disabled:s||i.length===0,listbox:{style:{maxHeight:420}},children:[g.length===0&&m.trim()&&e.jsx(X,{value:"__none",text:"",disabled:!0,children:e.jsxs(j,{style:{color:p.colorNeutralForeground3},children:['No workflows match "',m.trim(),'"']})}),g.map(o=>e.jsx(X,{value:o.id,text:o.name,children:e.jsxs("div",{style:{display:"flex",flexDirection:"column"},children:[e.jsx("span",{children:o.name}),e.jsxs(j,{style:{color:p.colorNeutralForeground3},children:["Primary entity:"," ",e.jsx("span",{style:{fontFamily:p.fontFamilyMonospace},children:o.primaryEntity}),o.description?` · ${o.description}`:""]})]})},o.id))]})}),n&&e.jsxs("div",{style:{marginTop:16,padding:12,border:`1px solid ${p.colorNeutralStroke2}`,borderRadius:p.borderRadiusMedium,background:p.colorNeutralBackground1},children:[e.jsxs("div",{style:{display:"flex",alignItems:"center",gap:8,marginBottom:8},children:[e.jsx(M,{style:{color:p.colorBrandForeground1}}),e.jsx("strong",{style:{fontSize:13},children:n.name}),e.jsx(k,{appearance:"ghost",children:n.primaryEntity}),e.jsx("span",{style:{flexGrow:1}}),e.jsx(k,{appearance:"filled",color:"success",style:{fontWeight:700},children:"POST"})]}),e.jsx(j,{style:{color:p.colorNeutralForeground2,display:"block",marginBottom:8},children:n.description}),e.jsx(ze,{keyWidth:120,rows:[{k:"Workflow id",v:n.id,mono:!0},{k:"Primary entity",v:n.primaryEntity,mono:!0},{k:"URL shape",v:`POST /workflows(${n.id})/Microsoft.Dynamics.CRM.ExecuteWorkflow`,mono:!0},{k:"Body shape",v:'{ "EntityId": "<target-guid>" }',mono:!0},{k:"Response",v:"204 No Content — workflow runs async"}]}),e.jsx(q,{layout:"multiline",intent:"info",style:{marginTop:12},children:e.jsxs(L,{children:[e.jsx(Q,{children:"Workflow runs are asynchronous."}),"The 204 only confirms the request was accepted. Check the ",e.jsx("code",{children:"workflowlogs"})," ","/ ",e.jsx("code",{children:"asyncoperations"})," tables for completion + result."]})})]})]})]})}export{et as ExecuteWorkflowMode};
@@ -1 +0,0 @@
1
- import{aU as Re,aV as Be,aW as Le,aX as Qe,aY as Ee,aZ as De,a_ as K,a$ as He,r as c,b0 as Oe,u as Z,q as t,a4 as X,b1 as Ae,b2 as A,Y as f,X as p,a2 as be,b3 as Xe,f as ge,c as We,b4 as Ge,b5 as _e,b6 as ie,e as Ve,b7 as Ue,b8 as Ye,b9 as Je,i as Y,j as Ke,ba as Ze,bb as et,F as oe,l as tt,bc as at,bd as rt,aJ as nt,aK as st,L as lt,p as it,aL as de,H as ot,aM as dt,be as ct,a8 as ut,A as ce,B as ue,I as pe,bf as pt,v as mt,bg as yt,bh as me,bi as ht,bj as J,bk as P,aC as ft,x as bt,y as gt,z as xt,D as vt,R as jt,U as St,S as kt,aQ as wt,aR as Tt,bl as Nt,aS as qt,aT as Ct,bm as Ft}from"./index-C4fO68cu.js";const Pt=(n,r)=>{const u=Re("group-label"),{label:o}=n;return{components:{root:"div",label:"span"},root:Le(Qe("div",{ref:r,role:"group","aria-labelledby":o?u:void 0,...n}),{elementType:"div"}),label:Be(o,{defaultProps:{id:u,role:"presentation"},elementType:"span"})}},$t=n=>Ee(n.root,{children:[n.label&&De(n.label,{children:n.label.children}),n.root.children]}),ye={root:"fui-OptionGroup",label:"fui-OptionGroup__label"},zt=He({root:{mc9l5x:"f22iagw",Beiy3e4:"f1vx9l62",Belr9w4:"fiut8dr",B8lkq7l:"f1xxzjds",eii1in:0,H93o2g:0,Gwp8xu:0,Bd39igo:"f16cmn8k",om0q45:"f5642y",Hl9o3s:"ffdf81h",sl1c2c:0,z4hxbw:0,B0i58d9:0,Bi9x0x4:0,Bgurq3m:"f1bsn9kn"},label:{Beyfa6y:0,Bbmb7ep:0,Btl43ni:0,B7oj6ja:0,Dimara:"ft85np5",sj55zd:"f11d4kpn",mc9l5x:"ftgm304",Be2twd7:"fy9rknc",Bhrd7zp:"fl43uef",Bg96gwp:"fwrc4pm",Byoj8tv:0,uwmqm3:0,z189sj:0,z8tnut:0,B0ocmuz:"f1mpq0zz"}},{d:[".f22iagw{display:flex;}",".f1vx9l62{flex-direction:column;}",".fiut8dr{row-gap:var(--spacingHorizontalXXS);}",'.f1xxzjds:not(:last-child)::after{content:"";}',[".f16cmn8k:not(:last-child)::after{border-bottom:var(--strokeWidthThin) solid var(--colorNeutralStroke2);}",{p:-1}],".f5642y:not(:last-child)::after{display:block;}",".ffdf81h:not(:last-child)::after{padding-bottom:var(--spacingHorizontalXS);}",[".f1bsn9kn:not(:last-child)::after{margin:0 calc(var(--spacingHorizontalXS) * -1) var(--spacingVerticalXS);}",{p:-1}],[".ft85np5{border-radius:var(--borderRadiusMedium);}",{p:-1}],".f11d4kpn{color:var(--colorNeutralForeground3);}",".ftgm304{display:block;}",".fy9rknc{font-size:var(--fontSizeBase200);}",".fl43uef{font-weight:var(--fontWeightSemibold);}",".fwrc4pm{line-height:var(--lineHeightBase200);}",[".f1mpq0zz{padding:var(--spacingHorizontalS) var(--spacingHorizontalSNudge);}",{p:-1}]]}),It=n=>{"use no memo";const r=zt();return n.root.className=K(ye.root,r.root,n.root.className),n.label&&(n.label.className=K(ye.label,r.label,n.label.className)),n},ee=c.forwardRef((n,r)=>{const u=Pt(n,r);return It(u),Oe("useOptionGroupStyles_unstable")(u),$t(u)});ee.displayName="OptionGroup";function Mt(n){const r=new Set,u=[];for(const o of n.navigationProperties){if(o.cardinality==="OneToMany")continue;const a=`${o.relationshipName}|${o.targetEntity}`;r.has(a)||(r.add(a),u.push({relationshipName:o.relationshipName,sourceTable:o.targetEntity,via:o.referencingAttribute??o.name,manyToMany:o.cardinality==="ManyToMany"}))}return u.sort((o,a)=>o.sourceTable.localeCompare(a.sourceTable)||o.relationshipName.localeCompare(a.relationshipName))}function Rt(n,r,u){return n.navigationProperties.find(a=>a.relationshipName===r&&a.cardinality!=="ManyToOne"&&a.targetEntity===u)?.name??null}function Bt({table:n,value:r,onChange:u}){const o=c.useMemo(()=>Mt(n),[n]),{table:a,loading:y}=Z(r.sourceTable||null);c.useEffect(()=>{if(!a||!r.relationshipName)return;const l=Rt(a,r.relationshipName,n.logicalName)??"";l!==r.navProperty&&u({...r,navProperty:l})},[a,r.relationshipName,n.logicalName]);const h=l=>`${l.relationshipName}|${l.sourceTable}`,g=o.find(l=>l.relationshipName===r.relationshipName&&l.sourceTable===r.sourceTable),x=l=>`${ge(l.sourceTable)?.displayName??l.sourceTable} · ${l.relationshipName}`;return t.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:12},children:[t.jsx(X,{label:"Relationship",hint:o.length?`Rows of ${n.displayName} related to one row of another table.`:void 0,validationState:o.length?"none":"warning",validationMessage:o.length?void 0:`${n.displayName} has no lookups or many-to-many relationships.`,children:t.jsx(Ae,{placeholder:"Pick a relationship…",value:g?x(g):"",selectedOptions:g?[h(g)]:[],onOptionSelect:(l,T)=>{const v=o.find($=>h($)===T.optionValue);v&&u({sourceTable:v.sourceTable,relationshipName:v.relationshipName,navProperty:"",recordId:v.sourceTable===r.sourceTable?r.recordId:null,recordName:v.sourceTable===r.sourceTable?r.recordName:void 0})},listbox:{style:{maxHeight:360}},children:o.map(l=>t.jsx(A,{value:h(l),text:x(l),children:t.jsxs("div",{style:{display:"flex",flexDirection:"column",minWidth:0},children:[t.jsx("span",{children:x(l)}),t.jsx(f,{style:{color:p.colorNeutralForeground3,fontFamily:p.fontFamilyMonospace},children:l.manyToMany?`many-to-many · ${l.via}`:`via ${l.via}`})]})},h(l)))})}),r.sourceTable&&y&&!a&&t.jsxs("div",{style:{display:"flex",alignItems:"center",gap:8},children:[t.jsx(be,{size:"tiny"}),t.jsxs(f,{children:["Loading ",r.sourceTable," metadata…"]})]}),a&&r.relationshipName&&!r.navProperty&&t.jsxs(f,{style:{color:p.colorPaletteRedForeground1},children:[a.displayName," has no collection navigation property for ",r.relationshipName,"."]}),a&&r.navProperty&&t.jsx(X,{label:`${a.displayName} row`,hint:t.jsxs("span",{children:["Collection: ",t.jsx("code",{children:`${a.entitySetName}(…)/${r.navProperty}`})]}),children:t.jsx(Xe,{table:a.logicalName,selectedId:r.recordId,onPick:l=>u({...r,recordId:l?.id??null,recordName:l?.primary})})})]})}const Lt=()=>({table:"",queryId:null,queryType:"savedQuery",top:50,prefer:{...Tt(),formattedValues:!0},headers:wt(),dirty:new Set}),he={sourceTable:"",relationshipName:"",navProperty:"",recordId:null};function fe(n){if(!n)return[];const r=[...n.matchAll(/<cell\s+([^>]+?)\s*\/?>/g)],u=[];for(const o of r){const a=o[1],y=/name="([^"]+)"/.exec(a);if(!y)continue;const h=y[1],g=/width="([^"]+)"/.exec(a),x=g&&parseInt(g[1],10)||100,l=h.indexOf(".");l>=0?u.push({fullName:h,width:x,isLink:!0,linkAlias:h.slice(0,l),attr:h.slice(l+1)}):u.push({fullName:h,width:x,isLink:!1,attr:h})}return u}function Qt(n){switch(n){case 0:return"Main view";case 1:return"Advanced Find";case 2:return"Subgrid";case 4:return"Quick Find";case 8:return"Reserved";case 16:return"Lookup";case 32:return"Marketing list";case 64:return"Address book";case 128:return"Main (no subj)";case 256:return"Outlook filter";case 512:return"Reserved";case 1024:return"Offline filter";case 2048:return"Outlook template";case 4096:return"Reserved";case 8192:return"Svc mgmt app";default:return`Type ${n}`}}function Dt({themeMode:n}){const r=We("predefined-query"),u=Ge(),o=_e("predefined-query",ie,Lt),[a,y]=c.useState(o.state),{table:h}=Z(a.table||null),{entities:g}=Ve(),[x,l]=c.useState("target"),[T,v]=c.useState("builder"),[$,te]=c.useState(null),[xe,ae]=c.useState(!1),[ve,je]=c.useState([]),[z,I]=c.useState(o.lastSavedId),[M,R]=c.useState(o.lastSavedHash),[N,B]=c.useState([]),[W,G]=c.useState(!1),[re,_]=c.useState(null),[k,L]=c.useState(""),{table:Se}=Z(a.related?.sourceTable||null),Q=c.useMemo(()=>Ue(a),[a,h,Se]),V=ge(a.table),d=N.find(e=>e.id===a.queryId)??null,E=N.filter(e=>e.kind==="savedQuery"),D=N.filter(e=>e.kind==="userQuery"),H=c.useMemo(()=>{const e=k.trim().toLowerCase();return e?E.filter(i=>i.name.toLowerCase().includes(e)):E},[E,k]),O=c.useMemo(()=>{const e=k.trim().toLowerCase();return e?D.filter(i=>i.name.toLowerCase().includes(e)):D},[D,k]);c.useEffect(()=>{L(d?.name??"")},[d?.name,a.table]),c.useEffect(()=>{let e=!1;if(!a.table){B([]),_(null);return}if(typeof window>"u"||!window.dataverseAPI?.queryData){B([]);return}G(!0),_(null);const i="savedqueryid,name,description,fetchxml,layoutxml,returnedtypecode,querytype,isdefault,isquickfindquery,iscustomizable,ismanaged",m="userqueryid,name,description,fetchxml,layoutxml,returnedtypecode,querytype",b=`savedqueries?$select=${i}&$filter=returnedtypecode eq '${a.table}' and statecode eq 0&$orderby=name asc`,ze=`userqueries?$select=${m}&$filter=returnedtypecode eq '${a.table}' and statecode eq 0&$orderby=name asc`;return Promise.all([window.dataverseAPI.queryData(b).catch(j=>{throw j instanceof Error?j:new Error(String(j))}),window.dataverseAPI.queryData(ze).catch(()=>({value:[]}))]).then(([j,U])=>{if(e)return;const Ie=j?.value??[],Me=U?.value??[],le=[...Ie.map(s=>{const S=s.layoutxml!=null?String(s.layoutxml):null;return{id:String(s.savedqueryid??""),name:String(s.name??"(unnamed)"),description:s.description!=null?String(s.description):null,fetchXml:s.fetchxml!=null?String(s.fetchxml):null,layoutXml:S,layoutColumns:fe(S),returnedTypeCode:String(s.returnedtypecode??a.table),queryType:typeof s.querytype=="number"?s.querytype:0,isDefault:s.isdefault===!0,isQuickFind:s.isquickfindquery===!0,isCustom:s.iscustomizable?.Value===!0,isManaged:s.ismanaged===!0,kind:"savedQuery"}}),...Me.map(s=>{const S=s.layoutxml!=null?String(s.layoutxml):null;return{id:String(s.userqueryid??""),name:String(s.name??"(unnamed)"),description:s.description!=null?String(s.description):null,fetchXml:s.fetchxml!=null?String(s.fetchxml):null,layoutXml:S,layoutColumns:fe(S),returnedTypeCode:String(s.returnedtypecode??a.table),queryType:typeof s.querytype=="number"?s.querytype:0,isDefault:!1,isQuickFind:!1,isCustom:!0,isManaged:!1,kind:"userQuery"}})];le.sort((s,S)=>s.kind!==S.kind?s.kind==="savedQuery"?-1:1:s.isDefault!==S.isDefault?s.isDefault?-1:1:s.name.localeCompare(S.name)),B(le),G(!1)}).catch(j=>{if(e)return;const U=j instanceof Error?j.message:String(j);_(U),B([]),G(!1)}),()=>{e=!0}},[a.table]);const F=e=>y(i=>{const m=new Set(i.dirty);return m.add(e),{...i,dirty:m}}),w=(e,i,m)=>{y(b=>({...b,[e]:i})),m&&F(m)},ke=e=>{y(i=>({...i,table:e,queryId:null})),F("target"),I(void 0),R(null)},we=async()=>{ae(!0);const e=await qt.predefined(a);te(e),ae(!1),v("results"),je(i=>[{id:`r-${Date.now()}`,snapshot:q,modeId:"predefined-query",url:Q.relativeUrl,method:"GET",ts:Date.now(),status:e.status,ms:e.ms,rowCount:Ct(e.body)??0},...i].slice(0,8)),y(i=>({...i,dirty:new Set}))},Te=a.table?a.queryId?a.related&&!(a.related.navProperty&&a.related.recordId)?"Pick the relationship and the row whose related records to query.":null:"Pick a saved query or user view.":"Pick a table first.",q=c.useMemo(()=>Ye(a),[a]);Je("predefined-query",q,z,M);const Ne=c.useMemo(()=>Y(q),[q]),ne=M===null?!0:Ne!==M,qe=e=>{I(e.id),R(Y(e.state))},se=e=>{if(e.modeId!=="predefined-query")return;const i=e.state;if(g.length>0&&!g.some(m=>m.logicalName===i.table)){Nt(`Can't load "${e.name}": entity \`${i.table}\` isn't available in this environment. The solution may have been removed or you may be connected to a different org.`);return}y(ie(i)),I(e.id),R(Y(i)),te(null),l("target")},Ce=e=>{const i=Ft(e,"predefined-query");if(!i)return;const m=z,b=M;se(i),I(m),R(b)};Ke(c.useMemo(()=>a.table?{state:q,modeId:"predefined-query",dirty:ne,lastSavedId:z,onSaved:qe,onLoadSaved:se}:null,[q,ne,z,a.table]));const Fe=[{id:"target",label:"Target",meta:V?.displayName,items:[{id:"target",icon:et,iconFilled:Ze,label:d?.name??(a.table?"Pick a query":"Pick a table"),badge:d?.kind==="savedQuery"?"system":d?.kind==="userQuery"?"user":null,badgeAppearance:"ghost",dirty:a.dirty.has("target")}]},{id:"conditions",label:"Conditions",items:[{id:"conditions",icon:tt,iconFilled:oe,label:"Filter (read-only)",badge:d?"inherited":null,badgeAppearance:"ghost"}]},{id:"top",label:"Top",items:[{id:"top",icon:rt,iconFilled:at,label:"$top",code:!0,badge:a.top?a.top.toString():"default",badgeAppearance:"ghost",dirty:a.dirty.has("top")}]},{id:"prefer",label:"Prefer",items:[{id:"prefer",icon:st,iconFilled:nt,label:"Prefer header",badge:de(a.prefer)?"on":null,badgeAppearance:"ghost",dirty:a.dirty.has("prefer")}]},{id:"headers",label:"Headers",meta:`${a.headers.filter(e=>e.enabled).length} active`,items:[{id:"headers",icon:it,iconFilled:lt,label:"HTTP headers",badge:a.headers.filter(e=>e.enabled).length||null,dirty:a.dirty.has("headers")}]}];let C;switch(x){case"target":C=t.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:16},children:[t.jsx(mt,{table:a.table,onTableChange:e=>{ke(e),a.related&&w("related",he)},group:"read",sub:"Pick the table whose saved queries (system views) or user queries (personal views) you want to execute."}),a.table&&t.jsxs("div",{style:{maxWidth:640,display:"flex",flexDirection:"column",gap:14},children:[t.jsx(X,{label:"Run against",hint:a.related?"The query runs over one row’s related records: /<set>(<id>)/<nav>?savedQuery=…":"The query runs over the whole table: /<set>?savedQuery=…",children:t.jsxs(yt,{ariaLabel:"Run the query against",children:[t.jsx(me,{checked:!a.related,onClick:()=>{a.related&&w("related",null,"target")},children:"Table"}),t.jsx(me,{checked:!!a.related,onClick:()=>{a.related||w("related",he,"target")},children:"Related records of a row"})]})}),a.related&&V&&t.jsx(Bt,{table:V,value:a.related,onChange:e=>w("related",e,"target")}),t.jsx(X,{label:"View",hint:N.length>0?`${E.length} system · ${D.length} personal`:void 0,children:t.jsxs(ht,{freeform:!0,clearable:!0,value:k,selectedOptions:a.queryId?[a.queryId]:[],placeholder:W?"Loading queries…":N.length===0?"No queries on this table":"Search views by name…",disabled:W,onChange:e=>{const i=e.target.value;L(i),i===""&&a.queryId&&(y(m=>({...m,queryId:null})),F("target"))},onOptionSelect:(e,i)=>{if(!i.optionValue){y(b=>({...b,queryId:null})),L(""),F("target");return}const m=N.find(b=>b.id===i.optionValue);m&&(y(b=>({...b,queryId:m.id,queryType:m.kind})),L(m.name),F("target"))},listbox:{style:{maxHeight:420}},children:[H.length===0&&O.length===0&&k.trim()&&t.jsx(A,{value:"__none",text:"",disabled:!0,children:t.jsxs(f,{style:{color:p.colorNeutralForeground3},children:['No views match "',k.trim(),'"']})}),H.length>0&&t.jsx(ee,{label:`System views (${H.length})`,children:H.map(e=>t.jsx(A,{value:e.id,text:e.name,children:t.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:1,minWidth:0},children:[t.jsx(J,{style:{fontWeight:e.isDefault?600:400},children:e.name}),e.description&&t.jsx(f,{style:{color:p.colorNeutralForeground3},children:e.description})]})},e.id))}),O.length>0&&t.jsx(ee,{label:`Personal views (${O.length})`,children:O.map(e=>t.jsx(A,{value:e.id,text:e.name,children:t.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:1,minWidth:0},children:[t.jsx(J,{children:e.name}),e.description&&t.jsx(f,{style:{color:p.colorNeutralForeground3},children:e.description})]})},e.id))})]})}),W&&t.jsxs("div",{style:{display:"flex",alignItems:"center",gap:8,color:p.colorNeutralForeground3},children:[t.jsx(be,{size:"tiny"}),t.jsx(f,{children:"Fetching saved + user queries…"})]}),re&&t.jsx(ce,{intent:"error",layout:"multiline",children:t.jsxs(ue,{children:[t.jsx(pe,{children:"Couldn't load queries"}),re]})}),d&&t.jsxs("div",{className:K(u.inlineCard),style:{padding:14,display:"flex",flexDirection:"column",gap:10},children:[t.jsxs("div",{style:{display:"flex",alignItems:"center",gap:6,flexWrap:"wrap"},children:[t.jsx(J,{style:{fontWeight:600},children:d.name}),t.jsx(P,{appearance:"ghost",size:"small",children:Qt(d.queryType)}),d.isDefault&&t.jsx(P,{appearance:"tint",color:"brand",size:"small",children:"default view"}),d.isQuickFind&&t.jsx(P,{appearance:"tint",color:"informative",size:"small",children:"quick find"}),d.kind==="savedQuery"&&d.isManaged&&t.jsx(P,{appearance:"ghost",size:"small",children:"managed"}),d.kind==="savedQuery"&&!d.isManaged&&t.jsx(P,{appearance:"ghost",size:"small",children:"unmanaged"})]}),t.jsxs("div",{children:[t.jsx(f,{style:{fontWeight:600,color:p.colorNeutralForeground2},children:"Query GUID"}),t.jsx("div",{children:t.jsx("code",{style:{fontFamily:p.fontFamilyMonospace,fontSize:11,color:p.colorNeutralForeground2},children:d.id})})]}),d.layoutColumns.length>0&&t.jsxs("div",{children:[t.jsxs(f,{style:{fontWeight:600,color:p.colorNeutralForeground2},children:["Result columns (",d.layoutColumns.length,") — from layoutxml"]}),t.jsx("div",{style:{display:"flex",flexWrap:"wrap",gap:4,marginTop:4},children:d.layoutColumns.map(e=>t.jsx(ft,{relationship:"label",content:e.isLink?`${e.fullName} — joined column via link alias \`${e.linkAlias}\` · width ${e.width}px`:`${e.fullName} — width ${e.width}px`,children:t.jsx("span",{style:{fontFamily:p.fontFamilyMonospace,fontSize:11,padding:"2px 6px",borderRadius:4,background:e.isLink?p.colorPaletteBlueBackground2:p.colorNeutralBackground3,color:e.isLink?p.colorPaletteBlueForeground2:p.colorNeutralForeground1,cursor:"help"},children:e.isLink?`${e.linkAlias}.${e.attr}`:e.attr})},e.fullName))}),d.layoutColumns.some(e=>e.isLink)&&t.jsx(f,{style:{display:"block",marginTop:6,color:p.colorNeutralForeground3},children:"Blue pills are joined columns (link-entity in FetchXml)."})]})]})]})]});break;case"conditions":C=t.jsxs("div",{children:[t.jsx(ut,{icon:oe,title:"Conditions",sub:"Read-only summary — predefined queries embed their own FetchXml. Edit the saved query in the model-driven app to change conditions."}),t.jsx(ce,{layout:"multiline",intent:"warning",style:{marginBottom:12},children:t.jsxs(ue,{children:[t.jsx(pe,{children:"$select / $filter / $orderby / $expand are locked"}),"With ",t.jsx("code",{children:"?savedQuery=…"})," / ",t.jsx("code",{children:"?userQuery=…"}),", the FetchXml in the query owns column projection, filter, sort and joins. Only ",t.jsx("code",{children:"$top"})," and"," ",t.jsx("code",{children:"Prefer"})," headers remain editable."]})}),d?.fetchXml?t.jsx("div",{style:{border:`1px solid ${p.colorNeutralStroke2}`,borderRadius:p.borderRadiusMedium,overflow:"hidden",height:480},children:t.jsx(pt,{height:"100%",language:"xml",value:d.fetchXml,theme:n==="dark"?"vs-dark":"light",options:{readOnly:!0,domReadOnly:!0,lineNumbers:"on",renderLineHighlight:"line",minimap:{enabled:!1},scrollBeyondLastLine:!1,fontFamily:"Cascadia Mono, Consolas, monospace",fontSize:13,tabSize:2,wordWrap:"on",automaticLayout:!0,padding:{top:12,bottom:12},bracketPairColorization:{enabled:!0},guides:{bracketPairs:!0,indentation:!0},smoothScrolling:!0}})}):d?t.jsx(f,{style:{color:p.colorNeutralForeground3},children:"(No FetchXml available for this query — it may be a layout-only definition.)"}):t.jsx(f,{style:{color:p.colorNeutralForeground3},children:"Pick a query in Target to see its FetchXml."})]});break;case"top":C=t.jsx(ct,{top:a.top,setTop:e=>w("top",e,"top"),maxPageSize:a.prefer.maxpagesize});break;case"prefer":C=t.jsx(dt,{spec:a.prefer,setSpec:e=>w("prefer",e,"prefer")});break;case"headers":C=t.jsx(ot,{items:a.headers,setItems:e=>w("headers",e,"headers")});break}const Pe=bt(a.headers,de(a.prefer)),$e={method:"GET",built:Q,headers:Pe};return t.jsx(gt,{sidebar:t.jsx(kt,{type:r,urlPreview:Q.relativeNoBase,sections:Fe,activeNode:x,onSelect:e=>{l(e),v("builder")},recents:ve,onRecentClick:Ce}),urlBar:t.jsx(St,{method:"GET",url:Q.relativeUrl,executeVerb:r.executeVerb,disabledReason:Te,loading:xe,onExecute:we}),children:t.jsxs(xt,{tab:T,onTabChange:v,resultCount:$?.body?.value?.length??null,children:[T==="builder"&&C,T==="code"&&t.jsx(vt,{themeMode:n,inputs:$e}),T==="results"&&t.jsx(jt,{result:$,mode:"multi",table:a.table,preferredColumnOrder:d?.layoutColumns.map(e=>e.fullName)})]})})}export{Dt as PredefinedQueryMode};
@@ -1 +0,0 @@
1
- import{c as A,aG as G,r as o,aH as q,aI as R,ax as O,aJ as V,aK as W,L as _,p as J,aL as L,q as e,H as K,aM as Q,a8 as X,A as S,B as w,I as T,aC as k,N as j,aN as Y,aO as Z,a4 as ee,ac as te,X as i,Y as ae,aP as se,W as re,x as ne,y as oe,z as ie,D as le,R as de,U as ce,S as ue,aQ as he,aR as pe,aS as xe,aT as me}from"./index-C4fO68cu.js";const ye=()=>({url:"",prefer:{...pe(),maxpagesize:50},headers:he(),dirty:new Set});function ge(y,l){const d={ok:!1,url:null,host:"",path:"",entitySet:null,skiptoken:null,params:[],errors:[]};if(!y.trim())return d;let t;try{t=new URL(y)}catch{return{...d,errors:["Not a valid URL — paste the full https://… string."]}}const n=[];t.protocol!=="https:"&&n.push("Must be https:// — Dataverse rejects plain HTTP.");const c=t.pathname.match(/^\/api\/data\/v\d+\.\d+\/([^/?]+)/);c||n.push("Path doesn't look like a Dataverse Web API URL (expected /api/data/v<x>.<x>/<entityset>)."),l&&t.host&&t.host.toLowerCase()!==l.toLowerCase()&&n.push(`URL host (${t.host}) doesn't match the connected environment (${l}). Switch connections or paste a URL from the current org.`);const h=[];t.searchParams.forEach((p,g)=>h.push({key:g,value:p}));const u=t.searchParams.get("$skiptoken");return{ok:n.length===0,url:t,host:t.host,path:t.pathname,entitySet:c?c[1]:null,skiptoken:u,params:h,errors:n}}function fe({themeMode:y}){const l=A("retrieve-nextlink"),d=G(),[t,n]=o.useState(ye),[c,h]=o.useState("url"),[u,p]=o.useState("builder"),[g,C]=o.useState(null),[P,v]=o.useState(!1),[N,U]=o.useState([]),f=o.useMemo(()=>q(t),[t]),r=o.useMemo(()=>ge(t.url,d.host),[t.url,d.host]),F=a=>n(s=>{const m=new Set(s.dirty);return m.add(a),{...s,dirty:m}}),x=(a,s,m)=>{n(I=>({...I,[a]:s})),m&&F(m)},M=o.useMemo(()=>r.errors.map((a,s)=>({id:`nl-err-${s}`,severity:"error",source:"validation",focusNode:"url",title:"Invalid next-link URL",body:a})),[r]),B=async()=>{if(!r.ok)return;v(!0);const a=await xe.nextLink(t);C(a),v(!1),p("results"),U(s=>[{id:`r-${Date.now()}`,modeId:"retrieve-nextlink",url:t.url,method:"GET",ts:Date.now(),status:a.status,ms:a.ms,rowCount:me(a.body)??0},...s].slice(0,8)),n(s=>({...s,dirty:new Set}))},$=t.url.trim()?r.ok?null:r.errors[0]??"URL is not safe to follow.":"Paste an @odata.nextLink URL first.",E=async()=>{try{const a=await navigator.clipboard?.readText();a&&x("url",a.trim(),"url")}catch{}},z=[{id:"url",label:"Target",meta:"Server-issued",items:[{id:"url",icon:O,iconFilled:R,label:"@odata.nextLink",badge:r.entitySet??(t.url?"invalid":"empty"),badgeAppearance:"ghost",badgeColor:r.errors.length?"danger":r.entitySet?"informative":"subtle",dirty:t.dirty.has("url")}]},{id:"prefer",label:"Prefer",items:[{id:"prefer",icon:W,iconFilled:V,label:"Prefer header",badge:L(t.prefer)?"on":null,badgeAppearance:"ghost",dirty:t.dirty.has("prefer")}]},{id:"headers",label:"Headers",meta:`${t.headers.filter(a=>a.enabled).length} active`,items:[{id:"headers",icon:J,iconFilled:_,label:"HTTP headers",badge:t.headers.filter(a=>a.enabled).length||null,dirty:t.dirty.has("headers")}]}];let b;switch(c){case"url":b=e.jsxs("div",{children:[e.jsx(X,{icon:R,title:"Next-link URL",sub:"Paste the @odata.nextLink returned by the previous page. The URL is opaque — clauses are not editable here."}),e.jsx(S,{layout:"multiline",intent:"info",style:{marginBottom:12},children:e.jsxs(w,{children:[e.jsx(T,{children:"Why no clause editor?"}),"The next page must use the ",e.jsx("strong",{children:"same shape"})," as the original query. Dataverse encodes paging state in a ",e.jsx("code",{children:"$skiptoken"})," cookie — editing any other clause invalidates the cursor."]})}),e.jsxs("div",{style:{display:"flex",gap:8,marginBottom:8},children:[e.jsx(k,{content:"Paste from clipboard",relationship:"label",children:e.jsx(j,{icon:e.jsx(Y,{}),appearance:"outline",size:"small",onClick:E,children:"Paste"})}),e.jsx(k,{content:"Clear the URL field",relationship:"label",children:e.jsx(j,{icon:e.jsx(Z,{}),appearance:"subtle",size:"small",disabled:!t.url,onClick:()=>x("url","","url"),children:"Clear"})})]}),e.jsx(ee,{label:"@odata.nextLink",hint:"The full URL including https://. Skiptoken cookies are URL-encoded inside.",children:e.jsx(te,{rows:6,value:t.url,onChange:(a,s)=>x("url",s.value,"url"),placeholder:`https://${d.host}/api/data/v9.2/<entityset>?$select=…&$skiptoken=…`,style:{fontFamily:i.fontFamilyMonospace,fontSize:11}})}),r.errors.map((a,s)=>e.jsx(S,{intent:"error",layout:"multiline",style:{marginTop:12},children:e.jsxs(w,{children:[e.jsx(T,{children:"Can't follow this URL"}),a]})},s)),r.url&&r.ok&&e.jsxs("div",{style:{marginTop:16,padding:12,border:`1px solid ${i.colorNeutralStroke2}`,borderRadius:i.borderRadiusMedium,background:i.colorNeutralBackground1},children:[e.jsx(ae,{style:{display:"block",fontWeight:600,marginBottom:8,color:i.colorNeutralForeground2},children:"Parsed (read-only)"}),e.jsxs("div",{style:{display:"grid",gridTemplateColumns:"120px 1fr",rowGap:4,columnGap:12,fontFamily:i.fontFamilyMonospace,fontSize:11},children:[e.jsx("span",{style:{color:i.colorNeutralForeground3},children:"host"}),e.jsx("span",{children:r.host}),e.jsx("span",{style:{color:i.colorNeutralForeground3},children:"entityset"}),e.jsx("span",{children:r.entitySet??"—"}),r.params.map((a,s)=>e.jsxs("span",{style:{display:"contents"},children:[e.jsx("span",{style:{color:i.colorBrandForeground1},children:a.key}),e.jsx("span",{style:{wordBreak:"break-all"},children:se(a.value)})]},s))]})]}),r.ok&&e.jsx("div",{style:{marginTop:16},children:e.jsx(k,{content:"Open the parsed URL in a new tab (auth will be required)",relationship:"description",children:e.jsx(j,{icon:e.jsx(re,{}),appearance:"outline",onClick:()=>window.open(t.url,"_blank","noopener"),children:"Open in new tab"})})})]});break;case"prefer":b=e.jsx(Q,{spec:t.prefer,setSpec:a=>x("prefer",a,"prefer")});break;case"headers":b=e.jsx(K,{items:t.headers,setItems:a=>x("headers",a,"headers")});break}const D=ne(t.headers,L(t.prefer)),H={method:"GET",built:f,headers:D,isNextLink:!0,rawNextLink:t.url};return e.jsx(oe,{sidebar:e.jsx(ue,{type:l,urlPreview:f.relativeNoBase,sections:z,activeNode:c,onSelect:a=>{h(a),p("builder")},recents:N}),urlBar:e.jsx(ce,{method:"GET",url:f.relativeUrl,executeVerb:l.executeVerb,disabledReason:$,loading:P,onExecute:B,advisories:M,onAdvisoryFocus:a=>h(a)}),children:e.jsxs(ie,{tab:u,onTabChange:p,resultCount:g?.body?.value?.length??null,children:[u==="builder"&&b,u==="code"&&e.jsx(le,{themeMode:y,inputs:H}),u==="results"&&e.jsx(de,{result:g,mode:"next"})]})})}export{fe as RetrieveNextLinkMode};