@coffer-org/web 7.4.0 → 7.4.2
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.
- package/dist/assets/{ChatWidget-BpM6H_NG.js → ChatWidget-CZFJNVBt.js} +2 -2
- package/dist/assets/{DiagnosticsPage-Dzhks26m.js → DiagnosticsPage-BRGLbMCb.js} +1 -1
- package/dist/assets/{MarkdownEditor-CANj53YF.js → MarkdownEditor-DsKPqeIt.js} +1 -1
- package/dist/assets/{NewRecordView-Y6PoWPB9.js → NewRecordView-B1jdKkrr.js} +1 -1
- package/dist/assets/{PluginSettingsPage-BIUa4IUX.js → PluginSettingsPage-Dasrpx47.js} +1 -1
- package/dist/assets/{SettingsForm-D7Go7QNO.js → SettingsForm-C-xB5cdD.js} +1 -1
- package/dist/assets/SettingsPage-DjRQ1bY5.js +3 -0
- package/dist/assets/{ThemeSwitcher-DuYQMxYo.js → ThemeSwitcher-BJRcZMR7.js} +1 -1
- package/dist/assets/{data-size-BMG0D59K.js → data-size-CO-LGHbN.js} +1 -1
- package/dist/assets/{extend-yQ8zoqGc.js → extend-CHOe1AVl.js} +1 -1
- package/dist/assets/{fields-CV3RQg0Y.js → fields-Ce51pRua.js} +1 -1
- package/dist/assets/{ilamy-view-Dddf8Q2O.js → ilamy-view-D7DQZ577.js} +2 -2
- package/dist/assets/index-CpRTFlxk.js +22 -0
- package/dist/assets/index-Le8YFirR.css +2 -0
- package/dist/assets/{list-cache-DOhsI_p2.js → list-cache-wPeWyKg1.js} +1 -1
- package/dist/assets/{registration-BBxYynR4.js → registration-43gjHJ3X.js} +1 -1
- package/dist/assets/settings-BEzSaRjz.js +1 -0
- package/dist/assets/{shelf-Cj_pNvd-.js → shelf-DjiUBfgQ.js} +1 -1
- package/dist/assets/{src-Q4BhkNtH.js → src-B-FFwJ-G.js} +1 -1
- package/dist/assets/{src-C46sbhiF.js → src-B1LWYTOR.js} +1 -1
- package/dist/assets/{src-B2aXBzDf.js → src-B7dY0wwO.js} +2 -2
- package/dist/assets/{src-Bhz_DXRd.js → src-BDP8FIN_.js} +1 -1
- package/dist/assets/{src-DnN2GqEI.js → src-BPuTgDYD.js} +1 -1
- package/dist/assets/{src-Bl8rYgUt2.js → src-BRP-DLVM2.js} +1 -1
- package/dist/assets/src-BU56fYCH2.js +1 -0
- package/dist/assets/{src-qJ0szNVM.js → src-BmgYgIDb.js} +1 -1
- package/dist/assets/{src-BrHtOaqX.js → src-C06O0ceD.js} +1 -1
- package/dist/assets/src-CCeQIMl_.js +1 -0
- package/dist/assets/{src-CQOQ3BNT.js → src-CgXkpslu.js} +1 -1
- package/dist/assets/src-CheiTWox.js +7 -0
- package/dist/assets/src-CjPxrk6V.js +1 -0
- package/dist/assets/{src-BHz-TcxU.js → src-Co7xh07B.js} +1 -1
- package/dist/assets/{src-tKMBP4Dv.js → src-CtQWxdaS.js} +1 -1
- package/dist/assets/src-CwyJPFKQ.js +1 -0
- package/dist/assets/src-DDtMlZ03.js +1 -0
- package/dist/assets/{src-rMuD7zD4.js → src-DNx0vmvI.js} +1 -1
- package/dist/assets/{src-4bmZI2h_.js → src-DjrjxzQu.js} +1 -1
- package/dist/assets/{src-CE1TPDES.js → src-Dsh4Yd_x.js} +1 -1
- package/dist/assets/{src-xh_qAK43.js → src-Du26RLvk.js} +1 -1
- package/dist/assets/src-G94LYhEo.js +1 -0
- package/dist/assets/{src-BmyfVP9z.js → src-aPsTM6Fr.js} +1 -1
- package/dist/assets/{src-0TBpEeKK.js → src-iJXhTwKd.js} +1 -1
- package/dist/assets/{src-Dr_dOgc9.js → src-rXsbV4Ce.js} +1 -1
- package/dist/assets/{ui-D0o4fruq.js → ui-BLiPhfyz.js} +1 -1
- package/dist/assets/{ui-CZNm-1na.js → ui-DL6R5B56.js} +2 -2
- package/dist/assets/{ui-BpQAH_5F.js → ui-jz6tZ6GD.js} +1 -1
- package/dist/assets/ui-mefYc6et.js +2 -0
- package/dist/index.html +9 -9
- package/dist-vendor/web-ui.js +8626 -8597
- package/package.json +1 -1
- package/dist/assets/SettingsPage-BmyDzHcF.js +0 -3
- package/dist/assets/index-Brc5FUYA.css +0 -2
- package/dist/assets/index-VReUcCHo.js +0 -22
- package/dist/assets/settings-Bo5IOwVg.js +0 -1
- package/dist/assets/src-BZK1QVol.js +0 -1
- package/dist/assets/src-CD1zBxk2.js +0 -1
- package/dist/assets/src-D14fQdLH.js +0 -1
- package/dist/assets/src-DgQcfYnz.js +0 -1
- package/dist/assets/src-Ds6m7Evp2.js +0 -1
- package/dist/assets/src-Mln-mCD3.js +0 -1
- package/dist/assets/src-r8PGv9_a.js +0 -7
- package/dist/assets/ui-CPQ5ERi6.js +0 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
import{_ as e,n as t,r as n}from"./fields-CV3RQg0Y.js";import{a as r}from"./shelf-Cj_pNvd-.js";import{i,n as a}from"./plugin-Cjr7lgQH.js";import{t as o}from"./extend-yQ8zoqGc.js";import{t as s}from"./settings-Bo5IOwVg.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`}),stock:t.stats({fields:{quantity:t.int({label:`health.medicine.fields.quantity`,rules:{min:0,max:1e5},mutate:[`daysLeft`,`quantityCheckedAt`]}),meter:t.meter({source:{daysLeft:t.int({label:`health.medicine.fields.daysLeft`,value:v,cache:3600,mutate:[`supply_state`]})},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`},tone:`success`},{value:`low`,title:`health.medicine.options.supply_state.low`,icon:{kind:`icon`,value:`lucide:minus`},tone:`warning`},{value:`out`,title:`health.medicine.options.supply_state.out`,icon:{kind:`icon`,value:`lucide:x`},tone:`danger`}],value:e=>_(v(e)),cache:3600,strict:!0,noSearch:!0})}}),countdown:t.countdown({source:{quantityCheckedAt:t.date({label:`health.medicine.fields.quantityCheckedAt`,value:e=>e.now.slice(0,10),mutate:[`daysLeft`]})},caption:`units.days`})}}),hairline:t.divider({}),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}),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`}),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`,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`}]})}}),purchase:t.group({label:`health.medicine.groups.purchase`,icon:`lucide:shopping-cart`,scope:`hoist`,fields:{link:t.link({label:`health.medicine.fields.link`,ui:{span:12}}),store:t.relation({label:`health.medicine.fields.store`,options:n({library:`things`,shelf:`store`}),ui:{span:6}}),orderNumber:t.string({label:`health.medicine.fields.orderNumber`,rules:{max:100},ui:{span:6}}),purchaseDate:t.date({label:`health.medicine.fields.purchaseDate`,ui:{span:4}}),purchasePrice:t.money({label:`health.medicine.fields.purchasePrice`,ui:{span:4}}),currency:t.currency({label:`core.fields.currency`,default:`UAH`,ui:{span:4}})}}),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}}),indicators:t.assay({label:`health.health_test.fields.indicators`,icon:`lucide:activity`,analyte:`analyte`,value:`value`,unit:`unit`,low:`low`,high:`high`,source:{indicators:t.group({scope:`nest`,multiple:!0,fields:{analyte:t.string({label:`health.health_test.fields.analyte`,rules:{max:100}}),value:t.real({label:`health.health_test.fields.value`}),unit:t.string({label:`health.health_test.fields.unit`,rules:{max:20}}),low:t.real({label:`health.health_test.fields.low`}),high:t.real({label:`health.health_test.fields.high`})}})}}),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=o({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`,`things`],label:`health.plugin.label`,description:`health.plugin.description`,optionLists:[{name:`day-periods`,options:[...C]}],libraries:[{meta:i({id:`health`,label:`health.library.label`,icon:`lucide:hospital`,agent:{description:`Medical tests, doctor visits, and medicines — each linked to a person.`,instructions:`Records link to a person (relation to people). Count upcoming/overdue visits by the date field. medicine.quantity is a SNAPSHOT dated by medicine.quantityCheckedAt ("this many as of that date"), and daysLeft subtracts everything the dose schedule has consumed since it — so when a medicine is taken or restocked, ALWAYS write quantityCheckedAt (today) in the same update_record call as quantity. Writing quantity alone dates the new count to the old checkpoint and can immediately report the pack as out. After a visit — result/nextVisit.`},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};
|
|
1
|
+
import{_ as e,n as t,r as n}from"./fields-Ce51pRua.js";import{a as r}from"./shelf-DjiUBfgQ.js";import{i,n as a}from"./plugin-Cjr7lgQH.js";import{t as o}from"./extend-CHOe1AVl.js";import{t as s}from"./settings-BEzSaRjz.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`}),stock:t.stats({fields:{quantity:t.int({label:`health.medicine.fields.quantity`,rules:{min:0,max:1e5},mutate:[`daysLeft`,`quantityCheckedAt`]}),meter:t.meter({source:{daysLeft:t.int({label:`health.medicine.fields.daysLeft`,value:v,cache:3600,mutate:[`supply_state`]})},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`},tone:`success`},{value:`low`,title:`health.medicine.options.supply_state.low`,icon:{kind:`icon`,value:`lucide:minus`},tone:`warning`},{value:`out`,title:`health.medicine.options.supply_state.out`,icon:{kind:`icon`,value:`lucide:x`},tone:`danger`}],value:e=>_(v(e)),cache:3600,strict:!0,noSearch:!0})}}),countdown:t.countdown({source:{quantityCheckedAt:t.date({label:`health.medicine.fields.quantityCheckedAt`,value:e=>e.now.slice(0,10),mutate:[`daysLeft`]})},caption:`units.days`})}}),hairline:t.divider({}),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}),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`}),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`,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`}]})}}),purchase:t.group({label:`health.medicine.groups.purchase`,icon:`lucide:shopping-cart`,scope:`hoist`,fields:{link:t.link({label:`health.medicine.fields.link`,ui:{span:12}}),store:t.relation({label:`health.medicine.fields.store`,options:n({library:`things`,shelf:`store`}),ui:{span:6}}),orderNumber:t.string({label:`health.medicine.fields.orderNumber`,rules:{max:100},ui:{span:6}}),purchaseDate:t.date({label:`health.medicine.fields.purchaseDate`,ui:{span:4}}),purchasePrice:t.money({label:`health.medicine.fields.purchasePrice`,ui:{span:4}}),currency:t.currency({label:`core.fields.currency`,default:`UAH`,ui:{span:4}})}}),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}}),indicators:t.assay({label:`health.health_test.fields.indicators`,icon:`lucide:activity`,analyte:`analyte`,value:`value`,unit:`unit`,low:`low`,high:`high`,source:{indicators:t.group({scope:`nest`,multiple:!0,fields:{analyte:t.string({label:`health.health_test.fields.analyte`,rules:{max:100}}),value:t.real({label:`health.health_test.fields.value`}),unit:t.string({label:`health.health_test.fields.unit`,rules:{max:20}}),low:t.real({label:`health.health_test.fields.low`}),high:t.real({label:`health.health_test.fields.high`})}})}}),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=o({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`,`things`],label:`health.plugin.label`,description:`health.plugin.description`,optionLists:[{name:`day-periods`,options:[...C]}],libraries:[{meta:i({id:`health`,label:`health.library.label`,icon:`lucide:hospital`,agent:{description:`Medical tests, doctor visits, and medicines — each linked to a person.`,instructions:`Records link to a person (relation to people). Count upcoming/overdue visits by the date field. medicine.quantity is a SNAPSHOT dated by medicine.quantityCheckedAt ("this many as of that date"), and daysLeft subtracts everything the dose schedule has consumed since it — so when a medicine is taken or restocked, ALWAYS write quantityCheckedAt (today) in the same update_record call as quantity. Writing quantity alone dates the new count to the old checkpoint and can immediately report the pack as out. After a visit — result/nextVisit.`},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};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{n as e,r as t}from"./fields-
|
|
1
|
+
import{n as e,r as t}from"./fields-Ce51pRua.js";import{a as n}from"./shelf-DjiUBfgQ.js";import{i as r,n as i}from"./plugin-Cjr7lgQH.js";import{t as a}from"./extend-CHOe1AVl.js";var o=n({shelf:`personal_document`,library:`documents`,label:`documents.personal_document.label`,icon:`lucide:id-card`,views:{list:[`owner`,`type`,`surname`,`expires`]},fields:{name:e.title({label:`core.fields.name`}),about:e.illustrated({label:`documents.personal_document.fields.about`,fields:{image:e.avatar({}),text:e.text({rules:{max:1e3}})}}),idcard:e.idcard({overline:{type:e.string({label:`core.fields.type`,strict:!0,noSearch:!0,options:[{value:`P`,title:`documents.personal_document.options.type.P`,face:`passport`},{value:`PA`,title:`documents.personal_document.options.type.PA`,face:`biometric`},{value:`ID`,title:`documents.personal_document.options.type.ID`,face:`idcard`},{value:`DL`,title:`documents.personal_document.options.type.DL`,face:`licence`},{value:`RP`,title:`documents.personal_document.options.type.RP`,face:`residence`},{value:`TP`,title:`documents.personal_document.options.type.TP`,face:`protection`},{value:`MIL`,title:`documents.personal_document.options.type.MIL`,face:`military`},{value:`TIN`,title:`documents.personal_document.options.type.TIN`,face:`tax`},{value:`SSN`,title:`documents.personal_document.options.type.SSN`,face:`social`},{value:`V`,title:`documents.personal_document.options.type.V`,face:`visa`},{value:`WP`,title:`documents.personal_document.options.type.WP`,face:`workpermit`},{value:`MC`,title:`documents.personal_document.options.type.MC`,face:`medical`},{value:`INS`,title:`documents.personal_document.options.type.INS`,face:`insurance`},{value:`BR`,title:`documents.personal_document.options.type.BR`,face:`birth`},{value:`MAR`,title:`documents.personal_document.options.type.MAR`,face:`marriage`},{value:`DIV`,title:`documents.personal_document.options.type.DIV`,face:`divorce`},{value:`DEA`,title:`documents.personal_document.options.type.DEA`,face:`death`},{value:`EDU`,title:`documents.personal_document.options.type.EDU`,face:`diploma`},{value:`VAC`,title:`documents.personal_document.options.type.VAC`,face:`vaccination`},{value:`OT`,title:`documents.personal_document.options.type.OT`}]})},number:{number:e.identifier({label:`documents.personal_document.fields.number`,rules:{max:50}})},photo:{portrait:e.image({label:`documents.personal_document.fields.portrait`})},meta:{surname:e.string({label:`documents.personal_document.fields.surname`,rules:{max:100},ui:{span:6}}),given_names:e.string({label:`documents.personal_document.fields.given_names`,rules:{max:200},ui:{span:6}}),birth_date:e.date({label:`documents.personal_document.fields.birth_date`,ui:{span:4}}),sex:e.string({label:`documents.personal_document.fields.sex`,strict:!0,noSearch:!0,options:[{value:`M`,title:`documents.personal_document.options.sex.M`},{value:`F`,title:`documents.personal_document.options.sex.F`}],ui:{span:4,faces:[`passport`,`biometric`,`idcard`,`licence`,`residence`,`protection`,`military`,`visa`]}}),nationality:e.string({label:`documents.personal_document.fields.nationality`,options:`countries`,strict:!0,noSearch:!0,ui:{span:4,faces:[`passport`,`biometric`,`idcard`,`licence`,`residence`,`protection`,`military`,`visa`]}})},footer:{issued:e.date({label:`documents.personal_document.fields.issued`,ui:{span:4}}),authority:e.string({label:`documents.personal_document.fields.authority`,rules:{max:200},ui:{span:4}}),record_no:e.string({label:`documents.personal_document.fields.record_no`,rules:{max:50},ui:{span:4}})},mrz:{mrz:e.mrz({label:`documents.personal_document.fields.mrz`,rules:{max:200}})}}),expires:e.reminder({label:`documents.personal_document.fields.expires`,rules:{lead:60}}),owner:e.relation({label:`documents.personal_document.fields.owner`,options:t({library:`people`,shelf:`person`}),ui:{span:6}}),storage:e.relation({label:`documents.personal_document.fields.storage`,options:t({library:`things`,shelf:`storage_location`}),ui:{span:6}}),photos:e.image({label:`documents.personal_document.fields.photos`,multiple:!0}),tags:e.tags({label:`documents.personal_document.fields.tags`}),notes:e.text({label:`documents.personal_document.fields.notes`,rules:{max:1e3}})}}),s=a({id:`person_identity`,label:`documents.person_identity.label`,icon:`lucide:globe`,attachTo:[{library:`people`,shelf:`person`}],agent:`Canonical person identity (not tied to a physical document).
|
|
2
2
|
nationality — ISO alpha-2. variants — given/family name per language (field.keyed by lang: name+surname).`,fields:{nationality:e.string({label:`documents.person_identity.fields.nationality`,options:`countries`,strict:!0,noSearch:!0}),variants:e.keyed({label:`documents.person_identity.fields.variants`,icon:`lucide:languages`,fields:{lang:e.string({label:`documents.person_identity.variants.lang`,options:`languages`,strict:!0,noSearch:!0}),name:e.string({label:`documents.person_identity.variants.name`}),surname:e.string({label:`documents.person_identity.variants.surname`})},by:`lang`})}}),c=i({id:`documents`,version:`1.0.0`,dependsOn:[`people`,`things`],label:`documents.plugin.label`,description:`documents.plugin.description`,libraries:[{meta:r({id:`documents`,label:`documents.library.label`,icon:`lucide:id-card`,agent:{description:`Personal documents — IDs, passports, licences (personal_document); tracks expiry.`,instructions:`Expiring documents — count by expires. When a document is reissued — update number/issued/expires via update_record.`},starterHint:`documents that are about to expire`}),shelves:[o]}],extends_:[s]});export{c as default};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{n as e,r as t}from"./fields-
|
|
1
|
+
import{n as e,r as t}from"./fields-Ce51pRua.js";import{a as n}from"./shelf-DjiUBfgQ.js";import{i as r,n as i}from"./plugin-Cjr7lgQH.js";var a=n({shelf:`meter_reading`,library:`home`,label:`home.meter_reading.label`,icon:`lucide:gauge`,agent:`Utility meter readings for a date. name — reading period, e.g. "2026-05".
|
|
2
2
|
date — reading date. cold_water/hot_water — water meter readings (m³).
|
|
3
3
|
electricity — electricity meter reading (kWh). gas — gas meter reading (m³).
|
|
4
|
-
Stores RAW cumulative readings, not consumption (the difference is a derived calculation).`,views:{title:`date`,inline:[`date`],list:[`cold_water`,`hot_water`,`electricity`,`gas`]},fields:{date:e.date({label:`home.meter_reading.fields.date`,rules:{min:`2000-01-01`,max:`today`},ui:{span:12}}),cold_water:e.real({label:`home.meter_reading.fields.cold_water`,rules:{min:0},ui:{span:3}}),hot_water:e.real({label:`home.meter_reading.fields.hot_water`,rules:{min:0},ui:{span:3}}),electricity:e.real({label:`home.meter_reading.fields.electricity`,rules:{min:0},ui:{span:3}}),gas:e.real({label:`home.meter_reading.fields.gas`,rules:{min:0},ui:{span:3}}),notes:e.text({label:`home.meter_reading.fields.notes`,rules:{max:500}})}}),o=n({shelf:`room`,library:`home`,label:`home.room.label`,icon:`lucide:door-open`,agent:`A room/space in the apartment. name — name (Bedroom, Kitchen). area — area (m²). This is a reference list of places: a target for relations from material (where a material was used). Does not store the materials themselves.`,views:{inline:[`name`],list:[`area`]},fields:{name:e.title({label:`core.fields.name`}),description:e.text({label:`home.room.fields.description`,rules:{max:1e3}}),area:e.measured({label:`home.room.fields.area`,units:`area`,rules:{min:0}}),notes:e.text({label:`home.room.fields.notes`,rules:{max:500}})}}),s=n({shelf:`material`,library:`home`,label:`home.material.label`,icon:`lucide:paint-roller`,agent:`A material/paint used in renovation. One record = a specific product (e.g. "Dulux Easycare, RAL 9010"). name — name, type — category, brand — manufacturer, color/color_code — color and tint code. rooms — relation to home/room (where used, can be several). price/quantity/store/bought_date/link — purchase data. photo/rating/notes — photos and impressions. Does NOT store a work log/timeline — only a catalog of "what was bought and where it is used".`,views:{inline:[`name`,`color`],list:[`type`,`color`,`brand`,`rooms`]},fields:{name:e.title({label:`core.fields.name`}),description:e.text({label:`home.material.fields.description`,rules:{max:1e3}}),group:e.group({label:`home.material.group.identity`,icon:`lucide:tag`,scope:`hoist`,fields:{type:e.string({label:`core.fields.type`,strict:!0,noSearch:!0,options:[{value:`paint`,title:`home.material.options.type.paint`},{value:`primer`,title:`home.material.options.type.primer`},{value:`lacquer`,title:`home.material.options.type.lacquer`},{value:`enamel`,title:`home.material.options.type.enamel`},{value:`plaster`,title:`home.material.options.type.plaster`},{value:`tile`,title:`home.material.options.type.tile`},{value:`laminate`,title:`home.material.options.type.laminate`},{value:`wallpaper`,title:`home.material.options.type.wallpaper`},{value:`skirting`,title:`home.material.options.type.skirting`},{value:`panel`,title:`home.material.options.type.panel`},{value:`putty`,title:`home.material.options.type.putty`},{value:`glue`,title:`home.material.options.type.glue`},{value:`cement`,title:`home.material.options.type.cement`},{value:`drywall`,title:`home.material.options.type.drywall`},{value:`insulation`,title:`home.material.options.type.insulation`},{value:`fixture`,title:`home.material.options.type.fixture`},{value:`plumbing`,title:`home.material.options.type.plumbing`},{value:`other`,title:`home.material.options.type.other`}]}),brand:e.string({label:`home.material.fields.brand`,rules:{max:120}}),color:e.color({label:`home.material.fields.color`}),color_code:e.string({label:`home.material.fields.color_code`,rules:{max:60}}),rooms:e.relation({label:`home.material.fields.rooms`,options:t({library:`home`,shelf:`room`}),multiple:!0})}}),ledger:e.ledger({label:`home.material.group.purchase`,icon:`lucide:shopping-cart`,fields:{price:e.
|
|
4
|
+
Stores RAW cumulative readings, not consumption (the difference is a derived calculation).`,views:{title:`date`,inline:[`date`],list:[`cold_water`,`hot_water`,`electricity`,`gas`]},fields:{date:e.date({label:`home.meter_reading.fields.date`,rules:{min:`2000-01-01`,max:`today`},ui:{span:12}}),cold_water:e.real({label:`home.meter_reading.fields.cold_water`,rules:{min:0},ui:{span:3}}),hot_water:e.real({label:`home.meter_reading.fields.hot_water`,rules:{min:0},ui:{span:3}}),electricity:e.real({label:`home.meter_reading.fields.electricity`,rules:{min:0},ui:{span:3}}),gas:e.real({label:`home.meter_reading.fields.gas`,rules:{min:0},ui:{span:3}}),notes:e.text({label:`home.meter_reading.fields.notes`,rules:{max:500}})}}),o=n({shelf:`room`,library:`home`,label:`home.room.label`,icon:`lucide:door-open`,agent:`A room/space in the apartment. name — name (Bedroom, Kitchen). area — area (m²). This is a reference list of places: a target for relations from material (where a material was used). Does not store the materials themselves.`,views:{inline:[`name`],list:[`area`]},fields:{name:e.title({label:`core.fields.name`}),description:e.text({label:`home.room.fields.description`,rules:{max:1e3}}),area:e.measured({label:`home.room.fields.area`,units:`area`,rules:{min:0}}),notes:e.text({label:`home.room.fields.notes`,rules:{max:500}})}}),s=n({shelf:`material`,library:`home`,label:`home.material.label`,icon:`lucide:paint-roller`,agent:`A material/paint used in renovation. One record = a specific product (e.g. "Dulux Easycare, RAL 9010"). name — name, type — category, brand — manufacturer, color/color_code — color and tint code. rooms — relation to home/room (where used, can be several). price/quantity/store/bought_date/link — purchase data. photo/rating/notes — photos and impressions. Does NOT store a work log/timeline — only a catalog of "what was bought and where it is used".`,views:{inline:[`name`,`color`],list:[`type`,`color`,`brand`,`rooms`]},fields:{name:e.title({label:`core.fields.name`}),description:e.text({label:`home.material.fields.description`,rules:{max:1e3}}),group:e.group({label:`home.material.group.identity`,icon:`lucide:tag`,scope:`hoist`,fields:{type:e.string({label:`core.fields.type`,strict:!0,noSearch:!0,options:[{value:`paint`,title:`home.material.options.type.paint`},{value:`primer`,title:`home.material.options.type.primer`},{value:`lacquer`,title:`home.material.options.type.lacquer`},{value:`enamel`,title:`home.material.options.type.enamel`},{value:`plaster`,title:`home.material.options.type.plaster`},{value:`tile`,title:`home.material.options.type.tile`},{value:`laminate`,title:`home.material.options.type.laminate`},{value:`wallpaper`,title:`home.material.options.type.wallpaper`},{value:`skirting`,title:`home.material.options.type.skirting`},{value:`panel`,title:`home.material.options.type.panel`},{value:`putty`,title:`home.material.options.type.putty`},{value:`glue`,title:`home.material.options.type.glue`},{value:`cement`,title:`home.material.options.type.cement`},{value:`drywall`,title:`home.material.options.type.drywall`},{value:`insulation`,title:`home.material.options.type.insulation`},{value:`fixture`,title:`home.material.options.type.fixture`},{value:`plumbing`,title:`home.material.options.type.plumbing`},{value:`other`,title:`home.material.options.type.other`}]}),brand:e.string({label:`home.material.fields.brand`,rules:{max:120}}),color:e.color({label:`home.material.fields.color`}),color_code:e.string({label:`home.material.fields.color_code`,rules:{max:60}}),rooms:e.relation({label:`home.material.fields.rooms`,options:t({library:`home`,shelf:`room`}),multiple:!0})}}),ledger:e.ledger({label:`home.material.group.purchase`,icon:`lucide:shopping-cart`,fields:{price:e.measured({label:`home.material.fields.price`,units:`currency`,rules:{min:0}}),quantity:e.measured({label:`home.material.fields.quantity`,units:[{value:`l`,label:`core.units.l`},{value:`kg`,label:`core.units.kg`},{value:`m2`,label:`core.units.m2`},{value:`pcs`,label:`core.units.pcs`}],rules:{min:0}}),store:e.string({label:`home.material.fields.store`,rules:{max:120}}),bought_date:e.date({label:`home.material.fields.bought_date`,rules:{max:`today`}}),link:e.link({label:`home.material.fields.link`})}}),group2:e.group({label:`home.material.group.media`,icon:`lucide:image`,scope:`hoist`,fields:{photo:e.image({label:`home.material.fields.photo`,multiple:!0}),rating:e.rating({label:`home.material.fields.rating`,rules:{max:5}})}}),notes:e.text({label:`home.material.fields.notes`,rules:{max:2e3}})}}),c=i({id:`home`,version:`1.0.0`,dependsOn:[],label:`home.plugin.label`,description:`home.plugin.description`,libraries:[{meta:r({id:`home`,label:`home.library.label`,icon:`lucide:house`,agent:{description:`The home itself — renovation materials, utility meter readings, rooms.`,instructions:`meter_reading readings are cumulative; consumption over a period = difference between adjacent dates. New meter readings — create_record meter_reading (do NOT edit old ones); used up a material — update material.quantity via update_record.`},starterHint:`meter readings that are overdue, or renovation materials running low`}),shelves:[a,o,s]}]});export{c as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{n as e}from"./fields-
|
|
1
|
+
import{n as e}from"./fields-Ce51pRua.js";import{n as t}from"./plugin-Cjr7lgQH.js";import{t as n}from"./settings-BEzSaRjz.js";var r=1800,i=32e3,a=64e3,o=`claude-sonnet-5`,s=`claude-opus-5`,c=[{value:`haiku`,id:`claude-haiku-4-5`,name:`Haiku 4.5`,effort:``,reasoning:!1,maxOutput:a},{value:`sonnet-low`,id:o,name:`Sonnet 5`,effort:`low`,reasoning:!1,maxOutput:i},{value:`sonnet-medium`,id:o,name:`Sonnet 5`,effort:`medium`,reasoning:!1,maxOutput:i},{value:`sonnet-high`,id:o,name:`Sonnet 5`,effort:`high`,reasoning:!0,maxOutput:i},{value:`opus-low`,id:s,name:`Opus 5`,effort:`low`,reasoning:!1,maxOutput:i},{value:`opus-medium`,id:s,name:`Opus 5`,effort:`medium`,reasoning:!0,maxOutput:i},{value:`opus-high`,id:s,name:`Opus 5`,effort:`high`,reasoning:!0,maxOutput:i}];function l(e){return[e.effort,e.reasoning?`thinking`:``].filter(Boolean).join(` · `)}var u=t({id:`claude-agent`,version:`1.0.0`,dependsOn:[],label:`claude-agent.plugin.label`,description:`claude-agent.plugin.description`,fieldContribs:[{library:`_settings`,shelf:`system`,field:`agent_id`,options:[{value:`claude-agent`,title:`claude-agent.plugin.label`}]}],settings:n({label:`claude-agent.settings.label`,fields:{group:e.group({label:`claude-agent.settings.groups.runtime`,icon:`lucide:bot`,scope:`hoist`,fields:{auth_mode:e.string({label:`claude-agent.settings.auth_mode`,default:`subscription`,strict:!0,noSearch:!0,options:[{value:`subscription`,title:`claude-agent.settings.auth_mode_subscription`},{value:`api_key`,title:`claude-agent.settings.auth_mode_api_key`}]}),anthropic_api_key:e.password({label:`claude-agent.settings.anthropic_api_key`,ui:{hidden:{auth_mode:{$ne:`api_key`}}}}),claude_model:e.string({label:`claude-agent.settings.claude_model`,default:`haiku`,strict:!0,noSearch:!0,options:c.map(e=>{let t=l(e);return{value:e.value,title:e.name,...t?{subtitle:t}:{}}})}),skip_permissions:e.boolean({label:`claude-agent.settings.skip_permissions`,default:!0}),response_timeout:e.int({label:`claude-agent.settings.response_timeout`,default:r})}}),group2:e.group({label:`claude-agent.settings.groups.rag`,icon:`lucide:search`,scope:`hoist`,fields:{rag_enabled:e.boolean({label:`claude-agent.settings.rag_enabled`,default:!0}),openai_api_key:e.password({label:`claude-agent.settings.openai_api_key`})}}),group3:e.group({label:`claude-agent.settings.groups.langfuse`,icon:`lucide:activity`,scope:`hoist`,fields:{tracing_enabled:e.boolean({label:`claude-agent.settings.tracing_enabled`}),langfuse_base_url:e.string({label:`claude-agent.settings.langfuse_base_url`}),langfuse_public_key:e.password({label:`claude-agent.settings.langfuse_public_key`}),langfuse_secret_key:e.password({label:`claude-agent.settings.langfuse_secret_key`})}})}})});export{u as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{n as e}from"./fields-
|
|
1
|
+
import{n as e}from"./fields-Ce51pRua.js";import{n as t}from"./plugin-Cjr7lgQH.js";import{t as n}from"./settings-BEzSaRjz.js";var r=t({id:`http`,version:`1.0.0`,dependsOn:[],label:`http.plugin.label`,description:`http.plugin.description`,settings:n({label:`http.settings.label`,fields:{port:e.int({label:`http.settings.port`})}})});export{r as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{n as e}from"./fields-
|
|
1
|
+
import{n as e}from"./fields-Ce51pRua.js";import{a as t}from"./shelf-DjiUBfgQ.js";import{i as n,n as r}from"./plugin-Cjr7lgQH.js";var i=t({shelf:`person`,library:`people`,label:`people.person.label`,icon:`lucide:user`,agent:`A person card. fullName — the full name (first + last), used as the title.`,views:{inline:[`logo`,`fullName`],list:[`birthDate`],select:{icon:`logo`,title:`fullName`,subtitle:`birthDate`}},fields:{identity:e.identity({avatar:{logo:e.avatar({label:`people.person.fields.logo`})},name:{fullName:e.title({label:`people.person.fields.fullName`})}}),bio:e.prose({fields:{description:e.text({label:`people.person.fields.description`,rules:{max:500}})}}),hairline:e.divider(),properties:e.properties({columns:4,fields:{occupation:e.string({label:`people.person.fields.occupation`,rules:{max:200},ui:{span:3}}),birthDate:e.age({label:`people.person.fields.birthDate`,rules:{min:`1900-01-01`,max:`today`},ui:{span:3}}),sex:e.string({label:`people.person.fields.sex`,strict:!0,noSearch:!0,options:`sex`,ui:{span:3}}),phone:e.tel({label:`people.person.fields.phone`,ui:{span:3}}),email:e.email({label:`people.person.fields.email`,ui:{span:6}}),address:e.text({label:`people.person.fields.address`,rules:{max:300},ui:{span:6}})}}),photos:e.image({label:`people.person.fields.photos`,multiple:!0}),tags:e.tags({label:`people.person.fields.tags`}),notes:e.text({label:`people.person.fields.notes`,rules:{max:1e3}})}}),a=r({id:`people`,version:`1.0.0`,dependsOn:[],label:`people.plugin.label`,description:`people.plugin.description`,libraries:[{meta:n({id:`people`,label:`people.library.label`,icon:`lucide:users`,agent:{description:`People (person) — contacts, birthdays, jobs; referenced by health, travel, and others.`,instructions:`Count birthdays by birthDate. When contacts/address/job change — update the relevant fields via update_record.`}}),shelves:[i]}]});export{a as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{n as e}from"./fields-Ce51pRua.js";import{a as t}from"./shelf-DjiUBfgQ.js";import{i as n,n as r}from"./plugin-Cjr7lgQH.js";import{t as i}from"./settings-BEzSaRjz.js";var a=t({shelf:`title`,library:`media`,label:`media.title.label`,icon:`lucide:clapperboard`,agent:`A movie or series in the watchlist. name — the title. kind — movie/series. status — viewing intent (want=added to the list, not in Jellyfin yet / unwatched=in Jellyfin, not watched / watching / watched / dropped). in_library, jellyfin_id and source are mirrored from Jellyfin — do not edit manually when source=jellyfin (sync will overwrite).`,views:{list:[`kind`,`status`,`year`,`imdb_rating`],groupBy:[`kind`,`status`,`genres`,`year`,`source`]},fields:{name:e.title({label:`core.fields.name`}),about:e.illustrated({label:`media.title.fields.about`,fields:{image:e.poster({}),text:e.text({rules:{max:2e3}})}}),top_meta:e.stats({fields:{year:e.int({label:`media.title.fields.year`}),kind:e.string({label:`media.title.fields.kind`,strict:!0,noSearch:!0,options:[{value:`movie`,title:`media.title.options.kind.movie`},{value:`series`,title:`media.title.options.kind.series`}]}),status:e.string({label:`media.title.fields.status`,strict:!0,noSearch:!0,options:[{value:`want`,title:`media.title.options.status.want`},{value:`unwatched`,title:`media.title.options.status.unwatched`},{value:`watching`,title:`media.title.options.status.watching`},{value:`watched`,title:`media.title.options.status.watched`},{value:`dropped`,title:`media.title.options.status.dropped`}]}),runtime:e.duration({label:`media.title.fields.runtime`})}}),split_progress:e.split({ratio:[1,1],columns:[{scores:e.mediaRating({label:`media.title.fields.scores`,max:10,source:{imdb_rating:e.real({label:`media.title.fields.imdb_rating`}),tmdb_rating:e.real({label:`media.title.fields.tmdb_rating`})}})},{progress:e.facets({fields:{seasons:e.int({label:`media.title.fields.seasons`,rules:{min:0},ui:{hidden:{kind:{$ne:`series`}}}}),episodes:e.int({label:`media.title.fields.episodes`,rules:{min:0},ui:{hidden:{kind:{$ne:`series`}}}}),watched_date:e.date({label:`media.title.fields.watched_date`})}})}]}),properties:e.properties({columns:3,fields:{tmdb_id:e.identifier({label:`media.title.fields.tmdb_id`,rules:{max:32}}),imdb_id:e.identifier({label:`media.title.fields.imdb_id`,rules:{max:32}}),jellyfin_id:e.link({label:`media.title.fields.jellyfin_id`,rules:{max:300}}),link:e.link({label:`media.title.fields.link`})}}),split_meta:e.grid({columns:3,fields:{genres:e.tags({label:`media.title.fields.genres`}),in_library:e.boolean({label:`media.title.fields.in_library`}),source:e.string({label:`media.title.fields.source`,default:`manual`,strict:!0,noSearch:!0,options:[{value:`manual`,title:`media.title.options.source.manual`},{value:`jellyfin`,title:`media.title.options.source.jellyfin`},{value:`agent`,title:`media.title.options.source.agent`}]})}}),notes:e.text({label:`media.title.fields.notes`,rules:{max:2e3}})}}),o=r({id:`media`,version:`1.0.0`,dependsOn:[],label:`media.plugin.label`,description:`media.plugin.description`,libraries:[{meta:n({id:`media`,label:`media.library.label`,icon:`lucide:clapperboard`,agent:{description:`Movies and series watchlist (title) — tracked against a Jellyfin library.`,instructions:`status: want=added to the list, not in Jellyfin yet; unwatched=in Jellyfin, not watched; watching; watched; dropped. in_library, jellyfin_id and source are mirrored from Jellyfin — do not edit manually when source=jellyfin. To add a movie by name — search_titles (review candidates) then add_title.`}}),shelves:[a]}],settings:i({label:`media.settings.label`,fields:{tmdb_key:e.password({label:`media.settings.tmdb_key`}),omdb_key:e.password({label:`media.settings.omdb_key`}),jellyfin_url:e.string({label:`media.settings.jellyfin_url`}),jellyfin_token:e.password({label:`media.settings.jellyfin_token`}),jellyfin_user_id:e.string({label:`media.settings.jellyfin_user_id`}),button:e.button({label:`media.settings.test_button`,value:`media.testJellyfin`,icon:`lucide:wifi`}),button2:e.button({label:`media.settings.sync_button`,value:`media.syncJellyfin`,icon:`lucide:refresh-cw`})}})});export{o as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{n as e}from"./fields-
|
|
1
|
+
import{n as e}from"./fields-Ce51pRua.js";import{n as t}from"./plugin-Cjr7lgQH.js";import{t as n}from"./settings-BEzSaRjz.js";var r=t({id:`webexport`,version:`1.0.0`,dependsOn:[],label:`webexport.plugin.label`,description:`webexport.plugin.description`,libraries:[],settings:n({label:`webexport.settings.label`,icon:`lucide:folder-output`,fields:{output_dir:e.localDir({label:`webexport.settings.output_dir`})}})});export{r as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{B as e,D as t,F as n,I as r,L as i,N as a,O as o,P as s,R as c,T as l,j as u,k as d,n as f,r as p,w as m,z as h}from"./fields-CV3RQg0Y.js";import{a as g}from"./shelf-Cj_pNvd-.js";import{i as _,n as v}from"./plugin-Cjr7lgQH.js";import{t as y}from"./extend-yQ8zoqGc.js";import{t as b}from"./settings-Bo5IOwVg.js";import{i as x,r as S,s as C}from"./data-size-BMG0D59K.js";import{t as w}from"./showcase-BeBnutzT.js";var T=(t,n)=>e().superRefine((e,r)=>{t.safeParse(o(e)).success||r.addIssue({code:a.custom,message:u(n)})}),E=()=>r().int().min(0).max(255),D=()=>r().int().min(0).max(65535),O=h([E(),E(),E(),E()]),k=h([D(),D(),D(),D(),D(),D(),D(),D()]),A=i({v:n(4),a:O}),j=i({v:n(6),a:k}),M=s(`v`,[A,j]);function N(e){let n=m(e),r=T(M,`ip_structure`);return t(void 0,n,l({kind:`ip`,label:n.label??``,prim:`ip`,column:`text`,hints:{},zod:d(r)},n.multiple??!1))}var P=/^([0-9A-Fa-f]{2}[:-]){5}[0-9A-Fa-f]{2}$/;function F(e){let n=m(e),r=c().regex(P,{message:u(`pattern`,{messageKey:`core.presets.mac`})});return t(void 0,n,l({kind:`text`,label:n.label??``,prim:`text`,column:`text`,hints:{mask:`macAddress`,voice:`data`},zod:d(r)},n.multiple??!1))}var I=/^[A-Za-z0-9_]([A-Za-z0-9_-]{0,61}[A-Za-z0-9_])?(\.[A-Za-z0-9_]([A-Za-z0-9_-]{0,61}[A-Za-z0-9_])?)*$/;function L(e){let n=m(e),r=c().regex(I,{message:u(`pattern`,{messageKey:`core.presets.hostname`})});return t(void 0,n,l({kind:`text`,label:n.label??``,prim:`text`,column:`text`,hints:{voice:`data`},zod:d(r)},n.multiple??!1))}var R=/^\d{15}$/;function z(e){let t=0,n=!1;for(let r=e.length-1;r>=0;r--){let i=e.charCodeAt(r)-48;n&&(i*=2,i>9&&(i-=9)),t+=i,n=!n}return t%10==0}function B(e){let n=m(e),r=c().regex(R,{message:u(`pattern`,{messageKey:`core.presets.imei`})}).refine(z,{message:u(`pattern`,{messageKey:`core.presets.imei`})});return t(void 0,n,l({kind:`text`,label:n.label??``,prim:`text`,column:`text`,hints:{voice:`data`},zod:d(r)},n.multiple??!1))}var V=s(`v`,[A.extend({p:r().int().min(0).max(32)}),j.extend({p:r().int().min(0).max(128)})]);function H(e){let n=m(e),r=T(V,`cidr_structure`);return t(void 0,n,l({kind:`cidr`,label:n.label??``,prim:`cidr`,column:`text`,hints:{},zod:d(r)},n.multiple??!1))}var U=g({shelf:`network`,library:`devices`,label:`devices.network.label`,icon:`lucide:globe`,agent:`A network segment. subnet — CIDR. gateway — the gateway. domain — the segment's DNS suffix (e.g. lan → host FQDN = hostname.lan).`,views:{list:[`subnet`,`gateway`,`dnsPrimary`]},fields:{name:f.title({label:`core.fields.name`}),description:f.text({label:`devices.network.fields.description`,rules:{max:1e3}}),facets:f.facets({fields:{vlan:f.int({label:`devices.network.fields.vlan`,rules:{min:1,max:4094}}),domain:L({label:`devices.network.fields.domain`})}}),ledger:f.ledger({fields:{subnet:H({label:`devices.network.fields.subnet`}),gateway:N({label:`devices.network.fields.gateway`}),dnsPrimary:N({label:`devices.network.fields.dnsPrimary`}),dnsFallback:N({label:`devices.network.fields.dnsFallback`}),poolStart:N({label:`devices.network.fields.poolStart`}),poolEnd:N({label:`devices.network.fields.poolEnd`})}}),notes:f.text({label:`devices.network.fields.notes`,rules:{max:2e3}})}}),W=[`access`,`infra`,`monitoring`,`database`,`automation`,`network`,`media`,`lighting`,`files`,`backup`,`downloads`,`finance`,`calendars`,`communication`,`web`,`ai`,`devices`,`other`].map(e=>({value:e,title:`devices.service.cat.${e}`})),G=[{value:`http`,title:`devices.accessTypes.http`},{value:`https`,title:`devices.accessTypes.https`},{value:`ssh`,title:`devices.accessTypes.ssh`},{value:`mysql`,title:`devices.accessTypes.mysql`},{value:`mqtt`,title:`devices.accessTypes.mqtt`},{value:`ws`,title:`devices.accessTypes.ws`},{value:`dns`,title:`devices.accessTypes.dns`},{value:`other`,title:`devices.accessTypes.other`}],K={http:`http`,https:`https`,ssh:`ssh`,mysql:`mysql`,mqtt:`mqtt`,ws:`ws`,wss:`ws`,dns:`dns`},q=g({shelf:`service`,library:`devices`,label:`devices.service_catalog.label`,icon:`lucide:layers`,agent:`Catalog of network service types. name — human-readable name (custom, not translated). code — slug (auto-link key from the scanner). category — tag slugs (multi; SERVICE_CATEGORIES as hints). description_mode — description source: 'key' (i18n key in the description field) or 'own' (free text in the description_text field). SERVICE_META defaults → 'key' + devices.service.desc.<code>; user records are usually 'own'.`,views:{list:[`code`,`category`]},fields:{name:f.title({label:`core.fields.name`}),description_mode:f.string({label:`devices.service.description_mode`,options:[{value:`key`,title:`devices.service.description_mode_key`},{value:`own`,title:`devices.service.description_mode_own`}],default:`key`,strict:!0,noSearch:!0}),description:f.i18n({label:`devices.service.description`,rules:{max:1e3},ui:{hidden:{description_mode:{$ne:`key`}}}}),description_text:f.text({label:`devices.service.description`,rules:{max:1e3},ui:{hidden:{description_mode:{$ne:`own`}}}}),code:f.string({label:`devices.service.code`,rules:{max:60}}),category:f.string({label:`devices.service.category`,options:[...W],multiple:!0,strict:!0,noSearch:!0})}}),J=(e,t)=>{let n=e?.[t];return typeof n==`number`&&Number.isFinite(n)&&n>=0?n:null},Y=({parent:e})=>{let t=J(e,`used`),n=J(e,`free`);return t==null||n==null||t+n===0?null:Math.round(t/(t+n)*1e3)/10},X=80,Z=95,Q=y({id:`device_info`,label:`devices.device_info.label`,icon:`lucide:monitor`,attachTo:[{library:`things`,shelf:`item`}],showWhen:{type:`device`},agent:{description:`Network and technical specs of a device. hostname — FQDN on the LAN. addresses[] — network addresses (ip/mac, multi-NIC). group — human-friendly. services[] — inline services (type/title/links[]/secrets[]). disks_usage[] — disk usage (SSH).`,instructions:`Find a host via list_records things/item with filters: { type: "device" } — network fields live under _extends.device_info on each returned record. When the software/address/location changes — update via update_record.`},fields:{facets:f.facets({fields:{group:f.string({label:`devices.device_info.fields.group`,options:`device-groups`,strict:!0,noSearch:!0}),arch:f.string({label:`devices.device_info.fields.arch`,rules:{max:30}})}}),ledger:f.ledger({fields:{hostname:f.string({label:`devices.device_info.fields.hostname`,rules:{max:120}}),vendor:f.string({label:`devices.device_info.fields.vendor`,rules:{max:80}}),model:f.string({label:`devices.device_info.fields.model`,rules:{max:120}}),os:f.string({label:`devices.device_info.fields.os`,rules:{max:100}}),kernel:f.string({label:`devices.device_info.fields.kernel`,rules:{max:100}}),cpu:f.string({label:`devices.device_info.fields.cpu`,rules:{max:150}}),gpu:f.string({label:`devices.device_info.fields.gpu`,rules:{max:150}}),ram:C({label:`devices.device_info.fields.ram`})}}),addresses:f.row({scope:`nest`,multiple:!0,label:`devices.device_info.fields.addresses`,icon:`lucide:network`,fields:{ip:N({label:`devices.device_info.fields.ip`}),mac:F({label:`devices.device_info.fields.mac`})}}),disks_usage:f.group({scope:`nest`,label:`devices.device_info.fields.disks_usage`,icon:`lucide:hard-drive`,multiple:!0,fields:{mount:f.string({label:`devices.device_info.disk.mount`,rules:{max:255}}),size:S({label:`devices.device_info.disk.size`,system:`binary`,unit:`GiB`}),used:S({label:`devices.device_info.disk.used`,system:`binary`,unit:`GiB`,mutate:[`.usage`]}),free:S({label:`devices.device_info.disk.free`,system:`binary`,unit:`GiB`,mutate:[`.usage`]}),usage:f.real({label:`devices.device_info.disk.usage`,rules:{min:0,max:100},value:Y,mutate:[`.state`]}),state:f.string({label:`devices.device_info.disk.state`,options:[{value:`ok`,title:`devices.device_info.disk_state.ok`,icon:{kind:`icon`,value:`lucide:check`}},{value:`warn`,title:`devices.device_info.disk_state.warn`,icon:{kind:`icon`,value:`lucide:minus`}},{value:`full`,title:`devices.device_info.disk_state.full`,icon:{kind:`icon`,value:`lucide:x`}}],value:e=>{let t=Y(e);return typeof t==`number`?t>=Z?`full`:t>=X?`warn`:`ok`:null},strict:!0,noSearch:!0})}}),services:f.keyed({label:`devices.device_info.fields.services`,icon:`lucide:server`,fields:{service:f.relation({label:`devices.service.type`,options:p({library:`devices`,shelf:`service`})}),description:f.smallText({label:`devices.service.description`,rules:{max:500}}),hide:f.boolean({label:`devices.service.hide`}),links:f.row({scope:`nest`,multiple:!0,label:`devices.service.links`,icon:`lucide:link`,fields:{url:f.url({label:`devices.service.url`}),access:f.string({label:`devices.service.access`,options:`access-types`,strict:!0,noSearch:!0}),visibility:f.string({label:`devices.service.visibility`,options:`visibility-types`,strict:!0,noSearch:!0})}}),secrets:f.keyValue({label:`devices.service.secrets`,fields:{value:f.password({})},multiple:!0,ui:{keyLabel:`devices.service.secretName`,valueLabel:`devices.service.secretValue`}})},by:`service`})}}),$={ssh_config_path:`~/.ssh/config`,pihole_conf_path:``,syncthing_ini_path:`~/.config/syncthingtray.ini`,gtk_bookmarks_path:`~/.config/gtk-3.0/bookmarks`,kodi_sources_path:`~/.local/share/kodi/userdata/sources.xml`,krdc_bookmarks_path:`~/.local/share/krdc/bookmarks.xml`,rclone_config_path:`~/.config/rclone/rclone.conf`,remmina_dir:`~/.local/share/remmina`,remoteview_dir:`~/.local/share/remoteview`,delfin_config_path:`~/.config/delfin/config.toml`},ee=`docker compose exec pihole pihole reloaddns`,te={ip:N,cidr:H,mac:F,hostname:L,imei:B,dataSize:S,ram:C,diskSize:x},ne=v({id:`devices`,version:`1.0.0`,dependsOn:[`things`],label:`devices.plugin.label`,description:`devices.plugin.description`,settings:b({label:`devices.settings.label`,icon:`lucide:radar`,fields:{info:f.info(`devices.settings.scan_info`),button:f.button({label:`devices.settings.scan_button`,value:`devices.runScan`,icon:`lucide:radar`}),info2:f.info(`devices.settings.secrets_help`),info3:f.info(`devices.settings.sync_targets_info`),ssh_config_path:f.localFile({label:`devices.settings.ssh_config_path`,default:$.ssh_config_path}),pihole_conf_path:f.localFile({label:`devices.settings.pihole_conf_path`,default:$.pihole_conf_path}),pihole_reload_cmd:f.string({label:`devices.settings.pihole_reload_cmd`,default:ee}),syncthing_ini_path:f.localFile({label:`devices.settings.syncthing_ini_path`,default:$.syncthing_ini_path}),gtk_bookmarks_path:f.localFile({label:`devices.settings.gtk_bookmarks_path`,default:$.gtk_bookmarks_path}),kodi_sources_path:f.localFile({label:`devices.settings.kodi_sources_path`,default:$.kodi_sources_path}),krdc_bookmarks_path:f.localFile({label:`devices.settings.krdc_bookmarks_path`,default:$.krdc_bookmarks_path}),rclone_config_path:f.localFile({label:`devices.settings.rclone_config_path`,default:$.rclone_config_path}),remmina_dir:f.localDir({label:`devices.settings.remmina_dir`,default:$.remmina_dir}),remoteview_dir:f.localDir({label:`devices.settings.remoteview_dir`,default:$.remoteview_dir}),delfin_config_path:f.localFile({label:`devices.settings.delfin_config_path`,default:$.delfin_config_path})}}),libraries:[{meta:_({id:`devices`,label:`devices.library.label`,icon:`lucide:globe`,agent:`Network subnets and the service catalog (network, service).`}),shelves:[U,q]},{meta:_({id:`hardware`,label:`devices.hardware.label`,icon:`lucide:monitor`,agent:`All owned devices (a view over things/item where type=device). No shelves of its own.`}),shelves:[]}],extends_:[Q],showcases:[w({id:`fleet`,library:`devices`,label:`devices.fleet.label`,icon:`lucide:server`,source:{library:`things`,shelf:`item`},filter:{type:`device`,tags:{$contains:`network`}},columns:[`subtype`,`brand`,`model`,`location`,`condition`],createDefaults:{type:`device`}}),w({id:`all`,library:`hardware`,label:`devices.all.label`,icon:`lucide:monitor`,source:{library:`things`,shelf:`item`},filter:{type:`device`},columns:[`subtype`,`brand`,`model`,`location`,`condition`],createDefaults:{type:`device`}})],fieldContribs:[{library:`things`,shelf:`item`,field:`type`,options:[{value:`device`,title:`devices.device_info.label`}]},{library:`things`,shelf:`item`,field:`subtype`,options:[{value:`pc`,title:`devices.deviceGroups.pc`,when:{type:`device`}},{value:`server`,title:`devices.deviceGroups.server`,when:{type:`device`}},{value:`mobile`,title:`devices.deviceGroups.mobile`,when:{type:`device`}},{value:`tv`,title:`devices.deviceGroups.tv`,when:{type:`device`}},{value:`printer`,title:`devices.deviceGroups.printer`,when:{type:`device`}},{value:`iot`,title:`devices.deviceGroups.iot`,when:{type:`device`}},{value:`network`,title:`devices.deviceGroups.network`,when:{type:`device`}},{value:`other`,title:`devices.deviceGroups.other`,when:{type:`device`}}]}],optionLists:[{name:`access-types`,options:[...G]},{name:`visibility-types`,options:[{value:`lan`,title:`devices.visibilityTypes.lan`},{value:`public`,title:`devices.visibilityTypes.public`},{value:`other`,title:`devices.visibilityTypes.other`}]},{name:`device-groups`,options:[{value:`pc`,title:`devices.deviceGroups.pc`},{value:`server`,title:`devices.deviceGroups.server`},{value:`mobile`,title:`devices.deviceGroups.mobile`},{value:`tv`,title:`devices.deviceGroups.tv`},{value:`printer`,title:`devices.deviceGroups.printer`},{value:`iot`,title:`devices.deviceGroups.iot`},{value:`network`,title:`devices.deviceGroups.network`},{value:`other`,title:`devices.deviceGroups.other`}]}]});export{L as a,F as c,H as i,ne as n,B as o,K as r,N as s,te as t};
|
|
1
|
+
import{B as e,D as t,F as n,I as r,L as i,N as a,O as o,P as s,R as c,T as l,j as u,k as d,n as f,r as p,w as m,z as h}from"./fields-Ce51pRua.js";import{a as g}from"./shelf-DjiUBfgQ.js";import{i as _,n as v}from"./plugin-Cjr7lgQH.js";import{t as y}from"./extend-CHOe1AVl.js";import{t as b}from"./settings-BEzSaRjz.js";import{i as x,r as S,s as C}from"./data-size-CO-LGHbN.js";import{t as w}from"./showcase-BeBnutzT.js";var T=(t,n)=>e().superRefine((e,r)=>{t.safeParse(o(e)).success||r.addIssue({code:a.custom,message:u(n)})}),E=()=>r().int().min(0).max(255),D=()=>r().int().min(0).max(65535),O=h([E(),E(),E(),E()]),k=h([D(),D(),D(),D(),D(),D(),D(),D()]),A=i({v:n(4),a:O}),j=i({v:n(6),a:k}),M=s(`v`,[A,j]);function N(e){let n=m(e),r=T(M,`ip_structure`);return t(void 0,n,l({kind:`ip`,label:n.label??``,prim:`ip`,column:`text`,hints:{},zod:d(r)},n.multiple??!1))}var P=/^([0-9A-Fa-f]{2}[:-]){5}[0-9A-Fa-f]{2}$/;function F(e){let n=m(e),r=c().regex(P,{message:u(`pattern`,{messageKey:`core.presets.mac`})});return t(void 0,n,l({kind:`text`,label:n.label??``,prim:`text`,column:`text`,hints:{mask:`macAddress`,voice:`data`},zod:d(r)},n.multiple??!1))}var I=/^[A-Za-z0-9_]([A-Za-z0-9_-]{0,61}[A-Za-z0-9_])?(\.[A-Za-z0-9_]([A-Za-z0-9_-]{0,61}[A-Za-z0-9_])?)*$/;function L(e){let n=m(e),r=c().regex(I,{message:u(`pattern`,{messageKey:`core.presets.hostname`})});return t(void 0,n,l({kind:`text`,label:n.label??``,prim:`text`,column:`text`,hints:{voice:`data`},zod:d(r)},n.multiple??!1))}var R=/^\d{15}$/;function z(e){let t=0,n=!1;for(let r=e.length-1;r>=0;r--){let i=e.charCodeAt(r)-48;n&&(i*=2,i>9&&(i-=9)),t+=i,n=!n}return t%10==0}function B(e){let n=m(e),r=c().regex(R,{message:u(`pattern`,{messageKey:`core.presets.imei`})}).refine(z,{message:u(`pattern`,{messageKey:`core.presets.imei`})});return t(void 0,n,l({kind:`text`,label:n.label??``,prim:`text`,column:`text`,hints:{voice:`data`},zod:d(r)},n.multiple??!1))}var V=s(`v`,[A.extend({p:r().int().min(0).max(32)}),j.extend({p:r().int().min(0).max(128)})]);function H(e){let n=m(e),r=T(V,`cidr_structure`);return t(void 0,n,l({kind:`cidr`,label:n.label??``,prim:`cidr`,column:`text`,hints:{},zod:d(r)},n.multiple??!1))}var U=g({shelf:`network`,library:`devices`,label:`devices.network.label`,icon:`lucide:globe`,agent:`A network segment. subnet — CIDR. gateway — the gateway. domain — the segment's DNS suffix (e.g. lan → host FQDN = hostname.lan).`,views:{list:[`subnet`,`gateway`,`dnsPrimary`]},fields:{name:f.title({label:`core.fields.name`}),description:f.text({label:`devices.network.fields.description`,rules:{max:1e3}}),facets:f.facets({fields:{vlan:f.int({label:`devices.network.fields.vlan`,rules:{min:1,max:4094}}),domain:L({label:`devices.network.fields.domain`})}}),ledger:f.ledger({fields:{subnet:H({label:`devices.network.fields.subnet`}),gateway:N({label:`devices.network.fields.gateway`}),dnsPrimary:N({label:`devices.network.fields.dnsPrimary`}),dnsFallback:N({label:`devices.network.fields.dnsFallback`}),poolStart:N({label:`devices.network.fields.poolStart`}),poolEnd:N({label:`devices.network.fields.poolEnd`})}}),notes:f.text({label:`devices.network.fields.notes`,rules:{max:2e3}})}}),W=[`access`,`infra`,`monitoring`,`database`,`automation`,`network`,`media`,`lighting`,`files`,`backup`,`downloads`,`finance`,`calendars`,`communication`,`web`,`ai`,`devices`,`other`].map(e=>({value:e,title:`devices.service.cat.${e}`})),G=[{value:`http`,title:`devices.accessTypes.http`},{value:`https`,title:`devices.accessTypes.https`},{value:`ssh`,title:`devices.accessTypes.ssh`},{value:`mysql`,title:`devices.accessTypes.mysql`},{value:`mqtt`,title:`devices.accessTypes.mqtt`},{value:`ws`,title:`devices.accessTypes.ws`},{value:`dns`,title:`devices.accessTypes.dns`},{value:`other`,title:`devices.accessTypes.other`}],K={http:`http`,https:`https`,ssh:`ssh`,mysql:`mysql`,mqtt:`mqtt`,ws:`ws`,wss:`ws`,dns:`dns`},q=g({shelf:`service`,library:`devices`,label:`devices.service_catalog.label`,icon:`lucide:layers`,agent:`Catalog of network service types. name — human-readable name (custom, not translated). code — slug (auto-link key from the scanner). category — tag slugs (multi; SERVICE_CATEGORIES as hints). description_mode — description source: 'key' (i18n key in the description field) or 'own' (free text in the description_text field). SERVICE_META defaults → 'key' + devices.service.desc.<code>; user records are usually 'own'.`,views:{list:[`code`,`category`]},fields:{name:f.title({label:`core.fields.name`}),description_mode:f.string({label:`devices.service.description_mode`,options:[{value:`key`,title:`devices.service.description_mode_key`},{value:`own`,title:`devices.service.description_mode_own`}],default:`key`,strict:!0,noSearch:!0}),description:f.i18n({label:`devices.service.description`,rules:{max:1e3},ui:{hidden:{description_mode:{$ne:`key`}}}}),description_text:f.text({label:`devices.service.description`,rules:{max:1e3},ui:{hidden:{description_mode:{$ne:`own`}}}}),code:f.string({label:`devices.service.code`,rules:{max:60}}),category:f.string({label:`devices.service.category`,options:[...W],multiple:!0,strict:!0,noSearch:!0})}}),J=(e,t)=>{let n=e?.[t];return typeof n==`number`&&Number.isFinite(n)&&n>=0?n:null},Y=({parent:e})=>{let t=J(e,`used`),n=J(e,`free`);return t==null||n==null||t+n===0?null:Math.round(t/(t+n)*1e3)/10},X=80,Z=95,Q=y({id:`device_info`,label:`devices.device_info.label`,icon:`lucide:monitor`,attachTo:[{library:`things`,shelf:`item`}],showWhen:{type:`device`},agent:{description:`Network and technical specs of a device. hostname — FQDN on the LAN. addresses[] — network addresses (ip/mac, multi-NIC). group — human-friendly. services[] — inline services (type/title/links[]/secrets[]). disks_usage[] — disk usage (SSH).`,instructions:`Find a host via list_records things/item with filters: { type: "device" } — network fields live under _extends.device_info on each returned record. When the software/address/location changes — update via update_record.`},fields:{facets:f.facets({fields:{group:f.string({label:`devices.device_info.fields.group`,options:`device-groups`,strict:!0,noSearch:!0}),arch:f.string({label:`devices.device_info.fields.arch`,rules:{max:30}})}}),ledger:f.ledger({fields:{hostname:f.string({label:`devices.device_info.fields.hostname`,rules:{max:120}}),vendor:f.string({label:`devices.device_info.fields.vendor`,rules:{max:80}}),model:f.string({label:`devices.device_info.fields.model`,rules:{max:120}}),os:f.string({label:`devices.device_info.fields.os`,rules:{max:100}}),kernel:f.string({label:`devices.device_info.fields.kernel`,rules:{max:100}}),cpu:f.string({label:`devices.device_info.fields.cpu`,rules:{max:150}}),gpu:f.string({label:`devices.device_info.fields.gpu`,rules:{max:150}}),ram:C({label:`devices.device_info.fields.ram`})}}),addresses:f.row({scope:`nest`,multiple:!0,label:`devices.device_info.fields.addresses`,icon:`lucide:network`,fields:{ip:N({label:`devices.device_info.fields.ip`}),mac:F({label:`devices.device_info.fields.mac`})}}),disks_usage:f.group({scope:`nest`,label:`devices.device_info.fields.disks_usage`,icon:`lucide:hard-drive`,multiple:!0,fields:{mount:f.string({label:`devices.device_info.disk.mount`,rules:{max:255}}),size:S({label:`devices.device_info.disk.size`,system:`binary`,unit:`GiB`}),used:S({label:`devices.device_info.disk.used`,system:`binary`,unit:`GiB`,mutate:[`.usage`]}),free:S({label:`devices.device_info.disk.free`,system:`binary`,unit:`GiB`,mutate:[`.usage`]}),usage:f.real({label:`devices.device_info.disk.usage`,rules:{min:0,max:100},value:Y,mutate:[`.state`]}),state:f.string({label:`devices.device_info.disk.state`,options:[{value:`ok`,title:`devices.device_info.disk_state.ok`,icon:{kind:`icon`,value:`lucide:check`}},{value:`warn`,title:`devices.device_info.disk_state.warn`,icon:{kind:`icon`,value:`lucide:minus`}},{value:`full`,title:`devices.device_info.disk_state.full`,icon:{kind:`icon`,value:`lucide:x`}}],value:e=>{let t=Y(e);return typeof t==`number`?t>=Z?`full`:t>=X?`warn`:`ok`:null},strict:!0,noSearch:!0})}}),services:f.keyed({label:`devices.device_info.fields.services`,icon:`lucide:server`,fields:{service:f.relation({label:`devices.service.type`,options:p({library:`devices`,shelf:`service`})}),description:f.smallText({label:`devices.service.description`,rules:{max:500}}),hide:f.boolean({label:`devices.service.hide`}),links:f.row({scope:`nest`,multiple:!0,label:`devices.service.links`,icon:`lucide:link`,fields:{url:f.url({label:`devices.service.url`}),access:f.string({label:`devices.service.access`,options:`access-types`,strict:!0,noSearch:!0}),visibility:f.string({label:`devices.service.visibility`,options:`visibility-types`,strict:!0,noSearch:!0})}}),secrets:f.keyValue({label:`devices.service.secrets`,fields:{value:f.password({})},multiple:!0,ui:{keyLabel:`devices.service.secretName`,valueLabel:`devices.service.secretValue`}})},by:`service`})}}),$={ssh_config_path:`~/.ssh/config`,pihole_conf_path:``,syncthing_ini_path:`~/.config/syncthingtray.ini`,gtk_bookmarks_path:`~/.config/gtk-3.0/bookmarks`,kodi_sources_path:`~/.local/share/kodi/userdata/sources.xml`,krdc_bookmarks_path:`~/.local/share/krdc/bookmarks.xml`,rclone_config_path:`~/.config/rclone/rclone.conf`,remmina_dir:`~/.local/share/remmina`,remoteview_dir:`~/.local/share/remoteview`,delfin_config_path:`~/.config/delfin/config.toml`},ee=`docker compose exec pihole pihole reloaddns`,te={ip:N,cidr:H,mac:F,hostname:L,imei:B,dataSize:S,ram:C,diskSize:x},ne=v({id:`devices`,version:`1.0.0`,dependsOn:[`things`],label:`devices.plugin.label`,description:`devices.plugin.description`,settings:b({label:`devices.settings.label`,icon:`lucide:radar`,fields:{info:f.info(`devices.settings.scan_info`),button:f.button({label:`devices.settings.scan_button`,value:`devices.runScan`,icon:`lucide:radar`}),info2:f.info(`devices.settings.secrets_help`),info3:f.info(`devices.settings.sync_targets_info`),ssh_config_path:f.localFile({label:`devices.settings.ssh_config_path`,default:$.ssh_config_path}),pihole_conf_path:f.localFile({label:`devices.settings.pihole_conf_path`,default:$.pihole_conf_path}),pihole_reload_cmd:f.string({label:`devices.settings.pihole_reload_cmd`,default:ee}),syncthing_ini_path:f.localFile({label:`devices.settings.syncthing_ini_path`,default:$.syncthing_ini_path}),gtk_bookmarks_path:f.localFile({label:`devices.settings.gtk_bookmarks_path`,default:$.gtk_bookmarks_path}),kodi_sources_path:f.localFile({label:`devices.settings.kodi_sources_path`,default:$.kodi_sources_path}),krdc_bookmarks_path:f.localFile({label:`devices.settings.krdc_bookmarks_path`,default:$.krdc_bookmarks_path}),rclone_config_path:f.localFile({label:`devices.settings.rclone_config_path`,default:$.rclone_config_path}),remmina_dir:f.localDir({label:`devices.settings.remmina_dir`,default:$.remmina_dir}),remoteview_dir:f.localDir({label:`devices.settings.remoteview_dir`,default:$.remoteview_dir}),delfin_config_path:f.localFile({label:`devices.settings.delfin_config_path`,default:$.delfin_config_path})}}),libraries:[{meta:_({id:`devices`,label:`devices.library.label`,icon:`lucide:globe`,agent:`Network subnets and the service catalog (network, service).`}),shelves:[U,q]},{meta:_({id:`hardware`,label:`devices.hardware.label`,icon:`lucide:monitor`,agent:`All owned devices (a view over things/item where type=device). No shelves of its own.`}),shelves:[]}],extends_:[Q],showcases:[w({id:`fleet`,library:`devices`,label:`devices.fleet.label`,icon:`lucide:server`,source:{library:`things`,shelf:`item`},filter:{type:`device`,tags:{$contains:`network`}},columns:[`subtype`,`brand`,`model`,`location`,`condition`],createDefaults:{type:`device`}}),w({id:`all`,library:`hardware`,label:`devices.all.label`,icon:`lucide:monitor`,source:{library:`things`,shelf:`item`},filter:{type:`device`},columns:[`subtype`,`brand`,`model`,`location`,`condition`],createDefaults:{type:`device`}})],fieldContribs:[{library:`things`,shelf:`item`,field:`type`,options:[{value:`device`,title:`devices.device_info.label`}]},{library:`things`,shelf:`item`,field:`subtype`,options:[{value:`pc`,title:`devices.deviceGroups.pc`,when:{type:`device`}},{value:`server`,title:`devices.deviceGroups.server`,when:{type:`device`}},{value:`mobile`,title:`devices.deviceGroups.mobile`,when:{type:`device`}},{value:`tv`,title:`devices.deviceGroups.tv`,when:{type:`device`}},{value:`printer`,title:`devices.deviceGroups.printer`,when:{type:`device`}},{value:`iot`,title:`devices.deviceGroups.iot`,when:{type:`device`}},{value:`network`,title:`devices.deviceGroups.network`,when:{type:`device`}},{value:`other`,title:`devices.deviceGroups.other`,when:{type:`device`}}]}],optionLists:[{name:`access-types`,options:[...G]},{name:`visibility-types`,options:[{value:`lan`,title:`devices.visibilityTypes.lan`},{value:`public`,title:`devices.visibilityTypes.public`},{value:`other`,title:`devices.visibilityTypes.other`}]},{name:`device-groups`,options:[{value:`pc`,title:`devices.deviceGroups.pc`},{value:`server`,title:`devices.deviceGroups.server`},{value:`mobile`,title:`devices.deviceGroups.mobile`},{value:`tv`,title:`devices.deviceGroups.tv`},{value:`printer`,title:`devices.deviceGroups.printer`},{value:`iot`,title:`devices.deviceGroups.iot`},{value:`network`,title:`devices.deviceGroups.network`},{value:`other`,title:`devices.deviceGroups.other`}]}]});export{L as a,F as c,H as i,ne as n,B as o,K as r,N as s,te as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{n as e,r as t,t as n}from"./src-CtQWxdaS.js";export{e as default,n as fin,t as iban};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{n as e,r as t}from"./fields-CV3RQg0Y.js";import{a as n}from"./shelf-Cj_pNvd-.js";import{i as r,n as i}from"./plugin-Cjr7lgQH.js";import{t as a}from"./extend-yQ8zoqGc.js";import{t as o}from"./showcase-BeBnutzT.js";var s=a({id:`drone`,label:`drone.drone.label`,icon:`tb:drone`,attachTo:[{library:`things`,shelf:`item`}],showWhen:{type:`drone`,subtype:{$in:[`aircraft`,`rtf`]}},agent:{description:`FPV drone technical characteristics. frame_size — frame size (e.g. 3.5"). motors — motors. firmware — firmware (Betaflight/INAV). camera/flight_controller/vtx/gps_module link to things/item[type=drone] records of the matching subtype. A drone whose parts cannot be separate records is subtype='rtf' instead, and carries the component extends directly.`,instructions:`drone references the components; specs live in each module's fields. When you replace a component or update the firmware — update the relevant fields via update_record.`},fields:{bento:e.bento({fields:{group:{span:`2x1`,el:e.group({scope:`hoist`,fields:{motors:e.string({label:`drone.drone.fields.motors`,rules:{max:150}}),props:e.string({label:`drone.drone.fields.props`,rules:{max:80}}),camera:e.relation({label:`drone.drone.fields.camera`,options:t({library:`things`,shelf:`item`,filter:{type:`drone`,subtype:`camera`}})})}})},group2:e.group({scope:`hoist`,fields:{power_module:e.string({label:`drone.drone.fields.power_module`,rules:{max:60}}),vtx:e.relation({label:`drone.drone.fields.vtx`,options:t({library:`things`,shelf:`item`,filter:{type:`drone`,subtype:`vtx`}})})}}),group3:e.group({scope:`hoist`,fields:{flight_time:e.string({label:`drone.drone.fields.flight_time`,rules:{max:60}}),firmware:e.string({label:`drone.drone.fields.firmware`,options:`drone-firmware`,strict:!0,noSearch:!0}),firmware_version:e.string({label:`drone.drone.fields.firmware_version`,rules:{max:40}}),firmware_target:e.string({label:`drone.drone.fields.firmware_target`,rules:{max:80}})}}),group4:e.group({scope:`hoist`,fields:{frame_size:e.string({label:`drone.drone.fields.frame_size`,rules:{max:40}}),purpose:e.string({label:`drone.drone.fields.purpose`,rules:{max:200}})}}),group5:e.group({scope:`hoist`,fields:{flight_controller:e.relation({label:`drone.drone.fields.flight_controller`,options:t({library:`things`,shelf:`item`,filter:{type:`drone`,subtype:`flight_controller`}})}),gps_module:e.relation({label:`drone.drone.fields.gps_module`,options:t({library:`things`,shelf:`item`,filter:{type:`drone`,subtype:`gps`}})})}}),group6:e.group({scope:`hoist`,fields:{radio_link:e.string({label:`drone.drone.fields.radio_link`,options:`drone-radio-links`,multiple:!0,strict:!0,noSearch:!0}),receiver:e.string({label:`drone.drone.fields.receiver`,rules:{max:80}}),video_system:e.string({label:`drone.drone.fields.video_system`,options:`drone-video-systems`,strict:!0,noSearch:!0})}})}}),snippets:e.group({scope:`nest`,label:`drone.drone.groups.snippets`,icon:`lucide:terminal`,multiple:!0,fields:{title:e.string({label:`drone.drone.fields.snippet_title`,rules:{max:100}}),summary:e.text({label:`drone.drone.fields.snippet_summary`,rules:{max:500}}),snippet:e.source({label:`drone.drone.fields.snippet`,rules:{ext:`md`}})}}),flights:e.backrefs({label:`drone.drone.fields.flights`,from:{library:`drone`,shelf:`flight`,field:`aircraft`}}),notes:e.text({label:`drone.drone.fields.notes`,rules:{max:2e3}})}}),c=a({id:`drone_battery`,label:`drone.drone_battery.label`,icon:`lucide:battery-full`,attachTo:[{library:`things`,shelf:`item`}],showWhen:{type:`drone`,subtype:{$in:[`battery`,`rtf`]}},agent:`FPV drone battery characteristics. cells — number of cells (1S/3S/4S). capacity — capacity in mAh. c_rate — discharge current. auw — all-up weight of the assembly in flight.`,fields:{charger:e.string({label:`drone.drone_battery.fields.charger`,rules:{max:100}}),cells:e.string({label:`drone.drone_battery.fields.cells`,options:`drone-cells`,strict:!0,noSearch:!0}),capacity:e.measured({label:`drone.drone_battery.fields.capacity`,units:`energy`}),c_rate:e.string({label:`drone.drone_battery.fields.c_rate`,rules:{max:20}}),auw:e.string({label:`drone.drone_battery.fields.auw`,rules:{max:40}}),flights:e.backrefs({label:`drone.drone_battery.fields.flights`,from:{library:`drone`,shelf:`flight`,field:`batteries`}}),notes:e.text({label:`drone.drone_battery.fields.notes`,rules:{max:2e3}})}}),l=a({id:`drone_vtx`,label:`drone.drone_vtx.label`,icon:`lucide:radio-tower`,attachTo:[{library:`things`,shelf:`item`}],showWhen:{type:`drone`,subtype:{$in:[`vtx`,`rtf`]}},agent:`FPV video transmitter characteristics. input_voltage — input voltage. protocol — control protocols, codes from the drone-vtx-protocols list. frequency_groups — Betaflight band letters. channel_count — number of channels.`,fields:{input_voltage:e.string({label:`drone.drone_vtx.fields.input_voltage`,rules:{max:40}}),protocol:e.string({label:`drone.drone_vtx.fields.protocol`,options:`drone-vtx-protocols`,multiple:!0,strict:!0,noSearch:!0}),antenna_interface:e.string({label:`drone.drone_vtx.fields.antenna_interface`,options:`drone-rf-connectors`,strict:!0,noSearch:!0}),channel_count:e.int({label:`drone.drone_vtx.fields.channel_count`,rules:{min:0}}),mounting:e.string({label:`drone.drone_vtx.fields.mounting`,options:`drone-mounting`,multiple:!0,strict:!0,noSearch:!0}),built_in_microphone:e.boolean({label:`drone.drone_vtx.fields.built_in_microphone`}),frequency_groups:e.string({label:`drone.drone_vtx.fields.frequency_groups`,options:`drone-bands`,multiple:!0,strict:!0,noSearch:!0}),power_levels:e.keyed({label:`drone.drone_vtx.groups.power_levels`,icon:`lucide:zap`,container:e.row,fields:{level:e.string({label:`drone.drone_vtx.fields.power_level`,options:`drone-vtx-power`,strict:!0,noSearch:!0}),current_ma:e.int({label:`drone.drone_vtx.fields.current_ma`,rules:{min:0}}),dbm:e.real({label:`drone.drone_vtx.fields.dbm`})},by:`level`}),notes:e.text({label:`drone.drone_vtx.fields.notes`,rules:{max:2e3}})}}),u=a({id:`drone_gps`,label:`drone.drone_gps.label`,icon:`lucide:satellite`,attachTo:[{library:`things`,shelf:`item`}],showWhen:{type:`drone`,subtype:{$in:[`gps`,`rtf`]}},agent:`FPV drone GPS module characteristics. gnss_chip — chipset. compass_chip — magnetometer. satellite_systems — supported satellite systems.`,fields:{gnss_chip:e.string({label:`drone.drone_gps.fields.gnss_chip`,rules:{max:80}}),compass_chip:e.string({label:`drone.drone_gps.fields.compass_chip`,rules:{max:60}}),barometer:e.boolean({label:`drone.drone_gps.fields.barometer`}),interface:e.string({label:`drone.drone_gps.fields.interface`,options:`drone-serial-interfaces`,multiple:!0,strict:!0,noSearch:!0}),input_voltage:e.string({label:`drone.drone_gps.fields.input_voltage`,rules:{max:40}}),update_rate_hz:e.int({label:`drone.drone_gps.fields.update_rate_hz`,rules:{min:0}}),receiving_channels:e.int({label:`drone.drone_gps.fields.receiving_channels`,rules:{min:0}}),supported_protocols:e.string({label:`drone.drone_gps.fields.supported_protocols`,options:`drone-gnss-protocols`,multiple:!0,strict:!0,noSearch:!0}),baud_rates:e.string({label:`drone.drone_gps.fields.baud_rates`,options:`drone-baud-rates`,multiple:!0,strict:!0,noSearch:!0}),satellite_systems:e.string({label:`drone.drone_gps.fields.satellite_systems`,options:`drone-gnss-systems`,multiple:!0,strict:!0,noSearch:!0}),notes:e.text({label:`drone.drone_gps.fields.notes`,rules:{max:2e3}})}}),d=a({id:`drone_flight_controller`,label:`drone.drone_flight_controller.label`,icon:`lucide:sliders-horizontal`,attachTo:[{library:`things`,shelf:`item`}],showWhen:{type:`drone`,subtype:{$in:[`flight_controller`,`rtf`]}},agent:`FPV drone flight controller characteristics. mcu — processor (STM32F411/F405). gyro — gyroscope. supported_firmware — compatible firmware (Betaflight, INAV).`,fields:{mcu:e.string({label:`drone.drone_flight_controller.fields.mcu`,options:`drone-fc-mcu`,strict:!0,noSearch:!0}),gyro:e.string({label:`drone.drone_flight_controller.fields.gyro`,options:`drone-gyro`,multiple:!0,strict:!0,noSearch:!0}),barometer:e.boolean({label:`drone.drone_flight_controller.fields.barometer`}),osd_chip:e.string({label:`drone.drone_flight_controller.fields.osd_chip`,options:`drone-osd-chip`,strict:!0,noSearch:!0}),blackbox:e.string({label:`drone.drone_flight_controller.fields.blackbox`,options:`drone-blackbox`,strict:!0,noSearch:!0}),bluetooth:e.boolean({label:`drone.drone_flight_controller.fields.bluetooth`}),wifi:e.boolean({label:`drone.drone_flight_controller.fields.wifi`}),current_sensor_input:e.boolean({label:`drone.drone_flight_controller.fields.current_sensor_input`}),power_input:e.string({label:`drone.drone_flight_controller.fields.power_input`,rules:{max:40}}),constant_current:e.string({label:`drone.drone_flight_controller.fields.constant_current`,rules:{max:20}}),peak_current:e.string({label:`drone.drone_flight_controller.fields.peak_current`,rules:{max:20}}),bec_5v:e.string({label:`drone.drone_flight_controller.fields.bec_5v`,rules:{max:20}}),bec_9v:e.string({label:`drone.drone_flight_controller.fields.bec_9v`,rules:{max:20}}),mounting:e.string({label:`drone.drone_flight_controller.fields.mounting`,options:`drone-mounting`,multiple:!0,strict:!0,noSearch:!0}),uart_count:e.int({label:`drone.drone_flight_controller.fields.uart_count`,rules:{min:0}}),supported_firmware:e.string({label:`drone.drone_flight_controller.fields.supported_firmware`,options:`drone-firmware`,multiple:!0,strict:!0,noSearch:!0}),firmware_target:e.string({label:`drone.drone_flight_controller.fields.firmware_target`,rules:{max:80}}),build_role:e.string({label:`drone.drone_flight_controller.fields.build_role`,rules:{max:200}}),notes:e.text({label:`drone.drone_flight_controller.fields.notes`,rules:{max:2e3}})}}),f=a({id:`drone_goggles`,label:`drone.drone_goggles.label`,icon:`lucide:glasses`,attachTo:[{library:`things`,shelf:`item`}],showWhen:{type:`drone`,subtype:`goggles`},agent:`FPV goggles characteristics. display_size — display diagonal. frequency_bands — supported radio bands. battery_life — runtime on battery.`,fields:{display_size:e.string({label:`drone.drone_goggles.fields.display_size`,rules:{max:20}}),display_resolution:e.string({label:`drone.drone_goggles.fields.display_resolution`,rules:{max:40}}),display_brightness:e.string({label:`drone.drone_goggles.fields.display_brightness`,rules:{max:30}}),view_angle:e.string({label:`drone.drone_goggles.fields.view_angle`,rules:{max:20}}),antenna:e.string({label:`drone.drone_goggles.fields.antenna`,rules:{max:80}}),frequency_bands:e.string({label:`drone.drone_goggles.fields.frequency_bands`,options:`drone-bands`,multiple:!0,strict:!0,noSearch:!0}),battery:e.string({label:`drone.drone_goggles.fields.battery`,rules:{max:60}}),battery_life:e.string({label:`drone.drone_goggles.fields.battery_life`,rules:{max:40}}),charging:e.string({label:`drone.drone_goggles.fields.charging`,rules:{max:60}}),band_channels:e.keyed({label:`drone.drone_goggles.groups.band_channels`,icon:`lucide:radio`,container:e.row,fields:{band:e.string({label:`drone.drone_goggles.fields.band`,options:`drone-bands`,strict:!0,noSearch:!0}),channels:e.int({label:`drone.drone_goggles.fields.channels`,multiple:!0})},by:`band`}),notes:e.text({label:`drone.drone_goggles.fields.notes`,rules:{max:2e3}})}}),p=a({id:`drone_antenna`,label:`drone.drone_antenna.label`,icon:`lucide:radio`,attachTo:[{library:`things`,shelf:`item`}],showWhen:{type:`drone`,subtype:{$in:[`antenna`,`rtf`]}},agent:`FPV antenna characteristics. rf_band — the bands it covers, codes from drone-rf-bands. polarization — RHCP/LHCP/linear; a video link needs the SAME polarization on both ends. antenna_type — the radiating structure. connector — one model often ships in several connector variants.`,fields:{rf_band:e.string({label:`drone.drone_antenna.fields.rf_band`,options:`drone-rf-bands`,multiple:!0,strict:!0,noSearch:!0}),polarization:e.string({label:`drone.drone_antenna.fields.polarization`,options:`drone-polarization`,strict:!0,noSearch:!0}),antenna_type:e.string({label:`drone.drone_antenna.fields.antenna_type`,options:`drone-antenna-types`,strict:!0,noSearch:!0}),connector:e.string({label:`drone.drone_antenna.fields.connector`,options:`drone-rf-connectors`,multiple:!0,strict:!0,noSearch:!0}),gain_dbi:e.real({label:`drone.drone_antenna.fields.gain_dbi`}),cable_length:e.int({label:`drone.drone_antenna.fields.cable_length`,rules:{min:0}}),notes:e.text({label:`drone.drone_antenna.fields.notes`,rules:{max:2e3}})}}),m=a({id:`drone_receiver`,label:`drone.drone_receiver.label`,icon:`lucide:antenna`,attachTo:[{library:`things`,shelf:`item`}],showWhen:{type:`drone`,subtype:{$in:[`receiver`,`rtf`]}},agent:`RC receiver characteristics. radio_link — the protocol it binds with (ExpressLRS, Crossfire…). output_protocol — how it talks to the flight controller (CRSF, SBUS…). diversity — two antennas with active switching.`,fields:{radio_link:e.string({label:`drone.drone_receiver.fields.radio_link`,options:`drone-radio-links`,strict:!0,noSearch:!0}),rf_band:e.string({label:`drone.drone_receiver.fields.rf_band`,options:`drone-rf-bands`,multiple:!0,strict:!0,noSearch:!0}),output_protocol:e.string({label:`drone.drone_receiver.fields.output_protocol`,options:`drone-rx-outputs`,multiple:!0,strict:!0,noSearch:!0}),antenna_connector:e.string({label:`drone.drone_receiver.fields.antenna_connector`,options:`drone-rf-connectors`,strict:!0,noSearch:!0}),antenna_count:e.int({label:`drone.drone_receiver.fields.antenna_count`,rules:{min:0}}),telemetry:e.boolean({label:`drone.drone_receiver.fields.telemetry`}),diversity:e.boolean({label:`drone.drone_receiver.fields.diversity`}),input_voltage:e.string({label:`drone.drone_receiver.fields.input_voltage`,rules:{max:40}}),firmware_version:e.string({label:`drone.drone_receiver.fields.firmware_version`,rules:{max:40}}),notes:e.text({label:`drone.drone_receiver.fields.notes`,rules:{max:2e3}})}}),h=a({id:`drone_camera`,label:`drone.drone_camera.label`,icon:`lucide:camera`,attachTo:[{library:`things`,shelf:`item`}],showWhen:{type:`drone`,subtype:{$in:[`camera`,`rtf`]}},agent:`FPV camera characteristics. sensor — the sensor model (free text, e.g. Sony Super HAD II). resolution_tvl — analog horizontal resolution in TVL. aspect_ratio — 4:3 / 16:9 / switchable. output — the video signal it produces (analog CVBS or a digital HD system).`,fields:{sensor:e.string({label:`drone.drone_camera.fields.sensor`,rules:{max:100}}),resolution_tvl:e.int({label:`drone.drone_camera.fields.resolution_tvl`,rules:{min:0}}),aspect_ratio:e.string({label:`drone.drone_camera.fields.aspect_ratio`,options:`drone-camera-aspect`,strict:!0,noSearch:!0}),lens_mm:e.real({label:`drone.drone_camera.fields.lens_mm`}),fov_deg:e.int({label:`drone.drone_camera.fields.fov_deg`,rules:{min:0}}),output:e.string({label:`drone.drone_camera.fields.output`,options:`drone-camera-output`,strict:!0,noSearch:!0}),camera_size:e.string({label:`drone.drone_camera.fields.camera_size`,options:`drone-camera-sizes`,strict:!0,noSearch:!0}),input_voltage:e.string({label:`drone.drone_camera.fields.input_voltage`,rules:{max:40}}),notes:e.text({label:`drone.drone_camera.fields.notes`,rules:{max:2e3}})}}),g=[`ok`,`low_voltage`,`crash`,`lost`],_=[{value:`ok`,title:`drone.options.outcome.ok`,tone:`success`},{value:`low_voltage`,title:`drone.options.outcome.low_voltage`,tone:`warning`},{value:`crash`,title:`drone.options.outcome.crash`,tone:`danger`},{value:`lost`,title:`drone.options.outcome.lost`,tone:`danger`}],v=e=>Array.isArray(e)?e.filter(e=>e&&typeof e==`object`):[];function y(e,t){let n=[];for(let r of v(e)){let e=r[t];if(e==null||e===``)continue;let i=Number(e);Number.isFinite(i)&&(n.includes(i)||n.push(i))}return n}function b(e,t=`outcome`){let n=-1;for(let r of v(e)){let e=g.indexOf(r[t]);e>n&&(n=e)}return n<0?null:g[n]}var x=n({shelf:`flight`,library:`drone`,label:`drone.flight.label`,icon:`lucide:plane-takeoff`,agent:"A flying session, not a single sortie: one record is one outing — date, place, aircraft — and each battery pack flown is a row of `packs` (battery, duration in seconds, outcome, notes). `batteries` and `outcome` are SERVER-OWNED derivations over those rows and are rejected if sent: `batteries` indexes the distinct batteries used, `outcome` is the worst row outcome. Record a crash by setting that pack's outcome and listing the broken parts in `damage`, not by prose in `notes`. The `aircraft` picker only offers things/item[subtype='aircraft'] — a ready-to-fly kit (subtype='rtf') cannot be selected there today, so log its flights against an 'aircraft'-subtype record instead.",views:{title:`date`,listKind:`map`,list:[`aircraft`,`place`,`outcome`],inline:[`date`,`aircraft`]},fields:{date:e.date({label:`drone.flight.fields.date`,rules:{min:`2000-01-01`,max:`today`},ui:{span:4}}),description:e.text({label:`drone.flight.fields.description`,rules:{max:1e3}}),place:e.geo({label:`drone.flight.fields.place`}),aircraft:e.relation({label:`drone.flight.fields.aircraft`,options:t({library:`things`,shelf:`item`,filter:{type:`drone`,subtype:`aircraft`}})}),batteries:e.relation({label:`drone.flight.fields.batteries`,multiple:!0,options:t({library:`things`,shelf:`item`,filter:{type:`drone`,subtype:`battery`}}),value:({record:e})=>y(e.packs,`battery`)}),weather:e.group({scope:`hoist`,label:`drone.flight.groups.weather`,icon:`lucide:cloud-sun`,fields:{temp:e.measured({label:`drone.flight.fields.temp`,units:`temperature`,ui:{span:4}}),wind:e.measured({label:`drone.flight.fields.wind`,units:`speed`,ui:{span:4}}),sky:e.string({label:`drone.flight.fields.sky`,options:`drone-sky`,strict:!0,noSearch:!0})}}),packs:e.row({scope:`nest`,multiple:!0,label:`drone.flight.fields.packs`,icon:`lucide:battery-charging`,fields:{battery:e.relation({label:`drone.flight.fields.battery`,options:t({library:`things`,shelf:`item`,filter:{type:`drone`,subtype:`battery`}}),mutate:[`batteries`]}),duration:e.duration({label:`drone.flight.fields.duration`}),outcome:e.string({label:`drone.flight.fields.pack_outcome`,options:`drone-outcomes`,strict:!0,noSearch:!0,mutate:[`outcome`]}),notes:e.text({label:`drone.flight.fields.pack_notes`,rules:{max:500}})}}),outcome:e.string({label:`drone.flight.fields.outcome`,options:`drone-outcomes`,strict:!0,noSearch:!0,value:({record:e})=>b(e.packs)}),setup:e.group({scope:`hoist`,label:`drone.flight.groups.setup`,icon:`lucide:sliders-horizontal`,fields:{firmware_version:e.string({label:`drone.flight.fields.firmware_version`,rules:{max:40}}),tune:e.text({label:`drone.flight.fields.tune`,rules:{max:2e3}})}}),damage:e.relation({label:`drone.flight.fields.damage`,multiple:!0,options:t({library:`things`,shelf:`item`,filter:{type:`drone`}})}),video:e.video({label:`drone.flight.fields.video`,multiple:!0}),photos:e.image({label:`drone.flight.fields.photos`,multiple:!0}),edit_link:e.link({label:`drone.flight.fields.edit_link`}),tags:e.tags({label:`drone.flight.fields.tags`}),notes:e.text({label:`drone.flight.fields.notes`,rules:{max:2e3}})}}),S=i({id:`drone`,version:`1.0.0`,dependsOn:[`things`,`geo`],label:`drone.plugin.label`,description:`drone.plugin.description`,libraries:[{meta:r({id:`drone`,label:`drone.library.label`,icon:`tb:drone`,agent:`FPV drones and their components. A component is a things/item row with type=drone — this library owns no table for those. A FLIGHT is different: it is an event, not a thing, and it is this library's one table (flight): one record per outing, with the battery packs flown as rows inside it.`}),shelves:[x]}],extends_:[s,c,l,u,d,f,p,m,h],showcases:[o({id:`fleet`,library:`drone`,label:`drone.fleet.label`,icon:`lucide:plane`,source:{library:`things`,shelf:`item`},filter:{type:`drone`},columns:[`subtype`,`brand`,`model`,`location`,`condition`],defaultGroupBy:`subtype`,createDefaults:{type:`drone`}})],optionLists:[{name:`drone-bands`,options:[{value:`A`,title:`A`},{value:`B`,title:`B`},{value:`E`,title:`E`},{value:`F`,title:`F`},{value:`R`,title:`R`},{value:`L`,title:`L`},{value:`U`,title:`U`},{value:`O`,title:`O`},{value:`H`,title:`H`}]},{name:`drone-vtx-power`,options:[{value:`pit`,title:`PIT`},{value:`25mw`,title:`25 mW`},{value:`100mw`,title:`100 mW`},{value:`200mw`,title:`200 mW`},{value:`350mw`,title:`350 mW`},{value:`400mw`,title:`400 mW`},{value:`600mw`,title:`600 mW`},{value:`800mw`,title:`800 mW`},{value:`1000mw`,title:`1 W`},{value:`1600mw`,title:`1.6 W`},{value:`2500mw`,title:`2.5 W`}]},{name:`drone-vtx-protocols`,options:[{value:`smartaudio_1_0`,title:`SmartAudio 1.0`},{value:`smartaudio_2_0`,title:`SmartAudio 2.0`},{value:`smartaudio_2_1`,title:`SmartAudio 2.1`},{value:`tramp`,title:`IRC Tramp`},{value:`msp_displayport`,title:`MSP DisplayPort`},{value:`none`,title:`drone.options.none`}]},{name:`drone-rf-connectors`,options:[{value:`ipex_mhf1`,title:`IPEX / MHF1 (U.FL)`},{value:`ipex_mhf3`,title:`IPEX MHF3`},{value:`mmcx`,title:`MMCX`},{value:`sma`,title:`SMA`},{value:`rp_sma`,title:`RP-SMA`},{value:`ufl_solder`,title:`U.FL (soldered)`}]},{name:`drone-mounting`,options:[{value:`16x16_m2`,title:`16×16 mm M2`},{value:`20x20_m2`,title:`20×20 mm M2`},{value:`20x20_m3`,title:`20×20 mm M3`},{value:`25.5x25.5_m2`,title:`25.5×25.5 mm M2`},{value:`30.5x30.5_m3`,title:`30.5×30.5 mm M3`},{value:`adhesive`,title:`drone.options.adhesive`}]},{name:`drone-firmware`,options:[{value:`betaflight`,title:`Betaflight`},{value:`inav`,title:`INAV`},{value:`ardupilot`,title:`ArduPilot`},{value:`emuflight`,title:`EmuFlight`},{value:`rotorflight`,title:`Rotorflight`},{value:`kiss`,title:`KISS`},{value:`cleanflight`,title:`Cleanflight`}]},{name:`drone-fc-mcu`,options:[{value:`stm32f411`,title:`STM32F411`},{value:`stm32f405`,title:`STM32F405`},{value:`stm32f722`,title:`STM32F722`},{value:`stm32f745`,title:`STM32F745`},{value:`stm32f765`,title:`STM32F765`},{value:`stm32h743`,title:`STM32H743`},{value:`stm32h750`,title:`STM32H750`},{value:`at32f435`,title:`AT32F435`},{value:`gd32f405`,title:`GD32F405`}]},{name:`drone-gyro`,options:[{value:`mpu6000`,title:`MPU6000`},{value:`mpu6500`,title:`MPU6500`},{value:`icm20602`,title:`ICM20602`},{value:`icm20689`,title:`ICM20689`},{value:`icm42688p`,title:`ICM42688-P`},{value:`icm42605`,title:`ICM42605`},{value:`bmi270`,title:`BMI270`},{value:`bmi160`,title:`BMI160`}]},{name:`drone-osd-chip`,options:[{value:`at7456e`,title:`AT7456E`},{value:`max7456`,title:`MAX7456`},{value:`msp_displayport`,title:`MSP DisplayPort`},{value:`none`,title:`drone.options.none`}]},{name:`drone-blackbox`,options:[{value:`none`,title:`drone.options.none`},{value:`flash_8mb`,title:`Flash 8 MB`},{value:`flash_16mb`,title:`Flash 16 MB`},{value:`flash_32mb`,title:`Flash 32 MB`},{value:`sd_card`,title:`microSD`}]},{name:`drone-gnss-systems`,options:[{value:`gps`,title:`GPS`},{value:`glonass`,title:`GLONASS`},{value:`galileo`,title:`Galileo`},{value:`beidou`,title:`BeiDou`},{value:`qzss`,title:`QZSS`},{value:`sbas`,title:`SBAS`},{value:`navic`,title:`NavIC`}]},{name:`drone-gnss-protocols`,options:[{value:`ubx`,title:`UBX`},{value:`nmea`,title:`NMEA`},{value:`rtcm3`,title:`RTCM3`},{value:`msp`,title:`MSP`}]},{name:`drone-baud-rates`,options:[{value:`4800`,title:`4800`},{value:`9600`,title:`9600`},{value:`19200`,title:`19200`},{value:`38400`,title:`38400`},{value:`57600`,title:`57600`},{value:`115200`,title:`115200`},{value:`230400`,title:`230400`},{value:`460800`,title:`460800`},{value:`921600`,title:`921600`}]},{name:`drone-serial-interfaces`,options:[{value:`uart`,title:`UART`},{value:`i2c`,title:`I2C`},{value:`spi`,title:`SPI`},{value:`can`,title:`CAN`}]},{name:`drone-video-systems`,options:[{value:`analog_5_8`,title:`drone.options.videoSystems.analog_5_8`},{value:`dji_v1_v2`,title:`DJI V1/V2`},{value:`dji_o3`,title:`DJI O3`},{value:`dji_o4`,title:`DJI O4`},{value:`walksnail_avatar`,title:`Walksnail Avatar`},{value:`hdzero`,title:`HDZero`}]},{name:`drone-radio-links`,options:[{value:`elrs_2_4`,title:`ExpressLRS 2.4 GHz`},{value:`elrs_900`,title:`ExpressLRS 868/915 MHz`},{value:`crossfire`,title:`TBS Crossfire`},{value:`tracer`,title:`TBS Tracer`},{value:`ghost`,title:`ImmersionRC Ghost`},{value:`frsky_d16`,title:`FrSky D16`},{value:`frsky_d8`,title:`FrSky D8`},{value:`dsmx`,title:`Spektrum DSMX`},{value:`dji`,title:`DJI`}]},{name:`drone-rf-bands`,options:[{value:`5_8ghz`,title:`5.8 GHz`},{value:`2_4ghz`,title:`2.4 GHz`},{value:`1_2ghz`,title:`1.2 GHz`},{value:`900mhz`,title:`868/915 MHz`},{value:`433mhz`,title:`433 MHz`}]},{name:`drone-polarization`,options:[{value:`rhcp`,title:`drone.options.polarization.rhcp`},{value:`lhcp`,title:`drone.options.polarization.lhcp`},{value:`linear`,title:`drone.options.polarization.linear`}]},{name:`drone-antenna-types`,options:[{value:`omni`,title:`drone.options.antennaTypes.omni`},{value:`patch`,title:`drone.options.antennaTypes.patch`},{value:`helical`,title:`drone.options.antennaTypes.helical`},{value:`pagoda`,title:`drone.options.antennaTypes.pagoda`},{value:`cloverleaf`,title:`drone.options.antennaTypes.cloverleaf`},{value:`monopole`,title:`drone.options.antennaTypes.monopole`},{value:`whip`,title:`drone.options.antennaTypes.whip`}]},{name:`drone-cells`,options:[{value:`1s`,title:`1S`},{value:`2s`,title:`2S`},{value:`3s`,title:`3S`},{value:`4s`,title:`4S`},{value:`5s`,title:`5S`},{value:`6s`,title:`6S`},{value:`7s`,title:`7S`},{value:`8s`,title:`8S`},{value:`12s`,title:`12S`}]},{name:`drone-rx-outputs`,options:[{value:`crsf`,title:`CRSF`},{value:`sbus`,title:`SBUS`},{value:`ibus`,title:`IBUS`},{value:`ppm`,title:`PPM`},{value:`pwm`,title:`PWM`},{value:`spektrum`,title:`Spektrum`},{value:`ghst`,title:`GHST`}]},{name:`drone-camera-aspect`,options:[{value:`4_3`,title:`4:3`},{value:`16_9`,title:`16:9`},{value:`switchable`,title:`drone.options.cameraAspect.switchable`}]},{name:`drone-camera-output`,options:[{value:`analog_cvbs`,title:`drone.options.cameraOutput.analog_cvbs`},{value:`dji`,title:`DJI`},{value:`walksnail`,title:`Walksnail`},{value:`hdzero`,title:`HDZero`}]},{name:`drone-camera-sizes`,options:[{value:`nano`,title:`Nano`},{value:`micro`,title:`Micro`},{value:`mini`,title:`Mini`},{value:`full`,title:`Full-size`},{value:`whoop`,title:`Whoop`}]},{name:`drone-outcomes`,options:[..._]},{name:`drone-sky`,options:[{value:`clear`,title:`drone.options.sky.clear`},{value:`cloudy`,title:`drone.options.sky.cloudy`},{value:`overcast`,title:`drone.options.sky.overcast`},{value:`fog`,title:`drone.options.sky.fog`},{value:`rain`,title:`drone.options.sky.rain`},{value:`snow`,title:`drone.options.sky.snow`}]}],fieldContribs:[{library:`things`,shelf:`item`,field:`type`,options:[{value:`drone`,title:`drone.drone.label`}]},{library:`things`,shelf:`item`,field:`subtype`,options:[{value:`aircraft`,title:`drone.contrib.subtype.aircraft`,when:{type:`drone`}},{value:`battery`,title:`drone.drone_battery.label`,when:{type:`drone`}},{value:`vtx`,title:`drone.drone_vtx.label`,when:{type:`drone`}},{value:`gps`,title:`drone.drone_gps.label`,when:{type:`drone`}},{value:`flight_controller`,title:`drone.drone_flight_controller.label`,when:{type:`drone`}},{value:`goggles`,title:`drone.drone_goggles.label`,when:{type:`drone`}},{value:`radio`,title:`drone.contrib.subtype.radio`,when:{type:`drone`}},{value:`camera`,title:`drone.drone_camera.label`,when:{type:`drone`}},{value:`antenna`,title:`drone.drone_antenna.label`,when:{type:`drone`}},{value:`receiver`,title:`drone.drone_receiver.label`,when:{type:`drone`}},{value:`frame`,title:`drone.contrib.subtype.frame`,when:{type:`drone`}},{value:`rtf`,title:`drone.contrib.subtype.rtf`,when:{type:`drone`}},{value:`accessory`,title:`drone.contrib.subtype.accessory`,when:{type:`drone`}}]}]});export{S as default};
|
|
1
|
+
import{n as e,r as t}from"./fields-Ce51pRua.js";import{a as n}from"./shelf-DjiUBfgQ.js";import{i as r,n as i}from"./plugin-Cjr7lgQH.js";import{t as a}from"./extend-CHOe1AVl.js";import{t as o}from"./showcase-BeBnutzT.js";var s=a({id:`drone`,label:`drone.drone.label`,icon:`tb:drone`,attachTo:[{library:`things`,shelf:`item`}],showWhen:{type:`drone`,subtype:{$in:[`aircraft`,`rtf`]}},agent:{description:`FPV drone technical characteristics. frame_size — frame size (e.g. 3.5"). motors — motors. firmware — firmware (Betaflight/INAV). camera/flight_controller/vtx/gps_module link to things/item[type=drone] records of the matching subtype. A drone whose parts cannot be separate records is subtype='rtf' instead, and carries the component extends directly.`,instructions:`drone references the components; specs live in each module's fields. When you replace a component or update the firmware — update the relevant fields via update_record.`},fields:{bento:e.bento({fields:{group:{span:`2x1`,el:e.group({scope:`hoist`,fields:{motors:e.string({label:`drone.drone.fields.motors`,rules:{max:150}}),props:e.string({label:`drone.drone.fields.props`,rules:{max:80}}),camera:e.relation({label:`drone.drone.fields.camera`,options:t({library:`things`,shelf:`item`,filter:{type:`drone`,subtype:`camera`}})})}})},group2:e.group({scope:`hoist`,fields:{power_module:e.string({label:`drone.drone.fields.power_module`,rules:{max:60}}),vtx:e.relation({label:`drone.drone.fields.vtx`,options:t({library:`things`,shelf:`item`,filter:{type:`drone`,subtype:`vtx`}})})}}),group3:e.group({scope:`hoist`,fields:{flight_time:e.string({label:`drone.drone.fields.flight_time`,rules:{max:60}}),firmware:e.string({label:`drone.drone.fields.firmware`,options:`drone-firmware`,strict:!0,noSearch:!0}),firmware_version:e.string({label:`drone.drone.fields.firmware_version`,rules:{max:40}}),firmware_target:e.string({label:`drone.drone.fields.firmware_target`,rules:{max:80}})}}),group4:e.group({scope:`hoist`,fields:{frame_size:e.string({label:`drone.drone.fields.frame_size`,rules:{max:40}}),purpose:e.string({label:`drone.drone.fields.purpose`,rules:{max:200}})}}),group5:e.group({scope:`hoist`,fields:{flight_controller:e.relation({label:`drone.drone.fields.flight_controller`,options:t({library:`things`,shelf:`item`,filter:{type:`drone`,subtype:`flight_controller`}})}),gps_module:e.relation({label:`drone.drone.fields.gps_module`,options:t({library:`things`,shelf:`item`,filter:{type:`drone`,subtype:`gps`}})})}}),group6:e.group({scope:`hoist`,fields:{radio_link:e.string({label:`drone.drone.fields.radio_link`,options:`drone-radio-links`,multiple:!0,strict:!0,noSearch:!0}),receiver:e.string({label:`drone.drone.fields.receiver`,rules:{max:80}}),video_system:e.string({label:`drone.drone.fields.video_system`,options:`drone-video-systems`,strict:!0,noSearch:!0})}})}}),snippets:e.group({scope:`nest`,label:`drone.drone.groups.snippets`,icon:`lucide:terminal`,multiple:!0,fields:{title:e.string({label:`drone.drone.fields.snippet_title`,rules:{max:100}}),summary:e.text({label:`drone.drone.fields.snippet_summary`,rules:{max:500}}),snippet:e.source({label:`drone.drone.fields.snippet`,rules:{ext:`md`}})}}),flights:e.backrefs({label:`drone.drone.fields.flights`,from:{library:`drone`,shelf:`flight`,field:`aircraft`}}),notes:e.text({label:`drone.drone.fields.notes`,rules:{max:2e3}})}}),c=a({id:`drone_battery`,label:`drone.drone_battery.label`,icon:`lucide:battery-full`,attachTo:[{library:`things`,shelf:`item`}],showWhen:{type:`drone`,subtype:{$in:[`battery`,`rtf`]}},agent:`FPV drone battery characteristics. cells — number of cells (1S/3S/4S). capacity — capacity in mAh. c_rate — discharge current. auw — all-up weight of the assembly in flight.`,fields:{charger:e.string({label:`drone.drone_battery.fields.charger`,rules:{max:100}}),cells:e.string({label:`drone.drone_battery.fields.cells`,options:`drone-cells`,strict:!0,noSearch:!0}),capacity:e.measured({label:`drone.drone_battery.fields.capacity`,units:`energy`}),c_rate:e.string({label:`drone.drone_battery.fields.c_rate`,rules:{max:20}}),auw:e.string({label:`drone.drone_battery.fields.auw`,rules:{max:40}}),flights:e.backrefs({label:`drone.drone_battery.fields.flights`,from:{library:`drone`,shelf:`flight`,field:`batteries`}}),notes:e.text({label:`drone.drone_battery.fields.notes`,rules:{max:2e3}})}}),l=a({id:`drone_vtx`,label:`drone.drone_vtx.label`,icon:`lucide:radio-tower`,attachTo:[{library:`things`,shelf:`item`}],showWhen:{type:`drone`,subtype:{$in:[`vtx`,`rtf`]}},agent:`FPV video transmitter characteristics. input_voltage — input voltage. protocol — control protocols, codes from the drone-vtx-protocols list. frequency_groups — Betaflight band letters. channel_count — number of channels.`,fields:{input_voltage:e.string({label:`drone.drone_vtx.fields.input_voltage`,rules:{max:40}}),protocol:e.string({label:`drone.drone_vtx.fields.protocol`,options:`drone-vtx-protocols`,multiple:!0,strict:!0,noSearch:!0}),antenna_interface:e.string({label:`drone.drone_vtx.fields.antenna_interface`,options:`drone-rf-connectors`,strict:!0,noSearch:!0}),channel_count:e.int({label:`drone.drone_vtx.fields.channel_count`,rules:{min:0}}),mounting:e.string({label:`drone.drone_vtx.fields.mounting`,options:`drone-mounting`,multiple:!0,strict:!0,noSearch:!0}),built_in_microphone:e.boolean({label:`drone.drone_vtx.fields.built_in_microphone`}),frequency_groups:e.string({label:`drone.drone_vtx.fields.frequency_groups`,options:`drone-bands`,multiple:!0,strict:!0,noSearch:!0}),power_levels:e.keyed({label:`drone.drone_vtx.groups.power_levels`,icon:`lucide:zap`,container:e.row,fields:{level:e.string({label:`drone.drone_vtx.fields.power_level`,options:`drone-vtx-power`,strict:!0,noSearch:!0}),current_ma:e.int({label:`drone.drone_vtx.fields.current_ma`,rules:{min:0}}),dbm:e.real({label:`drone.drone_vtx.fields.dbm`})},by:`level`}),notes:e.text({label:`drone.drone_vtx.fields.notes`,rules:{max:2e3}})}}),u=a({id:`drone_gps`,label:`drone.drone_gps.label`,icon:`lucide:satellite`,attachTo:[{library:`things`,shelf:`item`}],showWhen:{type:`drone`,subtype:{$in:[`gps`,`rtf`]}},agent:`FPV drone GPS module characteristics. gnss_chip — chipset. compass_chip — magnetometer. satellite_systems — supported satellite systems.`,fields:{gnss_chip:e.string({label:`drone.drone_gps.fields.gnss_chip`,rules:{max:80}}),compass_chip:e.string({label:`drone.drone_gps.fields.compass_chip`,rules:{max:60}}),barometer:e.boolean({label:`drone.drone_gps.fields.barometer`}),interface:e.string({label:`drone.drone_gps.fields.interface`,options:`drone-serial-interfaces`,multiple:!0,strict:!0,noSearch:!0}),input_voltage:e.string({label:`drone.drone_gps.fields.input_voltage`,rules:{max:40}}),update_rate_hz:e.int({label:`drone.drone_gps.fields.update_rate_hz`,rules:{min:0}}),receiving_channels:e.int({label:`drone.drone_gps.fields.receiving_channels`,rules:{min:0}}),supported_protocols:e.string({label:`drone.drone_gps.fields.supported_protocols`,options:`drone-gnss-protocols`,multiple:!0,strict:!0,noSearch:!0}),baud_rates:e.string({label:`drone.drone_gps.fields.baud_rates`,options:`drone-baud-rates`,multiple:!0,strict:!0,noSearch:!0}),satellite_systems:e.string({label:`drone.drone_gps.fields.satellite_systems`,options:`drone-gnss-systems`,multiple:!0,strict:!0,noSearch:!0}),notes:e.text({label:`drone.drone_gps.fields.notes`,rules:{max:2e3}})}}),d=a({id:`drone_flight_controller`,label:`drone.drone_flight_controller.label`,icon:`lucide:sliders-horizontal`,attachTo:[{library:`things`,shelf:`item`}],showWhen:{type:`drone`,subtype:{$in:[`flight_controller`,`rtf`]}},agent:`FPV drone flight controller characteristics. mcu — processor (STM32F411/F405). gyro — gyroscope. supported_firmware — compatible firmware (Betaflight, INAV).`,fields:{mcu:e.string({label:`drone.drone_flight_controller.fields.mcu`,options:`drone-fc-mcu`,strict:!0,noSearch:!0}),gyro:e.string({label:`drone.drone_flight_controller.fields.gyro`,options:`drone-gyro`,multiple:!0,strict:!0,noSearch:!0}),barometer:e.boolean({label:`drone.drone_flight_controller.fields.barometer`}),osd_chip:e.string({label:`drone.drone_flight_controller.fields.osd_chip`,options:`drone-osd-chip`,strict:!0,noSearch:!0}),blackbox:e.string({label:`drone.drone_flight_controller.fields.blackbox`,options:`drone-blackbox`,strict:!0,noSearch:!0}),bluetooth:e.boolean({label:`drone.drone_flight_controller.fields.bluetooth`}),wifi:e.boolean({label:`drone.drone_flight_controller.fields.wifi`}),current_sensor_input:e.boolean({label:`drone.drone_flight_controller.fields.current_sensor_input`}),power_input:e.string({label:`drone.drone_flight_controller.fields.power_input`,rules:{max:40}}),constant_current:e.string({label:`drone.drone_flight_controller.fields.constant_current`,rules:{max:20}}),peak_current:e.string({label:`drone.drone_flight_controller.fields.peak_current`,rules:{max:20}}),bec_5v:e.string({label:`drone.drone_flight_controller.fields.bec_5v`,rules:{max:20}}),bec_9v:e.string({label:`drone.drone_flight_controller.fields.bec_9v`,rules:{max:20}}),mounting:e.string({label:`drone.drone_flight_controller.fields.mounting`,options:`drone-mounting`,multiple:!0,strict:!0,noSearch:!0}),uart_count:e.int({label:`drone.drone_flight_controller.fields.uart_count`,rules:{min:0}}),supported_firmware:e.string({label:`drone.drone_flight_controller.fields.supported_firmware`,options:`drone-firmware`,multiple:!0,strict:!0,noSearch:!0}),firmware_target:e.string({label:`drone.drone_flight_controller.fields.firmware_target`,rules:{max:80}}),build_role:e.string({label:`drone.drone_flight_controller.fields.build_role`,rules:{max:200}}),notes:e.text({label:`drone.drone_flight_controller.fields.notes`,rules:{max:2e3}})}}),f=a({id:`drone_goggles`,label:`drone.drone_goggles.label`,icon:`lucide:glasses`,attachTo:[{library:`things`,shelf:`item`}],showWhen:{type:`drone`,subtype:`goggles`},agent:`FPV goggles characteristics. display_size — display diagonal. frequency_bands — supported radio bands. battery_life — runtime on battery.`,fields:{display_size:e.string({label:`drone.drone_goggles.fields.display_size`,rules:{max:20}}),display_resolution:e.string({label:`drone.drone_goggles.fields.display_resolution`,rules:{max:40}}),display_brightness:e.string({label:`drone.drone_goggles.fields.display_brightness`,rules:{max:30}}),view_angle:e.string({label:`drone.drone_goggles.fields.view_angle`,rules:{max:20}}),antenna:e.string({label:`drone.drone_goggles.fields.antenna`,rules:{max:80}}),frequency_bands:e.string({label:`drone.drone_goggles.fields.frequency_bands`,options:`drone-bands`,multiple:!0,strict:!0,noSearch:!0}),battery:e.string({label:`drone.drone_goggles.fields.battery`,rules:{max:60}}),battery_life:e.string({label:`drone.drone_goggles.fields.battery_life`,rules:{max:40}}),charging:e.string({label:`drone.drone_goggles.fields.charging`,rules:{max:60}}),band_channels:e.keyed({label:`drone.drone_goggles.groups.band_channels`,icon:`lucide:radio`,container:e.row,fields:{band:e.string({label:`drone.drone_goggles.fields.band`,options:`drone-bands`,strict:!0,noSearch:!0}),channels:e.int({label:`drone.drone_goggles.fields.channels`,multiple:!0})},by:`band`}),notes:e.text({label:`drone.drone_goggles.fields.notes`,rules:{max:2e3}})}}),p=a({id:`drone_antenna`,label:`drone.drone_antenna.label`,icon:`lucide:radio`,attachTo:[{library:`things`,shelf:`item`}],showWhen:{type:`drone`,subtype:{$in:[`antenna`,`rtf`]}},agent:`FPV antenna characteristics. rf_band — the bands it covers, codes from drone-rf-bands. polarization — RHCP/LHCP/linear; a video link needs the SAME polarization on both ends. antenna_type — the radiating structure. connector — one model often ships in several connector variants.`,fields:{rf_band:e.string({label:`drone.drone_antenna.fields.rf_band`,options:`drone-rf-bands`,multiple:!0,strict:!0,noSearch:!0}),polarization:e.string({label:`drone.drone_antenna.fields.polarization`,options:`drone-polarization`,strict:!0,noSearch:!0}),antenna_type:e.string({label:`drone.drone_antenna.fields.antenna_type`,options:`drone-antenna-types`,strict:!0,noSearch:!0}),connector:e.string({label:`drone.drone_antenna.fields.connector`,options:`drone-rf-connectors`,multiple:!0,strict:!0,noSearch:!0}),gain_dbi:e.real({label:`drone.drone_antenna.fields.gain_dbi`}),cable_length:e.int({label:`drone.drone_antenna.fields.cable_length`,rules:{min:0}}),notes:e.text({label:`drone.drone_antenna.fields.notes`,rules:{max:2e3}})}}),m=a({id:`drone_receiver`,label:`drone.drone_receiver.label`,icon:`lucide:antenna`,attachTo:[{library:`things`,shelf:`item`}],showWhen:{type:`drone`,subtype:{$in:[`receiver`,`rtf`]}},agent:`RC receiver characteristics. radio_link — the protocol it binds with (ExpressLRS, Crossfire…). output_protocol — how it talks to the flight controller (CRSF, SBUS…). diversity — two antennas with active switching.`,fields:{radio_link:e.string({label:`drone.drone_receiver.fields.radio_link`,options:`drone-radio-links`,strict:!0,noSearch:!0}),rf_band:e.string({label:`drone.drone_receiver.fields.rf_band`,options:`drone-rf-bands`,multiple:!0,strict:!0,noSearch:!0}),output_protocol:e.string({label:`drone.drone_receiver.fields.output_protocol`,options:`drone-rx-outputs`,multiple:!0,strict:!0,noSearch:!0}),antenna_connector:e.string({label:`drone.drone_receiver.fields.antenna_connector`,options:`drone-rf-connectors`,strict:!0,noSearch:!0}),antenna_count:e.int({label:`drone.drone_receiver.fields.antenna_count`,rules:{min:0}}),telemetry:e.boolean({label:`drone.drone_receiver.fields.telemetry`}),diversity:e.boolean({label:`drone.drone_receiver.fields.diversity`}),input_voltage:e.string({label:`drone.drone_receiver.fields.input_voltage`,rules:{max:40}}),firmware_version:e.string({label:`drone.drone_receiver.fields.firmware_version`,rules:{max:40}}),notes:e.text({label:`drone.drone_receiver.fields.notes`,rules:{max:2e3}})}}),h=a({id:`drone_camera`,label:`drone.drone_camera.label`,icon:`lucide:camera`,attachTo:[{library:`things`,shelf:`item`}],showWhen:{type:`drone`,subtype:{$in:[`camera`,`rtf`]}},agent:`FPV camera characteristics. sensor — the sensor model (free text, e.g. Sony Super HAD II). resolution_tvl — analog horizontal resolution in TVL. aspect_ratio — 4:3 / 16:9 / switchable. output — the video signal it produces (analog CVBS or a digital HD system).`,fields:{sensor:e.string({label:`drone.drone_camera.fields.sensor`,rules:{max:100}}),resolution_tvl:e.int({label:`drone.drone_camera.fields.resolution_tvl`,rules:{min:0}}),aspect_ratio:e.string({label:`drone.drone_camera.fields.aspect_ratio`,options:`drone-camera-aspect`,strict:!0,noSearch:!0}),lens_mm:e.real({label:`drone.drone_camera.fields.lens_mm`}),fov_deg:e.int({label:`drone.drone_camera.fields.fov_deg`,rules:{min:0}}),output:e.string({label:`drone.drone_camera.fields.output`,options:`drone-camera-output`,strict:!0,noSearch:!0}),camera_size:e.string({label:`drone.drone_camera.fields.camera_size`,options:`drone-camera-sizes`,strict:!0,noSearch:!0}),input_voltage:e.string({label:`drone.drone_camera.fields.input_voltage`,rules:{max:40}}),notes:e.text({label:`drone.drone_camera.fields.notes`,rules:{max:2e3}})}}),g=[`ok`,`low_voltage`,`crash`,`lost`],_=[{value:`ok`,title:`drone.options.outcome.ok`,tone:`success`},{value:`low_voltage`,title:`drone.options.outcome.low_voltage`,tone:`warning`},{value:`crash`,title:`drone.options.outcome.crash`,tone:`danger`},{value:`lost`,title:`drone.options.outcome.lost`,tone:`danger`}],v=e=>Array.isArray(e)?e.filter(e=>e&&typeof e==`object`):[];function y(e,t){let n=[];for(let r of v(e)){let e=r[t];if(e==null||e===``)continue;let i=Number(e);Number.isFinite(i)&&(n.includes(i)||n.push(i))}return n}function b(e,t=`outcome`){let n=-1;for(let r of v(e)){let e=g.indexOf(r[t]);e>n&&(n=e)}return n<0?null:g[n]}var x=n({shelf:`flight`,library:`drone`,label:`drone.flight.label`,icon:`lucide:plane-takeoff`,agent:"A flying session, not a single sortie: one record is one outing — date, place, aircraft — and each battery pack flown is a row of `packs` (battery, duration in seconds, outcome, notes). `batteries` and `outcome` are SERVER-OWNED derivations over those rows and are rejected if sent: `batteries` indexes the distinct batteries used, `outcome` is the worst row outcome. Record a crash by setting that pack's outcome and listing the broken parts in `damage`, not by prose in `notes`. The `aircraft` picker only offers things/item[subtype='aircraft'] — a ready-to-fly kit (subtype='rtf') cannot be selected there today, so log its flights against an 'aircraft'-subtype record instead.",views:{title:`date`,listKind:`map`,list:[`aircraft`,`place`,`outcome`],inline:[`date`,`aircraft`]},fields:{date:e.date({label:`drone.flight.fields.date`,rules:{min:`2000-01-01`,max:`today`},ui:{span:4}}),description:e.text({label:`drone.flight.fields.description`,rules:{max:1e3}}),place:e.geo({label:`drone.flight.fields.place`}),aircraft:e.relation({label:`drone.flight.fields.aircraft`,options:t({library:`things`,shelf:`item`,filter:{type:`drone`,subtype:`aircraft`}})}),batteries:e.relation({label:`drone.flight.fields.batteries`,multiple:!0,options:t({library:`things`,shelf:`item`,filter:{type:`drone`,subtype:`battery`}}),value:({record:e})=>y(e.packs,`battery`)}),weather:e.group({scope:`hoist`,label:`drone.flight.groups.weather`,icon:`lucide:cloud-sun`,fields:{temp:e.measured({label:`drone.flight.fields.temp`,units:`temperature`,ui:{span:4}}),wind:e.measured({label:`drone.flight.fields.wind`,units:`speed`,ui:{span:4}}),sky:e.string({label:`drone.flight.fields.sky`,options:`drone-sky`,strict:!0,noSearch:!0})}}),packs:e.row({scope:`nest`,multiple:!0,label:`drone.flight.fields.packs`,icon:`lucide:battery-charging`,fields:{battery:e.relation({label:`drone.flight.fields.battery`,options:t({library:`things`,shelf:`item`,filter:{type:`drone`,subtype:`battery`}}),mutate:[`batteries`]}),duration:e.duration({label:`drone.flight.fields.duration`}),outcome:e.string({label:`drone.flight.fields.pack_outcome`,options:`drone-outcomes`,strict:!0,noSearch:!0,mutate:[`outcome`]}),notes:e.text({label:`drone.flight.fields.pack_notes`,rules:{max:500}})}}),outcome:e.string({label:`drone.flight.fields.outcome`,options:`drone-outcomes`,strict:!0,noSearch:!0,value:({record:e})=>b(e.packs)}),setup:e.group({scope:`hoist`,label:`drone.flight.groups.setup`,icon:`lucide:sliders-horizontal`,fields:{firmware_version:e.string({label:`drone.flight.fields.firmware_version`,rules:{max:40}}),tune:e.text({label:`drone.flight.fields.tune`,rules:{max:2e3}})}}),damage:e.relation({label:`drone.flight.fields.damage`,multiple:!0,options:t({library:`things`,shelf:`item`,filter:{type:`drone`}})}),video:e.video({label:`drone.flight.fields.video`,multiple:!0}),photos:e.image({label:`drone.flight.fields.photos`,multiple:!0}),edit_link:e.link({label:`drone.flight.fields.edit_link`}),tags:e.tags({label:`drone.flight.fields.tags`}),notes:e.text({label:`drone.flight.fields.notes`,rules:{max:2e3}})}}),S=i({id:`drone`,version:`1.0.0`,dependsOn:[`things`,`geo`],label:`drone.plugin.label`,description:`drone.plugin.description`,libraries:[{meta:r({id:`drone`,label:`drone.library.label`,icon:`tb:drone`,agent:`FPV drones and their components. A component is a things/item row with type=drone — this library owns no table for those. A FLIGHT is different: it is an event, not a thing, and it is this library's one table (flight): one record per outing, with the battery packs flown as rows inside it.`}),shelves:[x]}],extends_:[s,c,l,u,d,f,p,m,h],showcases:[o({id:`fleet`,library:`drone`,label:`drone.fleet.label`,icon:`lucide:plane`,source:{library:`things`,shelf:`item`},filter:{type:`drone`},columns:[`subtype`,`brand`,`model`,`location`,`condition`],defaultGroupBy:`subtype`,createDefaults:{type:`drone`}})],optionLists:[{name:`drone-bands`,options:[{value:`A`,title:`A`},{value:`B`,title:`B`},{value:`E`,title:`E`},{value:`F`,title:`F`},{value:`R`,title:`R`},{value:`L`,title:`L`},{value:`U`,title:`U`},{value:`O`,title:`O`},{value:`H`,title:`H`}]},{name:`drone-vtx-power`,options:[{value:`pit`,title:`PIT`},{value:`25mw`,title:`25 mW`},{value:`100mw`,title:`100 mW`},{value:`200mw`,title:`200 mW`},{value:`350mw`,title:`350 mW`},{value:`400mw`,title:`400 mW`},{value:`600mw`,title:`600 mW`},{value:`800mw`,title:`800 mW`},{value:`1000mw`,title:`1 W`},{value:`1600mw`,title:`1.6 W`},{value:`2500mw`,title:`2.5 W`}]},{name:`drone-vtx-protocols`,options:[{value:`smartaudio_1_0`,title:`SmartAudio 1.0`},{value:`smartaudio_2_0`,title:`SmartAudio 2.0`},{value:`smartaudio_2_1`,title:`SmartAudio 2.1`},{value:`tramp`,title:`IRC Tramp`},{value:`msp_displayport`,title:`MSP DisplayPort`},{value:`none`,title:`drone.options.none`}]},{name:`drone-rf-connectors`,options:[{value:`ipex_mhf1`,title:`IPEX / MHF1 (U.FL)`},{value:`ipex_mhf3`,title:`IPEX MHF3`},{value:`mmcx`,title:`MMCX`},{value:`sma`,title:`SMA`},{value:`rp_sma`,title:`RP-SMA`},{value:`ufl_solder`,title:`U.FL (soldered)`}]},{name:`drone-mounting`,options:[{value:`16x16_m2`,title:`16×16 mm M2`},{value:`20x20_m2`,title:`20×20 mm M2`},{value:`20x20_m3`,title:`20×20 mm M3`},{value:`25.5x25.5_m2`,title:`25.5×25.5 mm M2`},{value:`30.5x30.5_m3`,title:`30.5×30.5 mm M3`},{value:`adhesive`,title:`drone.options.adhesive`}]},{name:`drone-firmware`,options:[{value:`betaflight`,title:`Betaflight`},{value:`inav`,title:`INAV`},{value:`ardupilot`,title:`ArduPilot`},{value:`emuflight`,title:`EmuFlight`},{value:`rotorflight`,title:`Rotorflight`},{value:`kiss`,title:`KISS`},{value:`cleanflight`,title:`Cleanflight`}]},{name:`drone-fc-mcu`,options:[{value:`stm32f411`,title:`STM32F411`},{value:`stm32f405`,title:`STM32F405`},{value:`stm32f722`,title:`STM32F722`},{value:`stm32f745`,title:`STM32F745`},{value:`stm32f765`,title:`STM32F765`},{value:`stm32h743`,title:`STM32H743`},{value:`stm32h750`,title:`STM32H750`},{value:`at32f435`,title:`AT32F435`},{value:`gd32f405`,title:`GD32F405`}]},{name:`drone-gyro`,options:[{value:`mpu6000`,title:`MPU6000`},{value:`mpu6500`,title:`MPU6500`},{value:`icm20602`,title:`ICM20602`},{value:`icm20689`,title:`ICM20689`},{value:`icm42688p`,title:`ICM42688-P`},{value:`icm42605`,title:`ICM42605`},{value:`bmi270`,title:`BMI270`},{value:`bmi160`,title:`BMI160`}]},{name:`drone-osd-chip`,options:[{value:`at7456e`,title:`AT7456E`},{value:`max7456`,title:`MAX7456`},{value:`msp_displayport`,title:`MSP DisplayPort`},{value:`none`,title:`drone.options.none`}]},{name:`drone-blackbox`,options:[{value:`none`,title:`drone.options.none`},{value:`flash_8mb`,title:`Flash 8 MB`},{value:`flash_16mb`,title:`Flash 16 MB`},{value:`flash_32mb`,title:`Flash 32 MB`},{value:`sd_card`,title:`microSD`}]},{name:`drone-gnss-systems`,options:[{value:`gps`,title:`GPS`},{value:`glonass`,title:`GLONASS`},{value:`galileo`,title:`Galileo`},{value:`beidou`,title:`BeiDou`},{value:`qzss`,title:`QZSS`},{value:`sbas`,title:`SBAS`},{value:`navic`,title:`NavIC`}]},{name:`drone-gnss-protocols`,options:[{value:`ubx`,title:`UBX`},{value:`nmea`,title:`NMEA`},{value:`rtcm3`,title:`RTCM3`},{value:`msp`,title:`MSP`}]},{name:`drone-baud-rates`,options:[{value:`4800`,title:`4800`},{value:`9600`,title:`9600`},{value:`19200`,title:`19200`},{value:`38400`,title:`38400`},{value:`57600`,title:`57600`},{value:`115200`,title:`115200`},{value:`230400`,title:`230400`},{value:`460800`,title:`460800`},{value:`921600`,title:`921600`}]},{name:`drone-serial-interfaces`,options:[{value:`uart`,title:`UART`},{value:`i2c`,title:`I2C`},{value:`spi`,title:`SPI`},{value:`can`,title:`CAN`}]},{name:`drone-video-systems`,options:[{value:`analog_5_8`,title:`drone.options.videoSystems.analog_5_8`},{value:`dji_v1_v2`,title:`DJI V1/V2`},{value:`dji_o3`,title:`DJI O3`},{value:`dji_o4`,title:`DJI O4`},{value:`walksnail_avatar`,title:`Walksnail Avatar`},{value:`hdzero`,title:`HDZero`}]},{name:`drone-radio-links`,options:[{value:`elrs_2_4`,title:`ExpressLRS 2.4 GHz`},{value:`elrs_900`,title:`ExpressLRS 868/915 MHz`},{value:`crossfire`,title:`TBS Crossfire`},{value:`tracer`,title:`TBS Tracer`},{value:`ghost`,title:`ImmersionRC Ghost`},{value:`frsky_d16`,title:`FrSky D16`},{value:`frsky_d8`,title:`FrSky D8`},{value:`dsmx`,title:`Spektrum DSMX`},{value:`dji`,title:`DJI`}]},{name:`drone-rf-bands`,options:[{value:`5_8ghz`,title:`5.8 GHz`},{value:`2_4ghz`,title:`2.4 GHz`},{value:`1_2ghz`,title:`1.2 GHz`},{value:`900mhz`,title:`868/915 MHz`},{value:`433mhz`,title:`433 MHz`}]},{name:`drone-polarization`,options:[{value:`rhcp`,title:`drone.options.polarization.rhcp`},{value:`lhcp`,title:`drone.options.polarization.lhcp`},{value:`linear`,title:`drone.options.polarization.linear`}]},{name:`drone-antenna-types`,options:[{value:`omni`,title:`drone.options.antennaTypes.omni`},{value:`patch`,title:`drone.options.antennaTypes.patch`},{value:`helical`,title:`drone.options.antennaTypes.helical`},{value:`pagoda`,title:`drone.options.antennaTypes.pagoda`},{value:`cloverleaf`,title:`drone.options.antennaTypes.cloverleaf`},{value:`monopole`,title:`drone.options.antennaTypes.monopole`},{value:`whip`,title:`drone.options.antennaTypes.whip`}]},{name:`drone-cells`,options:[{value:`1s`,title:`1S`},{value:`2s`,title:`2S`},{value:`3s`,title:`3S`},{value:`4s`,title:`4S`},{value:`5s`,title:`5S`},{value:`6s`,title:`6S`},{value:`7s`,title:`7S`},{value:`8s`,title:`8S`},{value:`12s`,title:`12S`}]},{name:`drone-rx-outputs`,options:[{value:`crsf`,title:`CRSF`},{value:`sbus`,title:`SBUS`},{value:`ibus`,title:`IBUS`},{value:`ppm`,title:`PPM`},{value:`pwm`,title:`PWM`},{value:`spektrum`,title:`Spektrum`},{value:`ghst`,title:`GHST`}]},{name:`drone-camera-aspect`,options:[{value:`4_3`,title:`4:3`},{value:`16_9`,title:`16:9`},{value:`switchable`,title:`drone.options.cameraAspect.switchable`}]},{name:`drone-camera-output`,options:[{value:`analog_cvbs`,title:`drone.options.cameraOutput.analog_cvbs`},{value:`dji`,title:`DJI`},{value:`walksnail`,title:`Walksnail`},{value:`hdzero`,title:`HDZero`}]},{name:`drone-camera-sizes`,options:[{value:`nano`,title:`Nano`},{value:`micro`,title:`Micro`},{value:`mini`,title:`Mini`},{value:`full`,title:`Full-size`},{value:`whoop`,title:`Whoop`}]},{name:`drone-outcomes`,options:[..._]},{name:`drone-sky`,options:[{value:`clear`,title:`drone.options.sky.clear`},{value:`cloudy`,title:`drone.options.sky.cloudy`},{value:`overcast`,title:`drone.options.sky.overcast`},{value:`fog`,title:`drone.options.sky.fog`},{value:`rain`,title:`drone.options.sky.rain`},{value:`snow`,title:`drone.options.sky.snow`}]}],fieldContribs:[{library:`things`,shelf:`item`,field:`type`,options:[{value:`drone`,title:`drone.drone.label`}]},{library:`things`,shelf:`item`,field:`subtype`,options:[{value:`aircraft`,title:`drone.contrib.subtype.aircraft`,when:{type:`drone`}},{value:`battery`,title:`drone.drone_battery.label`,when:{type:`drone`}},{value:`vtx`,title:`drone.drone_vtx.label`,when:{type:`drone`}},{value:`gps`,title:`drone.drone_gps.label`,when:{type:`drone`}},{value:`flight_controller`,title:`drone.drone_flight_controller.label`,when:{type:`drone`}},{value:`goggles`,title:`drone.drone_goggles.label`,when:{type:`drone`}},{value:`radio`,title:`drone.contrib.subtype.radio`,when:{type:`drone`}},{value:`camera`,title:`drone.drone_camera.label`,when:{type:`drone`}},{value:`antenna`,title:`drone.drone_antenna.label`,when:{type:`drone`}},{value:`receiver`,title:`drone.drone_receiver.label`,when:{type:`drone`}},{value:`frame`,title:`drone.contrib.subtype.frame`,when:{type:`drone`}},{value:`rtf`,title:`drone.contrib.subtype.rtf`,when:{type:`drone`}},{value:`accessory`,title:`drone.contrib.subtype.accessory`,when:{type:`drone`}}]}]});export{S as default};
|