static-php-cli/assets/chunks/CliGenerator.BrwganWn.js
2024-09-17 14:35:40 +00:00

3 lines
33 KiB
JavaScript
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

import{d as oe,s as g,h as j,v as X,o as b,c as w,j as e,t as l,F as U,E as _,e as q,a2 as m,a3 as F,a4 as f,a5 as ae,a as de,a6 as M,p as ue,l as pe,_ as ce}from"./framework.CszIUXhs.js";const re={support:{BSD:"wip"},type:"external","arg-type":"custom",source:"amqp","lib-depends":["librabbitmq"],"ext-depends-windows":["openssl"]},be={type:"external",source:"apcu"},we={type:"builtin"},ge={type:"builtin","arg-type-unix":"with-prefix","arg-type-windows":"with","lib-depends":["bzip2"]},xe={type:"builtin"},me={type:"builtin"},ye={notes:!0,type:"builtin","arg-type":"with","lib-depends":["curl"],"ext-depends-windows":["zlib","openssl"]},he={type:"builtin","arg-type":"custom","lib-suggests":["qdbm"]},ve={support:{BSD:"wip"},type:"builtin","arg-type":"custom","arg-type-windows":"with","lib-depends":["libxml2","zlib"],"ext-depends-windows":["xml"]},fe={type:"external",source:"ext-ds"},ze={support:{Windows:"wip",BSD:"wip",Darwin:"wip",Linux:"wip"},type:"wip"},Se={support:{Windows:"wip",BSD:"wip"},notes:!0,type:"external",source:"ext-event","arg-type":"custom","lib-depends":["libevent"],"ext-depends":["openssl"],"ext-suggests":["sockets"]},De={type:"builtin"},Be={support:{Linux:"no",BSD:"wip"},notes:!0,"arg-type":"custom",type:"builtin","lib-depends-unix":["libffi"],"lib-depends-windows":["libffi-win"]},ke={type:"builtin"},qe={type:"builtin"},Ee={type:"builtin","lib-suggests":["openssl"]},We={support:{BSD:"wip"},notes:!0,type:"builtin","arg-type":"custom","arg-type-windows":"with","lib-depends":["zlib","libpng"],"ext-depends":["zlib"],"lib-suggests":["libavif","libwebp","libjpeg","freetype"]},Ce={support:{Windows:"wip",BSD:"wip"},type:"builtin","arg-type":"with-prefix","lib-depends":["gettext"]},Ie={support:{Windows:"wip",BSD:"no",Linux:"no"},notes:!0,type:"external","arg-type":"custom",source:"ext-glfw","lib-depends":["glfw"],"lib-depends-windows":[]},Pe={support:{Windows:"wip",BSD:"wip"},type:"builtin","arg-type":"with-prefix","lib-depends":["gmp"]},Le={support:{BSD:"wip"},type:"builtin","arg-type":"with-prefix","arg-type-windows":"with","lib-depends-unix":["libiconv"],"lib-depends-windows":["libiconv-win"]},Ue={support:{BSD:"wip"},type:"external",source:"igbinary","ext-suggests":["session","apcu"]},_e={support:{Windows:"wip",BSD:"wip"},type:"external",source:"ext-imagick","arg-type":"custom","lib-depends":["imagemagick"]},Ne={support:{Windows:"wip",BSD:"wip"},notes:!0,type:"builtin","arg-type":"custom","lib-depends":["imap"],"ext-suggests":["openssl"]},Oe={support:{Windows:"no",BSD:"wip",Darwin:"no"},type:"external",source:"inotify"},Ve={support:{Windows:"no",BSD:"wip"},type:"builtin","lib-depends":["icu"]},Ae={support:{Windows:"wip",BSD:"wip"},type:"builtin","arg-type":"with-prefix","lib-depends":["ldap"],"lib-suggests":["gmp","libsodium"],"ext-suggests":["openssl"]},Te={support:{BSD:"wip"},type:"builtin","arg-type":"none","ext-depends":["xml"]},je={type:"builtin","arg-type":"custom","ext-depends":["mbstring"],"lib-depends":["onig"]},$e={type:"builtin","arg-type":"custom"},Ge={type:"wip",support:{Windows:"no",BSD:"no",Darwin:"no",Linux:"no"},notes:!0},Xe={support:{Windows:"wip",BSD:"wip"},type:"external",source:"ext-memcache","arg-type":"custom","lib-depends":["zlib"],"ext-depends":["session"]},Me={support:{Windows:"wip",BSD:"wip",Linux:"no"},type:"external",source:"memcached","arg-type":"custom","cpp-extension":!0,"lib-depends":["libmemcached"],"ext-depends":["session","zlib"]},Re={support:{BSD:"wip",Windows:"wip"},type:"external",source:"mongodb","arg-type":"custom","lib-suggests":["icu","openssl","zstd","zlib"]},He={support:{BSD:"wip"},type:"external",source:"msgpack","arg-type-unix":"with","arg-type-win":"enable"},Fe={type:"builtin","arg-type":"with","ext-depends":["mysqlnd"]},Ze={type:"builtin","arg-type-windows":"with","lib-depends":["zlib"]},Qe={type:"wip",support:{Windows:"wip",BSD:"no",Darwin:"no",Linux:"no"},notes:!0},Ke={type:"builtin","arg-type-unix":"custom"},Ye={notes:!0,type:"builtin","arg-type":"custom","arg-type-windows":"with","lib-depends":["openssl","zlib"],"ext-depends":["zlib"]},Je={support:{BSD:"wip"},notes:!0,type:"external",source:"parallel","arg-type-windows":"with","lib-depends-windows":["pthreads4w"]},ei={support:{Windows:"no"},type:"builtin","unix-only":!0},ii={type:"builtin"},si={type:"builtin","arg-type":"with","ext-depends":["pdo","mysqlnd"]},li={support:{Windows:"wip",BSD:"wip"},type:"builtin","arg-type":"with-prefix","ext-depends":["pdo","pgsql"],"lib-depends":["postgresql"]},ti={support:{BSD:"wip"},type:"builtin","arg-type":"with","ext-depends":["pdo","sqlite3"],"lib-depends":["sqlite"]},ni={support:{BSD:"wip"},type:"external",source:"pdo_sqlsrv","arg-type":"with","ext-depends":["pdo","sqlsrv"]},oi={support:{Windows:"wip",BSD:"wip"},notes:!0,type:"builtin","arg-type":"with-prefix","lib-depends":["postgresql"]},ai={type:"builtin","ext-depends":["zlib"]},di={support:{Windows:"no"},type:"builtin","unix-only":!0},ui={support:{Windows:"wip",BSD:"wip"},type:"external",source:"protobuf"},pi={support:{BSD:"wip",Darwin:"partial"},notes:!0,type:"external",source:"rar","cpp-extension":!0},ci={support:{Windows:"wip",BSD:"wip"},type:"builtin","arg-type":"with-prefix","lib-depends":["readline"]},ri={support:{BSD:"wip"},type:"external",source:"redis","arg-type":"custom","ext-suggests":["session","igbinary"],"lib-suggests-unix":["zstd","liblz4"]},bi={type:"builtin"},wi={type:"builtin"},gi={type:"external",source:"ext-simdjson","cpp-extension":!0},xi={support:{BSD:"wip"},type:"builtin","arg-type":"custom","lib-depends":["libxml2"],"ext-depends-windows":["xml"]},mi={support:{Windows:"wip",BSD:"wip"},type:"external",source:"ext-snappy","cpp-extension":!0,"arg-type":"custom","lib-depends":["snappy"],"ext-suggests":["apcu"]},yi={support:{BSD:"wip"},type:"builtin","arg-type":"custom","lib-depends":["libxml2"],"ext-depends-windows":["xml"]},hi={type:"builtin"},vi={support:{Windows:"wip",BSD:"wip"},type:"builtin","arg-type":"with","lib-depends":["libsodium"]},fi={support:{BSD:"wip",Windows:"no"},notes:!0,type:"external",source:"spx","arg-type":"custom","lib-depends":["zlib"]},zi={support:{BSD:"wip"},type:"builtin","arg-type":"with-prefix","arg-type-windows":"with","lib-depends":["sqlite"]},Si={support:{BSD:"wip"},type:"external",source:"sqlsrv","lib-depends-unix":["unixodbc"],"ext-depends-linux":["pcntl"],"cpp-extension":!0},Di={support:{BSD:"wip"},type:"external",source:"ext-ssh2","arg-type":"with-prefix","arg-type-windows":"with","lib-depends":["libssh2"],"ext-depends-windows":["openssl","zlib"]},Bi={support:{Windows:"no",BSD:"wip"},notes:!0,type:"external",source:"swoole","arg-type":"custom","cpp-extension":!0,"unix-only":!0,"lib-depends":["libcares","brotli","nghttp2","zlib"],"ext-depends":["openssl","curl"],"ext-suggests":["swoole-hook-pgsql","swoole-hook-mysql","swoole-hook-sqlite"]},ki={support:{BSD:"wip"},notes:!0,type:"external",source:"swow","arg-type":"custom","lib-suggests":["openssl","curl"],"ext-suggests":["openssl","curl"]},qi={support:{Windows:"no",BSD:"wip"},type:"builtin","unix-only":!0},Ei={support:{Windows:"no",BSD:"wip"},type:"builtin","unix-only":!0},Wi={support:{BSD:"wip"},type:"builtin"},Ci={support:{Windows:"wip",BSD:"wip"},type:"builtin","arg-type":"with-prefix","lib-depends":["tidy"]},Ii={type:"builtin"},Pi={support:{Windows:"wip",BSD:"wip"},type:"external",source:"ext-uuid","arg-type":"with-prefix","lib-depends":["libuuid"]},Li={support:{Windows:"wip",BSD:"wip"},type:"external",source:"ext-uv","arg-type":"with-prefix","lib-depends":["libuv"],"ext-depends":["sockets"]},Ui={type:"builtin",support:{Windows:"wip",BSD:"no",Darwin:"no",Linux:"no"},notes:!0},_i={support:{Windows:"wip",BSD:"wip"},notes:!0,type:"external",source:"xhprof","ext-depends":["ctype"]},Ni={support:{Windows:"wip",BSD:"wip"},type:"external",source:"xlswriter","arg-type":"custom","ext-depends":["zlib","zip"],"lib-suggests":["openssl"]},Oi={support:{BSD:"wip"},notes:!0,type:"builtin","arg-type":"custom","arg-type-windows":"with","lib-depends":["libxml2"],"ext-depends-windows":["iconv"]},Vi={support:{BSD:"wip"},type:"builtin","arg-type":"custom","lib-depends":["libxml2"],"ext-depends-windows":["xml","dom"]},Ai={support:{BSD:"wip"},type:"builtin","arg-type":"custom","lib-depends":["libxml2"],"ext-depends-windows":["xml"]},Ti={support:{Windows:"wip",BSD:"wip"},type:"builtin","arg-type":"with-prefix","lib-depends":["libxslt"],"ext-depends":["xml","dom"]},ji={support:{BSD:"wip"},type:"external",source:"yac","arg-type-unix":"custom","ext-depends-unix":["igbinary"]},$i={support:{BSD:"wip"},type:"external",source:"yaml","arg-type-unix":"with-prefix","arg-type-windows":"with","lib-depends":["libyaml"]},Gi={support:{BSD:"wip"},type:"builtin","arg-type":"with-prefix","arg-type-windows":"enable","lib-depends-unix":["libzip"],"ext-depends-windows":["zlib","bz2"],"lib-depends-windows":["libzip","zlib","bzip2","xz"]},Xi={type:"builtin","arg-type":"custom","arg-type-windows":"enable","lib-depends":["zlib"]},Mi={support:{Windows:"wip",BSD:"wip"},type:"external",source:"ext-zstd","arg-type":"custom","lib-depends":["zstd"]},Ri={amqp:re,apcu:be,bcmath:we,bz2:ge,calendar:xe,ctype:me,curl:ye,dba:he,dom:ve,ds:fe,enchant:ze,event:Se,exif:De,ffi:Be,fileinfo:ke,filter:qe,ftp:Ee,gd:We,gettext:Ce,glfw:Ie,gmp:Pe,iconv:Le,igbinary:Ue,imagick:_e,imap:Ne,inotify:Oe,intl:Ve,ldap:Ae,libxml:Te,mbregex:je,mbstring:$e,mcrypt:Ge,memcache:Xe,memcached:Me,mongodb:Re,msgpack:He,mysqli:Fe,mysqlnd:Ze,oci8:Qe,opcache:Ke,openssl:Ye,parallel:Je,"password-argon2":{support:{Windows:"wip",BSD:"wip"},notes:!0,type:"builtin","arg-type":"with-prefix","lib-depends":["libargon2"]},pcntl:ei,pdo:ii,pdo_mysql:si,pdo_pgsql:li,pdo_sqlite:ti,pdo_sqlsrv:ni,pgsql:oi,phar:ai,posix:di,protobuf:ui,rar:pi,readline:ci,redis:ri,session:bi,shmop:wi,simdjson:gi,simplexml:xi,snappy:mi,soap:yi,sockets:hi,sodium:vi,spx:fi,sqlite3:zi,sqlsrv:Si,ssh2:Di,swoole:Bi,"swoole-hook-mysql":{support:{Windows:"no",BSD:"wip"},notes:!0,type:"addon","arg-type":"custom","ext-depends":["mysqlnd","pdo","pdo_mysql"],"ext-suggests":["mysqli"]},"swoole-hook-pgsql":{support:{Windows:"no",BSD:"wip",Darwin:"partial"},notes:!0,type:"addon","arg-type":"custom","ext-depends":["pgsql","pdo"]},"swoole-hook-sqlite":{support:{Windows:"no",BSD:"wip"},notes:!0,type:"addon","arg-type":"custom","ext-depends":["sqlite3","pdo"]},swow:ki,sysvmsg:qi,sysvsem:Ei,sysvshm:Wi,tidy:Ci,tokenizer:Ii,uuid:Pi,uv:Li,xdebug:Ui,xhprof:_i,xlswriter:Ni,xml:Oi,xmlreader:Vi,xmlwriter:Ai,xsl:Ti,yac:ji,yaml:$i,zip:Gi,zlib:Xi,zstd:Mi},Hi={source:"brotli","static-libs-unix":["libbrotlidec.a","libbrotlienc.a","libbrotlicommon.a"],"static-libs-windows":["brotlicommon.lib","brotlienc.lib","brotlidec.lib"],headers:["brotli"]},Fi={source:"bzip2","static-libs-unix":["libbz2.a"],"static-libs-windows":["libbz2.lib","libbz2_a.lib"],headers:["bzlib.h"]},Zi={source:"curl","static-libs-unix":["libcurl.a"],"static-libs-windows":["libcurl_a.lib"],headers:["curl"],"lib-depends-unix":["openssl","zlib"],"lib-depends-windows":["openssl","zlib","libssh2","nghttp2"],"lib-suggests-unix":["libssh2","brotli","nghttp2","zstd","libcares"],"lib-suggests-windows":["brotli","zstd"],frameworks:["CoreFoundation","CoreServices","SystemConfiguration"]},Qi={source:"freetype","static-libs-unix":["libfreetype.a"],"static-libs-windows":["libfreetype_a.lib"],"headers-unix":["freetype2/freetype/freetype.h","freetype2/ft2build.h"],"lib-depends":["zlib"],"lib-suggests":["libpng","bzip2","brotli"]},Ki={source:"gettext","static-libs-unix":["libintl.a"],"lib-depends":["libiconv"],"lib-suggests":["ncurses","libxml2"],frameworks:["CoreFoundation"]},Yi={source:"ext-glfw","static-libs-unix":["libglfw3.a"],frameworks:["CoreVideo","OpenGL","Cocoa","IOKit"]},Ji={source:"gmp","static-libs-unix":["libgmp.a"],"static-libs-windows":["libgmp.lib"],headers:["gmp.h"]},es={source:"icu","cpp-library":!0,"static-libs-unix":["libicui18n.a","libicuio.a","libicuuc.a","libicudata.a"]},is={source:"imagemagick","static-libs-unix":["libMagick++-7.Q16HDRI.a","libMagickWand-7.Q16HDRI.a","libMagickCore-7.Q16HDRI.a"],"lib-depends":["zlib","libpng","libjpeg","libwebp","freetype","libtiff"],"lib-suggests":["zstd","xz","bzip2","libzip","libxml2"]},ss={source:"imap","static-libs-unix":["libc-client.a"],"lib-suggests":["openssl"]},ls={source:"ldap","static-libs-unix":["liblber.a","libldap.a"],"lib-depends":["openssl","zlib","gmp","libsodium"]},ts={source:"libargon2","static-libs-unix":["libargon2.a"]},ns={source:"libavif","static-libs-unix":["libavif.a"],"static-libs-windows":["avif.lib"]},os={source:"libcares","static-libs-unix":["libcares.a"],"headers-unix":["ares.h","ares_dns.h","ares_nameser.h","ares_rules.h"]},as={source:"libevent","static-libs-unix":["libevent.a","libevent_core.a","libevent_extra.a","libevent_openssl.a"],"lib-depends":["openssl"]},ds={source:"libffi","static-libs-unix":["libffi.a"],"static-libs-windows":["libffi.lib"],"headers-unix":["ffi.h","ffitarget.h"],"headers-windows":["ffi.h","fficonfig.h","ffitarget.h"]},us={source:"libiconv","static-libs-unix":["libiconv.a","libcharset.a"],headers:["iconv.h","libcharset.h","localcharset.h"]},ps={source:"libjpeg","static-libs-unix":["libjpeg.a","libturbojpeg.a"],"static-libs-windows":["libjpeg_a.lib"],"lib-suggests-windows":["zlib"]},cs={source:"liblz4","static-libs-unix":["liblz4.a"]},rs={source:"libmemcached","static-libs-unix":["libmemcached.a","libmemcachedutil.a"]},bs={source:"libpng","static-libs-unix":["libpng16.a"],"static-libs-windows":["libpng16_static.lib","libpng_a.lib"],"headers-unix":["png.h","pngconf.h","pnglibconf.h"],"headers-windows":["png.h","pngconf.h"],"lib-depends":["zlib"]},ws={source:"librabbitmq","static-libs-unix":["librabbitmq.a"],"static-libs-windows":["rabbitmq.4.lib"],"lib-depends":["openssl"]},gs={source:"libsodium","static-libs-unix":["libsodium.a"]},xs={source:"libssh2","static-libs-unix":["libssh2.a"],"static-libs-windows":["libssh2.lib"],headers:["libssh2.h","libssh2_publickey.h","libssh2_sftp.h"],"lib-depends":["openssl"],"lib-suggests":["zlib"]},ms={source:"libtiff","static-libs-unix":["libtiff.a"]},ys={source:"libuuid","static-libs-unix":["libuuid.a"],headers:["uuid/uuid.h"]},hs={source:"libuv","static-libs-unix":["libuv.a"]},vs={source:"libwebp","static-libs-unix":["libwebp.a","libwebpdecoder.a","libwebpdemux.a","libwebpmux.a","libsharpyuv.a"],"static-libs-windows":["libwebp.lib","libwebpdecoder.lib","libwebpdemux.lib","libsharpyuv.lib"]},fs={source:"libxml2","static-libs-unix":["libxml2.a"],"static-libs-windows":["libxml2s.lib","libxml2_a.lib"],headers:["libxml2"],"lib-depends-unix":["libiconv"],"lib-suggests-unix":["xz","icu","zlib"],"lib-depends-windows":["libiconv-win"],"lib-suggests-windows":["zlib"]},zs={source:"libxslt","static-libs-unix":["libxslt.a","libexslt.a"],"lib-depends":["libxml2"]},Ss={source:"libyaml","static-libs-unix":["libyaml.a"],"static-libs-windows":["yaml.lib"],headers:["yaml.h"]},Ds={source:"libzip","static-libs-unix":["libzip.a"],"static-libs-windows":["zip.lib","libzip_a.lib"],headers:["zip.h","zipconf.h"],"lib-depends-unix":["zlib"],"lib-suggests-unix":["bzip2","xz","zstd","openssl"],"lib-depends-windows":["zlib","bzip2","xz"],"lib-suggests-windows":["zstd","openssl"]},Bs={source:"ncurses","static-libs-unix":["libncurses.a"]},ks={source:"nghttp2","static-libs-unix":["libnghttp2.a"],"static-libs-windows":["nghttp2.lib"],headers:["nghttp2"],"lib-depends":["zlib","openssl"],"lib-suggests":["libxml2"]},qs={source:"onig","static-libs-unix":["libonig.a"],"static-libs-windows":["onig.lib","onig_a.lib"],headers:["oniggnu.h","oniguruma.h"]},Es={source:"openssl","static-libs-unix":["libssl.a","libcrypto.a"],"static-libs-windows":["libssl.lib","libcrypto.lib"],headers:["openssl"],"lib-depends":["zlib"]},Ws={source:"postgresql","static-libs-unix":["libpq.a","libpgport.a","libpgcommon.a"],"lib-depends":["libiconv","libxml2","openssl","zlib","readline"],"lib-suggests":["icu","libxslt","ldap","zstd"]},Cs={source:"pthreads4w","static-libs-windows":["libpthreadVC3.lib"]},Is={source:"qdbm","static-libs-unix":["libqdbm.a"],"static-libs-windows":["qdbm_a.lib"],"headers-windows":["depot.h"]},Ps={source:"readline","static-libs-unix":["libreadline.a"],"lib-depends":["ncurses"]},Ls={source:"snappy","static-libs-unix":["libsnappy.a"],"headers-unix":["snappy.h","snappy-c.h","snappy-sinksource.h","snappy-stubs-public.h"],"lib-depends":["zlib"]},Us={source:"sqlite","static-libs-unix":["libsqlite3.a"],"static-libs-windows":["libsqlite3_a.lib"],headers:["sqlite3.h","sqlite3ext.h"]},_s={source:"tidy","static-libs-unix":["libtidy.a"]},Ns={source:"unixodbc","static-libs-unix":["libodbc.a","libodbccr.a","libodbcinst.a"],"lib-depends":["libiconv"]},Os={source:"xz","static-libs-unix":["liblzma.a"],"static-libs-windows":["liblzma.lib","liblzma_a.lib"],"headers-unix":["lzma"],"headers-windows":["lzma","lzma.h"],"lib-depends-unix":["libiconv"]},Vs={source:"zlib","static-libs-unix":["libz.a"],"static-libs-windows":["zlib_a.lib"],headers:["zlib.h","zconf.h"]},As={source:"zstd","static-libs-unix":["libzstd.a"],"static-libs-windows":[["zstd.lib","zstd_static.lib"]],"headers-unix":["zdict.h","zstd.h","zstd_errors.h"],"headers-windows":["zstd.h","zstd_errors.h"]},Ts={brotli:Hi,bzip2:Fi,curl:Zi,freetype:Qi,gettext:Ki,glfw:Yi,gmp:Ji,icu:es,imagemagick:is,imap:ss,ldap:ls,libargon2:ts,libavif:ns,libcares:os,libevent:as,libffi:ds,"libffi-win":{source:"libffi-win","static-libs-windows":["libffi.lib"],"headers-windows":["ffi.h","ffitarget.h","fficonfig.h"]},libiconv:us,"libiconv-win":{source:"libiconv-win","static-libs-windows":["libiconv.lib","libiconv_a.lib"]},libjpeg:ps,liblz4:cs,libmemcached:rs,libpng:bs,librabbitmq:ws,libsodium:gs,libssh2:xs,libtiff:ms,libuuid:ys,libuv:hs,libwebp:vs,libxml2:fs,libxslt:zs,libyaml:Ss,libzip:Ds,ncurses:Bs,nghttp2:ks,onig:qs,openssl:Es,"pkg-config":{source:"pkg-config"},postgresql:Ws,pthreads4w:Cs,qdbm:Is,readline:Ps,snappy:Ls,sqlite:Us,tidy:_s,unixodbc:Ns,xz:Os,zlib:Vs,zstd:As};function C(i,s,o,u){return i.os==="linux"?i[s][o][u+"-linux"]??i[s][o][u+"-unix"]??i[s][o][u]??[]:i.os==="macos"?i[s][o][u+"-macos"]??i[s][o][u+"-unix"]??i[s][o][u]??[]:i.os==="windows"?i[s][o][u+"-windows"]??i[s][o][u]??[]:[]}function Z(i,s){return C(i,"ext",s,"ext-depends")}function js(i,s){return C(i,"ext",s,"ext-suggests")}function $s(i,s){return C(i,"ext",s,"lib-depends")}function Gs(i,s){return C(i,"ext",s,"lib-suggests")}function Q(i,s){return C(i,"lib",s,"lib-depends")}function Xs(i,s){return C(i,"lib",s,"lib-suggests")}function Ms(i,s){const o=[],u=new Set,y=[];s.forEach(S=>{u.has(S)||Fs(i,S,u,o)});const z=[];return o.forEach(S=>{s.indexOf(S)===-1&&y.push(S),[...$s(i,S),...Gs(i,S)].forEach(O=>{z.indexOf(O)===-1&&z.push(O)})}),{exts:o,libs:Rs(i,z),notIncludedExts:y}}function Rs(i,s){const o=[],u=new Set;return s.forEach(y=>{u.has(y)||(console.log("before visited"),console.log(u),Hs(i,y,u,o),console.log("after visited"),console.log(u))}),o}function Hs(i,s,o,u){if(o.has(s))return;o.add(s),[...Q(i,s),...Xs(i,s)].forEach(z=>{K(i,z,o,u)}),u.push(s)}function K(i,s,o,u){o.has(s)||(o.add(s),Q(i,s).forEach(y=>{K(i,y,o,u)}),u.push(s))}function Y(i,s,o,u){o.has(o)||(o.add(s),Z(i,s).forEach(y=>{Y(i,y,o,u)}),u.push(s))}function Fs(i,s,o,u){if(o.has(s))return;o.add(s),[...Z(i,s),...js(i,s)].forEach(z=>{Y(i,z,o,u)}),u.push(s)}const N=i=>(ue("data-v-c44ab356"),i=i(),pe(),i),Zs={class:"option-line"},Qs=["id","value","disabled"],Ks=["for"],Ys={class:"box"},Js={class:"ext-item"},el={key:0},il=["id","value","disabled"],sl=["for"],ll={class:"details custom-block"},tl={class:"box"},nl={class:"ext-item"},ol=["id","value","disabled"],al=["for"],dl={class:"tip custom-block"},ul=N(()=>e("p",{class:"custom-block-title"},"TIP",-1)),pl={class:"box"},cl={class:"ext-item"},rl=["id","value"],bl=["for"],wl={key:1,class:"warning custom-block"},gl=N(()=>e("p",{class:"custom-block-title"},"WARNING",-1)),xl={key:2,class:"warning custom-block"},ml=N(()=>e("p",{class:"custom-block-title"},"WARNING",-1)),yl={value:"native"},hl={value:"spc"},vl={key:0,value:"docker"},fl=["value"],zl={for:"debug-yes"},Sl={for:"debug-no"},Dl={for:"zts-yes"},Bl={for:"zts-no"},kl={for:"show-download-yes"},ql={for:"show-download-no"},El={for:"pre-built-yes"},Wl={for:"pre-built-no"},Cl={key:0},Il={for:"upx-yes"},Pl={for:"upx-no"},Ll=["placeholder"],Ul={key:3,class:"command-container"},_l={key:0,class:"command-preview"},Nl=N(()=>e("br",null,null,-1)),Ol={key:1},Vl={class:"warning custom-block"},Al=N(()=>e("p",{class:"custom-block-title"},"WARNING",-1)),Tl={key:4,class:"command-container"},jl={class:"command-preview"},$l={key:5,class:"command-container"},Gl={class:"command-preview"},Xl={key:6,class:"command-container"},Ml={class:"command-preview"},Rl={class:"command-container"},Hl={class:"command-preview"},Fl={name:"CliGenerator"},Zl=oe({...Fl,props:{lang:{type:String,default:"zh"}},setup(i){const s=g(Ri),o=g(Ts),u=g([]),y=[{os:"linux",label:"Linux",disabled:!1},{os:"macos",label:"macOS",disabled:!1},{os:"windows",label:"Windows",disabled:!1}],z=(x,n)=>{var r,k;const p=new Map([["linux","Linux"],["macos","Darwin"],["windows","Windows"]]).get(n),d=((k=(r=s.value[x])==null?void 0:r.support)==null?void 0:k[p])??"yes";return d==="yes"||d==="partial"},S=["7.4","8.0","8.1","8.2","8.3"],a={zh:{selectExt:"选择扩展",buildTarget:"选择编译目标",buildOptions:"编译选项",buildEnvironment:"编译环境",buildEnvNative:"本地构建Git 源码)",buildEnvSpc:"本地构建(独立 spc 二进制)",buildEnvDocker:"Alpine Docker 构建",useDebug:"是否开启调试输出",yes:"是",no:"否",resultShow:"结果展示",selectCommon:"选择常用扩展",selectNone:"全部取消选择",useZTS:"是否编译线程安全版",hardcodedINI:"硬编码 INI 选项",hardcodedINIPlacehoder:"如需要硬编码 ini每行写一个例如memory_limit=2G",resultShowDownload:"是否展示仅下载对应扩展依赖的命令",downloadExtOnlyCommand:"只下载对应扩展的依赖包命令",downloadAllCommand:"下载所有依赖包命令",downloadUPXCommand:"下载 UPX 命令",compileCommand:"编译命令",downloadPhpVersion:"下载 PHP 版本",downloadSPCBinaryCommand:"下载 spc 二进制命令",selectedArch:"选择系统架构",selectedSystem:"选择操作系统",buildLibs:"要构建的库",depTips:"选择扩展后,不可选中的项目为必需的依赖,编译的依赖库列表中可选的为现有扩展和依赖库的可选依赖。选择可选依赖后,将生成 --with-libs 参数。",microUnavailable:"micro 不支持 PHP 7.4 及更早版本!",windowsSAPIUnavailable:"Windows 目前不支持 fpm、embed 构建!",useUPX:"是否开启 UPX 压缩(减小二进制体积)",windowsDownSPCWarning:"Windows 下请手动下载 spc.exe 二进制文件并解压到当前目录!",usePreBuilt:"如果可能,下载预编译的依赖库(减少编译时间)"},en:{selectExt:"Select Extensions",buildTarget:"Build Target",buildOptions:"Build Options",buildEnvironment:"Build Environment",buildEnvNative:"Native build (Git source code)",buildEnvSpc:"Native build (standalone spc binary)",buildEnvDocker:"Alpine docker build",useDebug:"Enable debug message",yes:"Yes",no:"No",resultShow:"Result",selectCommon:"Select common extensions",selectNone:"Unselect all",useZTS:"Enable ZTS",hardcodedINI:"Hardcoded INI options",hardcodedINIPlacehoder:"If you need to hardcode ini, write one per line, for example: memory_limit=2G",resultShowDownload:"Download with corresponding extension dependencies",downloadExtOnlyCommand:"Download sources by extensions command",downloadAllCommand:"Download all sources command",downloadUPXCommand:"Download UPX command",compileCommand:"Compile command",downloadPhpVersion:"Download PHP version",downloadSPCBinaryCommand:"Download spc binary command",selectedArch:"Select build architecture",selectedSystem:"Select Build OS",buildLibs:"Select Dependencies",depTips:"After selecting the extensions, the unselectable items are essential dependencies. In the compiled dependencies list, optional dependencies consist of existing extensions and optional dependencies of libraries. Optional dependencies will be added in --with-libs parameter.",microUnavailable:"Micro does not support PHP 7.4 and earlier versions!",windowsSAPIUnavailable:"Windows does not support fpm and embed build!",useUPX:"Enable UPX compression (reduce binary size)",windowsDownSPCWarning:"Please download the spc.exe binary file manually and extract it to the current directory on Windows!",usePreBuilt:"Download pre-built dependencies if possible (reduce compile time)"}},O=["cli","fpm","micro","embed","all"],J=()=>{h.value=["apcu","bcmath","calendar","ctype","curl","dba","dom","exif","filter","fileinfo","gd","iconv","intl","mbstring","mbregex","mysqli","mysqlnd","openssl","opcache","pcntl","pdo","pdo_mysql","pdo_sqlite","pdo_pgsql","pgsql","phar","posix","readline","redis","session","simplexml","sockets","sodium","sqlite3","tokenizer","xml","xmlreader","xmlwriter","xsl","zip","zlib"]},R=j(()=>h.value.join(",")),ee=j(()=>{const x=D.value.filter(n=>V.value.indexOf(n)===-1);return x.length>0?' --with-libs="'+x.join(",")+'"':""}),h=g([]),D=g([]),$=g([]),V=g([]),v=g(["cli"]),A=g("native"),I=g("8.2"),B=g(0),P=g(0),L=g(1),W=g(1),E=g(0),G=g(""),c=g("linux"),ie=g("x86_64"),T=j(()=>{switch(A.value){case"native":return"bin/spc";case"spc":return c.value==="windows"?".\\spc.exe":"./spc";case"docker":return"bin/spc-alpine-docker";default:return""}}),H=g("--build-cli"),se=j(()=>{const x=G.value.split(`
`);let n=[];return x.forEach(t=>{t.indexOf("=")>=1&&n.push(t)})," "+n.map(t=>'-I "'+t+'"').join(" ")}),le=x=>{let n;v.value.indexOf("all")!==-1&&x.target.value==="all"?v.value=["all"]:(n=v.value.indexOf("all"))!==-1&&x.target.value!=="all"&&v.value.splice(n,1),H.value=v.value.map(t=>"--build-"+t).join(" ")},te=x=>{const n=new Set,t=p=>{let d=[];if(c.value==="linux"){if(d=s.value[p]["ext-depends-linux"]??s.value[p]["ext-depends-unix"]??s.value[p]["ext-depends"]??[],d.length===0)return}else if(c.value==="macos"){if(d=s.value[p]["ext-depends-macos"]??s.value[p]["ext-depends-unix"]??s.value[p]["ext-depends"]??[],d.length===0)return}else if(c.value==="windows"&&(d=s.value[p]["ext-depends-windows"]??s.value[p]["ext-depends"]??[],d.length===0))return;d.forEach(r=>{n.add(r),t(r)})};return x.forEach(p=>{t(p)}),Array.from(n)},ne=x=>{const n=new Set,t=d=>{let r=[];if(c.value==="linux"){if(r=o.value[d]["lib-depends-linux"]??o.value[d]["lib-depends-unix"]??o.value[d]["lib-depends"]??[],r.length===0)return}else if(c.value==="macos"){if(r=o.value[d]["lib-depends-macos"]??o.value[d]["lib-depends-unix"]??o.value[d]["lib-depends"]??[],r.length===0)return}else if(c.value==="windows"&&(r=o.value[d]["lib-depends-windows"]??o.value[d]["lib-depends"]??[],r.length===0))return;r.forEach(k=>{n.add(k),t(k)})},p=d=>{let r=[];if(c.value==="linux"){if(r=s.value[d]["lib-depends-linux"]??s.value[d]["lib-depends-unix"]??s.value[d]["lib-depends"]??[],r.length===0)return}else if(c.value==="macos"){if(r=s.value[d]["lib-depends-macos"]??s.value[d]["lib-depends-unix"]??s.value[d]["lib-depends"]??[],r.length===0)return}else if(c.value==="windows"&&(r=s.value[d]["lib-depends-windows"]??s.value[d]["lib-depends"]??[],r.length===0))return;r.forEach(k=>{n.add(k),t(k)})};return x.forEach(d=>{p(d)}),Array.from(n)};return X(c,()=>h.value=[]),X(c,()=>E.value=0),X(h,x=>{$.value=te(x),$.value.forEach(t=>{h.value.indexOf(t)===-1&&h.value.push(t)}),h.value.sort(),console.log("检测到变化!"),console.log(x);const n=Ms({ext:s.value,lib:o.value,os:c.value},h.value);u.value=n.libs.sort(),D.value=[],V.value=ne(n.exts),V.value.forEach(t=>{D.value.indexOf(t)===-1&&D.value.push(t)})}),(x,n)=>(b(),w("div",null,[e("h2",null,l(a[i.lang].selectedSystem),1),e("div",Zs,[(b(),w(U,null,_(y,(t,p)=>e("span",{key:p,style:{"margin-right":"4px"}},[m(e("input",{type:"radio",id:"os-"+t.os,value:t.os,disabled:t.disabled===!0,"onUpdate:modelValue":n[0]||(n[0]=d=>c.value=d)},null,8,Qs),[[f,c.value]]),e("label",{for:"os-"+t.os},l(t.label),9,Ks)])),64))]),e("h2",null,l(a[i.lang].selectExt)+l(h.value.length>0?" ("+h.value.length+")":""),1),e("div",Ys,[(b(!0),w(U,null,_(s.value,(t,p)=>(b(),w("div",Js,[z(p,c.value)?(b(),w("span",el,[m(e("input",{type:"checkbox",id:p,value:p,"onUpdate:modelValue":n[1]||(n[1]=d=>h.value=d),disabled:$.value.indexOf(p)!==-1},null,8,il),[[M,h.value]]),e("label",{for:p},l(p),9,sl)])):q("",!0)]))),256))]),c.value!=="windows"?(b(),w("div",{key:0,class:"my-btn",onClick:J},l(a[i.lang].selectCommon),1)):q("",!0),e("div",{class:"my-btn",onClick:n[2]||(n[2]=t=>h.value=[])},l(a[i.lang].selectNone),1),e("details",ll,[e("summary",null,l(a[i.lang].buildLibs)+l(D.value.length>0?" ("+D.value.length+")":""),1),e("div",tl,[(b(!0),w(U,null,_(u.value,(t,p)=>(b(),w("div",nl,[m(e("input",{type:"checkbox",id:p,value:t,"onUpdate:modelValue":n[3]||(n[3]=d=>D.value=d),disabled:V.value.indexOf(t)!==-1},null,8,ol),[[M,D.value]]),e("label",{for:p},l(t),9,al)]))),256))])]),e("div",dl,[ul,e("p",null,l(a[i.lang].depTips),1)]),e("h2",null,l(a[i.lang].buildTarget),1),e("div",pl,[(b(),w(U,null,_(O,t=>e("div",cl,[m(e("input",{type:"checkbox",id:"build_"+t,value:t,"onUpdate:modelValue":n[4]||(n[4]=p=>v.value=p),onChange:le},null,40,rl),[[M,v.value]]),e("label",{for:"build_"+t},l(t),9,bl)])),64))]),I.value==="7.4"&&(v.value.indexOf("micro")!==-1||v.value.indexOf("all")!==-1)?(b(),w("div",wl,[gl,e("p",null,l(a[i.lang].microUnavailable),1)])):q("",!0),c.value==="windows"&&(v.value.indexOf("fpm")!==-1||v.value.indexOf("embed")!==-1)?(b(),w("div",xl,[ml,e("p",null,l(a[i.lang].windowsSAPIUnavailable),1)])):q("",!0),e("h2",null,l(a[i.lang].buildOptions),1),e("table",null,[e("tr",null,[e("td",null,l(a[i.lang].buildEnvironment),1),e("td",null,[m(e("select",{"onUpdate:modelValue":n[5]||(n[5]=t=>A.value=t)},[e("option",yl,l(a[i.lang].buildEnvNative),1),e("option",hl,l(a[i.lang].buildEnvSpc),1),c.value!=="windows"?(b(),w("option",vl,l(a[i.lang].buildEnvDocker),1)):q("",!0)],512),[[F,A.value]])])]),e("tr",null,[e("td",null,l(a[i.lang].downloadPhpVersion),1),e("td",null,[m(e("select",{"onUpdate:modelValue":n[6]||(n[6]=t=>I.value=t)},[(b(),w(U,null,_(S,t=>e("option",{value:t},l(t),9,fl)),64))],512),[[F,I.value]])])]),e("tr",null,[e("td",null,l(a[i.lang].useDebug),1),e("td",null,[m(e("input",{type:"radio",id:"debug-yes",value:1,"onUpdate:modelValue":n[7]||(n[7]=t=>B.value=t)},null,512),[[f,B.value]]),e("label",zl,l(a[i.lang].yes),1),m(e("input",{type:"radio",id:"debug-no",value:0,"onUpdate:modelValue":n[8]||(n[8]=t=>B.value=t)},null,512),[[f,B.value]]),e("label",Sl,l(a[i.lang].no),1)])]),e("tr",null,[e("td",null,l(a[i.lang].useZTS),1),e("td",null,[m(e("input",{type:"radio",id:"zts-yes",value:1,"onUpdate:modelValue":n[9]||(n[9]=t=>P.value=t)},null,512),[[f,P.value]]),e("label",Dl,l(a[i.lang].yes),1),m(e("input",{type:"radio",id:"zts-no",value:0,"onUpdate:modelValue":n[10]||(n[10]=t=>P.value=t)},null,512),[[f,P.value]]),e("label",Bl,l(a[i.lang].no),1)])]),e("tr",null,[e("td",null,l(a[i.lang].resultShowDownload),1),e("td",null,[m(e("input",{type:"radio",id:"show-download-yes",value:1,"onUpdate:modelValue":n[11]||(n[11]=t=>L.value=t)},null,512),[[f,L.value]]),e("label",kl,l(a[i.lang].yes),1),m(e("input",{type:"radio",id:"show-download-no",value:0,"onUpdate:modelValue":n[12]||(n[12]=t=>L.value=t)},null,512),[[f,L.value]]),e("label",ql,l(a[i.lang].no),1)])]),e("tr",null,[e("td",null,l(a[i.lang].usePreBuilt),1),e("td",null,[m(e("input",{type:"radio",id:"pre-built-yes",value:1,"onUpdate:modelValue":n[13]||(n[13]=t=>W.value=t)},null,512),[[f,W.value]]),e("label",El,l(a[i.lang].yes),1),m(e("input",{type:"radio",id:"pre-built-no",value:0,"onUpdate:modelValue":n[14]||(n[14]=t=>W.value=t)},null,512),[[f,W.value]]),e("label",Wl,l(a[i.lang].no),1)])]),c.value!=="macos"?(b(),w("tr",Cl,[e("td",null,l(a[i.lang].useUPX),1),e("td",null,[m(e("input",{type:"radio",id:"upx-yes",value:1,"onUpdate:modelValue":n[15]||(n[15]=t=>E.value=t)},null,512),[[f,E.value]]),e("label",Il,l(a[i.lang].yes),1),m(e("input",{type:"radio",id:"upx-no",value:0,"onUpdate:modelValue":n[16]||(n[16]=t=>E.value=t)},null,512),[[f,E.value]]),e("label",Pl,l(a[i.lang].no),1)])])):q("",!0)]),e("h2",null,l(a[i.lang].hardcodedINI),1),m(e("textarea",{class:"textarea",placeholder:a[i.lang].hardcodedINIPlacehoder,"onUpdate:modelValue":n[17]||(n[17]=t=>G.value=t),rows:"5"},null,8,Ll),[[ae,G.value]]),e("h2",null,l(a[i.lang].resultShow),1),A.value==="spc"?(b(),w("div",Ul,[e("b",null,l(a[i.lang].downloadSPCBinaryCommand),1),c.value!=="windows"?(b(),w("div",_l,[de(" curl -fsSL -o spc.tgz https://dl.static-php.dev/static-php-cli/spc-bin/nightly/spc-"+l(c.value)+"-"+l(ie.value)+".tar.gz && tar -zxvf spc.tgz && rm spc.tgz",1),Nl])):(b(),w("div",Ol,[e("div",Vl,[Al,e("p",null,l(a[i.lang].windowsDownSPCWarning),1)])]))])):q("",!0),L.value?(b(),w("div",Tl,[e("b",null,l(a[i.lang].downloadExtOnlyCommand),1),e("div",jl,l(T.value)+" download --with-php="+l(I.value)+' --for-extensions "'+l(R.value)+'"'+l(W.value?" --prefer-pre-built":"")+l(B.value?" --debug":""),1)])):(b(),w("div",$l,[e("b",null,l(a[i.lang].downloadAllCommand),1),e("div",Gl,l(T.value)+" download --all --with-php="+l(I.value)+l(W.value?" --prefer-pre-built":"")+l(B.value?" --debug":""),1)])),E.value?(b(),w("div",Xl,[e("b",null,l(a[i.lang].downloadUPXCommand),1),e("div",Ml,l(T.value)+" install-pkg upx"+l(B.value?" --debug":""),1)])):q("",!0),e("div",Rl,[e("b",null,l(a[i.lang].compileCommand),1),e("div",Hl,l(T.value)+" build "+l(H.value)+' "'+l(R.value)+'"'+l(ee.value)+l(B.value?" --debug":"")+l(P.value?" --enable-zts":"")+l(E.value?" --with-upx-pack":"")+l(se.value),1)])]))}}),Kl=ce(Zl,[["__scopeId","data-v-c44ab356"]]);export{Kl as C};