PageSourceSearch

https://www.deepsearchaix.cn/assets/yaml-viewer-c8c0de38.js

js deepsearchaix.cn collected 2026-10-02 16:11:57 UTC 3,055 bytes, 1 lines download raw bytes

1import{am as p,d as A,L,Z as _,b as M,P as h,o as x,f as S,g as y,k as e,w as m,i as t,T as c,F as k,U as P,O as C}from"./index-ed3bd4ad.js";import{A as E,c as D,C as V,D as z,L as T,a as j,P as O,b as U,S as q,d as B,Y as N,e as F,f as I,g as K,h as R,i as W,j as Z,k as G,l as H,m as J,n as Q,o as X,q as $,p as ee,r as ae,t as te,s as se,v as oe,u as le}from"./public-api-1d5b2fbb.js";import{w as ne}from"./defaults-4d6daddf.js";import{T as re}from"./TextareaCopyable-3d7c817b.js";import{_ as ie}from"./Switch-93d91b83.js";import{_ as me}from"./FormItem-0ea6f922.js";import{_ as ue}from"./InputNumber-a9ce15d6.js";import"./Copy-17b6969c.js";import"./Scrollbar-e1fe9b41.js";import"./use-form-item-2b91627f.js";import"./use-locale-29df6070.js";import"./Input-0dd8d7f6.js";import"./Button-15b07cef.js";import"./is-browser-fc34c9a6.js";import"./color-to-class-b0332f36.js";import"./Remove-0b57ed44.js";const f=Object.freeze(Object.defineProperty({__proto__:null,Alias:E,CST:D,Composer:V,Document:z,Lexer:T,LineCounter:j,Pair:O,Parser:U,Scalar:q,Schema:B,YAMLError:N,YAMLMap:F,YAMLParseError:I,YAMLSeq:K,YAMLWarning:R,isAlias:W,isCollection:Z,isDocument:G,isMap:H,isNode:J,isPair:Q,isScalar:X,isSeq:$,parse:ee,parseAllDocuments:ae,parseDocument:te,stringify:se,visit:oe,visitAsync:le},Symbol.toStringTag,{value:"Module"}));function pe({rawYaml:d,sortKeys:r=!1,indentSize:a=2}){const s=f.parse(p(d));return f.stringify(s,{sortMapEntries:p(r),indent:p(a)})}const _e={style:{flex:"0 0 100%"}},ce={style:{margin:"0 auto","max-width":"600px"},flex:"","justify-center":"","gap-3":""},fe=A({__name:"yaml-viewer",setup(d){const r=L(),a=_("yaml-prettify:raw-yaml",""),s=_("yaml-prettify:indent-size",2),l=_("yaml-prettify:sort-keys",!1),g=M(()=>ne(()=>pe({rawYaml:a,indentSize:s,sortKeys:l}),"")),v=h({source:a,rules:[{validator:u=>u===""||f.parse(u),message:"Provided YAML is not valid."}]});return(u,o)=>{const b=ie,i=me,w=ue,Y=P;return x(),S(k,null,[y("div",_e,[y("div",ce,[e(i,{label:"Sort keys :","label-placement":"left","label-width":"100"},{default:m(()=>[e(b,{value:t(l),"onUpdate:value":o[0]||(o[0]=n=>c(l)?l.value=n:null)},null,8,["value"])]),_:1}),e(i,{label:"Indent size :","label-placement":"left","label-width":"100","show-feedback":!1},{default:m(()=>[e(w,{value:t(s),"onUpdate:value":o[1]||(o[1]=n=>c(s)?s.value=n:null),min:"1",max:"10",style:{width:"100px"}},null,8,["value"])]),_:1})])]),e(i,{label:"Your raw YAML",feedback:t(v).message,"validation-status":t(v).status},{default:m(()=>[e(Y,{ref_key:"inputElement",ref:r,value:t(a),"onUpdate:value":o[2]||(o[2]=n=>c(a)?a.value=n:null),placeholder:"Paste your raw YAML here...",rows:"20",multiline:"",autocomplete:"off",autocorrect:"off",autocapitalize:"off",spellcheck:"false",monospace:""},null,8,["value"])]),_:1},8,["feedback","validation-status"]),e(i,{label:"Prettified version of your YAML"},{default:m(()=>[e(re,{value:t(g),language:"yaml","follow-height-of":t(r)},null,8,["value","follow-height-of"])]),_:1})],64)}}});const Ee=C(fe,[["__scopeId","data-v-0baea7b2"]]);export{Ee as default};

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.