import{b as s}from"./index.c6944236.js";var c=(e=>(e.Cpp="cpp",e.C="c",e.Java="java",e.Kotlin="kotlin",e.Pascal="pascal",e.Python="python",e.Rust="rust",e.Swift="swift",e.Go="go",e.Haskell="haskell",e.CSharp="csharp",e.FSharp="fsharp",e))(c||{}),i=(e=>(e.Select="Select",e))(i||{});const f={cpp:[".cpp",".cc",".cxx"],c:[".c"],java:[".java"],kotlin:[".kt"],pascal:[".pas"],python:[".py"],rust:[".rs"],swift:[".swift"],go:[".go"],haskell:[".hs"],csharp:[".cs"],fsharp:[".fs"]};function v(e,t){return f[e].some(a=>t.toLowerCase().endsWith(a))}const n={cpp:[{name:"compiler",type:"Select",values:["g++","clang++"],defaultValue:"g++"},{name:"std",type:"Select",values:["c++03","c++11","c++14","c++17","c++20","gnu++03","gnu++11","gnu++14","gnu++17","gnu++20"],defaultValue:"c++11"},{name:"O",type:"Select",values:["0","1","2","3","fast"],defaultValue:"2"},{name:"m",type:"Select",values:["64","32","x32"],defaultValue:"64"}],c:[{name:"compiler",type:"Select",values:["gcc","clang"],defaultValue:"gcc"},{name:"std",type:"Select",values:["c89","c99","c11","c17","gnu89","gnu99","gnu11","gnu17"],defaultValue:"c11"},{name:"O",type:"Select",values:["0","1","2","3","fast"],defaultValue:"2"},{name:"m",type:"Select",values:["64","32","x32"],defaultValue:"64"}],java:[],kotlin:[{name:"version",type:"Select",values:["1.3","1.4","1.5"],defaultValue:"1.4"},{name:"platform",type:"Select",values:["jvm"],defaultValue:"jvm"}],pascal:[{name:"optimize",type:"Select",values:["-","1","2","3","4"],defaultValue:"2"}],python:[{name:"version",type:"Select",values:["2.7","3.6","3.9"],defaultValue:"3.9"}],rust:[{name:"version",type:"Select",values:["2015","2018","2021"],defaultValue:"2021"},{name:"optimize",type:"Select",values:["0","1","2","3"],defaultValue:"3"}],swift:[{name:"version",type:"Select",values:["4.2","5"],defaultValue:"5"},{name:"optimize",type:"Select",values:["Onone","O","Ounchecked"],defaultValue:"O"}],go:[{name:"version",type:"Select",values:["1.x"],defaultValue:"1.x"}],haskell:[{name:"version",type:"Select",values:["98","2010"],defaultValue:"2010"}],csharp:[{name:"version",type:"Select",values:["7.3","8"],defaultValue:"8"}],fsharp:[]},u=e=>Object.fromEntries(n[e].map(({name:t,defaultValue:a})=>[t,a])),o=(e,t)=>Object.assign({},u(e),Object.fromEntries(Object.entries(t||{}).filter(([a,p])=>{const l=n[e].find(r=>r.name===a);if(!l)return!1;switch(l.type){case"Select":return l.values.includes(p)}}))),d=()=>{var e;return((e=s.userPreference.code)==null?void 0:e.defaultLanguage)||Object.values(c)[0]},S=e=>{var t,a;return e===((t=s.userPreference.code)==null?void 0:t.defaultLanguage)?o(e,(a=s.userPreference.code)==null?void 0:a.defaultCompileAndRunOptions):u(e)};export{c as C,S as a,i as b,n as c,v as d,o as f,d as g};
