"use strict";(self.webpackChunkgraphiql_app_for_wp=self.webpackChunkgraphiql_app_for_wp||[]).push([[4809],{7824(n,e,o){o.d(e,{L:()=>t});var i,t,c=o(4808);!function(n){n.isThemeColor=function(n){return n&&"object"===typeof n&&"string"===typeof n.id}}(i||(i={})),function(n){n.iconNameSegment="[A-Za-z0-9]+",n.iconNameExpression="[A-Za-z0-9-]+",n.iconModifierExpression="~[A-Za-z]+",n.iconNameCharacter="[A-Za-z0-9~-]";const e=new RegExp("^(".concat(n.iconNameExpression,")(").concat(n.iconModifierExpression,")?$"));function o(n){const i=e.exec(n.id);if(!i)return o(c.W.error);const[,t,r]=i,s=["codicon","codicon-"+t];return r&&s.push("codicon-modifier-"+r.substring(1)),s}n.asClassNameArray=o,n.asClassName=function(n){return o(n).join(" ")},n.asCSSSelector=function(n){return"."+o(n).join(".")},n.isThemeIcon=function(n){return n&&"object"===typeof n&&"string"===typeof n.id&&("undefined"===typeof n.color||i.isThemeColor(n.color))};const t=new RegExp("^\\$\\((".concat(n.iconNameExpression,"(?:").concat(n.iconModifierExpression,")?)\\)$"));n.fromString=function(n){const e=t.exec(n);if(!e)return;const[,o]=e;return{id:o}},n.fromId=function(n){return{id:n}},n.modify=function(n,e){let o=n.id;const i=o.lastIndexOf("~");return-1!==i&&(o=o.substring(0,i)),e&&(o="".concat(o,"~").concat(e)),{id:o}},n.getModifier=function(n){const e=n.id.lastIndexOf("~");if(-1!==e)return n.id.substring(e+1)},n.isEqual=function(n,e){var o,i;return n.id===e.id&&(null===(o=n.color)||void 0===o?void 0:o.id)===(null===(i=e.color)||void 0===i?void 0:i.id)}}(t||(t={}))},4809(n,e,o){o.r(e),o.d(e,{getIconClasses:()=>u});var i=o(4405),t=o(6474),c=o(4673),r=o(6696),s=o(9270),a=o(7824);const f=/(?:\/|^)(?:([^\/]+)\/)?([^\/]+)$/;function u(n,e,o,u,d){if(a.L.isThemeIcon(d))return["codicon-".concat(d.id),"predefined-file-icon"];if(c.r.isUri(d))return[];const p=u===s.p.ROOT_FOLDER?["rootfolder-icon"]:u===s.p.FOLDER?["folder-icon"]:["file-icon"];if(o){let c;if(o.scheme===i.ny.data){c=t.B6.parseMetaData(o).get(t.B6.META_DATA_LABEL)}else{const n=o.path.match(f);n?(c=l(n[2].toLowerCase()),n[1]&&p.push("".concat(l(n[1].toLowerCase()),"-name-dir-icon"))):c=l(o.authority.toLowerCase())}if(u===s.p.ROOT_FOLDER)p.push("".concat(c,"-root-name-folder-icon"));else if(u===s.p.FOLDER)p.push("".concat(c,"-name-folder-icon"));else{if(c){if(p.push("".concat(c,"-name-file-icon")),p.push("name-file-icon"),c.length<=255){const n=c.split(".");for(let e=1;e<n.length;e++)p.push("".concat(n.slice(e).join("."),"-ext-file-icon"))}p.push("ext-file-icon")}const s=function(n,e,o){if(!o)return null;let c=null;if(o.scheme===i.ny.data){const n=t.B6.parseMetaData(o).get(t.B6.META_DATA_MIME);n&&(c=e.getLanguageIdByMimeType(n))}else{const e=n.getModel(o);e&&(c=e.getLanguageId())}if(c&&c!==r.vH)return c;return e.guessLanguageIdByFilepathOrFirstLine(o)}(n,e,o);s&&p.push("".concat(l(s),"-lang-file-icon"))}}return p}function l(n){return n.replace(/[\s]/g,"/")}},9270(n,e,o){var i;o.d(e,{p:()=>i}),function(n){n[n.FILE=0]="FILE",n[n.FOLDER=1]="FOLDER",n[n.ROOT_FOLDER=2]="ROOT_FOLDER"}(i||(i={}))}}]);
//# sourceMappingURL=4809.b6e8abf2.chunk.js.map