it-tools/dist/client/assets/chunks/chunk-ddd809a6.js

9 lines
26 KiB
JavaScript
Raw Normal View History

2024-04-28 00:48:29 +08:00
import{_ as J}from"./chunk-baf8ab22.js";import{g as P,e as Y,b as K}from"./chunk-a740628f.js";import{_ as Q}from"./chunk-6deddc2e.js";import{d as ee,u as te,r as ne,e as re,c as ae,j as C,D as N,m as x,l as k,E as w,q as M,S as oe,M as I,F as Z,U as ie,k as se,z as R,W as ue,X as ce,_ as le}from"./chunk-449c23a2.js";import{_ as fe}from"./chunk-b6d0d6dd.js";import{_ as he}from"./chunk-3ef38193.js";import{_ as pe}from"./chunk-4515d3e7.js";import{_ as de}from"./chunk-e7959c45.js";import"./chunk-9a43cce8.js";import"./chunk-340feaf0.js";import"../entries/src_pages_Home.page.16dc467b.js";import"./chunk-cf010ec4.js";import"./chunk-ee54c1e8.js";import"./chunk-fd51fbd2.js";import"./chunk-f823181b.js";import"./chunk-6222e43f.js";import"./chunk-2749dac9.js";import"./chunk-567e13ca.js";import"./chunk-1d5b5526.js";import"./chunk-416dc92c.js";import"./chunk-6d336811.js";import"./chunk-5d5107c5.js";var G={exports:{}};(function(u,f){(function(d,_){u.exports=_()})(globalThis,()=>(()=>{var h={794:(O,l,v)=>{Object.defineProperty(l,"__esModule",{value:!0}),l.CronParser=void 0;var n=v(586),b=function(){function p(t,e,a){e===void 0&&(e=!0),a===void 0&&(a=!1),this.expression=t,this.dayOfWeekStartIndexZero=e,this.monthStartIndexZero=a}return p.prototype.parse=function(){var t=this.extractParts(this.expression);return this.normalize(t),this.validate(t),t},p.prototype.extractParts=function(t){if(!this.expression)throw new Error("Expression is empty");var e=t.trim().split(/[ ]+/);if(e.length<5)throw new Error("Expression has only ".concat(e.length," part").concat(e.length==1?"":"s",". At least 5 parts are required."));if(e.length==5)e.unshift(""),e.push("");else if(e.length==6){var a=/\d{4}$/.test(e[5])||e[4]=="?"||e[2]=="?";a?e.unshift(""):e.push("")}else if(e.length>7)throw new Error("Expression has ".concat(e.length," parts; too many!"));return e},p.prototype.normalize=function(t){var e=this;if(t[3]=t[3].replace("?","*"),t[5]=t[5].replace("?","*"),t[2]=t[2].replace("?","*"),t[0].indexOf("0/")==0&&(t[0]=t[0].replace("0/","*/")),t[1].indexOf("0/")==0&&(t[1]=t[1].replace("0/","*/")),t[2].indexOf("0/")==0&&(t[2]=t[2].replace("0/","*/")),t[3].indexOf("1/")==0&&(t[3]=t[3].replace("1/","*/")),t[4].indexOf("1/")==0&&(t[4]=t[4].replace("1/","*/")),t[6].indexOf("1/")==0&&(t[6]=t[6].replace("1/","*/")),t[5]=t[5].replace(/(^\d)|([^#/\s]\d)/g,function(g){var X=g.replace(/\D/,""),y=X;return e.dayOfWeekStartIndexZero?X=="7"&&(y="0"):y=(parseInt(X)-1).toString(),g.replace(X,y)}),t[5]=="L"&&(t[5]="6"),t[3]=="?"&&(t[3]="*"),t[3].indexOf("W")>-1&&(t[3].indexOf(",")>-1||t[3].indexOf("-")>-1))throw new Error("The 'W' character can be specified only when the day-of-month is a single day, not a range or list of days.");var a={SUN:0,MON:1,TUE:2,WED:3,THU:4,FRI:5,SAT:6};for(var r in a)t[5]=t[5].replace(new RegExp(r,"gi"),a[r].toString());t[4]=t[4].replace(/(^\d{1,2})|([^#/\s]\d{1,2})/g,function(g){var X=g.replace(/\D/,""),y=X;return e.monthStartIndexZero&&(y=(parseInt(X)+1).toString()),g.replace(X,y)});var o={JAN:1,FEB:2,MAR:3,APR:4,MAY:5,JUN:6,JUL:7,AUG:8,SEP:9,OCT:10,NOV:11,DEC:12};for(var i in o)t[4]=t[4].replace(new RegExp(i,"gi"),o[i].toString());t[0]=="0"&&(t[0]=""),!/\*|\-|\,|\//.test(t[2])&&(/\*|\//.test(t[1])||/\*|\//.test(t[0]))&&(t[2]+="-".concat(t[2]));for(var s=0;s<t.length;s++)if(t[s].indexOf(",")!=-1&&(t[s]=t[s].split(",").filter(function(g){return g!==""}).join(",")||"*"),t[s]=="*/1"&&(t[s]="*"),t[s].indexOf("/")>-1&&!/^\*|\-|\,/.test(t[s])){var c=null;switch(s){case 4:c="12";break;case 5:c="6";break;case 6:c="9999";break;default:c=null;break}if(c!==null){var m=t[s].split("/");t[s]="".concat(m[0],"-").concat(c,"/").concat(m[1])}}},p.prototype.validate=function(t){this.assertNoInvalidCharacters("DOW",t[5]),this.assertNoInvalidCharacters("DOM",t[3]),this.validateRange(t)},p.prototype.validateRange=function(t){n.default.secondRange(t[0]),n.default.minuteRange(t[1]),n.default.hourRange(t[2]),n.default.dayOfMonthRange(t[3]),n.default.monthRange(t[4],this.monthStartIndexZero),n.default.dayOfWeekRange(t[5],this.dayOfWeekStartIndexZero)},p.prototype.assertNoIn
| minute (0 - 59)
| | hour (0 - 23)
| | | day of month (1 - 31)
| | | | month (1 - 12) OR jan,feb,mar,apr ...
| | | | | day of week (0 - 6, sunday=0) OR sun,mon ...
| | | | | |
* * * * * * command`,-1)),Le={key:0},We=ee({__name:"crontab-generator",setup(u){function f(v){return $(v,{allowBlankDay:!0,alias:!0,seconds:!0})}const h=te(),d=ne("40 * * * *"),_=re({verbose:!0,dayOfWeekStartIndexZero:!0,use24HourTimeFormat:!0,throwExceptionOnParseError:!0}),S=[{symbol:"*",meaning:"Any value",example:"* * * *",equivalent:"Every minute"},{symbol:"-",meaning:"Range of values",example:"1-10 * * *",equivalent:"Minutes 1 through 10"},{symbol:",",meaning:"List of values",example:"1,10 * * *",equivalent:"At minutes 1 and 10"},{symbol:"/",meaning:"Step values",example:"*/10 * * *",equivalent:"Every 10 minutes"},{symbol:"@yearly",meaning:"Once every year at midnight of 1 January",example:"@yearly",equivalent:"0 0 1 1 *"},{symbol:"@annually",meaning:"Same as @yearly",example:"@annually",equivalent:"0 0 1 1 *"},{symbol:"@monthly",meaning:"Once a month at midnight on the first day",example:"@monthly",equivalent:"0 0 1 * *"},{symbol:"@weekly",meaning:"Once a week at midnight on Sunday morning",example:"@weekly",equivalent:"0 0 * * 0"},{symbol:"@daily",meaning:"Once a day at midnight",example:"@daily",equivalent:"0 0 * * *"},{symbol:"@midnight",meaning:"Same as @daily",example:"@midnight",equivalent:"0 0 * * *"},{symbol:"@hourly",meaning:"Once an hour at the beginning of the hour",example:"@hourly",equivalent:"0 * * * *"},{symbol:"@reboot",meaning:"Run at startup",example:"",equivalent:""}],O=ae(()=>f(d.value)?ve.toString(d.value,_):" "),l=[{validator:v=>f(v),message:"This cron is invalid"}];return(v,n)=>{const b=Q,p=fe,t=he,e=pe,a=de,r=K,o=J;return C(),N(Z,null,[x(r,null,{default:k(()=>[w("div",ke,[x(b,{value:M(d),"onUpdate:value":n[0]||(n[0]=i=>oe(d)?d.value=i:null),size:"large",placeholder:"* * * * *","validation-rules":l,"mb-3":""},null,8,["value"])]),w("div",Ae,I(M(O)),1),x(p),w("div",Ie,[x(a,{"show-feedback":!1,"label-width":"170","label-placement":"left"},{default:k(()=>[x(e,{label:"Verbose"},{default:k(()=>[x(t,{value:M(_).verbose,"onUpdate:value":n[1]||(n[1]=i=>M(_).verbose=i)},null,8,["value"])]),_:1}),x(e,{label:"Use 24 hour time format"},{default:k(()=>[x(t,{value:M(_).use24HourTimeFormat,"onUpdate:value":n[2]||(n[2]=i=>M(_).use24HourTimeFormat=i)},null,8,["value"])]),_:1}),x(e,{label:"Days start at 0"},{default:k(()=>[x(t,{value:M(_).dayOfWeekStartIndexZero,"onUpdate:value":n[3]||(n[3]=i=>M(_).dayOfWeekStartIndexZero=i)},null,8,["value"])]),_:1})]),_:1})])]),_:1}),x(r,null,{default:k(()=>[Ue,M(h).isSmallScreen?(C(),N("div",Le,[(C(),N(Z,null,ie(S,({symbol:i,meaning:s,example:c,equivalent:m})=>x(r,{key:i,"mb-3":"","important:border-none":""},{default:k(()=>[w("div",null,[R(" Symbol: "),w("strong",null,I(i),1)]),w("div",null,[R(" Meaning: "),w("strong",null,I(s),1)]),w("div",null,[R(" Example: "),w("strong",null,[w("code",null,I(c),1)])]),w("div",null,[R(" Equivalent: "),w("strong",null,I(m),1)])]),_:2},1024)),64))])):(C(),se(o,{key:1,data:S}))]),_:1})],64)}}});const at=le(We,[["__scopeId","data-v-b6cbd7a9"]]);export{at as default};