@arcgis/portal-components 6.0.0-next.35 → 6.0.0-next.37

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.
@@ -0,0 +1,73 @@
1
+ /* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
2
+ import{a as _e}from"./CMNTOT5D.js";import{e as Ae}from"./R5LNWMD4.js";import{a as Te}from"./UOXUUCE7.js";import{a as le}from"./DV57AOBF.js";import{a as ae}from"./B343BOVA.js";import"./G7DJPREL.js";import"./GC4BV7IZ.js";import{L as se,M as ie,N as Se,Q as Re,T as ze,h as $e,j as v,v as ne}from"./AM3UTQWH.js";import"./KHKREBVZ.js";import"./K3GAZFRI.js";import"./5PV2GUZW.js";function he(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var q=he();function Oe(r){q=r}var C={exec:()=>null};function I(r){let e=[];return t=>{let s=Math.max(0,Math.min(3,t-1)),n=e[s];return n||(n=r(s),e[s]=n),n}}function u(r,e=""){let t=typeof r=="string"?r:r.source,s={replace:(n,l)=>{let i=typeof l=="string"?l:l.source;return i=i.replace(w.caret,"$1"),t=t.replace(n,i),s},getRegex:()=>new RegExp(t,e)};return s}var Me=((r="")=>{try{return!!new RegExp("(?<=1)(?<!1)"+r)}catch{return!1}})(),w={codeRemoveIndent:/^(?: {0,3}\t| {1,4})/gm,listInterruptsParagraph:/^ {0,3}(?:[*+-]|1[.)])[ \t]+[^ \t\n]/,outputLinkReplace:/\\([\[\]])/g,indentCodeCompensation:/^(\s+)(?:```)/,beginningSpace:/^\s+/,endingHash:/#$/,startingSpaceChar:/^ /,endingSpaceChar:/ $/,endingSpaceTabChar:/[ \t]$/,nonSpaceChar:/[^ ]/,newLineCharGlobal:/\n/g,tabCharGlobal:/\t/g,leadingSpaceTab:/^[ \t]+/,multipleSpaceGlobal:/\s+/g,blankLine:/^[ \t]*$/,doubleBlankLine:/\n[ \t]*\n[ \t]*$/,blockquoteStart:/^ {0,3}>/,blockquoteSetextReplace:/\n {0,3}((?:=+|-+)[ \t]*)(?=\n|$)/g,blockquoteSetextReplace2:/^ {0,3}>[ \t]?/gm,blockquoteMarkerWhitespace:/^( {0,3}>)([ \t]+)/gm,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\[[ xX]\][ \t]+\S/,listReplaceTask:/^\[[ xX]\][ \t]+/,listTaskCheckbox:/\[[ xX]\]/,anyLine:/\n.*\n/,hrefBrackets:/^<(.*)>$/,tableDelimiter:/[:|]/,tableAlignChars:/^\||\| *$/g,tableRowBlankLine:/\n[ \t]*$/,tableAlignRight:/^ *-+: *$/,tableAlignCenter:/^ *:-+: *$/,tableAlignLeft:/^ *:-+ *$/,startATag:/^<a /i,endATag:/^<\/a>/i,startPreScriptTag:/^<(pre|code|kbd|script)(\s|>)/i,endPreScriptTag:/^<\/(pre|code|kbd|script)(\s|>)/i,startAngleBracket:/^</,endAngleBracket:/>$/,pedanticHrefTitle:/^([^'"]*[^\s])\s+(['"])(.*)\2/,unicodeAlphaNumeric:/[\p{L}\p{N}]/u,numericCharacterReference:/&#(?:(\d{1,7})|[Xx]([A-Fa-f0-9]{1,6}));/,numericCharacterReferenceOrAmpersand:/&#(?:(\d{1,7})|[Xx]([A-Fa-f0-9]{1,6}));|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,escapeTest:/[&<>"']/,escapeReplace:/[&<>"']/g,escapeTestNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,escapeReplaceNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:r=>new RegExp(`^( {0,3}${r})((?:[ ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:I(r=>new RegExp(`^ {0,${r}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`)),hrRegex:I(r=>new RegExp(`^ {0,${r}}((?:-[ ]*){3,}|(?:_[ ]*){3,}|(?:\\*[ ]*){3,})(?:\\n+|$)`)),fencesBeginRegex:I(r=>new RegExp(`^ {0,${r}}(?:\`\`\`|~~~)`)),headingBeginRegex:I(r=>new RegExp(`^ {0,${r}}#{1,6}(?:\\s|$)`)),pedanticHeadingBeginRegex:I(r=>new RegExp(`^ {0,${r}}#`)),htmlBeginRegex:I(r=>new RegExp(`^ {0,${r}}(?:</?(?:${F})(?: +|$|/?>)|<(?:(?:script|pre|style|textarea)(?:[\\s>]|$)|!--)|<\\?|<![A-Za-z]|<!\\[CDATA\\[)`,"i")),blockquoteBeginRegex:I(r=>new RegExp(`^ {0,${r}}>`)),nestedContainerMarkers:/^(?: {0,3}(?:(?:[*+-]|\d{1,9}[.)])[ \t]+|>[ \t]?))+/},We=/^(?:[ \t]*(?:\n|$))+/,Ke=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,Je=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}(?:(?=`)\1`*|(?=~)\1~*) *(?=\n|$)|$)/,N=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,Ve=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,ue=/ {0,3}(?:[*+-]|\d{1,9}[.)])/,Qe=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |fences|blockquote|heading|hr|html|table))+?)\n {0,3}(=+|-+)[ \t]*(?:\n+|$)/,je=u(Qe).replace(/bull/g,ue).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}(?:\s|$)/).replace(/hr/g,/ {0,3}(?:(?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/\|table/g,"").getRegex(),Ye=u(Qe).replace(/bull/g,ue).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}(?:\s|$)/).replace(/hr/g,/ {0,3}(?:(?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/table/g,/ {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(),ge=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table|[ \t]+\n)[^\n]+)*)/,et=/^[^\n]+/,ke=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\\n]|\n(?![ \t]*\n))+/,tt=u(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",ke).replace("title",/(?:"(?:\\[\s\S]|[^"\\])*"|'(?:\\[\s\S]|[^'\\\n]|\n(?!\n))*'|\((?:\\[\s\S]|[^()\\])*\))/).getRegex(),rt=u(/^(bull)([ \t][^\n]*?)?(?:\n|$)/).replace(/bull/g,ue).getRegex(),F="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",de=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,nt=u("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n*|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>[^\\n]*\\n*|$)|<![A-Z][\\s\\S]*?(?:>[^\\n]*\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>[^\\n]*\\n*|$)|</?(tag)(?:[ \\t]+|\\n|/?>|$)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!(?:script|pre|style|textarea)(?![a-z0-9-]))([a-z][a-z0-9-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|</[a-z][a-z0-9-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))","i").replace("comment",de).replace("tag",F).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),He=r=>u(ge).replace("hr",N).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*(?:\\n|$))|~~~)[^\\n]*(?:\\n|$)").replace("list",r).replace("html"," {0,3}(?:</?(?:tag)(?: +|\\n|/?>)|<(?:(?:script|pre|style|textarea)(?:[\\s>]|$)|!--)|<\\?|<![A-Za-z]|<!\\[CDATA\\[)").replace("tag",F).getRegex(),st=He(/ {0,3}(?:[*+-]|1[.)])[ \t]+[^ \t\n]/),it=He(/ {0,3}(?:[*+-]|\d{1,9}[.)])(?:[ \t]|\n|$)/),lt=u(/^( {0,3}> ?(?:(?![ \t]*(?:\n|$))(paragraph)|[^\n]*)(?:\n|$))+/).replace("paragraph",it).getRegex(),fe={blockquote:lt,code:Ke,def:tt,fences:Je,heading:Ve,hr:N,html:nt,lheading:je,list:rt,newline:We,paragraph:st,table:C,text:et},Pe=u("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",N).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code","(?: {4}| {0,3} )[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*(?:\\n|$))|~~~)[^\\n]*(?:\\n|$)").replace("list"," {0,3}(?:[*+-]|1[.)])[ \\t]").replace("html"," {0,3}(?:</?(?:tag)(?: +|\\n|/?>)|<(?:(?:script|pre|style|textarea)(?:[\\s>]|$)|!--)|<\\?|<![A-Za-z]|<!\\[CDATA\\[)").replace("tag",F).getRegex(),at={...fe,lheading:Ye,table:Pe,paragraph:u(ge).replace("hr",N).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",Pe).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*(?:\\n|$))|~~~)[^\\n]*(?:\\n|$)").replace("list"," {0,3}(?:[*+-]|1[.)])[ \\t]+[^ \\t\\n]").replace("html"," {0,3}(?:</?(?:tag)(?: +|\\n|/?>)|<(?:(?:script|pre|style|textarea)(?:[\\s>]|$)|!--)|<\\?|<![A-Za-z]|<!\\[CDATA\\[)").replace("tag",F).getRegex()},ot={...fe,html:u(`^ *(?:comment(?: *\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1>(?: *\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?>(?: *\\n{2,}|\\s*$))`).replace("comment",de).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:C,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:u(ge).replace("hr",N).replace("heading",` *#{1,6} *[^
3
+ ]`).replace("lheading",je).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},ct=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,pt=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,Ne=/^( {2,}|\\)\n(?!\s*$)[ \t]*/,ht=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,z=/[\p{P}\p{S}]/u,M=/[\s\p{P}\p{S}]/u,X=/[^\s\p{P}\p{S}]/u,ut=u(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,M).getRegex(),gt=/[\p{Pi}\p{Ps}"']/u,Fe=/(?!~)[\p{P}\p{S}]/u,kt=/(?!~)[\s\p{P}\p{S}]/u,dt=/(?:[^\s\p{P}\p{S}]|~)/u,ft=u(/link|precode-code|html/,"g").replace("link",/\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace("precode-",Me?"(?<!`)()":"(^^|[^`])").replace("code",/(?<b>`+)[^`]+\k<b>(?!`)/).replace("html",/<(?! )[^<>]*?>/).getRegex(),Xe=/^(?:\*+(?:((?!\*)punct)|([^\s*]))?)|^_+(?:((?!_)punct)|([^\s_]))?/,xt=u(Xe,"u").replace(/punct/g,z).getRegex(),bt=u(Xe,"u").replace(/punct/g,Fe).getRegex(),mt=/^(?:\*+(?:((?!\*)(?!openQuote)punct)|([^\s*]))?)|^_+(?:((?!_)(?!openQuote)punct)|([^\s_]))?/,wt=u(mt,"u").replace(/openQuote/g,gt).replace(/punct/g,z).getRegex(),Ge="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",yt=u(Ge,"gu").replace(/notPunctSpace/g,X).replace(/punctSpace/g,M).replace(/punct/g,z).getRegex(),$t=u(Ge,"gu").replace(/notPunctSpace/g,dt).replace(/punctSpace/g,kt).replace(/punct/g,Fe).getRegex(),St="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)[\\s](\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|(?:(?!\\*)punct|notPunctSpace)(\\*+)(?!\\*)(?=notPunctSpace)",Rt=u(St,"gu").replace(/notPunctSpace/g,X).replace(/punctSpace/g,M).replace(/punct/g,z).getRegex(),zt=u("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,X).replace(/punctSpace/g,M).replace(/punct/g,z).getRegex(),At="^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)[\\s](_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)|(?:(?!_)punct|notPunctSpace)(_+)(?!_)(?=notPunctSpace)",Tt=u(At,"gu").replace(/notPunctSpace/g,X).replace(/punctSpace/g,M).replace(/punct/g,z).getRegex(),_t=u(/^~~?(?:((?!~)punct)|[^\s~])/,"u").replace(/punct/g,z).getRegex(),Pt="^[^~]+(?=[^~])|(?!~)punct(~~?)(?=[\\s]|$)|notPunctSpace(~~?)(?!~)(?=punctSpace|$)|(?!~)punctSpace(~~?)(?=notPunctSpace)|[\\s](~~?)(?!~)(?=punct)|(?!~)punct(~~?)(?!~)(?=punct)|notPunctSpace(~~?)(?=notPunctSpace)",vt=u(Pt,"gu").replace(/notPunctSpace/g,X).replace(/punctSpace/g,M).replace(/punct/g,z).getRegex(),It=u(/\\(punct)/,"gu").replace(/punct/g,z).getRegex(),Ct=u(/(`+)(?:[^`]|[^`][\s\S]*?[^`])\1(?!`)|`+|\\(punct)/,"gu").replace(/punct/g,z).getRegex(),Et=u(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme",/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email",/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(),qt=u(de).replace("(?:-->|$)","-->").getRegex(),Lt=u("^comment|^</[a-zA-Z][a-zA-Z0-9-]*\\s*>|^<[a-zA-Z][a-zA-Z0-9-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>").replace("comment",qt).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),Ue=/\[(?:\\[\s\S]|[^\[\]\\])*\]/,V=u(/(?:\[(?:brackets|\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+(?!`)[^`]*?`+(?!`)|``+(?=\])|[^\[\]\\`])*?/).replace("brackets",Ue).getRegex(),Bt=u(/^!?\[(label)\]\([ \t\n]*(href)(?:(?:[ \t]+(?:\n[ \t]*)?|\n[ \t]*)(title))?[ \t\n]*\)/).replace("label",V).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]+|(?=\))/).replace("title",/"(?:\\[\s\S]|[^"\\])*"|'(?:\\[\s\S]|[^'\\])*'|\((?:\\[\s\S]|[^)\\])*\)/).getRegex(),Zt=u(/^!?\[(label)\]\[(ref)\]/).replace("label",V).replace("ref",ke).getRegex(),Dt=u(/^!?\[(ref)\](?:\[\])?/).replace("ref",ke).getRegex(),ve=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\]){1,999}/,Ot=u(/(?:[^\[\]\\`]*(?:\[(?:brackets|\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+(?!`)[^`]*?`+(?!`)|``+(?=\]))){0,999}?[^\[\]\\`]*?/).replace("brackets",Ue).getRegex(),Mt=u("reflink|nolink(?!\\()","g").replace("reflink",u(/^!?\[(label)\]\[(ref)\]/).replace("label",Ot).replace("ref",ve).getRegex()).replace("nolink",u(/^!?\[(ref)\](?:\[\])?/).replace("ref",ve).getRegex()).getRegex(),Ie=/[hH][tT][tT][pP][sS]?|[fF][tT][pP]/,Qt=/[A-Za-z0-9._+-]+@[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![\w-])/,jt=u(/(?:mailto:email|xmpp:email(?:\/[A-Za-z0-9@.]+)?)/).replace(/email/g,Qt).getRegex(),xe={_backpedal:C,anyPunctuation:It,anyPunctuationOutsideCode:Ct,autolink:Et,blockSkip:ft,br:Ne,code:pt,del:C,delLDelim:C,delRDelim:C,emStrongLDelim:xt,emStrongRDelimAst:yt,emStrongRDelimUnd:zt,escape:ct,link:Bt,nolink:Dt,punctuation:ut,reflink:Zt,reflinkSearch:Mt,tag:Lt,text:ht,url:C},Ht={...xe,emStrongLDelim:wt,emStrongRDelimAst:Rt,emStrongRDelimUnd:Tt,link:u(/^!?\[(label)\]\((.*?)\)/).replace("label",V).getRegex(),reflink:u(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",V).getRegex()},oe={...xe,emStrongRDelimAst:$t,emStrongLDelim:bt,delLDelim:_t,delRDelim:vt,url:u(/^emailProtocol|^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("emailProtocol",jt).replace("protocol",Ie).replace("email",/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![\w-])/).getRegex(),_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])((?:\\[\s\S]|[^\\])*?(?:\\[\s\S]|[^\s~\\]))\1(?=[^~]|$)/,text:u(/^(?:[^a-zA-Z0-9](?=emailProtocol)|(`+|~+|[^`~])(?:(?=[`~])|(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|wwwStart|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9](?=emailProtocol)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@))))/).replace("protocol",Ie).replace(/emailProtocol/g,/(?:mailto|xmpp):/).replace("wwwStart",Me?"(?<![^\\s*_~(])www\\.":"www\\.").getRegex()},Nt={...oe,br:u(Ne).replace("{2,}","*").getRegex(),text:u(oe.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},K={normal:fe,gfm:at,pedantic:ot},j={normal:xe,gfm:oe,breaks:Nt,pedantic:Ht},Ft={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},Ce=r=>Ft[r];function $(r,e){if(e){if(w.escapeTest.test(r))return r.replace(w.escapeReplace,Ce)}else if(w.escapeTestNoEncode.test(r))return r.replace(w.escapeReplaceNoEncode,Ce);return r}function Xt(r){return w.numericCharacterReference.test(r)?r.replace(w.numericCharacterReferenceOrAmpersand,(e,t,s)=>{if(t===void 0&&s===void 0)return"&amp;";let n=t===void 0?Number.parseInt(s,16):Number.parseInt(t,10);return n===0||n>1114111||n>=55296&&n<=57343?"\uFFFD":n===38?"&amp;":String.fromCodePoint(n)}):r}function Ee(r){try{r=encodeURI(r).replace(w.percentDecode,"%")}catch{return null}return r}function qe(r,e){let t=r.replace(w.findPipe,(l,i,a)=>{let o=!1,p=i;for(;--p>=0&&a[p]==="\\";)o=!o;return o?"|":" |"}),s=t.split(w.splitPipe),n=0;if(s[0].trim()||s.shift(),s.length>0&&!s.at(-1)?.trim()&&s.pop(),e)if(s.length>e)s.splice(e);else for(;s.length<e;)s.push("");for(;n<s.length;n++)s[n]=s[n].trim().replace(w.slashPipe,"|");return s}function T(r,e,t){let s=r.length;if(s===0)return"";let n=0;for(;n<s;){let l=r.charAt(s-n-1);if(l===e&&!t)n++;else if(l!==e&&t)n++;else break}return r.slice(0,s-n)}function Le(r){let e=r.split(`
4
+ `),t=e.length-1;for(;t>=0&&w.blankLine.test(e[t]);)t--;return e.length-t<=2?r:e.slice(0,t+1).join(`
5
+ `)}function Y(r){return r.trim().replace(w.multipleSpaceGlobal," ").toLowerCase().toUpperCase().toLowerCase()}function Be(r,e){if(r.indexOf(e[0])===-1&&r.indexOf(e[1])===-1)return-1;let t=0;for(let s=0;s<r.length;s++)if(r[s]==="\\")s++;else if(r[s]===e[0])t++;else if(r[s]===e[1]&&(t--,t<0))return s;return t>0?-2:-1}var O=new WeakMap;function be(r){let e={"*":-1,_:-1},t=-1,s=r.length;for(let n=0;n<s;n++){let l=r[n];if(l!=="*"&&l!=="_"&&l!=="~")continue;let i=n===0?`
6
+ `:r[n-1],a=n+1;for(;a<s&&r[a]===l;)a++;i!==" "&&i!==" "&&i!==`
7
+ `&&i!=="\r"&&i!=="\f"&&(l==="~"?t=n:e[l]=n),n=a-1}return{maskedSrc:r,lastPossibleEmStrongCloserIndex:e,lastPossibleDelCloserIndex:t}}function Gt(r,e){let t=be(e),s=O.get(r);s?s.push(t):O.set(r,[t])}function Ut(r){let e=O.get(r);e&&(e.pop(),e.length===0&&O.delete(r))}function Wt(r,e,t){let s=O.get(r)?.at(-1);return s&&s.maskedSrc===e?s.lastPossibleEmStrongCloserIndex[t]:be(e).lastPossibleEmStrongCloserIndex[t]}function Kt(r,e){let t=O.get(r)?.at(-1);return t&&t.maskedSrc===e?t.lastPossibleDelCloserIndex:be(e).lastPossibleDelCloserIndex}function J(r,e=0){let t=e,s="";for(let n of r)if(n===" "){let l=4-t%4;s+=" ".repeat(l),t+=l}else s+=n,t++;return s}function Ze(r,e,t,s,n){let l=e.href,i=e.title||null,a=r[1].replace(n.other.outputLinkReplace,"$1"),o=r[0].charAt(0)==="!",p=s.state.inLink,c=s.state.linkEmitted,h=s.state.inRawBlock;s.state.inLink=!0,s.state.linkEmitted=!1;let k=s.inlineTokens(a),g=s.state.linkEmitted;if(s.state.linkEmitted=c,s.state.inLink=p,!o){if(g){s.state.inRawBlock=h;return}s.state.linkEmitted=!0}return{type:o?"image":"link",raw:t,href:l,title:i,text:a,tokens:k}}function Jt(r,e,t){let s=r.match(t.other.indentCodeCompensation);if(s===null)return e;let n=s[1];return e.split(`
8
+ `).map(l=>{let i=l.match(t.other.beginningSpace);if(i===null)return l;let[a]=i;return l.slice(Math.min(a.length,n.length))}).join(`
9
+ `)}function De(r,e,t,s){if(!e.includes("<"))return!1;for(let n=0;n<e.length;n++){if(e[n]==="\\"){n++;continue}if(e[n]==="`"){let a=s.inline.code.exec(e.slice(n));if(a){n+=a[0].length-1;continue}}if(e[n]!=="<")continue;let l=r.slice(t+n),i=s.inline.tag.exec(l)||s.inline.autolink.exec(l);if(i){if(i[0].length>e.length-n)return!0;n+=i[0].length-1}}return!1}var D=class{options;rules;lexer;constructor(r){this.options=r||q}space(r){let e=this.rules.block.newline.exec(r);if(e&&e[0].length>0)return{type:"space",raw:e[0]}}code(r){let e=this.rules.block.code.exec(r);if(e){let t=this.options.pedantic?e[0]:Le(e[0]),s=t.replace(this.rules.other.codeRemoveIndent,"");return{type:"code",raw:t,codeBlockStyle:"indented",text:s}}}fences(r){let e=this.rules.block.fences.exec(r);if(e){let t=e[0],s=Jt(t,e[3]||"",this.rules);return{type:"code",raw:t,lang:e[2]?e[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):e[2],text:s}}}heading(r){let e=this.rules.block.heading.exec(r);if(e){let t=e[2].trim();if(this.rules.other.endingHash.test(t)){let s=T(t,"#");(this.options.pedantic||!s||this.rules.other.endingSpaceTabChar.test(s))&&(t=s.trim())}return{type:"heading",raw:T(e[0],`
10
+ `),depth:e[1].length,text:t,tokens:this.lexer.inline(t)}}}hr(r){let e=this.rules.block.hr.exec(r);if(e)return{type:"hr",raw:T(e[0],`
11
+ `)}}blockquote(r){let e=this.rules.block.blockquote.exec(r);if(e){let t=T(e[0],`
12
+ `).split(`
13
+ `),s="",n="",l=[];for(;t.length>0;){let i=!1,a=[],o;for(o=0;o<t.length;o++)if(this.rules.other.blockquoteStart.test(t[o]))a.push(t[o]),i=!0;else if(!i)a.push(t[o]);else break;t=t.slice(o);let p=a.join(`
14
+ `),c=p.replace(this.rules.other.blockquoteMarkerWhitespace,(g,x,b)=>x+J(b,x.length)).replace(this.rules.other.blockquoteSetextReplace,`
15
+ $1`).replace(this.rules.other.blockquoteSetextReplace2,"");s=s?`${s}
16
+ ${p}`:p,n=n?`${n}
17
+ ${c}`:c;let h=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTokens(c,l,!0),this.lexer.state.top=h,t.length===0)break;let k=l.at(-1);if(k?.type==="code"||k?.type==="heading"||k?.type==="hr"||k?.type==="html"||k?.type==="table")break;if(k?.type==="blockquote"){let g=k,x=t.join(`
18
+ `),b=g.raw+`
19
+ `+x.replace(this.rules.other.blockquoteSetextReplace2,""),f=this.blockquote(b);l[l.length-1]=f;let y=b.substring(f.raw.length).replace(/^\n/,""),m=y?y.split(`
20
+ `).length:0,A=m?t.slice(0,-m):t;if(A.length>0&&(s=`${s}
21
+ ${A.join(`
22
+ `)}`),n=n.substring(0,n.length-g.text.length)+f.text,t=t.slice(A.length),t.length>0&&this.rules.other.blockquoteStart.test(t[0]))continue;break}else if(k?.type==="list"){let g=k,x=g.raw+`
23
+ `+t.join(`
24
+ `),b=this.list(x);l[l.length-1]=b;let f=b.raw.length>g.raw.length?x.slice(g.raw.length+1,b.raw.length).split(`
25
+ `).length:0;if(f>0){let y=t.slice(0,f).join(`
26
+ `);s=`${s}
27
+ ${y}`,n=`${n}
28
+ ${y}`}t=t.slice(f);continue}}return{type:"blockquote",raw:s,tokens:l,text:n}}}list(r){let e=this.rules.block.list.exec(r);if(e){if(!this.options.pedantic&&this.lexer.state.lastToken?.type==="text"&&!this.rules.other.listInterruptsParagraph.test(r))return;let t=r,s=()=>t.length-r.length,n=e[1].trim(),l=n.length>1,i={type:"list",raw:"",ordered:l,start:l?+n.slice(0,-1):"",loose:!1,items:[]};n=l?`\\d{1,9}\\${n.slice(-1)}`:`\\${n}`,this.options.pedantic&&(n=l?n:"[*+-]");let a=this.rules.other.listItemRegex(n),o=!1;for(;r;){let c=!1,h="";if(!(e=a.exec(r))||this.rules.block.hr.test(r))break;let k=s();r=r.substring(e[0].length);let g=e[2].split(`
29
+ `,1)[0],x=e[1].length,b=this.options.pedantic?J(g,x):g.replace(this.rules.other.leadingSpaceTab,L=>J(L,x)),f=r.split(`
30
+ `,1)[0],y=!b.trim(),m=0;if(this.options.pedantic?(m=2,h=b.trimStart()):y?m=x+1:(m=b.search(this.rules.other.nonSpaceChar),m=m>4?1:m,h=b.slice(m),m+=x),y&&this.rules.other.blankLine.test(f)&&(r=r.substring(f.length+1),c=!0),!c){let L=this.rules.other.nextBulletRegex(m),Q=this.rules.other.hrRegex(m),G=this.rules.other.fencesBeginRegex(m),U=this.options.pedantic?this.rules.other.pedanticHeadingBeginRegex(m):this.rules.other.headingBeginRegex(m),P=this.rules.other.htmlBeginRegex(m),W=this.rules.other.blockquoteBeginRegex(m),B=!1;for(;r;){let ye=r.split(`
31
+ `,1)[0],Z;if(f=ye,this.options.pedantic?(f=f.replace(this.rules.other.listReplaceNesting," "),Z=f):Z=f.replace(this.rules.other.leadingSpaceTab,te=>J(te)),G.test(f)||U.test(f)||P.test(f)||W.test(f)||L.test(f)||Q.test(f))break;if(Z.search(this.rules.other.nonSpaceChar)>=m||!f.trim())h+=`
32
+ `+Z.slice(m),B=!1;else{if(y||b.replace(this.rules.other.tabCharGlobal," ").search(this.rules.other.nonSpaceChar)>=4||G.test(b)||U.test(b)||P.test(b)||Q.test(b))break;if(!this.options.pedantic&&!B){let re=b.replace(this.rules.other.nestedContainerMarkers,"");if(this.rules.block.fences.test(re)||this.rules.block.heading.test(re)||this.rules.block.hr.test(re))break}let te=!this.options.pedantic&&/^ {0,3}(?:=+|-+) *$/.test(f)&&this.rules.block.lheading.test(`${b}
33
+ ${f}`)?` ${Z.replace(/^ {0,3}/,"")}`:f;h+=`
34
+ `+te,B=!0}y=!f.trim(),r=r.substring(ye.length+1),b=Z.slice(m)}}let A=t.slice(k,s());i.loose||(o?i.loose=!0:this.rules.other.doubleBlankLine.test(A)&&(o=!0)),i.items.push({type:"list_item",raw:A,task:!!this.options.gfm&&this.rules.other.listIsTask.test(h),loose:!1,text:h,tokens:[]})}let p=i.items.at(-1);if(p)p.raw=p.raw.trimEnd(),p.text=p.text.trimEnd();else return;i.raw=t.slice(0,s()).trimEnd();for(let c of i.items)if(this.lexer.state.top=!1,c.tokens=this.lexer.blockTokens(c.text,[]),!i.loose){let h=c.tokens.filter(g=>g.type==="space"),k=h.length>0&&h.some(g=>this.rules.other.anyLine.test(g.raw));i.loose=k}for(let c of i.items){let h=c.tokens[0];if(c.task&&(h?.type==="text"||h?.type==="paragraph")){c.text=c.text.replace(this.rules.other.listReplaceTask,""),h.raw=h.raw.replace(this.rules.other.listReplaceTask,""),h.text=h.text.replace(this.rules.other.listReplaceTask,"");for(let g=this.lexer.inlineQueue.length-1;g>=0;g--)if(this.rules.other.listIsTask.test(this.lexer.inlineQueue[g].src)){this.lexer.inlineQueue[g].src=this.lexer.inlineQueue[g].src.replace(this.rules.other.listReplaceTask,"");break}let k=this.rules.other.listTaskCheckbox.exec(c.raw);if(k){let g={type:"checkbox",raw:k[0]+" ",checked:k[0]!=="[ ]"};c.checked=g.checked,i.loose?c.tokens[0]&&["paragraph","text"].includes(c.tokens[0].type)&&"tokens"in c.tokens[0]&&c.tokens[0].tokens?(c.tokens[0].raw=g.raw+c.tokens[0].raw,c.tokens[0].text=g.raw+c.tokens[0].text,c.tokens[0].tokens.unshift(g)):c.tokens.unshift({type:"paragraph",raw:g.raw,text:g.raw,tokens:[g]}):c.tokens.unshift(g)}}else c.task&&(c.task=!1)}if(i.loose)for(let c of i.items){c.loose=!0;for(let h of c.tokens)h.type==="text"&&(h.type="paragraph")}return i}}html(r){let e=this.rules.block.html.exec(r);if(e){let t=Le(e[0]);return{type:"html",block:!0,raw:t,pre:e[1]==="pre"||e[1]==="script"||e[1]==="style",text:t}}}def(r){let e=this.rules.block.def.exec(r);if(e){if(!this.rules.other.startAngleBracket.test(e[2])&&Be(e[2],"()")!==-1)return;let t=Y(e[1]),s=e[2]?e[2].replace(this.rules.other.hrefBrackets,"$1").replace(this.rules.inline.anyPunctuation,"$1"):"",n=e[3]?e[3].substring(1,e[3].length-1).replace(this.rules.inline.anyPunctuation,"$1"):e[3];return{type:"def",tag:t,raw:T(e[0],`
35
+ `),href:s,title:n}}}table(r){let e=this.rules.block.table.exec(r);if(!e||!this.rules.other.tableDelimiter.test(e[2]))return;let t=qe(e[1]),s=e[2].replace(this.rules.other.tableAlignChars,"").split("|"),n=e[3]?.trim()?e[3].replace(this.rules.other.tableRowBlankLine,"").split(`
36
+ `):[],l={type:"table",raw:T(e[0],`
37
+ `),header:[],align:[],rows:[]};if(t.length===s.length){for(let i of s)this.rules.other.tableAlignRight.test(i)?l.align.push("right"):this.rules.other.tableAlignCenter.test(i)?l.align.push("center"):this.rules.other.tableAlignLeft.test(i)?l.align.push("left"):l.align.push(null);for(let i=0;i<t.length;i++)l.header.push({text:t[i],tokens:this.lexer.inline(t[i]),header:!0,align:l.align[i]});for(let i of n)l.rows.push(qe(i,l.header.length).map((a,o)=>({text:a,tokens:this.lexer.inline(a),header:!1,align:l.align[o]})));return l}}lheading(r){let e=this.rules.block.lheading.exec(r);if(e){let t=e[1].trim();return{type:"heading",raw:T(e[0],`
38
+ `),depth:e[2].charAt(0)==="="?1:2,text:t,tokens:this.lexer.inline(t)}}}paragraph(r){let e=this.rules.block.paragraph.exec(r);if(e){let t=e[1].charAt(e[1].length-1)===`
39
+ `?e[1].slice(0,-1):e[1];return{type:"paragraph",raw:e[0],text:t,tokens:this.lexer.inline(t)}}}text(r){let e=this.rules.block.text.exec(r);if(e)return{type:"text",raw:e[0],text:e[0],tokens:this.lexer.inline(e[0])}}escape(r){let e=this.rules.inline.escape.exec(r);if(e)return{type:"escape",raw:e[0],text:e[1]}}tag(r){let e=this.rules.inline.tag.exec(r);if(e)return!this.lexer.state.inLink&&this.rules.other.startATag.test(e[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&this.rules.other.endATag.test(e[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&this.rules.other.startPreScriptTag.test(e[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&this.rules.other.endPreScriptTag.test(e[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:e[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:e[0]}}link(r){if(this.lexer.state.linkParenPossible===!1)return;let e=this.rules.inline.link.exec(r);if(e){let t=e[0].charAt(0)==="!"?2:1;if(!this.options.pedantic&&De(r,e[1],t,this.rules))return;let s=e[2].trim();if(!this.options.pedantic&&this.rules.other.startAngleBracket.test(s)){if(!this.rules.other.endAngleBracket.test(s))return;let a=T(s.slice(0,-1),"\\");if((s.length-a.length)%2===0)return}else{let a=Be(e[2],"()");if(a===-2)return;if(a>-1){let o=(e[0].indexOf("!")===0?5:4)+e[1].length+a;e[2]=e[2].substring(0,a),e[0]=e[0].substring(0,o).trim(),e[3]=""}}let n=T(e[0].slice(0,-1),"\\");if((e[0].length-n.length)%2===0)return;let l=e[2],i="";if(this.options.pedantic){let a=this.rules.other.pedanticHrefTitle.exec(l);a&&(l=a[1],i=a[3])}else i=e[3]?e[3].slice(1,-1):"";return l=l.trim(),this.rules.other.startAngleBracket.test(l)&&(this.options.pedantic&&!this.rules.other.endAngleBracket.test(s)?l=l.slice(1):l=l.slice(1,-1)),Ze(e,{href:l&&l.replace(this.rules.inline.anyPunctuation,"$1"),title:i&&i.replace(this.rules.inline.anyPunctuation,"$1")},e[0],this.lexer,this.rules)}}reflink(r,e){let t;if((t=this.rules.inline.reflink.exec(r))||(t=this.rules.inline.nolink.exec(r))){let s=t[0].charAt(0)==="!"?2:1;if(!this.options.pedantic&&De(r,t[1],s,this.rules))return;let n=e[Y(t[2]||t[1])];if(!n){let l=t[0].charAt(0);return{type:"text",raw:l,text:l}}return Ze(t,n,t[0],this.lexer,this.rules)}}emStrong(r,e,t=""){let s=this.rules.inline.emStrongLDelim.exec(r);if(!s||!s[1]&&!s[2]&&!s[3]&&!s[4])return;let n=s[0][0],l=t===n,i=e.length-r.length,a=i;for(;!this.options.pedantic&&a>0&&e[a-1]===n;)a--;let o=[...e.slice(Math.max(0,a-2),a)].at(-1)??"",p=o==="*"||o==="_"||!!this.rules.inline.punctuation.exec(o);a<i&&(t=o);let c=a<i?p:t==="*"||t==="_"||!!this.rules.inline.punctuation.exec(t);if(s[4]&&t.match(this.rules.other.unicodeAlphaNumeric))return;let h=s[1]||s[3]||"";if(!h||!t||c){let k=[...s[0]].length-1,g,x,b=k,f=0,y=i-a+k,m=!this.options.pedantic&&!!o.trim()&&(!!h||n==="*"&&!p);if(n!=="*"&&n!=="_")return;let A=n==="*"?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd,L=Wt(this,e,n),Q=e.length-r.length+k;if(L<Q)return;e=e.slice(-1*r.length+k);let G=L-Q;for(A.lastIndex=0;(s=A.exec(e))!==null&&!(s.index>G);){if(g=s[1]||s[2]||s[3]||s[4]||s[5]||s[6],!g)continue;if(x=[...g].length,s[3]||s[4]){b+=x;continue}else if(s[5]||s[6]||m){if(l&&(s[5]||s[6]))break;if(y%3&&!((y+x)%3)){f+=x;continue}}if(b-=x,b>0)continue;x=Math.min(x,x+b+f);let U=[...s[0]][0].length,P=r.slice(0,k+s.index+U+x);if(Math.min(k,x)%2){let B=P.slice(1,-1);return{type:"em",raw:P,text:B,tokens:this.lexer.inlineTokens(B)}}let W=P.slice(2,-2);return{type:"strong",raw:P,text:W,tokens:this.lexer.inlineTokens(W)}}}}codespan(r){let e=this.rules.inline.code.exec(r);if(e){let t=e[2].replace(this.rules.other.newLineCharGlobal," "),s=this.rules.other.nonSpaceChar.test(t),n=this.rules.other.startingSpaceChar.test(t)&&this.rules.other.endingSpaceChar.test(t);return s&&n&&(t=t.substring(1,t.length-1)),{type:"codespan",raw:e[0],text:t}}}br(r){let e=this.rules.inline.br.exec(r);if(e)return{type:"br",raw:e[0]}}del(r,e,t=""){let s=this.rules.inline.delLDelim.exec(r);if(s&&(!s[1]||!t||this.rules.inline.punctuation.exec(t))){let n=[...s[0]].length-1,l,i,a=n,o=this.rules.inline.delRDelim,p=Kt(this,e),c=e.length-r.length+n;if(p<c)return;e=e.slice(-1*r.length+n);let h=p-c;for(o.lastIndex=0;(s=o.exec(e))!==null&&!(s.index>h);){if(l=s[1]||s[2]||s[3]||s[4]||s[5]||s[6],!l||(i=[...l].length,i!==n))continue;if(s[3]||s[4]){a+=i;continue}if(a-=i,a>0)continue;i=Math.min(i,i+a);let k=[...s[0]][0].length,g=r.slice(0,n+s.index+k+i),x=g.slice(n,-n);return{type:"del",raw:g,text:x,tokens:this.lexer.inlineTokens(x)}}}}autolink(r){let e=this.rules.inline.autolink.exec(r);if(e){let t,s;return e[2]==="@"?(t=e[1],s="mailto:"+t):(t=e[1],s=t),{type:"link",raw:e[0],text:t,href:s,autolink:!0,tokens:[{type:"text",raw:t,text:t}]}}}url(r){let e;if(e=this.rules.inline.url.exec(r)){let t,s;if(e[2]==="@")t=e[0],s="mailto:"+t;else{let n;do n=e[0],e[0]=this.rules.inline._backpedal.exec(e[0])?.[0]??"";while(n!==e[0]);t=e[0],e[1]==="www."?s="http://"+e[0]:s=e[0]}return{type:"link",raw:e[0],text:t,href:s,autolink:!0,tokens:[{type:"text",raw:t,text:t}]}}}inlineText(r){let e=this.rules.inline.text.exec(r);if(e){let t=this.lexer.state.inRawBlock;return{type:"text",raw:e[0],text:t?e[0]:Xt(e[0]),escaped:t}}}},S=class ce{tokens;options;state;inlineQueue;tokenizer;constructor(e){this.tokens=[],this.tokens.links=Object.create(null),this.options=e||q,this.options.tokenizer=this.options.tokenizer||new D,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,this.tokenizer.lexer=this,this.inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,linkEmitted:!1,linkParenPossible:!0,top:!0};let t={other:w,block:K.normal,inline:j.normal};this.options.pedantic?(t.block=K.pedantic,t.inline=j.pedantic):this.options.gfm&&(t.block=K.gfm,this.options.breaks?t.inline=j.breaks:t.inline=j.gfm),this.tokenizer.rules=t}static get rules(){return{block:K,inline:j}}static lex(e,t){return new ce(t).lex(e)}static lexInline(e,t){return new ce(t).inlineTokens(e)}lex(e){e=e.replace(w.carriageReturn,`
40
+ `),this.blockTokens(e,this.tokens);for(let t=0;t<this.inlineQueue.length;t++){let s=this.inlineQueue[t];this.state.inRawBlock=!1,this.inlineTokens(s.src,s.tokens)}return this.inlineQueue=[],this.tokens}blockTokens(e,t=[],s=!1){this.tokenizer.lexer=this;let n=this.state.lastToken;this.options.pedantic&&(e=e.replace(w.tabCharGlobal," ").replace(w.spaceLine,""));let l=1/0;for(;e;){if(e.length<l)l=e.length;else{this.infiniteLoopError(e.charCodeAt(0));break}this.state.lastToken=t.at(-1);let i;if(this.options.extensions?.block?.some(o=>(i=o.call({lexer:this},e,t))?(e=e.substring(i.raw.length),t.push(i),!0):!1))continue;if(i=this.tokenizer.space(e)){e=e.substring(i.raw.length);let o=t.at(-1);i.raw.length===1&&o!==void 0?o.raw+=`
41
+ `:t.push(i);continue}if(i=this.tokenizer.code(e)){e=e.substring(i.raw.length);let o=t.at(-1);o?.type==="paragraph"||o?.type==="text"?(o.raw+=(o.raw.endsWith(`
42
+ `)?"":`
43
+ `)+i.raw,o.text+=`
44
+ `+i.text,this.inlineQueue.at(-1).src=o.text):t.push(i);continue}if(i=this.tokenizer.fences(e)){e=e.substring(i.raw.length),t.push(i);continue}if(i=this.tokenizer.heading(e)){e=e.substring(i.raw.length),t.push(i);continue}if(i=this.tokenizer.hr(e)){e=e.substring(i.raw.length),t.push(i);continue}if(i=this.tokenizer.blockquote(e)){e=e.substring(i.raw.length),t.push(i);continue}if(i=this.tokenizer.list(e)){e=e.substring(i.raw.length),t.push(i);continue}if(i=this.tokenizer.html(e)){e=e.substring(i.raw.length),t.push(i);continue}if(i=this.tokenizer.def(e)){e=e.substring(i.raw.length);let o=t.at(-1);o?.type==="paragraph"||o?.type==="text"?(o.raw+=(o.raw.endsWith(`
45
+ `)?"":`
46
+ `)+i.raw,o.text+=`
47
+ `+i.raw,this.inlineQueue.at(-1).src=o.text):(this.tokens.links[i.tag]||(this.tokens.links[i.tag]={href:i.href,title:i.title}),t.push(i));continue}if(i=this.tokenizer.table(e)){e=e.substring(i.raw.length),t.push(i);continue}if(i=this.tokenizer.lheading(e)){e=e.substring(i.raw.length),t.push(i);continue}let a=e;if(this.options.extensions?.startBlock){let o=1/0,p=e.slice(1),c;this.options.extensions.startBlock.forEach(h=>{c=h.call({lexer:this},p),typeof c=="number"&&c>=0&&(o=Math.min(o,c))}),o<1/0&&o>=0&&(a=e.substring(0,o+1))}if(this.state.top&&(i=this.tokenizer.paragraph(a))){let o=t.at(-1);s&&o?.type==="paragraph"?(o.raw+=(o.raw.endsWith(`
48
+ `)?"":`
49
+ `)+i.raw,o.text+=`
50
+ `+i.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=o.text):t.push(i),s=a.length!==e.length,e=e.substring(i.raw.length);continue}if(i=this.tokenizer.text(e)){e=e.substring(i.raw.length);let o=t.at(-1);o?.type==="text"?(o.raw+=(o.raw.endsWith(`
51
+ `)?"":`
52
+ `)+i.raw,o.text+=`
53
+ `+i.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=o.text):t.push(i);continue}if(e){this.infiniteLoopError(e.charCodeAt(0));break}}return this.state.top=!0,this.state.lastToken=n,t}inline(e,t=[]){return this.inlineQueue.push({src:e,tokens:t}),t}linkInText(e){if(!e.includes("["))return!1;let t=this.tokenizer.rules.inline.link;for(let s of e.matchAll(this.tokenizer.rules.inline.blockSkip))if(t.test(s[0])&&e.charAt(s.index-1)!=="!")return!0;for(let s of e.matchAll(this.tokenizer.rules.inline.reflinkSearch)){let n=s[0],l=n.lastIndexOf("[");if(!(n.charAt(0)==="!"||!Object.hasOwn(this.tokens.links,Y(n.slice(l+1,-1))))&&!(l>1&&this.linkInText(n.slice(1,l-1))))return!0}return!1}inlineTokens(e,t=[]){this.tokenizer.lexer=this;let s=this.state.linkParenPossible;this.state.linkParenPossible=s&&e.includes(")");try{return this.#e(e,t)}finally{this.state.linkParenPossible=s}}#e(e,t){let s=e.includes("*")||e.includes("_")||e.includes("~")||this.options.hooks?.emStrongMask||this.tokenizer.emStrong!==D.prototype.emStrong||this.tokenizer.del!==D.prototype.del?this.#n(e):e;Gt(this.tokenizer,s);try{return this.#t(e,s,t)}finally{Ut(this.tokenizer)}}#t(e,t,s){let n=!1,l="",i=1/0;for(;e;){if(e.length<i)i=e.length;else{this.infiniteLoopError(e.charCodeAt(0));break}n||(l=""),n=!1;let a;if(this.options.extensions?.inline?.some(p=>(a=p.call({lexer:this},e,s))?(e=e.substring(a.raw.length),s.push(a),!0):!1))continue;if(a=this.tokenizer.escape(e)){e=e.substring(a.raw.length),s.push(a);continue}if(a=this.tokenizer.tag(e)){e=e.substring(a.raw.length),s.push(a);continue}if(a=this.tokenizer.link(e)){e=e.substring(a.raw.length),s.push(a);continue}if(a=this.tokenizer.reflink(e,this.tokens.links)){e=e.substring(a.raw.length);let p=s.at(-1);a.type==="text"&&p?.type==="text"?(p.raw+=a.raw,p.text+=a.text):s.push(a);continue}if(a=this.tokenizer.emStrong(e,t,l)){e=e.substring(a.raw.length),s.push(a);continue}if(a=this.tokenizer.codespan(e)){e=e.substring(a.raw.length),s.push(a);continue}if(a=this.tokenizer.br(e)){e=e.substring(a.raw.length),s.push(a);continue}if(a=this.tokenizer.del(e,t,l)){e=e.substring(a.raw.length),s.push(a);continue}if(a=this.tokenizer.autolink(e)){e=e.substring(a.raw.length),s.push(a);continue}if(!this.state.inLink&&(a=this.tokenizer.url(e))){e=e.substring(a.raw.length),s.push(a);continue}let o=e;if(this.options.extensions?.startInline){let p=1/0,c=e.slice(1),h;this.options.extensions.startInline.forEach(k=>{h=k.call({lexer:this},c),typeof h=="number"&&h>=0&&(p=Math.min(p,h))}),p<1/0&&p>=0&&(o=e.substring(0,p+1))}if(a=this.tokenizer.inlineText(o)){e=e.substring(a.raw.length),a.raw.slice(-1)!=="_"&&(l=a.raw.slice(-1)),n=!0;let p=s.at(-1);p?.type==="text"?(p.raw+=a.raw,p.text+=a.text):s.push(a);continue}if(e){this.infiniteLoopError(e.charCodeAt(0));break}}return s}#r(e){let{blockSkip:t,tag:s,autolink:n}=this.tokenizer.rules.inline,l="",i=0,a;for(t.lastIndex=0;a=t.exec(e);){let o=a.index+(a[2]?a[2].length:0),p=a.index+a[0].length;if(e.charAt(o)==="<"){let c=e.slice(o),h=s.exec(c)||n.exec(c);if(!h){t.lastIndex=o+1;continue}p=o+h[0].length,t.lastIndex=p}l+=e.slice(i,o)+"["+"a".repeat(p-o-2)+"]",i=p}return l+e.slice(i)}#n(e){let t=e;if(this.tokens.links&&e.includes("[")){let s=this.tokenizer.rules.inline.reflinkSearch,n=l=>{let i=l.lastIndexOf("[");if(!Object.hasOwn(this.tokens.links,Y(l.slice(i+1,-1))))return l;if(i>1&&l.charAt(0)!=="!"){let a=l.slice(1,i-1);if(this.linkInText(a))return"["+a.replace(s,n)+"]["+"a".repeat(l.length-i-2)+"]"}return"["+"a".repeat(l.length-2)+"]"};t=t.replace(s,n)}return t=t.replace(this.tokenizer.rules.inline.anyPunctuationOutsideCode,(s,n,l)=>l?"+".repeat(s.length):n?n+s.slice(n.length,-n.length).replace(/`/g,"+")+n:s),t=this.#r(t),t=this.options.hooks?.emStrongMask?.call({lexer:this},t)??t,t}infiniteLoopError(e){let t="Infinite loop on byte: "+e;if(this.options.silent)console.error(t);else throw new Error(t)}},ee=class{options;parser;constructor(r){this.options=r||q}space(r){return""}code({text:r,lang:e,escaped:t}){let s=(e||"").match(w.notSpaceStart)?.[0],n=r?r.replace(w.endingNewline,"")+`
54
+ `:"";return s?'<pre><code class="language-'+$(s)+'">'+(t?n:$(n,!0))+`</code></pre>
55
+ `:"<pre><code>"+(t?n:$(n,!0))+`</code></pre>
56
+ `}blockquote({tokens:r}){return`<blockquote>
57
+ ${this.parser.parse(r)}</blockquote>
58
+ `}html({text:r}){return r}def(r){return""}heading({tokens:r,depth:e}){return`<h${e}>${this.parser.parseInline(r)}</h${e}>
59
+ `}hr(r){return`<hr>
60
+ `}list(r){let e=r.ordered,t=r.start,s="";for(let i=0;i<r.items.length;i++){let a=r.items[i];s+=this.listitem(a)}let n=e?"ol":"ul",l=e&&t!==1?' start="'+t+'"':"";return"<"+n+l+`>
61
+ `+s+"</"+n+`>
62
+ `}listitem(r){return`<li>${this.parser.parse(r.tokens)}</li>
63
+ `}checkbox({checked:r}){return"<input "+(r?'checked="" ':"")+'disabled="" type="checkbox"> '}paragraph({tokens:r}){return`<p>${this.parser.parseInline(r)}</p>
64
+ `}table(r){let e="",t="";for(let n=0;n<r.header.length;n++)t+=this.tablecell(r.header[n]);e+=this.tablerow({text:t});let s="";for(let n=0;n<r.rows.length;n++){let l=r.rows[n];t="";for(let i=0;i<l.length;i++)t+=this.tablecell(l[i]);s+=this.tablerow({text:t})}return s&&(s=`<tbody>${s}</tbody>`),`<table>
65
+ <thead>
66
+ `+e+`</thead>
67
+ `+s+`</table>
68
+ `}tablerow({text:r}){return`<tr>
69
+ ${r}</tr>
70
+ `}tablecell(r){let e=this.parser.parseInline(r.tokens),t=r.header?"th":"td";return(r.align?`<${t} align="${r.align}">`:`<${t}>`)+e+`</${t}>
71
+ `}strong({tokens:r}){return`<strong>${this.parser.parseInline(r)}</strong>`}em({tokens:r}){return`<em>${this.parser.parseInline(r)}</em>`}codespan({text:r}){return`<code>${$(r,!0)}</code>`}br(r){return"<br>"}del({tokens:r}){return`<del>${this.parser.parseInline(r)}</del>`}link({href:r,title:e,text:t,tokens:s,autolink:n}){let l=n?$(t,!0):this.parser.parseInline(s),i=Ee(r);if(i===null)return l;r=$(i,n);let a='<a href="'+r+'"';return e&&(a+=' title="'+$(e)+'"'),a+=">"+l+"</a>",a}image({href:r,title:e,text:t,tokens:s}){s&&(t=this.parser.parseInline(s,this.parser.textRenderer));let n=Ee(r);if(n===null)return $(t);r=n;let l=`<img src="${$(r)}" alt="${$(t)}"`;return e&&(l+=` title="${$(e)}"`),l+=">",l}text(r){return"tokens"in r&&r.tokens?this.parser.parseInline(r.tokens):"escaped"in r&&r.escaped?r.text:$(r.text)}},me=class{parser;strong({text:r,tokens:e}){return e?this.parser.parseInline(e,this):r}em({text:r,tokens:e}){return e?this.parser.parseInline(e,this):r}codespan({text:r}){return r}del({text:r,tokens:e}){return e?this.parser.parseInline(e,this):r}html({text:r}){return r}text({text:r}){return r}link({text:r,tokens:e}){return e?this.parser.parseInline(e,this):r}image({text:r,tokens:e}){return e?this.parser.parseInline(e,this):r}br(){return`
72
+ `}checkbox({raw:r}){return r}},R=class pe{options;renderer;textRenderer;constructor(e){this.options=e||q,this.options.renderer=this.options.renderer||new ee,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new me,this.textRenderer.parser=this}static parse(e,t){return new pe(t).parse(e)}static parseInline(e,t){return new pe(t).parseInline(e)}parse(e){this.renderer.parser=this;let t="";for(let s=0;s<e.length;s++){let n=e[s];if(this.options.extensions?.renderers?.[n.type]){let i=n,a=this.options.extensions.renderers[i.type].call({parser:this},i);if(a!==!1||!["space","hr","heading","code","table","blockquote","list","checkbox","html","def","paragraph","text"].includes(i.type)){t+=a===!1?"":a??"";continue}}let l=n;switch(l.type){case"space":{t+=this.renderer.space(l);break}case"hr":{t+=this.renderer.hr(l);break}case"heading":{t+=this.renderer.heading(l);break}case"code":{t+=this.renderer.code(l);break}case"table":{t+=this.renderer.table(l);break}case"blockquote":{t+=this.renderer.blockquote(l);break}case"list":{t+=this.renderer.list(l);break}case"checkbox":{t+=this.renderer.checkbox(l);break}case"html":{t+=this.renderer.html(l);break}case"def":{t+=this.renderer.def(l);break}case"paragraph":{t+=this.renderer.paragraph(l);break}case"text":{t+=this.renderer.text(l);break}default:{let i='Token with "'+l.type+'" type was not found.';if(this.options.silent)return console.error(i),"";throw new Error(i)}}}return t}parseInline(e,t=this.renderer){this.renderer.parser=this;let s="";for(let n=0;n<e.length;n++){let l=e[n];if(this.options.extensions?.renderers?.[l.type]){let a=this.options.extensions.renderers[l.type].call({parser:this},l);if(a!==!1||!["escape","html","link","image","checkbox","strong","em","codespan","br","del","text"].includes(l.type)){s+=a===!1?"":a??"";continue}}let i=l;switch(i.type){case"escape":{s+=t.text(i);break}case"html":{s+=t.html(i);break}case"link":{s+=t.link(i);break}case"image":{s+=t.image(i);break}case"checkbox":{s+=t.checkbox(i);break}case"strong":{s+=t.strong(i);break}case"em":{s+=t.em(i);break}case"codespan":{s+=t.codespan(i);break}case"br":{s+=t.br(i);break}case"del":{s+=t.del(i);break}case"text":{s+=t.text(i);break}default:{let a='Token with "'+i.type+'" type was not found.';if(this.options.silent)return console.error(a),"";throw new Error(a)}}}return s}},H=class{options;block;constructor(r){this.options=r||q}static passThroughHooks=new Set(["preprocess","postprocess","processAllTokens","emStrongMask"]);static passThroughHooksRespectAsync=new Set(["preprocess","postprocess","processAllTokens"]);preprocess(r){return r}postprocess(r){return r}processAllTokens(r){return r}emStrongMask(r){return r}provideLexer(r=this.block){return r?S.lex:S.lexInline}provideParser(r=this.block){return r?R.parse:R.parseInline}};function _(r,e){if(Array.isArray(e))for(let t=0;t<e.length;t++)r.push(e[t]);else r.push(e)}var Vt=class{defaults=he();options=this.setOptions;parse=this.parseMarkdown(!0);parseInline=this.parseMarkdown(!1);Parser=R;Renderer=ee;TextRenderer=me;Lexer=S;Tokenizer=D;Hooks=H;constructor(...r){this.use(...r)}walkTokens(r,e){let t=[];for(let s of r)switch(_(t,e.call(this,s)),s.type){case"table":{let n=s;for(let l of n.header)_(t,this.walkTokens(l.tokens,e));for(let l of n.rows)for(let i of l)_(t,this.walkTokens(i.tokens,e));break}case"list":{let n=s;_(t,this.walkTokens(n.items,e));break}default:{let n=s;this.defaults.extensions?.childTokens?.[n.type]?this.defaults.extensions.childTokens[n.type].forEach(l=>{let i=n[l].flat(1/0);_(t,this.walkTokens(i,e))}):n.tokens&&_(t,this.walkTokens(n.tokens,e))}}return t}use(...r){let e=this.defaults.extensions||{renderers:Object.create(null),childTokens:Object.create(null)};return r.forEach(t=>{let s={...t};if(s.async=this.defaults.async||s.async||!1,t.extensions&&(t.extensions.forEach(n=>{if(!n.name)throw new Error("extension name required");if("renderer"in n){let l=e.renderers[n.name];l?e.renderers[n.name]=function(...i){let a=n.renderer.apply(this,i);return a===!1&&(a=l.apply(this,i)),a}:e.renderers[n.name]=n.renderer}if("tokenizer"in n){if(!n.level||n.level!=="block"&&n.level!=="inline")throw new Error("extension level must be 'block' or 'inline'");let l=e[n.level];l?l.unshift(n.tokenizer):e[n.level]=[n.tokenizer],n.start&&(n.level==="block"?e.startBlock?e.startBlock.push(n.start):e.startBlock=[n.start]:n.level==="inline"&&(e.startInline?e.startInline.push(n.start):e.startInline=[n.start]))}"childTokens"in n&&n.childTokens&&(e.childTokens[n.name]=n.childTokens)}),s.extensions=e),t.renderer){let n=this.defaults.renderer||new ee(this.defaults);for(let l in t.renderer){if(!(l in n))throw new Error(`renderer '${l}' does not exist`);if(["options","parser"].includes(l))continue;let i=l,a=t.renderer[i],o=n[i];n[i]=(...p)=>{let c=a.apply(n,p);return c===!1&&(c=o.apply(n,p)),c===!1?"":c??""}}s.renderer=n}if(t.tokenizer){let n=this.defaults.tokenizer||new D(this.defaults);for(let l in t.tokenizer){if(!(l in n))throw new Error(`tokenizer '${l}' does not exist`);if(["options","rules","lexer"].includes(l))continue;let i=l,a=t.tokenizer[i],o=n[i];n[i]=(...p)=>{let c=a.apply(n,p);return c===!1&&(c=o.apply(n,p)),c}}s.tokenizer=n}if(t.hooks){let n=this.defaults.hooks||new H;for(let l in t.hooks){if(!(l in n))throw new Error(`hook '${l}' does not exist`);if(["options","block"].includes(l))continue;let i=l,a=t.hooks[i],o=n[i];H.passThroughHooks.has(l)?n[i]=p=>{if(n.options.async&&H.passThroughHooksRespectAsync.has(l))return(async()=>{let h=await a.call(n,p);return o.call(n,h)})();let c=a.call(n,p);return o.call(n,c)}:n[i]=(...p)=>{if(n.options.async)return(async()=>{let h=await a.apply(n,p);return h===!1&&(h=await o.apply(n,p)),h})();let c=a.apply(n,p);return c===!1&&(c=o.apply(n,p)),c}}s.hooks=n}if(t.walkTokens){let n=this.defaults.walkTokens,l=t.walkTokens;s.walkTokens=function(i){let a=[];return _(a,l.call(this,i)),n&&_(a,n.call(this,i)),a}}this.defaults={...this.defaults,...s}}),this}setOptions(r){return this.defaults={...this.defaults,...r},this}lexer(r,e){return S.lex(r,e??this.defaults)}parser(r,e){return R.parse(r,e??this.defaults)}parseMarkdown(r){return(e,t)=>{let s={...t},n={...this.defaults,...s},l=this.onError(!!n.silent,!!n.async);if(this.defaults.async===!0&&s.async===!1)return l(new Error("marked(): The async option was set to true by an extension. Remove async: false from the parse options object to return a Promise."));if(typeof e>"u"||e===null)return l(new Error("marked(): input parameter is undefined or null"));if(typeof e!="string")return l(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(e)+", string expected"));if(n.hooks&&(n.hooks.options=n,n.hooks.block=r),n.async)return(async()=>{let i=n.hooks?await n.hooks.preprocess(e):e,a=await(n.hooks?await n.hooks.provideLexer(r):r?S.lex:S.lexInline)(i,n),o=n.hooks?await n.hooks.processAllTokens(a):a;n.walkTokens&&await Promise.all(this.walkTokens(o,n.walkTokens));let p=await(n.hooks?await n.hooks.provideParser(r):r?R.parse:R.parseInline)(o,n);return n.hooks?await n.hooks.postprocess(p):p})().catch(l);try{n.hooks&&(e=n.hooks.preprocess(e));let i=(n.hooks?n.hooks.provideLexer(r):r?S.lex:S.lexInline)(e,n);n.hooks&&(i=n.hooks.processAllTokens(i)),n.walkTokens&&this.walkTokens(i,n.walkTokens);let a=(n.hooks?n.hooks.provideParser(r):r?R.parse:R.parseInline)(i,n);return n.hooks&&(a=n.hooks.postprocess(a)),a}catch(i){return l(i)}}}onError(r,e){return t=>{if(t.message+=`
73
+ Please report this to https://github.com/markedjs/marked.`,r){let s="<p>An error occurred:</p><pre>"+$(t.message+"",!0)+"</pre>";return e?Promise.resolve(s):s}if(e)return Promise.reject(t);throw t}}},E=new Vt;function d(r,e){return E.parse(r,e)}d.options=d.setOptions=function(r){return E.setOptions(r),d.defaults=E.defaults,Oe(d.defaults),d};d.getDefaults=he;d.defaults=q;function Yt(...r){return E.use(...r),d.defaults=E.defaults,Oe(d.defaults),d}d.use=Yt;d.walkTokens=function(r,e){return E.walkTokens(r,e)};d.parseInline=E.parseInline;d.Parser=R;d.parser=R.parse;d.Renderer=ee;d.TextRenderer=me;d.Lexer=S;d.lexer=S.lex;d.Tokenizer=D;d.Hooks=H;d.parse=d;var rr=d.options,nr=d.setOptions,sr=d.walkTokens,ir=d.parseInline;var lr=R.parse,ar=S.lex;var er=$e`:host{container-type:inline-size;display:block;min-inline-size:0}.interrupt-container{display:flex;flex-direction:column;gap:.75rem}.interrupt-actions,.interrupt-buttons{display:flex;justify-content:flex-end;gap:.5rem}.interrupt-message{white-space:normal}.interrupt-message :where(p){margin:0}.interrupt-message :where(ul,ol){margin:0;padding-inline-start:1.25rem}.entity-interrupt{background:var(--calcite-color-foreground-1);border-block-start:2px solid var(--calcite-color-brand);gap:0}.entity-heading{align-items:center;display:flex;gap:.75rem;padding:1rem 1rem .75rem}.entity-heading-icon{color:var(--calcite-color-brand);flex:none}.entity-heading-content{display:grid;gap:.25rem;min-inline-size:0}.entity-eyebrow{color:var(--calcite-color-text-3);font-size:var(--calcite-font-size-relative-sm);line-height:1.25}.entity-question{color:var(--calcite-color-text-1);font-size:var(--calcite-font-size-relative-md);font-weight:500;line-height:1.4;overflow-wrap:anywhere}.interrupt-picker{--arcgis-portal-entity-picker-results-max-block-size: min(22rem, 40vh);--arcgis-portal-entity-picker-selection-display: none;box-sizing:border-box;padding:0 1rem .75rem}.entity-interrupt .interrupt-actions{align-items:center;border-block-start:1px solid var(--calcite-color-border-3);display:grid;gap:.75rem;grid-template-columns:minmax(0,1fr) auto;min-block-size:2.25rem;padding:.625rem 1rem}.entity-selection{align-items:center;color:var(--calcite-color-text-2);display:flex;font-size:var(--calcite-font-size-relative-base);gap:.5rem;min-inline-size:0}.entity-selection calcite-icon{color:var(--calcite-color-status-success);flex:none}.entity-selection-label{flex:1;min-inline-size:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}@container (max-width: 24rem){.entity-heading{padding:.875rem .75rem .625rem}.interrupt-picker{padding:0 .75rem .625rem}.entity-interrupt .interrupt-actions{gap:.5rem;grid-template-columns:minmax(0,1fr);padding:.625rem .75rem}.entity-selection:empty{display:none}}`;d.use({gfm:!0,breaks:!0,async:!1});var tr=new Te,we=class extends Se{constructor(){super(...arguments),this._messages=ae({blocking:!0}),this.pickerMessages=ae({blocking:!0,name:"portal-entity-picker"}),this.pickerRef=se(),this.interruptRef=se(),this.requestKey=0,this.selectedEntity=null,this.selectionSubmitted=!1,this.showOtherOption=!1,this.arcgisCancel=ne(),this.arcgisSubmit=ne()}static{this.properties={selectedEntity:16,selectionSubmitted:16,type:1,message:1,options:0,showOtherOption:5,portal:0,entityRequest:0,requestId:1}}static{this.styles=er}get selectedReference(){return this.selectedEntity&&this.selectedEntity.entityType===this.entityRequest?.entityType?Ae(this.selectedEntity):void 0}willUpdate(e){(e.has("entityRequest")||e.has("requestId")||e.has("portal"))&&(this.requestKey+=1,this.selectedEntity=null,this.selectionSubmitted=!1)}updated(e){this.isConnected&&(e.has("entityRequest")||e.has("requestId")||e.has("portal")||e.has("type"))&&(this.entityRequest?this.focusPicker():this.interruptRef.value?.setFocus())}async focusPicker(){let e=this.pickerRef.value;e&&(await e.componentOnReady(),this.isConnected&&this.pickerRef.value===e&&await e.setFocus())}submitEntitySelection(){let e=this.selectedReference;!e||this.selectionSubmitted||(this.selectionSubmitted=!0,this.arcgisSubmit.emit(JSON.stringify(e)))}_renderMessageContent(){let e=this.message??"",t=d.parse(e,{async:!1});return tr.sanitize(t)}_renderEntityInterrupt(e){let{_messages:t,selectedReference:s}=this,{entityType:n,searchTerm:l,picker:i}=e;return v`<div class="interrupt-container entity-interrupt"><div class="entity-heading"><calcite-icon class="entity-heading-icon" .icon=${n==="user"?"user":n==="group"?"group":"file"} scale=m></calcite-icon><div class="entity-heading-content"><span class="entity-eyebrow">${t.titleInput}</span><div class="interrupt-message entity-question">${_e(this._renderMessageContent())}</div></div></div>${this.portal&&le(this.requestKey,v`<arcgis-portal-entity-picker class="interrupt-picker" .portal=${this.portal} .entityType=${n} .initialSearchTerm=${l??""} .query=${i?.query} .initialScope=${i?.initialScope??"all"} .scopeSelectionDisabled=${i?.scopeSelectionDisabled??!1} mode=inline icon=search .selected=${this.selectedEntity} @arcgisSelectionChange=${({detail:a})=>{!this.selectionSubmitted&&(!a||a.entityType===this.entityRequest?.entityType)&&(this.selectedEntity=a)}} ${ie(this.pickerRef)}></arcgis-portal-entity-picker>`)||""}<div class="interrupt-actions"><div class="entity-selection" role=status>${s&&v`<calcite-icon icon=check-circle scale=s></calcite-icon><span class="entity-selection-label" title=${s.label??Re}>${s.label}</span><calcite-button appearance=transparent .disabled=${this.selectionSubmitted} icon-start=x kind=neutral .label=${this.pickerMessages.clearSelection} scale=s @click=${()=>{this.selectedEntity=null,this.pickerRef.value?.setFocus()}}></calcite-button>`||""}</div><div class="interrupt-buttons"><calcite-button appearance=transparent kind=neutral @click=${()=>this.arcgisCancel.emit()}>${t.cancelButton}</calcite-button><calcite-button appearance=solid icon-end=arrow-right .disabled=${!s||this.selectionSubmitted} @click=${this.submitEntitySelection}>${t.submitButton}</calcite-button></div></div></div>`}render(){return this.entityRequest?this._renderEntityInterrupt(this.entityRequest):v`<div class="interrupt-container">${le(this.requestKey,v`<arcgis-assistant-interrupt .type=${this.type} .message=${this.message} .options=${this.options} .showOtherOption=${this.showOtherOption} @arcgisSubmit=${e=>{e.stopPropagation(),this.arcgisSubmit.emit(e.detail)}} ${ie(this.interruptRef)}>${this.type!=="boolean-choice"&&v`<calcite-button slot=footer-actions appearance=outline @click=${()=>this.arcgisCancel.emit()}>${this._messages.cancelButton}</calcite-button>`||""}</arcgis-assistant-interrupt>`)}</div>`}};ze("arcgis-portal-ai-assistant-interrupt",we);export{we as ArcgisPortalAiAssistantInterrupt};
@@ -0,0 +1,2 @@
1
+ /* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
2
+ import j from"./6FFYU4NI.js";import i from"./YNGFN7AY.js";import"./SLQQ44IA.js";import"./O2GPTWGF.js";import h from"./DMS3R2W5.js";import g from"./YP7T6NKR.js";import"./JLT5GCLY.js";import"./I4TKQB4A.js";import"./UOXUUCE7.js";import f from"./365ICWHN.js";import e from"./TIPQ2ZWK.js";import c from"./CJ4S56BE.js";import{a as E}from"./4KTRAA2J.js";import a from"./OQ2JULON.js";import{a as F,c as $}from"./4VLEUN7I.js";import{c as L}from"./KV4ZZSNW.js";import"./FN2QMDEW.js";import{a as S}from"./B343BOVA.js";import{b as O}from"./G7DJPREL.js";import"./GC4BV7IZ.js";import{L as A,M as b,N as M,O as w,Q as P,T as U,h as T,j as d,v as D}from"./AM3UTQWH.js";import"./KHKREBVZ.js";import"./5PV2GUZW.js";export default $arcgis.t(([_,R,{d:k},{b:g},,,,{a:x},{b:N}])=>{async function q(i,t,e=!1){try{let s=new Map;for(let n of i){let{id:l,owner:c}=n,a=s.get(c)??[];a.push(l),s.set(c,a)}let r=[];for(let[n,l]of s){let c=`${t.restUrl}/content/users/${encodeURIComponent(n)}/deleteItems`;for(let a of N(l,100)){let o=R(c,{method:"post",query:{f:"json",items:a.join(","),permanentDelete:e}});r.push(o.then(({data:m})=>m))}}return{result:(await Promise.all(r)).flatMap(({results:n})=>n)}}catch{return{error:{code:"unhandledError"}}}}async function z(i){let{item:t,portal:e,permanentlyDelete:s}=i,{id:r,owner:n}=t;if(!r||!n)return{error:{code:"unhandledError"}};let l=e.recycleBinEnabled&&!s?"/canRecycle":"/canDelete",c=`${e.restUrl}/content/users/${encodeURIComponent(n)}/items/${r}${l}`;try{return{result:(await R(c,{query:{f:"json"}})).data}}catch(a){let o=a.details?.raw;switch(o?.messageCode){case"CONT_00481":case"CONT_00483":case"CONT_00484":return{error:{code:"itemHasDependentItems"}};case"CONT_0048":return{error:{code:"itemDeleteProtected"}};case"CONT_0298":return{error:{code:"itemNotSupportedInRecycleBin"}};default:return{error:{code:"unhandledError",message:o?.message}}}}}async function X(i,t){try{let e=`${i.itemUrl}/setContentStatus`;return{result:(await R(e,{query:{status:t??"",clearEmptyFields:!t,f:"json"},method:"post"})).data}}catch(e){return console.error(e),{error:{code:"unhandledError"}}}}function G(i,t){return(i.relatedItems??[]).map(e=>Y(e,t))}function Y(i,t){return i instanceof _?i:new _({...i,portal:t})}async function y({itemId:i,portal:t,relationship:e,includeRecycleBin:s,nextkey:r}){let{relationshipType:n,direction:l}=e,c=`${t.restUrl}/content/items/${i}/relatedItems`;try{let a=await k({url:c,portal:t,params:{includeRecycleBin:s,f:"json",relationshipType:n?Array.isArray(n)?n.join(","):n:void 0,direction:l,nextkey:r}});return{success:!0,result:{...a,relatedItems:G(a,t)}}}catch(a){return{success:!1,error:a}}}async function Z({itemId:i,portal:t,relationship:e,includeRecycleBin:s,num:r,nextkey:n}){let{relationshipRules:l,direction:c}=e,a=`${t.restUrl}/content/items/${i}/relatedItems`;try{let o=await k({url:a,portal:t,params:{includeRecycleBin:s,f:"json",...l?.length?{relationshipRules:l.join(",")}:{},includeSystemManaged:"true",excludedFlags:"legacy,exclude",num:r,direction:c,nextkey:n}});return{success:!0,result:{...o,relatedItems:G(o,t)}}}catch(o){return{success:!1,error:o}}}async function ee(i,t){let{id:e,type:s,typeKeywords:r=[]}=i;if(!e)return null;let n=["Scene Service","Map Service","WFS","OGCFeatureServer","Vector Tile Service","3DTiles Service"].includes(s),l=["Map Service","Vector Tile Service"].includes(s),c=o=>o?.typeKeywords?.includes("View Service")??!1,a=()=>n?[{relationshipType:["Service2Service"],direction:"reverse"},{relationshipType:["Service2Data"],direction:"forward"}]:r.includes("Bulk Published Service")?{relationshipType:["DataStore2BPService"],direction:"reverse"}:s==="Geoprocessing Service"&&r.includes("Notebook Web Tool")?{relationshipType:["Notebook2WebTool"],direction:"reverse"}:r.includes("Route Layer")?{relationshipType:["Service2Route"],direction:"reverse"}:s==="Mobile Application"?{relationshipType:["MobileApp2Code"],direction:"reverse"}:s==="Map Package"?{relationshipType:["Area2Package"],direction:"reverse"}:s==="Feature Service"?{relationshipType:["Service2Layer"],direction:"reverse"}:r.includes("Document")?{relationshipType:["Item2Attachment"],direction:"reverse"}:s==="Application Configuration"?{relationshipType:["Map2AppConfig"],direction:"reverse"}:{relationshipType:["Service2Data"],direction:"forward"};try{let o=a();if(!o)return null;if(!Array.isArray(o))return{sourceData:(await y({itemId:e,portal:t,relationship:o})).result?.relatedItems?.[0]??null,relationship:o};if(n){let m={relationshipType:["Service2Service"],direction:"reverse"},p=await y({itemId:e,portal:t,relationship:m}),u=p.result?.total?p.result.relatedItems.shift()??null:null;if(l&&!c(u)||!u){m={relationshipType:["Service2Data"],direction:"forward"};let I=await y({itemId:e,portal:t,relationship:m});return{sourceData:I.result?.total?I.result.relatedItems.shift()??u:u,relationship:m}}return{sourceData:u,relationship:m}}return null}catch(o){return console.error(o),{sourceData:null,relationship:{direction:"forward"}}}}async function te(i,t){let{id:e,type:s,typeKeywords:r=[]}=i;try{let n=s==="Notebook"?{relationshipType:["Notebook2WebTool"],direction:"forward"}:r.includes("Has Related Route Layers")?{relationshipType:["Service2Route"],direction:"forward"}:r.includes("Hosted Service")||s==="Feature Service"?{relationshipType:["Service2Service"],direction:s==="Feed"?"reverse":"forward"}:s==="Data Store"||r.includes("ArcGIS Server")?{relationshipType:["DataStore2BPService"],direction:"forward"}:{relationshipType:["Service2Data"],direction:"reverse"},l=await y({itemId:e,portal:t,relationship:n,includeRecycleBin:!0});return{resultData:{items:l.result?.total?l.result.relatedItems:null,count:l.result?.total??0},relationship:n}}catch(n){return console.error(n),{resultData:{items:null,count:0},relationship:{direction:"forward"}}}}async function se(i,t){let{id:e}=i;try{return(await y({itemId:e,portal:t,relationship:{relationshipType:["ReplacementItem2Item"],direction:"forward"}})).result?.relatedItems??[]}catch(s){return console.error(s),[]}}function ie({recycleItems:i,cannotDeleteItems:t,permanentlyDeleteItems:e}){return[...i,...t,...e]}function ne(i){return i.map(({item:t,sourceData:e,resultData:s,replacementItemFor:r})=>({item:t,sourceData:e,resultData:s,replacementItemFor:r}))}function K(i,t,e){return!t&&!!e?.length&&!g(i)}function re({item:i,sourceData:t,resultData:e}){return!e?.some(s=>!s.inRecycleBin)||K(i,t,e)?!1:!V(i,e)&&!J(i,e)}function ae({selectedItems:i}){let t=[];return t.push(...i.flatMap(({item:e,sourceData:s,resultData:r,replacementItemFor:n})=>{let l=K(e,s,r),c=!!(r?.some(a=>!a.inRecycleBin)&&!V(e,r)&&!J(e,r));return l&&c?[{item:e,reason:"dependent",offendingItems:r??void 0}]:n&&n?.length>0?[{item:e,reason:"replacement",offendingItems:n}]:[]})),t}function V(i,t){let e=t[0];return i.type==="Feed"&&g(i)&&t.length===1&&e?.type==="Feature Service"&&g(e)}function J(i,t){let e=t[0];return i.type==="Feature Service"&&g(i)&&t.length===1&&e?.type==="Feed"&&g(e)}var le=["Code Attachment","Map Area","Indoors Map Configuration"],ce=["MapAreaPackage"];function Q(i){return le.includes(i.type??"")||ce.some(t=>i.typeKeywords?.includes(t))}function C(i){return i?i.filter(t=>!Q(t)):null}function H(i){return!!(i&&"inRecycleBin"in i&&i.inRecycleBin===!0)}function h(i){return i.updatedStatus??i.kind}function v(i){return{...i,originalStatus:i.originalStatus??i.kind}}function oe(i,t){return{...i,kind:t,originalStatus:i.originalStatus??i.kind}}async function de(i,t){let e=await z({item:i,portal:t,permanentlyDelete:!1});if(e.error&&e.error.code!=="itemNotSupportedInRecycleBin")return{kind:"cannotDelete",errorCode:e.error.code};if(e.result?.success)return{kind:"recycle"};let s=await z({item:i,portal:t,permanentlyDelete:!0});return s.result?.success?{kind:"permanentlyDelete"}:{kind:"cannotDelete",errorCode:s.error?.code??"unhandledError"}}function me(i){switch(i){case"itemHasDependentItems":return"hasDependentItems";case"itemDeleteProtected":return"deleteProtected";default:return"uncaught"}}async function ue(i,t){let e=await Z({itemId:i.id,portal:t,relationship:{direction:"forward"}}),s=await ee(i,t),r=await te(i,t),n=await se(i,t),l=e.result?.relatedItems??[],c=C(l)??[],a=e.result?.aggregations?.total?.count,o=C(r.resultData.items),m=C(n),p=s?.sourceData,u={usedByItems:c,usedByItemsCount:a==null?c.length:Math.max(0,a-(l.length-c.length)),sourceData:p&&!Q(p)?p:null,resultData:o,replacementItemFor:m?.length?m:null},I=re({item:i,...u}),f=await de(i,t);return f.kind==="cannotDelete"?v({item:i,...u,kind:"cannotDelete",reason:me(f.errorCode)}):I?v({item:i,...u,kind:"cannotDelete",reason:"hasDependentItems"}):f.kind==="permanentlyDelete"?v({item:i,...u,kind:"permanentlyDelete",reason:"notSupported"}):v({item:i,...u,kind:f.kind})}async function he(i,t){let e=await Promise.all(i.map(async s=>await ue(s,t)));return pe(e)}function pe(i){let t=new Map;for(let e of i)e.item.id&&t.set(e.item.id,e);return i.map(e=>{if(e.kind!=="cannotDelete"||e.reason!=="hasDependentItems"||!e.item.id)return e;let s=ge(e.resultData,t);if(s.length===0)return e;let r=s.every(l=>t.has(l)),n=s.every(l=>!t.get(l)?.item.protected);return r&&n?oe(e,"recycle"):e})}function ge(i,t,e=new Set){if(!i?.length)return[];let s=i.filter(n=>!H(n)),r=new Set;for(;s.length>0;){let n=s.shift().id;if(!n||e.has(n))continue;e.add(n),r.add(n);let l=t.get(n)?.resultData??[];s.push(...l.filter(c=>!H(c)))}return[...r]}var ye=T`:host{display:block}calcite-dialog{--calcite-dialog-content-space: 0;--calcite-dialog-background-color: var(--calcite-color-background)}calcite-panel{display:flex;flex-direction:column;gap:.75rem;>*{margin-inline:.75rem}}.panel__content{width:100%;box-sizing:border-box}.delete-items-button{align-self:stretch;flex:0 0 auto;max-inline-size:155px}.delete-items-button>span{white-space:normal;overflow-wrap:anywhere}.single-item-bucket{--calcite-block-background-color: transparent;--calcite-block-border-color: transparent}.bucket__content{display:flex;align-items:flex-start;gap:.75rem;width:100%}.bucket__icon{flex-shrink:0}.bucket__icon--danger{color:var(--calcite-color-status-danger)}.bucket__details{display:flex;flex:1 1 auto;flex-direction:column;min-width:0}.bucket__header{font-weight:500}.bucket__label{margin-inline-end:.25rem}.bucket__checkbox{align-self:flex-start;margin-top:.5rem}.bucket__description{line-height:1.35;font-size:var(--calcite-font-size--1)}.bucket__link{display:flex;align-items:center;min-height:1.5rem}.item-link-content{position:relative;word-break:break-word;>arcgis-portal-item-type{margin-inline-end:.25rem;vertical-align:middle}}.panel__checkbox-container{width:100%;box-sizing:border-box;background-color:var(--calcite-color-foreground-1)}.panel__checkbox{padding-block:.75rem;padding-inline-start:.75rem}.panel__related-items{margin-top:1rem;border:1px solid var(--calcite-color-border-2)}.panel__related-items-icon{color:var(--calcite-color-status-warning)}.panel__related-items-notice{padding-bottom:.75rem}arcgis-portal-review-related-items{margin-bottom:.75rem}calcite-list{overflow:auto;min-block-size:0;max-height:min(250px,75vh)}.discouraged-items-warning{margin-bottom:.75rem}.header-description{font-size:var(--calcite-font-size--1);font-weight:400}`,W=new Map;async function Ie(i,t){let e=F(i),s=JSON.stringify([e,t]),r=W.get(s);if(r)return r;try{let n=(await k({url:`${e}portals/helpmap`,portal:i,params:{culture:t}}))?.helpMap?.m??{};return W.set(s,n),n}catch{return{}}}var fe=i=>O((t,e)=>{let s,r;return e.onUpdate(()=>{let n=i.portal(),l=i.language(),c=n?.restUrl;c===s&&l===r||(s=c,r=l,e.exports={},!(!n||!c||!l)&&Ie(n,l).then(a=>{e.exports=a}))}),{}});function j({id:i,linkText:t,label:e,placement:s,items:r,portal:n,user:l}){return d`<calcite-link id=${i??P} @keydown=${c=>{if(c.key===" "||c.key==="Enter"){let a=c.currentTarget.nextElementSibling;a&&(a.open=!a.open)}}}>${t}</calcite-link><calcite-popover .label=${e} .referenceElement=${i} .placement=${s} auto-close focus-trap-disabled @keydown=${c=>{if(c.key==="Tab"){let a=c.currentTarget;requestAnimationFrame(()=>{a.open=!1})}}} @calcitePopoverOpen=${c=>{c.currentTarget.querySelector("calcite-list-item")?.setFocus()}}><calcite-list .label=${e} selection-mode=none>${r.map(c=>d`<calcite-list-item .label=${c.title??""} @calciteListItemSelect=${()=>{let a=c.itemPageUrl;a&&window.open(a.replace("sharing/rest/",""),"_blank","noopener,noreferrer")}}><span slot=content-start><arcgis-portal-item-type .item=${c} .portal=${n} .user=${l} hide-text></arcgis-portal-item-type></span><span slot=content>${c.title}</span></calcite-list-item>`)}</calcite-list></calcite-popover>`}var B=class extends M{constructor(){super(...arguments),this.deleteStatusRequestId=0,this.updatedCannotDeleteItemIds=new Set,this.permanentlyDeleteCheckboxRef=A(),this.messages=S({blocking:!0}),this.fieldDeleteMessages=S({name:"portal-field-delete"}),this.helpMap=fe({portal:()=>this.portal,language:()=>this.messages._t9nLocale}),this.isLoading=!0,this.submittingAction=null,this.loadedItems=[],this.hasConfirmedReview=!1,this.cannotDeleteItems=[],this.recycleItems=[],this.permanentlyDeleteItems=[],this.deprecateItems=[],this.excludeItems=[],this.reviewingDirectlyUsedByItems=!1,this.reviewDecision=null,this.active=!0,this.items=[],this.itemIds=[],this.user=null,this.disableLinks=!1,this.arcgisClose=D(),this.arcgisConfirm=D(),this.arcgisError=D()}static{this.properties={isLoading:16,submittingAction:16,loadedItems:16,hasConfirmedReview:16,cannotDeleteItems:16,recycleItems:16,permanentlyDeleteItems:16,deprecateItems:16,excludeItems:16,reviewingDirectlyUsedByItems:16,reviewDecision:16,active:5,items:0,itemIds:0,portal:0,user:0,disableLinks:5}}static{this.styles=ye}willUpdate(t){let e=t.has("items")||t.has("itemIds")||t.has("portal")||t.has("user")||t.has("active");this.active&&e&&(this.user??=this.portal?.user||null,this.resetState(),this.initializeItems(++this.deleteStatusRequestId))}async initializeItems(t){let{items:e,itemIds:s,portal:r}=this,n=e.length?e:await Promise.all(s.map(async l=>await new _({id:l,portal:r}).load()));t===this.deleteStatusRequestId&&(this.loadedItems=n,await this.determineDeleteStatus(t))}async handleReviewDecision(t){let e=this.itemsWithImpactedItems.map(({item:a})=>a),s=t==="delete"?"recycle":t==="deprecate"?"deprecate":"exclude",r=this.permanentlyDeleteItems.filter(a=>this.isPermanentlyDeleteOverrideActive(a)),n=this.permanentlyDeleteItems.filter(a=>!this.isPermanentlyDeleteOverrideActive(a)),l=[...this.recycleItems,...this.deprecateItems,...this.excludeItems,...r],c=t==="delete"&&l.some(a=>h(a)!=="recycle"&&e.some(({id:o})=>o===a.item.id));for(let a of l){if(!e.some(({id:m})=>m===a.item.id))continue;let o=a.originalStatus??a.kind;a.originalStatus=o,a.updatedStatus=s}if(this.reviewDecision={action:t,items:e},this.hasConfirmedReview=!0,this.reviewingDirectlyUsedByItems=!1,this.recycleItems=l.filter(a=>h(a)==="recycle"),this.deprecateItems=l.filter(a=>h(a)==="deprecate"),this.excludeItems=l.filter(a=>h(a)==="exclude"),this.permanentlyDeleteItems=n,t!=="delete"||c){this.isLoading=!0;let a=[...this.cannotDeleteItems,...this.recycleItems,...this.permanentlyDeleteItems].map(({item:o})=>o);await this.determineDeleteStatus(++this.deleteStatusRequestId,a)}}async updateAllContentStatus(t,e){return(await Promise.all(t.map(async s=>await X(s,e)))).flatMap(({result:s})=>s?[s]:[])}async handleDelete(){if(!this.active||this.submittingAction)return;this.submittingAction="delete";let t={restUrl:this.portal.restUrl},{result:e=[]}=this.recycleItems.length?await q(this.recycleItems.map(({item:n})=>n),t):{result:[]},{result:s=[]}=this.permanentlyDeleteItems.length?await q(this.permanentlyDeleteItems.map(({item:n})=>n),t,!0):{result:[]},r=this.deprecateItems.length?await this.updateAllContentStatus(this.deprecateItems.map(({item:n})=>n),"deprecated"):null;this.arcgisConfirm.emit({deletedItems:e,permanentlyDeletedItems:s,deletedItemsCount:e.length,permanentlyDeletedItemsCount:s.length,deprecatedItems:r}),this.closeDialog()}async handleDeprecate(){if(!this.active||this.submittingAction)return;this.submittingAction="deprecate";let t=[...this.deprecateItems,...this.recycleItems,...this.cannotDeleteItems,...this.permanentlyDeleteItems].filter(Boolean),e=t.length?await this.updateAllContentStatus(t.map(({item:s})=>s),"deprecated"):null;this.arcgisConfirm.emit({deletedItems:null,permanentlyDeletedItems:null,deletedItemsCount:0,permanentlyDeletedItemsCount:0,deprecatedItems:e}),this.closeDialog()}handleDialogClose(){this.active&&this.closeDialog()}closeDialog(){this.active=!1,this.resetState(),this.arcgisClose.emit()}resetState(){this.isLoading=!0,this.submittingAction=null,this.loadedItems=[],this.hasConfirmedReview=!1,this.cannotDeleteItems=[],this.recycleItems=[],this.permanentlyDeleteItems=[],this.deprecateItems=[],this.excludeItems=[],this.reviewingDirectlyUsedByItems=!1,this.reviewDecision=null,this.updatedCannotDeleteItemIds.clear(),++this.deleteStatusRequestId}async determineDeleteStatus(t,e=this.loadedItems){let s=new Set(this.recycleItems.map(({item:n})=>n.id).filter(n=>!!n)),r=await he(e,this.portal);if(t===this.deleteStatusRequestId){this.cannotDeleteItems=r.filter(n=>h(n)==="cannotDelete");for(let n of this.cannotDeleteItems)n.item.id&&s.has(n.item.id)&&this.updatedCannotDeleteItemIds.add(n.item.id);this.recycleItems=r.filter(n=>h(n)==="recycle"),this.permanentlyDeleteItems=r.filter(n=>h(n)==="permanentlyDelete"),this.isLoading=!1}}get itemsWithImpactedItems(){let t=new Set(this.loadedItems.map(({id:e})=>e));return[...this.recycleItems,...this.deprecateItems,...this.excludeItems,...this.permanentlyDeleteItems.filter(e=>this.isPermanentlyDeleteOverrideActive(e))].map(e=>({...e,usedByItems:e.usedByItems.filter(({id:s})=>!t.has(s))})).filter(({usedByItems:e})=>e.length>0)}get itemsHaveImpactedItems(){return this.itemsWithImpactedItems.length>0}isPermanentlyDeleteOverrideActive(t){return t.kind==="recycle"&&t.updatedStatus==="permanentlyDelete"}async handlePermanentlyDeleteOverrideChange(t){if(t){let e=this.recycleItems.map(s=>({...s,originalStatus:s.originalStatus??s.kind,updatedStatus:"permanentlyDelete"}));this.recycleItems=[],this.permanentlyDeleteItems=[...this.permanentlyDeleteItems,...e]}else{let e=this.permanentlyDeleteItems.filter(s=>this.isPermanentlyDeleteOverrideActive(s));this.permanentlyDeleteItems=this.permanentlyDeleteItems.filter(s=>!this.isPermanentlyDeleteOverrideActive(s)),this.recycleItems=[...this.recycleItems,...e.map(s=>({...s,updatedStatus:"recycle"}))]}await this.updateComplete,await new Promise(e=>requestAnimationFrame(()=>e())),await this.permanentlyDeleteCheckboxRef.value?.setFocus()}get markedForDeprecation(){return this.reviewDecision?.action==="deprecate"?this.reviewDecision.items:[]}get deleteMode(){return[this.recycleItems,this.deprecateItems,this.excludeItems,this.permanentlyDeleteItems].filter(t=>t.length>0).length>1?"mixed":this.markedForDeprecation.length>0?"deprecate":this.permanentlyDeleteItems.length>0?"permanentlyDelete":this.recycleItems.length>0?"delete":(this.cannotDeleteItems.length>0,"none")}getHeaderText(){return this.reviewingDirectlyUsedByItems?this.messages.reviewItemsCount.replace("{count}",`${this.itemsWithImpactedItems.length}`):this.isLoading?"":this.loadedItems.length>0&&this.permanentlyDeleteItems.length===this.loadedItems.length?this.messages.permanentlyDelete:(this.items.length?this.items:this.itemIds).length===1?this.messages.deleteItem:this.messages.deleteItems}getHeaderDescription(){return this.loadedItems.length<=1?"":this.reviewingDirectlyUsedByItems?this.messages.reviewItemsDescription:this.messages.selectedItems.replace("{count}",`${this.loadedItems.length}`)}getConfirmButtonText(){switch(this.deleteMode){case"mixed":return this.messages.confirm;case"deprecate":return this.messages.deprecate;case"permanentlyDelete":return this.portal.recycleBinEnabled?this.messages.permanentlyDelete:this.messages.delete;case"delete":return this.messages.delete;default:return this.messages.delete}}renderBucket({icon:t,label:e,description:s,link:r,additionalContent:n,dangerIcon:l=!1,bucket:c}){return d`<calcite-block class=${w({"single-item-bucket":(this.items.length?this.items:this.itemIds).length===1})} scale=l expanded><div class="bucket__content"><calcite-icon class=${w({bucket__icon:!0,"bucket__icon--danger":l})} scale=l .icon=${t}></calcite-icon><div class="bucket__details"><div class="bucket__header"><span class="bucket__label">${e}</span><span>${this.renderBucketItems(c)}</span></div>${s&&d`<span class="bucket__description">${s}</span>`||""}${r&&d`<div class="bucket__link"><calcite-link .href=${r.href} target=_blank icon-end=launch>${r.text??this.messages.moreInfo}</calcite-link></div>`||""}${n}</div></div></calcite-block>`}renderBucketItems(t=[]){return this.renderItemLinks(t.map(({item:e})=>e))}renderItemLinks(t,e=`delete-items-bucket-${t.map(({id:s})=>s).join("-")}`){if(t.length===0)return null;if(t.length===1){let s=t[0],r=`${L({portal:this.portal})}/item.html?id=${s.id}`;return d`<calcite-link .href=${r} target=_blank><span class="item-link-content"><arcgis-portal-item-type .item=${s} .portal=${this.portal} .user=${this.user} hide-text></arcgis-portal-item-type><span>${s.title}</span></span></calcite-link>`}return j({id:e,linkText:t.length,label:this.messages.bucketItems.replace("{count}",String(t.length)),placement:"bottom-start",items:t,portal:this.portal,user:this.user})}renderRelatedItemsPopover(t){let e=t.flatMap(({usedByItems:s})=>s);return t.length>1||e.length===0?null:j({id:"delete-items-directly-used-by",linkText:x(this.messages._t9nLocale,this.messages.usedByOtherItems,e.length),label:this.messages.usedByPopover,placement:"auto",items:e,portal:this.portal,user:this.user})}renderDirectlyUsedByItems(){let t=ie({recycleItems:this.recycleItems,cannotDeleteItems:this.cannotDeleteItems,permanentlyDeleteItems:this.permanentlyDeleteItems}),e=this.cannotDeleteItems.find(({reason:o})=>o==="hasDependentItems"),s=e?e.resultData??[]:t.flatMap(({usedByItems:o})=>o),r=e?s.length:t[0]?.usedByItemsCount,n=ae({selectedItems:ne(t)}),l=n.find(({reason:o})=>o==="replacement"),c=l?.offendingItems??[],a=x(this.messages._t9nLocale,this.messages.replacementItem.isReplacementFor,c.length,{itemLink:"{itemLink}"});return d`${this.loadedItems.length===1&&["delete","permanentlyDelete"].includes(this.deleteMode)&&n.length>0?d`<div class="discouraged-items-warning"><calcite-notice kind=warning open><div slot=message>${l?a.split("{itemLink}").map((o,m)=>d`${m>0&&this.renderItemLinks(c,"delete-items-replacement-for")||""}${o}`):this.messages.deleteDiscouraged}</div>${!l&&d`<calcite-link .href=${`${$(this.portal)}${this.helpMap[120001208]||""}`} target=_blank icon-end=launch slot=link>${this.messages.learnMoreAboutDeletingSourceItems}</calcite-link>`||""}</calcite-notice></div>`:null}${!this.cannotDeleteItems.some(({reason:o})=>o==="deleteProtected")&&d`<arcgis-portal-review-related-items .sourceItem=${this.loadedItems[0]??null} .relatedItems=${s} .relatedItemsCount=${r} .showDependentItems=${!!e} .portal=${this.portal} .user=${this.user}></arcgis-portal-review-related-items>`||""}`}renderDirectlyUsedByItemsNotice(){let t=new Set(this.itemsWithImpactedItems.flatMap(({usedByItems:s})=>s.map(({id:r})=>r))),e=this.messages.reviewRelatedItems.multiple.replace("{totalCount}",String(t.size));return d`<div class="panel__related-items-notice"><calcite-notice .kind=${this.reviewDecision?"brand":"warning"} icon open><div slot=message>${this.reviewDecision?this.messages.relatedItemsReviewed:e}</div><calcite-button appearance=transparent slot=actions-end @click=${()=>{this.reviewingDirectlyUsedByItems=!0}}>${this.messages.reviewItems}</calcite-button></calcite-notice></div>`}renderDeleteSummary(){return d`<div class="panel__content">${this.isLoading?d`<calcite-scrim loading></calcite-scrim>`:d`<calcite-panel>${this.renderRecycleBucket()}${this.renderDeprecateBucket()}${this.renderExcludeBucket()}${this.renderCannotDeleteBucket()}${this.renderPermanentlyDeleteBucket()}${this.loadedItems.length===1&&this.renderDirectlyUsedByItems()||""}${this.itemsHaveImpactedItems&&d`<div>${this.loadedItems.length>1?this.renderDirectlyUsedByItemsNotice():null}</div>`||""}</calcite-panel>`}</div>${!this.isLoading&&d`${this.loadedItems.length===1&&E(this.loadedItems[0]).contentStatus!=="deprecated"&&d`<calcite-button class="delete-items-button" slot=footer-start kind=danger appearance=outline-fill .disabled=${!!this.submittingAction} .loading=${this.submittingAction==="deprecate"} @click=${this.handleDeprecate}><span>${this.messages.deprecateInstead}</span></calcite-button>`||""}<calcite-button class="delete-items-button" slot=footer-end appearance=outline-fill @click=${this.handleDialogClose}><span>${this.messages.cancel}</span></calcite-button>${this.deleteMode!=="none"&&d`<calcite-button class="delete-items-button" .disabled=${!!this.submittingAction} .loading=${this.submittingAction==="delete"} kind=danger slot=footer-end @click=${async()=>await this.handleDelete()}><span>${this.getConfirmButtonText()}</span></calcite-button>`||""}`||""}`}renderReviewItems(){return d`<div class="panel__content"><calcite-panel><arcgis-portal-delete-items-review .items=${this.itemsWithImpactedItems} .portal=${this.portal} .user=${this.user}></arcgis-portal-delete-items-review></calcite-panel></div><calcite-button slot=footer-start appearance=solid kind=neutral @click=${async()=>await this.handleReviewDecision("exclude")}>${this.messages.exclude}</calcite-button><calcite-button slot=footer-end appearance=outline-fill kind=danger @click=${async()=>await this.handleReviewDecision("deprecate")}>${this.messages.deprecateInstead}</calcite-button><calcite-button slot=footer-end appearance=solid kind=danger @click=${async()=>await this.handleReviewDecision("delete")}>${this.messages.proceedToDelete}</calcite-button>`}renderRecycleBucket(){if(!this.recycleItems||this.recycleItems.length===0)return null;let t=!this.portal.recycleBinEnabled;return this.renderBucket({icon:t?"trash":"recycle-bin",label:t?this.messages.summary.permanentDelete.delete:this.messages.summary.willBeRecycled,description:t?this.messages.summary.permanentDelete.default.single:this.messages.summary.canBeRecovered.single.replace("{days}","14"),updated:this.recycleItems.some(({kind:e,updatedStatus:s})=>s==="recycle"&&s!==e),bucket:this.recycleItems,additionalContent:t?void 0:d`<calcite-checkbox class="bucket__checkbox" .label=${this.messages.permanentlyDeleteInstead} .labelText=${this.messages.permanentlyDeleteInstead} @calciteCheckboxChange=${async e=>await this.handlePermanentlyDeleteOverrideChange(e.target.checked)} ${b(this.permanentlyDeleteCheckboxRef)}></calcite-checkbox>`})}renderDeprecateBucket(){return this.deprecateItems.length===0?null:this.renderBucket({icon:"circle-disallowed",label:this.messages.summary.deprecate.label,description:this.messages.summary.deprecate.message,updated:this.deprecateItems.some(({kind:t,updatedStatus:e})=>e!==t&&e==="deprecate"),bucket:this.deprecateItems})}renderExcludeBucket(){return this.excludeItems.length===0?null:this.renderBucket({icon:"remove-from-list",label:this.messages.summary.exclude.label,description:this.messages.summary.exclude.message,updated:this.excludeItems.some(({kind:t,updatedStatus:e})=>e!==t&&e==="exclude"),bucket:this.excludeItems})}renderCannotDeleteBucket(){if(!this.cannotDeleteItems||this.cannotDeleteItems.length===0)return null;let t=this.cannotDeleteItems?.[0]?.reason,e=this.cannotDeleteItems[0]?.resultData?.length??0,s=this.messages.summary.protectedGroup.hasDependentItemsDescription;return this.renderBucket({icon:"security",label:this.messages.summary.cannotDelete,description:t==="hasDependentItems"?e>1?s.singleMultipleDependentItems:s.singleOneDependentItem:t==="deleteProtected"?this.messages.summary.protectedGroup.deleteProtectedDescription:"",bucket:this.cannotDeleteItems,updated:this.cannotDeleteItems.some(({item:r})=>r.id&&this.updatedCannotDeleteItemIds.has(r.id))})}renderPermanentlyDeleteBucket(){if(!this.permanentlyDeleteItems||this.permanentlyDeleteItems.length===0)return null;let t=!this.portal.recycleBinEnabled,e=this.permanentlyDeleteItems.some(s=>this.isPermanentlyDeleteOverrideActive(s));return this.renderBucket({icon:"trash",label:t?this.messages.summary.permanentDelete.delete:this.messages.summary.permanentlyDelete,description:t?this.messages.summary.permanentDelete.default.single:e?null:this.messages.summary.permanentDelete.notSupported.single,link:e?void 0:{href:`${$(this.portal)}${this.helpMap[120004692]||""}`,text:this.fieldDeleteMessages.learnMore??this.messages.moreInfo},bucket:this.permanentlyDeleteItems,dangerIcon:!t,additionalContent:!t&&e?d`<calcite-checkbox class="bucket__checkbox" checked .label=${this.messages.permanentlyDeleteInstead} .labelText=${this.messages.permanentlyDeleteInstead} @calciteCheckboxChange=${async s=>await this.handlePermanentlyDeleteOverrideChange(s.target.checked)} ${b(this.permanentlyDeleteCheckboxRef)}></calcite-checkbox>`:void 0})}render(){let{loadedItems:t,portal:e}=this;return!t||!e?null:d`<calcite-dialog modal .open=${this.active} width=s .heading=${this.getHeaderText()} heading-level=2 outside-close-disabled escape-disabled kind=danger @calciteDialogClose=${this.handleDialogClose}>${!this.isLoading||this.reviewingDirectlyUsedByItems?d`<div slot=heading><span>${this.getHeaderText()}</span><br><span class="header-description">${this.getHeaderDescription()}</span></div>`:void 0}${this.reviewingDirectlyUsedByItems?this.renderReviewItems():this.renderDeleteSummary()}</calcite-dialog>`}};U("arcgis-portal-delete-items",B);return B},"portal/PortalItem","request",a,c,e,f,g,h,i,j)
package/dist/cdn/index.js CHANGED
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
2
- import{S as r,y as e}from"./AM3UTQWH.js";import"./KHKREBVZ.js";import"./5PV2GUZW.js";var s=e(r,{"arcgis-portal-account-switcher":[()=>import("./XOM3GLYF.js"),"clientId,messages:,portal:,redirectUri,signout,signoutOptions:"],"arcgis-portal-account-switcher-accounts":[()=>import("./M664QA6J.js"),"accounts:,messages:,portal:,targetUser"],"arcgis-portal-account-switcher-list":[()=>import("./C3F24ZOM.js"),"accountAccess:,actions:,interactive,linkedAccounts:,messages:,portal:,signedInUsers:"],"arcgis-portal-account-switcher-signout":[()=>import("./BRWHEYLW.js"),"messages:,portal:,signedInAccounts:"],"arcgis-portal-add-gps-metadata":[()=>import("./HVQ7FKJ5.js"),"areSourceSchemaChangesAllowed:,canShowAddGPSMetadata:,item:,itemId,messageOverrides:,messages:,portal:,supportsAttachments:"],"arcgis-portal-ai-assistant":[()=>import("./IKRGN33H.js"),"autoDestroyDisabled,config:,currentContext:,defaultClosed,disabledAgents:,entityToolPresets:,navigationTargetMap:,observabilityEnabled,portal:,t9n:,tools:,user:;submitMessage"],"arcgis-portal-ai-assistant-interrupt":[()=>import("./K7DHGCZI.js"),"_messages:,entityRequest:,message,options:,pickerMessages:,portal:,requestId,showOtherOption,type"],"arcgis-portal-browser":[()=>import("./X7C4PAJY.js"),"_messages:,alwaysShowContent,alwaysShowPagination,alwaysShowSelection,formFactor,height,hideContentTop,hideFilters,hideTopBar,loading,panel,preview,rangeFormatter:,response:,searchTerm,selected:,showPreSearch,store:;scrollToTop"],"arcgis-portal-browser-actions":[()=>import("./XEVOU7SJ.js"),"_messages:,actions:,selection:;restoreFocus"],"arcgis-portal-browser-filter-status":[()=>import("./GBG25IJ2.js"),"_messages:,browserWidth,componentWidth,filters:,hiddenFilterIds:"],"arcgis-portal-browser-pagination":[()=>import("./25K5D5HL.js"),"_messages:,num,start,store:,total;nextPage"],"arcgis-portal-browser-search":[()=>import("./4X4EYM3Q.js"),"_messages:,allowClear,placeholder,store:,term;setFocus"],"arcgis-portal-browser-sort":[()=>import("./WCZJXBW3.js"),"_messages:,appearance,field,options:,order,showText,useDeleted"],"arcgis-portal-browser-top-bar":[()=>import("./QPBWKASC.js"),"_messages:,filtersDisabled,store:"],"arcgis-portal-browser-view":[()=>import("./SO3IBFEU.js"),"options:,store:,view,viewText"],"arcgis-portal-classification-banner":[()=>import("./D52TYBRX.js"),"autoDestroyDisabled,messages:,missingExistingClassification,portalItem:,validationErrors,variant;destroy"],"arcgis-portal-classification-config":[()=>import("./JA3GGSJJ.js"),"autoDestroyDisabled,messages:,portalItem:,status,valid,values;destroy,resetForm,validateForm"],"arcgis-portal-classification-favorite":[()=>import("./VWV2LCNA.js"),"attributeExpressionResults:,classificationValue:,favoriteClassifications:,messages:,portalItem:,resetFavoriteClassification:,selectedFavoriteClassificationName,updateClassificationData:"],"arcgis-portal-classification-form-element":[()=>import("./EDQSL2P3.js"),"attribute:,attributeKey,isRequiredErrors:,messages:,renderingInfo:,value:"],"arcgis-portal-delete-items":[()=>import("./2OBYOLPM.js"),"active,disableLinks,fieldDeleteMessages:,itemIds:,items:,messages:,portal:,user:"],"arcgis-portal-delete-items-review":[()=>import("./VLD3MVSG.js"),"items:,messages:,portal:,user:"],"arcgis-portal-entity-picker":[()=>import("./OEG4XCKY.js"),"_messages:,entityType,icon,initialScope,initialSearchTerm,messageOverrides:,mode,num,portal:,query,scopeSelectionDisabled,selected:,selectionMode;setFocus,togglePicker"],"arcgis-portal-extent-picker":[()=>import("./PRBP4AP6.js"),"active,contentOnly,extentService,extentValue:,isArea,itemId,messages:,portal:;;getExtent"],"arcgis-portal-extent-picker-coord-field":[()=>import("./6EMK2BU6.js"),"errorMessage,inputId,label,max,min,relatedErrorMessage,validateRelated:,value;;checkRelatedField,isValid,setFocus"],"arcgis-portal-field-delete":[()=>import("./SUA7ZZUH.js"),"config:,fieldNames:,layer:,mapView:,messages:,options:"],"arcgis-portal-group-badges":[()=>import("./RJRTGF33.js"),"_messages:,appearance,empty,group:,portal:,scale,showTooltips,width"],"arcgis-portal-group-browser":[()=>import("./A3OUZJ44.js"),"_browserMessages:,_messages:,alwaysShowSelection,cards:,fetch:,filters:,formFactor,hasIndoorsSpaces,height,hidePreviewBadges,hidePreviewFooter,hideTopBar,loading,messageOverrides:,num,portal:,preflight:,preview,q,searchParamInteraction:,searchTerm,searchUser,selected:,selection,sort:,store:,view;clearFilters,refresh"],"arcgis-portal-group-browser-card":[()=>import("./BOEGDK4D.js"),"browser:,cardProps:,group:;restoreFocus"],"arcgis-portal-group-browser-preview":[()=>import("./WMKG3CBK.js"),"currentResponse:,group:,hideBadges,hidePreviewFooter,messages:,portal:,previewFooterActionsSpaced,user:;setFocus"],"arcgis-portal-group-browser-preview-card":[()=>import("./YGZICQBT.js"),"baseUrl,hideItemType,hideOwner,hideThumbnail,interactive,item:,link,newTab,portal:,showBadges,showDateUpdated,showOwnerPopup,showSummary,user:;restoreFocus"],"arcgis-portal-group-card":[()=>import("./LBW47BJG.js"),"disabled,group:,hideBadges,hideDateUpdated,hideOwner,hideViewableBy,indeterminate,link,linkHandler:,messages:,name,newTab,portal:,preview,previewed,selected,selection,showDateCreated,showSummary,user:,view;restoreFocus"],"arcgis-portal-group-picker":[()=>import("./MHQ5BATZ.js"),"_messages:,entityType:,icon,initialScope,initialSearchTerm,messageOverrides:,mode,num,portal:,query,scopeSelectionDisabled,selected:,selectionMode;setFocus,togglePicker"],"arcgis-portal-group-thumbnail":[()=>import("./7BFTXD5J.js"),"group:,portal:,scale,tooltip"],"arcgis-portal-info-banner":[()=>import("./2GZVUHL5.js"),"config:,position"],"arcgis-portal-item-actions":[()=>import("./BX2LXI3N.js"),"actions:,item:,keyHandler:,label,messages:,portal:,previewText,showFavorite,showPreview,tabIndexOverride,user:;setFocus"],"arcgis-portal-item-badges":[()=>import("./AUM2QTBQ.js"),"appearance,empty,item:,portal:,scale,showTooltips,useProduction,user:,width"],"arcgis-portal-item-badge":[()=>import("./OYTK2VF2.js"),"_messages:,appearance,badgeType,item:,portal:,scale,showTooltip,useProduction,user:,width"],"arcgis-portal-item-card":[()=>import("./RJ3SU3EV.js"),"actions:,allowedGeometries:,disabled,disableSelection,groups:,hideActionsStart,item:,link,linkHandler:,messages:,name,newTab,portal:,preview,previewed,recycleBin,selected,selectedItems:,selection,showAccess,showBadges,showBadgeTooltips,showDateUpdated,showFavorite,showFavoriteInActionsMenu,showItemType,showItemTypeHosted,showOwner,showSummary,showThumbnail,useProduction,user:,userGroups:,userPopupZIndex,view;restoreFocus"],"arcgis-portal-item-card-sublayer-select":[()=>import("./ASLKTYLX.js"),"allowedGeometries:,appearance,disabled,item:,messageOverrides:,messages:,portal:,selectedItems:,selection,width"],"arcgis-portal-item-favorite":[()=>import("./LR33CLTB.js"),"iconOnly,item:,messages:,portal:,scale,showTooltip,user:,width;setFocus"],"arcgis-portal-item-picker":[()=>import("./AYESDOK5.js"),"_messages:,entityType:,icon,initialScope,initialSearchTerm,messageOverrides:,mode,num,portal:,query,scopeSelectionDisabled,selected:,selectionMode;setFocus,togglePicker"],"arcgis-portal-item-preview":[()=>import("./4YJGTINX.js"),"groups:,item:,matchedSublayerIds:,messages:,portal:,showFieldStatistics,showHosted,user:,userGroups:;setFocus"],"arcgis-portal-item-preview-copy":[()=>import("./4Y73LE7P.js"),"heading,label,messages:,section,text"],"arcgis-portal-item-preview-field":[()=>import("./H6MGSC3Y.js"),"failed,field:,layer:,messages:,showStatistics"],"arcgis-portal-item-preview-sublayer":[()=>import("./LRL2RJID.js"),"externalLinkHandler:,item:,layer:,messages:,portal:,showFieldStatistics"],"arcgis-portal-item-share-summary":[()=>import("./ARAHDT2O.js"),"autoFetchGroups,groups:,item:,messageOverrides:,messages:,overlayPositioning,portal:,scale,showHoverText,showText,userGroups:;fetchGroups,setFocus"],"arcgis-portal-item-share-summary-editable":[()=>import("./26KZUWNM.js"),"allowEdit,autoFetchGroups,groups:,item:,messageOverrides:,messages:,overlayPositioning,portal:,scale,showHoverText,showText,userGroups:;fetchGroups,setFocus"],"arcgis-portal-item-thumbnail":[()=>import("./L25GEXL6.js"),"cacheString,generate,item:,portal:,serviceInfo:,useProduction,user:;generateThumbnail"],"arcgis-portal-item-type":[()=>import("./C4GK263H.js"),"ellipsis,hideIcon,hideText,item:,messages:,portal:,scale,serviceInfo:,showHosted,user:"],"arcgis-portal-mentionable-text-area":[()=>import("./WSQLSDQY.js"),"disabled,maxLength,placeholder,popoverListLabel,popoverPlacement,portal:,readOnly,rows,scale,starters:,user:,value;closePopover,focusTextArea,selectItem"],"arcgis-portal-navigation":[()=>import("./IWQ5I2DD.js"),"clientId,currentPathname,disableNotebookServer,disableTrackViewer,maxWidth,messages:,portal:,portalItem:,product,productHref,projectMenuIcon,projectMenuOptions:,projectMenuSaveIndicator,projectTitle,projectTitleSave:,showNotifications"],"arcgis-portal-preview-panel":[()=>import("./6HNKQNS5.js"),"fixed,open"],"arcgis-portal-replacement-item-redirect":[()=>import("./PST62OKJ.js"),"itemId,messages:,portal:,user:;setFocus"],"arcgis-portal-review-related-items":[()=>import("./NJB24AIV.js"),"browserMessages:,deleteMessages:,messages:,portal:,relatedItems:,relatedItemsCount,showDependentItems,sourceItem:,user:"],"arcgis-portal-sublayer-type":[()=>import("./FVHP6PFG.js"),"geometry,hideIcon,hideName,hideType,messages:,name,renderer:,scale,type,underline"],"arcgis-portal-user-avatar":[()=>import("./CBFFZMX4.js"),"checkOnline,description,heading,hideAvatar,messages:,portal:,scale,showName,underline,user:,username,wrap"],"arcgis-portal-user-picker":[()=>import("./X4R2NVDQ.js"),"_messages:,entityType:,icon,initialScope,initialSearchTerm,messageOverrides:,mode,num,portal:,query,scopeSelectionDisabled,selected:,selectionMode;setFocus,togglePicker"],"arcgis-portal-user-popup":[()=>import("./5E4EL6TF.js"),"appearance,avatarAriaHidden,baseUrl,checkOnline,fullName,item:,messages:,portal:,scale,showAvatar,showName,showUsername,underline,user:,username,wrap,zIndex;openPopup,setFocus"],"arcgis-portal-voice-input":[()=>import("./NYBLHT3F.js"),"language;clearText,startListening,stopListening"]});s({resourcesUrl:import.meta.url});var t=new CSSStyleSheet;t.replaceSync("@layer{:not([hydrated]):is(arcgis-portal-account-switcher,arcgis-portal-account-switcher-accounts,arcgis-portal-account-switcher-list,arcgis-portal-account-switcher-signout,arcgis-portal-add-gps-metadata,arcgis-portal-ai-assistant,arcgis-portal-ai-assistant-interrupt,arcgis-portal-browser,arcgis-portal-browser-actions,arcgis-portal-browser-filter-status,arcgis-portal-browser-pagination,arcgis-portal-browser-search,arcgis-portal-browser-sort,arcgis-portal-browser-top-bar,arcgis-portal-browser-view,arcgis-portal-classification-banner,arcgis-portal-classification-config,arcgis-portal-classification-favorite,arcgis-portal-classification-form-element,arcgis-portal-delete-items,arcgis-portal-delete-items-review,arcgis-portal-entity-picker,arcgis-portal-extent-picker,arcgis-portal-field-delete,arcgis-portal-group-badges,arcgis-portal-group-browser,arcgis-portal-group-browser-card,arcgis-portal-group-browser-preview,arcgis-portal-group-browser-preview-card,arcgis-portal-group-card,arcgis-portal-group-picker,arcgis-portal-group-thumbnail,arcgis-portal-info-banner,arcgis-portal-item-actions,arcgis-portal-item-badges,arcgis-portal-item-badge,arcgis-portal-item-card,arcgis-portal-item-card-sublayer-select,arcgis-portal-item-favorite,arcgis-portal-item-picker,arcgis-portal-item-preview,arcgis-portal-item-preview-copy,arcgis-portal-item-preview-field,arcgis-portal-item-preview-sublayer,arcgis-portal-item-share-summary,arcgis-portal-item-share-summary-editable,arcgis-portal-item-thumbnail,arcgis-portal-item-type,arcgis-portal-mentionable-text-area,arcgis-portal-navigation,arcgis-portal-preview-panel,arcgis-portal-replacement-item-redirect,arcgis-portal-review-related-items,arcgis-portal-sublayer-type,arcgis-portal-user-avatar,arcgis-portal-user-picker,arcgis-portal-user-popup,arcgis-portal-voice-input){visibility:hidden}}");document.adoptedStyleSheets=[...document.adoptedStyleSheets,t];window.$arcgis||Object.defineProperty(window,"$arcgis",{configurable:!1,enumerable:!0,writable:!1,value:{}}),((a,r)=>{a.t=(c,...x)=>Promise.all(x.map(x=>x.then?x:(!a?.forceESM&&a?.import||(x=>import(x+".js").then(m=>m.default??m)))("@arcgis/core/"+x))).then(c);r.p=a.t(([m])=>{r.t=m.trackAccess;r.o=m.createObservable;r.c=m.createTrackingTarget;r.r=m.runTracked},"applications/Components/reactiveUtils")})($arcgis,r)
2
+ import{S as r,y as e}from"./AM3UTQWH.js";import"./KHKREBVZ.js";import"./5PV2GUZW.js";var s=e(r,{"arcgis-portal-account-switcher":[()=>import("./XOM3GLYF.js"),"clientId,messages:,portal:,redirectUri,signout,signoutOptions:"],"arcgis-portal-account-switcher-accounts":[()=>import("./M664QA6J.js"),"accounts:,messages:,portal:,targetUser"],"arcgis-portal-account-switcher-list":[()=>import("./C3F24ZOM.js"),"accountAccess:,actions:,interactive,linkedAccounts:,messages:,portal:,signedInUsers:"],"arcgis-portal-account-switcher-signout":[()=>import("./BRWHEYLW.js"),"messages:,portal:,signedInAccounts:"],"arcgis-portal-add-gps-metadata":[()=>import("./HVQ7FKJ5.js"),"areSourceSchemaChangesAllowed:,canShowAddGPSMetadata:,item:,itemId,messageOverrides:,messages:,portal:,supportsAttachments:"],"arcgis-portal-ai-assistant":[()=>import("./IKRGN33H.js"),"autoDestroyDisabled,config:,currentContext:,defaultClosed,disabledAgents:,entityToolPresets:,navigationTargetMap:,observabilityEnabled,portal:,t9n:,tools:,user:;submitMessage"],"arcgis-portal-ai-assistant-interrupt":[()=>import("./CNEJPW3I.js"),"_messages:,entityRequest:,message,options:,pickerMessages:,portal:,requestId,showOtherOption,type"],"arcgis-portal-browser":[()=>import("./X7C4PAJY.js"),"_messages:,alwaysShowContent,alwaysShowPagination,alwaysShowSelection,formFactor,height,hideContentTop,hideFilters,hideTopBar,loading,panel,preview,rangeFormatter:,response:,searchTerm,selected:,showPreSearch,store:;scrollToTop"],"arcgis-portal-browser-actions":[()=>import("./XEVOU7SJ.js"),"_messages:,actions:,selection:;restoreFocus"],"arcgis-portal-browser-filter-status":[()=>import("./GBG25IJ2.js"),"_messages:,browserWidth,componentWidth,filters:,hiddenFilterIds:"],"arcgis-portal-browser-pagination":[()=>import("./25K5D5HL.js"),"_messages:,num,start,store:,total;nextPage"],"arcgis-portal-browser-search":[()=>import("./4X4EYM3Q.js"),"_messages:,allowClear,placeholder,store:,term;setFocus"],"arcgis-portal-browser-sort":[()=>import("./WCZJXBW3.js"),"_messages:,appearance,field,options:,order,showText,useDeleted"],"arcgis-portal-browser-top-bar":[()=>import("./QPBWKASC.js"),"_messages:,filtersDisabled,store:"],"arcgis-portal-browser-view":[()=>import("./SO3IBFEU.js"),"options:,store:,view,viewText"],"arcgis-portal-classification-banner":[()=>import("./D52TYBRX.js"),"autoDestroyDisabled,messages:,missingExistingClassification,portalItem:,validationErrors,variant;destroy"],"arcgis-portal-classification-config":[()=>import("./JA3GGSJJ.js"),"autoDestroyDisabled,messages:,portalItem:,status,valid,values;destroy,resetForm,validateForm"],"arcgis-portal-classification-favorite":[()=>import("./VWV2LCNA.js"),"attributeExpressionResults:,classificationValue:,favoriteClassifications:,messages:,portalItem:,resetFavoriteClassification:,selectedFavoriteClassificationName,updateClassificationData:"],"arcgis-portal-classification-form-element":[()=>import("./EDQSL2P3.js"),"attribute:,attributeKey,isRequiredErrors:,messages:,renderingInfo:,value:"],"arcgis-portal-delete-items":[()=>import("./FACH2JTF.js"),"active,disableLinks,fieldDeleteMessages:,itemIds:,items:,messages:,portal:,user:"],"arcgis-portal-delete-items-review":[()=>import("./VLD3MVSG.js"),"items:,messages:,portal:,user:"],"arcgis-portal-entity-picker":[()=>import("./OEG4XCKY.js"),"_messages:,entityType,icon,initialScope,initialSearchTerm,messageOverrides:,mode,num,portal:,query,scopeSelectionDisabled,selected:,selectionMode;setFocus,togglePicker"],"arcgis-portal-extent-picker":[()=>import("./PRBP4AP6.js"),"active,contentOnly,extentService,extentValue:,isArea,itemId,messages:,portal:;;getExtent"],"arcgis-portal-extent-picker-coord-field":[()=>import("./6EMK2BU6.js"),"errorMessage,inputId,label,max,min,relatedErrorMessage,validateRelated:,value;;checkRelatedField,isValid,setFocus"],"arcgis-portal-field-delete":[()=>import("./SUA7ZZUH.js"),"config:,fieldNames:,layer:,mapView:,messages:,options:"],"arcgis-portal-group-badges":[()=>import("./RJRTGF33.js"),"_messages:,appearance,empty,group:,portal:,scale,showTooltips,width"],"arcgis-portal-group-browser":[()=>import("./A3OUZJ44.js"),"_browserMessages:,_messages:,alwaysShowSelection,cards:,fetch:,filters:,formFactor,hasIndoorsSpaces,height,hidePreviewBadges,hidePreviewFooter,hideTopBar,loading,messageOverrides:,num,portal:,preflight:,preview,q,searchParamInteraction:,searchTerm,searchUser,selected:,selection,sort:,store:,view;clearFilters,refresh"],"arcgis-portal-group-browser-card":[()=>import("./BOEGDK4D.js"),"browser:,cardProps:,group:;restoreFocus"],"arcgis-portal-group-browser-preview":[()=>import("./WMKG3CBK.js"),"currentResponse:,group:,hideBadges,hidePreviewFooter,messages:,portal:,previewFooterActionsSpaced,user:;setFocus"],"arcgis-portal-group-browser-preview-card":[()=>import("./YGZICQBT.js"),"baseUrl,hideItemType,hideOwner,hideThumbnail,interactive,item:,link,newTab,portal:,showBadges,showDateUpdated,showOwnerPopup,showSummary,user:;restoreFocus"],"arcgis-portal-group-card":[()=>import("./LBW47BJG.js"),"disabled,group:,hideBadges,hideDateUpdated,hideOwner,hideViewableBy,indeterminate,link,linkHandler:,messages:,name,newTab,portal:,preview,previewed,selected,selection,showDateCreated,showSummary,user:,view;restoreFocus"],"arcgis-portal-group-picker":[()=>import("./MHQ5BATZ.js"),"_messages:,entityType:,icon,initialScope,initialSearchTerm,messageOverrides:,mode,num,portal:,query,scopeSelectionDisabled,selected:,selectionMode;setFocus,togglePicker"],"arcgis-portal-group-thumbnail":[()=>import("./7BFTXD5J.js"),"group:,portal:,scale,tooltip"],"arcgis-portal-info-banner":[()=>import("./2GZVUHL5.js"),"config:,position"],"arcgis-portal-item-actions":[()=>import("./BX2LXI3N.js"),"actions:,item:,keyHandler:,label,messages:,portal:,previewText,showFavorite,showPreview,tabIndexOverride,user:;setFocus"],"arcgis-portal-item-badges":[()=>import("./AUM2QTBQ.js"),"appearance,empty,item:,portal:,scale,showTooltips,useProduction,user:,width"],"arcgis-portal-item-badge":[()=>import("./OYTK2VF2.js"),"_messages:,appearance,badgeType,item:,portal:,scale,showTooltip,useProduction,user:,width"],"arcgis-portal-item-card":[()=>import("./RJ3SU3EV.js"),"actions:,allowedGeometries:,disabled,disableSelection,groups:,hideActionsStart,item:,link,linkHandler:,messages:,name,newTab,portal:,preview,previewed,recycleBin,selected,selectedItems:,selection,showAccess,showBadges,showBadgeTooltips,showDateUpdated,showFavorite,showFavoriteInActionsMenu,showItemType,showItemTypeHosted,showOwner,showSummary,showThumbnail,useProduction,user:,userGroups:,userPopupZIndex,view;restoreFocus"],"arcgis-portal-item-card-sublayer-select":[()=>import("./ASLKTYLX.js"),"allowedGeometries:,appearance,disabled,item:,messageOverrides:,messages:,portal:,selectedItems:,selection,width"],"arcgis-portal-item-favorite":[()=>import("./LR33CLTB.js"),"iconOnly,item:,messages:,portal:,scale,showTooltip,user:,width;setFocus"],"arcgis-portal-item-picker":[()=>import("./AYESDOK5.js"),"_messages:,entityType:,icon,initialScope,initialSearchTerm,messageOverrides:,mode,num,portal:,query,scopeSelectionDisabled,selected:,selectionMode;setFocus,togglePicker"],"arcgis-portal-item-preview":[()=>import("./4YJGTINX.js"),"groups:,item:,matchedSublayerIds:,messages:,portal:,showFieldStatistics,showHosted,user:,userGroups:;setFocus"],"arcgis-portal-item-preview-copy":[()=>import("./4Y73LE7P.js"),"heading,label,messages:,section,text"],"arcgis-portal-item-preview-field":[()=>import("./H6MGSC3Y.js"),"failed,field:,layer:,messages:,showStatistics"],"arcgis-portal-item-preview-sublayer":[()=>import("./LRL2RJID.js"),"externalLinkHandler:,item:,layer:,messages:,portal:,showFieldStatistics"],"arcgis-portal-item-share-summary":[()=>import("./ARAHDT2O.js"),"autoFetchGroups,groups:,item:,messageOverrides:,messages:,overlayPositioning,portal:,scale,showHoverText,showText,userGroups:;fetchGroups,setFocus"],"arcgis-portal-item-share-summary-editable":[()=>import("./26KZUWNM.js"),"allowEdit,autoFetchGroups,groups:,item:,messageOverrides:,messages:,overlayPositioning,portal:,scale,showHoverText,showText,userGroups:;fetchGroups,setFocus"],"arcgis-portal-item-thumbnail":[()=>import("./L25GEXL6.js"),"cacheString,generate,item:,portal:,serviceInfo:,useProduction,user:;generateThumbnail"],"arcgis-portal-item-type":[()=>import("./C4GK263H.js"),"ellipsis,hideIcon,hideText,item:,messages:,portal:,scale,serviceInfo:,showHosted,user:"],"arcgis-portal-mentionable-text-area":[()=>import("./WSQLSDQY.js"),"disabled,maxLength,placeholder,popoverListLabel,popoverPlacement,portal:,readOnly,rows,scale,starters:,user:,value;closePopover,focusTextArea,selectItem"],"arcgis-portal-navigation":[()=>import("./IWQ5I2DD.js"),"clientId,currentPathname,disableNotebookServer,disableTrackViewer,maxWidth,messages:,portal:,portalItem:,product,productHref,projectMenuIcon,projectMenuOptions:,projectMenuSaveIndicator,projectTitle,projectTitleSave:,showNotifications"],"arcgis-portal-preview-panel":[()=>import("./6HNKQNS5.js"),"fixed,open"],"arcgis-portal-replacement-item-redirect":[()=>import("./PST62OKJ.js"),"itemId,messages:,portal:,user:;setFocus"],"arcgis-portal-review-related-items":[()=>import("./NJB24AIV.js"),"browserMessages:,deleteMessages:,messages:,portal:,relatedItems:,relatedItemsCount,showDependentItems,sourceItem:,user:"],"arcgis-portal-sublayer-type":[()=>import("./FVHP6PFG.js"),"geometry,hideIcon,hideName,hideType,messages:,name,renderer:,scale,type,underline"],"arcgis-portal-user-avatar":[()=>import("./CBFFZMX4.js"),"checkOnline,description,heading,hideAvatar,messages:,portal:,scale,showName,underline,user:,username,wrap"],"arcgis-portal-user-picker":[()=>import("./X4R2NVDQ.js"),"_messages:,entityType:,icon,initialScope,initialSearchTerm,messageOverrides:,mode,num,portal:,query,scopeSelectionDisabled,selected:,selectionMode;setFocus,togglePicker"],"arcgis-portal-user-popup":[()=>import("./5E4EL6TF.js"),"appearance,avatarAriaHidden,baseUrl,checkOnline,fullName,item:,messages:,portal:,scale,showAvatar,showName,showUsername,underline,user:,username,wrap,zIndex;openPopup,setFocus"],"arcgis-portal-voice-input":[()=>import("./NYBLHT3F.js"),"language;clearText,startListening,stopListening"]});s({resourcesUrl:import.meta.url});var t=new CSSStyleSheet;t.replaceSync("@layer{:not([hydrated]):is(arcgis-portal-account-switcher,arcgis-portal-account-switcher-accounts,arcgis-portal-account-switcher-list,arcgis-portal-account-switcher-signout,arcgis-portal-add-gps-metadata,arcgis-portal-ai-assistant,arcgis-portal-ai-assistant-interrupt,arcgis-portal-browser,arcgis-portal-browser-actions,arcgis-portal-browser-filter-status,arcgis-portal-browser-pagination,arcgis-portal-browser-search,arcgis-portal-browser-sort,arcgis-portal-browser-top-bar,arcgis-portal-browser-view,arcgis-portal-classification-banner,arcgis-portal-classification-config,arcgis-portal-classification-favorite,arcgis-portal-classification-form-element,arcgis-portal-delete-items,arcgis-portal-delete-items-review,arcgis-portal-entity-picker,arcgis-portal-extent-picker,arcgis-portal-field-delete,arcgis-portal-group-badges,arcgis-portal-group-browser,arcgis-portal-group-browser-card,arcgis-portal-group-browser-preview,arcgis-portal-group-browser-preview-card,arcgis-portal-group-card,arcgis-portal-group-picker,arcgis-portal-group-thumbnail,arcgis-portal-info-banner,arcgis-portal-item-actions,arcgis-portal-item-badges,arcgis-portal-item-badge,arcgis-portal-item-card,arcgis-portal-item-card-sublayer-select,arcgis-portal-item-favorite,arcgis-portal-item-picker,arcgis-portal-item-preview,arcgis-portal-item-preview-copy,arcgis-portal-item-preview-field,arcgis-portal-item-preview-sublayer,arcgis-portal-item-share-summary,arcgis-portal-item-share-summary-editable,arcgis-portal-item-thumbnail,arcgis-portal-item-type,arcgis-portal-mentionable-text-area,arcgis-portal-navigation,arcgis-portal-preview-panel,arcgis-portal-replacement-item-redirect,arcgis-portal-review-related-items,arcgis-portal-sublayer-type,arcgis-portal-user-avatar,arcgis-portal-user-picker,arcgis-portal-user-popup,arcgis-portal-voice-input){visibility:hidden}}");document.adoptedStyleSheets=[...document.adoptedStyleSheets,t];window.$arcgis||Object.defineProperty(window,"$arcgis",{configurable:!1,enumerable:!0,writable:!1,value:{}}),((a,r)=>{a.t=(c,...x)=>Promise.all(x.map(x=>x.then?x:(!a?.forceESM&&a?.import||(x=>import(x+".js").then(m=>m.default??m)))("@arcgis/core/"+x))).then(c);r.p=a.t(([m])=>{r.t=m.trackAccess;r.o=m.createObservable;r.c=m.createTrackingTarget;r.r=m.runTracked},"applications/Components/reactiveUtils")})($arcgis,r)
@@ -10,10 +10,10 @@ import { r as $ } from "../../chunks/request.js";
10
10
  import { i as I } from "../../chunks/item.js";
11
11
  import "../arcgis-portal-review-related-items/customElement.js";
12
12
  import { f as B } from "../../chunks/portal-delete-items-review.js";
13
- import { u as R } from "../../chunks/useT9n.js";
13
+ import { u as C } from "../../chunks/useT9n.js";
14
14
  import { makeController as G } from "@arcgis/lumina/controllers";
15
- import { g as V, a as C } from "../../chunks/portal.js";
16
- import { g as K } from "../../chunks/items.js";
15
+ import { g as K, a as R } from "../../chunks/portal.js";
16
+ import { g as V } from "../../chunks/items.js";
17
17
  import { g as J } from "../../chunks/url.js";
18
18
  async function _(n, t, e = !1) {
19
19
  try {
@@ -268,9 +268,12 @@ function F(n, t) {
268
268
  const e = t[0];
269
269
  return n.type === "Feature Service" && I(n) && t.length === 1 && e?.type === "Feed" && I(e);
270
270
  }
271
- const E = ["Code Attachment", "Map Area"];
271
+ const ae = ["Code Attachment", "Map Area", "Indoors Map Configuration"], le = ["MapAreaPackage"];
272
+ function E(n) {
273
+ return ae.includes(n.type ?? "") || le.some((t) => n.typeKeywords?.includes(t));
274
+ }
272
275
  function k(n) {
273
- return n ? n.filter((t) => !E.includes(t.type ?? "")) : null;
276
+ return n ? n.filter((t) => !E(t)) : null;
274
277
  }
275
278
  function A(n) {
276
279
  return !!(n && "inRecycleBin" in n && n.inRecycleBin === !0);
@@ -281,14 +284,14 @@ function h(n) {
281
284
  function D(n) {
282
285
  return { ...n, originalStatus: n.originalStatus ?? n.kind };
283
286
  }
284
- function ae(n, t) {
287
+ function ce(n, t) {
285
288
  return {
286
289
  ...n,
287
290
  kind: t,
288
291
  originalStatus: n.originalStatus ?? n.kind
289
292
  };
290
293
  }
291
- async function le(n, t) {
294
+ async function oe(n, t) {
292
295
  const e = await T({ item: n, portal: t, permanentlyDelete: !1 });
293
296
  if (e.error && e.error.code !== "itemNotSupportedInRecycleBin")
294
297
  return { kind: "cannotDelete", errorCode: e.error.code };
@@ -297,7 +300,7 @@ async function le(n, t) {
297
300
  const s = await T({ item: n, portal: t, permanentlyDelete: !0 });
298
301
  return s.result?.success ? { kind: "permanentlyDelete" } : { kind: "cannotDelete", errorCode: s.error?.code ?? "unhandledError" };
299
302
  }
300
- function ce(n) {
303
+ function de(n) {
301
304
  switch (n) {
302
305
  case "itemHasDependentItems":
303
306
  return "hasDependentItems";
@@ -307,7 +310,7 @@ function ce(n) {
307
310
  return "uncaught";
308
311
  }
309
312
  }
310
- async function oe(n, t) {
313
+ async function me(n, t) {
311
314
  const e = await Y({
312
315
  itemId: n.id,
313
316
  portal: t,
@@ -315,15 +318,15 @@ async function oe(n, t) {
315
318
  }), s = await Z(n, t), i = await ee(n, t), r = await te(n, t), l = e.result?.relatedItems ?? [], c = k(l) ?? [], a = e.result?.aggregations?.total?.count, o = k(i.resultData.items), m = k(r), p = s?.sourceData, u = {
316
319
  usedByItems: c,
317
320
  usedByItemsCount: a == null ? c.length : Math.max(0, a - (l.length - c.length)),
318
- sourceData: E.includes(p?.type ?? "") ? null : p ?? null,
321
+ sourceData: p && !E(p) ? p : null,
319
322
  resultData: o,
320
323
  replacementItemFor: m?.length ? m : null
321
- }, y = ie({ item: n, ...u }), f = await le(n, t);
324
+ }, y = ie({ item: n, ...u }), f = await oe(n, t);
322
325
  return f.kind === "cannotDelete" ? D({
323
326
  item: n,
324
327
  ...u,
325
328
  kind: "cannotDelete",
326
- reason: ce(f.errorCode)
329
+ reason: de(f.errorCode)
327
330
  }) : y ? D({
328
331
  item: n,
329
332
  ...u,
@@ -336,25 +339,25 @@ async function oe(n, t) {
336
339
  reason: "notSupported"
337
340
  }) : D({ item: n, ...u, kind: f.kind });
338
341
  }
339
- async function de(n, t) {
340
- const e = await Promise.all(n.map(async (s) => await oe(s, t)));
341
- return me(e);
342
+ async function ue(n, t) {
343
+ const e = await Promise.all(n.map(async (s) => await me(s, t)));
344
+ return pe(e);
342
345
  }
343
- function me(n) {
346
+ function pe(n) {
344
347
  const t = /* @__PURE__ */ new Map();
345
348
  for (const e of n)
346
349
  e.item.id && t.set(e.item.id, e);
347
350
  return n.map((e) => {
348
351
  if (e.kind !== "cannotDelete" || e.reason !== "hasDependentItems" || !e.item.id)
349
352
  return e;
350
- const i = ue(e.resultData, t);
353
+ const i = he(e.resultData, t);
351
354
  if (i.length === 0)
352
355
  return e;
353
356
  const r = i.every((c) => t.has(c)), l = i.every((c) => !t.get(c)?.item.protected);
354
- return r && l ? ae(e, "recycle") : e;
357
+ return r && l ? ce(e, "recycle") : e;
355
358
  });
356
359
  }
357
- function ue(n, t, e = /* @__PURE__ */ new Set()) {
360
+ function he(n, t, e = /* @__PURE__ */ new Set()) {
358
361
  if (!n?.length)
359
362
  return [];
360
363
  const s = n.filter((r) => !A(r)), i = /* @__PURE__ */ new Set();
@@ -368,9 +371,9 @@ function ue(n, t, e = /* @__PURE__ */ new Set()) {
368
371
  }
369
372
  return [...i];
370
373
  }
371
- const pe = z`:host{display:block}calcite-dialog{--calcite-dialog-content-space: 0;--calcite-dialog-background-color: var(--calcite-color-background)}calcite-panel{display:flex;flex-direction:column;gap:.75rem;>*{margin-inline:.75rem}}.panel__content{width:100%;box-sizing:border-box}.delete-items-button{align-self:stretch;flex:0 0 auto;max-inline-size:155px}.delete-items-button>span{white-space:normal;overflow-wrap:anywhere}.single-item-bucket{--calcite-block-background-color: transparent;--calcite-block-border-color: transparent}.bucket__content{display:flex;align-items:flex-start;gap:.75rem;width:100%}.bucket__icon{flex-shrink:0}.bucket__icon--danger{color:var(--calcite-color-status-danger)}.bucket__details{display:flex;flex:1 1 auto;flex-direction:column;min-width:0}.bucket__header{font-weight:500}.bucket__label{margin-inline-end:.25rem}.bucket__checkbox{align-self:flex-start;margin-top:.5rem}.bucket__description{line-height:1.35;font-size:var(--calcite-font-size--1)}.bucket__link{display:flex;align-items:center;min-height:1.5rem}.item-link-content{position:relative;word-break:break-word;>arcgis-portal-item-type{margin-inline-end:.25rem;vertical-align:middle}}.panel__checkbox-container{width:100%;box-sizing:border-box;background-color:var(--calcite-color-foreground-1)}.panel__checkbox{padding-block:.75rem;padding-inline-start:.75rem}.panel__related-items{margin-top:1rem;border:1px solid var(--calcite-color-border-2)}.panel__related-items-icon{color:var(--calcite-color-status-warning)}.panel__related-items-notice{padding-bottom:.75rem}arcgis-portal-review-related-items{margin-bottom:.75rem}calcite-list{overflow:auto;min-block-size:0;max-height:min(250px,75vh)}.discouraged-items-warning{margin-bottom:.75rem}.header-description{font-size:var(--calcite-font-size--1);font-weight:400}`, P = /* @__PURE__ */ new Map();
372
- async function he(n, t) {
373
- const e = V(n), s = JSON.stringify([e, t]), i = P.get(s);
374
+ const ge = z`:host{display:block}calcite-dialog{--calcite-dialog-content-space: 0;--calcite-dialog-background-color: var(--calcite-color-background)}calcite-panel{display:flex;flex-direction:column;gap:.75rem;>*{margin-inline:.75rem}}.panel__content{width:100%;box-sizing:border-box}.delete-items-button{align-self:stretch;flex:0 0 auto;max-inline-size:155px}.delete-items-button>span{white-space:normal;overflow-wrap:anywhere}.single-item-bucket{--calcite-block-background-color: transparent;--calcite-block-border-color: transparent}.bucket__content{display:flex;align-items:flex-start;gap:.75rem;width:100%}.bucket__icon{flex-shrink:0}.bucket__icon--danger{color:var(--calcite-color-status-danger)}.bucket__details{display:flex;flex:1 1 auto;flex-direction:column;min-width:0}.bucket__header{font-weight:500}.bucket__label{margin-inline-end:.25rem}.bucket__checkbox{align-self:flex-start;margin-top:.5rem}.bucket__description{line-height:1.35;font-size:var(--calcite-font-size--1)}.bucket__link{display:flex;align-items:center;min-height:1.5rem}.item-link-content{position:relative;word-break:break-word;>arcgis-portal-item-type{margin-inline-end:.25rem;vertical-align:middle}}.panel__checkbox-container{width:100%;box-sizing:border-box;background-color:var(--calcite-color-foreground-1)}.panel__checkbox{padding-block:.75rem;padding-inline-start:.75rem}.panel__related-items{margin-top:1rem;border:1px solid var(--calcite-color-border-2)}.panel__related-items-icon{color:var(--calcite-color-status-warning)}.panel__related-items-notice{padding-bottom:.75rem}arcgis-portal-review-related-items{margin-bottom:.75rem}calcite-list{overflow:auto;min-block-size:0;max-height:min(250px,75vh)}.discouraged-items-warning{margin-bottom:.75rem}.header-description{font-size:var(--calcite-font-size--1);font-weight:400}`, P = /* @__PURE__ */ new Map();
375
+ async function Ie(n, t) {
376
+ const e = K(n), s = JSON.stringify([e, t]), i = P.get(s);
374
377
  if (i)
375
378
  return i;
376
379
  try {
@@ -384,11 +387,11 @@ async function he(n, t) {
384
387
  return {};
385
388
  }
386
389
  }
387
- const ge = (n) => G((t, e) => {
390
+ const ye = (n) => G((t, e) => {
388
391
  let s, i;
389
392
  return e.onUpdate(() => {
390
393
  const r = n.portal(), l = n.language(), c = r?.restUrl;
391
- c === s && l === i || (s = c, i = l, e.exports = {}, !(!r || !c || !l) && he(r, l).then((a) => {
394
+ c === s && l === i || (s = c, i = l, e.exports = {}, !(!r || !c || !l) && Ie(r, l).then((a) => {
392
395
  e.exports = a;
393
396
  }));
394
397
  }), {};
@@ -413,9 +416,9 @@ function M({ id: n, linkText: t, label: e, placement: s, items: i, portal: r, us
413
416
  a && window.open(a.replace("sharing/rest/", ""), "_blank", "noopener,noreferrer");
414
417
  }}><span slot=content-start><arcgis-portal-item-type .item=${c} .portal=${r} .user=${l} hide-text></arcgis-portal-item-type></span><span slot=content>${c.title}</span></calcite-list-item>`)}</calcite-list></calcite-popover>`;
415
418
  }
416
- class Ie extends q {
419
+ class fe extends q {
417
420
  constructor() {
418
- super(...arguments), this.deleteStatusRequestId = 0, this.updatedCannotDeleteItemIds = /* @__PURE__ */ new Set(), this.permanentlyDeleteCheckboxRef = W(), this.messages = R({ blocking: !0 }), this.fieldDeleteMessages = R({ name: "portal-field-delete" }), this.helpMap = ge({
421
+ super(...arguments), this.deleteStatusRequestId = 0, this.updatedCannotDeleteItemIds = /* @__PURE__ */ new Set(), this.permanentlyDeleteCheckboxRef = W(), this.messages = C({ blocking: !0 }), this.fieldDeleteMessages = C({ name: "portal-field-delete" }), this.helpMap = ye({
419
422
  portal: () => this.portal,
420
423
  language: () => this.messages._t9nLocale
421
424
  }), this.isLoading = !0, this.submittingAction = null, this.loadedItems = [], this.hasConfirmedReview = !1, this.cannotDeleteItems = [], this.recycleItems = [], this.permanentlyDeleteItems = [], this.deprecateItems = [], this.excludeItems = [], this.reviewingDirectlyUsedByItems = !1, this.reviewDecision = null, this.active = !0, this.items = [], this.itemIds = [], this.user = null, this.disableLinks = !1, this.arcgisClose = v(), this.arcgisConfirm = v(), this.arcgisError = v();
@@ -424,7 +427,7 @@ class Ie extends q {
424
427
  this.properties = { isLoading: 16, submittingAction: 16, loadedItems: 16, hasConfirmedReview: 16, cannotDeleteItems: 16, recycleItems: 16, permanentlyDeleteItems: 16, deprecateItems: 16, excludeItems: 16, reviewingDirectlyUsedByItems: 16, reviewDecision: 16, active: 5, items: 0, itemIds: 0, portal: 0, user: 0, disableLinks: 5 };
425
428
  }
426
429
  static {
427
- this.styles = pe;
430
+ this.styles = ge;
428
431
  }
429
432
  willUpdate(t) {
430
433
  const e = t.has("items") || t.has("itemIds") || t.has("portal") || t.has("user") || t.has("active");
@@ -500,7 +503,7 @@ class Ie extends q {
500
503
  this.isLoading = !0, this.submittingAction = null, this.loadedItems = [], this.hasConfirmedReview = !1, this.cannotDeleteItems = [], this.recycleItems = [], this.permanentlyDeleteItems = [], this.deprecateItems = [], this.excludeItems = [], this.reviewingDirectlyUsedByItems = !1, this.reviewDecision = null, this.updatedCannotDeleteItemIds.clear(), ++this.deleteStatusRequestId;
501
504
  }
502
505
  async determineDeleteStatus(t, e = this.loadedItems) {
503
- const s = new Set(this.recycleItems.map(({ item: r }) => r.id).filter((r) => !!r)), i = await de(e, this.portal);
506
+ const s = new Set(this.recycleItems.map(({ item: r }) => r.id).filter((r) => !!r)), i = await ue(e, this.portal);
504
507
  if (t === this.deleteStatusRequestId) {
505
508
  this.cannotDeleteItems = i.filter((r) => h(r) === "cannotDelete");
506
509
  for (const r of this.cannotDeleteItems)
@@ -617,7 +620,7 @@ class Ie extends q {
617
620
  }), e = this.cannotDeleteItems.find(({ reason: o }) => o === "hasDependentItems"), s = e ? e.resultData ?? [] : t.flatMap(({ usedByItems: o }) => o), i = e ? s.length : t[0]?.usedByItemsCount, r = re({
618
621
  selectedItems: ne(t)
619
622
  }), l = r.find(({ reason: o }) => o === "replacement"), c = l?.offendingItems ?? [], a = B(this.messages._t9nLocale, this.messages.replacementItem.isReplacementFor, c.length, { itemLink: "{itemLink}" });
620
- return d`${this.loadedItems.length === 1 && ["delete", "permanentlyDelete"].includes(this.deleteMode) && r.length > 0 ? d`<div class="discouraged-items-warning"><calcite-notice kind=warning open><div slot=message>${l ? a.split("{itemLink}").map((o, m) => d`${m > 0 && this.renderItemLinks(c, "delete-items-replacement-for") || ""}${o}`) : this.messages.deleteDiscouraged}</div>${!l && d`<calcite-link .href=${`${C(this.portal)}${this.helpMap[120001208] || ""}`} target=_blank icon-end=launch slot=link>${this.messages.learnMoreAboutDeletingSourceItems}</calcite-link>` || ""}</calcite-notice></div>` : null}${!this.cannotDeleteItems.some(({ reason: o }) => o === "deleteProtected") && d`<arcgis-portal-review-related-items .sourceItem=${this.loadedItems[0] ?? null} .relatedItems=${s} .relatedItemsCount=${i} .showDependentItems=${!!e} .portal=${this.portal} .user=${this.user}></arcgis-portal-review-related-items>` || ""}`;
623
+ return d`${this.loadedItems.length === 1 && ["delete", "permanentlyDelete"].includes(this.deleteMode) && r.length > 0 ? d`<div class="discouraged-items-warning"><calcite-notice kind=warning open><div slot=message>${l ? a.split("{itemLink}").map((o, m) => d`${m > 0 && this.renderItemLinks(c, "delete-items-replacement-for") || ""}${o}`) : this.messages.deleteDiscouraged}</div>${!l && d`<calcite-link .href=${`${R(this.portal)}${this.helpMap[120001208] || ""}`} target=_blank icon-end=launch slot=link>${this.messages.learnMoreAboutDeletingSourceItems}</calcite-link>` || ""}</calcite-notice></div>` : null}${!this.cannotDeleteItems.some(({ reason: o }) => o === "deleteProtected") && d`<arcgis-portal-review-related-items .sourceItem=${this.loadedItems[0] ?? null} .relatedItems=${s} .relatedItemsCount=${i} .showDependentItems=${!!e} .portal=${this.portal} .user=${this.user}></arcgis-portal-review-related-items>` || ""}`;
621
624
  }
622
625
  renderDirectlyUsedByItemsNotice() {
623
626
  const t = new Set(this.itemsWithImpactedItems.flatMap(({ usedByItems: s }) => s.map(({ id: i }) => i))), e = this.messages.reviewRelatedItems.multiple.replace("{totalCount}", String(t.size));
@@ -626,7 +629,7 @@ class Ie extends q {
626
629
  }}>${this.messages.reviewItems}</calcite-button></calcite-notice></div>`;
627
630
  }
628
631
  renderDeleteSummary() {
629
- return d`<div class="panel__content">${this.isLoading ? d`<calcite-scrim loading></calcite-scrim>` : d`<calcite-panel>${this.renderRecycleBucket()}${this.renderDeprecateBucket()}${this.renderExcludeBucket()}${this.renderCannotDeleteBucket()}${this.renderPermanentlyDeleteBucket()}${this.loadedItems.length === 1 && this.renderDirectlyUsedByItems() || ""}${this.itemsHaveImpactedItems && d`<div>${this.loadedItems.length > 1 ? this.renderDirectlyUsedByItemsNotice() : null}</div>` || ""}</calcite-panel>`}</div>${!this.isLoading && d`${this.loadedItems.length === 1 && K(this.loadedItems[0]).contentStatus !== "deprecated" && d`<calcite-button class="delete-items-button" slot=footer-start kind=danger appearance=outline-fill .disabled=${!!this.submittingAction} .loading=${this.submittingAction === "deprecate"} @click=${this.handleDeprecate}><span>${this.messages.deprecateInstead}</span></calcite-button>` || ""}<calcite-button class="delete-items-button" slot=footer-end appearance=outline-fill @click=${this.handleDialogClose}><span>${this.messages.cancel}</span></calcite-button>${this.deleteMode !== "none" && d`<calcite-button class="delete-items-button" .disabled=${!!this.submittingAction} .loading=${this.submittingAction === "delete"} kind=danger slot=footer-end @click=${async () => await this.handleDelete()}><span>${this.getConfirmButtonText()}</span></calcite-button>` || ""}` || ""}`;
632
+ return d`<div class="panel__content">${this.isLoading ? d`<calcite-scrim loading></calcite-scrim>` : d`<calcite-panel>${this.renderRecycleBucket()}${this.renderDeprecateBucket()}${this.renderExcludeBucket()}${this.renderCannotDeleteBucket()}${this.renderPermanentlyDeleteBucket()}${this.loadedItems.length === 1 && this.renderDirectlyUsedByItems() || ""}${this.itemsHaveImpactedItems && d`<div>${this.loadedItems.length > 1 ? this.renderDirectlyUsedByItemsNotice() : null}</div>` || ""}</calcite-panel>`}</div>${!this.isLoading && d`${this.loadedItems.length === 1 && V(this.loadedItems[0]).contentStatus !== "deprecated" && d`<calcite-button class="delete-items-button" slot=footer-start kind=danger appearance=outline-fill .disabled=${!!this.submittingAction} .loading=${this.submittingAction === "deprecate"} @click=${this.handleDeprecate}><span>${this.messages.deprecateInstead}</span></calcite-button>` || ""}<calcite-button class="delete-items-button" slot=footer-end appearance=outline-fill @click=${this.handleDialogClose}><span>${this.messages.cancel}</span></calcite-button>${this.deleteMode !== "none" && d`<calcite-button class="delete-items-button" .disabled=${!!this.submittingAction} .loading=${this.submittingAction === "delete"} kind=danger slot=footer-end @click=${async () => await this.handleDelete()}><span>${this.getConfirmButtonText()}</span></calcite-button>` || ""}` || ""}`;
630
633
  }
631
634
  renderReviewItems() {
632
635
  return d`<div class="panel__content"><calcite-panel><arcgis-portal-delete-items-review .items=${this.itemsWithImpactedItems} .portal=${this.portal} .user=${this.user}></arcgis-portal-delete-items-review></calcite-panel></div><calcite-button slot=footer-start appearance=solid kind=neutral @click=${async () => await this.handleReviewDecision("exclude")}>${this.messages.exclude}</calcite-button><calcite-button slot=footer-end appearance=outline-fill kind=danger @click=${async () => await this.handleReviewDecision("deprecate")}>${this.messages.deprecateInstead}</calcite-button><calcite-button slot=footer-end appearance=solid kind=danger @click=${async () => await this.handleReviewDecision("delete")}>${this.messages.proceedToDelete}</calcite-button>`;
@@ -683,7 +686,7 @@ class Ie extends q {
683
686
  label: t ? this.messages.summary.permanentDelete.delete : this.messages.summary.permanentlyDelete,
684
687
  description: t ? this.messages.summary.permanentDelete.default.single : e ? null : this.messages.summary.permanentDelete.notSupported.single,
685
688
  link: e ? void 0 : {
686
- href: `${C(this.portal)}${this.helpMap[120004692] || ""}`,
689
+ href: `${R(this.portal)}${this.helpMap[120004692] || ""}`,
687
690
  text: this.fieldDeleteMessages.learnMore ?? this.messages.moreInfo
688
691
  },
689
692
  bucket: this.permanentlyDeleteItems,
@@ -696,7 +699,7 @@ class Ie extends q {
696
699
  return !t || !e ? null : d`<calcite-dialog modal .open=${this.active} width=s .heading=${this.getHeaderText()} heading-level=2 outside-close-disabled escape-disabled kind=danger @calciteDialogClose=${this.handleDialogClose}>${!this.isLoading || this.reviewingDirectlyUsedByItems ? d`<div slot=heading><span>${this.getHeaderText()}</span><br><span class="header-description">${this.getHeaderDescription()}</span></div>` : void 0}${this.reviewingDirectlyUsedByItems ? this.renderReviewItems() : this.renderDeleteSummary()}</calcite-dialog>`;
697
700
  }
698
701
  }
699
- H("arcgis-portal-delete-items", Ie);
702
+ H("arcgis-portal-delete-items", fe);
700
703
  export {
701
- Ie as ArcgisPortalDeleteItems
704
+ fe as ArcgisPortalDeleteItems
702
705
  };
@@ -2,7 +2,6 @@ import "@esri/calcite-components/components/calcite-chip";
2
2
  import "@esri/calcite-components/components/calcite-tooltip";
3
3
  import "@esri/calcite-components/components/calcite-list-item";
4
4
  import "@esri/calcite-components/components/calcite-action";
5
- import "@esri/calcite-components/components/calcite-dropdown-item";
6
5
  import "@esri/calcite-components/components/calcite-icon";
7
6
  import "@esri/calcite-components/components/calcite-popover";
8
7
  import "@esri/calcite-components/components/calcite-list";
@@ -10,6 +9,7 @@ import "../arcgis-portal-item-type/index.js";
10
9
  import "@esri/calcite-components/components/calcite-loader";
11
10
  import "@esri/calcite-components/components/calcite-button";
12
11
  import "@esri/calcite-components/components/calcite-input";
12
+ import "@esri/calcite-components/components/calcite-dropdown-item";
13
13
  import "@esri/calcite-components/components/calcite-dropdown";
14
14
  import "../arcgis-portal-user-avatar/index.js";
15
15
  import "@esri/calcite-components/components/calcite-dropdown-group";