@coffer-org/web 6.0.0 → 7.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (32) hide show
  1. package/dist/assets/{ChatWidget-qpAe26bF.js → ChatWidget-YZqj6v6F.js} +9 -9
  2. package/dist/assets/{DiagnosticsPage-7qim0xtf.js → DiagnosticsPage-C_lLM_Hw.js} +1 -1
  3. package/dist/assets/{NewRecordView-X6Bro17s.js → NewRecordView-CC_fERty.js} +1 -1
  4. package/dist/assets/{PluginSettingsPage-C3iGqJEb.js → PluginSettingsPage-BkMqmqxo.js} +1 -1
  5. package/dist/assets/{SettingsForm-BAjKJ1MR.js → SettingsForm-DW1KCYe4.js} +1 -1
  6. package/dist/assets/{SettingsPage-DbAk9URh.js → SettingsPage-DuP06DkM.js} +3 -3
  7. package/dist/assets/{ThemeSwitcher-CADoC9xw.js → ThemeSwitcher-CR6oJXQD.js} +1 -1
  8. package/dist/assets/index-i___vlpd.css +2 -0
  9. package/dist/assets/index-zcINFUZQ.js +28 -0
  10. package/dist/assets/{list-cache-D1eUf-Pp.js → list-cache-D-BfHI9X.js} +1 -1
  11. package/dist/assets/{src-DiE6pP9S.js → src-BDmFR0_v.js} +1 -1
  12. package/dist/assets/{src-DsNlLMpF.js → src-BJF2nMuG.js} +1 -1
  13. package/dist/assets/src-BqhS-0sX.js +1 -0
  14. package/dist/assets/{src-B_YWtyQn.js → src-BxLhm2cd.js} +1 -1
  15. package/dist/assets/src-C2zqLDpV.js +1 -0
  16. package/dist/assets/src-C9WAFG8V.js +4 -0
  17. package/dist/assets/{src-DVO-Ghnz.js → src-D2hi5jAO.js} +1 -1
  18. package/dist/assets/{src-BYHuqMQ7.js → src-DB2N_cct.js} +1 -1
  19. package/dist/assets/{src-C4BNu6EC.js → src-DpPV1q-1.js} +1 -1
  20. package/dist/assets/{src-CustHESR.js → src-DwXka-KQ.js} +1 -1
  21. package/dist/assets/{ui-BgqTuhxj2.js → ui-A-A-cO8j2.js} +2 -2
  22. package/dist/assets/ui-CAxfAaN9.js +2 -0
  23. package/dist/assets/{ui-CImMNxCk.js → ui-D7QZRcxZ.js} +1 -1
  24. package/dist/index.html +6 -6
  25. package/dist-vendor/web-ui.js +9676 -9600
  26. package/package.json +1 -1
  27. package/dist/assets/index-CHlM3CU9.js +0 -28
  28. package/dist/assets/index-KdG4mu3z.css +0 -2
  29. package/dist/assets/src-54Qdjl2W.js +0 -4
  30. package/dist/assets/src-BTv3nocd.js +0 -1
  31. package/dist/assets/src-CO3npa8j.js +0 -1
  32. package/dist/assets/ui-Cy5oShj4.js +0 -2
@@ -1 +1 @@
1
- import{_ as e,n as t,r as n}from"./fields-BtCN_frr.js";import{s as r}from"./shelf-CRUDKiTz.js";import{t as i}from"./extend-BTkr7oJ8.js";import{n as a,r as o}from"./plugin-CFEkHH3f.js";import{t as s}from"./settings-BfEurOH1.js";var c=new Map(e.map((e,t)=>[e.value,t])),l=864e5,u=7;function d(e){let t=[0,0,0,0,0,0,0];if(!Array.isArray(e))return t;for(let n of e){let e=n?.value;if(Array.isArray(e))for(let n of e){let e=n,r=typeof e?.day==`string`?c.get(e.day):void 0;if(r===void 0)continue;let i=Number(e?.value);Number.isFinite(i)&&i>0&&(t[r]=t[r]+i)}}return t}function f(){return new Date().toISOString().slice(0,10)}var p=e=>String(e).padStart(2,`0`);function m(e){let t=e instanceof Date?`${e.getFullYear()}-${p(e.getMonth()+1)}-${p(e.getDate())}`:typeof e==`string`?e.slice(0,10):null;if(t===null||!/^\d{4}-\d{2}-\d{2}$/.test(t))return null;let n=Date.parse(t);return Number.isNaN(n)?null:n}function h(e,t,n){let r=Math.round((n-t)/l);if(!Number.isFinite(r)||r<=0)return 0;let i=e.reduce((e,t)=>e+t,0),a=Math.floor(r/u)*i,o=(new Date(t).getUTCDay()+6)%u;for(let t=1;t<=r%u;t++)a+=e[(o+t)%u];return a}function g(e,t,n,r){let i=Number(e);if(!Number.isFinite(i))return null;let a=d(t),o=a.reduce((e,t)=>e+t,0);if(o<=0)return null;let s=m(n),c=m(r),l=s===null||c===null?0:h(a,s,c),f=Math.max(0,i-l);return Math.floor(f/(o/u))}function _(e){return typeof e!=`number`||!Number.isFinite(e)?null:e<=0?`out`:e<7?`low`:`enough`}var v=({record:e})=>g(e.quantity,e.dose,e.quantityCheckedAt,f()),y=r({shelf:`medicine`,library:`health`,label:`health.medicine.label`,icon:`lucide:pill`,views:{list:[`type`,`form`,`quantity`]},fields:{name:t.title({label:`core.fields.name`}),about:t.illustrated({label:`health.medicine.fields.about`,fields:{image:t.image({}),text:t.text({rules:{max:1e3}})}}),photos:t.image({label:`health.medicine.fields.photos`,multiple:!0}),quantity:t.int({label:`health.medicine.fields.quantity`,rules:{min:0,max:1e5},mutate:[`daysLeft`,`quantityCheckedAt`],ui:{span:6}}),countdown:t.countdown({source:{quantityCheckedAt:t.date({label:`health.medicine.fields.quantityCheckedAt`,value:e=>e.now.slice(0,10),mutate:[`daysLeft`],ui:{span:6}})}}),dose:t.keyed({label:`health.medicine.fields.dose`,icon:`lucide:pill`,fields:{person:t.relation({label:`health.medicine.fields.dose_person`,options:n({library:`people`,shelf:`person`})}),value:t.perWeekday({label:`health.medicine.fields.dose_value`,rules:{min:0,max:20,step:.5},mutate:[`daysLeft`]})},by:`person`}),meter:t.meter({source:{daysLeft:t.int({label:`health.medicine.fields.daysLeft`,value:v,cache:3600,mutate:[`supply_state`],ui:{span:6}})},min:0,max:30}),status:t.status({source:{supply_state:t.string({label:`health.medicine.fields.supply_state`,options:[{value:`enough`,title:`health.medicine.options.supply_state.enough`,icon:{kind:`icon`,value:`lucide:check`}},{value:`low`,title:`health.medicine.options.supply_state.low`,icon:{kind:`icon`,value:`lucide:minus`}},{value:`out`,title:`health.medicine.options.supply_state.out`,icon:{kind:`icon`,value:`lucide:x`}}],value:e=>_(v(e)),cache:3600,strict:!0,noSearch:!0,ui:{span:6}})}}),intakeTimes:t.string({label:`health.medicine.fields.intakeTimes`,options:`day-periods`,multiple:!0,strict:!0,noSearch:!0}),intakePeriods:t.period({label:`health.medicine.fields.intakePeriods`,multiple:!0}),properties:t.properties({columns:2,fields:{type:t.string({label:`core.fields.type`,required:!0,strict:!0,noSearch:!0,ui:{span:6},options:[{value:`vitamin`,title:`health.medicine.options.type.vitamin`},{value:`supplement`,title:`health.medicine.options.type.supplement`},{value:`medication`,title:`health.medicine.options.type.medication`},{value:`antibiotic`,title:`health.medicine.options.type.antibiotic`},{value:`hormone`,title:`health.medicine.options.type.hormone`},{value:`painkiller`,title:`health.medicine.options.type.painkiller`},{value:`homeopathy`,title:`health.medicine.options.type.homeopathy`},{value:`herbal`,title:`health.medicine.options.type.herbal`}]}),form:t.string({label:`health.medicine.fields.form`,strict:!0,noSearch:!0,ui:{span:6},options:[{value:`tablet`,title:`health.medicine.options.form.tablet`},{value:`capsule`,title:`health.medicine.options.form.capsule`},{value:`syrup`,title:`health.medicine.options.form.syrup`},{value:`drops`,title:`health.medicine.options.form.drops`},{value:`ointment`,title:`health.medicine.options.form.ointment`},{value:`gel`,title:`health.medicine.options.form.gel`},{value:`spray`,title:`health.medicine.options.form.spray`},{value:`injection`,title:`health.medicine.options.form.injection`},{value:`powder`,title:`health.medicine.options.form.powder`},{value:`suppository`,title:`health.medicine.options.form.suppository`}]})}}),notes:t.text({label:`health.medicine.fields.notes`,rules:{max:2e3}})}}),b=r({shelf:`health_visit`,library:`health`,label:`health.health_visit.label`,icon:`lucide:stethoscope`,views:{list:[`date`,`person`,`specialty`]},fields:{name:t.title({label:`core.fields.name`}),description:t.text({label:`health.health_visit.fields.description`,rules:{max:1e3}}),timeline:t.timeline({fields:{date:t.date({label:`health.health_visit.fields.date`}),nextVisit:t.reminder({label:`health.health_visit.fields.nextVisit`,rules:{lead:14}})}}),reason:t.text({label:`health.health_visit.fields.reason`,rules:{max:1e3}}),result:t.text({label:`health.health_visit.fields.result`,rules:{max:2e3}}),next_step:t.text({label:`health.health_visit.fields.next_step`,rules:{max:1e3}}),specialist:t.string({label:`health.health_visit.fields.specialist`,rules:{max:200},ui:{span:4}}),specialty:t.string({label:`health.health_visit.fields.specialty`,rules:{max:100},ui:{span:4}}),clinic:t.string({label:`health.health_visit.fields.clinic`,rules:{max:200},ui:{span:4}}),cost:t.money({label:`health.health_visit.fields.cost`,ui:{span:3}}),currency:t.currency({label:`core.fields.currency`,default:`UAH`,ui:{span:3}}),medicines:t.relation({label:`health.health_visit.fields.medicines`,options:n({library:`health`,shelf:`medicine`}),multiple:!0,ui:{span:6}}),people:t.people({source:{person:t.relation({label:`health.health_visit.fields.person`,options:n({library:`people`,shelf:`person`})})}}),files:t.file({label:`health.health_visit.fields.files`,multiple:!0}),photos:t.image({label:`health.health_visit.fields.photos`,multiple:!0}),notes:t.text({label:`health.health_visit.fields.notes`,rules:{max:2e3}})}}),x=r({shelf:`health_test`,library:`health`,label:`health.health_test.label`,icon:`lucide:flask-conical`,views:{list:[`date`,`person`,`status`]},fields:{name:t.title({label:`core.fields.name`}),description:t.text({label:`health.health_test.fields.description`,rules:{max:1e3}}),date:t.date({label:`health.health_test.fields.date`,ui:{span:4}}),clinic:t.string({label:`health.health_test.fields.clinic`,rules:{max:200},ui:{span:4}}),person:t.relation({label:`health.health_test.fields.person`,options:n({library:`people`,shelf:`person`}),ui:{span:4}}),result:t.text({label:`health.health_test.fields.result`,rules:{max:5e3}}),attachments:t.image({label:`health.health_test.fields.attachments`,multiple:!0}),properties:t.properties({columns:2,fields:{status:t.string({label:`health.health_test.fields.status`,strict:!0,noSearch:!0,ui:{span:6},options:[{value:`ordered`,title:`health.health_test.options.status.ordered`},{value:`completed`,title:`health.health_test.options.status.completed`},{value:`cancelled`,title:`health.health_test.options.status.cancelled`}]}),test_type:t.string({label:`health.health_test.fields.test_type`,strict:!0,noSearch:!0,ui:{span:6},options:[{value:`blood`,title:`health.health_test.options.test_type.blood`},{value:`urine`,title:`health.health_test.options.test_type.urine`},{value:`ultrasound`,title:`health.health_test.options.test_type.ultrasound`},{value:`xray`,title:`health.health_test.options.test_type.xray`},{value:`mri`,title:`health.health_test.options.test_type.mri`},{value:`other`,title:`health.health_test.options.test_type.other`}]})}}),notes:t.text({label:`health.health_test.fields.notes`,rules:{max:2e3}})}}),S=i({id:`person_body`,label:`health.person_body.label`,icon:`lucide:ruler`,attachTo:[{library:`people`,shelf:`person`}],agent:`Person's body measurements. weightKg — weight in kg. heightCm — height in cm. bloodGroup — ABO/Rh blood type. allergies — list of allergens.`,fields:{weightKg:t.real({label:`health.person_body.fields.weightKg`,rules:{min:1,max:500}}),heightCm:t.int({label:`health.person_body.fields.heightCm`,rules:{min:50,max:250}}),bloodGroup:t.string({label:`health.person_body.fields.bloodGroup`,strict:!0,noSearch:!0,options:[`O-`,`O+`,`A-`,`A+`,`B-`,`B+`,`AB-`,`AB+`]}),allergies:t.string({label:`health.person_body.fields.allergies`,multiple:!0})}}),C=[{value:`any`,title:`health.dayPeriods.any`},{value:`before_breakfast`,title:`health.dayPeriods.before_breakfast`},{value:`with_breakfast`,title:`health.dayPeriods.with_breakfast`},{value:`after_breakfast`,title:`health.dayPeriods.after_breakfast`},{value:`with_food`,title:`health.dayPeriods.with_food`},{value:`after_lunch`,title:`health.dayPeriods.after_lunch`},{value:`evening`,title:`health.dayPeriods.evening`},{value:`before_bed`,title:`health.dayPeriods.before_bed`},{value:`as_needed`,title:`health.dayPeriods.as_needed`}],w=a({id:`health`,version:`1.0.0`,dependsOn:[`people`],optionLists:[{name:`day-periods`,options:[...C]}],libraries:[{meta:o({id:`health`,label:`health.library.label`,icon:`lucide:hospital`,agent:`Medical tests, doctor visits, and medicines — each linked to a person.`}),shelves:[y,b,x]}],extends_:[S],settings:s({label:`health.settings.label`,fields:{caldav_calendar:t.string({label:`health.settings.caldav_calendar`}),caldav_url:t.string({label:`health.settings.caldav_url`}),caldav_username:t.string({label:`health.settings.caldav_username`}),caldav_password:t.password({label:`health.settings.caldav_password`}),...Object.fromEntries(C.filter(e=>e.value!==`as_needed`).map(e=>[`time_${e.value}`,t.time({label:`health.settings.time_${e.value}`,rules:{granularity:`minute`}})]))}})});export{w as default};
1
+ import{_ as e,n as t,r as n}from"./fields-BtCN_frr.js";import{s as r}from"./shelf-CRUDKiTz.js";import{t as i}from"./extend-BTkr7oJ8.js";import{n as a,r as o}from"./plugin-CFEkHH3f.js";import{t as s}from"./settings-BfEurOH1.js";var c=new Map(e.map((e,t)=>[e.value,t])),l=864e5,u=7;function d(e){let t=[0,0,0,0,0,0,0];if(!Array.isArray(e))return t;for(let n of e){let e=n?.value;if(Array.isArray(e))for(let n of e){let e=n,r=typeof e?.day==`string`?c.get(e.day):void 0;if(r===void 0)continue;let i=Number(e?.value);Number.isFinite(i)&&i>0&&(t[r]=t[r]+i)}}return t}function f(){return new Date().toISOString().slice(0,10)}var p=e=>String(e).padStart(2,`0`);function m(e){let t=e instanceof Date?`${e.getFullYear()}-${p(e.getMonth()+1)}-${p(e.getDate())}`:typeof e==`string`?e.slice(0,10):null;if(t===null||!/^\d{4}-\d{2}-\d{2}$/.test(t))return null;let n=Date.parse(t);return Number.isNaN(n)?null:n}function h(e,t,n){let r=Math.round((n-t)/l);if(!Number.isFinite(r)||r<=0)return 0;let i=e.reduce((e,t)=>e+t,0),a=Math.floor(r/u)*i,o=(new Date(t).getUTCDay()+6)%u;for(let t=1;t<=r%u;t++)a+=e[(o+t)%u];return a}function g(e,t,n,r){let i=Number(e);if(!Number.isFinite(i))return null;let a=d(t),o=a.reduce((e,t)=>e+t,0);if(o<=0)return null;let s=m(n),c=m(r),l=s===null||c===null?0:h(a,s,c),f=Math.max(0,i-l);return Math.floor(f/(o/u))}function _(e){return typeof e!=`number`||!Number.isFinite(e)?null:e<=0?`out`:e<7?`low`:`enough`}var v=({record:e})=>g(e.quantity,e.dose,e.quantityCheckedAt,f()),y=r({shelf:`medicine`,library:`health`,label:`health.medicine.label`,icon:`lucide:pill`,views:{list:[`type`,`form`,`quantity`]},fields:{name:t.title({label:`core.fields.name`}),about:t.illustrated({label:`health.medicine.fields.about`,fields:{image:t.image({}),text:t.text({rules:{max:1e3}})}}),photos:t.image({label:`health.medicine.fields.photos`,multiple:!0}),quantity:t.int({label:`health.medicine.fields.quantity`,rules:{min:0,max:1e5},mutate:[`daysLeft`,`quantityCheckedAt`],ui:{span:6}}),countdown:t.countdown({source:{quantityCheckedAt:t.date({label:`health.medicine.fields.quantityCheckedAt`,value:e=>e.now.slice(0,10),mutate:[`daysLeft`],ui:{span:6}})}}),dose:t.keyed({label:`health.medicine.fields.dose`,icon:`lucide:pill`,fields:{person:t.relation({label:`health.medicine.fields.dose_person`,options:n({library:`people`,shelf:`person`})}),value:t.perWeekday({label:`health.medicine.fields.dose_value`,rules:{min:0,max:20,step:.5},mutate:[`daysLeft`]})},by:`person`}),meter:t.meter({source:{daysLeft:t.int({label:`health.medicine.fields.daysLeft`,value:v,cache:3600,mutate:[`supply_state`],ui:{span:6}})},min:0,max:30}),status:t.status({source:{supply_state:t.string({label:`health.medicine.fields.supply_state`,options:[{value:`enough`,title:`health.medicine.options.supply_state.enough`,icon:{kind:`icon`,value:`lucide:check`}},{value:`low`,title:`health.medicine.options.supply_state.low`,icon:{kind:`icon`,value:`lucide:minus`}},{value:`out`,title:`health.medicine.options.supply_state.out`,icon:{kind:`icon`,value:`lucide:x`}}],value:e=>_(v(e)),cache:3600,strict:!0,noSearch:!0,ui:{span:6}})}}),intakeTimes:t.string({label:`health.medicine.fields.intakeTimes`,options:`day-periods`,multiple:!0,strict:!0,noSearch:!0}),intakePeriods:t.period({label:`health.medicine.fields.intakePeriods`,multiple:!0}),properties:t.properties({columns:2,fields:{type:t.string({label:`core.fields.type`,required:!0,strict:!0,noSearch:!0,ui:{span:6},options:[{value:`vitamin`,title:`health.medicine.options.type.vitamin`},{value:`supplement`,title:`health.medicine.options.type.supplement`},{value:`medication`,title:`health.medicine.options.type.medication`},{value:`antibiotic`,title:`health.medicine.options.type.antibiotic`},{value:`hormone`,title:`health.medicine.options.type.hormone`},{value:`painkiller`,title:`health.medicine.options.type.painkiller`},{value:`homeopathy`,title:`health.medicine.options.type.homeopathy`},{value:`herbal`,title:`health.medicine.options.type.herbal`}]}),form:t.string({label:`health.medicine.fields.form`,strict:!0,noSearch:!0,ui:{span:6},options:[{value:`tablet`,title:`health.medicine.options.form.tablet`},{value:`capsule`,title:`health.medicine.options.form.capsule`},{value:`syrup`,title:`health.medicine.options.form.syrup`},{value:`drops`,title:`health.medicine.options.form.drops`},{value:`ointment`,title:`health.medicine.options.form.ointment`},{value:`gel`,title:`health.medicine.options.form.gel`},{value:`spray`,title:`health.medicine.options.form.spray`},{value:`injection`,title:`health.medicine.options.form.injection`},{value:`powder`,title:`health.medicine.options.form.powder`},{value:`suppository`,title:`health.medicine.options.form.suppository`}]})}}),notes:t.text({label:`health.medicine.fields.notes`,rules:{max:2e3}})}}),b=r({shelf:`health_visit`,library:`health`,label:`health.health_visit.label`,icon:`lucide:stethoscope`,views:{list:[`date`,`person`,`specialty`]},fields:{name:t.title({label:`core.fields.name`}),description:t.text({label:`health.health_visit.fields.description`,rules:{max:1e3}}),timeline:t.timeline({fields:{date:t.date({label:`health.health_visit.fields.date`}),nextVisit:t.reminder({label:`health.health_visit.fields.nextVisit`,rules:{lead:14}})}}),reason:t.text({label:`health.health_visit.fields.reason`,rules:{max:1e3}}),result:t.text({label:`health.health_visit.fields.result`,rules:{max:2e3}}),next_step:t.text({label:`health.health_visit.fields.next_step`,rules:{max:1e3}}),specialist:t.string({label:`health.health_visit.fields.specialist`,rules:{max:200},ui:{span:4}}),specialty:t.string({label:`health.health_visit.fields.specialty`,rules:{max:100},ui:{span:4}}),clinic:t.string({label:`health.health_visit.fields.clinic`,rules:{max:200},ui:{span:4}}),cost:t.money({label:`health.health_visit.fields.cost`,ui:{span:3}}),currency:t.currency({label:`core.fields.currency`,default:`UAH`,ui:{span:3}}),medicines:t.relation({label:`health.health_visit.fields.medicines`,options:n({library:`health`,shelf:`medicine`}),multiple:!0,ui:{span:6}}),people:t.people({source:{person:t.relation({label:`health.health_visit.fields.person`,options:n({library:`people`,shelf:`person`})})}}),files:t.file({label:`health.health_visit.fields.files`,multiple:!0}),photos:t.image({label:`health.health_visit.fields.photos`,multiple:!0}),notes:t.text({label:`health.health_visit.fields.notes`,rules:{max:2e3}})}}),x=r({shelf:`health_test`,library:`health`,label:`health.health_test.label`,icon:`lucide:flask-conical`,views:{list:[`date`,`person`,`status`]},fields:{name:t.title({label:`core.fields.name`}),description:t.text({label:`health.health_test.fields.description`,rules:{max:1e3}}),date:t.date({label:`health.health_test.fields.date`,ui:{span:4}}),clinic:t.string({label:`health.health_test.fields.clinic`,rules:{max:200},ui:{span:4}}),person:t.relation({label:`health.health_test.fields.person`,options:n({library:`people`,shelf:`person`}),ui:{span:4}}),result:t.text({label:`health.health_test.fields.result`,rules:{max:5e3}}),attachments:t.image({label:`health.health_test.fields.attachments`,multiple:!0}),properties:t.properties({columns:2,fields:{status:t.string({label:`health.health_test.fields.status`,strict:!0,noSearch:!0,ui:{span:6},options:[{value:`ordered`,title:`health.health_test.options.status.ordered`},{value:`completed`,title:`health.health_test.options.status.completed`},{value:`cancelled`,title:`health.health_test.options.status.cancelled`}]}),test_type:t.string({label:`health.health_test.fields.test_type`,strict:!0,noSearch:!0,ui:{span:6},options:[{value:`blood`,title:`health.health_test.options.test_type.blood`},{value:`urine`,title:`health.health_test.options.test_type.urine`},{value:`ultrasound`,title:`health.health_test.options.test_type.ultrasound`},{value:`xray`,title:`health.health_test.options.test_type.xray`},{value:`mri`,title:`health.health_test.options.test_type.mri`},{value:`other`,title:`health.health_test.options.test_type.other`}]})}}),notes:t.text({label:`health.health_test.fields.notes`,rules:{max:2e3}})}}),S=i({id:`person_body`,label:`health.person_body.label`,icon:`lucide:ruler`,attachTo:[{library:`people`,shelf:`person`}],agent:`Person's body measurements. weightKg — weight in kg. heightCm — height in cm. bloodGroup — ABO/Rh blood type. allergies — list of allergens.`,fields:{weightKg:t.real({label:`health.person_body.fields.weightKg`,rules:{min:1,max:500}}),heightCm:t.int({label:`health.person_body.fields.heightCm`,rules:{min:50,max:250}}),bloodGroup:t.string({label:`health.person_body.fields.bloodGroup`,strict:!0,noSearch:!0,options:[`O-`,`O+`,`A-`,`A+`,`B-`,`B+`,`AB-`,`AB+`]}),allergies:t.string({label:`health.person_body.fields.allergies`,multiple:!0})}}),C=[{value:`any`,title:`health.dayPeriods.any`},{value:`before_breakfast`,title:`health.dayPeriods.before_breakfast`},{value:`with_breakfast`,title:`health.dayPeriods.with_breakfast`},{value:`after_breakfast`,title:`health.dayPeriods.after_breakfast`},{value:`with_food`,title:`health.dayPeriods.with_food`},{value:`after_lunch`,title:`health.dayPeriods.after_lunch`},{value:`evening`,title:`health.dayPeriods.evening`},{value:`before_bed`,title:`health.dayPeriods.before_bed`},{value:`as_needed`,title:`health.dayPeriods.as_needed`}],w=a({id:`health`,version:`1.0.0`,dependsOn:[`people`],optionLists:[{name:`day-periods`,options:[...C]}],libraries:[{meta:o({id:`health`,label:`health.library.label`,icon:`lucide:hospital`,agent:`Medical tests, doctor visits, and medicines — each linked to a person.`,starterHint:`appointments coming up, or test results worth revisiting`}),shelves:[y,b,x]}],extends_:[S],settings:s({label:`health.settings.label`,fields:{caldav_calendar:t.string({label:`health.settings.caldav_calendar`}),caldav_url:t.string({label:`health.settings.caldav_url`}),caldav_username:t.string({label:`health.settings.caldav_username`}),caldav_password:t.password({label:`health.settings.caldav_password`}),...Object.fromEntries(C.filter(e=>e.value!==`as_needed`).map(e=>[`time_${e.value}`,t.time({label:`health.settings.time_${e.value}`,rules:{granularity:`minute`}})]))}})});export{w as default};
@@ -5,4 +5,4 @@ repeat — recurrence. next_expected — next expected date. firefly_id — do n
5
5
  holder — which person the debt is registered to (relation people/person).
6
6
  total — full debt amount. monthly — monthly payment. termMonths/paidMonths — schedule.
7
7
  remaining — how much is left; COMPUTED (total − downPayment − monthly × paidMonths), never write it.
8
- nextPayment — payment reminder. paidOff — settled (manual: an early lump payoff is not in the schedule).`,fields:{creditor:a.string({label:`finance.item_financing.fields.creditor`,rules:{max:120}}),holder:a.relation({label:`finance.item_financing.fields.holder`,options:o({library:`people`,shelf:`person`})}),currency:a.currency({label:`core.fields.currency`,default:`UAH`}),sheet:a.sheet({fields:{principal:{total:a.money({label:`finance.item_financing.fields.total`,mutate:[`remaining`]}),downPayment:a.money({label:`finance.item_financing.fields.downPayment`,mutate:[`remaining`]})},outstanding:{monthly:a.money({label:`finance.item_financing.fields.monthly`,mutate:[`remaining`]}),remaining:a.money({label:`finance.item_financing.fields.remaining`,value:({record:e})=>{let t=b(e.total);if(t==null)return null;let n=(b(e.monthly)??0)*(Number(e.paidMonths)||0),r=t-(b(e.downPayment)??0)-n;return Math.max(0,Math.round(r*100)/100)}})},term:{termMonths:a.int({label:`finance.item_financing.fields.termMonths`,rules:{min:0}}),paidMonths:a.int({label:`finance.item_financing.fields.paidMonths`,rules:{min:0},mutate:[`remaining`]}),rate:a.real({label:`finance.item_financing.fields.rate`,rules:{min:0}})}}}),startDate:a.date({label:`finance.item_financing.fields.startDate`}),nextPayment:a.reminder({label:`finance.item_financing.fields.nextPayment`,rules:{lead:3}}),paidOff:a.boolean({label:`finance.item_financing.fields.paidOff`}),notes:a.text({label:`finance.item_financing.fields.notes`,rules:{max:2e3}})}}),S={iban:m},C=l({id:`finance`,version:`1.0.0`,dependsOn:[`things`,`people`],libraries:[{meta:u({id:`finance`,label:`finance.library.label`,icon:`lucide:wallet`,agent:`Bank accounts, bills, and transactions — mirrored from Firefly.`}),shelves:[_,v,y]}],extends_:[x],settings:d({label:`finance.settings.label`,fields:{firefly_url:a.string({label:`finance.settings.firefly_url`,required:!0}),token:a.password({label:`finance.settings.token`,required:!0}),button:a.button({label:`finance.settings.test_button`,value:`finance.testConnection`,icon:`lucide:wifi`}),button2:a.button({label:`finance.settings.sync_button`,value:`finance.sync`,icon:`lucide:refresh-cw`}),wise_csv:a.file({label:`finance.settings.wise_csv`}),wise_account:a.relation({label:`finance.settings.wise_account`,options:o({library:`finance`,shelf:`account`})}),button3:a.button({label:`finance.settings.wise_import_button`,value:`finance.importWise`,icon:`lucide:upload`})}})});export{C as n,m as r,S as t};
8
+ nextPayment — payment reminder. paidOff — settled (manual: an early lump payoff is not in the schedule).`,fields:{creditor:a.string({label:`finance.item_financing.fields.creditor`,rules:{max:120}}),holder:a.relation({label:`finance.item_financing.fields.holder`,options:o({library:`people`,shelf:`person`})}),currency:a.currency({label:`core.fields.currency`,default:`UAH`}),sheet:a.sheet({fields:{principal:{total:a.money({label:`finance.item_financing.fields.total`,mutate:[`remaining`]}),downPayment:a.money({label:`finance.item_financing.fields.downPayment`,mutate:[`remaining`]})},outstanding:{monthly:a.money({label:`finance.item_financing.fields.monthly`,mutate:[`remaining`]}),remaining:a.money({label:`finance.item_financing.fields.remaining`,value:({record:e})=>{let t=b(e.total);if(t==null)return null;let n=(b(e.monthly)??0)*(Number(e.paidMonths)||0),r=t-(b(e.downPayment)??0)-n;return Math.max(0,Math.round(r*100)/100)}})},term:{termMonths:a.int({label:`finance.item_financing.fields.termMonths`,rules:{min:0}}),paidMonths:a.int({label:`finance.item_financing.fields.paidMonths`,rules:{min:0},mutate:[`remaining`]}),rate:a.real({label:`finance.item_financing.fields.rate`,rules:{min:0}})}}}),startDate:a.date({label:`finance.item_financing.fields.startDate`}),nextPayment:a.reminder({label:`finance.item_financing.fields.nextPayment`,rules:{lead:3}}),paidOff:a.boolean({label:`finance.item_financing.fields.paidOff`}),notes:a.text({label:`finance.item_financing.fields.notes`,rules:{max:2e3}})}}),S={iban:m},C=l({id:`finance`,version:`1.0.0`,dependsOn:[`things`,`people`],libraries:[{meta:u({id:`finance`,label:`finance.library.label`,icon:`lucide:wallet`,agent:`Bank accounts, bills, and transactions — mirrored from Firefly.`,starterHint:`bills due soon, or how this month compares with the last`}),shelves:[_,v,y]}],extends_:[x],settings:d({label:`finance.settings.label`,fields:{firefly_url:a.string({label:`finance.settings.firefly_url`,required:!0}),token:a.password({label:`finance.settings.token`,required:!0}),button:a.button({label:`finance.settings.test_button`,value:`finance.testConnection`,icon:`lucide:wifi`}),button2:a.button({label:`finance.settings.sync_button`,value:`finance.sync`,icon:`lucide:refresh-cw`}),wise_csv:a.file({label:`finance.settings.wise_csv`}),wise_account:a.relation({label:`finance.settings.wise_account`,options:o({library:`finance`,shelf:`account`})}),button3:a.button({label:`finance.settings.wise_import_button`,value:`finance.importWise`,icon:`lucide:upload`})}})});export{C as n,m as r,S as t};
@@ -1 +1 @@
1
- import{n as e}from"./fields-BtCN_frr.js";import{s as t}from"./shelf-CRUDKiTz.js";import{n,r}from"./plugin-CFEkHH3f.js";import{t as i}from"./settings-BfEurOH1.js";var a=t({shelf:`bus_route`,library:`transit`,label:`transit.bus_route.label`,icon:`lucide:bus`,views:{list:[`route_number`,`from`,`to`]},fields:{name:e.title({label:`core.fields.name`}),description:e.text({label:`transit.bus_route.fields.description`,rules:{max:1e3}}),route_number:e.int({label:`transit.bus_route.fields.route_number`,ui:{span:3}}),from:e.string({label:`transit.bus_route.fields.from`,rules:{max:100},ui:{span:3}}),to:e.string({label:`transit.bus_route.fields.to`,rules:{max:100},ui:{span:3}}),stop:e.string({label:`transit.bus_route.fields.stop`,rules:{max:200},ui:{span:3}}),weekday_times:e.time({label:`transit.bus_route.fields.weekday_times`,multiple:!0,ui:{span:12}}),saturday_times:e.time({label:`transit.bus_route.fields.saturday_times`,multiple:!0,ui:{span:6}}),sunday_times:e.time({label:`transit.bus_route.fields.sunday_times`,multiple:!0,ui:{span:6}}),tags:e.tags({label:`transit.bus_route.fields.tags`}),notes:e.text({label:`transit.bus_route.fields.notes`,rules:{max:500}})}}),o=n({id:`transit`,version:`1.0.0`,dependsOn:[],libraries:[{meta:r({id:`transit`,label:`transit.library.label`,icon:`lucide:bus`,agent:`Local bus routes and their departure schedules (bus_route).`}),shelves:[a]}],settings:i({label:`transit.settings.label`,fields:{caldav_calendar:e.string({label:`transit.settings.caldav_calendar`}),caldav_url:e.string({label:`transit.settings.caldav_url`}),caldav_username:e.string({label:`transit.settings.caldav_username`}),caldav_password:e.password({label:`transit.settings.caldav_password`})}})});export{o as default};
1
+ import{n as e}from"./fields-BtCN_frr.js";import{s as t}from"./shelf-CRUDKiTz.js";import{n,r}from"./plugin-CFEkHH3f.js";import{t as i}from"./settings-BfEurOH1.js";var a=t({shelf:`bus_route`,library:`transit`,label:`transit.bus_route.label`,icon:`lucide:bus`,views:{list:[`route_number`,`from`,`to`]},fields:{name:e.title({label:`core.fields.name`}),description:e.text({label:`transit.bus_route.fields.description`,rules:{max:1e3}}),route_number:e.int({label:`transit.bus_route.fields.route_number`,ui:{span:3}}),from:e.string({label:`transit.bus_route.fields.from`,rules:{max:100},ui:{span:3}}),to:e.string({label:`transit.bus_route.fields.to`,rules:{max:100},ui:{span:3}}),stop:e.string({label:`transit.bus_route.fields.stop`,rules:{max:200},ui:{span:3}}),weekday_times:e.time({label:`transit.bus_route.fields.weekday_times`,multiple:!0,ui:{span:12}}),saturday_times:e.time({label:`transit.bus_route.fields.saturday_times`,multiple:!0,ui:{span:6}}),sunday_times:e.time({label:`transit.bus_route.fields.sunday_times`,multiple:!0,ui:{span:6}}),tags:e.tags({label:`transit.bus_route.fields.tags`}),notes:e.text({label:`transit.bus_route.fields.notes`,rules:{max:500}})}}),o=n({id:`transit`,version:`1.0.0`,dependsOn:[],libraries:[{meta:r({id:`transit`,label:`transit.library.label`,icon:`lucide:bus`,agent:`Local bus routes and their departure schedules (bus_route).`,starterHint:`the next departures on the saved routes`}),shelves:[a]}],settings:i({label:`transit.settings.label`,fields:{caldav_calendar:e.string({label:`transit.settings.caldav_calendar`}),caldav_url:e.string({label:`transit.settings.caldav_url`}),caldav_username:e.string({label:`transit.settings.caldav_username`}),caldav_password:e.password({label:`transit.settings.caldav_password`})}})});export{o as default};
@@ -1 +1 @@
1
- import{n as e,r as t}from"./fields-BtCN_frr.js";import{s as n}from"./shelf-CRUDKiTz.js";import{t as r}from"./extend-BTkr7oJ8.js";import{n as i,r as a}from"./plugin-CFEkHH3f.js";import{t as o}from"./settings-BfEurOH1.js";import{t as s}from"./src-Cr_oHzOc.js";import{t as c}from"./src-BYHuqMQ7.js";var l=n({shelf:`field_demo`,library:`lab`,label:`lab.field_demo.label`,icon:`lucide:flask-conical`,views:{inline:[`name`,`select`],listKind:`map`,list:[`place`,`text_minmax`,`integer`,`boolean`,`select`,`rating_5`,`measured_currency`]},fields:{name:e.title({label:`core.fields.name`}),image:e.image({label:`lab.field_demo.fields.image`,ui:{role:`cover`}}),avatar:e.avatar({label:`lab.field_demo.fields.avatar`,ui:{role:`avatar`}}),info:e.info(`lab.field_demo.info.intro`),button:e.button({label:`lab.field_demo.fields.button_demo`,value:`lab.demoAction`,icon:`lucide:zap`,variant:`outline`}),properties:e.properties({label:`lab.field_demo.groups.properties_inspector`,icon:`lucide:sliders-horizontal`,columns:4,fields:{demo_status:e.string({label:`lab.field_demo.fields.demo_status`,ui:{span:3}}),demo_author:e.string({label:`lab.field_demo.fields.demo_author`,ui:{span:3}}),demo_prop_rating:e.rating({label:`lab.field_demo.fields.rating_5`,ui:{span:3}}),demo_prop_date:e.date({label:`lab.field_demo.fields.date`,ui:{span:3}})}}),stack:e.stack({label:`lab.field_demo.groups.vertical_stack`,icon:`lucide:layers`,fields:{stack_note_1:e.string({label:`lab.field_demo.fields.stack_note_1`}),stack_note_2:e.string({label:`lab.field_demo.fields.stack_note_2`})}}),group:e.group({label:`lab.field_demo.groups.embeds`,icon:`lucide:tv`,scope:`hoist`,fields:{embed_wide:e.embed({label:`lab.field_demo.fields.embed_wide`,multiple:!0}),embed_narrow:e.embed({label:`lab.field_demo.fields.embed_narrow`,multiple:!0})}}),group2:e.group({label:`lab.field_demo.groups.text_pattern`,icon:`lucide:type`,scope:`hoist`,fields:{text_pattern:e.string({label:`lab.field_demo.fields.text_pattern`,rules:{pattern:`^[A-Za-z]+$`,messageKey:`lab.field_demo.validation.letters_only`}})}}),group3:e.group({label:`lab.field_demo.groups.text_email`,icon:`lucide:mail`,scope:`hoist`,fields:{text_emails:e.email({label:`lab.field_demo.fields.text_emails`,multiple:!0})}}),group4:e.group({label:`lab.field_demo.groups.text_url`,icon:`lucide:link`,scope:`hoist`,fields:{text_url:e.url({label:`lab.field_demo.fields.text_url`})}}),group5:e.group({label:`lab.field_demo.groups.text_password`,icon:`lucide:key-round`,scope:`hoist`,fields:{text_password:e.password({label:`lab.field_demo.fields.text_password`})}}),group6:e.group({label:`lab.field_demo.groups.slug_link`,icon:`lucide:link-2`,scope:`hoist`,fields:{demo_slug:e.slug({label:`lab.field_demo.fields.demo_slug`}),demo_link:e.link({label:`lab.field_demo.fields.demo_link`})}}),group7:e.group({label:`lab.field_demo.groups.string_mask`,icon:`lucide:credit-card`,scope:`hoist`,fields:{demo_mask_card:e.string({label:`lab.field_demo.fields.demo_mask_card`,rules:{pattern:`^\\d{4} \\d{4} \\d{4} \\d{4}$`}})}}),group8:e.group({label:`lab.field_demo.groups.percent_year`,icon:`lucide:percent`,scope:`hoist`,fields:{demo_percent:e.percent({label:`lab.field_demo.fields.demo_percent`}),demo_year:e.year({label:`lab.field_demo.fields.demo_year`})}}),group9:e.group({label:`lab.field_demo.groups.local_paths`,icon:`lucide:folder-tree`,scope:`hoist`,fields:{demo_local_dir:e.localDir({label:`lab.field_demo.fields.demo_local_dir`}),demo_local_file:e.localFile({label:`lab.field_demo.fields.demo_local_file`})}}),group10:e.group({label:`lab.field_demo.groups.tag_i18n`,icon:`lucide:tags`,scope:`hoist`,fields:{demo_tag:e.tag({label:`lab.field_demo.fields.demo_tag`,options:[`new`,`sale`,`featured`]}),demo_i18n:e.i18n({label:`lab.field_demo.fields.demo_i18n`})}}),group11:e.group({label:`lab.field_demo.groups.source_poster`,icon:`lucide:file-code`,scope:`hoist`,fields:{demo_source:e.source({label:`lab.field_demo.fields.demo_source`}),demo_poster:e.poster({label:`lab.field_demo.fields.demo_poster`})}}),group12:e.group({label:`lab.field_demo.groups.ranges`,icon:`lucide:chevrons-left-right`,scope:`hoist`,fields:{demo_number_range:e.numberRange({label:`lab.field_demo.fields.demo_number_range`}),demo_real_range:e.realRange({label:`lab.field_demo.fields.demo_real_range`})}}),group13:e.group({label:`lab.field_demo.groups.date_month`,icon:`lucide:calendar`,scope:`hoist`,fields:{demo_month:e.date({label:`lab.field_demo.fields.demo_month`,rules:{granularity:`month`}})}}),group14:e.group({label:`lab.field_demo.groups.ratings`,icon:`lucide:star`,scope:`hoist`,fields:{rating_5:e.rating({label:`lab.field_demo.fields.rating_5`}),rating_10:e.rating({label:`lab.field_demo.fields.rating_10`,rules:{max:10}})}}),group15:e.group({label:`lab.field_demo.groups.hostname`,icon:`lucide:globe`,scope:`hoist`,fields:{demo_hostname:s.hostname({label:`lab.field_demo.fields.demo_hostname`})}}),group16:e.group({label:`lab.field_demo.groups.unit_amount`,icon:`lucide:calculator`,scope:`hoist`,fields:{demo_unit:e.unit({label:`lab.field_demo.fields.demo_unit`,options:`weight`}),demo_amount:e.amount({label:`lab.field_demo.fields.demo_amount`,unitFrom:`demo_unit`})}}),group17:e.group({label:`lab.field_demo.groups.datetimes`,icon:`lucide:calendar-clock`,scope:`hoist`,fields:{datetimes_multi:e.datetime({label:`lab.field_demo.fields.datetimes_multi`,multiple:!0})}}),group18:e.group({label:`lab.field_demo.groups.times_multi`,icon:`lucide:alarm-clock`,scope:`hoist`,fields:{times_multi:e.time({label:`lab.field_demo.fields.times_multi`,multiple:!0})}}),sheet:e.sheet({label:`lab.field_demo.fields.demo_sheet`,icon:`lucide:grid-2x2`,fields:{row1:{sheet_a1:e.string({label:`lab.field_demo.fields.sheet_a1`}),sheet_b1:e.string({label:`lab.field_demo.fields.sheet_b1`})},row2:{sheet_a2:e.string({label:`lab.field_demo.fields.sheet_a2`}),sheet_b2:e.string({label:`lab.field_demo.fields.sheet_b2`})}}}),demo_table_specs:e.row({scope:`nest`,multiple:!0,label:`lab.field_demo.fields.demo_table_specs`,icon:`lucide:table`,fields:{param:e.string({label:`lab.field_demo.per_row.param`}),val:e.string({label:`lab.field_demo.per_row.val`})}}),demo_check_multi:e.check({label:`lab.field_demo.fields.demo_check_multi`,multiple:!0}),demo_check_stages:e.check({label:`lab.field_demo.fields.demo_check_stages`,slots:[`lab.field_demo.fields.stage_ordered`,`lab.field_demo.fields.stage_paid`,`lab.field_demo.fields.stage_shipped`],multiple:!0}),demo_stepper:e.stepper({label:`lab.field_demo.fields.demo_stepper`,options:[{value:`ordered`,title:`lab.field_demo.options.stage.ordered`},{value:`packed`,title:`lab.field_demo.options.stage.packed`},{value:`shipped`,title:`lab.field_demo.options.stage.shipped`},{value:`delivered`,title:`lab.field_demo.options.stage.delivered`}]}),divider:e.divider({label:`lab.field_demo.blocks.divider`}),bento:e.bento({label:`lab.field_demo.blocks.bento`,icon:`lucide:layout-grid`,fields:{number_int:{span:`2x1`,el:e.int({label:`lab.field_demo.fields.number_int`,rules:{min:0,max:100}})},color_multi:e.color({label:`lab.field_demo.fields.color_multi`,multiple:!0}),numbers_multi:e.real({label:`lab.field_demo.fields.numbers_multi`,multiple:!0}),dates_multi:{span:`2x1`,el:e.date({label:`lab.field_demo.fields.dates_multi`,multiple:!0})}}}),group19:e.group({label:`lab.field_demo.groups.split_rating`,icon:`lucide:columns-2`,fields:{split:e.split({ratio:[1,1],columns:[{rating_split_5:e.rating({label:`lab.field_demo.fields.rating_split_5`})},{rating_split_10:e.rating({label:`lab.field_demo.fields.rating_split_10`,rules:{max:10}})}]})},scope:`hoist`}),grid:e.grid({label:`lab.field_demo.blocks.grid`,icon:`lucide:clock`,columns:2,fields:{time_field:e.time({label:`lab.field_demo.fields.time_field`})}}),group20:e.group({label:`lab.field_demo.groups.spread`,icon:`lucide:newspaper`,fields:{spread:e.spread({visual:{cover:e.cover({label:`lab.field_demo.fields.cover`})},quote:{nolabel_note:e.string({ui:{noEditControl:!0}})},facts:{origin:e.country({label:`lab.field_demo.fields.origin`}),tags_field:e.tags({label:`lab.field_demo.fields.tags_field`,options:[`alpha`,`beta`,`gamma`,`delta`]})}})},scope:`hoist`}),group21:e.group({label:`lab.field_demo.groups.aside`,icon:`lucide:panel-right`,scope:`hoist`,fields:{aside:e.aside({fields:{demo_weight:e.weight({label:`lab.field_demo.fields.demo_weight`})},aside:{demo_dimensions:e.dimensions({label:`lab.field_demo.fields.demo_dimensions`})}})}}),tabs:e.tabs({tabs:[{name:`tab1`,label:`lab.field_demo.blocks.tab1`,fields:{demo_datasize:s.dataSize({label:`lab.field_demo.fields.demo_datasize`}),demo_ram:s.ram({label:`lab.field_demo.fields.demo_ram`})}},{name:`tab2`,label:`lab.field_demo.blocks.tab2`,fields:{demo_disk:s.diskSize({label:`lab.field_demo.fields.demo_disk`}),ip_addr:s.ip({label:`lab.field_demo.fields.ip_addr`})}}]}),accordion:e.accordion({sections:[{name:`section1`,label:`lab.field_demo.blocks.section1`,open:!0,fields:{demo_weekday:e.string({label:`lab.field_demo.fields.demo_weekday`,options:`weekdays`,strict:!0,noSearch:!0}),demo_weekdays:e.string({label:`lab.field_demo.fields.demo_weekdays`,options:`weekdays`,multiple:!0,strict:!0,noSearch:!0})}},{name:`section2`,label:`lab.field_demo.blocks.section2`,fields:{cidr_subnet:s.cidr({label:`lab.field_demo.fields.cidr_subnet`}),ip_addrs:s.ip({label:`lab.field_demo.fields.ip_addrs`,multiple:!0})}}]}),divider2:e.divider({label:`lab.field_demo.blocks.leaves`}),prose:e.prose({label:`lab.field_demo.blocks.prose`,icon:`lucide:file-text`,dropCap:`markdown`,fields:{markdown:e.markdown({label:`lab.field_demo.fields.markdown`,rules:{max:5e3}}),text_multiline:e.text({label:`lab.field_demo.fields.text_multiline`,rules:{max:500}})}}),plaque:e.plaque({label:`lab.field_demo.blocks.plaque`,icon:`lucide:cpu`,title:{mac:s.mac({label:`lab.field_demo.fields.mac`})},subtitle:{imei:s.imei({label:`lab.field_demo.fields.imei`})}}),ledger:e.ledger({label:`lab.field_demo.blocks.ledger`,icon:`lucide:list`,fields:{duration_short:e.duration({label:`lab.field_demo.fields.duration_short`,rules:{max:28800,step:300}}),measured_weight:e.measured({label:`lab.field_demo.fields.measured_weight`,units:`weight`})}}),stats:e.stats({label:`lab.field_demo.blocks.stats`,icon:`lucide:thermometer`,fields:{tempRange:e.realRange({label:`lab.field_demo.fields.tempRange`})}}),facets:e.facets({label:`lab.field_demo.blocks.facets`,icon:`lucide:sun-medium`,fields:{day_period:e.string({label:`lab.field_demo.fields.day_period`,options:`day-periods`,strict:!0,noSearch:!0})}}),terminal:e.terminal({label:`lab.field_demo.blocks.terminal`,icon:`lucide:terminal`,caption:`lab.field_demo.blocks.terminal_caption`,fields:{code:e.snippet({label:`lab.field_demo.fields.code`,rules:{language:`yaml`,max:5e3}})}}),callout:e.callout({label:`lab.field_demo.blocks.callout`,icon:`lucide:shield-check`,tone:`warn`,fields:{agree:e.triState({label:`lab.field_demo.fields.agree`}),boolean:e.boolean({label:`lab.field_demo.fields.boolean`})}}),compare:e.compare({label:`lab.field_demo.blocks.compare`,icon:`lucide:git-compare`,leftLabel:`lab.field_demo.blocks.compare_left`,rightLabel:`lab.field_demo.blocks.compare_right`,left:{country_multi:e.string({label:`lab.field_demo.fields.country_multi`,options:`countries`,multiple:!0,strict:!0,noSearch:!0})},right:{demo_check:e.check({label:`lab.field_demo.fields.demo_check`}),select_multi:e.string({label:`lab.field_demo.fields.select_multi`,multiple:!0,strict:!0,noSearch:!0,options:[{value:`red`,title:`lab.field_demo.options.select.red`},{value:`green`,title:`lab.field_demo.options.select.green`},{value:`blue`,title:`lab.field_demo.options.select.blue`}]})}}),group22:e.group({label:`lab.field_demo.groups.figure`,icon:`lucide:image`,fields:{figure:e.figure({image:{image_gallery:e.image({label:`lab.field_demo.fields.image_gallery`,multiple:!0})},caption:{small_text:e.smallText({label:`lab.field_demo.fields.small_text`,rules:{max:500}})}})},scope:`hoist`}),group23:e.group({label:`lab.field_demo.groups.illustrated`,icon:`lucide:image`,scope:`hoist`,fields:{illustrated_one:e.illustrated({label:`lab.field_demo.fields.illustrated_one`}),illustrated_many:e.illustrated({label:`lab.field_demo.fields.illustrated_many`,multiple:!0,fields:{text:e.markdown({}),image:e.image({})}})}}),group24:e.group({label:`lab.field_demo.groups.epigraph`,icon:`lucide:quote`,fields:{epigraph:e.epigraph({source:{textarea:e.text({label:`lab.field_demo.fields.textarea`,rules:{max:1e3},ui:{noLabel:!0}})},attribution:{compact_note:e.string({label:`lab.field_demo.fields.compact_note`,ui:{noEditControl:!0}})}})},scope:`hoist`}),group25:e.group({label:`lab.field_demo.groups.masthead`,icon:`lucide:calendar-days`,fields:{masthead:e.masthead({overline:{day_period_multi:e.string({label:`lab.field_demo.fields.day_period_multi`,options:`day-periods`,multiple:!0,strict:!0,noSearch:!0})},title:{birthYear:e.date({label:`lab.field_demo.fields.birthYear`,rules:{granularity:`year`}})}})},scope:`hoist`}),divider3:e.divider({label:`lab.field_demo.blocks.domain`}),group26:e.group({label:`lab.field_demo.groups.timeline`,icon:`lucide:history`,fields:{timeline:e.timeline({fields:{date_future:e.date({label:`lab.field_demo.fields.date_future`,rules:{min:`today`}}),demo_reminder:e.reminder({label:`lab.field_demo.fields.demo_reminder`,rules:{lead:14}})}})},scope:`hoist`}),group27:e.group({label:`lab.field_demo.groups.countdown`,icon:`lucide:timer`,fields:{countdown:e.countdown({source:{datetime:e.datetime({label:`lab.field_demo.fields.datetime`})},caption:`lab.field_demo.blocks.countdown_caption`})},scope:`hoist`}),group28:e.group({label:`lab.field_demo.groups.deck`,icon:`lucide:layers`,fields:{deck:e.deck({source:{relation_multi:e.relation({label:`lab.field_demo.fields.relation_multi`,options:t({library:`lab`,shelf:`field_demo_child`}),multiple:!0})}})},scope:`hoist`}),group29:e.group({label:`lab.field_demo.groups.people`,icon:`lucide:user`,fields:{people:e.people({source:{relation_single:e.relation({label:`lab.field_demo.fields.relation_single`,options:t({library:`lab`,shelf:`field_demo_child`})})}})},scope:`hoist`}),group30:e.group({label:`lab.field_demo.groups.identity`,icon:`lucide:contact`,fields:{identity:e.identity({name:{text_plain:e.string({label:`lab.field_demo.fields.text_plain`,rules:{max:200}})},role:{text_minmax:e.string({label:`lab.field_demo.fields.text_minmax`,rules:{min:3,max:20}})},channels:{text_tel:e.tel({label:`lab.field_demo.fields.text_tel`}),text_email:e.email({label:`lab.field_demo.fields.text_email`})}})},scope:`hoist`}),group31:e.group({label:`lab.field_demo.groups.score`,icon:`lucide:gauge`,fields:{score:e.score({source:{integer:e.int({label:`lab.field_demo.fields.integer`,rules:{min:1,max:12}})},max:12})},scope:`hoist`}),group32:e.group({label:`lab.field_demo.groups.status`,icon:`lucide:check-circle`,fields:{status:e.status({source:{select:e.string({label:`lab.field_demo.fields.select`,strict:!0,noSearch:!0,options:[{value:`red`,title:`lab.field_demo.options.select.red`},{value:`green`,title:`lab.field_demo.options.select.green`},{value:`blue`,title:`lab.field_demo.options.select.blue`}]})}})},scope:`hoist`}),group33:e.group({label:`lab.field_demo.groups.meter`,icon:`lucide:sliders-horizontal`,fields:{meter:e.meter({source:{meter_value:e.int({label:`lab.field_demo.fields.meter_value`,rules:{min:0,max:50}})},min:0,max:50})},scope:`hoist`}),group34:e.group({label:`lab.field_demo.groups.receipt`,icon:`lucide:receipt`,scope:`hoist`,fields:{receipt:e.receipt({fields:{number_decimal:e.real({label:`lab.field_demo.fields.number_decimal`,rules:{min:0,max:1e3}})},total:{price:e.money({label:`lab.field_demo.fields.price`})}}),currency:e.currency({label:`core.fields.currency`,default:`UAH`})}}),group35:e.group({label:`lab.field_demo.groups.balance`,icon:`lucide:scale`,fields:{balance:e.balance({source:{measured_currency:e.measured({label:`lab.field_demo.fields.measured_currency`,units:`currency`})},caption:`lab.field_demo.blocks.balance_caption`})},scope:`hoist`}),group36:e.group({label:`lab.field_demo.groups.route`,icon:`lucide:map-pin`,fields:{route:e.route({from:{country:e.string({label:`lab.field_demo.fields.country`,options:`countries`,strict:!0,noSearch:!0})},to:{place:e.geo({label:`lab.field_demo.fields.place`})}})},scope:`hoist`}),calendar:e.calendar({source:{calendar_dates:e.group({scope:`nest`,label:`lab.field_demo.fields.calendar_dates`,icon:`lucide:calendar`,multiple:!0,fields:{occurs_on:e.date({label:`lab.field_demo.per_row.occurs_on`})}})},date:`occurs_on`}),journal:e.journal({source:{journal_log:e.group({scope:`nest`,label:`lab.field_demo.fields.journal_log`,icon:`lucide:book-open`,multiple:!0,fields:{logged_at:e.date({label:`lab.field_demo.per_row.logged_at`}),entry:e.text({label:`lab.field_demo.per_row.entry`,rules:{max:500}})}})},date:`logged_at`,text:`entry`}),group37:e.group({label:`lab.field_demo.groups.nutrition`,icon:`lucide:flame`,scope:`hoist`,fields:{nutrition:e.nutrition({energy:{ageRange:e.numberRange({label:`lab.field_demo.fields.ageRange`,rules:{min:0,max:120}})},fields:{measured_custom:e.measured({label:`lab.field_demo.fields.measured_custom`,units:[{value:`shot`,label:`lab.field_demo.units.shot`},{value:`scoop`,label:`lab.field_demo.units.scoop`}]})}})}}),group38:e.group({label:`lab.field_demo.groups.specimen`,icon:`lucide:palette`,fields:{specimen:e.specimen({title:{color_name:e.string({label:`lab.field_demo.fields.color_name`,options:`colors`,strict:!0,noSearch:!0})},subtitle:{color_hex:e.color({label:`lab.field_demo.fields.color_hex`})}})},scope:`hoist`}),manifest:e.manifest({source:{row_ingredients:e.group({scope:`nest`,label:`lab.field_demo.fields.row_ingredients`,icon:`lucide:carrot`,multiple:!0,rules:{unique:[`product`]},fields:{product:e.relation({label:`lab.field_demo.per_row.product`,options:t({library:`kitchen`,shelf:`food_item`})}),amount:e.real({label:`lab.field_demo.per_row.amount`,rules:{min:0}}),stock:e.measured({label:`lab.field_demo.per_row.stock`,units:`cooking`,cache:0,value:async e=>(await e.ref?.(`product`))?.quantity??null})}})},quantity:`amount`,item:`product`}),table:e.table({label:`lab.field_demo.fields.demo_table`,source:{demo_table_rows:e.row({scope:`nest`,label:`lab.field_demo.fields.demo_table`,multiple:!0,fields:{part:e.string({label:`lab.field_demo.table.part`}),vendor:e.string({label:`lab.field_demo.table.vendor`}),qty:e.int({label:`lab.field_demo.table.qty`})}})},sort:`qty`,dir:`desc`,groupBy:`vendor`,totals:{qty:`sum`},numbered:!0}),group39:e.group({label:`lab.field_demo.groups.idcard`,icon:`lucide:credit-card`,fields:{idcard:e.idcard({number:{iban:c.iban({label:`lab.field_demo.fields.iban`})},meta:{date:e.date({label:`lab.field_demo.fields.date`})}})},scope:`hoist`}),divider4:e.divider({label:`lab.field_demo.blocks.computed`}),chart:e.chart({source:{chart_readings:e.group({scope:`nest`,label:`lab.field_demo.fields.chart_readings`,icon:`lucide:trending-up`,multiple:!0,fields:{measured_on:e.date({label:`lab.field_demo.per_row.measured_on`}),reading:e.real({label:`lab.field_demo.per_row.reading`})}})},value:`reading`,date:`measured_on`,delta:!0}),heatmap:e.heatmap({source:{heatmap_sessions:e.group({scope:`nest`,label:`lab.field_demo.fields.heatmap_sessions`,icon:`lucide:calendar-check`,multiple:!0,fields:{happened_on:e.date({label:`lab.field_demo.per_row.happened_on`})}})},date:`happened_on`}),divider5:e.divider(),group40:e.group({label:`lab.field_demo.groups.periods`,icon:`lucide:calendar-range`,scope:`hoist`,fields:{periods:e.period({label:`lab.field_demo.fields.periods`,multiple:!0})}}),group41:e.group({label:`lab.field_demo.groups.json`,icon:`lucide:code-2`,scope:`hoist`,fields:{json:e.json({label:`lab.field_demo.fields.json`,ui:{emphasis:`muted`}})}}),row_single:e.group({scope:`nest`,label:`lab.field_demo.fields.row_single`,icon:`lucide:rows-3`,fields:{env:e.string({label:`lab.field_demo.per_row.env`,strict:!0,noSearch:!0,options:[{value:`dev`,title:`lab.field_demo.options.env.dev`},{value:`prod`,title:`lab.field_demo.options.env.prod`}]}),url:e.url({label:`lab.field_demo.per_row.url`}),token:e.password({label:`lab.field_demo.per_row.token`})}}),variants:e.keyed({label:`lab.field_demo.fields.variants`,icon:`lucide:languages`,fields:{lang:e.string({label:`lab.field_demo.per_row.lang`,options:`languages`,strict:!0,noSearch:!0}),name:e.string({label:`lab.field_demo.per_row.name`}),surname:e.string({label:`lab.field_demo.per_row.surname`})},by:`lang`}),perkey_fixed:e.keyed({label:`lab.field_demo.fields.perkey_fixed`,icon:`lucide:key`,fixed:!0,fields:{size:e.string({label:`lab.field_demo.per_row.size`,strict:!0,noSearch:!0,options:[{value:`s`,title:`lab.field_demo.options.size.s`},{value:`m`,title:`lab.field_demo.options.size.m`},{value:`l`,title:`lab.field_demo.options.size.l`}]}),qty:e.int({label:`lab.field_demo.per_row.qty`,rules:{min:0}})},by:`size`}),coll_text:e.group({scope:`nest`,label:`lab.field_demo.fields.coll_text`,icon:`lucide:type`,multiple:!0,fields:{person:e.relation({label:`lab.field_demo.fields.pp_person`,options:t({library:`people`,shelf:`person`})}),value:e.string({label:`lab.field_demo.fields.pp_value`})}}),coll_integer:e.group({scope:`nest`,label:`lab.field_demo.fields.coll_integer`,icon:`lucide:hash`,multiple:!0,fields:{person:e.relation({label:`lab.field_demo.fields.pp_person`,options:t({library:`people`,shelf:`person`})}),value:e.int({label:`lab.field_demo.fields.pp_value`})}}),coll_select:e.group({scope:`nest`,label:`lab.field_demo.fields.coll_select`,icon:`lucide:list-checks`,multiple:!0,fields:{person:e.relation({label:`lab.field_demo.fields.pp_person`,options:t({library:`people`,shelf:`person`})}),value:e.string({label:`lab.field_demo.fields.pp_value`,strict:!0,noSearch:!0,options:[{value:`s`,title:`lab.field_demo.options.pp_select.s`},{value:`m`,title:`lab.field_demo.options.pp_select.m`},{value:`l`,title:`lab.field_demo.options.pp_select.l`}]})}}),group42:e.group({label:`lab.field_demo.groups.per_weekday`,icon:`lucide:calendar-days`,scope:`hoist`,fields:{per_weekday:e.perWeekday({label:`lab.field_demo.fields.per_weekday`,rules:{min:0,max:5,step:.5}})}}),per_weekday_per_person:e.group({scope:`nest`,label:`lab.field_demo.fields.per_weekday_per_person`,icon:`lucide:users`,multiple:!0,fields:{person:e.relation({label:`lab.field_demo.fields.pp_person`,options:t({library:`people`,shelf:`person`})}),value:e.perWeekday({label:`lab.field_demo.fields.pp_value`,rules:{min:0,max:10,step:1}})}}),group43:e.group({label:`lab.field_demo.groups.media_carousel`,icon:`lucide:images`,scope:`hoist`,fields:{avatar_row:e.avatar({label:`lab.field_demo.fields.avatar_row`,multiple:!0}),cover_carousel:e.cover({label:`lab.field_demo.fields.cover_carousel`,multiple:!0})}}),group44:e.group({label:`lab.field_demo.groups.files`,icon:`lucide:paperclip`,scope:`hoist`,fields:{attachment:e.file({label:`lab.field_demo.fields.attachment`}),doc:e.document({label:`lab.field_demo.fields.doc`}),voice:e.audio({label:`lab.field_demo.fields.voice`}),clip:e.video({label:`lab.field_demo.fields.clip`}),gallery:e.media({label:`lab.field_demo.fields.gallery`,multiple:!0}),attachment_one:e.attachment({label:`lab.field_demo.fields.attachment_one`}),attachment_many:e.attachment({label:`lab.field_demo.fields.attachment_many`,multiple:!0,fields:{file:e.document({})}})}}),group45:e.group({label:`lab.field_demo.groups.key_value`,icon:`lucide:key-round`,scope:`hoist`,fields:{key_value:e.keyValue({label:`lab.field_demo.fields.key_value`,multiple:!0}),key_value_secret:e.keyValue({label:`lab.field_demo.fields.key_value_secret`,fields:{value:e.password({label:``})}})}}),services_bylist:e.group({scope:`nest`,label:`lab.field_demo.fields.services_bylist`,icon:`lucide:server`,multiple:!0,fields:{type:e.string({label:`devices.service.type`,options:`service-types`,strict:!0,noSearch:!0}),url:e.url({label:`devices.service.url`}),login:e.string({label:`devices.service.login`}),password:e.password({label:`devices.service.password`,ui:{emphasis:`muted`}}),token:e.password({label:`devices.service.token`})}}),group46:e.group({label:`lab.field_demo.groups.classifier`,icon:`lucide:toggle-right`,scope:`hoist`,fields:{type:e.string({label:`lab.field_demo.fields.type`,strict:!0,noSearch:!0,options:[{value:`basic`,title:`lab.field_demo.options.type.basic`},{value:`advanced`,title:`lab.field_demo.options.type.advanced`}]})}})}}),u=n({shelf:`field_demo_child`,library:`lab`,label:`lab.field_demo_child.label`,icon:`lucide:link`,standalone:!1,fields:{name:e.title({label:`core.fields.name`}),demo_id:e.relation({label:`lab.field_demo_child.fields.demo_id`,options:t({library:`lab`,shelf:`field_demo`})}),notes:e.text({label:`lab.field_demo_child.fields.notes`,rules:{max:500}})}}),d=r({id:`demo_extra`,label:`lab.demo_extra.label`,icon:`lucide:plus`,attachTo:[{library:`lab`,shelf:`field_demo`}],showWhen:{type:`advanced`},fields:{extra_text:e.string({label:`lab.demo_extra.fields.extra_text`,rules:{max:200}}),extra_number:e.int({label:`lab.demo_extra.fields.extra_number`,rules:{min:0}}),extra_flag:e.boolean({label:`lab.demo_extra.fields.extra_flag`})}}),f=i({id:`lab`,version:`1.0.0`,dependsOn:[`people`,`kitchen`,`devices`,`finance`,`geo`],settings:o({label:`lab.settings.label`,icon:`lucide:flask-conical`,fields:{info:e.info(`lab.settings.intro`),greeting:e.string({label:`lab.settings.fields.greeting`,rules:{max:80}}),enabled:e.boolean({label:`lab.settings.fields.enabled`}),mode:e.string({label:`lab.settings.fields.mode`,strict:!0,noSearch:!0,options:[{value:`fast`,title:`lab.settings.modes.fast`},{value:`safe`,title:`lab.settings.modes.safe`},{value:`debug`,title:`lab.settings.modes.debug`}]}),retries:e.int({label:`lab.settings.fields.retries`,rules:{min:0,max:10}}),divider:e.divider(),info2:e.info(`lab.settings.actions_info`),button:e.button({label:`lab.settings.run_button`,value:`lab.demoAction`,icon:`lucide:play`}),button2:e.button({label:`lab.settings.fail_button`,value:`lab.demoFail`,icon:`lucide:bug`,variant:`destructive`}),button3:e.button({label:`lab.settings.variants.default`,value:`lab.demoAction`,icon:`lucide:check`,variant:`default`}),button4:e.button({label:`lab.settings.variants.secondary`,value:`lab.demoAction`,icon:`lucide:settings`,variant:`secondary`}),button5:e.button({label:`lab.settings.variants.ghost`,value:`lab.demoAction`,icon:`lucide:ghost`,variant:`ghost`}),button6:e.button({label:`lab.settings.variants.link`,value:`lab.demoAction`,icon:`lucide:link`,variant:`link`})}}),libraries:[{meta:a({id:`lab`,label:`lab.library.label`,icon:`lucide:flask-conical`,agent:`Developer demo of field types — not real household data; ignore unless explicitly asked.`}),shelves:[l,u]}],extends_:[d]});export{f as default};
1
+ import{n as e,r as t}from"./fields-BtCN_frr.js";import{s as n}from"./shelf-CRUDKiTz.js";import{t as r}from"./extend-BTkr7oJ8.js";import{n as i,r as a}from"./plugin-CFEkHH3f.js";import{t as o}from"./settings-BfEurOH1.js";import{t as s}from"./src-Cr_oHzOc.js";import{t as c}from"./src-DB2N_cct.js";var l=n({shelf:`field_demo`,library:`lab`,label:`lab.field_demo.label`,icon:`lucide:flask-conical`,views:{inline:[`name`,`select`],listKind:`map`,list:[`place`,`text_minmax`,`integer`,`boolean`,`select`,`rating_5`,`measured_currency`]},fields:{name:e.title({label:`core.fields.name`}),image:e.image({label:`lab.field_demo.fields.image`,ui:{role:`cover`}}),avatar:e.avatar({label:`lab.field_demo.fields.avatar`,ui:{role:`avatar`}}),info:e.info(`lab.field_demo.info.intro`),button:e.button({label:`lab.field_demo.fields.button_demo`,value:`lab.demoAction`,icon:`lucide:zap`,variant:`outline`}),properties:e.properties({label:`lab.field_demo.groups.properties_inspector`,icon:`lucide:sliders-horizontal`,columns:4,fields:{demo_status:e.string({label:`lab.field_demo.fields.demo_status`,ui:{span:3}}),demo_author:e.string({label:`lab.field_demo.fields.demo_author`,ui:{span:3}}),demo_prop_rating:e.rating({label:`lab.field_demo.fields.rating_5`,ui:{span:3}}),demo_prop_date:e.date({label:`lab.field_demo.fields.date`,ui:{span:3}})}}),stack:e.stack({label:`lab.field_demo.groups.vertical_stack`,icon:`lucide:layers`,fields:{stack_note_1:e.string({label:`lab.field_demo.fields.stack_note_1`}),stack_note_2:e.string({label:`lab.field_demo.fields.stack_note_2`})}}),group:e.group({label:`lab.field_demo.groups.embeds`,icon:`lucide:tv`,scope:`hoist`,fields:{embed_wide:e.embed({label:`lab.field_demo.fields.embed_wide`,multiple:!0}),embed_narrow:e.embed({label:`lab.field_demo.fields.embed_narrow`,multiple:!0})}}),group2:e.group({label:`lab.field_demo.groups.text_pattern`,icon:`lucide:type`,scope:`hoist`,fields:{text_pattern:e.string({label:`lab.field_demo.fields.text_pattern`,rules:{pattern:`^[A-Za-z]+$`,messageKey:`lab.field_demo.validation.letters_only`}})}}),group3:e.group({label:`lab.field_demo.groups.text_email`,icon:`lucide:mail`,scope:`hoist`,fields:{text_emails:e.email({label:`lab.field_demo.fields.text_emails`,multiple:!0})}}),group4:e.group({label:`lab.field_demo.groups.text_url`,icon:`lucide:link`,scope:`hoist`,fields:{text_url:e.url({label:`lab.field_demo.fields.text_url`})}}),group5:e.group({label:`lab.field_demo.groups.text_password`,icon:`lucide:key-round`,scope:`hoist`,fields:{text_password:e.password({label:`lab.field_demo.fields.text_password`})}}),group6:e.group({label:`lab.field_demo.groups.slug_link`,icon:`lucide:link-2`,scope:`hoist`,fields:{demo_slug:e.slug({label:`lab.field_demo.fields.demo_slug`}),demo_link:e.link({label:`lab.field_demo.fields.demo_link`})}}),group7:e.group({label:`lab.field_demo.groups.string_mask`,icon:`lucide:credit-card`,scope:`hoist`,fields:{demo_mask_card:e.string({label:`lab.field_demo.fields.demo_mask_card`,rules:{pattern:`^\\d{4} \\d{4} \\d{4} \\d{4}$`}})}}),group8:e.group({label:`lab.field_demo.groups.percent_year`,icon:`lucide:percent`,scope:`hoist`,fields:{demo_percent:e.percent({label:`lab.field_demo.fields.demo_percent`}),demo_year:e.year({label:`lab.field_demo.fields.demo_year`})}}),group9:e.group({label:`lab.field_demo.groups.local_paths`,icon:`lucide:folder-tree`,scope:`hoist`,fields:{demo_local_dir:e.localDir({label:`lab.field_demo.fields.demo_local_dir`}),demo_local_file:e.localFile({label:`lab.field_demo.fields.demo_local_file`})}}),group10:e.group({label:`lab.field_demo.groups.tag_i18n`,icon:`lucide:tags`,scope:`hoist`,fields:{demo_tag:e.tag({label:`lab.field_demo.fields.demo_tag`,options:[`new`,`sale`,`featured`]}),demo_i18n:e.i18n({label:`lab.field_demo.fields.demo_i18n`})}}),group11:e.group({label:`lab.field_demo.groups.source_poster`,icon:`lucide:file-code`,scope:`hoist`,fields:{demo_source:e.source({label:`lab.field_demo.fields.demo_source`}),demo_poster:e.poster({label:`lab.field_demo.fields.demo_poster`})}}),group12:e.group({label:`lab.field_demo.groups.ranges`,icon:`lucide:chevrons-left-right`,scope:`hoist`,fields:{demo_number_range:e.numberRange({label:`lab.field_demo.fields.demo_number_range`}),demo_real_range:e.realRange({label:`lab.field_demo.fields.demo_real_range`})}}),group13:e.group({label:`lab.field_demo.groups.date_month`,icon:`lucide:calendar`,scope:`hoist`,fields:{demo_month:e.date({label:`lab.field_demo.fields.demo_month`,rules:{granularity:`month`}})}}),group14:e.group({label:`lab.field_demo.groups.ratings`,icon:`lucide:star`,scope:`hoist`,fields:{rating_5:e.rating({label:`lab.field_demo.fields.rating_5`}),rating_10:e.rating({label:`lab.field_demo.fields.rating_10`,rules:{max:10}})}}),group15:e.group({label:`lab.field_demo.groups.hostname`,icon:`lucide:globe`,scope:`hoist`,fields:{demo_hostname:s.hostname({label:`lab.field_demo.fields.demo_hostname`})}}),group16:e.group({label:`lab.field_demo.groups.unit_amount`,icon:`lucide:calculator`,scope:`hoist`,fields:{demo_unit:e.unit({label:`lab.field_demo.fields.demo_unit`,options:`weight`}),demo_amount:e.amount({label:`lab.field_demo.fields.demo_amount`,unitFrom:`demo_unit`})}}),group17:e.group({label:`lab.field_demo.groups.datetimes`,icon:`lucide:calendar-clock`,scope:`hoist`,fields:{datetimes_multi:e.datetime({label:`lab.field_demo.fields.datetimes_multi`,multiple:!0})}}),group18:e.group({label:`lab.field_demo.groups.times_multi`,icon:`lucide:alarm-clock`,scope:`hoist`,fields:{times_multi:e.time({label:`lab.field_demo.fields.times_multi`,multiple:!0})}}),sheet:e.sheet({label:`lab.field_demo.fields.demo_sheet`,icon:`lucide:grid-2x2`,fields:{row1:{sheet_a1:e.string({label:`lab.field_demo.fields.sheet_a1`}),sheet_b1:e.string({label:`lab.field_demo.fields.sheet_b1`})},row2:{sheet_a2:e.string({label:`lab.field_demo.fields.sheet_a2`}),sheet_b2:e.string({label:`lab.field_demo.fields.sheet_b2`})}}}),demo_table_specs:e.row({scope:`nest`,multiple:!0,label:`lab.field_demo.fields.demo_table_specs`,icon:`lucide:table`,fields:{param:e.string({label:`lab.field_demo.per_row.param`}),val:e.string({label:`lab.field_demo.per_row.val`})}}),demo_check_multi:e.check({label:`lab.field_demo.fields.demo_check_multi`,multiple:!0}),demo_check_stages:e.check({label:`lab.field_demo.fields.demo_check_stages`,slots:[`lab.field_demo.fields.stage_ordered`,`lab.field_demo.fields.stage_paid`,`lab.field_demo.fields.stage_shipped`],multiple:!0}),demo_stepper:e.stepper({label:`lab.field_demo.fields.demo_stepper`,options:[{value:`ordered`,title:`lab.field_demo.options.stage.ordered`},{value:`packed`,title:`lab.field_demo.options.stage.packed`},{value:`shipped`,title:`lab.field_demo.options.stage.shipped`},{value:`delivered`,title:`lab.field_demo.options.stage.delivered`}]}),divider:e.divider({label:`lab.field_demo.blocks.divider`}),bento:e.bento({label:`lab.field_demo.blocks.bento`,icon:`lucide:layout-grid`,fields:{number_int:{span:`2x1`,el:e.int({label:`lab.field_demo.fields.number_int`,rules:{min:0,max:100}})},color_multi:e.color({label:`lab.field_demo.fields.color_multi`,multiple:!0}),numbers_multi:e.real({label:`lab.field_demo.fields.numbers_multi`,multiple:!0}),dates_multi:{span:`2x1`,el:e.date({label:`lab.field_demo.fields.dates_multi`,multiple:!0})}}}),group19:e.group({label:`lab.field_demo.groups.split_rating`,icon:`lucide:columns-2`,fields:{split:e.split({ratio:[1,1],columns:[{rating_split_5:e.rating({label:`lab.field_demo.fields.rating_split_5`})},{rating_split_10:e.rating({label:`lab.field_demo.fields.rating_split_10`,rules:{max:10}})}]})},scope:`hoist`}),grid:e.grid({label:`lab.field_demo.blocks.grid`,icon:`lucide:clock`,columns:2,fields:{time_field:e.time({label:`lab.field_demo.fields.time_field`})}}),group20:e.group({label:`lab.field_demo.groups.spread`,icon:`lucide:newspaper`,fields:{spread:e.spread({visual:{cover:e.cover({label:`lab.field_demo.fields.cover`})},quote:{nolabel_note:e.string({ui:{noEditControl:!0}})},facts:{origin:e.country({label:`lab.field_demo.fields.origin`}),tags_field:e.tags({label:`lab.field_demo.fields.tags_field`,options:[`alpha`,`beta`,`gamma`,`delta`]})}})},scope:`hoist`}),group21:e.group({label:`lab.field_demo.groups.aside`,icon:`lucide:panel-right`,scope:`hoist`,fields:{aside:e.aside({fields:{demo_weight:e.weight({label:`lab.field_demo.fields.demo_weight`})},aside:{demo_dimensions:e.dimensions({label:`lab.field_demo.fields.demo_dimensions`})}})}}),tabs:e.tabs({tabs:[{name:`tab1`,label:`lab.field_demo.blocks.tab1`,fields:{demo_datasize:s.dataSize({label:`lab.field_demo.fields.demo_datasize`}),demo_ram:s.ram({label:`lab.field_demo.fields.demo_ram`})}},{name:`tab2`,label:`lab.field_demo.blocks.tab2`,fields:{demo_disk:s.diskSize({label:`lab.field_demo.fields.demo_disk`}),ip_addr:s.ip({label:`lab.field_demo.fields.ip_addr`})}}]}),accordion:e.accordion({sections:[{name:`section1`,label:`lab.field_demo.blocks.section1`,open:!0,fields:{demo_weekday:e.string({label:`lab.field_demo.fields.demo_weekday`,options:`weekdays`,strict:!0,noSearch:!0}),demo_weekdays:e.string({label:`lab.field_demo.fields.demo_weekdays`,options:`weekdays`,multiple:!0,strict:!0,noSearch:!0})}},{name:`section2`,label:`lab.field_demo.blocks.section2`,fields:{cidr_subnet:s.cidr({label:`lab.field_demo.fields.cidr_subnet`}),ip_addrs:s.ip({label:`lab.field_demo.fields.ip_addrs`,multiple:!0})}}]}),divider2:e.divider({label:`lab.field_demo.blocks.leaves`}),prose:e.prose({label:`lab.field_demo.blocks.prose`,icon:`lucide:file-text`,dropCap:`markdown`,fields:{markdown:e.markdown({label:`lab.field_demo.fields.markdown`,rules:{max:5e3}}),text_multiline:e.text({label:`lab.field_demo.fields.text_multiline`,rules:{max:500}})}}),plaque:e.plaque({label:`lab.field_demo.blocks.plaque`,icon:`lucide:cpu`,title:{mac:s.mac({label:`lab.field_demo.fields.mac`})},subtitle:{imei:s.imei({label:`lab.field_demo.fields.imei`})}}),ledger:e.ledger({label:`lab.field_demo.blocks.ledger`,icon:`lucide:list`,fields:{duration_short:e.duration({label:`lab.field_demo.fields.duration_short`,rules:{max:28800,step:300}}),measured_weight:e.measured({label:`lab.field_demo.fields.measured_weight`,units:`weight`})}}),stats:e.stats({label:`lab.field_demo.blocks.stats`,icon:`lucide:thermometer`,fields:{tempRange:e.realRange({label:`lab.field_demo.fields.tempRange`})}}),facets:e.facets({label:`lab.field_demo.blocks.facets`,icon:`lucide:sun-medium`,fields:{day_period:e.string({label:`lab.field_demo.fields.day_period`,options:`day-periods`,strict:!0,noSearch:!0})}}),terminal:e.terminal({label:`lab.field_demo.blocks.terminal`,icon:`lucide:terminal`,caption:`lab.field_demo.blocks.terminal_caption`,fields:{code:e.snippet({label:`lab.field_demo.fields.code`,rules:{language:`yaml`,max:5e3}})}}),callout:e.callout({label:`lab.field_demo.blocks.callout`,icon:`lucide:shield-check`,tone:`warn`,fields:{agree:e.triState({label:`lab.field_demo.fields.agree`}),boolean:e.boolean({label:`lab.field_demo.fields.boolean`})}}),compare:e.compare({label:`lab.field_demo.blocks.compare`,icon:`lucide:git-compare`,leftLabel:`lab.field_demo.blocks.compare_left`,rightLabel:`lab.field_demo.blocks.compare_right`,left:{country_multi:e.string({label:`lab.field_demo.fields.country_multi`,options:`countries`,multiple:!0,strict:!0,noSearch:!0})},right:{demo_check:e.check({label:`lab.field_demo.fields.demo_check`}),select_multi:e.string({label:`lab.field_demo.fields.select_multi`,multiple:!0,strict:!0,noSearch:!0,options:[{value:`red`,title:`lab.field_demo.options.select.red`},{value:`green`,title:`lab.field_demo.options.select.green`},{value:`blue`,title:`lab.field_demo.options.select.blue`}]})}}),group22:e.group({label:`lab.field_demo.groups.figure`,icon:`lucide:image`,fields:{figure:e.figure({image:{image_gallery:e.image({label:`lab.field_demo.fields.image_gallery`,multiple:!0})},caption:{small_text:e.smallText({label:`lab.field_demo.fields.small_text`,rules:{max:500}})}})},scope:`hoist`}),group23:e.group({label:`lab.field_demo.groups.illustrated`,icon:`lucide:image`,scope:`hoist`,fields:{illustrated_one:e.illustrated({label:`lab.field_demo.fields.illustrated_one`}),illustrated_many:e.illustrated({label:`lab.field_demo.fields.illustrated_many`,multiple:!0,fields:{text:e.markdown({}),image:e.image({})}})}}),group24:e.group({label:`lab.field_demo.groups.epigraph`,icon:`lucide:quote`,fields:{epigraph:e.epigraph({source:{textarea:e.text({label:`lab.field_demo.fields.textarea`,rules:{max:1e3},ui:{noLabel:!0}})},attribution:{compact_note:e.string({label:`lab.field_demo.fields.compact_note`,ui:{noEditControl:!0}})}})},scope:`hoist`}),group25:e.group({label:`lab.field_demo.groups.masthead`,icon:`lucide:calendar-days`,fields:{masthead:e.masthead({overline:{day_period_multi:e.string({label:`lab.field_demo.fields.day_period_multi`,options:`day-periods`,multiple:!0,strict:!0,noSearch:!0})},title:{birthYear:e.date({label:`lab.field_demo.fields.birthYear`,rules:{granularity:`year`}})}})},scope:`hoist`}),divider3:e.divider({label:`lab.field_demo.blocks.domain`}),group26:e.group({label:`lab.field_demo.groups.timeline`,icon:`lucide:history`,fields:{timeline:e.timeline({fields:{date_future:e.date({label:`lab.field_demo.fields.date_future`,rules:{min:`today`}}),demo_reminder:e.reminder({label:`lab.field_demo.fields.demo_reminder`,rules:{lead:14}})}})},scope:`hoist`}),group27:e.group({label:`lab.field_demo.groups.countdown`,icon:`lucide:timer`,fields:{countdown:e.countdown({source:{datetime:e.datetime({label:`lab.field_demo.fields.datetime`})},caption:`lab.field_demo.blocks.countdown_caption`})},scope:`hoist`}),group28:e.group({label:`lab.field_demo.groups.deck`,icon:`lucide:layers`,fields:{deck:e.deck({source:{relation_multi:e.relation({label:`lab.field_demo.fields.relation_multi`,options:t({library:`lab`,shelf:`field_demo_child`}),multiple:!0})}})},scope:`hoist`}),group29:e.group({label:`lab.field_demo.groups.people`,icon:`lucide:user`,fields:{people:e.people({source:{relation_single:e.relation({label:`lab.field_demo.fields.relation_single`,options:t({library:`lab`,shelf:`field_demo_child`})})}})},scope:`hoist`}),group30:e.group({label:`lab.field_demo.groups.identity`,icon:`lucide:contact`,fields:{identity:e.identity({name:{text_plain:e.string({label:`lab.field_demo.fields.text_plain`,rules:{max:200}})},role:{text_minmax:e.string({label:`lab.field_demo.fields.text_minmax`,rules:{min:3,max:20}})},channels:{text_tel:e.tel({label:`lab.field_demo.fields.text_tel`}),text_email:e.email({label:`lab.field_demo.fields.text_email`})}})},scope:`hoist`}),group31:e.group({label:`lab.field_demo.groups.score`,icon:`lucide:gauge`,fields:{score:e.score({source:{integer:e.int({label:`lab.field_demo.fields.integer`,rules:{min:1,max:12}})},max:12})},scope:`hoist`}),group32:e.group({label:`lab.field_demo.groups.status`,icon:`lucide:check-circle`,fields:{status:e.status({source:{select:e.string({label:`lab.field_demo.fields.select`,strict:!0,noSearch:!0,options:[{value:`red`,title:`lab.field_demo.options.select.red`},{value:`green`,title:`lab.field_demo.options.select.green`},{value:`blue`,title:`lab.field_demo.options.select.blue`}]})}})},scope:`hoist`}),group33:e.group({label:`lab.field_demo.groups.meter`,icon:`lucide:sliders-horizontal`,fields:{meter:e.meter({source:{meter_value:e.int({label:`lab.field_demo.fields.meter_value`,rules:{min:0,max:50}})},min:0,max:50})},scope:`hoist`}),group34:e.group({label:`lab.field_demo.groups.receipt`,icon:`lucide:receipt`,scope:`hoist`,fields:{receipt:e.receipt({fields:{number_decimal:e.real({label:`lab.field_demo.fields.number_decimal`,rules:{min:0,max:1e3}})},total:{price:e.money({label:`lab.field_demo.fields.price`})}}),currency:e.currency({label:`core.fields.currency`,default:`UAH`})}}),group35:e.group({label:`lab.field_demo.groups.balance`,icon:`lucide:scale`,fields:{balance:e.balance({source:{measured_currency:e.measured({label:`lab.field_demo.fields.measured_currency`,units:`currency`})},caption:`lab.field_demo.blocks.balance_caption`})},scope:`hoist`}),group36:e.group({label:`lab.field_demo.groups.route`,icon:`lucide:map-pin`,fields:{route:e.route({from:{country:e.string({label:`lab.field_demo.fields.country`,options:`countries`,strict:!0,noSearch:!0})},to:{place:e.geo({label:`lab.field_demo.fields.place`})}})},scope:`hoist`}),calendar:e.calendar({source:{calendar_dates:e.group({scope:`nest`,label:`lab.field_demo.fields.calendar_dates`,icon:`lucide:calendar`,multiple:!0,fields:{occurs_on:e.date({label:`lab.field_demo.per_row.occurs_on`})}})},date:`occurs_on`}),journal:e.journal({source:{journal_log:e.group({scope:`nest`,label:`lab.field_demo.fields.journal_log`,icon:`lucide:book-open`,multiple:!0,fields:{logged_at:e.date({label:`lab.field_demo.per_row.logged_at`}),entry:e.text({label:`lab.field_demo.per_row.entry`,rules:{max:500}})}})},date:`logged_at`,text:`entry`}),group37:e.group({label:`lab.field_demo.groups.nutrition`,icon:`lucide:flame`,scope:`hoist`,fields:{nutrition:e.nutrition({energy:{ageRange:e.numberRange({label:`lab.field_demo.fields.ageRange`,rules:{min:0,max:120}})},fields:{measured_custom:e.measured({label:`lab.field_demo.fields.measured_custom`,units:[{value:`shot`,label:`lab.field_demo.units.shot`},{value:`scoop`,label:`lab.field_demo.units.scoop`}]})}})}}),group38:e.group({label:`lab.field_demo.groups.specimen`,icon:`lucide:palette`,fields:{specimen:e.specimen({title:{color_name:e.string({label:`lab.field_demo.fields.color_name`,options:`colors`,strict:!0,noSearch:!0})},subtitle:{color_hex:e.color({label:`lab.field_demo.fields.color_hex`})}})},scope:`hoist`}),manifest:e.manifest({source:{row_ingredients:e.group({scope:`nest`,label:`lab.field_demo.fields.row_ingredients`,icon:`lucide:carrot`,multiple:!0,rules:{unique:[`product`]},fields:{product:e.relation({label:`lab.field_demo.per_row.product`,options:t({library:`kitchen`,shelf:`food_item`})}),amount:e.real({label:`lab.field_demo.per_row.amount`,rules:{min:0}}),stock:e.measured({label:`lab.field_demo.per_row.stock`,units:`cooking`,cache:0,value:async e=>(await e.ref?.(`product`))?.quantity??null})}})},quantity:`amount`,item:`product`}),table:e.table({label:`lab.field_demo.fields.demo_table`,source:{demo_table_rows:e.row({scope:`nest`,label:`lab.field_demo.fields.demo_table`,multiple:!0,fields:{part:e.string({label:`lab.field_demo.table.part`}),vendor:e.string({label:`lab.field_demo.table.vendor`}),qty:e.int({label:`lab.field_demo.table.qty`})}})},sort:`qty`,dir:`desc`,groupBy:`vendor`,totals:{qty:`sum`},numbered:!0}),group39:e.group({label:`lab.field_demo.groups.idcard`,icon:`lucide:credit-card`,fields:{idcard:e.idcard({number:{iban:c.iban({label:`lab.field_demo.fields.iban`})},meta:{date:e.date({label:`lab.field_demo.fields.date`})}})},scope:`hoist`}),divider4:e.divider({label:`lab.field_demo.blocks.computed`}),chart:e.chart({source:{chart_readings:e.group({scope:`nest`,label:`lab.field_demo.fields.chart_readings`,icon:`lucide:trending-up`,multiple:!0,fields:{measured_on:e.date({label:`lab.field_demo.per_row.measured_on`}),reading:e.real({label:`lab.field_demo.per_row.reading`})}})},value:`reading`,date:`measured_on`,delta:!0}),heatmap:e.heatmap({source:{heatmap_sessions:e.group({scope:`nest`,label:`lab.field_demo.fields.heatmap_sessions`,icon:`lucide:calendar-check`,multiple:!0,fields:{happened_on:e.date({label:`lab.field_demo.per_row.happened_on`})}})},date:`happened_on`}),divider5:e.divider(),group40:e.group({label:`lab.field_demo.groups.periods`,icon:`lucide:calendar-range`,scope:`hoist`,fields:{periods:e.period({label:`lab.field_demo.fields.periods`,multiple:!0})}}),group41:e.group({label:`lab.field_demo.groups.json`,icon:`lucide:code-2`,scope:`hoist`,fields:{json:e.json({label:`lab.field_demo.fields.json`,ui:{emphasis:`muted`}})}}),row_single:e.group({scope:`nest`,label:`lab.field_demo.fields.row_single`,icon:`lucide:rows-3`,fields:{env:e.string({label:`lab.field_demo.per_row.env`,strict:!0,noSearch:!0,options:[{value:`dev`,title:`lab.field_demo.options.env.dev`},{value:`prod`,title:`lab.field_demo.options.env.prod`}]}),url:e.url({label:`lab.field_demo.per_row.url`}),token:e.password({label:`lab.field_demo.per_row.token`})}}),variants:e.keyed({label:`lab.field_demo.fields.variants`,icon:`lucide:languages`,fields:{lang:e.string({label:`lab.field_demo.per_row.lang`,options:`languages`,strict:!0,noSearch:!0}),name:e.string({label:`lab.field_demo.per_row.name`}),surname:e.string({label:`lab.field_demo.per_row.surname`})},by:`lang`}),perkey_fixed:e.keyed({label:`lab.field_demo.fields.perkey_fixed`,icon:`lucide:key`,fixed:!0,fields:{size:e.string({label:`lab.field_demo.per_row.size`,strict:!0,noSearch:!0,options:[{value:`s`,title:`lab.field_demo.options.size.s`},{value:`m`,title:`lab.field_demo.options.size.m`},{value:`l`,title:`lab.field_demo.options.size.l`}]}),qty:e.int({label:`lab.field_demo.per_row.qty`,rules:{min:0}})},by:`size`}),coll_text:e.group({scope:`nest`,label:`lab.field_demo.fields.coll_text`,icon:`lucide:type`,multiple:!0,fields:{person:e.relation({label:`lab.field_demo.fields.pp_person`,options:t({library:`people`,shelf:`person`})}),value:e.string({label:`lab.field_demo.fields.pp_value`})}}),coll_integer:e.group({scope:`nest`,label:`lab.field_demo.fields.coll_integer`,icon:`lucide:hash`,multiple:!0,fields:{person:e.relation({label:`lab.field_demo.fields.pp_person`,options:t({library:`people`,shelf:`person`})}),value:e.int({label:`lab.field_demo.fields.pp_value`})}}),coll_select:e.group({scope:`nest`,label:`lab.field_demo.fields.coll_select`,icon:`lucide:list-checks`,multiple:!0,fields:{person:e.relation({label:`lab.field_demo.fields.pp_person`,options:t({library:`people`,shelf:`person`})}),value:e.string({label:`lab.field_demo.fields.pp_value`,strict:!0,noSearch:!0,options:[{value:`s`,title:`lab.field_demo.options.pp_select.s`},{value:`m`,title:`lab.field_demo.options.pp_select.m`},{value:`l`,title:`lab.field_demo.options.pp_select.l`}]})}}),group42:e.group({label:`lab.field_demo.groups.per_weekday`,icon:`lucide:calendar-days`,scope:`hoist`,fields:{per_weekday:e.perWeekday({label:`lab.field_demo.fields.per_weekday`,rules:{min:0,max:5,step:.5}})}}),per_weekday_per_person:e.group({scope:`nest`,label:`lab.field_demo.fields.per_weekday_per_person`,icon:`lucide:users`,multiple:!0,fields:{person:e.relation({label:`lab.field_demo.fields.pp_person`,options:t({library:`people`,shelf:`person`})}),value:e.perWeekday({label:`lab.field_demo.fields.pp_value`,rules:{min:0,max:10,step:1}})}}),group43:e.group({label:`lab.field_demo.groups.media_carousel`,icon:`lucide:images`,scope:`hoist`,fields:{avatar_row:e.avatar({label:`lab.field_demo.fields.avatar_row`,multiple:!0}),cover_carousel:e.cover({label:`lab.field_demo.fields.cover_carousel`,multiple:!0})}}),group44:e.group({label:`lab.field_demo.groups.files`,icon:`lucide:paperclip`,scope:`hoist`,fields:{attachment:e.file({label:`lab.field_demo.fields.attachment`}),doc:e.document({label:`lab.field_demo.fields.doc`}),voice:e.audio({label:`lab.field_demo.fields.voice`}),clip:e.video({label:`lab.field_demo.fields.clip`}),gallery:e.media({label:`lab.field_demo.fields.gallery`,multiple:!0}),attachment_one:e.attachment({label:`lab.field_demo.fields.attachment_one`}),attachment_many:e.attachment({label:`lab.field_demo.fields.attachment_many`,multiple:!0,fields:{file:e.document({})}})}}),group45:e.group({label:`lab.field_demo.groups.key_value`,icon:`lucide:key-round`,scope:`hoist`,fields:{key_value:e.keyValue({label:`lab.field_demo.fields.key_value`,multiple:!0}),key_value_secret:e.keyValue({label:`lab.field_demo.fields.key_value_secret`,fields:{value:e.password({label:``})}})}}),services_bylist:e.group({scope:`nest`,label:`lab.field_demo.fields.services_bylist`,icon:`lucide:server`,multiple:!0,fields:{type:e.string({label:`devices.service.type`,options:`service-types`,strict:!0,noSearch:!0}),url:e.url({label:`devices.service.url`}),login:e.string({label:`devices.service.login`}),password:e.password({label:`devices.service.password`,ui:{emphasis:`muted`}}),token:e.password({label:`devices.service.token`})}}),group46:e.group({label:`lab.field_demo.groups.classifier`,icon:`lucide:toggle-right`,scope:`hoist`,fields:{type:e.string({label:`lab.field_demo.fields.type`,strict:!0,noSearch:!0,options:[{value:`basic`,title:`lab.field_demo.options.type.basic`},{value:`advanced`,title:`lab.field_demo.options.type.advanced`}]})}})}}),u=n({shelf:`field_demo_child`,library:`lab`,label:`lab.field_demo_child.label`,icon:`lucide:link`,standalone:!1,fields:{name:e.title({label:`core.fields.name`}),demo_id:e.relation({label:`lab.field_demo_child.fields.demo_id`,options:t({library:`lab`,shelf:`field_demo`})}),notes:e.text({label:`lab.field_demo_child.fields.notes`,rules:{max:500}})}}),d=r({id:`demo_extra`,label:`lab.demo_extra.label`,icon:`lucide:plus`,attachTo:[{library:`lab`,shelf:`field_demo`}],showWhen:{type:`advanced`},fields:{extra_text:e.string({label:`lab.demo_extra.fields.extra_text`,rules:{max:200}}),extra_number:e.int({label:`lab.demo_extra.fields.extra_number`,rules:{min:0}}),extra_flag:e.boolean({label:`lab.demo_extra.fields.extra_flag`})}}),f=i({id:`lab`,version:`1.0.0`,dependsOn:[`people`,`kitchen`,`devices`,`finance`,`geo`],settings:o({label:`lab.settings.label`,icon:`lucide:flask-conical`,fields:{info:e.info(`lab.settings.intro`),greeting:e.string({label:`lab.settings.fields.greeting`,rules:{max:80}}),enabled:e.boolean({label:`lab.settings.fields.enabled`}),mode:e.string({label:`lab.settings.fields.mode`,strict:!0,noSearch:!0,options:[{value:`fast`,title:`lab.settings.modes.fast`},{value:`safe`,title:`lab.settings.modes.safe`},{value:`debug`,title:`lab.settings.modes.debug`}]}),retries:e.int({label:`lab.settings.fields.retries`,rules:{min:0,max:10}}),divider:e.divider(),info2:e.info(`lab.settings.actions_info`),button:e.button({label:`lab.settings.run_button`,value:`lab.demoAction`,icon:`lucide:play`}),button2:e.button({label:`lab.settings.fail_button`,value:`lab.demoFail`,icon:`lucide:bug`,variant:`destructive`}),button3:e.button({label:`lab.settings.variants.default`,value:`lab.demoAction`,icon:`lucide:check`,variant:`default`}),button4:e.button({label:`lab.settings.variants.secondary`,value:`lab.demoAction`,icon:`lucide:settings`,variant:`secondary`}),button5:e.button({label:`lab.settings.variants.ghost`,value:`lab.demoAction`,icon:`lucide:ghost`,variant:`ghost`}),button6:e.button({label:`lab.settings.variants.link`,value:`lab.demoAction`,icon:`lucide:link`,variant:`link`})}}),libraries:[{meta:a({id:`lab`,label:`lab.library.label`,icon:`lucide:flask-conical`,agent:`Developer demo of field types — not real household data; ignore unless explicitly asked.`}),shelves:[l,u]}],extends_:[d]});export{f as default};
@@ -1,2 +1,2 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/ChatWidget-qpAe26bF.js","assets/rolldown-runtime-QTnfLwEv.js","assets/i18n-vendor-T6EnJ_TL.js","assets/react-vendor-CzSUaSLk.js","assets/src-54Qdjl2W.js","assets/fields-BtCN_frr.js","assets/shelf-CRUDKiTz.js","assets/input-DqF3I-kT.js","assets/phone-input-vooQJZf_.js","assets/ui-vendor-C79K_wDx.js","assets/icons-BTbA1N7a.js","assets/popover-DjWMp23y.js","assets/development-olQNibq5.js","assets/file-text-DzYzGxiY.js","assets/plugin-ui-CKd6q8ec.js","assets/lib-DU7Qh2A4.js"])))=>i.map(i=>d[i]);
2
- import{p as e}from"./react-vendor-CzSUaSLk.js";import"./src-54Qdjl2W.js";import{n as t}from"./plugin-ui-CKd6q8ec.js";var n=t({slots:[{slot:`overlay`,id:`webchat`,load:()=>e(()=>import(`./ChatWidget-qpAe26bF.js`),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15]))}]});export{n as default};
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/ChatWidget-YZqj6v6F.js","assets/rolldown-runtime-QTnfLwEv.js","assets/i18n-vendor-T6EnJ_TL.js","assets/react-vendor-CzSUaSLk.js","assets/src-C9WAFG8V.js","assets/fields-BtCN_frr.js","assets/shelf-CRUDKiTz.js","assets/input-DqF3I-kT.js","assets/phone-input-vooQJZf_.js","assets/ui-vendor-C79K_wDx.js","assets/icons-BTbA1N7a.js","assets/popover-DjWMp23y.js","assets/development-olQNibq5.js","assets/file-text-DzYzGxiY.js","assets/plugin-ui-CKd6q8ec.js","assets/lib-DU7Qh2A4.js"])))=>i.map(i=>d[i]);
2
+ import{p as e}from"./react-vendor-CzSUaSLk.js";import"./src-C9WAFG8V.js";import{n as t}from"./plugin-ui-CKd6q8ec.js";var n=t({slots:[{slot:`overlay`,id:`webchat`,load:()=>e(()=>import(`./ChatWidget-YZqj6v6F.js`),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15]))}]});export{n as default};
@@ -0,0 +1,2 @@
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/GeoMap-B1DFGu6_.js","assets/rolldown-runtime-QTnfLwEv.js","assets/i18n-vendor-T6EnJ_TL.js","assets/react-vendor-CzSUaSLk.js","assets/GeoMap-vh-t_kPv.css"])))=>i.map(i=>d[i]);
2
+ import{r as e}from"./rolldown-runtime-QTnfLwEv.js";import{a as t,t as n}from"./i18n-vendor-T6EnJ_TL.js";import{p as r,r as i,t as a,u as o}from"./react-vendor-CzSUaSLk.js";import{Ct as s,E as c,Ht as l,Mt as u,Ut as d,Z as f,hr as p,xr as m}from"./src-C9WAFG8V.js";import{x as h}from"./fields-BtCN_frr.js";import{l as g,r as _}from"./shelf-CRUDKiTz.js";import{n as v}from"./plugin-ui-CKd6q8ec.js";import{r as y,t as b}from"./input-DqF3I-kT.js";import{l as x}from"./phone-input-vooQJZf_.js";var S=y(`locate-fixed`,[[`line`,{x1:`2`,x2:`5`,y1:`12`,y2:`12`,key:`bvdh0s`}],[`line`,{x1:`19`,x2:`22`,y1:`12`,y2:`12`,key:`1tbv5k`}],[`line`,{x1:`12`,x2:`12`,y1:`2`,y2:`5`,key:`11lu5j`}],[`line`,{x1:`12`,x2:`12`,y1:`19`,y2:`22`,key:`x3vr5v`}],[`circle`,{cx:`12`,cy:`12`,r:`7`,key:`fim9np`}],[`circle`,{cx:`12`,cy:`12`,r:`3`,key:`1v7zrd`}]]),C=e(t(),1);function w(e,t){return Math.floor((e+180)/360*2**t)}function T(e,t){let n=e*Math.PI/180;return Math.floor((1-Math.log(Math.tan(n)+1/Math.cos(n))/Math.PI)/2*2**t)}function E(e,t,n=13){return`https://tile.openstreetmap.org/${n}/${w(t,n)}/${T(e,n)}.png`}function D(e){let t=h(e.parts??[]);return{latKey:t.lat??`lat`,lngKey:t.lng??`lng`,labelKey:t.label??`label`}}function O(e,t){let{latKey:n,lngKey:r,labelKey:i}=D(t),a=e&&typeof e==`object`?e:(()=>{try{let t=JSON.parse(String(e??``));return t&&typeof t==`object`?t:null}catch{return null}})();return a?{lat:a[n],lng:a[r],label:a[i]}:{}}var k=e=>Number(e.toFixed(6)),A=(e,t)=>{if(e.lat==null&&e.lng==null&&!e.label)return``;let{latKey:n,lngKey:r,labelKey:i}=D(t);return{[n]:e.lat,[r]:e.lng,[i]:e.label}},j=a(),M=`/home/grigorii/Projects/GitHub/grigorii-horos/coffer/packages/plugin-geo/src/geo-field.tsx`;function N(e){return e.lat!=null||e.lng!=null||e.label!=null}var P=(0,C.lazy)(()=>r(()=>import(`./GeoMap-B1DFGu6_.js`),__vite__mapDeps([0,1,2,3,4])));function F({g:e,onOpen:t}){let{t:r}=n();return e.lat==null||e.lng==null?(0,j.jsxDEV)(`button`,{type:`button`,onClick:t,className:`flex h-24 w-full items-center justify-center gap-1.5 rounded-lg border border-dashed border-border text-sm text-muted hover:border-accent`,children:[(0,j.jsxDEV)(m,{size:16},void 0,!1,{fileName:M,lineNumber:31,columnNumber:9},this),` `,r(`geo.pick`)]},void 0,!0,{fileName:M,lineNumber:26,columnNumber:7},this):(0,j.jsxDEV)(`button`,{type:`button`,onClick:t,title:e.label??`${e.lat}, ${e.lng}`,className:`relative block h-24 w-full overflow-hidden rounded-lg border border-border hover:border-accent`,children:[(0,j.jsxDEV)(`img`,{src:E(e.lat,e.lng),alt:``,loading:`lazy`,className:`h-full w-full object-cover`},void 0,!1,{fileName:M,lineNumber:42,columnNumber:7},this),(0,j.jsxDEV)(m,{size:22,fill:`currentColor`,className:`pointer-events-none absolute left-1/2 top-1/2 -translate-x-1/2 -translate-y-full text-danger drop-shadow`},void 0,!1,{fileName:M,lineNumber:43,columnNumber:7},this)]},void 0,!0,{fileName:M,lineNumber:36,columnNumber:5},this)}function I({field:e,value:t,commit:r,editable:i,label:a,onClose:o}){let{t:s}=n(),[c,d]=(0,C.useState)(``),[m,h]=(0,C.useState)(!1),g=e=>e===``?void 0:Number(e),_=e.parts?.find(e=>e.role===`lat`),v=e.parts?.find(e=>e.role===`lng`),y=_!=null&&_.mode!==`stored`||v!=null&&v.mode!==`stored`,w=e.parts?.find(e=>e.role===`label`),T=w!=null&&w.mode!==`stored`,E=i&&!y,{draft:D,setDraft:F,save:I,clear:L,clearable:R,error:z,busy:B}=f({field:e,seed:t,commit:r??(async()=>void 0),remove:i&&!e.required&&N(O(t,e))?()=>``:void 0,onDone:o}),V=(0,C.useMemo)(()=>O(D,e),[D,e]),H=t=>F(A(t,e));function U(){navigator.geolocation&&navigator.geolocation.getCurrentPosition(e=>H({...V,lat:k(e.coords.latitude),lng:k(e.coords.longitude)}),()=>{},{enableHighAccuracy:!0})}async function W(){if(c.trim()){h(!0);try{let e=await(await fetch(`https://nominatim.openstreetmap.org/search?format=json&limit=1&q=${encodeURIComponent(c)}`)).json();Array.isArray(e)&&e[0]&&H({lat:k(+e[0].lat),lng:k(+e[0].lon),label:V.label||e[0].display_name})}catch{}h(!1)}}return(0,j.jsxDEV)(u,{open:!0,onOpenChange:e=>!e&&o(),title:a,children:(0,j.jsxDEV)(`div`,{className:`flex min-h-0 flex-col gap-2`,children:[E&&(0,j.jsxDEV)(`div`,{className:`flex items-center gap-2`,children:[(0,j.jsxDEV)(b,{placeholder:s(`geo.searchPlaceholder`),value:c,onChange:e=>d(e.target.value),onKeyDown:e=>{e.key===`Enter`&&(e.preventDefault(),W())},className:`flex-1`},void 0,!1,{fileName:M,lineNumber:131,columnNumber:13},this),(0,j.jsxDEV)(x,{type:`button`,variant:`secondary`,size:`icon`,disabled:m,onClick:W,title:s(`geo.search`),children:(0,j.jsxDEV)(p,{size:16},void 0,!1,{fileName:M,lineNumber:151,columnNumber:15},this)},void 0,!1,{fileName:M,lineNumber:143,columnNumber:13},this),(0,j.jsxDEV)(x,{type:`button`,variant:`secondary`,size:`icon`,onClick:U,title:s(`geo.myLocation`),children:(0,j.jsxDEV)(S,{size:16},void 0,!1,{fileName:M,lineNumber:154,columnNumber:15},this)},void 0,!1,{fileName:M,lineNumber:153,columnNumber:13},this)]},void 0,!0,{fileName:M,lineNumber:130,columnNumber:11},this),(0,j.jsxDEV)(C.Suspense,{fallback:(0,j.jsxDEV)(`div`,{className:`h-[60dvh] rounded-lg border border-border bg-surface/40`},void 0,!1,{fileName:M,lineNumber:158,columnNumber:29},this),children:(0,j.jsxDEV)(`div`,{className:`[&>div]:h-[60dvh]`,children:(0,j.jsxDEV)(P,{lat:V.lat,lng:V.lng,interactive:E,onPick:E?(e,t)=>H({...V,lat:e,lng:t}):void 0},void 0,!1,{fileName:M,lineNumber:160,columnNumber:13},this)},void 0,!1,{fileName:M,lineNumber:159,columnNumber:11},this)},void 0,!1,{fileName:M,lineNumber:158,columnNumber:9},this),(0,j.jsxDEV)(l,{error:z},void 0,!1,{fileName:M,lineNumber:168,columnNumber:9},this),i?(0,j.jsxDEV)(`div`,{className:`flex flex-col gap-2 sm:flex-row sm:items-center`,children:[(0,j.jsxDEV)(`div`,{className:`grid flex-1 grid-cols-1 gap-2 sm:grid-cols-[7rem_7rem_1fr]`,children:[y?(0,j.jsxDEV)(`div`,{className:`flex h-9 items-center rounded-lg border border-transparent px-3 text-sm text-muted`,children:V.lat??`—`},void 0,!1,{fileName:M,lineNumber:174,columnNumber:17},this):(0,j.jsxDEV)(b,{type:`number`,step:`any`,placeholder:`lat`,value:V.lat??``,onChange:e=>H({...V,lat:g(e.target.value)})},void 0,!1,{fileName:M,lineNumber:178,columnNumber:17},this),y?(0,j.jsxDEV)(`div`,{className:`flex h-9 items-center rounded-lg border border-transparent px-3 text-sm text-muted`,children:V.lng??`—`},void 0,!1,{fileName:M,lineNumber:187,columnNumber:17},this):(0,j.jsxDEV)(b,{type:`number`,step:`any`,placeholder:`lng`,value:V.lng??``,onChange:e=>H({...V,lng:g(e.target.value)})},void 0,!1,{fileName:M,lineNumber:191,columnNumber:17},this),T?(0,j.jsxDEV)(`div`,{className:`flex h-9 items-center rounded-lg border border-transparent px-3 text-sm text-muted`,children:V.label??`—`},void 0,!1,{fileName:M,lineNumber:200,columnNumber:17},this):(0,j.jsxDEV)(b,{placeholder:s(`geo.label`),value:V.label??``,onChange:e=>H({...V,label:e.target.value||void 0})},void 0,!1,{fileName:M,lineNumber:204,columnNumber:17},this)]},void 0,!0,{fileName:M,lineNumber:172,columnNumber:13},this),R&&(0,j.jsxDEV)(x,{type:`button`,variant:`destructiveOutline`,disabled:B,onClick:()=>void L(),className:`sm:self-auto`,children:s(`actions.clear`)},void 0,!1,{fileName:M,lineNumber:212,columnNumber:15},this),(0,j.jsxDEV)(x,{type:`button`,disabled:B,onClick:()=>void I(),className:`sm:self-auto`,children:s(`actions.save`)},void 0,!1,{fileName:M,lineNumber:222,columnNumber:13},this)]},void 0,!0,{fileName:M,lineNumber:170,columnNumber:11},this):V.lat!=null&&V.lng!=null&&(0,j.jsxDEV)(`a`,{className:`text-sm text-accent hover:underline`,target:`_blank`,rel:`noreferrer`,href:`https://www.openstreetmap.org/?mlat=${V.lat}&mlon=${V.lng}#map=15/${V.lat}/${V.lng}`,children:V.label??`${V.lat.toFixed(5)}, ${V.lng?.toFixed(5)}`},void 0,!1,{fileName:M,lineNumber:229,columnNumber:13},this)]},void 0,!0,{fileName:M,lineNumber:128,columnNumber:7},this)},void 0,!1,{fileName:M,lineNumber:127,columnNumber:5},this)}function L({field:e,value:t,commit:n,editable:r,label:i}){let a=(0,C.useMemo)(()=>O(t,e),[t,e]),[o,s]=(0,C.useState)(!1);return(0,j.jsxDEV)(`div`,{className:`flex flex-col gap-1`,children:[(0,j.jsxDEV)(F,{g:a,onOpen:()=>s(!0)},void 0,!1,{fileName:M,lineNumber:261,columnNumber:7},this),a.label&&(0,j.jsxDEV)(`span`,{className:`truncate text-xs text-muted`,children:a.label},void 0,!1,{fileName:M,lineNumber:262,columnNumber:19},this),o&&(0,j.jsxDEV)(I,{field:e,value:t,commit:n,editable:r,label:i,onClose:()=>s(!1)},void 0,!1,{fileName:M,lineNumber:264,columnNumber:9},this)]},void 0,!0,{fileName:M,lineNumber:260,columnNumber:5},this)}function R(e){let t=s(),n=t?.writable?t.write:void 0,r=!!n&&!(e.field.hints.noEditControl===!0&&e.mode===`view`),i=(0,j.jsxDEV)(L,{field:e.field,value:e.value,commit:n,editable:r,label:e.label},void 0,!1,{fileName:M,lineNumber:281,columnNumber:16},this);return e.bare?i:(0,j.jsxDEV)(`div`,{className:`group/field w-56`,children:[e.label!==void 0&&(0,j.jsxDEV)(d,{label:e.label,required:e.required},void 0,!1,{fileName:M,lineNumber:285,columnNumber:33},this),i,(0,j.jsxDEV)(l,{error:e.error},void 0,!1,{fileName:M,lineNumber:287,columnNumber:7},this)]},void 0,!0,{fileName:M,lineNumber:284,columnNumber:5},this)}function z({value:e,field:t}){let n=O(e,t);return(0,j.jsxDEV)(`span`,{className:`truncate`,children:n.label??(n.lat==null?`—`:`${n.lat.toFixed(3)}, ${n.lng?.toFixed(3)}`)},void 0,!1,{fileName:M,lineNumber:295,columnNumber:5},this)}var B={kinds:[`geo`],editor:`own`,Page:R,Inline:z};function V(e,t){let n=g(e.fields);return t.filter(e=>n[e]?.kind===`geo`)}function H(e,t){let n=V(e,t);return n.length===1?n[0]:null}function U(e,t){let n=g(e.fields),r=t[0];if(!r||!n[r])return`views.list: shelf has no text field for its title (titleKey fell back to "id")`;let i=V(e,t);return i.length===0?`views.list does not contain a kind:"geo" field`:i.length>1?`views.list contains multiple geo fields: ${i.join(`, `)}`:null}var W=`/home/grigorii/Projects/GitHub/grigorii-horos/coffer/packages/plugin-geo/src/map-view.tsx`,G=(0,C.lazy)(()=>r(()=>import(`./GeoMap-B1DFGu6_.js`).then(e=>({default:e.MarkersMap})),__vite__mapDeps([0,1,2,3,4])));function K({rows:e,shelf:t,keys:r,hrefBase:a}){let{t:s}=n(),l=o(),[u,d]=(0,C.useState)(!1),f=g(t.fields),p=H(t,r),m=r[0],{points:h,without:v}=(0,C.useMemo)(()=>{let t=[],n=[];for(let r of e){let e=p?_(f[p],p,r):void 0;e&&typeof e.lat==`number`&&typeof e.lng==`number`?t.push({id:String(r.id),lat:e.lat,lng:e.lng,title:String(_(f[m],m,r)??r.id)}):n.push(r)}return{points:t,without:n}},[e,p,m,f]);return(0,j.jsxDEV)(`div`,{className:`p-4`,children:[(0,j.jsxDEV)(C.Suspense,{fallback:(0,j.jsxDEV)(`div`,{className:`h-64 rounded-lg border border-border`},void 0,!1,{fileName:W,lineNumber:48,columnNumber:27},this),children:(0,j.jsxDEV)(G,{points:h,onPick:e=>l(`${a}/${e}`)},void 0,!1,{fileName:W,lineNumber:49,columnNumber:9},this)},void 0,!1,{fileName:W,lineNumber:48,columnNumber:7},this),v.length>0&&(0,j.jsxDEV)(`div`,{className:`mt-3`,children:[(0,j.jsxDEV)(`button`,{type:`button`,onClick:()=>d(e=>!e),className:`text-sm text-muted hover:text-text transition-colors`,children:s(`geo.withoutCoords`,{count:v.length})},void 0,!1,{fileName:W,lineNumber:53,columnNumber:11},this),u&&(0,j.jsxDEV)(`ul`,{className:`mt-2 flex flex-col gap-1`,children:v.map(e=>(0,j.jsxDEV)(`li`,{children:(0,j.jsxDEV)(i,{to:`${a}/${e.id}`,className:`text-sm text-text hover:text-accent`,children:(0,j.jsxDEV)(c,{field:f[m],value:_(f[m],m,e)},void 0,!1,{fileName:W,lineNumber:65,columnNumber:21},this)},void 0,!1,{fileName:W,lineNumber:64,columnNumber:19},this)},String(e.id),!1,{fileName:W,lineNumber:63,columnNumber:17},this))},void 0,!1,{fileName:W,lineNumber:61,columnNumber:13},this)]},void 0,!0,{fileName:W,lineNumber:52,columnNumber:9},this)]},void 0,!0,{fileName:W,lineNumber:47,columnNumber:5},this)}var q=v({renderers:[B],listViews:[{kind:`map`,View:K,check:U}],translations:{uk:{geo:{searchPlaceholder:`Пошук адреси…`,search:`Знайти`,myLocation:`Моє місцеположення`,label:`Підпис`,pick:`Обрати місце`,withoutCoords:`Без координат: {{count}}`}},ru:{geo:{searchPlaceholder:`Поиск адреса…`,search:`Найти`,myLocation:`Моё местоположение`,label:`Подпись`,pick:`Выбрать место`,withoutCoords:`Без координат: {{count}}`}},en:{geo:{searchPlaceholder:`Search address…`,search:`Search`,myLocation:`My location`,label:`Label`,pick:`Pick location`,withoutCoords:`Without coordinates: {{count}}`}}}});export{q as default};
@@ -1,2 +1,2 @@
1
1
  const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/ScanSummary-xKGEaOS0.js","assets/react-vendor-CzSUaSLk.js","assets/rolldown-runtime-QTnfLwEv.js","assets/i18n-vendor-T6EnJ_TL.js"])))=>i.map(i=>d[i]);
2
- import{r as e}from"./rolldown-runtime-QTnfLwEv.js";import{a as t}from"./i18n-vendor-T6EnJ_TL.js";import{p as n,t as r}from"./react-vendor-CzSUaSLk.js";import{Cn as i,J as a,Qt as o,Sn as s,nt as c,xn as l}from"./src-54Qdjl2W.js";import{n as u}from"./plugin-ui-CKd6q8ec.js";import{t as d}from"./input-DqF3I-kT.js";import{a as f,c as p,n as m,o as h,t as g}from"./data-size-oPRYOwnj.js";var _=e(t(),1);function v(e){let t=e.match(/^(\d{1,3})\.(\d{1,3})\.(\d{1,3})\.(\d{1,3})$/);if(t){let e=t.slice(1).map(Number);return e.every(e=>e>=0&&e<=255)?{v:4,a:e}:null}try{let t=e;if(e.includes(`::`)){let[n,r]=e.split(`::`),i=n?n.split(`:`):[],a=r?r.split(`:`):[],o=8-i.length-a.length;t=[...i,...Array(o).fill(`0`),...a].join(`:`)}let n=t.split(`:`);if(n.length!==8)return null;let r=n.map(e=>parseInt(e,16));return r.some(e=>isNaN(e)||e<0||e>65535)?null:{v:6,a:r}}catch{return null}}function y(e){return e.v===4?e.a.join(`.`):e.a.map(e=>e.toString(16)).join(`:`)}function b(e){let t=e.lastIndexOf(`/`);if(t===-1)return null;let n=e.slice(0,t),r=e.slice(t+1),i=parseInt(r,10),a=v(n);if(!a||isNaN(i))return null;let o=a.v===4?32:128;return i<0||i>o?null:{...a,p:i}}function x(e){return`${y(e)}/${e.p}`}var S=r(),C=`/home/grigorii/Projects/GitHub/grigorii-horos/coffer/packages/plugin-devices/src/fields/ui.tsx`;function w({value:e,onChange:t,parse:n,format:r,placeholder:i}){let a=(0,_.useMemo)(()=>{if(e&&typeof e==`object`)return e;if(typeof e!=`string`)return null;try{return JSON.parse(e)}catch{return null}},[e]),o=typeof e==`string`?e:``,[s,c]=(0,_.useState)(a?r(a):o);(0,_.useEffect)(()=>{c(a?r(a):o)},[o,a]);let l=e=>{let r=e.trim(),i=n(r);t(i?JSON.stringify(i):r)};return(0,S.jsxDEV)(d,{value:s,placeholder:i,onChange:e=>c(e.target.value),onBlur:()=>l(s),onKeyDown:e=>{e.key===`Enter`&&l(s)}},void 0,!1,{fileName:C,lineNumber:67,columnNumber:5},this)}function T(e,t){return(0,S.jsxDEV)(i,{items:o(e,[]),content:e=>{let n=typeof e==`string`?o(e,null):e;return n&&typeof n==`object`?t(n):String(e)}},void 0,!1,{fileName:C,lineNumber:84,columnNumber:5},this)}function E(e,t){let n=typeof e==`string`?o(e,null):e??null;if(n&&typeof n==`object`)return(0,S.jsxDEV)(`code`,{className:`font-mono text-sm`,children:t(n)},void 0,!1,{fileName:C,lineNumber:103,columnNumber:46},this);let r=String(e??``);return r?(0,S.jsxDEV)(`span`,{className:`text-muted`,children:r},void 0,!1,{fileName:C,lineNumber:105,columnNumber:16},this):(0,S.jsxDEV)(s,{},void 0,!1,{fileName:C,lineNumber:105,columnNumber:60},this)}function D({value:e}){return E(e,y)}function O({value:e}){return E(e,x)}function k(e){return(0,S.jsxDEV)(a,{field:e.field,value:e.value,label:e.label,required:e.required,error:e.error,mode:e.mode,geom:`inline`,bare:e.bare,view:t=>e.field.hints.multiple===!0?T(t,e=>y(e)):(()=>{let e=o(t,null);if(e)return(0,S.jsxDEV)(`code`,{className:`font-mono text-sm`,children:y(e)},void 0,!1,{fileName:C,lineNumber:132,columnNumber:34},this);let n=String(t??``);return n?(0,S.jsxDEV)(`span`,{className:`text-muted`,children:n},void 0,!1,{fileName:C,lineNumber:134,columnNumber:28},this):(0,S.jsxDEV)(s,{},void 0,!1,{fileName:C,lineNumber:134,columnNumber:72},this)})(),edit:(t,n)=>e.field.hints.multiple===!0?(0,S.jsxDEV)(c,{value:String(t),onChange:n,validate:e=>v(e.trim())!==null,serialize:e=>{let t=v(e.trim());return t?JSON.stringify(t):null},display:e=>{try{return y(JSON.parse(e))}catch{return e}},renderInput:(e,t,n)=>(0,S.jsxDEV)(d,{value:e,placeholder:`192.168.1.1`,onChange:e=>t(e.target.value),className:`flex-1`,onKeyDown:e=>{e.key===`Enter`&&(e.preventDefault(),n())}},void 0,!1,{fileName:C,lineNumber:155,columnNumber:15},this)},void 0,!1,{fileName:C,lineNumber:139,columnNumber:11},this):(0,S.jsxDEV)(w,{value:t,onChange:n,parse:v,format:y,placeholder:`192.168.1.1`},void 0,!1,{fileName:C,lineNumber:170,columnNumber:11},this)},void 0,!1,{fileName:C,lineNumber:118,columnNumber:5},this)}function A({value:e}){let t=null;try{t=y(JSON.parse(String(e)))}catch{t=null}return t===null?(0,S.jsxDEV)(`span`,{className:`truncate`,children:`—`},void 0,!1,{fileName:C,lineNumber:192,columnNumber:26},this):(0,S.jsxDEV)(`span`,{className:`truncate font-mono`,children:t},void 0,!1,{fileName:C,lineNumber:192,columnNumber:64},this)}var j={kinds:[`ip`],Page:k,Inline:A,Value:D};function M(e){return(0,S.jsxDEV)(a,{field:e.field,value:e.value,label:e.label,required:e.required,error:e.error,mode:e.mode,geom:`inline`,bare:e.bare,view:t=>e.field.hints.multiple===!0?T(t,e=>x(e)):(()=>{let e=o(t,null);if(e)return(0,S.jsxDEV)(`code`,{className:`font-mono text-sm`,children:x(e)},void 0,!1,{fileName:C,lineNumber:218,columnNumber:34},this);let n=String(t??``);return n?(0,S.jsxDEV)(`span`,{className:`text-muted`,children:n},void 0,!1,{fileName:C,lineNumber:220,columnNumber:28},this):(0,S.jsxDEV)(s,{},void 0,!1,{fileName:C,lineNumber:220,columnNumber:72},this)})(),edit:(t,n)=>e.field.hints.multiple===!0?(0,S.jsxDEV)(c,{value:String(t),onChange:n,validate:e=>b(e.trim())!==null,serialize:e=>{let t=b(e.trim());return t?JSON.stringify(t):null},display:e=>{try{return x(JSON.parse(e))}catch{return e}},renderInput:(e,t,n)=>(0,S.jsxDEV)(d,{value:e,placeholder:`192.168.1.0/24`,onChange:e=>t(e.target.value),className:`flex-1`,onKeyDown:e=>{e.key===`Enter`&&(e.preventDefault(),n())}},void 0,!1,{fileName:C,lineNumber:241,columnNumber:15},this)},void 0,!1,{fileName:C,lineNumber:225,columnNumber:11},this):(0,S.jsxDEV)(w,{value:t,onChange:n,parse:b,format:x,placeholder:`192.168.1.0/24`},void 0,!1,{fileName:C,lineNumber:256,columnNumber:11},this)},void 0,!1,{fileName:C,lineNumber:204,columnNumber:5},this)}function N({value:e}){let t=null;try{t=x(JSON.parse(String(e)))}catch{t=null}return t===null?(0,S.jsxDEV)(`span`,{className:`truncate`,children:`—`},void 0,!1,{fileName:C,lineNumber:278,columnNumber:26},this):(0,S.jsxDEV)(`span`,{className:`truncate font-mono`,children:t},void 0,!1,{fileName:C,lineNumber:278,columnNumber:64},this)}var P={kinds:[`cidr`],Page:M,Inline:N,Value:O};function F({field:e,value:t,onChange:n}){let r=p(e),i=t===``?``:Number(t),[a,o]=(0,_.useState)(()=>i!==``&&Number(i)>0?m(Number(i),r)[0]:e.hints.unit??`GB`),s=f(r,a),c=i===``?``:Number((Number(i)/s).toFixed(4)),u=e=>Math.round(e*s);return(0,S.jsxDEV)(`div`,{className:`flex gap-2 min-w-0`,children:[(0,S.jsxDEV)(d,{type:`number`,className:`flex-1 min-w-0`,min:0,value:c,onChange:e=>n(e.target.value===``?``:String(u(Number(e.target.value))))},void 0,!1,{fileName:C,lineNumber:301,columnNumber:7},this),(0,S.jsxDEV)(l,{value:a,onChange:o,items:g[r].map(([e])=>({value:e,title:e})),triggerClassName:`w-24 justify-between gap-1 px-2 font-normal`},void 0,!1,{fileName:C,lineNumber:308,columnNumber:7},this)]},void 0,!0,{fileName:C,lineNumber:300,columnNumber:5},this)}function I({value:e,system:t}){let n=h(e,t);return n?(0,S.jsxDEV)(`span`,{children:n},void 0,!1,{fileName:C,lineNumber:323,columnNumber:14},this):(0,S.jsxDEV)(s,{},void 0,!1,{fileName:C,lineNumber:323,columnNumber:33},this)}function L(e){let t=p(e.field);return(0,S.jsxDEV)(a,{field:e.field,value:e.value,label:e.label,required:e.required,error:e.error,mode:e.mode,geom:`inline`,width:`w-48`,bare:e.bare,view:e=>(0,S.jsxDEV)(I,{value:e,system:t},void 0,!1,{fileName:C,lineNumber:339,columnNumber:20},this),edit:(t,n)=>(0,S.jsxDEV)(F,{field:e.field,value:String(t??``),onChange:n},void 0,!1,{fileName:C,lineNumber:341,columnNumber:9},this)},void 0,!1,{fileName:C,lineNumber:329,columnNumber:5},this)}function R({field:e,value:t}){return(0,S.jsxDEV)(I,{value:t,system:p(e)},void 0,!1,{fileName:C,lineNumber:348,columnNumber:10},this)}var z=u({shelf:{library:`devices`,shelf:`network`},renderers:[j,P,{kinds:[`dataSize`],Page:L,Inline:R}],templates:{"devices.scan.summary":()=>n(()=>import(`./ScanSummary-xKGEaOS0.js`),__vite__mapDeps([0,1,2,3]))}});export{z as default};
2
+ import{r as e}from"./rolldown-runtime-QTnfLwEv.js";import{a as t}from"./i18n-vendor-T6EnJ_TL.js";import{p as n,t as r}from"./react-vendor-CzSUaSLk.js";import{En as i,Tn as a,Y as o,it as s,tn as c,wn as l}from"./src-C9WAFG8V.js";import{n as u}from"./plugin-ui-CKd6q8ec.js";import{t as d}from"./input-DqF3I-kT.js";import{a as f,c as p,n as m,o as h,t as g}from"./data-size-oPRYOwnj.js";var _=e(t(),1);function v(e){let t=e.match(/^(\d{1,3})\.(\d{1,3})\.(\d{1,3})\.(\d{1,3})$/);if(t){let e=t.slice(1).map(Number);return e.every(e=>e>=0&&e<=255)?{v:4,a:e}:null}try{let t=e;if(e.includes(`::`)){let[n,r]=e.split(`::`),i=n?n.split(`:`):[],a=r?r.split(`:`):[],o=8-i.length-a.length;t=[...i,...Array(o).fill(`0`),...a].join(`:`)}let n=t.split(`:`);if(n.length!==8)return null;let r=n.map(e=>parseInt(e,16));return r.some(e=>isNaN(e)||e<0||e>65535)?null:{v:6,a:r}}catch{return null}}function y(e){return e.v===4?e.a.join(`.`):e.a.map(e=>e.toString(16)).join(`:`)}function b(e){let t=e.lastIndexOf(`/`);if(t===-1)return null;let n=e.slice(0,t),r=e.slice(t+1),i=parseInt(r,10),a=v(n);if(!a||isNaN(i))return null;let o=a.v===4?32:128;return i<0||i>o?null:{...a,p:i}}function x(e){return`${y(e)}/${e.p}`}var S=r(),C=`/home/grigorii/Projects/GitHub/grigorii-horos/coffer/packages/plugin-devices/src/fields/ui.tsx`;function w({value:e,onChange:t,parse:n,format:r,placeholder:i}){let a=(0,_.useMemo)(()=>{if(e&&typeof e==`object`)return e;if(typeof e!=`string`)return null;try{return JSON.parse(e)}catch{return null}},[e]),o=typeof e==`string`?e:``,[s,c]=(0,_.useState)(a?r(a):o);(0,_.useEffect)(()=>{c(a?r(a):o)},[o,a]);let l=e=>{let r=e.trim(),i=n(r);t(i?JSON.stringify(i):r)};return(0,S.jsxDEV)(d,{value:s,placeholder:i,onChange:e=>c(e.target.value),onBlur:()=>l(s),onKeyDown:e=>{e.key===`Enter`&&l(s)}},void 0,!1,{fileName:C,lineNumber:67,columnNumber:5},this)}function T(e,t){return(0,S.jsxDEV)(i,{items:c(e,[]),content:e=>{let n=typeof e==`string`?c(e,null):e;return n&&typeof n==`object`?t(n):String(e)}},void 0,!1,{fileName:C,lineNumber:84,columnNumber:5},this)}function E(e,t){let n=typeof e==`string`?c(e,null):e??null;if(n&&typeof n==`object`)return(0,S.jsxDEV)(`code`,{className:`font-mono text-sm`,children:t(n)},void 0,!1,{fileName:C,lineNumber:103,columnNumber:46},this);let r=String(e??``);return r?(0,S.jsxDEV)(`span`,{className:`text-muted`,children:r},void 0,!1,{fileName:C,lineNumber:105,columnNumber:16},this):(0,S.jsxDEV)(a,{},void 0,!1,{fileName:C,lineNumber:105,columnNumber:60},this)}function D({value:e}){return E(e,y)}function O({value:e}){return E(e,x)}function k(e){return(0,S.jsxDEV)(o,{field:e.field,value:e.value,label:e.label,required:e.required,error:e.error,mode:e.mode,geom:`inline`,bare:e.bare,view:t=>e.field.hints.multiple===!0?T(t,e=>y(e)):(()=>{let e=c(t,null);if(e)return(0,S.jsxDEV)(`code`,{className:`font-mono text-sm`,children:y(e)},void 0,!1,{fileName:C,lineNumber:132,columnNumber:34},this);let n=String(t??``);return n?(0,S.jsxDEV)(`span`,{className:`text-muted`,children:n},void 0,!1,{fileName:C,lineNumber:134,columnNumber:28},this):(0,S.jsxDEV)(a,{},void 0,!1,{fileName:C,lineNumber:134,columnNumber:72},this)})(),edit:(t,n)=>e.field.hints.multiple===!0?(0,S.jsxDEV)(s,{value:String(t),onChange:n,validate:e=>v(e.trim())!==null,serialize:e=>{let t=v(e.trim());return t?JSON.stringify(t):null},display:e=>{try{return y(JSON.parse(e))}catch{return e}},renderInput:(e,t,n)=>(0,S.jsxDEV)(d,{value:e,placeholder:`192.168.1.1`,onChange:e=>t(e.target.value),className:`flex-1`,onKeyDown:e=>{e.key===`Enter`&&(e.preventDefault(),n())}},void 0,!1,{fileName:C,lineNumber:155,columnNumber:15},this)},void 0,!1,{fileName:C,lineNumber:139,columnNumber:11},this):(0,S.jsxDEV)(w,{value:t,onChange:n,parse:v,format:y,placeholder:`192.168.1.1`},void 0,!1,{fileName:C,lineNumber:170,columnNumber:11},this)},void 0,!1,{fileName:C,lineNumber:118,columnNumber:5},this)}function A({value:e}){let t=null;try{t=y(JSON.parse(String(e)))}catch{t=null}return t===null?(0,S.jsxDEV)(`span`,{className:`truncate`,children:`—`},void 0,!1,{fileName:C,lineNumber:192,columnNumber:26},this):(0,S.jsxDEV)(`span`,{className:`truncate font-mono`,children:t},void 0,!1,{fileName:C,lineNumber:192,columnNumber:64},this)}var j={kinds:[`ip`],Page:k,Inline:A,Value:D};function M(e){return(0,S.jsxDEV)(o,{field:e.field,value:e.value,label:e.label,required:e.required,error:e.error,mode:e.mode,geom:`inline`,bare:e.bare,view:t=>e.field.hints.multiple===!0?T(t,e=>x(e)):(()=>{let e=c(t,null);if(e)return(0,S.jsxDEV)(`code`,{className:`font-mono text-sm`,children:x(e)},void 0,!1,{fileName:C,lineNumber:218,columnNumber:34},this);let n=String(t??``);return n?(0,S.jsxDEV)(`span`,{className:`text-muted`,children:n},void 0,!1,{fileName:C,lineNumber:220,columnNumber:28},this):(0,S.jsxDEV)(a,{},void 0,!1,{fileName:C,lineNumber:220,columnNumber:72},this)})(),edit:(t,n)=>e.field.hints.multiple===!0?(0,S.jsxDEV)(s,{value:String(t),onChange:n,validate:e=>b(e.trim())!==null,serialize:e=>{let t=b(e.trim());return t?JSON.stringify(t):null},display:e=>{try{return x(JSON.parse(e))}catch{return e}},renderInput:(e,t,n)=>(0,S.jsxDEV)(d,{value:e,placeholder:`192.168.1.0/24`,onChange:e=>t(e.target.value),className:`flex-1`,onKeyDown:e=>{e.key===`Enter`&&(e.preventDefault(),n())}},void 0,!1,{fileName:C,lineNumber:241,columnNumber:15},this)},void 0,!1,{fileName:C,lineNumber:225,columnNumber:11},this):(0,S.jsxDEV)(w,{value:t,onChange:n,parse:b,format:x,placeholder:`192.168.1.0/24`},void 0,!1,{fileName:C,lineNumber:256,columnNumber:11},this)},void 0,!1,{fileName:C,lineNumber:204,columnNumber:5},this)}function N({value:e}){let t=null;try{t=x(JSON.parse(String(e)))}catch{t=null}return t===null?(0,S.jsxDEV)(`span`,{className:`truncate`,children:`—`},void 0,!1,{fileName:C,lineNumber:278,columnNumber:26},this):(0,S.jsxDEV)(`span`,{className:`truncate font-mono`,children:t},void 0,!1,{fileName:C,lineNumber:278,columnNumber:64},this)}var P={kinds:[`cidr`],Page:M,Inline:N,Value:O};function F({field:e,value:t,onChange:n}){let r=p(e),i=t===``?``:Number(t),[a,o]=(0,_.useState)(()=>i!==``&&Number(i)>0?m(Number(i),r)[0]:e.hints.unit??`GB`),s=f(r,a),c=i===``?``:Number((Number(i)/s).toFixed(4)),u=e=>Math.round(e*s);return(0,S.jsxDEV)(`div`,{className:`flex gap-2 min-w-0`,children:[(0,S.jsxDEV)(d,{type:`number`,className:`flex-1 min-w-0`,min:0,value:c,onChange:e=>n(e.target.value===``?``:String(u(Number(e.target.value))))},void 0,!1,{fileName:C,lineNumber:301,columnNumber:7},this),(0,S.jsxDEV)(l,{value:a,onChange:o,items:g[r].map(([e])=>({value:e,title:e})),triggerClassName:`w-24 justify-between gap-1 px-2 font-normal`},void 0,!1,{fileName:C,lineNumber:308,columnNumber:7},this)]},void 0,!0,{fileName:C,lineNumber:300,columnNumber:5},this)}function I({value:e,system:t}){let n=h(e,t);return n?(0,S.jsxDEV)(`span`,{children:n},void 0,!1,{fileName:C,lineNumber:323,columnNumber:14},this):(0,S.jsxDEV)(a,{},void 0,!1,{fileName:C,lineNumber:323,columnNumber:33},this)}function L(e){let t=p(e.field);return(0,S.jsxDEV)(o,{field:e.field,value:e.value,label:e.label,required:e.required,error:e.error,mode:e.mode,geom:`inline`,width:`w-48`,bare:e.bare,view:e=>(0,S.jsxDEV)(I,{value:e,system:t},void 0,!1,{fileName:C,lineNumber:339,columnNumber:20},this),edit:(t,n)=>(0,S.jsxDEV)(F,{field:e.field,value:String(t??``),onChange:n},void 0,!1,{fileName:C,lineNumber:341,columnNumber:9},this)},void 0,!1,{fileName:C,lineNumber:329,columnNumber:5},this)}function R({field:e,value:t}){return(0,S.jsxDEV)(I,{value:t,system:p(e)},void 0,!1,{fileName:C,lineNumber:348,columnNumber:10},this)}var z=u({shelf:{library:`devices`,shelf:`network`},renderers:[j,P,{kinds:[`dataSize`],Page:L,Inline:R}],templates:{"devices.scan.summary":()=>n(()=>import(`./ScanSummary-xKGEaOS0.js`),__vite__mapDeps([0,1,2,3]))}});export{z as default};
package/dist/index.html CHANGED
@@ -38,7 +38,7 @@
38
38
  }
39
39
  }
40
40
  </script>
41
- <script type="module" crossorigin src="/assets/index-CHlM3CU9.js"></script>
41
+ <script type="module" crossorigin src="/assets/index-zcINFUZQ.js"></script>
42
42
  <link rel="modulepreload" crossorigin href="/assets/rolldown-runtime-QTnfLwEv.js">
43
43
  <link rel="modulepreload" crossorigin href="/assets/i18n-vendor-T6EnJ_TL.js">
44
44
  <link rel="modulepreload" crossorigin href="/assets/react-vendor-CzSUaSLk.js">
@@ -50,19 +50,19 @@
50
50
  <link rel="modulepreload" crossorigin href="/assets/phone-input-vooQJZf_.js">
51
51
  <link rel="modulepreload" crossorigin href="/assets/popover-DjWMp23y.js">
52
52
  <link rel="modulepreload" crossorigin href="/assets/development-olQNibq5.js">
53
- <link rel="modulepreload" crossorigin href="/assets/src-54Qdjl2W.js">
53
+ <link rel="modulepreload" crossorigin href="/assets/src-C9WAFG8V.js">
54
54
  <link rel="modulepreload" crossorigin href="/assets/plugin-ui-CKd6q8ec.js">
55
55
  <link rel="modulepreload" crossorigin href="/assets/file-text-DzYzGxiY.js">
56
56
  <link rel="modulepreload" crossorigin href="/assets/arrow-left-5G0O-4HL.js">
57
- <link rel="modulepreload" crossorigin href="/assets/ThemeSwitcher-CADoC9xw.js">
57
+ <link rel="modulepreload" crossorigin href="/assets/ThemeSwitcher-CR6oJXQD.js">
58
58
  <link rel="modulepreload" crossorigin href="/assets/markdown-vendor-CtaBI5gJ.js">
59
59
  <link rel="modulepreload" crossorigin href="/assets/extend-BTkr7oJ8.js">
60
60
  <link rel="modulepreload" crossorigin href="/assets/plugin-CFEkHH3f.js">
61
- <link rel="modulepreload" crossorigin href="/assets/list-cache-D1eUf-Pp.js">
61
+ <link rel="modulepreload" crossorigin href="/assets/list-cache-D-BfHI9X.js">
62
62
  <link rel="modulepreload" crossorigin href="/assets/api-ChM6smRq.js">
63
63
  <link rel="modulepreload" crossorigin href="/assets/auth-context-CGdGFadP.js">
64
- <link rel="modulepreload" crossorigin href="/assets/SettingsForm-BAjKJ1MR.js">
65
- <link rel="stylesheet" crossorigin href="/assets/index-KdG4mu3z.css">
64
+ <link rel="modulepreload" crossorigin href="/assets/SettingsForm-DW1KCYe4.js">
65
+ <link rel="stylesheet" crossorigin href="/assets/index-i___vlpd.css">
66
66
  </head>
67
67
  <body>
68
68
  <div id="root"></div>