pdap-design-system 2.2.1 → 2.2.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (43) hide show
  1. package/README.md +16 -2
  2. package/dist/config/index.d.ts +56 -2
  3. package/dist/index.cjs +3 -3
  4. package/dist/{src/index.d.ts → index.d.ts} +1 -1
  5. package/dist/index.js +219 -222
  6. package/package.json +8 -3
  7. package/dist/tailwind.config.d.ts +0 -2
  8. /package/dist/{src/components → components}/Button/PdapButton.vue.d.ts +0 -0
  9. /package/dist/{src/components → components}/Button/index.d.ts +0 -0
  10. /package/dist/{src/components → components}/Button/types.d.ts +0 -0
  11. /package/dist/{src/components → components}/FlexContainer/FlexContainer.vue.d.ts +0 -0
  12. /package/dist/{src/components → components}/FlexContainer/index.d.ts +0 -0
  13. /package/dist/{src/components → components}/FlexContainer/types.d.ts +0 -0
  14. /package/dist/{src/components → components}/Footer/PdapFooter.vue.d.ts +0 -0
  15. /package/dist/{src/components → components}/Footer/index.d.ts +0 -0
  16. /package/dist/{src/components → components}/Footer/types.d.ts +0 -0
  17. /package/dist/{src/components → components}/Form/PdapForm.vue.d.ts +0 -0
  18. /package/dist/{src/components → components}/Form/index.d.ts +0 -0
  19. /package/dist/{src/components → components}/Form/types.d.ts +0 -0
  20. /package/dist/{src/components → components}/GridContainer/GridContainer.vue.d.ts +0 -0
  21. /package/dist/{src/components → components}/GridContainer/index.d.ts +0 -0
  22. /package/dist/{src/components → components}/GridContainer/types.d.ts +0 -0
  23. /package/dist/{src/components → components}/GridItem/GridItem.vue.d.ts +0 -0
  24. /package/dist/{src/components → components}/GridItem/index.d.ts +0 -0
  25. /package/dist/{src/components → components}/GridItem/types.d.ts +0 -0
  26. /package/dist/{src/components → components}/Header/PdapHeader.vue.d.ts +0 -0
  27. /package/dist/{src/components → components}/Header/index.d.ts +0 -0
  28. /package/dist/{src/components → components}/Header/types.d.ts +0 -0
  29. /package/dist/{src/components → components}/Input/PdapInput.vue.d.ts +0 -0
  30. /package/dist/{src/components → components}/Input/index.d.ts +0 -0
  31. /package/dist/{src/components → components}/Input/types.d.ts +0 -0
  32. /package/dist/{src/components → components}/Input/utils.d.ts +0 -0
  33. /package/dist/{src/components → components}/Nav/PdapNav.vue.d.ts +0 -0
  34. /package/dist/{src/components → components}/Nav/index.d.ts +0 -0
  35. /package/dist/{src/components → components}/Nav/types.d.ts +0 -0
  36. /package/dist/{src/components → components}/QuickSearchForm/QuickSearchForm.vue.d.ts +0 -0
  37. /package/dist/{src/components → components}/QuickSearchForm/index.d.ts +0 -0
  38. /package/dist/{src/components → components}/TileIcon/TileIcon.vue.d.ts +0 -0
  39. /package/dist/{src/components → components}/TileIcon/index.d.ts +0 -0
  40. /package/dist/{src/components → components}/TileIcon/types.d.ts +0 -0
  41. /package/dist/{src/components → components}/index.d.ts +0 -0
  42. /package/dist/{src/utils → utils}/vuelidate.d.ts +0 -0
  43. /package/dist/{src/utils → utils}/vuelidate.test.d.ts +0 -0
package/README.md CHANGED
@@ -32,7 +32,21 @@ import 'pdap-design-system/styles';
32
32
  import { Button, Form } from 'pdap-design-system';
33
33
  ```
34
34
 
35
- 4. Optional: Import the tailwind config if you need to use additional tailwind styles.
35
+ 1. Extend the `es-lint` config, for consistency in linting between client apps:
36
+ First `npm install --save-dev @pdap-design-system/eslint-config`, then, in `eslintrc`:
37
+
38
+ ```
39
+ {
40
+ ...,
41
+ extends: [
42
+ "@pdap-design-system/eslint-config",
43
+ ...
44
+ ],
45
+ }
46
+ ```
47
+
48
+
49
+ 5. (Optional) Import the tailwind config if you need to use additional tailwind styles.
36
50
 
37
51
  ```
38
52
  // tailwind.config.js
@@ -51,7 +65,7 @@ module.exports = {
51
65
 
52
66
  ```
53
67
 
54
- 5. If the project is using `TypeScript`, the component props definitions and other types are exposed for import as well.
68
+ 6. If the project is using `TypeScript`, the component props definitions and other types are exposed for import as well.
55
69
  _n.b. This can be particularly useful for composing `Form` schemas, where `Input` schema objects are defined differently depending on the `type` of input desired._
56
70
 
57
71
  ```
@@ -1,2 +1,56 @@
1
- import * as tailwindConfig from '../tailwind.config';
2
- export { tailwindConfig };
1
+ export declare const tailwindConfig: {
2
+ content: string[];
3
+ theme: {
4
+ extend: {
5
+ colors: {
6
+ brand: {
7
+ blue: {
8
+ light: string;
9
+ medium: string;
10
+ };
11
+ gold: string;
12
+ wine: string;
13
+ };
14
+ neutral: {
15
+ 50: string;
16
+ 100: string;
17
+ 200: string;
18
+ 300: string;
19
+ 400: string;
20
+ 500: string;
21
+ 600: string;
22
+ 700: string;
23
+ 800: string;
24
+ 900: string;
25
+ 950: string;
26
+ };
27
+ };
28
+ brightness: {
29
+ 85: string;
30
+ };
31
+ maxWidth: {
32
+ '4xl': string;
33
+ };
34
+ screens: {
35
+ xs: string;
36
+ };
37
+ };
38
+ fontFamily: {
39
+ sans: string[];
40
+ serif: string[];
41
+ mono: string[];
42
+ };
43
+ fontSize: {
44
+ xs: string;
45
+ sm: string;
46
+ med: string;
47
+ lg: string;
48
+ xl: string;
49
+ '2xl': string;
50
+ '3xl': string;
51
+ '4xl': string;
52
+ '5xl': string;
53
+ '6xl': string;
54
+ };
55
+ };
56
+ };
package/dist/index.cjs CHANGED
@@ -1,3 +1,3 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),X=require("vue-router"),ce=e.defineComponent({__name:"PdapButton",props:{intent:{default:"primary"},isLoading:{type:Boolean,default:!1}},setup(t){const r=t,n=e.reactive({"pdap-button":!0,[`pdap-button-${r.intent}`]:!!r.intent,"pdap-button-loading":r.isLoading});return(a,o)=>(e.openBlock(),e.createElementBlock("button",{class:e.normalizeClass(n)},[e.renderSlot(a.$slots,"default")],2))}});const I=e.defineComponent({__name:"FlexContainer",props:{alignment:{default:"start"},component:{default:"div"}},setup(t){const r=t,n=e.reactive({"pdap-flex-container":!0,[`pdap-flex-container-${r.alignment}`]:!0});return(a,o)=>(e.openBlock(),e.createBlock(e.resolveDynamicComponent(a.component),{class:e.normalizeClass(n)},{default:e.withCtx(()=>[e.renderSlot(a.$slots,"default")]),_:3},8,["class"]))}});const ke={class:"pdap-footer"},Re={class:"pdap-footer-social-links"},Ve=["href"],Oe=e.createElementVNode("p",{class:"pdap-footer-copyright"},[e.createTextVNode(" © 2023 Police Data Accessibility Project"),e.createElementVNode("br")],-1),Be=e.createElementVNode("p",{class:"pdap-footer-copyright"},[e.createTextVNode(" PDAP is a non-profit. EIN: 85-4207132. "),e.createElementVNode("a",{href:"https://docs.pdap.io/meta/policy/pdap-privacy-policy",alt:"Privacy Policy",target:"_blank"},[e.createElementVNode("br"),e.createTextVNode(" Privacy Policy "),e.createElementVNode("i",{class:"fa fa-external-link"})]),e.createElementVNode("br"),e.createElementVNode("a",{href:"mailto:contact@pdap.io"},"contact@pdap.io")],-1),je={class:"pdap-footer-widget-links"},Te=e.createElementVNode("a",{href:"https://www.guidestar.org/profile/85-4207132",target:"_blank"},[e.createElementVNode("img",{src:"https://widgets.guidestar.org/gximage2?o=9973356&l=v4"})],-1),Se=["href"],Ne=["src"],Ae=["src"],Ie=e.defineComponent({__name:"PdapFooter",props:{logoImageSrc:{default:"node_modules/pdap-design-system/dist/images/acronym.svg"},logoImageAnchorPath:{default:"/"}},setup(t){const r=t,n=e.inject("footerLinks",[{href:"https://github.com/orgs/Police-Data-Accessibility-Project",text:"Github"},{href:"https://discord.gg/wMqex8nKZJ",text:"Discord"},{href:"https://www.linkedin.com/company/pdap",text:"LinkedIn"},{path:"/jobs",text:"Jobs"}]),a=r.logoImageAnchorPath.startsWith("/");return(o,s)=>{const u=e.resolveComponent("router-link");return e.openBlock(),e.createElementBlock("footer",ke,[e.createVNode(I,{alignment:"center"},{default:e.withCtx(()=>[e.createElementVNode("ul",Re,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(n),c=>(e.openBlock(),e.createElementBlock("li",{key:c.text,class:"pdap-footer-link-container"},[c.href?(e.openBlock(),e.createElementBlock("a",{key:0,class:"pdap-footer-social-link",href:c.href,target:"_blank",referrerpolicy:"no-referrer"},e.toDisplayString(c.text),9,Ve)):e.createCommentVNode("",!0),c.path?(e.openBlock(),e.createBlock(u,{key:1,"active-class":"pdap-footer-social-link-current","exact-active-class":"pdap-footer-social-link-current-exact",class:"pdap-footer-social-link",to:c.path},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(c.text),1)]),_:2},1032,["to"])):e.createCommentVNode("",!0)]))),128))]),Oe,Be,e.createElementVNode("div",je,[Te,e.unref(a)?(e.openBlock(),e.createBlock(u,{key:1,to:o.logoImageAnchorPath,class:"pdap-footer-logo"},{default:e.withCtx(()=>[e.createElementVNode("img",{src:o.logoImageSrc,loading:"lazy",width:"250",alt:"Police Data Accessibility Project Logo"},null,8,Ae)]),_:1},8,["to"])):(e.openBlock(),e.createElementBlock("a",{key:0,href:o.logoImageAnchorPath,class:"pdap-footer-logo"},[e.createElementVNode("img",{src:o.logoImageSrc,loading:"lazy",width:"250",alt:"Police Data Accessibility Project Logo"},null,8,Ne)],8,Se))])]),_:1})])}}});function Y(t,r){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);r&&(a=a.filter(function(o){return Object.getOwnPropertyDescriptor(t,o).enumerable})),n.push.apply(n,a)}return n}function P(t){for(var r=1;r<arguments.length;r++){var n=arguments[r]!=null?arguments[r]:{};r%2?Y(Object(n),!0).forEach(function(a){Le(t,a,n[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Y(Object(n)).forEach(function(a){Object.defineProperty(t,a,Object.getOwnPropertyDescriptor(n,a))})}return t}function Le(t,r,n){return r in t?Object.defineProperty(t,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[r]=n,t}function ee(t){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[];return Object.keys(t).reduce((n,a)=>(r.includes(a)||(n[a]=e.unref(t[a])),n),{})}function L(t){return typeof t=="function"}function ze(t){return e.isReactive(t)||e.isReadonly(t)}function ue(t,r,n){let a=t;const o=r.split(".");for(let s=0;s<o.length;s++){if(!a[o[s]])return n;a=a[o[s]]}return a}function G(t,r,n){return e.computed(()=>t.some(a=>ue(r,a,{[n]:!1})[n]))}function te(t,r,n){return e.computed(()=>t.reduce((a,o)=>{const s=ue(r,o,{[n]:!1})[n]||[];return a.concat(s)},[]))}function de(t,r,n,a){return t.call(a,e.unref(r),e.unref(n),a)}function me(t){return t.$valid!==void 0?!t.$valid:!t}function De(t,r,n,a,o,s,u){let{$lazy:c,$rewardEarly:l}=o,d=arguments.length>7&&arguments[7]!==void 0?arguments[7]:[],g=arguments.length>8?arguments[8]:void 0,p=arguments.length>9?arguments[9]:void 0,$=arguments.length>10?arguments[10]:void 0;const h=e.ref(!!a.value),i=e.ref(0);n.value=!1;const m=e.watch([r,a].concat(d,$),()=>{if(c&&!a.value||l&&!p.value&&!n.value)return;let f;try{f=de(t,r,g,u)}catch(v){f=Promise.reject(v)}i.value++,n.value=!!i.value,h.value=!1,Promise.resolve(f).then(v=>{i.value--,n.value=!!i.value,s.value=v,h.value=me(v)}).catch(v=>{i.value--,n.value=!!i.value,s.value=v,h.value=!0})},{immediate:!0,deep:typeof r=="object"});return{$invalid:h,$unwatch:m}}function Me(t,r,n,a,o,s,u,c){let{$lazy:l,$rewardEarly:d}=a;const g=()=>({}),p=e.computed(()=>{if(l&&!n.value||d&&!c.value)return!1;let $=!0;try{const h=de(t,r,u,s);o.value=h,$=me(h)}catch(h){o.value=h}return $});return{$unwatch:g,$invalid:p}}function Fe(t,r,n,a,o,s,u,c,l,d,g){const p=e.ref(!1),$=t.$params||{},h=e.ref(null);let i,m;t.$async?{$invalid:i,$unwatch:m}=De(t.$validator,r,p,n,a,h,o,t.$watchTargets,l,d,g):{$invalid:i,$unwatch:m}=Me(t.$validator,r,n,a,h,o,l,d);const f=t.$message;return{$message:L(f)?e.computed(()=>f(ee({$pending:p,$invalid:i,$params:ee($),$model:r,$response:h,$validator:s,$propertyPath:c,$property:u}))):f||"",$params:$,$pending:p,$invalid:i,$response:h,$unwatch:m}}function qe(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};const r=e.unref(t),n=Object.keys(r),a={},o={},s={};let u=null;return n.forEach(c=>{const l=r[c];switch(!0){case L(l.$validator):a[c]=l;break;case L(l):a[c]={$validator:l};break;case c==="$validationGroups":u=l;break;case c.startsWith("$"):s[c]=l;break;default:o[c]=l}}),{rules:a,nestedValidators:o,config:s,validationGroups:u}}const He="__root";function Ge(t,r,n,a,o,s,u,c,l){const d=Object.keys(t),g=a.get(o,t),p=e.ref(!1),$=e.ref(!1),h=e.ref(0);if(g){if(!g.$partial)return g;g.$unwatch(),p.value=g.$dirty.value}const i={$dirty:p,$path:o,$touch:()=>{p.value||(p.value=!0)},$reset:()=>{p.value&&(p.value=!1)},$commit:()=>{}};return d.length?(d.forEach(m=>{i[m]=Fe(t[m],r,i.$dirty,s,u,m,n,o,l,$,h)}),i.$externalResults=e.computed(()=>c.value?[].concat(c.value).map((m,f)=>({$propertyPath:o,$property:n,$validator:"$externalResults",$uid:`${o}-externalResult-${f}`,$message:m,$params:{},$response:null,$pending:!1})):[]),i.$invalid=e.computed(()=>{const m=d.some(f=>e.unref(i[f].$invalid));return $.value=m,!!i.$externalResults.value.length||m}),i.$pending=e.computed(()=>d.some(m=>e.unref(i[m].$pending))),i.$error=e.computed(()=>i.$dirty.value?i.$pending.value||i.$invalid.value:!1),i.$silentErrors=e.computed(()=>d.filter(m=>e.unref(i[m].$invalid)).map(m=>{const f=i[m];return e.reactive({$propertyPath:o,$property:n,$validator:m,$uid:`${o}-${m}`,$message:f.$message,$params:f.$params,$response:f.$response,$pending:f.$pending})}).concat(i.$externalResults.value)),i.$errors=e.computed(()=>i.$dirty.value?i.$silentErrors.value:[]),i.$unwatch=()=>d.forEach(m=>{i[m].$unwatch()}),i.$commit=()=>{$.value=!0,h.value=Date.now()},a.set(o,t,i),i):(g&&a.set(o,t,i),i)}function Ue(t,r,n,a,o,s,u){const c=Object.keys(t);return c.length?c.reduce((l,d)=>(l[d]=U({validations:t[d],state:r,key:d,parentKey:n,resultsCache:a,globalConfig:o,instance:s,externalResults:u}),l),{}):{}}function Xe(t,r,n){const a=e.computed(()=>[r,n].filter(i=>i).reduce((i,m)=>i.concat(Object.values(e.unref(m))),[])),o=e.computed({get(){return t.$dirty.value||(a.value.length?a.value.every(i=>i.$dirty):!1)},set(i){t.$dirty.value=i}}),s=e.computed(()=>{const i=e.unref(t.$silentErrors)||[],m=a.value.filter(f=>(e.unref(f).$silentErrors||[]).length).reduce((f,v)=>f.concat(...v.$silentErrors),[]);return i.concat(m)}),u=e.computed(()=>{const i=e.unref(t.$errors)||[],m=a.value.filter(f=>(e.unref(f).$errors||[]).length).reduce((f,v)=>f.concat(...v.$errors),[]);return i.concat(m)}),c=e.computed(()=>a.value.some(i=>i.$invalid)||e.unref(t.$invalid)||!1),l=e.computed(()=>a.value.some(i=>e.unref(i.$pending))||e.unref(t.$pending)||!1),d=e.computed(()=>a.value.some(i=>i.$dirty)||a.value.some(i=>i.$anyDirty)||o.value),g=e.computed(()=>o.value?l.value||c.value:!1),p=()=>{t.$touch(),a.value.forEach(i=>{i.$touch()})},$=()=>{t.$commit(),a.value.forEach(i=>{i.$commit()})},h=()=>{t.$reset(),a.value.forEach(i=>{i.$reset()})};return a.value.length&&a.value.every(i=>i.$dirty)&&p(),{$dirty:o,$errors:u,$invalid:c,$anyDirty:d,$error:g,$pending:l,$touch:p,$reset:h,$silentErrors:s,$commit:$}}function U(t){let{validations:r,state:n,key:a,parentKey:o,childResults:s,resultsCache:u,globalConfig:c={},instance:l,externalResults:d}=t;const g=o?`${o}.${a}`:a,{rules:p,nestedValidators:$,config:h,validationGroups:i}=qe(r),m=P(P({},c),h),f=a?e.computed(()=>{const y=e.unref(n);return y?e.unref(y[a]):void 0}):n,v=P({},e.unref(d)||{}),w=e.computed(()=>{const y=e.unref(d);return a?y?e.unref(y[a]):void 0:y}),M=Ge(p,f,a,u,g,m,l,w,n),b=Ue($,f,g,u,m,l,w),V={};i&&Object.entries(i).forEach(y=>{let[O,C]=y;V[O]={$invalid:G(C,b,"$invalid"),$error:G(C,b,"$error"),$pending:G(C,b,"$pending"),$errors:te(C,b,"$errors"),$silentErrors:te(C,b,"$silentErrors")}});const{$dirty:E,$errors:N,$invalid:F,$anyDirty:ye,$error:_e,$pending:q,$touch:H,$reset:be,$silentErrors:we,$commit:J}=Xe(M,b,s),xe=a?e.computed({get:()=>e.unref(f),set:y=>{E.value=!0;const O=e.unref(n),C=e.unref(d);C&&(C[a]=v[a]),e.isRef(O[a])?O[a].value=y:O[a]=y}}):null;a&&m.$autoDirty&&e.watch(f,()=>{E.value||H();const y=e.unref(d);y&&(y[a]=v[a])},{flush:"sync"});async function Ee(){return H(),m.$rewardEarly&&(J(),await e.nextTick()),await e.nextTick(),new Promise(y=>{if(!q.value)return y(!F.value);const O=e.watch(q,()=>{y(!F.value),O()})})}function Ce(y){return(s.value||{})[y]}function Pe(){e.isRef(d)?d.value=v:Object.keys(v).length===0?Object.keys(d).forEach(y=>{delete d[y]}):Object.assign(d,v)}return e.reactive(P(P(P({},M),{},{$model:xe,$dirty:E,$error:_e,$errors:N,$invalid:F,$anyDirty:ye,$pending:q,$touch:H,$reset:be,$path:g||He,$silentErrors:we,$validate:Ee,$commit:J},s&&{$getResultsForChild:Ce,$clearExternalResults:Pe,$validationGroups:V}),b))}class We{constructor(){this.storage=new Map}set(r,n,a){this.storage.set(r,{rules:n,result:a})}checkRulesValidity(r,n,a){const o=Object.keys(a),s=Object.keys(n);return s.length!==o.length||!s.every(c=>o.includes(c))?!1:s.every(c=>n[c].$params?Object.keys(n[c].$params).every(l=>e.unref(a[c].$params[l])===e.unref(n[c].$params[l])):!0)}get(r,n){const a=this.storage.get(r);if(!a)return;const{rules:o,result:s}=a,u=this.checkRulesValidity(r,n,o),c=s.$unwatch?s.$unwatch:()=>({});return u?s:{$dirty:s.$dirty,$partial:!0,$unwatch:c}}}const A={COLLECT_ALL:!0,COLLECT_NONE:!1},re=Symbol("vuelidate#injectChildResults"),ne=Symbol("vuelidate#removeChildResults");function Ke(t){let{$scope:r,instance:n}=t;const a={},o=e.ref([]),s=e.computed(()=>o.value.reduce((g,p)=>(g[p]=e.unref(a[p]),g),{}));function u(g,p){let{$registerAs:$,$scope:h,$stopPropagation:i}=p;i||r===A.COLLECT_NONE||h===A.COLLECT_NONE||r!==A.COLLECT_ALL&&r!==h||(a[$]=g,o.value.push($))}n.__vuelidateInjectInstances=[].concat(n.__vuelidateInjectInstances||[],u);function c(g){o.value=o.value.filter(p=>p!==g),delete a[g]}n.__vuelidateRemoveInstances=[].concat(n.__vuelidateRemoveInstances||[],c);const l=e.inject(re,[]);e.provide(re,n.__vuelidateInjectInstances);const d=e.inject(ne,[]);return e.provide(ne,n.__vuelidateRemoveInstances),{childResults:s,sendValidationResultsToParent:l,removeValidationResultsFromParent:d}}function pe(t){return new Proxy(t,{get(r,n){return typeof r[n]=="object"?pe(r[n]):e.computed(()=>r[n])}})}let ae=0;function Qe(t,r){var n;let a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};arguments.length===1&&(a=t,t=void 0,r=void 0);let{$registerAs:o,$scope:s=A.COLLECT_ALL,$stopPropagation:u,$externalResults:c,currentVueInstance:l}=a;const d=l||((n=e.getCurrentInstance())===null||n===void 0?void 0:n.proxy),g=d?d.$options:{};o||(ae+=1,o=`_vuelidate_${ae}`);const p=e.ref({}),$=new We,{childResults:h,sendValidationResultsToParent:i,removeValidationResultsFromParent:m}=d?Ke({$scope:s,instance:d}):{childResults:e.ref({})};if(!t&&g.validations){const f=g.validations;r=e.ref({}),e.onBeforeMount(()=>{r.value=d,e.watch(()=>L(f)?f.call(r.value,new pe(r.value)):f,v=>{p.value=U({validations:v,state:r,childResults:h,resultsCache:$,globalConfig:a,instance:d,externalResults:c||d.vuelidateExternalResults})},{immediate:!0})}),a=g.validationsConfig||a}else{const f=e.isRef(t)||ze(t)?t:e.reactive(t||{});e.watch(f,v=>{p.value=U({validations:v,state:r,childResults:h,resultsCache:$,globalConfig:a,instance:d??{},externalResults:c})},{immediate:!0})}return d&&(i.forEach(f=>f(p,{$registerAs:o,$scope:s,$stopPropagation:u})),e.onBeforeUnmount(()=>m.forEach(f=>f(o)))),e.computed(()=>P(P({},e.unref(p.value)),h.value))}var x=(t=>(t.CHECKBOX="checkbox",t.TEXT="text",t))(x||{});const Ze=["id","name","placeholder","value"],Je=["id","name","checked","value"],Ye=["id"],et=["for"],fe=e.defineComponent({__name:"PdapInput",props:{error:{},id:{},label:{},name:{},placeholder:{},type:{},value:{},defaultChecked:{type:Boolean}},emits:["change","input"],setup(t,{emit:r}){const n=t,a=r,o=()=>{u.value=!u.value,a("change",u.value.toString())},s=l=>{a("input",l.target.value)},u=e.ref(n.defaultChecked),c=e.computed(()=>`pdap-${n.name}-input-error`);return(l,d)=>{var g;return e.openBlock(),e.createBlock(e.unref($e),{class:e.normalizeClass({"pdap-input":!0,"pdap-input-error":Number((g=l.error)==null?void 0:g.length)>=1})},{default:e.withCtx(()=>[l.type===e.unref(x).TEXT?(e.openBlock(),e.createElementBlock("input",e.mergeProps({key:0,id:l.id,type:"text",name:l.name,placeholder:l.placeholder,value:l.value},l.$attrs,{onInput:s}),null,16,Ze)):l.type===e.unref(x).CHECKBOX?(e.openBlock(),e.createElementBlock("input",e.mergeProps({key:1,id:l.id,class:"pdap-input-checkbox",name:l.name,checked:u.value,type:"checkbox",value:l.value},l.$attrs,{onChange:o}),null,16,Je)):e.createCommentVNode("",!0),l.error?(e.openBlock(),e.createElementBlock("div",{key:2,id:c.value,class:"pdap-input-error-message"},e.toDisplayString(l.error),9,Ye)):e.createCommentVNode("",!0),e.createElementVNode("label",{class:"pdap-input-label",for:l.id},e.toDisplayString(l.label),9,et)]),_:1},8,["class"])}}});function oe(t,r){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);r&&(a=a.filter(function(o){return Object.getOwnPropertyDescriptor(t,o).enumerable})),n.push.apply(n,a)}return n}function j(t){for(var r=1;r<arguments.length;r++){var n=arguments[r]!=null?arguments[r]:{};r%2?oe(Object(n),!0).forEach(function(a){tt(t,a,n[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):oe(Object(n)).forEach(function(a){Object.defineProperty(t,a,Object.getOwnPropertyDescriptor(n,a))})}return t}function tt(t,r,n){return r in t?Object.defineProperty(t,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[r]=n,t}function T(t){return typeof t=="function"}function z(t){return t!==null&&typeof t=="object"&&!Array.isArray(t)}function D(t){return T(t.$validator)?j({},t):{$validator:t}}function rt(t){return z(t)&&T(t.then)}function k(t){return typeof t=="object"?t.$valid:t}function B(t){return t.$validator||t}function W(t,r){if(!z(t))throw new Error(`[@vuelidate/validators]: First parameter to "withParams" should be an object, provided ${typeof t}`);if(!z(r)&&!T(r))throw new Error("[@vuelidate/validators]: Validator must be a function or object with $validator parameter");const n=D(r);return n.$params=j(j({},n.$params||{}),t),n}function S(t,r){if(!T(t)&&typeof e.unref(t)!="string")throw new Error(`[@vuelidate/validators]: First parameter to "withMessage" should be string or a function returning a string, provided ${typeof t}`);if(!z(r)&&!T(r))throw new Error("[@vuelidate/validators]: Validator must be a function or object with $validator parameter");const n=D(r);return n.$message=t,n}function nt(t){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[];const n=D(t);return j(j({},n),{},{$async:!0,$watchTargets:r})}function at(t){return{$validator(r){for(var n=arguments.length,a=new Array(n>1?n-1:0),o=1;o<n;o++)a[o-1]=arguments[o];return e.unref(r).reduce((s,u,c)=>{const l=Object.entries(u).reduce((d,g)=>{let[p,$]=g;const h=t[p]||{},i=Object.entries(h).reduce((m,f)=>{let[v,w]=f;const b=B(w).call(this,$,u,c,...a),V=k(b);if(m.$data[v]=b,m.$data.$invalid=!V||!!m.$data.$invalid,m.$data.$error=m.$data.$invalid,!V){let E=w.$message||"";const N=w.$params||{};typeof E=="function"&&(E=E({$pending:!1,$invalid:!V,$params:N,$model:$,$response:b})),m.$errors.push({$property:p,$message:E,$params:N,$response:b,$model:$,$pending:!1,$validator:v})}return{$valid:m.$valid&&V,$data:m.$data,$errors:m.$errors}},{$valid:!0,$data:{},$errors:[]});return d.$data[p]=i.$data,d.$errors[p]=i.$errors,{$valid:d.$valid&&i.$valid,$data:d.$data,$errors:d.$errors}},{$valid:!0,$data:{},$errors:{}});return{$valid:s.$valid&&l.$valid,$data:s.$data.concat(l.$data),$errors:s.$errors.concat(l.$errors)}},{$valid:!0,$data:[],$errors:[]})},$message:r=>{let{$response:n}=r;return n?n.$errors.map(a=>Object.values(a).map(o=>o.map(s=>s.$message)).reduce((o,s)=>o.concat(s),[])):[]}}}const _=t=>{if(t=e.unref(t),Array.isArray(t))return!!t.length;if(t==null)return!1;if(t===!1)return!0;if(t instanceof Date)return!isNaN(t.getTime());if(typeof t=="object"){for(let r in t)return!0;return!1}return!!String(t).length},K=t=>(t=e.unref(t),Array.isArray(t)?t.length:typeof t=="object"?Object.keys(t).length:String(t).length);function R(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return a=>(a=e.unref(a),!_(a)||r.every(o=>(o.lastIndex=0,o.test(a))))}var Q=Object.freeze({__proto__:null,forEach:at,len:K,normalizeValidatorObject:D,regex:R,req:_,unwrap:e.unref,unwrapNormalizedValidator:B,unwrapValidatorResponse:k,withAsync:nt,withMessage:S,withParams:W}),ot=R(/^[a-zA-Z]*$/),st={$validator:ot,$message:"The value is not alphabetical",$params:{type:"alpha"}},lt=R(/^[a-zA-Z0-9]*$/),it={$validator:lt,$message:"The value must be alpha-numeric",$params:{type:"alphaNum"}},ct=R(/^\d*(\.\d+)?$/),ut={$validator:ct,$message:"Value must be numeric",$params:{type:"numeric"}};function dt(t,r){return n=>!_(n)||(!/\s/.test(n)||n instanceof Date)&&+e.unref(t)<=+n&&+e.unref(r)>=+n}function mt(t,r){return{$validator:dt(t,r),$message:n=>{let{$params:a}=n;return`The value must be between ${a.min} and ${a.max}`},$params:{min:t,max:r,type:"between"}}}const pt=/^(?:[A-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[A-z0-9!#$%&'*+/=?^_`{|}~-]+)*|"(?:[\x01-\x08\x0b\x0c\x0e-\x1f\x21\x23-\x5b\x5d-\x7f]|[\x01-\x09\x0b\x0c\x0e-\x7f])*")@(?:(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9]{2,}(?:[a-z0-9-]*[a-z0-9])?|\[(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?|[a-z0-9-]*[a-z0-9]:(?:[\x01-\x08\x0b\x0c\x0e-\x1f\x21-\x5a\x53-\x7f]|\\[\x01-\x09\x0b\x0c\x0e-\x7f])+)\])$/i;var ft=R(pt),gt={$validator:ft,$message:"Value is not a valid email address",$params:{type:"email"}};function ht(t){if(!_(t))return!0;if(typeof t!="string")return!1;const r=t.split(".");return r.length===4&&r.every($t)}const $t=t=>{if(t.length>3||t.length===0||t[0]==="0"&&t!=="0"||!t.match(/^\d+$/))return!1;const r=+t|0;return r>=0&&r<=255};var vt={$validator:ht,$message:"The value is not a valid IP address",$params:{type:"ipAddress"}};function yt(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:":";return r=>{if(t=e.unref(t),!_(r))return!0;if(typeof r!="string")return!1;const n=typeof t=="string"&&t!==""?r.split(t):r.length===12||r.length===16?r.match(/.{2}/g):null;return n!==null&&(n.length===6||n.length===8)&&n.every(_t)}}const _t=t=>t.toLowerCase().match(/^[0-9a-f]{2}$/);function bt(t){return{$validator:yt(t),$message:"The value is not a valid MAC Address",$params:{type:"macAddress"}}}function wt(t){return r=>!_(r)||K(r)<=e.unref(t)}function xt(t){return{$validator:wt(t),$message:r=>{let{$params:n}=r;return`The maximum length allowed is ${n.max}`},$params:{max:t,type:"maxLength"}}}function Et(t){return r=>!_(r)||K(r)>=e.unref(t)}function Ct(t){return{$validator:Et(t),$message:r=>{let{$params:n}=r;return`This field should be at least ${n.min} characters long`},$params:{min:t,type:"minLength"}}}function Pt(t){return typeof t=="string"&&(t=t.trim()),_(t)}var Z={$validator:Pt,$message:"Value is required",$params:{type:"required"}};const se=(t,r)=>t?_(typeof r=="string"?r.trim():r):!0;function kt(t){return function(r,n){if(typeof t!="function")return se(e.unref(t),r);const a=t.call(this,r,n);return se(a,r)}}function Rt(t){return{$validator:kt(t),$message:"The value is required",$params:{type:"requiredIf",prop:t}}}const le=(t,r)=>t?!0:_(typeof r=="string"?r.trim():r);function Vt(t){return function(r,n){if(typeof t!="function")return le(e.unref(t),r);const a=t.call(this,r,n);return le(a,r)}}function Ot(t){return{$validator:Vt(t),$message:"The value is required",$params:{type:"requiredUnless",prop:t}}}function Bt(t){return r=>e.unref(r)===e.unref(t)}function jt(t){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"other";return{$validator:Bt(t),$message:n=>`The value must be equal to the ${r} value`,$params:{equalTo:t,otherName:r,type:"sameAs"}}}const Tt=/^(?:(?:(?:https?|ftp):)?\/\/)(?:\S+(?::\S*)?@)?(?:(?!(?:10|127)(?:\.\d{1,3}){3})(?!(?:169\.254|192\.168)(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z0-9\u00a1-\uffff][a-z0-9\u00a1-\uffff_-]{0,62})?[a-z0-9\u00a1-\uffff]\.)+(?:[a-z\u00a1-\uffff]{2,}\.?))(?::\d{2,5})?(?:[/?#]\S*)?$/i;var St=R(Tt),Nt={$validator:St,$message:"The value is not a valid URL address",$params:{type:"url"}};function At(t){return function(){for(var r=arguments.length,n=new Array(r),a=0;a<r;a++)n[a]=arguments[a];return t.reduce((o,s)=>k(o)?o:B(s).apply(this,n),!1)}}function It(t){return function(){for(var r=arguments.length,n=new Array(r),a=0;a<r;a++)n[a]=arguments[a];return t.reduce(async(o,s)=>{const u=await o;return k(u)?u:B(s).apply(this,n)},Promise.resolve(!1))}}function Lt(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];const a=r.some(u=>u.$async),o=r.reduce((u,c)=>c.$watchTargets?u.concat(c.$watchTargets):u,[]);let s=()=>!1;return r.length&&(s=a?It(r):At(r)),{$async:a,$validator:s,$watchTargets:o}}function zt(){return W({type:"or"},S("The value does not match any of the provided validators",Lt(...arguments)))}function Dt(t){return function(){for(var r=arguments.length,n=new Array(r),a=0;a<r;a++)n[a]=arguments[a];return t.reduce((o,s)=>k(o)?B(s).apply(this,n):o,!0)}}function Mt(t){return function(){for(var r=arguments.length,n=new Array(r),a=0;a<r;a++)n[a]=arguments[a];return t.reduce(async(o,s)=>{const u=await o;return k(u)?B(s).apply(this,n):u},Promise.resolve(!0))}}function Ft(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];const a=r.some(u=>u.$async),o=r.reduce((u,c)=>c.$watchTargets?u.concat(c.$watchTargets):u,[]);let s=()=>!1;return r.length&&(s=a?Mt(r):Dt(r)),{$async:a,$validator:s,$watchTargets:o}}function qt(){return W({type:"and"},S("The value does not match all of the provided validators",Ft(...arguments)))}function Ht(t){return function(r,n){if(!_(r))return!0;const a=B(t).call(this,r,n);return rt(a)?a.then(o=>!k(o)):!k(a)}}function Gt(t){return{$validator:Ht(t),$message:"The value does not match the provided validator",$params:{type:"not"}}}function Ut(t){return r=>!_(r)||(!/\s/.test(r)||r instanceof Date)&&+r>=+e.unref(t)}function Xt(t){return{$validator:Ut(t),$message:r=>{let{$params:n}=r;return`The minimum value allowed is ${n.min}`},$params:{min:t,type:"minValue"}}}function Wt(t){return r=>!_(r)||(!/\s/.test(r)||r instanceof Date)&&+r<=+e.unref(t)}var Kt=t=>({$validator:Wt(t),$message:r=>{let{$params:n}=r;return`The maximum value allowed is ${n.max}`},$params:{max:t,type:"maxValue"}}),Qt=R(/(^[0-9]*$)|(^-[0-9]+$)/),Zt={$validator:Qt,$message:"Value is not an integer",$params:{type:"integer"}},Jt=R(/^[-]?\d*(\.\d+)?$/),Yt={$validator:Jt,$message:"Value must be decimal",$params:{type:"decimal"}};function er(t){let{t:r,messagePath:n=o=>{let{$validator:s}=o;return`validations.${s}`},messageParams:a=o=>o}=t;return function(s){let{withArguments:u=!1,messagePath:c=n,messageParams:l=a}=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};function d(g){return r(c(g),l(j({model:g.$model,property:g.$property,pending:g.$pending,invalid:g.$invalid,response:g.$response,validator:g.$validator,propertyPath:g.$propertyPath},g.$params)))}return u&&typeof s=="function"?function(){return S(d,s(...arguments))}:S(d,s)}}const ge=Object.freeze(Object.defineProperty({__proto__:null,alpha:st,alphaNum:it,and:qt,between:mt,createI18nMessage:er,decimal:Yt,email:gt,helpers:Q,integer:Zt,ipAddress:vt,macAddress:bt,maxLength:xt,maxValue:Kt,minLength:Ct,minValue:Xt,not:Gt,numeric:ut,or:zt,required:Z,requiredIf:Rt,requiredUnless:Ot,sameAs:jt,url:Nt},Symbol.toStringTag,{value:"Module"}));function ie(t){return["maxLength","minLength"].includes(t)}function tr(t,r){return{[t]:ge[t](r)}}function rr(t,r,n){return{[t]:Q.withMessage(n,ge[t](r))}}function nr(){return{required:Z}}function ar(t){return{required:Q.withMessage(t,Z)}}function or(t,r){if(ie(t)&&typeof r.message=="string"&&typeof r.value=="number")return rr(t,r.value,r.message);if(ie(t)&&typeof r.message>"u"&&typeof r.value=="number")return tr(t,r.value);if(t==="required"&&typeof r.message=="string")return ar(r.message);if(t==="required"&&typeof r.message>"u")return nr();throw new Error("No valid rule detected")}const sr={key:0,class:"pdap-form-error-message"},he=e.defineComponent({__name:"PdapForm",props:{error:{default:null},id:{},name:{},schema:{}},emits:["submit"],setup(t,{emit:r}){const n=t,a=r,o=e.ref(n.schema.map(p=>{const $={...p};return delete $.validators,$})),s=e.ref(n.schema.reduce((p,$)=>{switch($.type){case x.CHECKBOX:return{...p,[$.name]:String($.defaultChecked)};case x.TEXT:default:return{...p,[$.name]:$.value}}},{})),u=n.schema.reduce((p,$)=>{const h=Object.entries($.validators??{}).reduce((i,[m,f])=>({...i,...or(m,f)}),{});return{...p,[$.name]:{...h}}},{}),c=Qe(u,s,{$autoDirty:!1,$lazy:!0}),l=e.ref(n.error);function d(p,$){s.value[p]=$}e.watchEffect(()=>{n.error?l.value=n.error:l.value&&c.value.$errors.length===0?l.value=null:!l.value&&c.value.$errors.length>0&&(l.value="Please update this form to correct the errors")}),e.watchEffect(()=>{console.debug(`PdapForm ${n.name}
2
- `,{errorMessage:l.value,props:n,values:s,vuelidate:{rules:u,v$:c}})});async function g(p){if(await c.value.$validate()){a("submit",{...s.value}),c.value.$reset(),p.target.reset(),s.value=Object.entries(s.value).reduce((i,[m,f])=>({...i,[m]:["true","false"].includes(f)?f:""}),{});return}}return(p,$)=>(e.openBlock(),e.createElementBlock("form",{class:"pdap-form",onSubmit:$[0]||($[0]=e.withModifiers(h=>g(h),["prevent"]))},[typeof l.value=="string"?(e.openBlock(),e.createElementBlock("div",sr,e.toDisplayString(l.value),1)):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(o.value,h=>{var i,m,f,v;return e.openBlock(),e.createBlock(fe,e.mergeProps(h,{key:h.name,error:(i=e.unref(c)[h.name])!=null&&i.$error?(v=(f=(m=e.unref(c)[h.name])==null?void 0:m.$errors)==null?void 0:f[0])==null?void 0:v.$message:"",value:s.value[h.name],onChange:w=>h.type!==e.unref(x).TEXT?d(h.name,w):void 0,onInput:w=>h.type===e.unref(x).TEXT?d(h.name,w):void 0}),null,16,["error","value","onChange","onInput"])}),128)),e.renderSlot(p.$slots,"default")],32))}});const $e=e.defineComponent({__name:"GridContainer",props:{columns:{default:"auto"},component:{default:"div"},rows:{default:"auto"},templateColumns:{},templateRows:{}},setup(t){const r=t,n=e.reactive({"pdap-grid-container":!0,[`pdap-grid-container-column-${r.columns}`]:r.columns!=="auto"}),a=r.templateRows||typeof r.rows=="number",o=r.templateRows??`repeat(${r.rows}, minmax(0, 1fr))`,s=e.reactive({...a&&{gridTemplateRows:o},...r.templateColumns&&{gridTemplateColumns:r.templateColumns}});return(u,c)=>(e.openBlock(),e.createBlock(e.resolveDynamicComponent(u.component),{class:e.normalizeClass(n),style:e.normalizeStyle(s)},{default:e.withCtx(()=>[e.renderSlot(u.$slots,"default")]),_:3},8,["class","style"]))}});const lr=e.defineComponent({__name:"GridItem",props:{component:{default:"div"},spanColumn:{default:1},spanRow:{default:1}},setup(t){const r=t,n=e.reactive({"pdap-grid-item":!0,[`pdap-grid-item-span-column-${r.spanColumn}`]:r.spanColumn>1}),a=e.reactive({...r.spanRow>1&&{gridRow:`span ${r.spanRow} / span ${r.spanRow}`}});return(o,s)=>(e.openBlock(),e.createBlock(e.resolveDynamicComponent(o.component),{class:e.normalizeClass(n),style:e.normalizeStyle(a)},{default:e.withCtx(()=>[e.renderSlot(o.$slots,"default")]),_:3},8,["class","style"]))}});const ir=e.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 448 512"},[e.createElementVNode("path",{d:"M0 96C0 78.3 14.3 64 32 64H416c17.7 0 32 14.3 32 32s-14.3 32-32 32H32C14.3 128 0 113.7 0 96zM0 256c0-17.7 14.3-32 32-32H416c17.7 0 32 14.3 32 32s-14.3 32-32 32H32c-17.7 0-32-14.3-32-32zM448 416c0 17.7-14.3 32-32 32H32c-17.7 0-32-14.3-32-32s14.3-32 32-32H416c17.7 0 32 14.3 32 32z"})],-1),cr=[ir],ur=["aria-expanded"],dr=["href"],ve=e.defineComponent({__name:"PdapNav",props:{topPosition:{}},setup(t){let r=e.inject("navLinks");typeof r>"u"&&(r=[],console.error(`Hey, PDAP developer
3
- `,"Did you forget to inject some linkData for the Nav component?"));const n=e.reactive({isExpanded:!1,isMobile:!0}),a=e.reactive({"pdap-nav":!0});e.onBeforeMount(()=>{o(),window.addEventListener("resize",o)}),e.onBeforeUnmount(()=>{window.removeEventListener("resize",o)});async function o(){window.innerWidth<=1024?n.isMobile=!0:n.isMobile=!1,await e.nextTick()}async function s(){var c,l;const u=document.querySelector("body");!n.isExpanded&&n.isMobile?(n.isExpanded=!0,u!=null&&u.classList.contains("lock-scroll")||(c=document.querySelector("body"))==null||c.classList.add("lock-scroll")):n.isExpanded&&n.isMobile&&(n.isExpanded=!1,(l=document.querySelector("body"))==null||l.classList.remove("lock-scroll")),await e.nextTick()}return(u,c)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("div",{"aria-controls":"nav",class:"pdap-nav-open-button",role:"button",onClick:s},cr),e.createElementVNode("nav",{id:"nav","aria-expanded":n.isMobile&&n.isExpanded||!n.isMobile,class:e.normalizeClass(a),style:e.normalizeStyle(n.isMobile?{top:`${u.topPosition}px`}:{})},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(r),l=>(e.openBlock(),e.createElementBlock("li",{key:l.text,class:"pdap-nav-link-container"},[l.href?(e.openBlock(),e.createElementBlock("a",{key:0,class:"pdap-nav-link",href:l.href,target:"_blank",referrerpolicy:"no-referrer",onClick:s},e.toDisplayString(l.text),9,dr)):e.createCommentVNode("",!0),l.path?(e.openBlock(),e.createBlock(e.unref(X.RouterLink),{key:1,"active-class":"pdap-nav-link-current","exact-active-class":"pdap-nav-link-current-exact",class:"pdap-nav-link",to:l.path,onClick:s},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(l.text),1)]),_:2},1032,["to"])):e.createCommentVNode("",!0)]))),128))],14,ur)],64))}});const mr=["href"],pr=["src"],fr=["src"],gr=e.defineComponent({__name:"PdapHeader",props:{logoImageSrc:{default:"node_modules/pdap-design-system/dist/images/lockup.svg"},logoImageAnchorPath:{default:"/"}},setup(t){const r=t,n=e.ref(),a=e.ref(null),o=r.logoImageAnchorPath.startsWith("/");e.onMounted(()=>{s(),window.addEventListener("resize",s)}),e.onBeforeUnmount(()=>{window.removeEventListener("resize",s)});function s(){a.value&&(n.value=a.value.offsetHeight)}return(u,c)=>(e.openBlock(),e.createElementBlock("header",{ref_key:"el",ref:a,class:"pdap-header"},[e.unref(o)?(e.openBlock(),e.createBlock(e.unref(X.RouterLink),{key:1,to:u.logoImageAnchorPath,class:"logo"},{default:e.withCtx(()=>[e.createElementVNode("img",{src:u.logoImageSrc,loading:"lazy",width:"250",alt:"Police Data Accessibility Project Logo"},null,8,fr)]),_:1},8,["to"])):(e.openBlock(),e.createElementBlock("a",{key:0,href:u.logoImageAnchorPath,class:"logo"},[e.createElementVNode("img",{src:u.logoImageSrc,loading:"lazy",width:"250",alt:"Police Data Accessibility Project Logo"},null,8,pr)],8,mr)),e.createVNode(ve,{"top-position":n.value},null,8,["top-position"])],512))}});const hr=e.createElementVNode("h2",{class:"mt-0"},"Search our database",-1),$r=e.createElementVNode("p",{class:"pb-4 md:pb-8"},[e.createTextVNode(" If you have a question to answer, we may already know about helpful data in your area. "),e.createElementVNode("a",{href:"https://pdap.io/data"},"Learn more about the data here.")],-1),vr=e.defineComponent({__name:"QuickSearchForm",props:{baseUrlForRedirect:{default:"https://data-sources.pdap.io"}},setup(t){const r=X.useRouter(),n=t,a=[{id:"search-term",name:"searchTerm",label:"What are you looking for?",type:x.TEXT,placeholder:"Enter a keyword, or 'all'",value:""},{id:"location",name:"location",label:"From where?",type:x.TEXT,placeholder:"Enter a place, or 'all'",value:""}],o=e.ref(void 0);function s(u){if(Object.values(u).every(d=>!d)){o.value="Either a search term or a location is required.";return}let{location:c,searchTerm:l}=u;c=c&&c.length>0?c:"all",l=l&&l.length>0?l:"all",r.getRoutes().some(d=>d.path.includes("/search/"))?r.push(`/search/${l}/${c}`):window.location.assign(`${n.baseUrlForRedirect}/search/${l}/${c}`)}return(u,c)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createVNode(I,{class:"p-0"},{default:e.withCtx(()=>[hr,$r]),_:1}),e.createVNode(I,{alignment:"center",class:"pdap-quick-search-form h-full max-h-[75-vh] justify-start p-0"},{default:e.withCtx(()=>[e.createVNode(he,{id:"quick-search-form",class:"flex flex-wrap gap-x-4",error:o.value,schema:a,name:"quickSearchForm",onSubmit:s},{default:e.withCtx(()=>[e.createVNode(ce,{type:"submit",class:"flex-grow-0 flex-shrink-0 basis-full max-w-[unset] mt-4"},{default:e.withCtx(()=>[e.createTextVNode("Search Data Sources")]),_:1})]),_:1},8,["error"])]),_:1})],64))}});const yr=["alt","src"],_r=e.defineComponent({__name:"TileIcon",props:{imgAltText:{},imgSrc:{}},setup(t){return(r,n)=>(e.openBlock(),e.createElementBlock("img",{class:"pdap-tile-icon",alt:r.imgAltText,src:r.imgSrc},null,8,yr))}});const br={content:["./src/**/*.vue","./src/**/*.css"],theme:{extend:{colors:{brand:{blue:{light:"rgba(var(--color-brand-blue-light)/<alpha-value>)",medium:"rgba(var(--color-brand-blue-medium)/<alpha-value>)"},gold:"rgba(var(--color-brand-gold)/<alpha-value>)",wine:"rgba(var(--color-brand-wine)/<alpha-value>)"},neutral:{50:"rgba(var(--color-neutral-50)/<alpha-value>)",100:"rgba(var(--color-neutral-100)/<alpha-value>)",200:"rgba(var(--color-neutral-200)/<alpha-value>)",300:"rgba(var(--color-neutral-300)/<alpha-value>)",400:"rgba(var(--color-neutral-400)/<alpha-value>)",500:"rgba(var(--color-neutral-500)/<alpha-value>)",600:"rgba(var(--color-neutral-600)/<alpha-value>)",700:"rgba(var(--color-neutral-700)/<alpha-value>)",800:"rgba(var(--color-neutral-800)/<alpha-value>)",900:"rgba(var(--color-neutral-900)/<alpha-value>)",950:"rgba(var(--color-neutral-950)/<alpha-value>)"}},brightness:{85:".85"},maxWidth:{"4xl":"59rem"},screens:{xs:"500px"}},fontFamily:{sans:['"Libre Franklin"',"ui-sans-serif","system-ui","-apple-system","BlinkMacSystemFont",'"Segoe UI"',"Roboto","Oxygen","Ubuntu","Cantarell",'"Fira Sans"','"Droid Sans"','"Helvetica Neue"',"sans-serif"],serif:["ui-serif","Georgia"],mono:['"Source Code Pro"',"monospace","ui-monospace","SFMono-Regular"]},fontSize:{xs:"0.75rem",sm:"0.875rem",med:"1rem",lg:"1.125rem",xl:"1.25rem","2xl":"1.5rem","3xl":"1.75rem","4xl":"2rem","5xl":"2.625rem","6xl":"3rem"}}},wr=Object.freeze(Object.defineProperty({__proto__:null,default:br},Symbol.toStringTag,{value:"Module"}));exports.Button=ce;exports.FlexContainer=I;exports.Footer=Ie;exports.Form=he;exports.GridContainer=$e;exports.GridItem=lr;exports.Header=gr;exports.Input=fe;exports.Nav=ve;exports.PdapInputTypes=x;exports.QuickSearchForm=vr;exports.TileIcon=_r;exports.tailwindConfig=wr;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),X=require("vue-router"),ce=e.defineComponent({__name:"PdapButton",props:{intent:{default:"primary"},isLoading:{type:Boolean,default:!1}},setup(t){const r=t,n=e.reactive({"pdap-button":!0,[`pdap-button-${r.intent}`]:!!r.intent,"pdap-button-loading":r.isLoading});return(a,o)=>(e.openBlock(),e.createElementBlock("button",{class:e.normalizeClass(n)},[e.renderSlot(a.$slots,"default")],2))}});const I=e.defineComponent({__name:"FlexContainer",props:{alignment:{default:"start"},component:{default:"div"}},setup(t){const r=t,n=e.reactive({"pdap-flex-container":!0,[`pdap-flex-container-${r.alignment}`]:!0});return(a,o)=>(e.openBlock(),e.createBlock(e.resolveDynamicComponent(a.component),{class:e.normalizeClass(n)},{default:e.withCtx(()=>[e.renderSlot(a.$slots,"default")]),_:3},8,["class"]))}});const ke={class:"pdap-footer"},Re={class:"pdap-footer-social-links"},Ve=["href"],Oe={class:"pdap-footer-copyright"},Be=e.createElementVNode("br",null,null,-1),je=e.createElementVNode("p",{class:"pdap-footer-copyright"},[e.createTextVNode(" PDAP is a non-profit. EIN: 85-4207132. "),e.createElementVNode("a",{href:"https://docs.pdap.io/meta/policy/pdap-privacy-policy",alt:"Privacy Policy",target:"_blank"},[e.createElementVNode("br"),e.createTextVNode(" Privacy Policy "),e.createElementVNode("i",{class:"fa fa-external-link"})]),e.createElementVNode("br"),e.createElementVNode("a",{href:"mailto:contact@pdap.io"},"contact@pdap.io")],-1),Te={class:"pdap-footer-widget-links"},Se=e.createElementVNode("a",{href:"https://www.guidestar.org/profile/85-4207132",target:"_blank"},[e.createElementVNode("img",{src:"https://widgets.guidestar.org/gximage2?o=9973356&l=v4"})],-1),Ne=["href"],Ae=["src"],Ie=["src"],Le=e.defineComponent({__name:"PdapFooter",props:{logoImageSrc:{default:"node_modules/pdap-design-system/dist/images/acronym.svg"},logoImageAnchorPath:{default:"/"}},setup(t){const r=t,n=e.inject("footerLinks",[{href:"https://github.com/orgs/Police-Data-Accessibility-Project",text:"Github"},{href:"https://discord.gg/wMqex8nKZJ",text:"Discord"},{href:"https://www.linkedin.com/company/pdap",text:"LinkedIn"},{path:"/jobs",text:"Jobs"}]),a=r.logoImageAnchorPath.startsWith("/");return(o,s)=>{const u=e.resolveComponent("router-link");return e.openBlock(),e.createElementBlock("footer",ke,[e.createVNode(I,{alignment:"center"},{default:e.withCtx(()=>[e.createElementVNode("ul",Re,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(n),c=>(e.openBlock(),e.createElementBlock("li",{key:c.text,class:"pdap-footer-link-container"},[c.href?(e.openBlock(),e.createElementBlock("a",{key:0,class:"pdap-footer-social-link",href:c.href,target:"_blank",referrerpolicy:"no-referrer"},e.toDisplayString(c.text),9,Ve)):e.createCommentVNode("",!0),c.path?(e.openBlock(),e.createBlock(u,{key:1,"active-class":"pdap-footer-social-link-current","exact-active-class":"pdap-footer-social-link-current-exact",class:"pdap-footer-social-link",to:c.path},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(c.text),1)]),_:2},1032,["to"])):e.createCommentVNode("",!0)]))),128))]),e.createElementVNode("p",Oe,[e.createTextVNode(" © "+e.toDisplayString(new Date().getFullYear())+" Police Data Accessibility Project",1),Be]),je,e.createElementVNode("div",Te,[Se,e.unref(a)?(e.openBlock(),e.createBlock(u,{key:1,to:o.logoImageAnchorPath,class:"pdap-footer-logo"},{default:e.withCtx(()=>[e.createElementVNode("img",{src:o.logoImageSrc,loading:"lazy",width:"250",alt:"Police Data Accessibility Project Logo"},null,8,Ie)]),_:1},8,["to"])):(e.openBlock(),e.createElementBlock("a",{key:0,href:o.logoImageAnchorPath,class:"pdap-footer-logo"},[e.createElementVNode("img",{src:o.logoImageSrc,loading:"lazy",width:"250",alt:"Police Data Accessibility Project Logo"},null,8,Ae)],8,Ne))])]),_:1})])}}});function Y(t,r){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);r&&(a=a.filter(function(o){return Object.getOwnPropertyDescriptor(t,o).enumerable})),n.push.apply(n,a)}return n}function P(t){for(var r=1;r<arguments.length;r++){var n=arguments[r]!=null?arguments[r]:{};r%2?Y(Object(n),!0).forEach(function(a){ze(t,a,n[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Y(Object(n)).forEach(function(a){Object.defineProperty(t,a,Object.getOwnPropertyDescriptor(n,a))})}return t}function ze(t,r,n){return r in t?Object.defineProperty(t,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[r]=n,t}function ee(t){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[];return Object.keys(t).reduce((n,a)=>(r.includes(a)||(n[a]=e.unref(t[a])),n),{})}function L(t){return typeof t=="function"}function De(t){return e.isReactive(t)||e.isReadonly(t)}function ue(t,r,n){let a=t;const o=r.split(".");for(let s=0;s<o.length;s++){if(!a[o[s]])return n;a=a[o[s]]}return a}function G(t,r,n){return e.computed(()=>t.some(a=>ue(r,a,{[n]:!1})[n]))}function te(t,r,n){return e.computed(()=>t.reduce((a,o)=>{const s=ue(r,o,{[n]:!1})[n]||[];return a.concat(s)},[]))}function de(t,r,n,a){return t.call(a,e.unref(r),e.unref(n),a)}function me(t){return t.$valid!==void 0?!t.$valid:!t}function Fe(t,r,n,a,o,s,u){let{$lazy:c,$rewardEarly:l}=o,d=arguments.length>7&&arguments[7]!==void 0?arguments[7]:[],g=arguments.length>8?arguments[8]:void 0,p=arguments.length>9?arguments[9]:void 0,$=arguments.length>10?arguments[10]:void 0;const h=e.ref(!!a.value),i=e.ref(0);n.value=!1;const m=e.watch([r,a].concat(d,$),()=>{if(c&&!a.value||l&&!p.value&&!n.value)return;let f;try{f=de(t,r,g,u)}catch(v){f=Promise.reject(v)}i.value++,n.value=!!i.value,h.value=!1,Promise.resolve(f).then(v=>{i.value--,n.value=!!i.value,s.value=v,h.value=me(v)}).catch(v=>{i.value--,n.value=!!i.value,s.value=v,h.value=!0})},{immediate:!0,deep:typeof r=="object"});return{$invalid:h,$unwatch:m}}function Me(t,r,n,a,o,s,u,c){let{$lazy:l,$rewardEarly:d}=a;const g=()=>({}),p=e.computed(()=>{if(l&&!n.value||d&&!c.value)return!1;let $=!0;try{const h=de(t,r,u,s);o.value=h,$=me(h)}catch(h){o.value=h}return $});return{$unwatch:g,$invalid:p}}function qe(t,r,n,a,o,s,u,c,l,d,g){const p=e.ref(!1),$=t.$params||{},h=e.ref(null);let i,m;t.$async?{$invalid:i,$unwatch:m}=Fe(t.$validator,r,p,n,a,h,o,t.$watchTargets,l,d,g):{$invalid:i,$unwatch:m}=Me(t.$validator,r,n,a,h,o,l,d);const f=t.$message;return{$message:L(f)?e.computed(()=>f(ee({$pending:p,$invalid:i,$params:ee($),$model:r,$response:h,$validator:s,$propertyPath:c,$property:u}))):f||"",$params:$,$pending:p,$invalid:i,$response:h,$unwatch:m}}function He(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};const r=e.unref(t),n=Object.keys(r),a={},o={},s={};let u=null;return n.forEach(c=>{const l=r[c];switch(!0){case L(l.$validator):a[c]=l;break;case L(l):a[c]={$validator:l};break;case c==="$validationGroups":u=l;break;case c.startsWith("$"):s[c]=l;break;default:o[c]=l}}),{rules:a,nestedValidators:o,config:s,validationGroups:u}}const Ge="__root";function Ue(t,r,n,a,o,s,u,c,l){const d=Object.keys(t),g=a.get(o,t),p=e.ref(!1),$=e.ref(!1),h=e.ref(0);if(g){if(!g.$partial)return g;g.$unwatch(),p.value=g.$dirty.value}const i={$dirty:p,$path:o,$touch:()=>{p.value||(p.value=!0)},$reset:()=>{p.value&&(p.value=!1)},$commit:()=>{}};return d.length?(d.forEach(m=>{i[m]=qe(t[m],r,i.$dirty,s,u,m,n,o,l,$,h)}),i.$externalResults=e.computed(()=>c.value?[].concat(c.value).map((m,f)=>({$propertyPath:o,$property:n,$validator:"$externalResults",$uid:`${o}-externalResult-${f}`,$message:m,$params:{},$response:null,$pending:!1})):[]),i.$invalid=e.computed(()=>{const m=d.some(f=>e.unref(i[f].$invalid));return $.value=m,!!i.$externalResults.value.length||m}),i.$pending=e.computed(()=>d.some(m=>e.unref(i[m].$pending))),i.$error=e.computed(()=>i.$dirty.value?i.$pending.value||i.$invalid.value:!1),i.$silentErrors=e.computed(()=>d.filter(m=>e.unref(i[m].$invalid)).map(m=>{const f=i[m];return e.reactive({$propertyPath:o,$property:n,$validator:m,$uid:`${o}-${m}`,$message:f.$message,$params:f.$params,$response:f.$response,$pending:f.$pending})}).concat(i.$externalResults.value)),i.$errors=e.computed(()=>i.$dirty.value?i.$silentErrors.value:[]),i.$unwatch=()=>d.forEach(m=>{i[m].$unwatch()}),i.$commit=()=>{$.value=!0,h.value=Date.now()},a.set(o,t,i),i):(g&&a.set(o,t,i),i)}function Xe(t,r,n,a,o,s,u){const c=Object.keys(t);return c.length?c.reduce((l,d)=>(l[d]=U({validations:t[d],state:r,key:d,parentKey:n,resultsCache:a,globalConfig:o,instance:s,externalResults:u}),l),{}):{}}function We(t,r,n){const a=e.computed(()=>[r,n].filter(i=>i).reduce((i,m)=>i.concat(Object.values(e.unref(m))),[])),o=e.computed({get(){return t.$dirty.value||(a.value.length?a.value.every(i=>i.$dirty):!1)},set(i){t.$dirty.value=i}}),s=e.computed(()=>{const i=e.unref(t.$silentErrors)||[],m=a.value.filter(f=>(e.unref(f).$silentErrors||[]).length).reduce((f,v)=>f.concat(...v.$silentErrors),[]);return i.concat(m)}),u=e.computed(()=>{const i=e.unref(t.$errors)||[],m=a.value.filter(f=>(e.unref(f).$errors||[]).length).reduce((f,v)=>f.concat(...v.$errors),[]);return i.concat(m)}),c=e.computed(()=>a.value.some(i=>i.$invalid)||e.unref(t.$invalid)||!1),l=e.computed(()=>a.value.some(i=>e.unref(i.$pending))||e.unref(t.$pending)||!1),d=e.computed(()=>a.value.some(i=>i.$dirty)||a.value.some(i=>i.$anyDirty)||o.value),g=e.computed(()=>o.value?l.value||c.value:!1),p=()=>{t.$touch(),a.value.forEach(i=>{i.$touch()})},$=()=>{t.$commit(),a.value.forEach(i=>{i.$commit()})},h=()=>{t.$reset(),a.value.forEach(i=>{i.$reset()})};return a.value.length&&a.value.every(i=>i.$dirty)&&p(),{$dirty:o,$errors:u,$invalid:c,$anyDirty:d,$error:g,$pending:l,$touch:p,$reset:h,$silentErrors:s,$commit:$}}function U(t){let{validations:r,state:n,key:a,parentKey:o,childResults:s,resultsCache:u,globalConfig:c={},instance:l,externalResults:d}=t;const g=o?`${o}.${a}`:a,{rules:p,nestedValidators:$,config:h,validationGroups:i}=He(r),m=P(P({},c),h),f=a?e.computed(()=>{const y=e.unref(n);return y?e.unref(y[a]):void 0}):n,v=P({},e.unref(d)||{}),b=e.computed(()=>{const y=e.unref(d);return a?y?e.unref(y[a]):void 0:y}),F=Ue(p,f,a,u,g,m,l,b,n),w=Xe($,f,g,u,m,l,b),V={};i&&Object.entries(i).forEach(y=>{let[O,C]=y;V[O]={$invalid:G(C,w,"$invalid"),$error:G(C,w,"$error"),$pending:G(C,w,"$pending"),$errors:te(C,w,"$errors"),$silentErrors:te(C,w,"$silentErrors")}});const{$dirty:E,$errors:N,$invalid:M,$anyDirty:ye,$error:_e,$pending:q,$touch:H,$reset:we,$silentErrors:be,$commit:J}=We(F,w,s),xe=a?e.computed({get:()=>e.unref(f),set:y=>{E.value=!0;const O=e.unref(n),C=e.unref(d);C&&(C[a]=v[a]),e.isRef(O[a])?O[a].value=y:O[a]=y}}):null;a&&m.$autoDirty&&e.watch(f,()=>{E.value||H();const y=e.unref(d);y&&(y[a]=v[a])},{flush:"sync"});async function Ee(){return H(),m.$rewardEarly&&(J(),await e.nextTick()),await e.nextTick(),new Promise(y=>{if(!q.value)return y(!M.value);const O=e.watch(q,()=>{y(!M.value),O()})})}function Ce(y){return(s.value||{})[y]}function Pe(){e.isRef(d)?d.value=v:Object.keys(v).length===0?Object.keys(d).forEach(y=>{delete d[y]}):Object.assign(d,v)}return e.reactive(P(P(P({},F),{},{$model:xe,$dirty:E,$error:_e,$errors:N,$invalid:M,$anyDirty:ye,$pending:q,$touch:H,$reset:we,$path:g||Ge,$silentErrors:be,$validate:Ee,$commit:J},s&&{$getResultsForChild:Ce,$clearExternalResults:Pe,$validationGroups:V}),w))}class Ke{constructor(){this.storage=new Map}set(r,n,a){this.storage.set(r,{rules:n,result:a})}checkRulesValidity(r,n,a){const o=Object.keys(a),s=Object.keys(n);return s.length!==o.length||!s.every(c=>o.includes(c))?!1:s.every(c=>n[c].$params?Object.keys(n[c].$params).every(l=>e.unref(a[c].$params[l])===e.unref(n[c].$params[l])):!0)}get(r,n){const a=this.storage.get(r);if(!a)return;const{rules:o,result:s}=a,u=this.checkRulesValidity(r,n,o),c=s.$unwatch?s.$unwatch:()=>({});return u?s:{$dirty:s.$dirty,$partial:!0,$unwatch:c}}}const A={COLLECT_ALL:!0,COLLECT_NONE:!1},re=Symbol("vuelidate#injectChildResults"),ne=Symbol("vuelidate#removeChildResults");function Qe(t){let{$scope:r,instance:n}=t;const a={},o=e.ref([]),s=e.computed(()=>o.value.reduce((g,p)=>(g[p]=e.unref(a[p]),g),{}));function u(g,p){let{$registerAs:$,$scope:h,$stopPropagation:i}=p;i||r===A.COLLECT_NONE||h===A.COLLECT_NONE||r!==A.COLLECT_ALL&&r!==h||(a[$]=g,o.value.push($))}n.__vuelidateInjectInstances=[].concat(n.__vuelidateInjectInstances||[],u);function c(g){o.value=o.value.filter(p=>p!==g),delete a[g]}n.__vuelidateRemoveInstances=[].concat(n.__vuelidateRemoveInstances||[],c);const l=e.inject(re,[]);e.provide(re,n.__vuelidateInjectInstances);const d=e.inject(ne,[]);return e.provide(ne,n.__vuelidateRemoveInstances),{childResults:s,sendValidationResultsToParent:l,removeValidationResultsFromParent:d}}function pe(t){return new Proxy(t,{get(r,n){return typeof r[n]=="object"?pe(r[n]):e.computed(()=>r[n])}})}let ae=0;function Ze(t,r){var n;let a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};arguments.length===1&&(a=t,t=void 0,r=void 0);let{$registerAs:o,$scope:s=A.COLLECT_ALL,$stopPropagation:u,$externalResults:c,currentVueInstance:l}=a;const d=l||((n=e.getCurrentInstance())===null||n===void 0?void 0:n.proxy),g=d?d.$options:{};o||(ae+=1,o=`_vuelidate_${ae}`);const p=e.ref({}),$=new Ke,{childResults:h,sendValidationResultsToParent:i,removeValidationResultsFromParent:m}=d?Qe({$scope:s,instance:d}):{childResults:e.ref({})};if(!t&&g.validations){const f=g.validations;r=e.ref({}),e.onBeforeMount(()=>{r.value=d,e.watch(()=>L(f)?f.call(r.value,new pe(r.value)):f,v=>{p.value=U({validations:v,state:r,childResults:h,resultsCache:$,globalConfig:a,instance:d,externalResults:c||d.vuelidateExternalResults})},{immediate:!0})}),a=g.validationsConfig||a}else{const f=e.isRef(t)||De(t)?t:e.reactive(t||{});e.watch(f,v=>{p.value=U({validations:v,state:r,childResults:h,resultsCache:$,globalConfig:a,instance:d??{},externalResults:c})},{immediate:!0})}return d&&(i.forEach(f=>f(p,{$registerAs:o,$scope:s,$stopPropagation:u})),e.onBeforeUnmount(()=>m.forEach(f=>f(o)))),e.computed(()=>P(P({},e.unref(p.value)),h.value))}var x=(t=>(t.CHECKBOX="checkbox",t.TEXT="text",t))(x||{});const Je=["id","name","placeholder","value"],Ye=["id","name","checked","value"],et=["id"],tt=["for"],fe=e.defineComponent({__name:"PdapInput",props:{error:{},id:{},label:{},name:{},placeholder:{},type:{},value:{},defaultChecked:{type:Boolean}},emits:["change","input"],setup(t,{emit:r}){const n=t,a=r,o=()=>{u.value=!u.value,a("change",u.value.toString())},s=l=>{a("input",l.target.value)},u=e.ref(n.defaultChecked),c=e.computed(()=>`pdap-${n.name}-input-error`);return(l,d)=>{var g;return e.openBlock(),e.createBlock(e.unref($e),{class:e.normalizeClass({"pdap-input":!0,"pdap-input-error":Number((g=l.error)==null?void 0:g.length)>=1})},{default:e.withCtx(()=>[l.type===e.unref(x).TEXT?(e.openBlock(),e.createElementBlock("input",e.mergeProps({key:0,id:l.id,type:"text",name:l.name,placeholder:l.placeholder,value:l.value},l.$attrs,{onInput:s}),null,16,Je)):l.type===e.unref(x).CHECKBOX?(e.openBlock(),e.createElementBlock("input",e.mergeProps({key:1,id:l.id,class:"pdap-input-checkbox",name:l.name,checked:u.value,type:"checkbox",value:l.value},l.$attrs,{onChange:o}),null,16,Ye)):e.createCommentVNode("",!0),l.error?(e.openBlock(),e.createElementBlock("div",{key:2,id:c.value,class:"pdap-input-error-message"},e.toDisplayString(l.error),9,et)):e.createCommentVNode("",!0),e.createElementVNode("label",{class:"pdap-input-label",for:l.id},e.toDisplayString(l.label),9,tt)]),_:1},8,["class"])}}});function oe(t,r){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);r&&(a=a.filter(function(o){return Object.getOwnPropertyDescriptor(t,o).enumerable})),n.push.apply(n,a)}return n}function j(t){for(var r=1;r<arguments.length;r++){var n=arguments[r]!=null?arguments[r]:{};r%2?oe(Object(n),!0).forEach(function(a){rt(t,a,n[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):oe(Object(n)).forEach(function(a){Object.defineProperty(t,a,Object.getOwnPropertyDescriptor(n,a))})}return t}function rt(t,r,n){return r in t?Object.defineProperty(t,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[r]=n,t}function T(t){return typeof t=="function"}function z(t){return t!==null&&typeof t=="object"&&!Array.isArray(t)}function D(t){return T(t.$validator)?j({},t):{$validator:t}}function nt(t){return z(t)&&T(t.then)}function k(t){return typeof t=="object"?t.$valid:t}function B(t){return t.$validator||t}function W(t,r){if(!z(t))throw new Error(`[@vuelidate/validators]: First parameter to "withParams" should be an object, provided ${typeof t}`);if(!z(r)&&!T(r))throw new Error("[@vuelidate/validators]: Validator must be a function or object with $validator parameter");const n=D(r);return n.$params=j(j({},n.$params||{}),t),n}function S(t,r){if(!T(t)&&typeof e.unref(t)!="string")throw new Error(`[@vuelidate/validators]: First parameter to "withMessage" should be string or a function returning a string, provided ${typeof t}`);if(!z(r)&&!T(r))throw new Error("[@vuelidate/validators]: Validator must be a function or object with $validator parameter");const n=D(r);return n.$message=t,n}function at(t){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[];const n=D(t);return j(j({},n),{},{$async:!0,$watchTargets:r})}function ot(t){return{$validator(r){for(var n=arguments.length,a=new Array(n>1?n-1:0),o=1;o<n;o++)a[o-1]=arguments[o];return e.unref(r).reduce((s,u,c)=>{const l=Object.entries(u).reduce((d,g)=>{let[p,$]=g;const h=t[p]||{},i=Object.entries(h).reduce((m,f)=>{let[v,b]=f;const w=B(b).call(this,$,u,c,...a),V=k(w);if(m.$data[v]=w,m.$data.$invalid=!V||!!m.$data.$invalid,m.$data.$error=m.$data.$invalid,!V){let E=b.$message||"";const N=b.$params||{};typeof E=="function"&&(E=E({$pending:!1,$invalid:!V,$params:N,$model:$,$response:w})),m.$errors.push({$property:p,$message:E,$params:N,$response:w,$model:$,$pending:!1,$validator:v})}return{$valid:m.$valid&&V,$data:m.$data,$errors:m.$errors}},{$valid:!0,$data:{},$errors:[]});return d.$data[p]=i.$data,d.$errors[p]=i.$errors,{$valid:d.$valid&&i.$valid,$data:d.$data,$errors:d.$errors}},{$valid:!0,$data:{},$errors:{}});return{$valid:s.$valid&&l.$valid,$data:s.$data.concat(l.$data),$errors:s.$errors.concat(l.$errors)}},{$valid:!0,$data:[],$errors:[]})},$message:r=>{let{$response:n}=r;return n?n.$errors.map(a=>Object.values(a).map(o=>o.map(s=>s.$message)).reduce((o,s)=>o.concat(s),[])):[]}}}const _=t=>{if(t=e.unref(t),Array.isArray(t))return!!t.length;if(t==null)return!1;if(t===!1)return!0;if(t instanceof Date)return!isNaN(t.getTime());if(typeof t=="object"){for(let r in t)return!0;return!1}return!!String(t).length},K=t=>(t=e.unref(t),Array.isArray(t)?t.length:typeof t=="object"?Object.keys(t).length:String(t).length);function R(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return a=>(a=e.unref(a),!_(a)||r.every(o=>(o.lastIndex=0,o.test(a))))}var Q=Object.freeze({__proto__:null,forEach:ot,len:K,normalizeValidatorObject:D,regex:R,req:_,unwrap:e.unref,unwrapNormalizedValidator:B,unwrapValidatorResponse:k,withAsync:at,withMessage:S,withParams:W}),st=R(/^[a-zA-Z]*$/),lt={$validator:st,$message:"The value is not alphabetical",$params:{type:"alpha"}},it=R(/^[a-zA-Z0-9]*$/),ct={$validator:it,$message:"The value must be alpha-numeric",$params:{type:"alphaNum"}},ut=R(/^\d*(\.\d+)?$/),dt={$validator:ut,$message:"Value must be numeric",$params:{type:"numeric"}};function mt(t,r){return n=>!_(n)||(!/\s/.test(n)||n instanceof Date)&&+e.unref(t)<=+n&&+e.unref(r)>=+n}function pt(t,r){return{$validator:mt(t,r),$message:n=>{let{$params:a}=n;return`The value must be between ${a.min} and ${a.max}`},$params:{min:t,max:r,type:"between"}}}const ft=/^(?:[A-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[A-z0-9!#$%&'*+/=?^_`{|}~-]+)*|"(?:[\x01-\x08\x0b\x0c\x0e-\x1f\x21\x23-\x5b\x5d-\x7f]|[\x01-\x09\x0b\x0c\x0e-\x7f])*")@(?:(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9]{2,}(?:[a-z0-9-]*[a-z0-9])?|\[(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?|[a-z0-9-]*[a-z0-9]:(?:[\x01-\x08\x0b\x0c\x0e-\x1f\x21-\x5a\x53-\x7f]|\\[\x01-\x09\x0b\x0c\x0e-\x7f])+)\])$/i;var gt=R(ft),ht={$validator:gt,$message:"Value is not a valid email address",$params:{type:"email"}};function $t(t){if(!_(t))return!0;if(typeof t!="string")return!1;const r=t.split(".");return r.length===4&&r.every(vt)}const vt=t=>{if(t.length>3||t.length===0||t[0]==="0"&&t!=="0"||!t.match(/^\d+$/))return!1;const r=+t|0;return r>=0&&r<=255};var yt={$validator:$t,$message:"The value is not a valid IP address",$params:{type:"ipAddress"}};function _t(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:":";return r=>{if(t=e.unref(t),!_(r))return!0;if(typeof r!="string")return!1;const n=typeof t=="string"&&t!==""?r.split(t):r.length===12||r.length===16?r.match(/.{2}/g):null;return n!==null&&(n.length===6||n.length===8)&&n.every(wt)}}const wt=t=>t.toLowerCase().match(/^[0-9a-f]{2}$/);function bt(t){return{$validator:_t(t),$message:"The value is not a valid MAC Address",$params:{type:"macAddress"}}}function xt(t){return r=>!_(r)||K(r)<=e.unref(t)}function Et(t){return{$validator:xt(t),$message:r=>{let{$params:n}=r;return`The maximum length allowed is ${n.max}`},$params:{max:t,type:"maxLength"}}}function Ct(t){return r=>!_(r)||K(r)>=e.unref(t)}function Pt(t){return{$validator:Ct(t),$message:r=>{let{$params:n}=r;return`This field should be at least ${n.min} characters long`},$params:{min:t,type:"minLength"}}}function kt(t){return typeof t=="string"&&(t=t.trim()),_(t)}var Z={$validator:kt,$message:"Value is required",$params:{type:"required"}};const se=(t,r)=>t?_(typeof r=="string"?r.trim():r):!0;function Rt(t){return function(r,n){if(typeof t!="function")return se(e.unref(t),r);const a=t.call(this,r,n);return se(a,r)}}function Vt(t){return{$validator:Rt(t),$message:"The value is required",$params:{type:"requiredIf",prop:t}}}const le=(t,r)=>t?!0:_(typeof r=="string"?r.trim():r);function Ot(t){return function(r,n){if(typeof t!="function")return le(e.unref(t),r);const a=t.call(this,r,n);return le(a,r)}}function Bt(t){return{$validator:Ot(t),$message:"The value is required",$params:{type:"requiredUnless",prop:t}}}function jt(t){return r=>e.unref(r)===e.unref(t)}function Tt(t){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"other";return{$validator:jt(t),$message:n=>`The value must be equal to the ${r} value`,$params:{equalTo:t,otherName:r,type:"sameAs"}}}const St=/^(?:(?:(?:https?|ftp):)?\/\/)(?:\S+(?::\S*)?@)?(?:(?!(?:10|127)(?:\.\d{1,3}){3})(?!(?:169\.254|192\.168)(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z0-9\u00a1-\uffff][a-z0-9\u00a1-\uffff_-]{0,62})?[a-z0-9\u00a1-\uffff]\.)+(?:[a-z\u00a1-\uffff]{2,}\.?))(?::\d{2,5})?(?:[/?#]\S*)?$/i;var Nt=R(St),At={$validator:Nt,$message:"The value is not a valid URL address",$params:{type:"url"}};function It(t){return function(){for(var r=arguments.length,n=new Array(r),a=0;a<r;a++)n[a]=arguments[a];return t.reduce((o,s)=>k(o)?o:B(s).apply(this,n),!1)}}function Lt(t){return function(){for(var r=arguments.length,n=new Array(r),a=0;a<r;a++)n[a]=arguments[a];return t.reduce(async(o,s)=>{const u=await o;return k(u)?u:B(s).apply(this,n)},Promise.resolve(!1))}}function zt(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];const a=r.some(u=>u.$async),o=r.reduce((u,c)=>c.$watchTargets?u.concat(c.$watchTargets):u,[]);let s=()=>!1;return r.length&&(s=a?Lt(r):It(r)),{$async:a,$validator:s,$watchTargets:o}}function Dt(){return W({type:"or"},S("The value does not match any of the provided validators",zt(...arguments)))}function Ft(t){return function(){for(var r=arguments.length,n=new Array(r),a=0;a<r;a++)n[a]=arguments[a];return t.reduce((o,s)=>k(o)?B(s).apply(this,n):o,!0)}}function Mt(t){return function(){for(var r=arguments.length,n=new Array(r),a=0;a<r;a++)n[a]=arguments[a];return t.reduce(async(o,s)=>{const u=await o;return k(u)?B(s).apply(this,n):u},Promise.resolve(!0))}}function qt(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];const a=r.some(u=>u.$async),o=r.reduce((u,c)=>c.$watchTargets?u.concat(c.$watchTargets):u,[]);let s=()=>!1;return r.length&&(s=a?Mt(r):Ft(r)),{$async:a,$validator:s,$watchTargets:o}}function Ht(){return W({type:"and"},S("The value does not match all of the provided validators",qt(...arguments)))}function Gt(t){return function(r,n){if(!_(r))return!0;const a=B(t).call(this,r,n);return nt(a)?a.then(o=>!k(o)):!k(a)}}function Ut(t){return{$validator:Gt(t),$message:"The value does not match the provided validator",$params:{type:"not"}}}function Xt(t){return r=>!_(r)||(!/\s/.test(r)||r instanceof Date)&&+r>=+e.unref(t)}function Wt(t){return{$validator:Xt(t),$message:r=>{let{$params:n}=r;return`The minimum value allowed is ${n.min}`},$params:{min:t,type:"minValue"}}}function Kt(t){return r=>!_(r)||(!/\s/.test(r)||r instanceof Date)&&+r<=+e.unref(t)}var Qt=t=>({$validator:Kt(t),$message:r=>{let{$params:n}=r;return`The maximum value allowed is ${n.max}`},$params:{max:t,type:"maxValue"}}),Zt=R(/(^[0-9]*$)|(^-[0-9]+$)/),Jt={$validator:Zt,$message:"Value is not an integer",$params:{type:"integer"}},Yt=R(/^[-]?\d*(\.\d+)?$/),er={$validator:Yt,$message:"Value must be decimal",$params:{type:"decimal"}};function tr(t){let{t:r,messagePath:n=o=>{let{$validator:s}=o;return`validations.${s}`},messageParams:a=o=>o}=t;return function(s){let{withArguments:u=!1,messagePath:c=n,messageParams:l=a}=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};function d(g){return r(c(g),l(j({model:g.$model,property:g.$property,pending:g.$pending,invalid:g.$invalid,response:g.$response,validator:g.$validator,propertyPath:g.$propertyPath},g.$params)))}return u&&typeof s=="function"?function(){return S(d,s(...arguments))}:S(d,s)}}const ge=Object.freeze(Object.defineProperty({__proto__:null,alpha:lt,alphaNum:ct,and:Ht,between:pt,createI18nMessage:tr,decimal:er,email:ht,helpers:Q,integer:Jt,ipAddress:yt,macAddress:bt,maxLength:Et,maxValue:Qt,minLength:Pt,minValue:Wt,not:Ut,numeric:dt,or:Dt,required:Z,requiredIf:Vt,requiredUnless:Bt,sameAs:Tt,url:At},Symbol.toStringTag,{value:"Module"}));function ie(t){return["maxLength","minLength"].includes(t)}function rr(t,r){return{[t]:ge[t](r)}}function nr(t,r,n){return{[t]:Q.withMessage(n,ge[t](r))}}function ar(){return{required:Z}}function or(t){return{required:Q.withMessage(t,Z)}}function sr(t,r){if(ie(t)&&typeof r.message=="string"&&typeof r.value=="number")return nr(t,r.value,r.message);if(ie(t)&&typeof r.message>"u"&&typeof r.value=="number")return rr(t,r.value);if(t==="required"&&typeof r.message=="string")return or(r.message);if(t==="required"&&typeof r.message>"u")return ar();throw new Error("No valid rule detected")}const lr={key:0,class:"pdap-form-error-message"},he=e.defineComponent({__name:"PdapForm",props:{error:{default:null},id:{},name:{},schema:{}},emits:["submit"],setup(t,{emit:r}){const n=t,a=r,o=e.ref(n.schema.map(p=>{const $={...p};return delete $.validators,$})),s=e.ref(n.schema.reduce((p,$)=>{switch($.type){case x.CHECKBOX:return{...p,[$.name]:String($.defaultChecked)};case x.TEXT:default:return{...p,[$.name]:$.value}}},{})),u=n.schema.reduce((p,$)=>{const h=Object.entries($.validators??{}).reduce((i,[m,f])=>({...i,...sr(m,f)}),{});return{...p,[$.name]:{...h}}},{}),c=Ze(u,s,{$autoDirty:!1,$lazy:!0}),l=e.ref(n.error);function d(p,$){s.value[p]=$}e.watchEffect(()=>{n.error?l.value=n.error:l.value&&c.value.$errors.length===0?l.value=null:!l.value&&c.value.$errors.length>0&&(l.value="Please update this form to correct the errors")}),e.watchEffect(()=>{console.debug(`PdapForm ${n.name}
2
+ `,{errorMessage:l.value,props:n,values:s,vuelidate:{rules:u,v$:c}})});async function g(p){if(await c.value.$validate()){a("submit",{...s.value}),c.value.$reset(),p.target.reset(),s.value=Object.entries(s.value).reduce((i,[m,f])=>({...i,[m]:["true","false"].includes(f)?f:""}),{});return}}return(p,$)=>(e.openBlock(),e.createElementBlock("form",{class:"pdap-form",onSubmit:$[0]||($[0]=e.withModifiers(h=>g(h),["prevent"]))},[typeof l.value=="string"?(e.openBlock(),e.createElementBlock("div",lr,e.toDisplayString(l.value),1)):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(o.value,h=>{var i,m,f,v;return e.openBlock(),e.createBlock(fe,e.mergeProps(h,{key:h.name,error:(i=e.unref(c)[h.name])!=null&&i.$error?(v=(f=(m=e.unref(c)[h.name])==null?void 0:m.$errors)==null?void 0:f[0])==null?void 0:v.$message:"",value:s.value[h.name],onChange:b=>h.type!==e.unref(x).TEXT?d(h.name,b):void 0,onInput:b=>h.type===e.unref(x).TEXT?d(h.name,b):void 0}),null,16,["error","value","onChange","onInput"])}),128)),e.renderSlot(p.$slots,"default")],32))}});const $e=e.defineComponent({__name:"GridContainer",props:{columns:{default:"auto"},component:{default:"div"},rows:{default:"auto"},templateColumns:{},templateRows:{}},setup(t){const r=t,n=e.reactive({"pdap-grid-container":!0,[`pdap-grid-container-column-${r.columns}`]:r.columns!=="auto"}),a=r.templateRows||typeof r.rows=="number",o=r.templateRows??`repeat(${r.rows}, minmax(0, 1fr))`,s=e.reactive({...a&&{gridTemplateRows:o},...r.templateColumns&&{gridTemplateColumns:r.templateColumns}});return(u,c)=>(e.openBlock(),e.createBlock(e.resolveDynamicComponent(u.component),{class:e.normalizeClass(n),style:e.normalizeStyle(s)},{default:e.withCtx(()=>[e.renderSlot(u.$slots,"default")]),_:3},8,["class","style"]))}});const ir=e.defineComponent({__name:"GridItem",props:{component:{default:"div"},spanColumn:{default:1},spanRow:{default:1}},setup(t){const r=t,n=e.reactive({"pdap-grid-item":!0,[`pdap-grid-item-span-column-${r.spanColumn}`]:r.spanColumn>1}),a=e.reactive({...r.spanRow>1&&{gridRow:`span ${r.spanRow} / span ${r.spanRow}`}});return(o,s)=>(e.openBlock(),e.createBlock(e.resolveDynamicComponent(o.component),{class:e.normalizeClass(n),style:e.normalizeStyle(a)},{default:e.withCtx(()=>[e.renderSlot(o.$slots,"default")]),_:3},8,["class","style"]))}});const cr=e.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 448 512"},[e.createElementVNode("path",{d:"M0 96C0 78.3 14.3 64 32 64H416c17.7 0 32 14.3 32 32s-14.3 32-32 32H32C14.3 128 0 113.7 0 96zM0 256c0-17.7 14.3-32 32-32H416c17.7 0 32 14.3 32 32s-14.3 32-32 32H32c-17.7 0-32-14.3-32-32zM448 416c0 17.7-14.3 32-32 32H32c-17.7 0-32-14.3-32-32s14.3-32 32-32H416c17.7 0 32 14.3 32 32z"})],-1),ur=[cr],dr=["aria-expanded"],mr=["href"],ve=e.defineComponent({__name:"PdapNav",props:{topPosition:{}},setup(t){let r=e.inject("navLinks");typeof r>"u"&&(r=[],console.error(`Hey, PDAP developer
3
+ `,"Did you forget to inject some linkData for the Nav component?"));const n=e.reactive({isExpanded:!1,isMobile:!0}),a=e.reactive({"pdap-nav":!0});e.onBeforeMount(()=>{o(),window.addEventListener("resize",o)}),e.onBeforeUnmount(()=>{window.removeEventListener("resize",o)});async function o(){window.innerWidth<=1024?n.isMobile=!0:n.isMobile=!1,await e.nextTick()}async function s(){var c,l;const u=document.querySelector("body");!n.isExpanded&&n.isMobile?(n.isExpanded=!0,u!=null&&u.classList.contains("lock-scroll")||(c=document.querySelector("body"))==null||c.classList.add("lock-scroll")):n.isExpanded&&n.isMobile&&(n.isExpanded=!1,(l=document.querySelector("body"))==null||l.classList.remove("lock-scroll")),await e.nextTick()}return(u,c)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("div",{"aria-controls":"nav",class:"pdap-nav-open-button",role:"button",onClick:s},ur),e.createElementVNode("nav",{id:"nav","aria-expanded":n.isMobile&&n.isExpanded||!n.isMobile,class:e.normalizeClass(a),style:e.normalizeStyle(n.isMobile?{top:`${u.topPosition}px`}:{})},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(r),l=>(e.openBlock(),e.createElementBlock("li",{key:l.text,class:"pdap-nav-link-container"},[l.href?(e.openBlock(),e.createElementBlock("a",{key:0,class:"pdap-nav-link",href:l.href,target:"_blank",referrerpolicy:"no-referrer",onClick:s},e.toDisplayString(l.text),9,mr)):e.createCommentVNode("",!0),l.path?(e.openBlock(),e.createBlock(e.unref(X.RouterLink),{key:1,"active-class":"pdap-nav-link-current","exact-active-class":"pdap-nav-link-current-exact",class:"pdap-nav-link",to:l.path,onClick:s},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(l.text),1)]),_:2},1032,["to"])):e.createCommentVNode("",!0)]))),128))],14,dr)],64))}});const pr=["href"],fr=["src"],gr=["src"],hr=e.defineComponent({__name:"PdapHeader",props:{logoImageSrc:{default:"node_modules/pdap-design-system/dist/images/lockup.svg"},logoImageAnchorPath:{default:"/"}},setup(t){const r=t,n=e.ref(),a=e.ref(null),o=r.logoImageAnchorPath.startsWith("/");e.onMounted(()=>{s(),window.addEventListener("resize",s)}),e.onBeforeUnmount(()=>{window.removeEventListener("resize",s)});function s(){a.value&&(n.value=a.value.offsetHeight)}return(u,c)=>(e.openBlock(),e.createElementBlock("header",{ref_key:"el",ref:a,class:"pdap-header"},[e.unref(o)?(e.openBlock(),e.createBlock(e.unref(X.RouterLink),{key:1,to:u.logoImageAnchorPath,class:"logo"},{default:e.withCtx(()=>[e.createElementVNode("img",{src:u.logoImageSrc,loading:"lazy",width:"250",alt:"Police Data Accessibility Project Logo"},null,8,gr)]),_:1},8,["to"])):(e.openBlock(),e.createElementBlock("a",{key:0,href:u.logoImageAnchorPath,class:"logo"},[e.createElementVNode("img",{src:u.logoImageSrc,loading:"lazy",width:"250",alt:"Police Data Accessibility Project Logo"},null,8,fr)],8,pr)),e.createVNode(ve,{"top-position":n.value},null,8,["top-position"])],512))}});const $r=e.createElementVNode("h2",{class:"mt-0"},"Search our database",-1),vr=e.createElementVNode("p",{class:"pb-4 md:pb-8"},[e.createTextVNode(" If you have a question to answer, we may already know about helpful data in your area. "),e.createElementVNode("a",{href:"https://pdap.io/data"},"Learn more about the data here.")],-1),yr=e.defineComponent({__name:"QuickSearchForm",props:{baseUrlForRedirect:{default:"https://data-sources.pdap.io"}},setup(t){const r=X.useRouter(),n=t,a=[{id:"search-term",name:"searchTerm",label:"What are you looking for?",type:x.TEXT,placeholder:"Enter a keyword, or 'all'",value:""},{id:"location",name:"location",label:"From where?",type:x.TEXT,placeholder:"Enter a place, or 'all'",value:""}],o=e.ref(void 0);function s(u){if(Object.values(u).every(d=>!d)){o.value="Either a search term or a location is required.";return}let{location:c,searchTerm:l}=u;c=c&&c.length>0?c:"all",l=l&&l.length>0?l:"all",r.getRoutes().some(d=>d.path.includes("/search/"))?r.push(`/search/${l}/${c}`):window.location.assign(`${n.baseUrlForRedirect}/search/${l}/${c}`)}return(u,c)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createVNode(I,{class:"p-0"},{default:e.withCtx(()=>[$r,vr]),_:1}),e.createVNode(I,{alignment:"center",class:"pdap-quick-search-form h-full max-h-[75-vh] justify-start p-0"},{default:e.withCtx(()=>[e.createVNode(he,{id:"quick-search-form",class:"flex flex-wrap gap-x-4",error:o.value,schema:a,name:"quickSearchForm",onSubmit:s},{default:e.withCtx(()=>[e.createVNode(ce,{type:"submit",class:"flex-grow-0 flex-shrink-0 basis-full max-w-[unset] mt-4"},{default:e.withCtx(()=>[e.createTextVNode("Search Data Sources")]),_:1})]),_:1},8,["error"])]),_:1})],64))}});const _r=["alt","src"],wr=e.defineComponent({__name:"TileIcon",props:{imgAltText:{},imgSrc:{}},setup(t){return(r,n)=>(e.openBlock(),e.createElementBlock("img",{class:"pdap-tile-icon",alt:r.imgAltText,src:r.imgSrc},null,8,_r))}});const br={content:["./src/**/*.vue","./src/**/*.css"],theme:{extend:{colors:{brand:{blue:{light:"rgba(var(--color-brand-blue-light)/<alpha-value>)",medium:"rgba(var(--color-brand-blue-medium)/<alpha-value>)"},gold:"rgba(var(--color-brand-gold)/<alpha-value>)",wine:"rgba(var(--color-brand-wine)/<alpha-value>)"},neutral:{50:"rgba(var(--color-neutral-50)/<alpha-value>)",100:"rgba(var(--color-neutral-100)/<alpha-value>)",200:"rgba(var(--color-neutral-200)/<alpha-value>)",300:"rgba(var(--color-neutral-300)/<alpha-value>)",400:"rgba(var(--color-neutral-400)/<alpha-value>)",500:"rgba(var(--color-neutral-500)/<alpha-value>)",600:"rgba(var(--color-neutral-600)/<alpha-value>)",700:"rgba(var(--color-neutral-700)/<alpha-value>)",800:"rgba(var(--color-neutral-800)/<alpha-value>)",900:"rgba(var(--color-neutral-900)/<alpha-value>)",950:"rgba(var(--color-neutral-950)/<alpha-value>)"}},brightness:{85:".85"},maxWidth:{"4xl":"59rem"},screens:{xs:"500px"}},fontFamily:{sans:['"Libre Franklin"',"ui-sans-serif","system-ui","-apple-system","BlinkMacSystemFont",'"Segoe UI"',"Roboto","Oxygen","Ubuntu","Cantarell",'"Fira Sans"','"Droid Sans"','"Helvetica Neue"',"sans-serif"],serif:["ui-serif","Georgia"],mono:['"Source Code Pro"',"monospace","ui-monospace","SFMono-Regular"]},fontSize:{xs:"0.75rem",sm:"0.875rem",med:"1rem",lg:"1.125rem",xl:"1.25rem","2xl":"1.5rem","3xl":"1.75rem","4xl":"2rem","5xl":"2.625rem","6xl":"3rem"}}};exports.Button=ce;exports.FlexContainer=I;exports.Footer=Le;exports.Form=he;exports.GridContainer=$e;exports.GridItem=ir;exports.Header=hr;exports.Input=fe;exports.Nav=ve;exports.PdapInputTypes=x;exports.QuickSearchForm=yr;exports.TileIcon=wr;exports.tailwindConfig=br;
@@ -10,4 +10,4 @@ export * from './components/Header/types';
10
10
  export * from './components/Input/types';
11
11
  export * from './components/Nav/types';
12
12
  export * from './components/TileIcon/types';
13
- export * from '../config';
13
+ export * from './config';