1import{b as g}from"./chunk-6YOKE3XR.js";import{a as l,d as m}from"./chunk-2EGFIPKB.js";import{Cg as f,ih as M,sa as u,va as D}from"./chunk-ZIECK5QA.js";var T={YYYY:"yyyy",YY:"yy",Y:"y",yyyy:"yyyy",yy:"yy",y:"y",MMMM:"MMMM",MMM:"MMM",MM:"MM",Mo:"M",M:"M",Qo:"q",Q:"q",DDDD:"ooo",DDDo:"o",DDD:"o",DD:"dd",Do:"d",D:"d",dddd:"cccc",ddd:"ccc",dd:"EEEEE",do:"c",d:"c",e:"c",E:"E",WW:"WW",Wo:"W",W:"W",ww:"WW",wo:"W",w:"W",GGGG:"kkkk",GG:"kk",gggg:"kkkk",gg:"kk",A:"a",a:"a",HH:"HH",H:"H",hh:"hh",h:"h",kk:"HH",k:"H",mm:"mm",m:"m",ss:"ss",s:"s",SSS:"SSS",S:"S",ZZ:"ZZZ",Z:"ZZ",zz:"ZZZZ",z:"z",X:"X",x:"x"},p=new RegExp(`\\[([^\\]]*)\\]|(${Object.keys(T).sort((n,r)=>r.length-n.length).join("|")})|([A-Za-z])`,"g"),d=class{constructor(r){this._timezone=r}fromModel(r){return m.fromJSDate(r,{zone:this._timezone})}toModel(r){return r.toJSDate()}},z=(()=>{let r=class r{constructor(e,t){this.languageService=e,this.dateTimeService=t,this.dateAdapter=new d(this.dateTimeService.getTimezone()),this.dateUTCAdapter=new d("UTC"),this.isoDatePattern="yyyy-MM-ddTHH:mm:ss.SSS",this.datePipe=new M(this.languageService)}parse(e,t){return this.toDateTime(this.datePipe.transform(e,this.dateTimeService.getDatePickerFormat(),this.getTZ(t)))}parseISOWithZone(e){return m.fromISO(e,{setZone:!0})}format(e,t,i=this.dateTimeService.getDatePickerFormat(),s=/\s+a{1,3}$/){if(!e)return"";let o=m.now().setZone(this.getTZ(t)).toFormat("ZZ"),c=s.exec(i);if(c?.length){let h=i.replace(s,""),a=this.datePipe.transform(this.fromDateTime(e),h,o),y=e.setZone(this.getTZ(!0)).toFormat(c[0],{locale:"en"});return`${a}${y}`}return this.datePipe.transform(this.fromDateTime(e),i,o)}formatMoment(e,t){let i=t.replace(p,(s,o,c,h)=>{if(o!==void 0)return`'${o.replace(/'/g,"''")}'`;if(c!==void 0){let a=T[c];return l.defaultLocale?.startsWith("ja")&&(["MMMM","MMM","MM","M"].includes(a)?a+="\u6708":["d","o","ooo","c"].includes(a)&&(a+="\u65E5")),a}return`'${h}'`});return e.toFormat(i)}formatDate(e,t,i=this.dateTimeService.getDatePickerFormat()){return this.datePipe.transform(e,i,this.getTZ(t))}toDateTime(e,t,i){if(!e)return null;let s=typeof e=="string"?new Date(this.dateTimeService.transform(e,this.isoDatePattern)):e;return(i?this.dateAdapter:this.getDateAdapter(t)).fromModel(s)}toDateOnly(e){let t=new Date(this.dateTimeService.transform(e,this.isoDatePattern));return e?m.fromObject({day:t.getDate(),month:t.getMonth()+1,year:t.getFullYear()}):null}fromDateTime(e,t){return e?this.getDateAdapter(t).toModel(e):null}fromDateTimeToDateOnly(e){return e?new Date(e.year,e.month-1,e.day):null}fromDateTimeToDateIgnoreTimeZone(e,t=!1){let i=Date.parse(e.toISODate());return t?m.fromMillis(i,{zone:"utc"}).setZone(this.getTZ(t),{keepLocalTime:!0}).toJSDate():new Date(i)}getTZ(e){return e?this.dateTimeService.getTimezone():"UTC"}getDateAdapter(e){return e&&this.dateTimeService.getTimezone()==="UTC"?this.dateAdapter:this.dateUTCAdapter}getFormattedDate(e,t){return this.format(this.toDateTime(e,!0),!0,t)}};r.\u0275fac=function(t){return new(t||r)(D(f),D(g))},r.\u0275prov=u({token:r,factory:r.\u0275fac,providedIn:"root"});let n=r;return n})();export{z as a};
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.