@abgov/react-components 4.17.0-alpha.2 → 4.17.0-alpha.21

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (78) hide show
  1. package/common/styling.d.ts +12 -9
  2. package/index.d.ts +56 -59
  3. package/index.js +23565 -0
  4. package/index.js.map +1 -0
  5. package/index.mjs +23565 -0
  6. package/index.mjs.map +1 -0
  7. package/lib/accordion/accordion.d.ts +28 -28
  8. package/lib/app-header/app-header.d.ts +23 -22
  9. package/lib/app-header-menu/app-header-menu.d.ts +20 -20
  10. package/lib/badge/badge.d.ts +40 -41
  11. package/lib/block/block.d.ts +23 -22
  12. package/lib/button/button.d.ts +38 -35
  13. package/lib/button-group/button-group.d.ts +23 -23
  14. package/lib/calendar/calendar.d.ts +24 -25
  15. package/lib/callout/callout.d.ts +25 -25
  16. package/lib/checkbox/checkbox.d.ts +37 -37
  17. package/lib/chip/chip.d.ts +28 -29
  18. package/lib/circular-progress/circular-progress.d.ts +28 -27
  19. package/lib/container/container.d.ts +29 -29
  20. package/lib/date-picker/date-picker.d.ts +24 -25
  21. package/lib/details/details.d.ts +21 -20
  22. package/lib/divider/divider.d.ts +13 -13
  23. package/lib/dropdown/dropdown-item.d.ts +23 -24
  24. package/lib/dropdown/dropdown.d.ts +49 -50
  25. package/lib/file-upload-card/file-upload-card.d.ts +26 -27
  26. package/lib/file-upload-input/file-upload-input.d.ts +22 -23
  27. package/lib/footer/footer.d.ts +19 -18
  28. package/lib/footer-meta-section/footer-meta-section.d.ts +14 -13
  29. package/lib/footer-nav-section/footer-nav-section.d.ts +20 -20
  30. package/lib/{form → form-item}/form-item.d.ts +30 -30
  31. package/lib/form-step/form-step.d.ts +19 -19
  32. package/lib/form-stepper/form-stepper.d.ts +22 -21
  33. package/lib/grid/grid.d.ts +20 -21
  34. package/lib/hero-banner/hero-banner-actions.d.ts +5 -6
  35. package/lib/hero-banner/hero-banner.d.ts +27 -28
  36. package/lib/icon/icon.d.ts +41 -39
  37. package/lib/icon-button/icon-button.d.ts +33 -31
  38. package/lib/input/input.d.ts +112 -115
  39. package/lib/microsite-header/microsite-header.d.ts +30 -28
  40. package/lib/modal/modal.d.ts +39 -34
  41. package/lib/notification/notification.d.ts +27 -26
  42. package/lib/one-column-layout/one-column-layout.d.ts +14 -13
  43. package/lib/page-block/page-block.d.ts +19 -17
  44. package/lib/pages/pages.d.ts +18 -18
  45. package/lib/pagination/pagination.d.ts +26 -26
  46. package/lib/popover/popover.d.ts +27 -27
  47. package/lib/radio-group/radio-group.d.ts +32 -32
  48. package/lib/radio-group/radio.d.ts +29 -30
  49. package/lib/side-menu/side-menu.d.ts +14 -13
  50. package/lib/side-menu-group/side-menu-group.d.ts +17 -17
  51. package/lib/side-menu-heading/side-menu-heading.d.ts +19 -19
  52. package/lib/skeleton/skeleton.d.ts +27 -26
  53. package/lib/spacer/spacer.d.ts +20 -20
  54. package/lib/spinner/spinner.d.ts +25 -25
  55. package/lib/tab/tab.d.ts +17 -17
  56. package/lib/table/table-sort-header.d.ts +19 -20
  57. package/lib/table/table.d.ts +27 -25
  58. package/lib/tabs/tabs.d.ts +16 -17
  59. package/lib/textarea/textarea.d.ts +41 -39
  60. package/lib/three-column-layout/three-column-layout.d.ts +26 -26
  61. package/lib/tooltip/tooltip.d.ts +25 -23
  62. package/lib/two-column-layout/two-column-layout.d.ts +22 -22
  63. package/package.json +16 -11
  64. package/README.md +0 -34
  65. package/experimental/index.d.ts +0 -0
  66. package/experimental/package.json +0 -11
  67. package/experimental/react-components.esm.js +0 -1
  68. package/experimental/react-components.umd.js +0 -8
  69. package/lib/card/card-actions.d.ts +0 -13
  70. package/lib/card/card-content.d.ts +0 -13
  71. package/lib/card/card-group.d.ts +0 -13
  72. package/lib/card/card-image.d.ts +0 -18
  73. package/lib/card/card.d.ts +0 -22
  74. package/lib/card/index.d.ts +0 -5
  75. package/lib/form/index.d.ts +0 -1
  76. package/lib/form/validators.d.ts +0 -10
  77. package/react-components.esm.js +0 -3383
  78. package/react-components.umd.js +0 -3443
@@ -1,3383 +0,0 @@
1
- import { jsx, jsxs } from 'react/jsx-runtime';
2
- import { useRef, useEffect } from 'react';
3
- import { isValid as isValid$1, parseISO, format as format$1 } from 'date-fns';
4
-
5
- function noop(){}const identity=x=>x;function assign(tar,src){// @ts-ignore
6
- for(const k in src)tar[k]=src[k];return tar;}function run(fn){return fn();}function blank_object(){return Object.create(null);}function run_all(fns){fns.forEach(run);}function is_function(thing){return typeof thing==='function';}function safe_not_equal(a,b){return a!=a?b==b:a!==b||a&&typeof a==='object'||typeof a==='function';}let src_url_equal_anchor;function src_url_equal(element_src,url){if(!src_url_equal_anchor){src_url_equal_anchor=document.createElement('a');}src_url_equal_anchor.href=url;return element_src===src_url_equal_anchor.href;}function is_empty(obj){return Object.keys(obj).length===0;}function subscribe(store,...callbacks){if(store==null){return noop;}const unsub=store.subscribe(...callbacks);return unsub.unsubscribe?()=>unsub.unsubscribe():unsub;}function component_subscribe(component,store,callback){component.$$.on_destroy.push(subscribe(store,callback));}function action_destroyer(action_result){return action_result&&is_function(action_result.destroy)?action_result.destroy:noop;}function split_css_unit(value){const split=typeof value==='string'&&value.match(/^\s*(-?[\d.]+)([^\s]*)\s*$/);return split?[parseFloat(split[1]),split[2]||'px']:[value,'px'];}const is_client=typeof window!=='undefined';let now=is_client?()=>window.performance.now():()=>Date.now();let raf=is_client?cb=>requestAnimationFrame(cb):noop;const tasks=new Set();function run_tasks(now){tasks.forEach(task=>{if(!task.c(now)){tasks.delete(task);task.f();}});if(tasks.size!==0)raf(run_tasks);}/**
7
- * Creates a new task that runs on each raf frame
8
- * until it returns a falsy value or is aborted
9
- */function loop(callback){let task;if(tasks.size===0)raf(run_tasks);return {promise:new Promise(fulfill=>{tasks.add(task={c:callback,f:fulfill});}),abort(){tasks.delete(task);}};}const globals=typeof window!=='undefined'?window:typeof globalThis!=='undefined'?globalThis:global;function append(target,node){target.appendChild(node);}function get_root_for_style(node){if(!node)return document;const root=node.getRootNode?node.getRootNode():node.ownerDocument;if(root&&root.host){return root;}return node.ownerDocument;}function append_empty_stylesheet(node){const style_element=element('style');append_stylesheet(get_root_for_style(node),style_element);return style_element.sheet;}function append_stylesheet(node,style){append(node.head||node,style);return style.sheet;}function insert(target,node,anchor){target.insertBefore(node,anchor||null);}function detach(node){if(node.parentNode){node.parentNode.removeChild(node);}}function destroy_each(iterations,detaching){for(let i=0;i<iterations.length;i+=1){if(iterations[i])iterations[i].d(detaching);}}function element(name){return document.createElement(name);}function svg_element(name){return document.createElementNS('http://www.w3.org/2000/svg',name);}function text(data){return document.createTextNode(data);}function space(){return text(' ');}function empty(){return text('');}function listen(node,event,handler,options){node.addEventListener(event,handler,options);return ()=>node.removeEventListener(event,handler,options);}function stop_propagation(fn){return function(event){event.stopPropagation();// @ts-ignore
10
- return fn.call(this,event);};}function attr(node,attribute,value){if(value==null)node.removeAttribute(attribute);else if(node.getAttribute(attribute)!==value)node.setAttribute(attribute,value);}function set_custom_element_data(node,prop,value){if(prop in node){node[prop]=typeof node[prop]==='boolean'&&value===''?true:value;}else {attr(node,prop,value);}}function children(element){return Array.from(element.childNodes);}function set_data(text,data){data=''+data;if(text.data===data)return;text.data=data;}function set_input_value(input,value){input.value=value==null?'':value;}function set_style(node,key,value,important){if(value==null){node.style.removeProperty(key);}else {node.style.setProperty(key,value,important?'important':'');}}// unfortunately this can't be a constant as that wouldn't be tree-shakeable
11
- // so we cache the result instead
12
- let crossorigin;function is_crossorigin(){if(crossorigin===undefined){crossorigin=false;try{if(typeof window!=='undefined'&&window.parent){void window.parent.document;}}catch(error){crossorigin=true;}}return crossorigin;}function add_iframe_resize_listener(node,fn){const computed_style=getComputedStyle(node);if(computed_style.position==='static'){node.style.position='relative';}const iframe=element('iframe');iframe.setAttribute('style','display: block; position: absolute; top: 0; left: 0; width: 100%; height: 100%; '+'overflow: hidden; border: 0; opacity: 0; pointer-events: none; z-index: -1;');iframe.setAttribute('aria-hidden','true');iframe.tabIndex=-1;const crossorigin=is_crossorigin();let unsubscribe;if(crossorigin){iframe.src="data:text/html,<script>onresize=function(){parent.postMessage(0,'*')}</script>";unsubscribe=listen(window,'message',event=>{if(event.source===iframe.contentWindow)fn();});}else {iframe.src='about:blank';iframe.onload=()=>{unsubscribe=listen(iframe.contentWindow,'resize',fn);// make sure an initial resize event is fired _after_ the iframe is loaded (which is asynchronous)
13
- // see https://github.com/sveltejs/svelte/issues/4233
14
- fn();};}append(node,iframe);return ()=>{if(crossorigin){unsubscribe();}else if(unsubscribe&&iframe.contentWindow){unsubscribe();}detach(iframe);};}function toggle_class(element,name,toggle){element.classList[toggle?'add':'remove'](name);}function custom_event(type,detail,{bubbles=false,cancelable=false}={}){const e=document.createEvent('CustomEvent');e.initCustomEvent(type,bubbles,cancelable,detail);return e;}function attribute_to_object(attributes){const result={};for(const attribute of attributes){result[attribute.name]=attribute.value;}return result;}// we need to store the information for multiple documents because a Svelte application could also contain iframes
15
- // https://github.com/sveltejs/svelte/issues/3624
16
- const managed_styles=new Map();let active=0;// https://github.com/darkskyapp/string-hash/blob/master/index.js
17
- function hash(str){let hash=5381;let i=str.length;while(i--)hash=(hash<<5)-hash^str.charCodeAt(i);return hash>>>0;}function create_style_information(doc,node){const info={stylesheet:append_empty_stylesheet(node),rules:{}};managed_styles.set(doc,info);return info;}function create_rule(node,a,b,duration,delay,ease,fn,uid=0){const step=16.666/duration;let keyframes='{\n';for(let p=0;p<=1;p+=step){const t=a+(b-a)*ease(p);keyframes+=p*100+`%{${fn(t,1-t)}}\n`;}const rule=keyframes+`100% {${fn(b,1-b)}}\n}`;const name=`__svelte_${hash(rule)}_${uid}`;const doc=get_root_for_style(node);const{stylesheet,rules}=managed_styles.get(doc)||create_style_information(doc,node);if(!rules[name]){rules[name]=true;stylesheet.insertRule(`@keyframes ${name} ${rule}`,stylesheet.cssRules.length);}const animation=node.style.animation||'';node.style.animation=`${animation?`${animation}, `:''}${name} ${duration}ms linear ${delay}ms 1 both`;active+=1;return name;}function delete_rule(node,name){const previous=(node.style.animation||'').split(', ');const next=previous.filter(name?anim=>anim.indexOf(name)<0// remove specific animation
18
- :anim=>anim.indexOf('__svelte')===-1// remove all Svelte animations
19
- );const deleted=previous.length-next.length;if(deleted){node.style.animation=next.join(', ');active-=deleted;if(!active)clear_rules();}}function clear_rules(){raf(()=>{if(active)return;managed_styles.forEach(info=>{const{ownerNode}=info.stylesheet;// there is no ownerNode if it runs on jsdom.
20
- if(ownerNode)detach(ownerNode);});managed_styles.clear();});}let current_component;function set_current_component(component){current_component=component;}function get_current_component(){if(!current_component)throw new Error('Function called outside component initialization');return current_component;}/**
21
- * The `onMount` function schedules a callback to run as soon as the component has been mounted to the DOM.
22
- * It must be called during the component's initialisation (but doesn't need to live *inside* the component;
23
- * it can be called from an external module).
24
- *
25
- * `onMount` does not run inside a [server-side component](/docs#run-time-server-side-component-api).
26
- *
27
- * https://svelte.dev/docs#run-time-svelte-onmount
28
- */function onMount(fn){get_current_component().$$.on_mount.push(fn);}/**
29
- * Schedules a callback to run immediately before the component is unmounted.
30
- *
31
- * Out of `onMount`, `beforeUpdate`, `afterUpdate` and `onDestroy`, this is the
32
- * only one that runs inside a server-side component.
33
- *
34
- * https://svelte.dev/docs#run-time-svelte-ondestroy
35
- */function onDestroy(fn){get_current_component().$$.on_destroy.push(fn);}const dirty_components=[];const binding_callbacks=[];let render_callbacks=[];const flush_callbacks=[];const resolved_promise=/* @__PURE__ */Promise.resolve();let update_scheduled=false;function schedule_update(){if(!update_scheduled){update_scheduled=true;resolved_promise.then(flush);}}function tick(){schedule_update();return resolved_promise;}function add_render_callback(fn){render_callbacks.push(fn);}// flush() calls callbacks in this order:
36
- // 1. All beforeUpdate callbacks, in order: parents before children
37
- // 2. All bind:this callbacks, in reverse order: children before parents.
38
- // 3. All afterUpdate callbacks, in order: parents before children. EXCEPT
39
- // for afterUpdates called during the initial onMount, which are called in
40
- // reverse order: children before parents.
41
- // Since callbacks might update component values, which could trigger another
42
- // call to flush(), the following steps guard against this:
43
- // 1. During beforeUpdate, any updated components will be added to the
44
- // dirty_components array and will cause a reentrant call to flush(). Because
45
- // the flush index is kept outside the function, the reentrant call will pick
46
- // up where the earlier call left off and go through all dirty components. The
47
- // current_component value is saved and restored so that the reentrant call will
48
- // not interfere with the "parent" flush() call.
49
- // 2. bind:this callbacks cannot trigger new flush() calls.
50
- // 3. During afterUpdate, any updated components will NOT have their afterUpdate
51
- // callback called a second time; the seen_callbacks set, outside the flush()
52
- // function, guarantees this behavior.
53
- const seen_callbacks=new Set();let flushidx=0;// Do *not* move this inside the flush() function
54
- function flush(){// Do not reenter flush while dirty components are updated, as this can
55
- // result in an infinite loop. Instead, let the inner flush handle it.
56
- // Reentrancy is ok afterwards for bindings etc.
57
- if(flushidx!==0){return;}const saved_component=current_component;do{// first, call beforeUpdate functions
58
- // and update components
59
- try{while(flushidx<dirty_components.length){const component=dirty_components[flushidx];flushidx++;set_current_component(component);update(component.$$);}}catch(e){// reset dirty state to not end up in a deadlocked state and then rethrow
60
- dirty_components.length=0;flushidx=0;throw e;}set_current_component(null);dirty_components.length=0;flushidx=0;while(binding_callbacks.length)binding_callbacks.pop()();// then, once components are updated, call
61
- // afterUpdate functions. This may cause
62
- // subsequent updates...
63
- for(let i=0;i<render_callbacks.length;i+=1){const callback=render_callbacks[i];if(!seen_callbacks.has(callback)){// ...so guard against infinite loops
64
- seen_callbacks.add(callback);callback();}}render_callbacks.length=0;}while(dirty_components.length);while(flush_callbacks.length){flush_callbacks.pop()();}update_scheduled=false;seen_callbacks.clear();set_current_component(saved_component);}function update($$){if($$.fragment!==null){$$.update();run_all($$.before_update);const dirty=$$.dirty;$$.dirty=[-1];$$.fragment&&$$.fragment.p($$.ctx,dirty);$$.after_update.forEach(add_render_callback);}}/**
65
- * Useful for example to execute remaining `afterUpdate` callbacks before executing `destroy`.
66
- */function flush_render_callbacks(fns){const filtered=[];const targets=[];render_callbacks.forEach(c=>fns.indexOf(c)===-1?filtered.push(c):targets.push(c));targets.forEach(c=>c());render_callbacks=filtered;}let promise;function wait(){if(!promise){promise=Promise.resolve();promise.then(()=>{promise=null;});}return promise;}function dispatch$1(node,direction,kind){node.dispatchEvent(custom_event(`${direction?'intro':'outro'}${kind}`));}const outroing=new Set();let outros;function group_outros(){outros={r:0,c:[],p:outros// parent group
67
- };}function check_outros(){if(!outros.r){run_all(outros.c);}outros=outros.p;}function transition_in(block,local){if(block&&block.i){outroing.delete(block);block.i(local);}}function transition_out(block,local,detach,callback){if(block&&block.o){if(outroing.has(block))return;outroing.add(block);outros.c.push(()=>{outroing.delete(block);if(callback){if(detach)block.d(1);callback();}});block.o(local);}else if(callback){callback();}}const null_transition={duration:0};function create_in_transition(node,fn,params){const options={direction:'in'};let config=fn(node,params,options);let running=false;let animation_name;let task;let uid=0;function cleanup(){if(animation_name)delete_rule(node,animation_name);}function go(){const{delay=0,duration=300,easing=identity,tick=noop,css}=config||null_transition;if(css)animation_name=create_rule(node,0,1,duration,delay,easing,css,uid++);tick(0,1);const start_time=now()+delay;const end_time=start_time+duration;if(task)task.abort();running=true;add_render_callback(()=>dispatch$1(node,true,'start'));task=loop(now=>{if(running){if(now>=end_time){tick(1,0);dispatch$1(node,true,'end');cleanup();return running=false;}if(now>=start_time){const t=easing((now-start_time)/duration);tick(t,1-t);}}return running;});}let started=false;return {start(){if(started)return;started=true;delete_rule(node);if(is_function(config)){config=config(options);wait().then(go);}else {go();}},invalidate(){started=false;},end(){if(running){cleanup();running=false;}}};}function create_out_transition(node,fn,params){const options={direction:'out'};let config=fn(node,params,options);let running=true;let animation_name;const group=outros;group.r+=1;function go(){const{delay=0,duration=300,easing=identity,tick=noop,css}=config||null_transition;if(css)animation_name=create_rule(node,1,0,duration,delay,easing,css);const start_time=now()+delay;const end_time=start_time+duration;add_render_callback(()=>dispatch$1(node,false,'start'));loop(now=>{if(running){if(now>=end_time){tick(0,1);dispatch$1(node,false,'end');if(! --group.r){// this will result in `end()` being called,
68
- // so we don't need to clean up here
69
- run_all(group.c);}return false;}if(now>=start_time){const t=easing((now-start_time)/duration);tick(1-t,t);}}return running;});}if(is_function(config)){wait().then(()=>{// @ts-ignore
70
- config=config(options);go();});}else {go();}return {end(reset){if(reset&&config.tick){config.tick(1,0);}if(running){if(animation_name)delete_rule(node,animation_name);running=false;}}};}function create_bidirectional_transition(node,fn,params,intro){const options={direction:'both'};let config=fn(node,params,options);let t=intro?0:1;let running_program=null;let pending_program=null;let animation_name=null;function clear_animation(){if(animation_name)delete_rule(node,animation_name);}function init(program,duration){const d=program.b-t;duration*=Math.abs(d);return {a:t,b:program.b,d,duration,start:program.start,end:program.start+duration,group:program.group};}function go(b){const{delay=0,duration=300,easing=identity,tick=noop,css}=config||null_transition;const program={start:now()+delay,b};if(!b){// @ts-ignore todo: improve typings
71
- program.group=outros;outros.r+=1;}if(running_program||pending_program){pending_program=program;}else {// if this is an intro, and there's a delay, we need to do
72
- // an initial tick and/or apply CSS animation immediately
73
- if(css){clear_animation();animation_name=create_rule(node,t,b,duration,delay,easing,css);}if(b)tick(0,1);running_program=init(program,duration);add_render_callback(()=>dispatch$1(node,b,'start'));loop(now=>{if(pending_program&&now>pending_program.start){running_program=init(pending_program,duration);pending_program=null;dispatch$1(node,running_program.b,'start');if(css){clear_animation();animation_name=create_rule(node,t,running_program.b,running_program.duration,0,easing,config.css);}}if(running_program){if(now>=running_program.end){tick(t=running_program.b,1-t);dispatch$1(node,running_program.b,'end');if(!pending_program){// we're done
74
- if(running_program.b){// intro — we can tidy up immediately
75
- clear_animation();}else {// outro — needs to be coordinated
76
- if(! --running_program.group.r)run_all(running_program.group.c);}}running_program=null;}else if(now>=running_program.start){const p=now-running_program.start;t=running_program.a+running_program.d*easing(p/running_program.duration);tick(t,1-t);}}return !!(running_program||pending_program);});}}return {run(b){if(is_function(config)){wait().then(()=>{// @ts-ignore
77
- config=config(options);go(b);});}else {go(b);}},end(){clear_animation();running_program=pending_program=null;}};}function destroy_block(block,lookup){block.d(1);lookup.delete(block.key);}function outro_and_destroy_block(block,lookup){transition_out(block,1,1,()=>{lookup.delete(block.key);});}function update_keyed_each(old_blocks,dirty,get_key,dynamic,ctx,list,lookup,node,destroy,create_each_block,next,get_context){let o=old_blocks.length;let n=list.length;let i=o;const old_indexes={};while(i--)old_indexes[old_blocks[i].key]=i;const new_blocks=[];const new_lookup=new Map();const deltas=new Map();const updates=[];i=n;while(i--){const child_ctx=get_context(ctx,list,i);const key=get_key(child_ctx);let block=lookup.get(key);if(!block){block=create_each_block(key,child_ctx);block.c();}else if(dynamic){// defer updates until all the DOM shuffling is done
78
- updates.push(()=>block.p(child_ctx,dirty));}new_lookup.set(key,new_blocks[i]=block);if(key in old_indexes)deltas.set(key,Math.abs(i-old_indexes[key]));}const will_move=new Set();const did_move=new Set();function insert(block){transition_in(block,1);block.m(node,next);lookup.set(block.key,block);next=block.first;n--;}while(o&&n){const new_block=new_blocks[n-1];const old_block=old_blocks[o-1];const new_key=new_block.key;const old_key=old_block.key;if(new_block===old_block){// do nothing
79
- next=new_block.first;o--;n--;}else if(!new_lookup.has(old_key)){// remove old block
80
- destroy(old_block,lookup);o--;}else if(!lookup.has(new_key)||will_move.has(new_key)){insert(new_block);}else if(did_move.has(old_key)){o--;}else if(deltas.get(new_key)>deltas.get(old_key)){did_move.add(new_key);insert(new_block);}else {will_move.add(old_key);o--;}}while(o--){const old_block=old_blocks[o];if(!new_lookup.has(old_block.key))destroy(old_block,lookup);}while(n)insert(new_blocks[n-1]);run_all(updates);return new_blocks;}function create_component(block){block&&block.c();}function mount_component(component,target,anchor,customElement){const{fragment,after_update}=component.$$;fragment&&fragment.m(target,anchor);if(!customElement){// onMount happens before the initial afterUpdate
81
- add_render_callback(()=>{const new_on_destroy=component.$$.on_mount.map(run).filter(is_function);// if the component was destroyed immediately
82
- // it will update the `$$.on_destroy` reference to `null`.
83
- // the destructured on_destroy may still reference to the old array
84
- if(component.$$.on_destroy){component.$$.on_destroy.push(...new_on_destroy);}else {// Edge case - component was destroyed immediately,
85
- // most likely as a result of a binding initialising
86
- run_all(new_on_destroy);}component.$$.on_mount=[];});}after_update.forEach(add_render_callback);}function destroy_component(component,detaching){const $$=component.$$;if($$.fragment!==null){flush_render_callbacks($$.after_update);run_all($$.on_destroy);$$.fragment&&$$.fragment.d(detaching);// TODO null out other refs, including component.$$ (but need to
87
- // preserve final state?)
88
- $$.on_destroy=$$.fragment=null;$$.ctx=[];}}function make_dirty(component,i){if(component.$$.dirty[0]===-1){dirty_components.push(component);schedule_update();component.$$.dirty.fill(0);}component.$$.dirty[i/31|0]|=1<<i%31;}function init(component,options,instance,create_fragment,not_equal,props,append_styles,dirty=[-1]){const parent_component=current_component;set_current_component(component);const $$=component.$$={fragment:null,ctx:[],// state
89
- props,update:noop,not_equal,bound:blank_object(),// lifecycle
90
- on_mount:[],on_destroy:[],on_disconnect:[],before_update:[],after_update:[],context:new Map(options.context||(parent_component?parent_component.$$.context:[])),// everything else
91
- callbacks:blank_object(),dirty,skip_bound:false,root:options.target||parent_component.$$.root};append_styles&&append_styles($$.root);let ready=false;$$.ctx=instance?instance(component,options.props||{},(i,ret,...rest)=>{const value=rest.length?rest[0]:ret;if($$.ctx&&not_equal($$.ctx[i],$$.ctx[i]=value)){if(!$$.skip_bound&&$$.bound[i])$$.bound[i](value);if(ready)make_dirty(component,i);}return ret;}):[];$$.update();ready=true;run_all($$.before_update);// `false` as a special case of no DOM component
92
- $$.fragment=create_fragment?create_fragment($$.ctx):false;if(options.target){if(options.hydrate){const nodes=children(options.target);// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
93
- $$.fragment&&$$.fragment.l(nodes);nodes.forEach(detach);}else {// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
94
- $$.fragment&&$$.fragment.c();}if(options.intro)transition_in(component.$$.fragment);mount_component(component,options.target,options.anchor,options.customElement);flush();}set_current_component(parent_component);}let SvelteElement;if(typeof HTMLElement==='function'){SvelteElement=class extends HTMLElement{constructor(){super();this.attachShadow({mode:'open'});}connectedCallback(){const{on_mount}=this.$$;this.$$.on_disconnect=on_mount.map(run).filter(is_function);// @ts-ignore todo: improve typings
95
- for(const key in this.$$.slotted){// @ts-ignore todo: improve typings
96
- this.appendChild(this.$$.slotted[key]);}}attributeChangedCallback(attr,_oldValue,newValue){this[attr]=newValue;}disconnectedCallback(){run_all(this.$$.on_disconnect);}$destroy(){destroy_component(this,1);this.$destroy=noop;}$on(type,callback){// TODO should this delegate to addEventListener?
97
- if(!is_function(callback)){return noop;}const callbacks=this.$$.callbacks[type]||(this.$$.callbacks[type]=[]);callbacks.push(callback);return ()=>{const index=callbacks.indexOf(callback);if(index!==-1)callbacks.splice(index,1);};}$set($$props){if(this.$$set&&!is_empty($$props)){this.$$.skip_bound=true;this.$$set($$props);this.$$.skip_bound=false;}}};}const conversions={"0":"none","1":"3xs","2":"2xs","3":"xs","4":"s","5":"m","6":"l","7":"xl","8":"2xl","9":"3xl","10":"4xl"};function convertSpacing(size){if(!Number.isInteger(+size)){return size;}return conversions[size]||"";}function calculateMargin(mt,mr,mb,ml){mt=convertSpacing(mt);mb=convertSpacing(mb);ml=convertSpacing(ml);mr=convertSpacing(mr);return [mt&&`margin-top:var(--goa-space-${mt});`,mr&&`margin-right:var(--goa-space-${mr});`,mb&&`margin-bottom:var(--goa-space-${mb});`,ml&&`margin-left:var(--goa-space-${ml});`].join(" ");}function injectCss(el,rootSelector,css,media){if(!el)return;const style=document.createElement("style");const _css=Object.entries(css).map(entry=>`${entry[0]}: ${entry[1]};`).join(" ");if(media){style.innerHTML=`@media (${media}) { ${rootSelector} {${_css}} }`;}else {style.innerHTML=`${rootSelector} {${_css}}`;}el.appendChild(style);}function toBoolean(value){if(value==="false"){return false;}if(value===""){return true;}return !!value;}function fromBoolean(value){return value?"true":"false";}function validateRequired(componentName,props){Object.entries(props).forEach(prop=>{if(!prop[1]){console.warn(`${componentName}: ${prop[0]} is required`);}});}function typeValidator(message,values,required=false){const validator=value=>{if(!required&&!value){return;}if(!values.includes(value)){console.error(`[${value}] is an invalid ${message.toLowerCase()}`);}};return [values,validator];}function getTimestamp(val){const months=["January","February","March","April","May","June","July","August","September","October","November","December"];const now=val||new Date();const hour24=now.getHours();const min0=now.getMinutes();const date=now.getDate();const month=months[now.getMonth()];const year=now.getFullYear();const hour=hour24===0&&12||hour24>12&&hour24-12||hour24;const meridium=hour24===0&&"AM"||hour24>=12&&"PM"||"AM";const min=min0<10&&`0${min0}`||min0;const ordinal=date%10===1&&date!==11&&"st"||date%10===2&&date!==12&&"nd"||date%10===3&&date!==13&&"rd"||"th";return `${month} ${date}${ordinal} ${year}, ${hour}:${min} ${meridium}`;}function cssVar(name,value){return value?`${name}: ${value};`:"";}/* src/components/accordion/Accordion.svelte generated by Svelte v3.59.2 */function create_fragment$$(ctx){let div3;let details;let summary;let goa_icon;let goa_icon_fillcolor_value;let t0;let div1;let span0;let t1;let span0_class_value;let span0_data_testid_value;let t2;let span1;let t3;let t4;let div0;let summary_class_value;let t5;let div2;let div3_style_value;let mounted;let dispose;return {c(){div3=element("div");details=element("details");summary=element("summary");goa_icon=element("goa-icon");t0=space();div1=element("div");span0=element("span");t1=text(/*heading*/ctx[0]);t2=space();span1=element("span");t3=text(/*secondarytext*/ctx[1]);t4=space();div0=element("div");div0.innerHTML=`<slot name="headingcontent"></slot>`;t5=space();div2=element("div");div2.innerHTML=`<slot></slot>`;this.c=noop;set_custom_element_data(goa_icon,"type","chevron-forward");set_custom_element_data(goa_icon,"fillcolor",goa_icon_fillcolor_value=/*_hovering*/ctx[8]?"var(--goa-color-interactive-hover)":"var(--goa-color-interactive-default)");attr(span0,"class",span0_class_value="heading heading-"+/*headingsize*/ctx[2]);attr(span0,"data-testid",span0_data_testid_value=`${/*testid*/ctx[3]}-heading`);attr(span1,"class","secondary-text");attr(div0,"class","heading-content");toggle_class(div0,"heading-content-top",/*_headingContentSlotChildren*/ctx[10].length);attr(div1,"class","title");attr(summary,"class",summary_class_value=`container-${/*headingsize*/ctx[2]}`);attr(div2,"class","content");details.open=/*isOpen*/ctx[11];attr(div3,"style",div3_style_value=calculateMargin(/*mt*/ctx[4],/*mr*/ctx[5],/*mb*/ctx[6],/*ml*/ctx[7]));attr(div3,"class",`
98
- goa-accordion
99
- `);attr(div3,"data-testid",/*testid*/ctx[3]);},m(target,anchor){insert(target,div3,anchor);append(div3,details);append(details,summary);append(summary,goa_icon);append(summary,t0);append(summary,div1);append(div1,span0);append(span0,t1);append(div1,t2);append(div1,span1);append(span1,t3);append(div1,t4);append(div1,div0);/*div1_binding*/ctx[13](div1);append(details,t5);append(details,div2);if(!mounted){dispose=[listen(summary,"mouseover",/*mouseover_handler*/ctx[14]),listen(summary,"mouseout",/*mouseout_handler*/ctx[15]),listen(summary,"focus",/*focus_handler*/ctx[16]),listen(summary,"blur",/*blur_handler*/ctx[17])];mounted=true;}},p(ctx,[dirty]){if(dirty&/*_hovering*/256&&goa_icon_fillcolor_value!==(goa_icon_fillcolor_value=/*_hovering*/ctx[8]?"var(--goa-color-interactive-hover)":"var(--goa-color-interactive-default)")){set_custom_element_data(goa_icon,"fillcolor",goa_icon_fillcolor_value);}if(dirty&/*heading*/1)set_data(t1,/*heading*/ctx[0]);if(dirty&/*headingsize*/4&&span0_class_value!==(span0_class_value="heading heading-"+/*headingsize*/ctx[2])){attr(span0,"class",span0_class_value);}if(dirty&/*testid*/8&&span0_data_testid_value!==(span0_data_testid_value=`${/*testid*/ctx[3]}-heading`)){attr(span0,"data-testid",span0_data_testid_value);}if(dirty&/*secondarytext*/2)set_data(t3,/*secondarytext*/ctx[1]);if(dirty&/*_headingContentSlotChildren*/1024){toggle_class(div0,"heading-content-top",/*_headingContentSlotChildren*/ctx[10].length);}if(dirty&/*headingsize*/4&&summary_class_value!==(summary_class_value=`container-${/*headingsize*/ctx[2]}`)){attr(summary,"class",summary_class_value);}if(dirty&/*isOpen*/2048){details.open=/*isOpen*/ctx[11];}if(dirty&/*mt, mr, mb, ml*/240&&div3_style_value!==(div3_style_value=calculateMargin(/*mt*/ctx[4],/*mr*/ctx[5],/*mb*/ctx[6],/*ml*/ctx[7]))){attr(div3,"style",div3_style_value);}if(dirty&/*testid*/8){attr(div3,"data-testid",/*testid*/ctx[3]);}},i:noop,o:noop,d(detaching){if(detaching)detach(div3);/*div1_binding*/ctx[13](null);mounted=false;run_all(dispose);}};}function instance$V($$self,$$props,$$invalidate){let isOpen;const[HeadingSizes,validateHeadingSize]=typeValidator("Accordion heading size",["small","medium"]);let{open="false"}=$$props;let{heading=""}=$$props;let{secondarytext=""}=$$props;let{headingsize="small"}=$$props;let{testid=""}=$$props;let{mt=null}=$$props;let{mr=null}=$$props;let{mb="xs"}=$$props;let{ml=null}=$$props;let _hovering=false;let _titleEl=null;let _headingContentSlotChildren=[];onMount(()=>{validateRequired("GoAAccordion",{heading});validateHeadingSize(headingsize);$$invalidate(10,_headingContentSlotChildren=getChildren());});function getChildren(){if(_titleEl){const slot=_titleEl.querySelector("slot");if(slot){return [...slot.assignedElements()];}else {return [..._titleEl.children];// unit tests
100
- }}return [];}function div1_binding($$value){binding_callbacks[$$value?'unshift':'push'](()=>{_titleEl=$$value;$$invalidate(9,_titleEl);});}const mouseover_handler=()=>$$invalidate(8,_hovering=true);const mouseout_handler=()=>$$invalidate(8,_hovering=false);const focus_handler=()=>$$invalidate(8,_hovering=false);const blur_handler=()=>$$invalidate(8,_hovering=false);$$self.$$set=$$props=>{if('open'in $$props)$$invalidate(12,open=$$props.open);if('heading'in $$props)$$invalidate(0,heading=$$props.heading);if('secondarytext'in $$props)$$invalidate(1,secondarytext=$$props.secondarytext);if('headingsize'in $$props)$$invalidate(2,headingsize=$$props.headingsize);if('testid'in $$props)$$invalidate(3,testid=$$props.testid);if('mt'in $$props)$$invalidate(4,mt=$$props.mt);if('mr'in $$props)$$invalidate(5,mr=$$props.mr);if('mb'in $$props)$$invalidate(6,mb=$$props.mb);if('ml'in $$props)$$invalidate(7,ml=$$props.ml);};$$self.$$.update=()=>{if($$self.$$.dirty&/*open*/4096){$$invalidate(11,isOpen=toBoolean(open));}};return [heading,secondarytext,headingsize,testid,mt,mr,mb,ml,_hovering,_titleEl,_headingContentSlotChildren,isOpen,open,div1_binding,mouseover_handler,mouseout_handler,focus_handler,blur_handler];}class Accordion extends SvelteElement{constructor(options){super();const style=document.createElement('style');style.textContent=`:host{box-sizing:border-box;font-family:var(--goa-font-family-sans);font-size:var(--goa-font-size-4)}.goa-accordion,.goa-accordion *{box-sizing:border-box}summary{min-height:3.5rem;border-width:var(--goa-border-width-s);border-style:solid;border-radius:var(--goa-border-radius-m);background-color:var(--goa-color-greyscale-100);border-color:var(--goa-color-greyscale-200);color:var(--goa-color-text-default);;;padding:0.875rem 1rem 0 0;cursor:pointer;list-style:none;display:flex;align-items:flex-start;position:relative}summary.container-medium{min-height:4rem}summary::marker,summary::-webkit-details-marker{display:none}summary .title{display:flex;align-items:center;flex:1}.title span{padding-bottom:var(--goa-space-3xs, 0)}summary .heading{font:var(--goa-typography-heading-s);padding-right:1rem}summary .secondary-text{font:var(--goa-typography-body-s);line-height:1.5rem;padding-right:1rem}summary .heading-content{flex:1
101
- }.content{border-bottom:var(--goa-border-width-s) solid var(--goa-color-greyscale-200);border-left:var(--goa-border-width-s) solid var(--goa-color-greyscale-200);border-right:var(--goa-border-width-s) solid var(--goa-color-greyscale-200);border-bottom-left-radius:var(--goa-border-radius-m);border-bottom-right-radius:var(--goa-border-radius-m);padding:1.5rem;padding-left:3.5rem;padding-right:2rem}.content ::slotted(p:last-child){margin-bottom:0 !important}summary goa-icon{padding:0.125rem 1rem}summary.container-medium goa-icon{padding:0.375rem 1rem}details[open] goa-icon{transform:rotate(90deg)}details[open] summary{border-bottom-left-radius:var(--goa-border-radius-none);border-bottom-right-radius:var(--goa-border-radius-none)}summary:hover{background-color:var(--goa-color-greyscale-200)}summary:focus,summary:active{background-color:var(--goa-color-greyscale-100);outline:none}summary:active::before,summary:focus::before{content:"";position:absolute;top:-1px;right:-1px;bottom:-1px;left:-1px;border:var(--goa-border-width-l) solid var(--goa-color-interactive-focus);border-radius:4px}summary .heading.heading-medium{line-height:2rem;font:var(--goa-typography-heading-m)}@media screen and (max-width: 623px){summary{align-items:flex-start}summary .title{flex-direction:column;align-items:flex-start;padding-bottom:0.875rem}summary .title span{padding-bottom:0}summary .heading-content.heading-content-top{margin-top:var(--goa-space-xs)}}`;this.shadowRoot.appendChild(style);init(this,{target:this.shadowRoot,props:attribute_to_object(this.attributes),customElement:true},instance$V,create_fragment$$,safe_not_equal,{open:12,heading:0,secondarytext:1,headingsize:2,testid:3,mt:4,mr:5,mb:6,ml:7},null);if(options){if(options.target){insert(options.target,this,options.anchor);}if(options.props){this.$set(options.props);flush();}}}static get observedAttributes(){return ["open","heading","secondarytext","headingsize","testid","mt","mr","mb","ml"];}get open(){return this.$$.ctx[12];}set open(open){this.$$set({open});flush();}get heading(){return this.$$.ctx[0];}set heading(heading){this.$$set({heading});flush();}get secondarytext(){return this.$$.ctx[1];}set secondarytext(secondarytext){this.$$set({secondarytext});flush();}get headingsize(){return this.$$.ctx[2];}set headingsize(headingsize){this.$$set({headingsize});flush();}get testid(){return this.$$.ctx[3];}set testid(testid){this.$$set({testid});flush();}get mt(){return this.$$.ctx[4];}set mt(mt){this.$$set({mt});flush();}get mr(){return this.$$.ctx[5];}set mr(mr){this.$$set({mr});flush();}get mb(){return this.$$.ctx[6];}set mb(mb){this.$$set({mb});flush();}get ml(){return this.$$.ctx[7];}set ml(ml){this.$$set({ml});flush();}}customElements.define("goa-accordion",Accordion);const MOBILE_BP=624;const TABLET_BP=1024;/* src/components/app-header/AppHeader.svelte generated by Svelte v3.59.2 */const{window:window_1$2}=globals;function create_else_block$d(ctx){let div;let img0;let img0_src_value;let t0;let img1;let img1_src_value;let t1;let if_block=/*heading*/ctx[0]&&create_if_block_7$1(ctx);return {c(){div=element("div");img0=element("img");t0=space();img1=element("img");t1=space();if(if_block)if_block.c();attr(img0,"alt","GoA Logo");attr(img0,"class","image-mobile");if(!src_url_equal(img0.src,img0_src_value=_mobileLogo))attr(img0,"src",img0_src_value);attr(img1,"alt","GoA Logo");attr(img1,"class","image-desktop");if(!src_url_equal(img1.src,img1_src_value=_desktopLogo))attr(img1,"src",img1_src_value);attr(div,"class","header-logo-title-area");},m(target,anchor){insert(target,div,anchor);append(div,img0);append(div,t0);append(div,img1);append(div,t1);if(if_block)if_block.m(div,null);},p(ctx,dirty){if(/*heading*/ctx[0]){if(if_block){if_block.p(ctx,dirty);}else {if_block=create_if_block_7$1(ctx);if_block.c();if_block.m(div,null);}}else if(if_block){if_block.d(1);if_block=null;}},d(detaching){if(detaching)detach(div);if(if_block)if_block.d();}};}// (90:4) {#if url}
102
- function create_if_block_5$1(ctx){let a;let img0;let img0_src_value;let t0;let img1;let img1_src_value;let t1;let if_block=/*heading*/ctx[0]&&create_if_block_6$1(ctx);return {c(){a=element("a");img0=element("img");t0=space();img1=element("img");t1=space();if(if_block)if_block.c();attr(img0,"alt","GoA Logo");attr(img0,"class","image-mobile");if(!src_url_equal(img0.src,img0_src_value=_mobileLogo))attr(img0,"src",img0_src_value);attr(img1,"alt","GoA Logo");attr(img1,"class","image-desktop");if(!src_url_equal(img1.src,img1_src_value=_desktopLogo))attr(img1,"src",img1_src_value);attr(a,"href",/*url*/ctx[1]);attr(a,"class","header-logo-title-area");attr(a,"data-testid","url");},m(target,anchor){insert(target,a,anchor);append(a,img0);append(a,t0);append(a,img1);append(a,t1);if(if_block)if_block.m(a,null);},p(ctx,dirty){if(/*heading*/ctx[0]){if(if_block){if_block.p(ctx,dirty);}else {if_block=create_if_block_6$1(ctx);if_block.c();if_block.m(a,null);}}else if(if_block){if_block.d(1);if_block=null;}if(dirty&/*url*/2){attr(a,"href",/*url*/ctx[1]);}},d(detaching){if(detaching)detach(a);if(if_block)if_block.d();}};}// (102:8) {#if heading}
103
- function create_if_block_7$1(ctx){let span;let t;return {c(){span=element("span");t=text(/*heading*/ctx[0]);attr(span,"data-testid","title");attr(span,"class","title");},m(target,anchor){insert(target,span,anchor);append(span,t);},p(ctx,dirty){if(dirty&/*heading*/1)set_data(t,/*heading*/ctx[0]);},d(detaching){if(detaching)detach(span);}};}// (94:8) {#if heading}
104
- function create_if_block_6$1(ctx){let span;let t;return {c(){span=element("span");t=text(/*heading*/ctx[0]);attr(span,"data-testid","title");attr(span,"class","title");},m(target,anchor){insert(target,span,anchor);append(span,t);},p(ctx,dirty){if(dirty&/*heading*/1)set_data(t,/*heading*/ctx[0]);},d(detaching){if(detaching)detach(span);}};}// (109:4) {#if _showToggleMenu && _mobile}
105
- function create_if_block_4$4(ctx){let button;let t;let goa_icon;let goa_icon_type_value;let mounted;let dispose;return {c(){button=element("button");t=text("Menu ");goa_icon=element("goa-icon");set_custom_element_data(goa_icon,"type",goa_icon_type_value=/*_showMenu*/ctx[8]?"chevron-up":"chevron-down");set_custom_element_data(goa_icon,"mt","1");attr(button,"class","menu-toggle-area");attr(button,"data-testid","menu-toggle");},m(target,anchor){insert(target,button,anchor);append(button,t);append(button,goa_icon);if(!mounted){dispose=listen(button,"click",/*toggleMenu*/ctx[11]);mounted=true;}},p(ctx,dirty){if(dirty&/*_showMenu*/256&&goa_icon_type_value!==(goa_icon_type_value=/*_showMenu*/ctx[8]?"chevron-up":"chevron-down")){set_custom_element_data(goa_icon,"type",goa_icon_type_value);}},d(detaching){if(detaching)detach(button);mounted=false;dispose();}};}// (116:4) {#if _showToggleMenu && _tablet}
106
- function create_if_block_2$e(ctx){let goa_popover;let div;let button;let t0;let goa_icon;let goa_icon_type_value;let t1;let mounted;let dispose;let if_block=/*_showMenu*/ctx[8]&&create_if_block_3$b(ctx);return {c(){goa_popover=element("goa-popover");div=element("div");button=element("button");t0=text("Menu ");goa_icon=element("goa-icon");t1=space();if(if_block)if_block.c();set_custom_element_data(goa_icon,"type",goa_icon_type_value=/*_showMenu*/ctx[8]?"chevron-up":"chevron-down");set_custom_element_data(goa_icon,"mt","1");attr(button,"class","menu-toggle-area");attr(button,"data-testid","menu-toggle");attr(div,"slot","target");set_custom_element_data(goa_popover,"class","menu");set_custom_element_data(goa_popover,"open",/*_showMenu*/ctx[8]);set_custom_element_data(goa_popover,"context","app-header-menu");set_custom_element_data(goa_popover,"focusborderwidth","0");set_custom_element_data(goa_popover,"borderradius","0");set_custom_element_data(goa_popover,"padded","false");set_custom_element_data(goa_popover,"width","16rem");set_custom_element_data(goa_popover,"tabindex","-1");set_custom_element_data(goa_popover,"position","below");},m(target,anchor){insert(target,goa_popover,anchor);append(goa_popover,div);append(div,button);append(button,t0);append(button,goa_icon);append(goa_popover,t1);if(if_block)if_block.m(goa_popover,null);if(!mounted){dispose=[listen(button,"click",/*toggleMenu*/ctx[11]),listen(goa_popover,"_close",/*hideMenu*/ctx[12])];mounted=true;}},p(ctx,dirty){if(dirty&/*_showMenu*/256&&goa_icon_type_value!==(goa_icon_type_value=/*_showMenu*/ctx[8]?"chevron-up":"chevron-down")){set_custom_element_data(goa_icon,"type",goa_icon_type_value);}if(/*_showMenu*/ctx[8]){if(if_block){if_block.p(ctx,dirty);}else {if_block=create_if_block_3$b(ctx);if_block.c();if_block.m(goa_popover,null);}}else if(if_block){if_block.d(1);if_block=null;}if(dirty&/*_showMenu*/256){set_custom_element_data(goa_popover,"open",/*_showMenu*/ctx[8]);}},d(detaching){if(detaching)detach(goa_popover);if(if_block)if_block.d();mounted=false;run_all(dispose);}};}// (135:8) {#if _showMenu}
107
- function create_if_block_3$b(ctx){let div;return {c(){div=element("div");div.innerHTML=`<slot></slot>`;attr(div,"data-testid","slot");},m(target,anchor){insert(target,div,anchor);/*div_binding*/ctx[14](div);},p:noop,d(detaching){if(detaching)detach(div);/*div_binding*/ctx[14](null);}};}// (148:4) {#if !_showMenu && (_mobile || _tablet)}
108
- function create_if_block_1$i(ctx){let div;return {c(){div=element("div");div.innerHTML=`<slot></slot>`;set_style(div,"display","none");},m(target,anchor){insert(target,div,anchor);/*div_binding_1*/ctx[15](div);},p:noop,d(detaching){if(detaching)detach(div);/*div_binding_1*/ctx[15](null);}};}// (155:4) {#if _showMenu && _mobile || _desktop}
109
- function create_if_block$v(ctx){let div;return {c(){div=element("div");div.innerHTML=`<slot></slot>`;attr(div,"data-testid","slot");attr(div,"class","content-area");},m(target,anchor){insert(target,div,anchor);/*div_binding_2*/ctx[16](div);},p:noop,d(detaching){if(detaching)detach(div);/*div_binding_2*/ctx[16](null);}};}function create_fragment$_(ctx){let div1;let div0;let t0;let t1;let t2;let t3;let div1_style_value;let mounted;let dispose;add_render_callback(/*onwindowresize*/ctx[13]);function select_block_type(ctx,dirty){if(/*url*/ctx[1])return create_if_block_5$1;return create_else_block$d;}let current_block_type=select_block_type(ctx);let if_block0=current_block_type(ctx);let if_block1=/*_showToggleMenu*/ctx[7]&&/*_mobile*/ctx[10]&&create_if_block_4$4(ctx);let if_block2=/*_showToggleMenu*/ctx[7]&&/*_tablet*/ctx[9]&&create_if_block_2$e(ctx);let if_block3=!/*_showMenu*/ctx[8]&&(/*_mobile*/ctx[10]||/*_tablet*/ctx[9])&&create_if_block_1$i(ctx);let if_block4=(/*_showMenu*/ctx[8]&&/*_mobile*/ctx[10]||/*_desktop*/ctx[5])&&create_if_block$v(ctx);return {c(){div1=element("div");div0=element("div");if_block0.c();t0=space();if(if_block1)if_block1.c();t1=space();if(if_block2)if_block2.c();t2=space();if(if_block3)if_block3.c();t3=space();if(if_block4)if_block4.c();this.c=noop;attr(div0,"class","layout");attr(div1,"class","container");attr(div1,"data-testid",/*testid*/ctx[2]);attr(div1,"style",div1_style_value=`--max-content-width: ${/*maxcontentwidth*/ctx[3]||"100%"}`);toggle_class(div1,"show-menu",/*_showMenu*/ctx[8]);},m(target,anchor){insert(target,div1,anchor);append(div1,div0);if_block0.m(div0,null);append(div0,t0);if(if_block1)if_block1.m(div0,null);append(div0,t1);if(if_block2)if_block2.m(div0,null);append(div0,t2);if(if_block3)if_block3.m(div0,null);append(div0,t3);if(if_block4)if_block4.m(div0,null);if(!mounted){dispose=listen(window_1$2,"resize",/*onwindowresize*/ctx[13]);mounted=true;}},p(ctx,[dirty]){if(current_block_type===(current_block_type=select_block_type(ctx))&&if_block0){if_block0.p(ctx,dirty);}else {if_block0.d(1);if_block0=current_block_type(ctx);if(if_block0){if_block0.c();if_block0.m(div0,t0);}}if(/*_showToggleMenu*/ctx[7]&&/*_mobile*/ctx[10]){if(if_block1){if_block1.p(ctx,dirty);}else {if_block1=create_if_block_4$4(ctx);if_block1.c();if_block1.m(div0,t1);}}else if(if_block1){if_block1.d(1);if_block1=null;}if(/*_showToggleMenu*/ctx[7]&&/*_tablet*/ctx[9]){if(if_block2){if_block2.p(ctx,dirty);}else {if_block2=create_if_block_2$e(ctx);if_block2.c();if_block2.m(div0,t2);}}else if(if_block2){if_block2.d(1);if_block2=null;}if(!/*_showMenu*/ctx[8]&&(/*_mobile*/ctx[10]||/*_tablet*/ctx[9])){if(if_block3){if_block3.p(ctx,dirty);}else {if_block3=create_if_block_1$i(ctx);if_block3.c();if_block3.m(div0,t3);}}else if(if_block3){if_block3.d(1);if_block3=null;}if(/*_showMenu*/ctx[8]&&/*_mobile*/ctx[10]||/*_desktop*/ctx[5]){if(if_block4){if_block4.p(ctx,dirty);}else {if_block4=create_if_block$v(ctx);if_block4.c();if_block4.m(div0,null);}}else if(if_block4){if_block4.d(1);if_block4=null;}if(dirty&/*testid*/4){attr(div1,"data-testid",/*testid*/ctx[2]);}if(dirty&/*maxcontentwidth*/8&&div1_style_value!==(div1_style_value=`--max-content-width: ${/*maxcontentwidth*/ctx[3]||"100%"}`)){attr(div1,"style",div1_style_value);}if(dirty&/*_showMenu*/256){toggle_class(div1,"show-menu",/*_showMenu*/ctx[8]);}},i:noop,o:noop,d(detaching){if(detaching)detach(div1);if_block0.d();if(if_block1)if_block1.d();if(if_block2)if_block2.d();if(if_block3)if_block3.d();if(if_block4)if_block4.d();mounted=false;dispose();}};}const _mobileLogo="data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' width='32' height='32' viewBox='0 0 16 16'%3E%3Cdefs%3E%3Cstyle%3E.a%7Bfill:none;%7D.b%7Bfill:%2300aad2;%7D.c%7Bclip-path:url(%23a);%7D.d%7Bfill:%23fff;%7D%3C/style%3E%3CclipPath id='a'%3E%3Crect class='a' width='14' height='14' transform='translate(-0.345 -0.21)'/%3E%3C/clipPath%3E%3C/defs%3E%3Cg transform='translate(0 -0.135)'%3E%3Ccircle class='b' cx='8' cy='8' r='8' transform='translate(0 0.135)'/%3E%3Cg transform='translate(1.345 1.344)'%3E%3Cg class='c' transform='translate(0 0)'%3E%3Cpath class='d' d='M12.612,13.636a16.24,16.24,0,0,1-1.86-.822,13.436,13.436,0,0,0,1.6-.708,11.312,11.312,0,0,0,.264,1.53M16.032,7.3c-.266-.034-.128.091-.2.442a5.465,5.465,0,0,1-2.8,3.338,16.141,16.141,0,0,1,.249-4.84c.275-1,.6-.813.2-1.022-.427-.22-.887.071-1.258.813A27.247,27.247,0,0,1,7.4,13.522a2.141,2.141,0,0,1-2.918.461c-.206-.174-.282.095-.026.37a2.412,2.412,0,0,0,3.387-.082A32.715,32.715,0,0,0,12.219,7.51a23.541,23.541,0,0,0,.063,3.971,11.464,11.464,0,0,1-1.964.749c-.388.1-.628.26-.635.439-.007.2.253.363.63.541.67.318,2.633,1.246,3.117,1.527.414.24.616.053.739-.207.16-.338-.279-.533-.7-.661a13.175,13.175,0,0,1-.382-2.179,7.143,7.143,0,0,0,2.547-2.454,4.7,4.7,0,0,0,.4-1.133,2.125,2.125,0,0,0,.048-.742s-.007-.054-.048-.059' transform='translate(-3.51 -3.943)'/%3E%3C/g%3E%3C/g%3E%3C/g%3E%3C/svg%3E";const _desktopLogo="data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' width='149.351' height='42' viewBox='0 0 149.351 42'%3E%3Cdefs%3E%3Cstyle%3E.a%7Bfill:none;%7D.b%7Bclip-path:url(%23a);%7D.c%7Bfill:%2300aad2;%7D.d%7Bfill:%235f6a72;%7D%3C/style%3E%3CclipPath id='a'%3E%3Crect class='a' width='149.351' height='42'/%3E%3C/clipPath%3E%3C/defs%3E%3Cg class='b'%3E%3Crect class='c' width='13.555' height='13.555' transform='translate(135.796 21.524)'/%3E%3Cpath class='d' d='M63.082,33.088c-1.383.138-2.835.277-4.357.346.553-4.357,2.835-10.373,5.671-9.405,1.66.553.761,5.671-1.314,9.059m-3.527,2.974a3.761,3.761,0,0,1-1.245,0,.851.851,0,0,0,.346-.692v-.553c.761,0,1.936-.138,3.389-.277a4.327,4.327,0,0,1-2.49,1.521M76.844,25.688c1.8-1.66,2.7-1.521,2.9-1.106.484.968-1.591,4.357-5.671,6.224a10.328,10.328,0,0,1,2.766-5.118m66.736,1.66c-.207-3.389-3.181-3.942-3.6-2.974-.138.346,1.106.207,1.106,2.628,0,3.942-4.011,9.129-9.129,9.129-5.532,0-6.985-4.357-7.261-6.432-.207-1.452.138-3.458-2.351-3.181-1.729.207-3.25,3.527-5.463,6.362-1.867,2.42-2.7,2.213-2.282.138.553-2.628,2.7-8.714,5.187-9.129,1.176-.207,1.591,1.8,2.075.553s.069-4.011-2.559-4.011c-1.8,0-3.942,1.936-5.74,4.08-1.521,1.936-9.336,13.416-12.656,10.927-1.521-1.176-1.383-5.878-.415-11.411,3.873-1.521,7.123-1.037,8.921-.138.9.415,1.037.346.622-.622-.553-1.452-3.665-3.734-8.575-2.7-.138,0-.207.069-.346.069.415-1.8.83-3.665,1.383-5.463.484-1.66,1.8-4.5-1.729-4.979-1.106-.207-.622.346-1.037,1.867-.692,2.766-1.521,6.362-2.144,10.028a19.745,19.745,0,0,0-7.538,8.091,38.59,38.59,0,0,0,.9-4.772,1.589,1.589,0,0,0-1.245-1.729c-.761-.207-1.729.138-2.628,1.452-2.144,3.043-4.841,7.815-8.99,9.82-2.974,1.452-4.288,0-4.357-2.282a9.869,9.869,0,0,0,1.521-.553c5.394-2.351,7.192-5.947,5.878-8.16-1.314-2.075-4.979-1.452-7.953,1.66a11.175,11.175,0,0,0-2.7,6.5c-1.245.277-2.628.484-4.219.692,2.49-4.08,2.282-9.613-1.383-10.581-4.288-1.106-6.432,3.043-7.331,6.5.346-3.873.9-7.745,1.591-11.549.346-1.66,1.452-4.5-2.075-4.979-1.106-.207-.968.346-.9,1.867.138,2.075-2.144,14.454-.968,19.848-1.521.484-2.144,1.66-.207,2.835,1.383.83,4.357,1.106,7.331-.346a9.3,9.3,0,0,0,2.766-2.144c1.8-.207,3.665-.553,5.394-.83.277,2.42,1.867,4.219,5.463,3.873,5.118-.484,9.682-6.777,11.411-9.82-.346,3.25-2.42,10.373,1.176,10.028,1.383-.138.83-.346.9-1.591.346-4.288,3.873-7.953,7.4-10.166-.622,5.256-.415,9.958,2.006,11.411,4.426,2.766,10.581-4.5,14.039-8.921-1.729,3.942-2.7,8.921-.138,9.682,3.043.9,5.463-4.219,8.3-8.091.346,2.766,2.213,7.607,9.682,7.607,8.022-.069,13.071-4.91,12.863-10.1m-108.3,8.645A66.439,66.439,0,0,1,27.4,32.534a59.168,59.168,0,0,0,6.777-2.974,54.453,54.453,0,0,0,1.106,6.432m20.4,3.873c-.069-.207-.622.069-1.106,0-1.452-.207-3.389-2.213-3.942-5.463-1.037-5.878-.415-11.687,1.314-20.332.346-1.66,1.452-4.5-2.075-5.048-1.106-.138-.553.415-.83,1.867C47.66,17.32,42.4,21.954,37.149,25.066,36.6,17.735,36.8,9.505,38.186,4.526c1.176-4.219,2.559-3.458.83-4.357s-3.734.277-5.325,3.458S24.839,23.89,13.221,35.439C7.273,41.317,1.879,38.274.842,37.375c-.9-.761-1.176.415-.138,1.591,4.772,5.256,11.826,2.282,14.384-.277,7.054-7.054,15.283-22.268,18.6-28.7a98.251,98.251,0,0,0,.277,16.874,50.129,50.129,0,0,1-8.3,3.181c-1.66.415-2.7,1.106-2.7,1.867s1.106,1.521,2.7,2.282c2.835,1.383,11.2,5.256,13.209,6.5,1.729,1.037,2.628.207,3.112-.9.692-1.452-1.176-2.282-2.974-2.766a60.545,60.545,0,0,1-1.66-9.267c4.219-2.628,8.437-6.086,10.788-10.443C47.522,20.916,46,33.3,49.873,38.482a5.451,5.451,0,0,0,4.564,2.213c.968-.069,1.383-.692,1.245-.83' transform='translate(-0.038 0.124)'/%3E%3C/g%3E%3C/svg%3E";function instance$U($$self,$$props,$$invalidate){let _mobile;let _tablet;let _desktop;let{heading=""}=$$props;let{url=""}=$$props;let{testid=""}=$$props;let{maxcontentwidth=""}=$$props;let _slotParentEl;let _windowWidth=window.innerWidth;let _showToggleMenu=false;let _showMenu=false;// Functions
110
- const toggleMenu=()=>$$invalidate(8,_showMenu=!_showMenu);const hideMenu=()=>$$invalidate(8,_showMenu=false);// Hooks
111
- onMount(()=>{window.addEventListener("popstate",()=>{// only hide menu for non-desktop screens
112
- setCurrentLink();if(!_desktop){hideMenu();}},true);setCurrentLink();});// Update component if the current browser url matches one of this element's child links
113
- function setCurrentLink(){if(!_slotParentEl)return;const slot=_slotParentEl.querySelector("slot");if(!slot)return;const link=slot.assignedElements().filter(el=>el.tagName==="A").map(el=>{el.classList.remove("current");return el;}).find(el=>{const href=el.href;const url=`${window.location.pathname}${window.location.search}${window.location.hash}`;return href.endsWith(url);});if(link){link.classList.add("current");}}// *Menu* children count
114
- // When in mobile mode, while the children are not visible the children are rendered in a div[display: none]
115
- // element to allow for the children count to be obtained.
116
- async function hasChildren(){var _a;await tick();if(!_slotParentEl)return;const slot=_slotParentEl===null||_slotParentEl===void 0?void 0:_slotParentEl.childNodes[0];const children=(_a=slot.assignedElements)===null||_a===void 0?void 0:_a.call(slot);if(children){return children.length>0;}else {// testing
117
- return [..._slotParentEl.querySelectorAll("a")].length>0;}}function onwindowresize(){$$invalidate(4,_windowWidth=window_1$2.innerWidth);}function div_binding($$value){binding_callbacks[$$value?'unshift':'push'](()=>{_slotParentEl=$$value;$$invalidate(6,_slotParentEl);});}function div_binding_1($$value){binding_callbacks[$$value?'unshift':'push'](()=>{_slotParentEl=$$value;$$invalidate(6,_slotParentEl);});}function div_binding_2($$value){binding_callbacks[$$value?'unshift':'push'](()=>{_slotParentEl=$$value;$$invalidate(6,_slotParentEl);});}$$self.$$set=$$props=>{if('heading'in $$props)$$invalidate(0,heading=$$props.heading);if('url'in $$props)$$invalidate(1,url=$$props.url);if('testid'in $$props)$$invalidate(2,testid=$$props.testid);if('maxcontentwidth'in $$props)$$invalidate(3,maxcontentwidth=$$props.maxcontentwidth);};$$self.$$.update=()=>{if($$self.$$.dirty&/*_windowWidth*/16){// Reactive
118
- $$invalidate(10,_mobile=_windowWidth<MOBILE_BP);}if($$self.$$.dirty&/*_windowWidth*/16){$$invalidate(9,_tablet=_windowWidth>=MOBILE_BP&&_windowWidth<TABLET_BP);}if($$self.$$.dirty&/*_windowWidth*/16){$$invalidate(5,_desktop=_windowWidth>=TABLET_BP);}if($$self.$$.dirty&/*_desktop*/32){(async()=>$$invalidate(7,_showToggleMenu=!_desktop&&(await hasChildren())))();}};return [heading,url,testid,maxcontentwidth,_windowWidth,_desktop,_slotParentEl,_showToggleMenu,_showMenu,_tablet,_mobile,toggleMenu,hideMenu,onwindowresize,div_binding,div_binding_1,div_binding_2];}class AppHeader extends SvelteElement{constructor(options){super();const style=document.createElement('style');style.textContent=`*,::slotted(*){font:var(--goa-typography-body-s)}.container{border-bottom:var(--goa-border-width-s) solid var(--goa-color-greyscale-200);background-color:var(--goa-color-greyscale-white)}.title{margin-left:var(--goa-space-s);overflow:hidden;white-space:nowrap;text-overflow:ellipsis;color:var(--goa-color-text-default)}.layout{width:100%;display:grid;grid-template-columns:1fr auto;grid-template-rows:3.375rem auto;grid-template-areas:"header menu"
119
- "links links"}.header-logo-title-area{grid-area:header;display:flex;align-items:center;padding:0 1rem;text-decoration:none}.header-logo-title-area:focus{outline:var(--goa-border-width-l) solid var(--goa-color-interactive-focus);outline-offset:calc(-1 * var(--goa-border-width-l))}.menu-toggle-area{grid-area:menu;color:var(--goa-color-text-default);align-items:center;background:transparent;border:none;cursor:pointer;display:flex;gap:0.25rem;justify-content:right;padding:1rem;text-decoration:underline}.menu-toggle-area goa-icon{scale:0.8}.menu-toggle-area:focus{outline:var(--goa-border-width-l) solid var(--goa-color-interactive-focus);outline-offset:calc(-1 * var(--goa-border-width-l))}goa-popover .menu-toggle-area:focus{outline-offset:0}.image-desktop{height:2rem}.content-area{grid-area:links}::slotted(a){display:block;margin:0;font:var(--goa-typography-body-m);text-decoration:none;color:var(--goa-color-text-default);display:block;padding:calc((3rem - var(--goa-line-height-3)) / 2) 1rem;text-decoration:none;cursor:pointer;white-space:nowrap;box-shadow:inset 0 var(--goa-border-width-s) 0 0 var(--goa-color-greyscale-200)}::slotted(a:hover){background-color:var(--goa-color-greyscale-100);color:var(--goa-color-interactive-hover)}::slotted(a:focus){outline:var(--goa-border-width-l) solid var(--goa-color-interactive-focus);outline-offset:calc(-1 * var(--goa-border-width-l))}::slotted(a.interactive){text-decoration:underline;color:var(--goa-color-interactive-default)}@media screen and (max-width: 623px){.image-desktop{display:none}.image-mobile{display:block}.show-menu{border-bottom:var(--goa-border-width-m) solid var(--goa-color-greyscale-200)}}@media screen and (max-width: 623px){@media not (max-color:2147477350){*,::slotted(*){font:var(--goa-typography-body-m)}.layout{grid-template-rows:4rem auto}.header-logo-title-area{padding:0 1.5rem}.title{margin-left:var(--goa-space-m)}.header-logo-title-area{min-height:4rem}}}@media not screen and (max-width: 623px){@media not (color:2147477350){*,::slotted(*){font:var(--goa-typography-body-m)}.layout{grid-template-rows:4rem auto}.header-logo-title-area{padding:0 1.5rem}.title{margin-left:var(--goa-space-m)}.header-logo-title-area{min-height:4rem}}}@media screen and (min-width: 624px) and (max-width: 1023px){.image-desktop{display:block}.image-mobile{display:none}}@media screen and (min-width: 1024px){.image-desktop{display:block}.image-mobile{display:none}.layout{display:grid;grid-template-columns:auto 1fr auto;grid-template-rows:auto;grid-template-areas:"header . menu";margin:0 auto;width:min(var(--max-content-width), 100%)}.header-logo-title-area{grid-area:header;display:flex;align-items:center;grid-template-rows:3.375rem auto;color:inherit;flex:1 1 auto}.content-area{grid-area:menu;display:flex;align-items:stretch}::slotted(goa-app-header-menu),::slotted(a),::slotted(a:visited){color:var(--goa-color-text-default);font-weight:var(--goa-font-weight-bold);grid-template-rows:3.375rem auto;display:inline-flex;align-items:center;padding:0 0.75rem}::slotted(goa-app-header-menu){padding:0}::slotted(a:focus-within),::slotted(goa-app-header-menu:focus-within),::slotted(a:hover),::slotted(goa-app-header-menu:hover){background:var(--goa-color-greyscale-100);cursor:pointer;color:var(--goa-color-interactive-hover)}::slotted(a:focus),::slotted(goa-app-header-menu:focus){outline:var(--goa-border-width-l) solid var(--goa-color-interactive-focus);outline-offset:calc(-1 * var(--goa-border-width-l))}::slotted(a.current){border-top:4px solid var(--goa-color-interactive-default);border-bottom:4px solid transparent}::slotted(a.current:hover){border-top:4px solid var(--goa-color-interactive-hover)}::slotted(a.interactive){font-weight:var(--goa-font-weight-medium);text-decoration:underline;color:var(--goa-color-interactive-default);padding:0 var(--goa-space-m)}::slotted(a.interactive:hover){color:var(--goa-color-interactive-hover)}::slotted(a.interactive.current){border-color:transparent;margin-left:var(--goa-space-m)}}`;this.shadowRoot.appendChild(style);init(this,{target:this.shadowRoot,props:attribute_to_object(this.attributes),customElement:true},instance$U,create_fragment$_,safe_not_equal,{heading:0,url:1,testid:2,maxcontentwidth:3},null);if(options){if(options.target){insert(options.target,this,options.anchor);}if(options.props){this.$set(options.props);flush();}}}static get observedAttributes(){return ["heading","url","testid","maxcontentwidth"];}get heading(){return this.$$.ctx[0];}set heading(heading){this.$$set({heading});flush();}get url(){return this.$$.ctx[1];}set url(url){this.$$set({url});flush();}get testid(){return this.$$.ctx[2];}set testid(testid){this.$$set({testid});flush();}get maxcontentwidth(){return this.$$.ctx[3];}set maxcontentwidth(maxcontentwidth){this.$$set({maxcontentwidth});flush();}}customElements.define("goa-app-header",AppHeader);/* src/components/badge/Badge.svelte generated by Svelte v3.59.2 */function create_else_block$c(ctx){let div;return {c(){div=element("div");set_style(div,"height","1.2rem");set_style(div,"margin-left","-0.25rem");},m(target,anchor){insert(target,div,anchor);},p:noop,d(detaching){if(detaching)detach(div);}};}// (51:2) {#if showIcon}
120
- function create_if_block_1$h(ctx){let goa_icon;let goa_icon_arialabel_value;let goa_icon_role_value;return {c(){goa_icon=element("goa-icon");set_custom_element_data(goa_icon,"arialabel",goa_icon_arialabel_value=/*showIconOnly*/ctx[9]&&/*arialabel*/ctx[3]?/*arialabel*/ctx[3]:null);set_custom_element_data(goa_icon,"role",goa_icon_role_value=/*showIconOnly*/ctx[9]&&/*arialabel*/ctx[3]?"presentation":null);set_custom_element_data(goa_icon,"type",/*iconType*/ctx[10]);set_custom_element_data(goa_icon,"size","small");},m(target,anchor){insert(target,goa_icon,anchor);},p(ctx,dirty){if(dirty&/*showIconOnly, arialabel*/520&&goa_icon_arialabel_value!==(goa_icon_arialabel_value=/*showIconOnly*/ctx[9]&&/*arialabel*/ctx[3]?/*arialabel*/ctx[3]:null)){set_custom_element_data(goa_icon,"arialabel",goa_icon_arialabel_value);}if(dirty&/*showIconOnly, arialabel*/520&&goa_icon_role_value!==(goa_icon_role_value=/*showIconOnly*/ctx[9]&&/*arialabel*/ctx[3]?"presentation":null)){set_custom_element_data(goa_icon,"role",goa_icon_role_value);}if(dirty&/*iconType*/1024){set_custom_element_data(goa_icon,"type",/*iconType*/ctx[10]);}},d(detaching){if(detaching)detach(goa_icon);}};}// (61:2) {#if content}
121
- function create_if_block$u(ctx){let div;let t;return {c(){div=element("div");t=text(/*content*/ctx[2]);attr(div,"class","goa-badge-content");},m(target,anchor){insert(target,div,anchor);append(div,t);},p(ctx,dirty){if(dirty&/*content*/4)set_data(t,/*content*/ctx[2]);},d(detaching){if(detaching)detach(div);}};}function create_fragment$Z(ctx){let div;let t;let div_style_value;let div_class_value;function select_block_type(ctx,dirty){if(/*showIcon*/ctx[8])return create_if_block_1$h;return create_else_block$c;}let current_block_type=select_block_type(ctx);let if_block0=current_block_type(ctx);let if_block1=/*content*/ctx[2]&&create_if_block$u(ctx);return {c(){div=element("div");if_block0.c();t=space();if(if_block1)if_block1.c();this.c=noop;attr(div,"style",div_style_value=calculateMargin(/*mt*/ctx[4],/*mr*/ctx[5],/*mb*/ctx[6],/*ml*/ctx[7]));attr(div,"data-testid",/*testid*/ctx[1]);attr(div,"data-type","goa-badge");attr(div,"class",div_class_value="goa-badge badge-"+/*type*/ctx[0]);toggle_class(div,"icon-only",/*showIconOnly*/ctx[9]);},m(target,anchor){insert(target,div,anchor);if_block0.m(div,null);append(div,t);if(if_block1)if_block1.m(div,null);},p(ctx,[dirty]){if(current_block_type===(current_block_type=select_block_type(ctx))&&if_block0){if_block0.p(ctx,dirty);}else {if_block0.d(1);if_block0=current_block_type(ctx);if(if_block0){if_block0.c();if_block0.m(div,t);}}if(/*content*/ctx[2]){if(if_block1){if_block1.p(ctx,dirty);}else {if_block1=create_if_block$u(ctx);if_block1.c();if_block1.m(div,null);}}else if(if_block1){if_block1.d(1);if_block1=null;}if(dirty&/*mt, mr, mb, ml*/240&&div_style_value!==(div_style_value=calculateMargin(/*mt*/ctx[4],/*mr*/ctx[5],/*mb*/ctx[6],/*ml*/ctx[7]))){attr(div,"style",div_style_value);}if(dirty&/*testid*/2){attr(div,"data-testid",/*testid*/ctx[1]);}if(dirty&/*type*/1&&div_class_value!==(div_class_value="goa-badge badge-"+/*type*/ctx[0])){attr(div,"class",div_class_value);}if(dirty&/*type, showIconOnly*/513){toggle_class(div,"icon-only",/*showIconOnly*/ctx[9]);}},i:noop,o:noop,d(detaching){if(detaching)detach(div);if_block0.d();if(if_block1)if_block1.d();}};}function instance$T($$self,$$props,$$invalidate){let showIcon;let showIconOnly;let iconType;const[Types,validateType]=typeValidator("Badge type",["success","important","information","emergency","dark","midtone","light"],true);let{type}=$$props;let{testid=""}=$$props;let{content=""}=$$props;let{icon="false"}=$$props;let{arialabel=""}=$$props;let{mt=null}=$$props;let{mr=null}=$$props;let{mb=null}=$$props;let{ml=null}=$$props;onMount(()=>{setTimeout(()=>validateType(type),1);if(!showIcon&&!content){console.warn("GoABadge must have either then content or icon property set");}if(showIconOnly&&!arialabel){console.warn("GoABadge with icon only requires an arialabel");}});$$self.$$set=$$props=>{if('type'in $$props)$$invalidate(0,type=$$props.type);if('testid'in $$props)$$invalidate(1,testid=$$props.testid);if('content'in $$props)$$invalidate(2,content=$$props.content);if('icon'in $$props)$$invalidate(11,icon=$$props.icon);if('arialabel'in $$props)$$invalidate(3,arialabel=$$props.arialabel);if('mt'in $$props)$$invalidate(4,mt=$$props.mt);if('mr'in $$props)$$invalidate(5,mr=$$props.mr);if('mb'in $$props)$$invalidate(6,mb=$$props.mb);if('ml'in $$props)$$invalidate(7,ml=$$props.ml);};$$self.$$.update=()=>{if($$self.$$.dirty&/*icon*/2048){// private
122
- $$invalidate(8,showIcon=toBoolean(icon));}if($$self.$$.dirty&/*showIcon, content*/260){$$invalidate(9,showIconOnly=showIcon&&!content);}if($$self.$$.dirty&/*type*/1){$$invalidate(10,iconType={success:"checkmark-circle",important:"alert-circle",information:"information-circle",emergency:"warning",dark:"information-circle",midtone:"information-circle",light:"information-circle"}[type]);}};return [type,testid,content,arialabel,mt,mr,mb,ml,showIcon,showIconOnly,iconType,icon];}class Badge extends SvelteElement{constructor(options){super();const style=document.createElement('style');style.textContent=`:host{box-sizing:border-box;font-family:var(--goa-font-family-sans)}.goa-badge{display:inline-flex;align-items:center;border-radius:0.25rem;padding:3px 0.5rem;gap:0.25rem;font-weight:var(--goa-font-weight-regular)}.icon-only{padding:0.25rem}.goa-badge-content{font-size:var(--goa-font-size-2);line-height:var(--goa-line-height-1);padding-bottom:var(--font-valign-fix, 0)}.goa-badge.badge-information{background-color:var(--goa-color-greyscale-100);color:var(--goa-color-info-default)}.goa-badge.badge-success{background-color:var(--goa-color-success-default);color:var(--goa-color-text-light)}.goa-badge.badge-important{background-color:var(--goa-color-warning-default);color:var(--goa-color-text-default)}.goa-badge.badge-emergency{background-color:var(--goa-color-emergency-default);color:var(--goa-color-text-light)}.goa-badge.badge-dark{background-color:var(--goa-color-greyscale-black);color:var(--goa-color-text-light)}.goa-badge.badge-midtone{background-color:var(--goa-color-greyscale-700);color:var(--goa-color-text-light)}.goa-badge.badge-light{background-color:var(--goa-color-greyscale-white);color:var(--goa-color-text-default)}`;this.shadowRoot.appendChild(style);init(this,{target:this.shadowRoot,props:attribute_to_object(this.attributes),customElement:true},instance$T,create_fragment$Z,safe_not_equal,{type:0,testid:1,content:2,icon:11,arialabel:3,mt:4,mr:5,mb:6,ml:7},null);if(options){if(options.target){insert(options.target,this,options.anchor);}if(options.props){this.$set(options.props);flush();}}}static get observedAttributes(){return ["type","testid","content","icon","arialabel","mt","mr","mb","ml"];}get type(){return this.$$.ctx[0];}set type(type){this.$$set({type});flush();}get testid(){return this.$$.ctx[1];}set testid(testid){this.$$set({testid});flush();}get content(){return this.$$.ctx[2];}set content(content){this.$$set({content});flush();}get icon(){return this.$$.ctx[11];}set icon(icon){this.$$set({icon});flush();}get arialabel(){return this.$$.ctx[3];}set arialabel(arialabel){this.$$set({arialabel});flush();}get mt(){return this.$$.ctx[4];}set mt(mt){this.$$set({mt});flush();}get mr(){return this.$$.ctx[5];}set mr(mr){this.$$set({mr});flush();}get mb(){return this.$$.ctx[6];}set mb(mb){this.$$set({mb});flush();}get ml(){return this.$$.ctx[7];}set ml(ml){this.$$set({ml});flush();}}customElements.define("goa-badge",Badge);/* src/components/block/Block.svelte generated by Svelte v3.59.2 */function create_fragment$Y(ctx){let div;let slot;let div_style_value;return {c(){div=element("div");slot=element("slot");this.c=noop;attr(div,"class","block");attr(div,"style",div_style_value=`
123
- ${calculateMargin(/*mt*/ctx[3],/*mr*/ctx[4],/*mb*/ctx[5],/*ml*/ctx[6])};
124
- --gap: var(--goa-space-${/*gap*/ctx[0]});
125
- --alignment: ${/*alignment*/ctx[2]};
126
- --direction: ${/*direction*/ctx[1]};
127
- `);},m(target,anchor){insert(target,div,anchor);append(div,slot);},p(ctx,[dirty]){if(dirty&/*mt, mr, mb, ml, gap, alignment, direction*/127&&div_style_value!==(div_style_value=`
128
- ${calculateMargin(/*mt*/ctx[3],/*mr*/ctx[4],/*mb*/ctx[5],/*ml*/ctx[6])};
129
- --gap: var(--goa-space-${/*gap*/ctx[0]});
130
- --alignment: ${/*alignment*/ctx[2]};
131
- --direction: ${/*direction*/ctx[1]};
132
- `)){attr(div,"style",div_style_value);}},i:noop,o:noop,d(detaching){if(detaching)detach(div);}};}function instance$S($$self,$$props,$$invalidate){let{gap="m"}=$$props;let{direction="row"}=$$props;let{alignment="start"}=$$props;let{mt=null}=$$props;let{mr=null}=$$props;let{mb=null}=$$props;let{ml=null}=$$props;$$self.$$set=$$props=>{if('gap'in $$props)$$invalidate(0,gap=$$props.gap);if('direction'in $$props)$$invalidate(1,direction=$$props.direction);if('alignment'in $$props)$$invalidate(2,alignment=$$props.alignment);if('mt'in $$props)$$invalidate(3,mt=$$props.mt);if('mr'in $$props)$$invalidate(4,mr=$$props.mr);if('mb'in $$props)$$invalidate(5,mb=$$props.mb);if('ml'in $$props)$$invalidate(6,ml=$$props.ml);};return [gap,direction,alignment,mt,mr,mb,ml];}class Block extends SvelteElement{constructor(options){super();const style=document.createElement('style');style.textContent=`.block{display:flex;flex-direction:var(--direction);align-items:var(--alignment);gap:var(--gap)}`;this.shadowRoot.appendChild(style);init(this,{target:this.shadowRoot,props:attribute_to_object(this.attributes),customElement:true},instance$S,create_fragment$Y,safe_not_equal,{gap:0,direction:1,alignment:2,mt:3,mr:4,mb:5,ml:6},null);if(options){if(options.target){insert(options.target,this,options.anchor);}if(options.props){this.$set(options.props);flush();}}}static get observedAttributes(){return ["gap","direction","alignment","mt","mr","mb","ml"];}get gap(){return this.$$.ctx[0];}set gap(gap){this.$$set({gap});flush();}get direction(){return this.$$.ctx[1];}set direction(direction){this.$$set({direction});flush();}get alignment(){return this.$$.ctx[2];}set alignment(alignment){this.$$set({alignment});flush();}get mt(){return this.$$.ctx[3];}set mt(mt){this.$$set({mt});flush();}get mr(){return this.$$.ctx[4];}set mr(mr){this.$$set({mr});flush();}get mb(){return this.$$.ctx[5];}set mb(mb){this.$$set({mb});flush();}get ml(){return this.$$.ctx[6];}set ml(ml){this.$$set({ml});flush();}}customElements.define("goa-block",Block);/* src/components/button/Button.svelte generated by Svelte v3.59.2 */function create_else_block$b(ctx){let t0;let span;let t1;let if_block1_anchor;let if_block0=/*leadingicon*/ctx[3]&&create_if_block_2$d(ctx);let if_block1=/*trailingicon*/ctx[4]&&create_if_block_1$g(ctx);return {c(){if(if_block0)if_block0.c();t0=space();span=element("span");span.innerHTML=`<slot></slot>`;t1=space();if(if_block1)if_block1.c();if_block1_anchor=empty();attr(span,"class","text");},m(target,anchor){if(if_block0)if_block0.m(target,anchor);insert(target,t0,anchor);insert(target,span,anchor);insert(target,t1,anchor);if(if_block1)if_block1.m(target,anchor);insert(target,if_block1_anchor,anchor);},p(ctx,dirty){if(/*leadingicon*/ctx[3]){if(if_block0){if_block0.p(ctx,dirty);}else {if_block0=create_if_block_2$d(ctx);if_block0.c();if_block0.m(t0.parentNode,t0);}}else if(if_block0){if_block0.d(1);if_block0=null;}if(/*trailingicon*/ctx[4]){if(if_block1){if_block1.p(ctx,dirty);}else {if_block1=create_if_block_1$g(ctx);if_block1.c();if_block1.m(if_block1_anchor.parentNode,if_block1_anchor);}}else if(if_block1){if_block1.d(1);if_block1=null;}},d(detaching){if(if_block0)if_block0.d(detaching);if(detaching)detach(t0);if(detaching)detach(span);if(detaching)detach(t1);if(if_block1)if_block1.d(detaching);if(detaching)detach(if_block1_anchor);}};}// (47:2) {#if type === "start"}
133
- function create_if_block$t(ctx){let span;let t;let goa_icon;return {c(){span=element("span");span.innerHTML=`<slot></slot>`;t=space();goa_icon=element("goa-icon");attr(span,"class","text");set_custom_element_data(goa_icon,"id","trailing-icon");set_custom_element_data(goa_icon,"type","arrow-forward");set_custom_element_data(goa_icon,"inverted","true");},m(target,anchor){insert(target,span,anchor);insert(target,t,anchor);insert(target,goa_icon,anchor);},p:noop,d(detaching){if(detaching)detach(span);if(detaching)detach(t);if(detaching)detach(goa_icon);}};}// (53:4) {#if leadingicon}
134
- function create_if_block_2$d(ctx){let goa_icon;return {c(){goa_icon=element("goa-icon");set_custom_element_data(goa_icon,"id","leading-icon");set_custom_element_data(goa_icon,"type",/*leadingicon*/ctx[3]);set_custom_element_data(goa_icon,"inverted",/*isButtonDark*/ctx[11]);},m(target,anchor){insert(target,goa_icon,anchor);},p(ctx,dirty){if(dirty&/*leadingicon*/8){set_custom_element_data(goa_icon,"type",/*leadingicon*/ctx[3]);}if(dirty&/*isButtonDark*/2048){set_custom_element_data(goa_icon,"inverted",/*isButtonDark*/ctx[11]);}},d(detaching){if(detaching)detach(goa_icon);}};}// (59:4) {#if trailingicon}
135
- function create_if_block_1$g(ctx){let goa_icon;return {c(){goa_icon=element("goa-icon");set_custom_element_data(goa_icon,"id","trailing-icon");set_custom_element_data(goa_icon,"type",/*trailingicon*/ctx[4]);set_custom_element_data(goa_icon,"inverted",/*isButtonDark*/ctx[11]);},m(target,anchor){insert(target,goa_icon,anchor);},p(ctx,dirty){if(dirty&/*trailingicon*/16){set_custom_element_data(goa_icon,"type",/*trailingicon*/ctx[4]);}if(dirty&/*isButtonDark*/2048){set_custom_element_data(goa_icon,"inverted",/*isButtonDark*/ctx[11]);}},d(detaching){if(detaching)detach(goa_icon);}};}function create_fragment$X(ctx){let button;let button_class_value;let button_style_value;let button_type_value;let mounted;let dispose;function select_block_type(ctx,dirty){if(/*type*/ctx[0]==="start")return create_if_block$t;return create_else_block$b;}let current_block_type=select_block_type(ctx);let if_block=current_block_type(ctx);return {c(){button=element("button");if_block.c();this.c=noop;attr(button,"class",button_class_value=""+(/*type*/ctx[0]+" "+/*size*/ctx[1]+" "+/*variant*/ctx[2]));attr(button,"style",button_style_value=calculateMargin(/*mt*/ctx[6],/*mr*/ctx[7],/*mb*/ctx[8],/*ml*/ctx[9]));button.disabled=/*isDisabled*/ctx[10];attr(button,"data-testid",/*testid*/ctx[5]);attr(button,"type",button_type_value=/*type*/ctx[0]=="submit"?/*type*/ctx[0]:"button");toggle_class(button,"leading",/*leadingicon*/ctx[3]);toggle_class(button,"trailing",/*trailingicon*/ctx[4]||/*type*/ctx[0]==="start");},m(target,anchor){insert(target,button,anchor);if_block.m(button,null);if(!mounted){dispose=[listen(button,"click",/*clickHandler*/ctx[12]),listen(button,"click",/*clickHandler*/ctx[12])];mounted=true;}},p(ctx,[dirty]){if(current_block_type===(current_block_type=select_block_type(ctx))&&if_block){if_block.p(ctx,dirty);}else {if_block.d(1);if_block=current_block_type(ctx);if(if_block){if_block.c();if_block.m(button,null);}}if(dirty&/*type, size, variant*/7&&button_class_value!==(button_class_value=""+(/*type*/ctx[0]+" "+/*size*/ctx[1]+" "+/*variant*/ctx[2]))){attr(button,"class",button_class_value);}if(dirty&/*mt, mr, mb, ml*/960&&button_style_value!==(button_style_value=calculateMargin(/*mt*/ctx[6],/*mr*/ctx[7],/*mb*/ctx[8],/*ml*/ctx[9]))){attr(button,"style",button_style_value);}if(dirty&/*isDisabled*/1024){button.disabled=/*isDisabled*/ctx[10];}if(dirty&/*testid*/32){attr(button,"data-testid",/*testid*/ctx[5]);}if(dirty&/*type*/1&&button_type_value!==(button_type_value=/*type*/ctx[0]=="submit"?/*type*/ctx[0]:"button")){attr(button,"type",button_type_value);}if(dirty&/*type, size, variant, leadingicon*/15){toggle_class(button,"leading",/*leadingicon*/ctx[3]);}if(dirty&/*type, size, variant, trailingicon, type*/23){toggle_class(button,"trailing",/*trailingicon*/ctx[4]||/*type*/ctx[0]==="start");}},i:noop,o:noop,d(detaching){if(detaching)detach(button);if_block.d();mounted=false;run_all(dispose);}};}function instance$R($$self,$$props,$$invalidate){let isDisabled;let isButtonDark;const[Types,validateType]=typeValidator("Button type",["primary","submit","secondary","tertiary","start"],true);const[Sizes,validateSize]=typeValidator("Button size",["normal","compact"],true);const[Variants,validateVariant]=typeValidator("Button variant",["normal","destructive"],true);let{type="primary"}=$$props;let{size="normal"}=$$props;let{variant="normal"}=$$props;let{disabled="false"}=$$props;let{leadingicon=null}=$$props;let{trailingicon=null}=$$props;let{testid=""}=$$props;let{mt=null}=$$props;let{mr=null}=$$props;let{mb=null}=$$props;let{ml=null}=$$props;function clickHandler(e){if(!isDisabled){this.dispatchEvent(new CustomEvent("_click",{composed:true,bubbles:true}));}}onMount(()=>{validateType(type);validateSize(size);validateVariant(variant);});$$self.$$set=$$props=>{if('type'in $$props)$$invalidate(0,type=$$props.type);if('size'in $$props)$$invalidate(1,size=$$props.size);if('variant'in $$props)$$invalidate(2,variant=$$props.variant);if('disabled'in $$props)$$invalidate(13,disabled=$$props.disabled);if('leadingicon'in $$props)$$invalidate(3,leadingicon=$$props.leadingicon);if('trailingicon'in $$props)$$invalidate(4,trailingicon=$$props.trailingicon);if('testid'in $$props)$$invalidate(5,testid=$$props.testid);if('mt'in $$props)$$invalidate(6,mt=$$props.mt);if('mr'in $$props)$$invalidate(7,mr=$$props.mr);if('mb'in $$props)$$invalidate(8,mb=$$props.mb);if('ml'in $$props)$$invalidate(9,ml=$$props.ml);};$$self.$$.update=()=>{if($$self.$$.dirty&/*disabled*/8192){$$invalidate(10,isDisabled=toBoolean(disabled));}if($$self.$$.dirty&/*type*/1){$$invalidate(11,isButtonDark=type==="primary"||type==="start");}};return [type,size,variant,leadingicon,trailingicon,testid,mt,mr,mb,ml,isDisabled,isButtonDark,clickHandler,disabled];}class Button extends SvelteElement{constructor(options){super();const style=document.createElement('style');style.textContent=`:host{--button-height:2.625rem;--button-height-compact:2rem;--button-height-tall:3.25rem;box-sizing:border-box;font-family:var(--goa-font-family-sans)}@media screen and (max-width: 623px){:host{width:100%}button{width:100%}}button{display:inline-flex;box-sizing:border-box;border-radius:0.25rem;border:2px solid var(--goa-color-interactive-default);box-sizing:border-box;cursor:pointer;font-family:var(--goa-font-family-sans);font-size:var(--goa-font-size-5);font-weight:400;height:var(--button-height);letter-spacing:var(--goa-letter-spacing-button);line-height:100%;padding:0 0.75rem;white-space:nowrap;gap:0.5rem;align-items:center;justify-content:center;transition:transform 0.1s ease-in-out, background-color 0.2s ease-in-out,
136
- border-color 0.2s ease-in-out}.text{padding-bottom:var(--font-valign-fix, 0)}button:disabled{pointer-events:none;opacity:0.5}button.compact{height:var(--button-height-compact);font-size:var(--goa-font-size-4);padding-left:var(--goa-space-xs);padding-right:var(--goa-space-xs)}button.start{height:var(--button-height-tall);font-weight:var(--goa-font-weight-bold)}button.start,button.submit,button.primary{border:2px solid var(--goa-color-interactive-default);background-color:var(--goa-color-interactive-default);color:var(--goa-color-text-light)}button.start:hover,button.submit:hover,button.primary:hover{border-color:var(--goa-color-interactive-hover);background-color:var(--goa-color-interactive-hover)}button.start:focus,button.start:active,button.submit:focus,button.submit:active,button.primary:focus,button.primary:active{box-shadow:0 0 0 3px var(--goa-color-interactive-focus);border-color:var(--goa-color-interactive-hover);background-color:var(--goa-color-interactive-hover);outline:none}button.secondary{border:2px solid var(--goa-color-interactive-default);background-color:var(--goa-color-greyscale-white);color:var(--goa-color-interactive-default)}button.secondary:hover{border-color:var(--goa-color-interactive-hover);color:var(--goa-color-interactive-hover);background-color:var(--goa-color-greyscale-100)}button.secondary:focus,button.secondary:active{border-color:var(--goa-color-interactive-hover);box-shadow:0 0 0 3px var(--goa-color-interactive-focus);background-color:var(--goa-color-greyscale-100);outline:none}button.tertiary{border:1px solid transparent;background-color:transparent;color:var(--goa-color-interactive-default);text-decoration:underline}button.tertiary:hover{border-color:var(--goa-color-greyscale-100);color:var(--goa-color-interactive-hover);background-color:var(--goa-color-greyscale-100)}button.tertiary:focus,button.tertiary:active{border-color:var(--goa-color-greyscale-100);background-color:var(--goa-color-greyscale-100);color:var(--goa-color-interactive-hover);box-shadow:0 0 0 3px var(--goa-color-interactive-focus);outline:none}.submit.destructive,.primary.destructive{color:var(--goa-color-greyscale-white);background-color:var(--goa-color-emergency-default);border-color:var(--goa-color-emergency-default)}.submit.destructive:hover,.primary.destructive:hover{background-color:var(--goa-color-emergency-dark);border-color:var(--goa-color-emergency-dark)}.submit.destructive:focus,.primary.destructive:focus,.primary.destructive:active{background-color:var(--goa-color-emergency-dark);border-color:var(--goa-color-emergency-dark)}.secondary.destructive{color:var(--goa-color-emergency-default);border-color:var(--goa-color-emergency-default);background-color:var(--goa-color-greyscale-white)}.secondary.destructive:hover{border-color:var(--goa-color-emergency-dark);color:var(--goa-color-emergency-dark);background-color:var(--goa-color-greyscale-white)}.secondary.destructive:focus,.secondary.destructive:active{color:var(--goa-color-emergency-dark);border-color:var(--goa-color-emergency-dark);background-color:var(--goa-color-greyscale-white)}.tertiary.destructive{color:var(--goa-color-emergency-default);border-color:transparent}.tertiary.destructive:hover{color:var(--goa-color-emergency-dark)}.tertiary.destructive:focus,.tertiary.destructive:active{color:var(--goa-color-emergency-dark)}`;this.shadowRoot.appendChild(style);init(this,{target:this.shadowRoot,props:attribute_to_object(this.attributes),customElement:true},instance$R,create_fragment$X,safe_not_equal,{type:0,size:1,variant:2,disabled:13,leadingicon:3,trailingicon:4,testid:5,mt:6,mr:7,mb:8,ml:9},null);if(options){if(options.target){insert(options.target,this,options.anchor);}if(options.props){this.$set(options.props);flush();}}}static get observedAttributes(){return ["type","size","variant","disabled","leadingicon","trailingicon","testid","mt","mr","mb","ml"];}get type(){return this.$$.ctx[0];}set type(type){this.$$set({type});flush();}get size(){return this.$$.ctx[1];}set size(size){this.$$set({size});flush();}get variant(){return this.$$.ctx[2];}set variant(variant){this.$$set({variant});flush();}get disabled(){return this.$$.ctx[13];}set disabled(disabled){this.$$set({disabled});flush();}get leadingicon(){return this.$$.ctx[3];}set leadingicon(leadingicon){this.$$set({leadingicon});flush();}get trailingicon(){return this.$$.ctx[4];}set trailingicon(trailingicon){this.$$set({trailingicon});flush();}get testid(){return this.$$.ctx[5];}set testid(testid){this.$$set({testid});flush();}get mt(){return this.$$.ctx[6];}set mt(mt){this.$$set({mt});flush();}get mr(){return this.$$.ctx[7];}set mr(mr){this.$$set({mr});flush();}get mb(){return this.$$.ctx[8];}set mb(mb){this.$$set({mb});flush();}get ml(){return this.$$.ctx[9];}set ml(ml){this.$$set({ml});flush();}}customElements.define("goa-button",Button);/* src/components/button-group/ButtonGroup.svelte generated by Svelte v3.59.2 */function create_fragment$W(ctx){let div;let slot;let div_style_value;return {c(){div=element("div");slot=element("slot");this.c=noop;attr(div,"data-testid",/*testid*/ctx[1]);attr(div,"style",div_style_value=""+(calculateMargin(/*mt*/ctx[2],/*mr*/ctx[3],/*mb*/ctx[4],/*ml*/ctx[5])+"; --alignment: "+/*_alignment*/ctx[6]+"; --gap-size: "+(/*gap*/ctx[0]==="relaxed"?"1rem":"0.75rem")));},m(target,anchor){insert(target,div,anchor);append(div,slot);},p(ctx,[dirty]){if(dirty&/*testid*/2){attr(div,"data-testid",/*testid*/ctx[1]);}if(dirty&/*mt, mr, mb, ml, _alignment, gap*/125&&div_style_value!==(div_style_value=""+(calculateMargin(/*mt*/ctx[2],/*mr*/ctx[3],/*mb*/ctx[4],/*ml*/ctx[5])+"; --alignment: "+/*_alignment*/ctx[6]+"; --gap-size: "+(/*gap*/ctx[0]==="relaxed"?"1rem":"0.75rem")))){attr(div,"style",div_style_value);}},i:noop,o:noop,d(detaching){if(detaching)detach(div);}};}function instance$Q($$self,$$props,$$invalidate){let _alignment;let{alignment="start"}=$$props;let{gap="relaxed"}=$$props;let{testid=""}=$$props;let{mt=null}=$$props;let{mr=null}=$$props;let{mb=null}=$$props;let{ml=null}=$$props;const[BUTTON_ALIGNMENTS,validateAlignment]=typeValidator("alignment",["start","end","center"]);const[GAPS,validateGap]=typeValidator("gap",["relaxed","compact"]);onMount(()=>{validateAlignment(alignment);validateGap(gap);});$$self.$$set=$$props=>{if('alignment'in $$props)$$invalidate(7,alignment=$$props.alignment);if('gap'in $$props)$$invalidate(0,gap=$$props.gap);if('testid'in $$props)$$invalidate(1,testid=$$props.testid);if('mt'in $$props)$$invalidate(2,mt=$$props.mt);if('mr'in $$props)$$invalidate(3,mr=$$props.mr);if('mb'in $$props)$$invalidate(4,mb=$$props.mb);if('ml'in $$props)$$invalidate(5,ml=$$props.ml);};$$self.$$.update=()=>{if($$self.$$.dirty&/*alignment*/128){$$invalidate(6,_alignment={start:"flex-start",end:"flex-end",center:"center"}[alignment]);}};return [gap,testid,mt,mr,mb,ml,_alignment,alignment];}class ButtonGroup extends SvelteElement{constructor(options){super();const style=document.createElement('style');style.textContent=`:host{box-sizing:border-box;font-family:var(--goa-font-family-sans)}div{display:flex;flex-direction:row;justify-content:var(--alignment);align-items:center;flex-wrap:wrap;gap:var(--gap-size);padding:3px 0}`;this.shadowRoot.appendChild(style);init(this,{target:this.shadowRoot,props:attribute_to_object(this.attributes),customElement:true},instance$Q,create_fragment$W,safe_not_equal,{alignment:7,gap:0,testid:1,mt:2,mr:3,mb:4,ml:5},null);if(options){if(options.target){insert(options.target,this,options.anchor);}if(options.props){this.$set(options.props);flush();}}}static get observedAttributes(){return ["alignment","gap","testid","mt","mr","mb","ml"];}get alignment(){return this.$$.ctx[7];}set alignment(alignment){this.$$set({alignment});flush();}get gap(){return this.$$.ctx[0];}set gap(gap){this.$$set({gap});flush();}get testid(){return this.$$.ctx[1];}set testid(testid){this.$$set({testid});flush();}get mt(){return this.$$.ctx[2];}set mt(mt){this.$$set({mt});flush();}get mr(){return this.$$.ctx[3];}set mr(mr){this.$$set({mr});flush();}get mb(){return this.$$.ctx[4];}set mb(mb){this.$$set({mb});flush();}get ml(){return this.$$.ctx[5];}set ml(ml){this.$$set({ml});flush();}}customElements.define("goa-button-group",ButtonGroup);/* src/components/callout/Callout.svelte generated by Svelte v3.59.2 */function create_if_block$s(ctx){let h3;let t;return {c(){h3=element("h3");t=text(/*heading*/ctx[5]);toggle_class(h3,"medium",/*isMediumCallout*/ctx[9]);},m(target,anchor){insert(target,h3,anchor);append(h3,t);},p(ctx,dirty){if(dirty&/*heading*/32)set_data(t,/*heading*/ctx[5]);if(dirty&/*isMediumCallout*/512){toggle_class(h3,"medium",/*isMediumCallout*/ctx[9]);}},d(detaching){if(detaching)detach(h3);}};}function create_fragment$V(ctx){let div;let span0;let goa_icon;let goa_icon_inverted_value;let span0_class_value;let t0;let span1;let t1;let slot;let div_style_value;let mounted;let dispose;add_render_callback(/*onwindowresize*/ctx[12]);let if_block=/*heading*/ctx[5]&&create_if_block$s(ctx);return {c(){div=element("div");span0=element("span");goa_icon=element("goa-icon");t0=space();span1=element("span");if(if_block)if_block.c();t1=space();slot=element("slot");this.c=noop;set_custom_element_data(goa_icon,"type",/*iconType*/ctx[10]);set_custom_element_data(goa_icon,"size",/*iconSize*/ctx[8]);set_custom_element_data(goa_icon,"inverted",goa_icon_inverted_value=/*type*/ctx[4]==="important"?"false":"true");attr(span0,"class",span0_class_value="icon "+/*type*/ctx[4]);attr(span1,"class","content");attr(div,"style",div_style_value=calculateMargin(/*mt*/ctx[0],/*mr*/ctx[1],/*mb*/ctx[2],/*ml*/ctx[3]));attr(div,"class","notification");attr(div,"data-testid",/*testid*/ctx[6]);toggle_class(div,"medium",/*isMediumCallout*/ctx[9]);},m(target,anchor){insert(target,div,anchor);append(div,span0);append(span0,goa_icon);append(div,t0);append(div,span1);if(if_block)if_block.m(span1,null);append(span1,t1);append(span1,slot);if(!mounted){dispose=listen(window,"resize",/*onwindowresize*/ctx[12]);mounted=true;}},p(ctx,[dirty]){if(dirty&/*iconType*/1024){set_custom_element_data(goa_icon,"type",/*iconType*/ctx[10]);}if(dirty&/*iconSize*/256){set_custom_element_data(goa_icon,"size",/*iconSize*/ctx[8]);}if(dirty&/*type*/16&&goa_icon_inverted_value!==(goa_icon_inverted_value=/*type*/ctx[4]==="important"?"false":"true")){set_custom_element_data(goa_icon,"inverted",goa_icon_inverted_value);}if(dirty&/*type*/16&&span0_class_value!==(span0_class_value="icon "+/*type*/ctx[4])){attr(span0,"class",span0_class_value);}if(/*heading*/ctx[5]){if(if_block){if_block.p(ctx,dirty);}else {if_block=create_if_block$s(ctx);if_block.c();if_block.m(span1,t1);}}else if(if_block){if_block.d(1);if_block=null;}if(dirty&/*mt, mr, mb, ml*/15&&div_style_value!==(div_style_value=calculateMargin(/*mt*/ctx[0],/*mr*/ctx[1],/*mb*/ctx[2],/*ml*/ctx[3]))){attr(div,"style",div_style_value);}if(dirty&/*testid*/64){attr(div,"data-testid",/*testid*/ctx[6]);}if(dirty&/*isMediumCallout*/512){toggle_class(div,"medium",/*isMediumCallout*/ctx[9]);}},i:noop,o:noop,d(detaching){if(detaching)detach(div);if(if_block)if_block.d();mounted=false;dispose();}};}function instance$P($$self,$$props,$$invalidate){let isMediumCallout;let iconType;const[Types,validateType]=typeValidator("Callout type",["emergency","important","information","event","success"],true);const[CalloutSizes,validateCalloutSize]=typeValidator("Callout size",["medium","large"]);let{mt=null}=$$props;let{mr=null}=$$props;let{mb="l"}=$$props;let{ml=null}=$$props;let{size="large"}=$$props;let{type}=$$props;let{heading=""}=$$props;let{testid=""}=$$props;let screenSize=0;let iconSize="medium";onMount(()=>{validateCalloutSize(size);setTimeout(()=>{validateType(type);$$invalidate(8,iconSize=isMediumCallout?"small":"medium");});});function onwindowresize(){$$invalidate(7,screenSize=window.innerWidth);}$$self.$$set=$$props=>{if('mt'in $$props)$$invalidate(0,mt=$$props.mt);if('mr'in $$props)$$invalidate(1,mr=$$props.mr);if('mb'in $$props)$$invalidate(2,mb=$$props.mb);if('ml'in $$props)$$invalidate(3,ml=$$props.ml);if('size'in $$props)$$invalidate(11,size=$$props.size);if('type'in $$props)$$invalidate(4,type=$$props.type);if('heading'in $$props)$$invalidate(5,heading=$$props.heading);if('testid'in $$props)$$invalidate(6,testid=$$props.testid);};$$self.$$.update=()=>{if($$self.$$.dirty&/*screenSize, size*/2176){$$invalidate(9,isMediumCallout=screenSize<MOBILE_BP||size==="medium");}if($$self.$$.dirty&/*type*/16){$$invalidate(10,iconType=type==="emergency"?"warning":type==="important"?"alert-circle":type==="information"?"information-circle":type==="success"?"checkmark-circle":type==="event"?"calendar":"");}};return [mt,mr,mb,ml,type,heading,testid,screenSize,iconSize,isMediumCallout,iconType,size,onwindowresize];}class Callout extends SvelteElement{constructor(options){super();const style=document.createElement('style');style.textContent=`:host{box-sizing:border-box;font-family:var(--goa-font-family-sans)}.notification{display:flex;align-items:stretch;overflow:hidden;font:var(--goa-typography-body-m)}h3{font-size:var(--goa-font-size-7);line-height:var(--goa-line-height-2);font-weight:var(--goa-font-weight-regular);margin-top:var(--goa-space-none);margin-bottom:var(--goa-space-m)}.emergency{background-color:var(--goa-color-emergency-default)}.important{background-color:var(--goa-color-warning-default)}.information{background-color:var(--goa-color-info-default)}.event{background-color:var(--goa-color-info-default)}.success{background-color:var(--goa-color-success-default)}.icon{text-align:center;padding-top:var(--goa-space-l);padding-left:var(--goa-space-s);padding-right:var(--goa-space-s)}.content{flex:1 1 auto;background-color:var(--goa-color-greyscale-100);padding:var(--goa-space-l)}.notification.medium{font:var(--goa-typography-body-s)}h3.medium{font:var(--goa-typography-heading-xs);margin-bottom:var(--goa-space-2xs)}.notification.medium .content{padding:var(--goa-space-s);margin-top:calc(-1 * var(--goa-space-3xs))}.notification.medium .icon{padding-top:var(--goa-space-s);padding-left:var(--goa-space-2xs);padding-right:var(--goa-space-2xs)}`;this.shadowRoot.appendChild(style);init(this,{target:this.shadowRoot,props:attribute_to_object(this.attributes),customElement:true},instance$P,create_fragment$V,safe_not_equal,{mt:0,mr:1,mb:2,ml:3,size:11,type:4,heading:5,testid:6},null);if(options){if(options.target){insert(options.target,this,options.anchor);}if(options.props){this.$set(options.props);flush();}}}static get observedAttributes(){return ["mt","mr","mb","ml","size","type","heading","testid"];}get mt(){return this.$$.ctx[0];}set mt(mt){this.$$set({mt});flush();}get mr(){return this.$$.ctx[1];}set mr(mr){this.$$set({mr});flush();}get mb(){return this.$$.ctx[2];}set mb(mb){this.$$set({mb});flush();}get ml(){return this.$$.ctx[3];}set ml(ml){this.$$set({ml});flush();}get size(){return this.$$.ctx[11];}set size(size){this.$$set({size});flush();}get type(){return this.$$.ctx[4];}set type(type){this.$$set({type});flush();}get heading(){return this.$$.ctx[5];}set heading(heading){this.$$set({heading});flush();}get testid(){return this.$$.ctx[6];}set testid(testid){this.$$set({testid});flush();}}customElements.define("goa-callout",Callout);/* src/components/card-actions/CardActions.svelte generated by Svelte v3.59.2 */function create_fragment$U(ctx){let goa_card_content;return {c(){goa_card_content=element("goa-card-content");goa_card_content.innerHTML=`<goa-button-group alignment="end"><slot></slot></goa-button-group>`;this.c=noop;},m(target,anchor){insert(target,goa_card_content,anchor);},p:noop,i:noop,o:noop,d(detaching){if(detaching)detach(goa_card_content);}};}class CardActions extends SvelteElement{constructor(options){super();init(this,{target:this.shadowRoot,props:attribute_to_object(this.attributes),customElement:true},null,create_fragment$U,safe_not_equal,{},null);if(options){if(options.target){insert(options.target,this,options.anchor);}}}}customElements.define("goa-card-actions",CardActions);/* src/components/card/Card.svelte generated by Svelte v3.59.2 */function create_fragment$T(ctx){let div;let slot;let div_style_value;return {c(){div=element("div");slot=element("slot");this.c=noop;attr(div,"data-testid",/*testid*/ctx[7]);attr(div,"class","card");attr(div,"style",div_style_value="--width: "+/*width*/ctx[1]+"; --height: "+(/*height*/ctx[2]==='auto'?'auto':'100%')+"; "+calculateMargin(/*mt*/ctx[3],/*mr*/ctx[4],/*mb*/ctx[5],/*ml*/ctx[6])+" "+(/*elevation*/ctx[0]===0?`border: 1px solid var(--goa-color-greyscale-200);`:`box-shadow: var(--shadow-${/*elevation*/ctx[0]});`)+"");},m(target,anchor){insert(target,div,anchor);append(div,slot);},p(ctx,[dirty]){if(dirty&/*testid*/128){attr(div,"data-testid",/*testid*/ctx[7]);}if(dirty&/*width, height, mt, mr, mb, ml, elevation*/127&&div_style_value!==(div_style_value="--width: "+/*width*/ctx[1]+"; --height: "+(/*height*/ctx[2]==='auto'?'auto':'100%')+"; "+calculateMargin(/*mt*/ctx[3],/*mr*/ctx[4],/*mb*/ctx[5],/*ml*/ctx[6])+" "+(/*elevation*/ctx[0]===0?`border: 1px solid var(--goa-color-greyscale-200);`:`box-shadow: var(--shadow-${/*elevation*/ctx[0]});`)+"")){attr(div,"style",div_style_value);}},i:noop,o:noop,d(detaching){if(detaching)detach(div);}};}function instance$O($$self,$$props,$$invalidate){let{elevation=0}=$$props;let{width="100%"}=$$props;let{height="auto"}=$$props;let{mt=null}=$$props;let{mr=null}=$$props;let{mb=null}=$$props;let{ml=null}=$$props;let{testid=""}=$$props;$$self.$$set=$$props=>{if('elevation'in $$props)$$invalidate(0,elevation=$$props.elevation);if('width'in $$props)$$invalidate(1,width=$$props.width);if('height'in $$props)$$invalidate(2,height=$$props.height);if('mt'in $$props)$$invalidate(3,mt=$$props.mt);if('mr'in $$props)$$invalidate(4,mr=$$props.mr);if('mb'in $$props)$$invalidate(5,mb=$$props.mb);if('ml'in $$props)$$invalidate(6,ml=$$props.ml);if('testid'in $$props)$$invalidate(7,testid=$$props.testid);};return [elevation,width,height,mt,mr,mb,ml,testid];}class Card extends SvelteElement{constructor(options){super();const style=document.createElement('style');style.textContent=`:host{box-sizing:border-box;font-family:var(--goa-font-family-sans)}.card{background-color:var(--goa-color-greyscale-white);border-radius:4px;overflow:hidden;height:var(--height)}@media screen and (max-width: 623px){@media not (max-color:2147477350){.card{margin:0 auto}}}@media not screen and (max-width: 623px){@media not (color:2147477350){.card{margin:0 auto}}}`;this.shadowRoot.appendChild(style);init(this,{target:this.shadowRoot,props:attribute_to_object(this.attributes),customElement:true},instance$O,create_fragment$T,safe_not_equal,{elevation:0,width:1,height:2,mt:3,mr:4,mb:5,ml:6,testid:7},null);if(options){if(options.target){insert(options.target,this,options.anchor);}if(options.props){this.$set(options.props);flush();}}}static get observedAttributes(){return ["elevation","width","height","mt","mr","mb","ml","testid"];}get elevation(){return this.$$.ctx[0];}set elevation(elevation){this.$$set({elevation});flush();}get width(){return this.$$.ctx[1];}set width(width){this.$$set({width});flush();}get height(){return this.$$.ctx[2];}set height(height){this.$$set({height});flush();}get mt(){return this.$$.ctx[3];}set mt(mt){this.$$set({mt});flush();}get mr(){return this.$$.ctx[4];}set mr(mr){this.$$set({mr});flush();}get mb(){return this.$$.ctx[5];}set mb(mb){this.$$set({mb});flush();}get ml(){return this.$$.ctx[6];}set ml(ml){this.$$set({ml});flush();}get testid(){return this.$$.ctx[7];}set testid(testid){this.$$set({testid});flush();}}customElements.define("goa-card",Card);/* src/components/card-content/CardContent.svelte generated by Svelte v3.59.2 */function create_fragment$S(ctx){let div;return {c(){div=element("div");div.innerHTML=`<slot></slot>`;this.c=noop;attr(div,"class","card-content");},m(target,anchor){insert(target,div,anchor);},p:noop,i:noop,o:noop,d(detaching){if(detaching)detach(div);}};}class CardContent extends SvelteElement{constructor(options){super();const style=document.createElement('style');style.textContent=`:host{box-sizing:border-box;font-family:var(--goa-font-family-sans)}.card-content{padding:1rem}`;this.shadowRoot.appendChild(style);init(this,{target:this.shadowRoot,props:attribute_to_object(this.attributes),customElement:true},null,create_fragment$S,safe_not_equal,{},null);if(options){if(options.target){insert(options.target,this,options.anchor);}}}}customElements.define("goa-card-content",CardContent);/* src/components/card-group/CardGroup.svelte generated by Svelte v3.59.2 */function create_fragment$R(ctx){let div;return {c(){div=element("div");div.innerHTML=`<slot></slot>`;this.c=noop;attr(div,"class","card-group");},m(target,anchor){insert(target,div,anchor);},p:noop,i:noop,o:noop,d(detaching){if(detaching)detach(div);}};}class CardGroup extends SvelteElement{constructor(options){super();const style=document.createElement('style');style.textContent=`:host{box-sizing:border-box;font-family:var(--goa-font-family-sans)}.card-group{display:flex;flex-wrap:wrap;justify-content:space-around;gap:1rem;width:100%}`;this.shadowRoot.appendChild(style);init(this,{target:this.shadowRoot,props:attribute_to_object(this.attributes),customElement:true},null,create_fragment$R,safe_not_equal,{},null);if(options){if(options.target){insert(options.target,this,options.anchor);}}}}customElements.define("goa-card-group",CardGroup);/* src/components/card-image/CardImage.svelte generated by Svelte v3.59.2 */function create_fragment$Q(ctx){let div;return {c(){div=element("div");this.c=noop;set_style(div,"background-image","url("+/*src*/ctx[0]+")");set_style(div,"height",/*height*/ctx[1]);set_style(div,"background-size","cover");set_style(div,"background-position","center");},m(target,anchor){insert(target,div,anchor);},p(ctx,[dirty]){if(dirty&/*src*/1){set_style(div,"background-image","url("+/*src*/ctx[0]+")");}if(dirty&/*height*/2){set_style(div,"height",/*height*/ctx[1]);}},i:noop,o:noop,d(detaching){if(detaching)detach(div);}};}function instance$N($$self,$$props,$$invalidate){let{src}=$$props;let{height="100%"}=$$props;$$self.$$set=$$props=>{if('src'in $$props)$$invalidate(0,src=$$props.src);if('height'in $$props)$$invalidate(1,height=$$props.height);};return [src,height];}class CardImage extends SvelteElement{constructor(options){super();const style=document.createElement('style');style.textContent=`:host{box-sizing:border-box;font-family:var(--goa-font-family-sans)}`;this.shadowRoot.appendChild(style);init(this,{target:this.shadowRoot,props:attribute_to_object(this.attributes),customElement:true},instance$N,create_fragment$Q,safe_not_equal,{src:0,height:1},null);if(options){if(options.target){insert(options.target,this,options.anchor);}if(options.props){this.$set(options.props);flush();}}}static get observedAttributes(){return ["src","height"];}get src(){return this.$$.ctx[0];}set src(src){this.$$set({src});flush();}get height(){return this.$$.ctx[1];}set height(height){this.$$set({height});flush();}}customElements.define("goa-card-image",CardImage);/* src/components/checkbox/Checkbox.svelte generated by Svelte v3.59.2 */function create_if_block_2$c(ctx){let svg;let path;return {c(){svg=svg_element("svg");path=svg_element("path");attr(path,"d","M5.09,9.64,1.27,5.82,0,7.09l5.09,5.09L16,1.27,14.73,0Z");attr(svg,"id","checkmark");attr(svg,"data-testid","checkmark");attr(svg,"xmlns","http://www.w3.org/2000/svg");attr(svg,"viewBox","0 0 16 12.18");},m(target,anchor){insert(target,svg,anchor);append(svg,path);},d(detaching){if(detaching)detach(svg);}};}// (76:4) {#if isIndeterminate}
137
- function create_if_block_1$f(ctx){let svg;let rect;return {c(){svg=svg_element("svg");rect=svg_element("rect");attr(rect,"width","15");attr(rect,"height","2");attr(svg,"id","dashmark");attr(svg,"data-testid","dashmark");attr(svg,"xmlns","http://www.w3.org/2000/svg");attr(svg,"viewBox","0 0 15 2");},m(target,anchor){insert(target,svg,anchor);append(svg,rect);},d(detaching){if(detaching)detach(svg);}};}// (104:0) {#if description}
138
- function create_if_block$r(ctx){let div;let t;return {c(){div=element("div");t=text(/*description*/ctx[5]);attr(div,"class","description-text");attr(div,"id",/*_descriptionId*/ctx[11]);attr(div,"data-testid","description");},m(target,anchor){insert(target,div,anchor);append(div,t);},p(ctx,dirty){if(dirty&/*description*/32)set_data(t,/*description*/ctx[5]);if(dirty&/*_descriptionId*/2048){attr(div,"id",/*_descriptionId*/ctx[11]);}},d(detaching){if(detaching)detach(div);}};}function create_fragment$P(ctx){let div3;let label;let div0;let input;let input_value_value;let input_aria_label_value;let input_aria_describedby_value;let t0;let t1;let div2;let div1;let slot;let t2;let t3;let div3_style_value;let mounted;let dispose;function select_block_type(ctx,dirty){if(/*isIndeterminate*/ctx[13])return create_if_block_1$f;if(/*isChecked*/ctx[12])return create_if_block_2$c;}let current_block_type=select_block_type(ctx);let if_block0=current_block_type&&current_block_type(ctx);let if_block1=/*description*/ctx[5]&&create_if_block$r(ctx);return {c(){div3=element("div");label=element("label");div0=element("div");input=element("input");t0=space();if(if_block0)if_block0.c();t1=space();div2=element("div");div1=element("div");slot=element("slot");t2=text(/*text*/ctx[1]);t3=space();if(if_block1)if_block1.c();this.c=noop;attr(input,"id",/*name*/ctx[0]);attr(input,"name",/*name*/ctx[0]);input.checked=/*isChecked*/ctx[12];input.disabled=/*isDisabled*/ctx[15];attr(input,"type","checkbox");input.value=input_value_value=`${/*value*/ctx[2]}`;attr(input,"aria-label",input_aria_label_value=/*arialabel*/ctx[4]||/*name*/ctx[0]);attr(input,"aria-describedby",input_aria_describedby_value=/*description*/ctx[5]?/*_descriptionId*/ctx[11]:null);attr(div0,"class","goa-checkbox-container");toggle_class(div0,"goa-checkbox--selected",/*isChecked*/ctx[12]);attr(div1,"class","label-text");attr(div1,"data-testid","text");attr(div2,"class","goa-checkbox-text");attr(label,"class","goa-checkbox-label");attr(label,"data-testid",/*testid*/ctx[3]);attr(label,"for",/*name*/ctx[0]);toggle_class(label,"goa-checkbox--disabled",/*isDisabled*/ctx[15]);toggle_class(label,"goa-checkbox--error",/*isError*/ctx[14]);attr(div3,"style",div3_style_value=calculateMargin(/*mt*/ctx[6],/*mr*/ctx[7],/*mb*/ctx[8],/*ml*/ctx[9]));attr(div3,"class","goa-checkbox");},m(target,anchor){insert(target,div3,anchor);append(div3,label);append(label,div0);append(div0,input);/*input_binding*/ctx[20](input);append(div0,t0);if(if_block0)if_block0.m(div0,null);append(label,t1);append(label,div2);append(div2,div1);append(div1,slot);append(slot,t2);append(div3,t3);if(if_block1)if_block1.m(div3,null);if(!mounted){dispose=listen(input,"change",/*onChange*/ctx[16]);mounted=true;}},p(ctx,[dirty]){if(dirty&/*name*/1){attr(input,"id",/*name*/ctx[0]);}if(dirty&/*name*/1){attr(input,"name",/*name*/ctx[0]);}if(dirty&/*isChecked*/4096){input.checked=/*isChecked*/ctx[12];}if(dirty&/*isDisabled*/32768){input.disabled=/*isDisabled*/ctx[15];}if(dirty&/*value*/4&&input_value_value!==(input_value_value=`${/*value*/ctx[2]}`)){input.value=input_value_value;}if(dirty&/*arialabel, name*/17&&input_aria_label_value!==(input_aria_label_value=/*arialabel*/ctx[4]||/*name*/ctx[0])){attr(input,"aria-label",input_aria_label_value);}if(dirty&/*description, _descriptionId*/2080&&input_aria_describedby_value!==(input_aria_describedby_value=/*description*/ctx[5]?/*_descriptionId*/ctx[11]:null)){attr(input,"aria-describedby",input_aria_describedby_value);}if(current_block_type!==(current_block_type=select_block_type(ctx))){if(if_block0)if_block0.d(1);if_block0=current_block_type&&current_block_type(ctx);if(if_block0){if_block0.c();if_block0.m(div0,null);}}if(dirty&/*isChecked*/4096){toggle_class(div0,"goa-checkbox--selected",/*isChecked*/ctx[12]);}if(dirty&/*text*/2)set_data(t2,/*text*/ctx[1]);if(dirty&/*testid*/8){attr(label,"data-testid",/*testid*/ctx[3]);}if(dirty&/*name*/1){attr(label,"for",/*name*/ctx[0]);}if(dirty&/*isDisabled*/32768){toggle_class(label,"goa-checkbox--disabled",/*isDisabled*/ctx[15]);}if(dirty&/*isError*/16384){toggle_class(label,"goa-checkbox--error",/*isError*/ctx[14]);}if(/*description*/ctx[5]){if(if_block1){if_block1.p(ctx,dirty);}else {if_block1=create_if_block$r(ctx);if_block1.c();if_block1.m(div3,null);}}else if(if_block1){if_block1.d(1);if_block1=null;}if(dirty&/*mt, mr, mb, ml*/960&&div3_style_value!==(div3_style_value=calculateMargin(/*mt*/ctx[6],/*mr*/ctx[7],/*mb*/ctx[8],/*ml*/ctx[9]))){attr(div3,"style",div3_style_value);}},i:noop,o:noop,d(detaching){if(detaching)detach(div3);/*input_binding*/ctx[20](null);if(if_block0){if_block0.d();}if(if_block1)if_block1.d();mounted=false;dispose();}};}function instance$M($$self,$$props,$$invalidate){let isDisabled;let isError;let isChecked;let isIndeterminate;let{name}=$$props;let{checked="false"}=$$props;let{text=""}=$$props;let{value=""}=$$props;let{disabled="false"}=$$props;let{error="false"}=$$props;let{testid=""}=$$props;let{arialabel=""}=$$props;let{description=""}=$$props;let{mt=null}=$$props;let{mr=null}=$$props;let{mb=null}=$$props;let{ml=null}=$$props;// Private
139
- let _value;let _checkboxRef;let _descriptionId;onMount(()=>{// hold on to the initial value to prevent losing it on check changes
140
- _value=value;$$invalidate(11,_descriptionId=`description_${name}`);});function onChange(e){// Manually set the focus back to the checkbox after the state change
141
- _checkboxRef.focus();// An empty string is required as setting the second value to `null` caused the data to get
142
- // out of sync with the events.
143
- const newCheckStatus=!isChecked;const newValue=newCheckStatus?`${_value||"checked"}`:"";// set the local state
144
- $$invalidate(17,checked=fromBoolean(newCheckStatus));e.target.dispatchEvent(new CustomEvent("_change",{composed:true,detail:{name,checked:newCheckStatus,value:newValue}}));}function input_binding($$value){binding_callbacks[$$value?'unshift':'push'](()=>{_checkboxRef=$$value;$$invalidate(10,_checkboxRef);});}$$self.$$set=$$props=>{if('name'in $$props)$$invalidate(0,name=$$props.name);if('checked'in $$props)$$invalidate(17,checked=$$props.checked);if('text'in $$props)$$invalidate(1,text=$$props.text);if('value'in $$props)$$invalidate(2,value=$$props.value);if('disabled'in $$props)$$invalidate(18,disabled=$$props.disabled);if('error'in $$props)$$invalidate(19,error=$$props.error);if('testid'in $$props)$$invalidate(3,testid=$$props.testid);if('arialabel'in $$props)$$invalidate(4,arialabel=$$props.arialabel);if('description'in $$props)$$invalidate(5,description=$$props.description);if('mt'in $$props)$$invalidate(6,mt=$$props.mt);if('mr'in $$props)$$invalidate(7,mr=$$props.mr);if('mb'in $$props)$$invalidate(8,mb=$$props.mb);if('ml'in $$props)$$invalidate(9,ml=$$props.ml);};$$self.$$.update=()=>{if($$self.$$.dirty&/*disabled*/262144){// Binding
145
- $$invalidate(15,isDisabled=toBoolean(disabled));}if($$self.$$.dirty&/*error*/524288){$$invalidate(14,isError=toBoolean(error));}if($$self.$$.dirty&/*checked*/131072){$$invalidate(12,isChecked=toBoolean(checked));}};$$invalidate(13,isIndeterminate=false);// Design review. To be built with TreeView Later
146
- return [name,text,value,testid,arialabel,description,mt,mr,mb,ml,_checkboxRef,_descriptionId,isChecked,isIndeterminate,isError,isDisabled,onChange,checked,disabled,error,input_binding];}class Checkbox extends SvelteElement{constructor(options){super();const style=document.createElement('style');style.textContent=`:host{box-sizing:border-box;font-family:var(--goa-font-family-sans);display:block}.goa-checkbox-label{display:flex;cursor:pointer}.goa-checkbox{min-height:calc(3rem - 0.25rem)}.goa-checkbox input[type="checkbox"]{opacity:0;position:absolute;cursor:pointer}.goa-checkbox-container{box-sizing:border-box;border:var(--goa-border-width-s) solid var(--goa-color-greyscale-700);border-radius:2px;background-color:var(--goa-color-greyscale-white);height:1.5rem;width:1.5rem;display:flex;justify-content:center;padding:3px;flex:0 0 auto}.goa-checkbox-container svg{fill:var(--goa-color-greyscale-white)}.goa-checkbox-container.goa-checkbox--selected{background-color:var(--goa-color-interactive-default);border:none}.goa-checkbox-container.goa-checkbox--selected:hover{background-color:var(--goa-color-interactive-hover)}.goa-checkbox-container:hover{box-shadow:0 0 0 var(--goa-border-width-m) var(--goa-color-interactive-hover);border:none}.goa-checkbox-container:focus-within,.goa-checkbox-container:focus,.goa-checkbox-container:active{box-shadow:0 0 0 3px var(--goa-color-interactive-focus);border:var(--goa-border-width-s) solid var(--goa-color-greyscale-700);outline:none}.goa-checkbox-container.goa-checkbox--selected:focus-within{background-color:var(--goa-color-interactive-default);border:none}.goa-checkbox-text{padding-left:0.5rem;-webkit-user-select:none;-moz-user-select:none;user-select:none;font-weight:var(--goa-font-weight-regular)}.goa-checkbox--error .goa-checkbox-container,.goa-checkbox--error .goa-checkbox-container:hover{border:var(--goa-border-width-s) solid var(--goa-color-emergency-default);box-shadow:inset 0 0 0 1px var(--goa-color-emergency-default);background-color:var(--goa-color-greyscale-white)}.goa-checkbox--error .goa-checkbox-container:focus-within{box-shadow:0 0 0 3px var(--goa-color-interactive-focus);background-color:var(--goa-color-greyscale-white);border:var(--goa-border-width-s) solid var(--goa-color-emergency-default)}.goa-checkbox--error .goa-checkbox-container svg{fill:var(--goa-color-emergency-default)}.goa-checkbox--disabled .goa-checkbox-text{opacity:40%}.goa-checkbox--disabled .goa-checkbox-container,.goa-checkbox--disabled .goa-checkbox-container:hover{border:var(--goa-border-width-s) solid var(--goa-color-greyscale-400);box-shadow:none;opacity:40%}.goa-checkbox--disabled .goa-checkbox-container.goa-checkbox--selected,.goa-checkbox--disabled .goa-checkbox-container.goa-checkbox--selected:hover{border:none;background-color:var(--goa-color-interactive-default)}.goa-checkbox--disabled.goa-checkbox--error .goa-checkbox-container.goa-checkbox--selected{border:var(--goa-border-width-s) solid var(--goa-color-emergency-default);box-shadow:inset 0 0 0 1px var(--goa-color-emergency-default)}.goa-checkbox--disabled,input[type=checkbox][disabled]:hover{cursor:default}.description-text{font:var(--goa-typography-body-xs);margin-left:var(--goa-space-xl);margin-top:var(--goa-space-2xs)}`;this.shadowRoot.appendChild(style);init(this,{target:this.shadowRoot,props:attribute_to_object(this.attributes),customElement:true},instance$M,create_fragment$P,safe_not_equal,{name:0,checked:17,text:1,value:2,disabled:18,error:19,testid:3,arialabel:4,description:5,mt:6,mr:7,mb:8,ml:9},null);if(options){if(options.target){insert(options.target,this,options.anchor);}if(options.props){this.$set(options.props);flush();}}}static get observedAttributes(){return ["name","checked","text","value","disabled","error","testid","arialabel","description","mt","mr","mb","ml"];}get name(){return this.$$.ctx[0];}set name(name){this.$$set({name});flush();}get checked(){return this.$$.ctx[17];}set checked(checked){this.$$set({checked});flush();}get text(){return this.$$.ctx[1];}set text(text){this.$$set({text});flush();}get value(){return this.$$.ctx[2];}set value(value){this.$$set({value});flush();}get disabled(){return this.$$.ctx[18];}set disabled(disabled){this.$$set({disabled});flush();}get error(){return this.$$.ctx[19];}set error(error){this.$$set({error});flush();}get testid(){return this.$$.ctx[3];}set testid(testid){this.$$set({testid});flush();}get arialabel(){return this.$$.ctx[4];}set arialabel(arialabel){this.$$set({arialabel});flush();}get description(){return this.$$.ctx[5];}set description(description){this.$$set({description});flush();}get mt(){return this.$$.ctx[6];}set mt(mt){this.$$set({mt});flush();}get mr(){return this.$$.ctx[7];}set mr(mr){this.$$set({mr});flush();}get mb(){return this.$$.ctx[8];}set mb(mb){this.$$set({mb});flush();}get ml(){return this.$$.ctx[9];}set ml(ml){this.$$set({ml});flush();}}customElements.define("goa-checkbox",Checkbox);/* src/components/chip/Chip.svelte generated by Svelte v3.59.2 */function create_if_block_1$e(ctx){let goa_icon;return {c(){goa_icon=element("goa-icon");set_custom_element_data(goa_icon,"class","leading-icon");set_custom_element_data(goa_icon,"size","medium");set_custom_element_data(goa_icon,"type",/*leadingicon*/ctx[4]);},m(target,anchor){insert(target,goa_icon,anchor);},p(ctx,dirty){if(dirty&/*leadingicon*/16){set_custom_element_data(goa_icon,"type",/*leadingicon*/ctx[4]);}},d(detaching){if(detaching)detach(goa_icon);}};}// (54:2) {#if _deletable}
147
- function create_if_block$q(ctx){let goa_icon;let goa_icon_fillcolor_value;let goa_icon_opacity_value;return {c(){goa_icon=element("goa-icon");set_custom_element_data(goa_icon,"class","delete-icon");set_custom_element_data(goa_icon,"size","medium");set_custom_element_data(goa_icon,"theme","filled");set_custom_element_data(goa_icon,"type","close-circle");set_custom_element_data(goa_icon,"fillcolor",goa_icon_fillcolor_value=/*_error*/ctx[10]?"var(--goa-color-emergency-default)":/*_hovering*/ctx[9]?"var(--goa-color-interactive-hover)":"var(--goa-color-greyscale-700)");set_custom_element_data(goa_icon,"opacity",goa_icon_opacity_value=/*_error*/ctx[10]?/*_hovering*/ctx[9]?1:0.5:1);},m(target,anchor){insert(target,goa_icon,anchor);},p(ctx,dirty){if(dirty&/*_error, _hovering*/1536&&goa_icon_fillcolor_value!==(goa_icon_fillcolor_value=/*_error*/ctx[10]?"var(--goa-color-emergency-default)":/*_hovering*/ctx[9]?"var(--goa-color-interactive-hover)":"var(--goa-color-greyscale-700)")){set_custom_element_data(goa_icon,"fillcolor",goa_icon_fillcolor_value);}if(dirty&/*_error, _hovering*/1536&&goa_icon_opacity_value!==(goa_icon_opacity_value=/*_error*/ctx[10]?/*_hovering*/ctx[9]?1:0.5:1)){set_custom_element_data(goa_icon,"opacity",goa_icon_opacity_value);}},d(detaching){if(detaching)detach(goa_icon);}};}function create_fragment$O(ctx){let div1;let t0;let div0;let t1;let t2;let div1_style_value;let mounted;let dispose;let if_block0=/*leadingicon*/ctx[4]&&create_if_block_1$e(ctx);let if_block1=/*_deletable*/ctx[11]&&create_if_block$q(ctx);return {c(){div1=element("div");if(if_block0)if_block0.c();t0=space();div0=element("div");t1=text(/*content*/ctx[5]);t2=space();if(if_block1)if_block1.c();this.c=noop;attr(div0,"class","text");attr(div1,"data-testid",/*testid*/ctx[7]);attr(div1,"class","chip");attr(div1,"style",div1_style_value=calculateMargin(/*mt*/ctx[0],/*mr*/ctx[1],/*mb*/ctx[2],/*ml*/ctx[3]));attr(div1,"tabindex","0");toggle_class(div1,"deletable",/*_deletable*/ctx[11]);toggle_class(div1,"error",/*_error*/ctx[10]);toggle_class(div1,"variant",/*variant*/ctx[6]);},m(target,anchor){insert(target,div1,anchor);if(if_block0)if_block0.m(div1,null);append(div1,t0);append(div1,div0);append(div0,t1);append(div1,t2);if(if_block1)if_block1.m(div1,null);/*div1_binding*/ctx[15](div1);if(!mounted){dispose=[listen(div1,"click",/*click_handler*/ctx[16]),listen(div1,"mouseover",/*mouseover_handler*/ctx[17]),listen(div1,"mouseout",/*mouseout_handler*/ctx[18]),listen(div1,"focus",/*focus_handler*/ctx[19]),listen(div1,"blur",/*blur_handler*/ctx[20])];mounted=true;}},p(ctx,[dirty]){if(/*leadingicon*/ctx[4]){if(if_block0){if_block0.p(ctx,dirty);}else {if_block0=create_if_block_1$e(ctx);if_block0.c();if_block0.m(div1,t0);}}else if(if_block0){if_block0.d(1);if_block0=null;}if(dirty&/*content*/32)set_data(t1,/*content*/ctx[5]);if(/*_deletable*/ctx[11]){if(if_block1){if_block1.p(ctx,dirty);}else {if_block1=create_if_block$q(ctx);if_block1.c();if_block1.m(div1,null);}}else if(if_block1){if_block1.d(1);if_block1=null;}if(dirty&/*testid*/128){attr(div1,"data-testid",/*testid*/ctx[7]);}if(dirty&/*mt, mr, mb, ml*/15&&div1_style_value!==(div1_style_value=calculateMargin(/*mt*/ctx[0],/*mr*/ctx[1],/*mb*/ctx[2],/*ml*/ctx[3]))){attr(div1,"style",div1_style_value);}if(dirty&/*_deletable*/2048){toggle_class(div1,"deletable",/*_deletable*/ctx[11]);}if(dirty&/*_error*/1024){toggle_class(div1,"error",/*_error*/ctx[10]);}if(dirty&/*variant*/64){toggle_class(div1,"variant",/*variant*/ctx[6]);}},i:noop,o:noop,d(detaching){if(detaching)detach(div1);if(if_block0)if_block0.d();if(if_block1)if_block1.d();/*div1_binding*/ctx[15](null);mounted=false;run_all(dispose);}};}function instance$L($$self,$$props,$$invalidate){let{mt=null}=$$props;let{mr=null}=$$props;let{mb=null}=$$props;let{ml=null}=$$props;let{leadingicon=null}=$$props;let{error="false"}=$$props;let{deletable="false"}=$$props;let{content}=$$props;let{variant}=$$props;let{testid=""}=$$props;let el;let _hovering=false;// booleans
148
- let _error;let _deletable;function onDelete(e){el.dispatchEvent(new CustomEvent("_click",{composed:true,bubbles:true}));e.stopPropagation();}function div1_binding($$value){binding_callbacks[$$value?'unshift':'push'](()=>{el=$$value;$$invalidate(8,el);});}const click_handler=e=>_deletable&&onDelete(e);const mouseover_handler=()=>$$invalidate(9,_hovering=true);const mouseout_handler=()=>$$invalidate(9,_hovering=false);const focus_handler=()=>$$invalidate(9,_hovering=false);const blur_handler=()=>$$invalidate(9,_hovering=false);$$self.$$set=$$props=>{if('mt'in $$props)$$invalidate(0,mt=$$props.mt);if('mr'in $$props)$$invalidate(1,mr=$$props.mr);if('mb'in $$props)$$invalidate(2,mb=$$props.mb);if('ml'in $$props)$$invalidate(3,ml=$$props.ml);if('leadingicon'in $$props)$$invalidate(4,leadingicon=$$props.leadingicon);if('error'in $$props)$$invalidate(13,error=$$props.error);if('deletable'in $$props)$$invalidate(14,deletable=$$props.deletable);if('content'in $$props)$$invalidate(5,content=$$props.content);if('variant'in $$props)$$invalidate(6,variant=$$props.variant);if('testid'in $$props)$$invalidate(7,testid=$$props.testid);};$$self.$$.update=()=>{if($$self.$$.dirty&/*error*/8192){$$invalidate(10,_error=toBoolean(error));}if($$self.$$.dirty&/*deletable*/16384){$$invalidate(11,_deletable=toBoolean(deletable));}};return [mt,mr,mb,ml,leadingicon,content,variant,testid,el,_hovering,_error,_deletable,onDelete,error,deletable,div1_binding,click_handler,mouseover_handler,mouseout_handler,focus_handler,blur_handler];}class Chip extends SvelteElement{constructor(options){super();const style=document.createElement('style');style.textContent=`.leading-icon{margin-left:-0.25rem}.chip{vertical-align:middle;align-items:center;background-color:var(--goa-color-greyscale-white);border-radius:99px;border:1px solid #949494;box-sizing:border-box;color:var(--goa-color-text-default);display:inline-flex;flex-direction:row;font-size:var(--goa-font-size-3);font-weight:var(--goa-font-weight-regular);gap:0.25rem;height:2rem;justify-content:center;padding:0 0.75rem;cursor:default}.text{padding-bottom:var(--font-valign-fix, 0)}.chip:focus{outline:2px solid var(--goa-color-interactive-focus);background-color:var(--goa-color-greyscale-white)}.chip:hover{background-color:var(--goa-color-greyscale-200)}.deletable{cursor:pointer}.delete-icon{margin-right:-0.25rem}.error,.error:hover{background-color:var(--goa-color-emergency-light)}`;this.shadowRoot.appendChild(style);init(this,{target:this.shadowRoot,props:attribute_to_object(this.attributes),customElement:true},instance$L,create_fragment$O,safe_not_equal,{mt:0,mr:1,mb:2,ml:3,leadingicon:4,error:13,deletable:14,content:5,variant:6,testid:7},null);if(options){if(options.target){insert(options.target,this,options.anchor);}if(options.props){this.$set(options.props);flush();}}}static get observedAttributes(){return ["mt","mr","mb","ml","leadingicon","error","deletable","content","variant","testid"];}get mt(){return this.$$.ctx[0];}set mt(mt){this.$$set({mt});flush();}get mr(){return this.$$.ctx[1];}set mr(mr){this.$$set({mr});flush();}get mb(){return this.$$.ctx[2];}set mb(mb){this.$$set({mb});flush();}get ml(){return this.$$.ctx[3];}set ml(ml){this.$$set({ml});flush();}get leadingicon(){return this.$$.ctx[4];}set leadingicon(leadingicon){this.$$set({leadingicon});flush();}get error(){return this.$$.ctx[13];}set error(error){this.$$set({error});flush();}get deletable(){return this.$$.ctx[14];}set deletable(deletable){this.$$set({deletable});flush();}get content(){return this.$$.ctx[5];}set content(content){this.$$set({content});flush();}get variant(){return this.$$.ctx[6];}set variant(variant){this.$$set({variant});flush();}get testid(){return this.$$.ctx[7];}set testid(testid){this.$$set({testid});flush();}}customElements.define("goa-chip",Chip);function cubicOut(t){const f=t-1.0;return f*f*f+1.0;}function quartOut(t){return Math.pow(t-1.0,3.0)*(1.0-t)+1.0;}function fade(node,{delay=0,duration=400,easing=identity}={}){const o=+getComputedStyle(node).opacity;return {delay,duration,easing,css:t=>`opacity: ${t*o}`};}function fly(node,{delay=0,duration=400,easing=cubicOut,x=0,y=0,opacity=0}={}){const style=getComputedStyle(node);const target_opacity=+style.opacity;const transform=style.transform==='none'?'':style.transform;const od=target_opacity*(1-opacity);const[xValue,xUnit]=split_css_unit(x);const[yValue,yUnit]=split_css_unit(y);return {delay,duration,easing,css:(t,u)=>`
149
- transform: ${transform} translate(${(1-t)*xValue}${xUnit}, ${(1-t)*yValue}${yUnit});
150
- opacity: ${target_opacity-od*u}`};}function noscroll(_node,opts){let toggledScrolling=false;function hideScrollbars(){if(!isScrollable()){return;}const scrollbarWidth=calculateScrollbarWidth();toggledScrolling=true;document.body.style.overflow="hidden";document.body.style.paddingRight=scrollbarWidth+"px";}function isScrollable(){return document.body.style.overflow!=="hidden";}function resetScrollbars(){if(!toggledScrolling){return;}toggledScrolling=false;setTimeout(()=>{document.body.style.overflow="";document.body.style.paddingRight="0";},200);}function calculateScrollbarWidth(){if(document.body.clientHeight<=document.documentElement.clientHeight){return 0;}const outer=document.createElement("div");outer.style.visibility="hidden";outer.style.overflow="scroll";document.body.appendChild(outer);const inner=document.createElement("div");outer.appendChild(inner);const scrollbarWidth=outer.offsetWidth-inner.offsetWidth;outer.parentNode.removeChild(outer);return scrollbarWidth;}if(opts.enable){hideScrollbars();}return {update(){if(!opts.enable){resetScrollbars();}},destroy(){resetScrollbars();}};}/* src/components/circular-progress/CircularProgress.svelte generated by Svelte v3.59.2 */function create_if_block$p(ctx){let current_block_type_index;let if_block;let if_block_anchor;let current;const if_block_creators=[create_if_block_1$d,create_if_block_3$a];const if_blocks=[];function select_block_type(ctx,dirty){if(/*fullscreen*/ctx[3])return 0;if(/*inline*/ctx[4])return 1;return -1;}if(~(current_block_type_index=select_block_type(ctx))){if_block=if_blocks[current_block_type_index]=if_block_creators[current_block_type_index](ctx);}return {c(){if(if_block)if_block.c();if_block_anchor=empty();},m(target,anchor){if(~current_block_type_index){if_blocks[current_block_type_index].m(target,anchor);}insert(target,if_block_anchor,anchor);current=true;},p(ctx,dirty){let previous_block_index=current_block_type_index;current_block_type_index=select_block_type(ctx);if(current_block_type_index===previous_block_index){if(~current_block_type_index){if_blocks[current_block_type_index].p(ctx,dirty);}}else {if(if_block){group_outros();transition_out(if_blocks[previous_block_index],1,1,()=>{if_blocks[previous_block_index]=null;});check_outros();}if(~current_block_type_index){if_block=if_blocks[current_block_type_index];if(!if_block){if_block=if_blocks[current_block_type_index]=if_block_creators[current_block_type_index](ctx);if_block.c();}else {if_block.p(ctx,dirty);}transition_in(if_block,1);if_block.m(if_block_anchor.parentNode,if_block_anchor);}else {if_block=null;}}},i(local){if(current)return;transition_in(if_block);current=true;},o(local){transition_out(if_block);current=false;},d(detaching){if(~current_block_type_index){if_blocks[current_block_type_index].d(detaching);}if(detaching)detach(if_block_anchor);}};}// (43:19)
151
- function create_if_block_3$a(ctx){let div;let goa_spinner;let t;let div_class_value;let if_block=/*message*/ctx[0]&&create_if_block_4$3(ctx);return {c(){div=element("div");goa_spinner=element("goa-spinner");t=space();if(if_block)if_block.c();set_custom_element_data(goa_spinner,"size",/*spinnerSize*/ctx[2]);set_custom_element_data(goa_spinner,"progress",/*progress*/ctx[1]);attr(div,"class",div_class_value="spinner-"+/*spinnerSize*/ctx[2]);toggle_class(div,"inline",/*inline*/ctx[4]);},m(target,anchor){insert(target,div,anchor);append(div,goa_spinner);append(div,t);if(if_block)if_block.m(div,null);},p(ctx,dirty){if(dirty&/*spinnerSize*/4){set_custom_element_data(goa_spinner,"size",/*spinnerSize*/ctx[2]);}if(dirty&/*progress*/2){set_custom_element_data(goa_spinner,"progress",/*progress*/ctx[1]);}if(/*message*/ctx[0]){if(if_block){if_block.p(ctx,dirty);}else {if_block=create_if_block_4$3(ctx);if_block.c();if_block.m(div,null);}}else if(if_block){if_block.d(1);if_block=null;}if(dirty&/*spinnerSize*/4&&div_class_value!==(div_class_value="spinner-"+/*spinnerSize*/ctx[2])){attr(div,"class",div_class_value);}if(dirty&/*spinnerSize, inline*/20){toggle_class(div,"inline",/*inline*/ctx[4]);}},i:noop,o:noop,d(detaching){if(detaching)detach(div);if(if_block)if_block.d();}};}// (32:2) {#if fullscreen}
152
- function create_if_block_1$d(ctx){let div;let goa_spinner;let t;let div_transition;let current;let mounted;let dispose;let if_block=/*message*/ctx[0]&&create_if_block_2$b(ctx);return {c(){div=element("div");goa_spinner=element("goa-spinner");t=space();if(if_block)if_block.c();set_custom_element_data(goa_spinner,"size",/*spinnerSize*/ctx[2]);set_custom_element_data(goa_spinner,"progress",/*progress*/ctx[1]);toggle_class(div,"fullscreen",/*fullscreen*/ctx[3]);},m(target,anchor){insert(target,div,anchor);append(div,goa_spinner);append(div,t);if(if_block)if_block.m(div,null);current=true;if(!mounted){dispose=action_destroyer(noscroll.call(null,div,{enable:true}));mounted=true;}},p(ctx,dirty){if(!current||dirty&/*spinnerSize*/4){set_custom_element_data(goa_spinner,"size",/*spinnerSize*/ctx[2]);}if(!current||dirty&/*progress*/2){set_custom_element_data(goa_spinner,"progress",/*progress*/ctx[1]);}if(/*message*/ctx[0]){if(if_block){if_block.p(ctx,dirty);}else {if_block=create_if_block_2$b(ctx);if_block.c();if_block.m(div,null);}}else if(if_block){if_block.d(1);if_block=null;}if(!current||dirty&/*fullscreen*/8){toggle_class(div,"fullscreen",/*fullscreen*/ctx[3]);}},i(local){if(current)return;add_render_callback(()=>{if(!current)return;if(!div_transition)div_transition=create_bidirectional_transition(div,fade,{duration:300},true);div_transition.run(1);});current=true;},o(local){if(!div_transition)div_transition=create_bidirectional_transition(div,fade,{duration:300},false);div_transition.run(0);current=false;},d(detaching){if(detaching)detach(div);if(if_block)if_block.d();if(detaching&&div_transition)div_transition.end();mounted=false;dispose();}};}// (46:6) {#if message}
153
- function create_if_block_4$3(ctx){let div;let t;return {c(){div=element("div");t=text(/*message*/ctx[0]);attr(div,"class","message");},m(target,anchor){insert(target,div,anchor);append(div,t);},p(ctx,dirty){if(dirty&/*message*/1)set_data(t,/*message*/ctx[0]);},d(detaching){if(detaching)detach(div);}};}// (39:6) {#if message}
154
- function create_if_block_2$b(ctx){let div;let t;return {c(){div=element("div");t=text(/*message*/ctx[0]);attr(div,"class","message");},m(target,anchor){insert(target,div,anchor);append(div,t);},p(ctx,dirty){if(dirty&/*message*/1)set_data(t,/*message*/ctx[0]);},d(detaching){if(detaching)detach(div);}};}function create_fragment$N(ctx){let if_block_anchor;let current;let if_block=/*isVisible*/ctx[5]&&create_if_block$p(ctx);return {c(){if(if_block)if_block.c();if_block_anchor=empty();this.c=noop;},m(target,anchor){if(if_block)if_block.m(target,anchor);insert(target,if_block_anchor,anchor);current=true;},p(ctx,[dirty]){if(/*isVisible*/ctx[5]){if(if_block){if_block.p(ctx,dirty);if(dirty&/*isVisible*/32){transition_in(if_block,1);}}else {if_block=create_if_block$p(ctx);if_block.c();transition_in(if_block,1);if_block.m(if_block_anchor.parentNode,if_block_anchor);}}else if(if_block){group_outros();transition_out(if_block,1,1,()=>{if_block=null;});check_outros();}},i(local){if(current)return;transition_in(if_block);current=true;},o(local){transition_out(if_block);current=false;},d(detaching){if(if_block)if_block.d(detaching);if(detaching)detach(if_block_anchor);}};}function instance$K($$self,$$props,$$invalidate){let isVisible;const[Variants,validateVariant]=typeValidator("Circular progress variant",["fullscreen","inline"]);const[Sizes,validateSize]=typeValidator("Button size",["small","large"]);let{variant="inline"}=$$props;let{size="large"}=$$props;let{message=""}=$$props;let{progress=-1}=$$props;let{visible="false"}=$$props;let spinnerSize;let fullscreen;let inline;onMount(async()=>{validateVariant(variant);validateSize(size);$$invalidate(2,spinnerSize=size==="small"?"large":"xlarge");$$invalidate(3,fullscreen=variant==="fullscreen");$$invalidate(4,inline=variant==="inline");});$$self.$$set=$$props=>{if('variant'in $$props)$$invalidate(6,variant=$$props.variant);if('size'in $$props)$$invalidate(7,size=$$props.size);if('message'in $$props)$$invalidate(0,message=$$props.message);if('progress'in $$props)$$invalidate(1,progress=$$props.progress);if('visible'in $$props)$$invalidate(8,visible=$$props.visible);};$$self.$$.update=()=>{if($$self.$$.dirty&/*visible*/256){$$invalidate(5,isVisible=toBoolean(visible));}};return [message,progress,spinnerSize,fullscreen,inline,isVisible,variant,size,visible];}class CircularProgress extends SvelteElement{constructor(options){super();const style=document.createElement('style');style.textContent=`:host{box-sizing:border-box;font-family:var(--goa-font-family-sans)}.fullscreen{position:fixed;inset:0;z-index:9999;display:flex;align-items:center;justify-content:center;flex-direction:column;background-color:rgba(255, 255, 255, 0.9)}.inline{margin:3.5rem;display:inline-flex;flex-direction:column;align-items:center;justify-content:center}.spinner-large .message{margin-top:1.5rem;font-size:1.2rem}.spinner-xlarge .message{margin-top:2rem;font-size:1.5rem}`;this.shadowRoot.appendChild(style);init(this,{target:this.shadowRoot,props:attribute_to_object(this.attributes),customElement:true},instance$K,create_fragment$N,safe_not_equal,{variant:6,size:7,message:0,progress:1,visible:8},null);if(options){if(options.target){insert(options.target,this,options.anchor);}if(options.props){this.$set(options.props);flush();}}}static get observedAttributes(){return ["variant","size","message","progress","visible"];}get variant(){return this.$$.ctx[6];}set variant(variant){this.$$set({variant});flush();}get size(){return this.$$.ctx[7];}set size(size){this.$$set({size});flush();}get message(){return this.$$.ctx[0];}set message(message){this.$$set({message});flush();}get progress(){return this.$$.ctx[1];}set progress(progress){this.$$set({progress});flush();}get visible(){return this.$$.ctx[8];}set visible(visible){this.$$set({visible});flush();}}customElements.define("goa-circular-progress",CircularProgress);/* src/components/container/Container.svelte generated by Svelte v3.59.2 */function create_fragment$M(ctx){let div3;let header;let div0;let t0;let div1;let header_class_value;let t1;let div2;let div3_style_value;let div3_class_value;return {c(){div3=element("div");header=element("header");div0=element("div");div0.innerHTML=`<slot name="title"></slot>`;t0=space();div1=element("div");div1.innerHTML=`<slot name="actions"></slot>`;t1=space();div2=element("div");div2.innerHTML=`<slot></slot>`;this.c=noop;attr(div0,"class","title");attr(div1,"class","actions");attr(header,"class",header_class_value="heading--"+/*accent*/ctx[1]);attr(div2,"class","content");attr(div3,"data-testid",/*testid*/ctx[3]);attr(div3,"style",div3_style_value=calculateMargin(/*mt*/ctx[4],/*mr*/ctx[5],/*mb*/ctx[6],/*ml*/ctx[7]));attr(div3,"class",div3_class_value=`
155
- goa-container
156
- goa-container--${/*type*/ctx[0]}
157
- padding--${/*padding*/ctx[2]}
158
- accent--${/*accent*/ctx[1]}
159
- `);},m(target,anchor){insert(target,div3,anchor);append(div3,header);append(header,div0);append(header,t0);append(header,div1);append(div3,t1);append(div3,div2);},p(ctx,[dirty]){if(dirty&/*accent*/2&&header_class_value!==(header_class_value="heading--"+/*accent*/ctx[1])){attr(header,"class",header_class_value);}if(dirty&/*testid*/8){attr(div3,"data-testid",/*testid*/ctx[3]);}if(dirty&/*mt, mr, mb, ml*/240&&div3_style_value!==(div3_style_value=calculateMargin(/*mt*/ctx[4],/*mr*/ctx[5],/*mb*/ctx[6],/*ml*/ctx[7]))){attr(div3,"style",div3_style_value);}if(dirty&/*type, padding, accent*/7&&div3_class_value!==(div3_class_value=`
160
- goa-container
161
- goa-container--${/*type*/ctx[0]}
162
- padding--${/*padding*/ctx[2]}
163
- accent--${/*accent*/ctx[1]}
164
- `)){attr(div3,"class",div3_class_value);}},i:noop,o:noop,d(detaching){if(detaching)detach(div3);}};}function instance$J($$self,$$props,$$invalidate){const[Types,validateType]=typeValidator("Container type",["interactive","info","error","success","important","non-interactive"]);const[Accents,validateAccent]=typeValidator("Container accent",["thick","thin","filled"]);const[Paddings,validatePadding]=typeValidator("Container padding",["relaxed","compact"]);let{type="interactive"}=$$props;let{accent="filled"}=$$props;let{padding="relaxed"}=$$props;let{testid=""}=$$props;let{mt=null}=$$props;let{mr=null}=$$props;let{mb="m"}=$$props;let{ml=null}=$$props;onMount(()=>{validateType(type);validateAccent(accent);validatePadding(padding);});$$self.$$set=$$props=>{if('type'in $$props)$$invalidate(0,type=$$props.type);if('accent'in $$props)$$invalidate(1,accent=$$props.accent);if('padding'in $$props)$$invalidate(2,padding=$$props.padding);if('testid'in $$props)$$invalidate(3,testid=$$props.testid);if('mt'in $$props)$$invalidate(4,mt=$$props.mt);if('mr'in $$props)$$invalidate(5,mr=$$props.mr);if('mb'in $$props)$$invalidate(6,mb=$$props.mb);if('ml'in $$props)$$invalidate(7,ml=$$props.ml);};return [type,accent,padding,testid,mt,mr,mb,ml];}class Container extends SvelteElement{constructor(options){super();const style=document.createElement('style');style.textContent=`:host{box-sizing:border-box;font-family:var(--goa-font-family-sans);font-size:var(--goa-font-size-4);display:flex;flex:1 1 auto}.goa-container{box-sizing:border-box;display:flex;flex:1 1 auto;flex-direction:column}.goa-container *{box-sizing:border-box}header{display:flex;align-items:center;justify-content:space-between;font-weight:700;font-size:var(--goa-font-size-4);border-width:1px;border-style:solid;border-top-left-radius:var(--goa-border-radius-m);border-top-right-radius:var(--goa-border-radius-m)}.content{border-bottom:1px solid var(--goa-color-greyscale-200);border-left:1px solid var(--goa-color-greyscale-200);border-right:1px solid var(--goa-color-greyscale-200);border-bottom-left-radius:var(--goa-border-radius-m);border-bottom-right-radius:var(--goa-border-radius-m);display:flex;flex:1 1 auto;flex-direction:column}.content ::slotted(p:last-child){margin-bottom:0 !important}.goa-container--non-interactive.accent--filled .content{border-color:var(--goa-color-greyscale-200);background-color:var(--goa-color-greyscale-100)}.goa-container--important.accent--filled .content{border-color:var(--goa-color-warning-default);background-color:var(--goa-color-warning-background)}.goa-container--error.accent--filled .content{border-color:var(--goa-color-emergency-default);background-color:var(--goa-color-emergency-background)}.goa-container--success.accent--filled .content{border-color:var(--goa-color-success-default);background-color:var(--goa-color-success-background)}.goa-container--info.accent--filled .content{border-color:var(--goa-color-info-default);background-color:var(--goa-color-info-background)}.title,.actions{padding:0.5rem 0}.padding--relaxed header{padding:0 1.5rem}.padding--relaxed .content{padding:1.5rem}.padding--compact header,.padding--compact .content{padding:0 1rem}.padding--compact header{padding:0 1rem}.padding--compact .content{padding:1rem}@media screen and (max-width: 623px){.padding--relaxed header{padding:0 1rem}.padding--relaxed .content{padding:1rem}}.goa-container--non-interactive header{background-color:var(--goa-color-greyscale-100);border-color:var(--goa-color-greyscale-200);color:var(--goa-color-greyscale-black)}.goa-container--interactive header{background-color:var(--goa-color-brand-default);border-color:var(--goa-color-brand-default);color:var(--goa-color-greyscale-white)}.goa-container--info header{background-color:var(--goa-color-info-default);border-color:var(--goa-color-info-default);color:var(--goa-color-greyscale-white)}.goa-container--error header{background-color:var(--goa-color-emergency-default);border-color:var(--goa-color-emergency-default);color:var(--goa-color-greyscale-white)}.goa-container--success header{background-color:var(--goa-color-success-default);border-color:var(--goa-color-success-default);color:var(--goa-color-greyscale-white)}.goa-container--important header{background-color:var(--goa-color-warning-default);border-color:var(--goa-color-warning-default);color:var(--goa-color-greyscale-white)}.heading--thick{padding:0.5rem 1.5rem;max-height:3rem;min-height:1rem}.heading--thick .title{line-height:2rem}.heading--thin{height:0.5rem}.heading--filled{display:none}.heading--filled~.content{border-top:1px solid var(--goa-color-greyscale-200);border-top-left-radius:var(--goa-border-radius-m);border-top-right-radius:var(--goa-border-radius-m)}.heading--thin .title,.heading--thin .actions{display:none}.actions{display:flex;align-items:center}`;this.shadowRoot.appendChild(style);init(this,{target:this.shadowRoot,props:attribute_to_object(this.attributes),customElement:true},instance$J,create_fragment$M,safe_not_equal,{type:0,accent:1,padding:2,testid:3,mt:4,mr:5,mb:6,ml:7},null);if(options){if(options.target){insert(options.target,this,options.anchor);}if(options.props){this.$set(options.props);flush();}}}static get observedAttributes(){return ["type","accent","padding","testid","mt","mr","mb","ml"];}get type(){return this.$$.ctx[0];}set type(type){this.$$set({type});flush();}get accent(){return this.$$.ctx[1];}set accent(accent){this.$$set({accent});flush();}get padding(){return this.$$.ctx[2];}set padding(padding){this.$$set({padding});flush();}get testid(){return this.$$.ctx[3];}set testid(testid){this.$$set({testid});flush();}get mt(){return this.$$.ctx[4];}set mt(mt){this.$$set({mt});flush();}get mr(){return this.$$.ctx[5];}set mr(mr){this.$$set({mr});flush();}get mb(){return this.$$.ctx[6];}set mb(mb){this.$$set({mb});flush();}get ml(){return this.$$.ctx[7];}set ml(ml){this.$$set({ml});flush();}}customElements.define("goa-container",Container);/* src/components/details/Details.svelte generated by Svelte v3.59.2 */function create_fragment$L(ctx){let details;let summary;let goa_icon;let goa_icon_fillcolor_value;let t0;let span;let t1;let t2;let div;let details_style_value;let mounted;let dispose;return {c(){details=element("details");summary=element("summary");goa_icon=element("goa-icon");t0=space();span=element("span");t1=text(/*heading*/ctx[1]);t2=space();div=element("div");div.innerHTML=`<slot></slot>`;this.c=noop;set_custom_element_data(goa_icon,"mt","1");set_custom_element_data(goa_icon,"mr","2");set_custom_element_data(goa_icon,"type","chevron-forward");set_custom_element_data(goa_icon,"fillcolor",goa_icon_fillcolor_value=/*_isMouseOver*/ctx[6]?"var(--goa-color-interactive-hover)":"var(--goa-color-interactive-default)");attr(div,"class","content");details.open=/*_isOpen*/ctx[9];attr(details,"style",details_style_value=calculateMargin(/*mt*/ctx[2],/*mr*/ctx[3],/*mb*/ctx[4],/*ml*/ctx[5]));},m(target,anchor){insert(target,details,anchor);append(details,summary);append(summary,goa_icon);append(summary,t0);append(summary,span);append(span,t1);/*summary_binding*/ctx[10](summary);append(details,t2);append(details,div);/*details_binding*/ctx[11](details);if(!mounted){dispose=listen(details,"toggle",/*toggle_handler*/ctx[12]);mounted=true;}},p(ctx,[dirty]){if(dirty&/*_isMouseOver*/64&&goa_icon_fillcolor_value!==(goa_icon_fillcolor_value=/*_isMouseOver*/ctx[6]?"var(--goa-color-interactive-hover)":"var(--goa-color-interactive-default)")){set_custom_element_data(goa_icon,"fillcolor",goa_icon_fillcolor_value);}if(dirty&/*heading*/2)set_data(t1,/*heading*/ctx[1]);if(dirty&/*_isOpen*/512){details.open=/*_isOpen*/ctx[9];}if(dirty&/*mt, mr, mb, ml*/60&&details_style_value!==(details_style_value=calculateMargin(/*mt*/ctx[2],/*mr*/ctx[3],/*mb*/ctx[4],/*ml*/ctx[5]))){attr(details,"style",details_style_value);}},i:noop,o:noop,d(detaching){if(detaching)detach(details);/*summary_binding*/ctx[10](null);/*details_binding*/ctx[11](null);mounted=false;dispose();}};}function instance$I($$self,$$props,$$invalidate){let _isOpen;let{heading}=$$props;let{mt=null}=$$props;let{mr=null}=$$props;let{mb=null}=$$props;let{ml=null}=$$props;let{open="false"}=$$props;let _isMouseOver=false;let _summaryEl;let _detailsEl;onMount(()=>{validateRequired("Details",{heading});_summaryEl.addEventListener("mouseover",()=>{$$invalidate(6,_isMouseOver=true);});_summaryEl.addEventListener("mouseout",()=>{$$invalidate(6,_isMouseOver=false);});});function summary_binding($$value){binding_callbacks[$$value?'unshift':'push'](()=>{_summaryEl=$$value;$$invalidate(7,_summaryEl);});}function details_binding($$value){binding_callbacks[$$value?'unshift':'push'](()=>{_detailsEl=$$value;$$invalidate(8,_detailsEl);});}const toggle_handler=({target})=>$$invalidate(0,open=`${target.open}`);$$self.$$set=$$props=>{if('heading'in $$props)$$invalidate(1,heading=$$props.heading);if('mt'in $$props)$$invalidate(2,mt=$$props.mt);if('mr'in $$props)$$invalidate(3,mr=$$props.mr);if('mb'in $$props)$$invalidate(4,mb=$$props.mb);if('ml'in $$props)$$invalidate(5,ml=$$props.ml);if('open'in $$props)$$invalidate(0,open=$$props.open);};$$self.$$.update=()=>{if($$self.$$.dirty&/*open*/1){$$invalidate(9,_isOpen=toBoolean(open));}};return [open,heading,mt,mr,mb,ml,_isMouseOver,_summaryEl,_detailsEl,_isOpen,summary_binding,details_binding,toggle_handler];}class Details extends SvelteElement{constructor(options){super();const style=document.createElement('style');style.textContent=`:host{font-family:var(--goa-font-family-sans)}details{max-width:75ch;position:relative}details ::slotted(*){font:var(--goa-typography-body-m)}summary{padding:0.5rem;margin-bottom:0.5rem;cursor:pointer;list-style:none;display:flex;align-items:flex-start}goa-icon{position:absolute}details[open] goa-icon{transform:translateX(-1px) rotate(90deg);top:0.75rem}details summary::-webkit-details-marker{display:none}summary{border-radius:var(--goa-border-radius-m)}summary:focus,summary:active{outline:3px solid var(--goa-color-interactive-focus);border-radius:var(--goa-border-radius-m);color:var(--goa-color-interactive-hover);background-color:var(--goa-color-greyscale-100)}summary:hover{background-color:var(--goa-color-greyscale-100)}summary span{margin-left:2rem;text-decoration:underline;color:var(--goa-color-interactive-default);padding-bottom:var(--font-valign-fix);line-height:var(--goa-line-height-3)}summary:hover span{color:var(--goa-color-interactive-hover)}.content{border-left:4px solid var(--goa-color-greyscale-200);padding:1rem;margin-left:1.1rem;margin-bottom:var(--goa-space-s)}.content ::slotted(p:last-child){margin-bottom:0 !important}`;this.shadowRoot.appendChild(style);init(this,{target:this.shadowRoot,props:attribute_to_object(this.attributes),customElement:true},instance$I,create_fragment$L,safe_not_equal,{heading:1,mt:2,mr:3,mb:4,ml:5,open:0},null);if(options){if(options.target){insert(options.target,this,options.anchor);}if(options.props){this.$set(options.props);flush();}}}static get observedAttributes(){return ["heading","mt","mr","mb","ml","open"];}get heading(){return this.$$.ctx[1];}set heading(heading){this.$$set({heading});flush();}get mt(){return this.$$.ctx[2];}set mt(mt){this.$$set({mt});flush();}get mr(){return this.$$.ctx[3];}set mr(mr){this.$$set({mr});flush();}get mb(){return this.$$.ctx[4];}set mb(mb){this.$$set({mb});flush();}get ml(){return this.$$.ctx[5];}set ml(ml){this.$$set({ml});flush();}get open(){return this.$$.ctx[0];}set open(open){this.$$set({open});flush();}}customElements.define("goa-details",Details);/* src/components/divider/Divider.svelte generated by Svelte v3.59.2 */function create_fragment$K(ctx){let hr;let hr_style_value;return {c(){hr=element("hr");this.c=noop;attr(hr,"data-testid",/*testid*/ctx[0]);attr(hr,"style",hr_style_value=calculateMargin(/*mt*/ctx[1],/*mr*/ctx[2],/*mb*/ctx[3],/*ml*/ctx[4]));},m(target,anchor){insert(target,hr,anchor);},p(ctx,[dirty]){if(dirty&/*testid*/1){attr(hr,"data-testid",/*testid*/ctx[0]);}if(dirty&/*mt, mr, mb, ml*/30&&hr_style_value!==(hr_style_value=calculateMargin(/*mt*/ctx[1],/*mr*/ctx[2],/*mb*/ctx[3],/*ml*/ctx[4]))){attr(hr,"style",hr_style_value);}},i:noop,o:noop,d(detaching){if(detaching)detach(hr);}};}function instance$H($$self,$$props,$$invalidate){let{testid=""}=$$props;let{mt=null}=$$props;let{mr=null}=$$props;let{mb=null}=$$props;let{ml=null}=$$props;$$self.$$set=$$props=>{if('testid'in $$props)$$invalidate(0,testid=$$props.testid);if('mt'in $$props)$$invalidate(1,mt=$$props.mt);if('mr'in $$props)$$invalidate(2,mr=$$props.mr);if('mb'in $$props)$$invalidate(3,mb=$$props.mb);if('ml'in $$props)$$invalidate(4,ml=$$props.ml);};return [testid,mt,mr,mb,ml];}class Divider extends SvelteElement{constructor(options){super();const style=document.createElement('style');style.textContent=`hr{padding:0;margin:0;height:1px;background-color:var(--goa-color-greyscale-200);border:none}`;this.shadowRoot.appendChild(style);init(this,{target:this.shadowRoot,props:attribute_to_object(this.attributes),customElement:true},instance$H,create_fragment$K,safe_not_equal,{testid:0,mt:1,mr:2,mb:3,ml:4},null);if(options){if(options.target){insert(options.target,this,options.anchor);}if(options.props){this.$set(options.props);flush();}}}static get observedAttributes(){return ["testid","mt","mr","mb","ml"];}get testid(){return this.$$.ctx[0];}set testid(testid){this.$$set({testid});flush();}get mt(){return this.$$.ctx[1];}set mt(mt){this.$$set({mt});flush();}get mr(){return this.$$.ctx[2];}set mr(mr){this.$$set({mr});flush();}get mb(){return this.$$.ctx[3];}set mb(mb){this.$$set({mb});flush();}get ml(){return this.$$.ctx[4];}set ml(ml){this.$$set({ml});flush();}}customElements.define("goa-divider",Divider);/* src/components/dropdown/Dropdown.svelte generated by Svelte v3.59.2 */function get_each_context_1$1(ctx,list,i){const child_ctx=ctx.slice();child_ctx[61]=list[i];child_ctx[65]=i;return child_ctx;}function get_each_context$8(ctx,list,i){const child_ctx=ctx.slice();child_ctx[61]=list[i];return child_ctx;}// (444:2) {:else}
165
- function create_else_block$a(ctx){let slot;let t0;let goa_popover;let div;let t1;let input;let input_style_value;let input_aria_controls_value;let input_aria_label_value;let input_aria_owns_value;let input_readonly_value;let t2;let div_style_value;let t3;let ul;let each_blocks=[];let each_1_lookup=new Map();let ul_id_value;let ul_aria_label_value;let ul_style_value;let mounted;let dispose;let if_block0=/*leadingicon*/ctx[4]&&create_if_block_2$a(ctx);function select_block_type_1(ctx,dirty){var _ctx$;if(/*_inputEl*/(_ctx$=ctx[23])!==null&&_ctx$!==void 0&&_ctx$.value&&/*_filterable*/ctx[24])return create_if_block_1$c;return create_else_block_2;}let current_block_type=select_block_type_1(ctx);let if_block1=current_block_type(ctx);let each_value_1=/*_filteredOptions*/ctx[15];const get_key=ctx=>/*index*/ctx[65];for(let i=0;i<each_value_1.length;i+=1){let child_ctx=get_each_context_1$1(ctx,each_value_1,i);let key=get_key(child_ctx);each_1_lookup.set(key,each_blocks[i]=create_each_block_1$1(key,child_ctx));}let each_1_else=null;if(!each_value_1.length){each_1_else=create_else_block_1();}return {c(){slot=element("slot");t0=space();goa_popover=element("goa-popover");div=element("div");if(if_block0)if_block0.c();t1=space();input=element("input");t2=space();if_block1.c();t3=space();ul=element("ul");for(let i=0;i<each_blocks.length;i+=1){each_blocks[i].c();}if(each_1_else){each_1_else.c();}attr(input,"style",input_style_value=`
166
- cursor: ${!/*_disabled*/ctx[26]?/*_filterable*/ctx[24]?"auto":"pointer":"default"};
167
- `);attr(input,"data-testid","input");attr(input,"type","text");attr(input,"role","combobox");attr(input,"autocomplete","off");attr(input,"aria-autocomplete","list");attr(input,"aria-controls",input_aria_controls_value=`menu-${/*name*/ctx[0]}`);attr(input,"aria-expanded",/*_isMenuVisible*/ctx[18]);attr(input,"aria-label",input_aria_label_value=/*arialabel*/ctx[1]||/*name*/ctx[0]);attr(input,"aria-labelledby",/*arialabelledby*/ctx[2]);attr(input,"id",/*name*/ctx[0]);attr(input,"aria-activedescendant",/*_activeDescendantId*/ctx[25]);attr(input,"aria-disabled",/*_disabled*/ctx[26]);attr(input,"aria-owns",input_aria_owns_value=/*_isMenuVisible*/ctx[18]?`menu-${/*name*/ctx[0]}`:undefined);attr(input,"aria-haspopup","listbox");input.disabled=/*_disabled*/ctx[26];input.readOnly=input_readonly_value=!/*_filterable*/ctx[24];attr(input,"placeholder",/*placeholder*/ctx[6]);attr(input,"name",/*name*/ctx[0]);attr(div,"slot","target");attr(div,"style",div_style_value=cssVar("width",/*width*/ctx[7]));attr(div,"class","dropdown-input-group");toggle_class(div,"dropdown-input-group--disabled",/*_disabled*/ctx[26]);toggle_class(div,"error",/*_error*/ctx[27]);attr(ul,"id",ul_id_value=`menu-${/*name*/ctx[0]}`);attr(ul,"role","listbox");attr(ul,"tabindex","-1");attr(ul,"data-testid","dropdown-menu");attr(ul,"aria-label",ul_aria_label_value=/*arialabel*/ctx[1]||/*name*/ctx[0]);attr(ul,"aria-labelledby",/*arialabelledby*/ctx[2]);attr(ul,"style",ul_style_value=`
168
- width: ${/*_width*/ctx[19]};
169
- outline: none;
170
- overflow-y: auto;
171
- max-height: ${/*maxheight*/ctx[5]};
172
- `);set_custom_element_data(goa_popover,"disabled",/*disabled*/ctx[8]);set_custom_element_data(goa_popover,"relative",/*relative*/ctx[9]);set_custom_element_data(goa_popover,"data-testid","option-list");set_custom_element_data(goa_popover,"maxwidth","1000px");set_custom_element_data(goa_popover,"open",/*_isMenuVisible*/ctx[18]);set_custom_element_data(goa_popover,"padded","false");set_custom_element_data(goa_popover,"tabindex","-1");set_custom_element_data(goa_popover,"width",/*_width*/ctx[19]);},m(target,anchor){insert(target,slot,anchor);insert(target,t0,anchor);insert(target,goa_popover,anchor);append(goa_popover,div);if(if_block0)if_block0.m(div,null);append(div,t1);append(div,input);/*input_binding*/ctx[42](input);append(div,t2);if_block1.m(div,null);append(goa_popover,t3);append(goa_popover,ul);for(let i=0;i<each_blocks.length;i+=1){if(each_blocks[i]){each_blocks[i].m(ul,null);}}if(each_1_else){each_1_else.m(ul,null);}/*ul_binding*/ctx[44](ul);if(!mounted){dispose=[listen(input,"keydown",/*onInputKeyDown*/ctx[32]),listen(input,"keyup",/*onInputKeyUp*/ctx[31]),listen(goa_popover,"_open",/*showMenu*/ctx[28]),listen(goa_popover,"_close",/*hideMenu*/ctx[29])];mounted=true;}},p(ctx,dirty){if(/*leadingicon*/ctx[4]){if(if_block0){if_block0.p(ctx,dirty);}else {if_block0=create_if_block_2$a(ctx);if_block0.c();if_block0.m(div,t1);}}else if(if_block0){if_block0.d(1);if_block0=null;}if(dirty[0]&/*_disabled, _filterable*/83886080&&input_style_value!==(input_style_value=`
173
- cursor: ${!/*_disabled*/ctx[26]?/*_filterable*/ctx[24]?"auto":"pointer":"default"};
174
- `)){attr(input,"style",input_style_value);}if(dirty[0]&/*name*/1&&input_aria_controls_value!==(input_aria_controls_value=`menu-${/*name*/ctx[0]}`)){attr(input,"aria-controls",input_aria_controls_value);}if(dirty[0]&/*_isMenuVisible*/262144){attr(input,"aria-expanded",/*_isMenuVisible*/ctx[18]);}if(dirty[0]&/*arialabel, name*/3&&input_aria_label_value!==(input_aria_label_value=/*arialabel*/ctx[1]||/*name*/ctx[0])){attr(input,"aria-label",input_aria_label_value);}if(dirty[0]&/*arialabelledby*/4){attr(input,"aria-labelledby",/*arialabelledby*/ctx[2]);}if(dirty[0]&/*name*/1){attr(input,"id",/*name*/ctx[0]);}if(dirty[0]&/*_activeDescendantId*/33554432){attr(input,"aria-activedescendant",/*_activeDescendantId*/ctx[25]);}if(dirty[0]&/*_disabled*/67108864){attr(input,"aria-disabled",/*_disabled*/ctx[26]);}if(dirty[0]&/*_isMenuVisible, name*/262145&&input_aria_owns_value!==(input_aria_owns_value=/*_isMenuVisible*/ctx[18]?`menu-${/*name*/ctx[0]}`:undefined)){attr(input,"aria-owns",input_aria_owns_value);}if(dirty[0]&/*_disabled*/67108864){input.disabled=/*_disabled*/ctx[26];}if(dirty[0]&/*_filterable*/16777216&&input_readonly_value!==(input_readonly_value=!/*_filterable*/ctx[24])){input.readOnly=input_readonly_value;}if(dirty[0]&/*placeholder*/64){attr(input,"placeholder",/*placeholder*/ctx[6]);}if(dirty[0]&/*name*/1){attr(input,"name",/*name*/ctx[0]);}if(current_block_type===(current_block_type=select_block_type_1(ctx))&&if_block1){if_block1.p(ctx,dirty);}else {if_block1.d(1);if_block1=current_block_type(ctx);if(if_block1){if_block1.c();if_block1.m(div,null);}}if(dirty[0]&/*width*/128&&div_style_value!==(div_style_value=cssVar("width",/*width*/ctx[7]))){attr(div,"style",div_style_value);}if(dirty[0]&/*_disabled*/67108864){toggle_class(div,"dropdown-input-group--disabled",/*_disabled*/ctx[26]);}if(dirty[0]&/*_error*/134217728){toggle_class(div,"error",/*_error*/ctx[27]);}if(dirty[0]&/*_filteredOptions, _inputEl, _highlightedIndex, onSelect*/1082179584){each_value_1=/*_filteredOptions*/ctx[15];each_blocks=update_keyed_each(each_blocks,dirty,get_key,1,ctx,each_value_1,each_1_lookup,ul,destroy_block,create_each_block_1$1,null,get_each_context_1$1);if(!each_value_1.length&&each_1_else){each_1_else.p(ctx,dirty);}else if(!each_value_1.length){each_1_else=create_else_block_1();each_1_else.c();each_1_else.m(ul,null);}else if(each_1_else){each_1_else.d(1);each_1_else=null;}}if(dirty[0]&/*name*/1&&ul_id_value!==(ul_id_value=`menu-${/*name*/ctx[0]}`)){attr(ul,"id",ul_id_value);}if(dirty[0]&/*arialabel, name*/3&&ul_aria_label_value!==(ul_aria_label_value=/*arialabel*/ctx[1]||/*name*/ctx[0])){attr(ul,"aria-label",ul_aria_label_value);}if(dirty[0]&/*arialabelledby*/4){attr(ul,"aria-labelledby",/*arialabelledby*/ctx[2]);}if(dirty[0]&/*_width, maxheight*/524320&&ul_style_value!==(ul_style_value=`
175
- width: ${/*_width*/ctx[19]};
176
- outline: none;
177
- overflow-y: auto;
178
- max-height: ${/*maxheight*/ctx[5]};
179
- `)){attr(ul,"style",ul_style_value);}if(dirty[0]&/*disabled*/256){set_custom_element_data(goa_popover,"disabled",/*disabled*/ctx[8]);}if(dirty[0]&/*relative*/512){set_custom_element_data(goa_popover,"relative",/*relative*/ctx[9]);}if(dirty[0]&/*_isMenuVisible*/262144){set_custom_element_data(goa_popover,"open",/*_isMenuVisible*/ctx[18]);}if(dirty[0]&/*_width*/524288){set_custom_element_data(goa_popover,"width",/*_width*/ctx[19]);}},d(detaching){if(detaching)detach(slot);if(detaching)detach(t0);if(detaching)detach(goa_popover);if(if_block0)if_block0.d();/*input_binding*/ctx[42](null);if_block1.d();for(let i=0;i<each_blocks.length;i+=1){each_blocks[i].d();}if(each_1_else)each_1_else.d();/*ul_binding*/ctx[44](null);mounted=false;run_all(dispose);}};}// (424:2) {#if _native}
180
- function create_if_block$o(ctx){let select;let slot;let select_aria_label_value;let mounted;let dispose;let each_value=/*_options*/ctx[17];let each_blocks=[];for(let i=0;i<each_value.length;i+=1){each_blocks[i]=create_each_block$8(get_each_context$8(ctx,each_value,i));}return {c(){select=element("select");slot=element("slot");for(let i=0;i<each_blocks.length;i+=1){each_blocks[i].c();}attr(select,"name",/*name*/ctx[0]);attr(select,"aria-label",select_aria_label_value=/*arialabel*/ctx[1]||/*name*/ctx[0]);attr(select,"aria-labelledby",/*arialabelledby*/ctx[2]);select.disabled=/*_disabled*/ctx[26];attr(select,"id",/*name*/ctx[0]);toggle_class(select,"error",/*_error*/ctx[27]);},m(target,anchor){insert(target,select,anchor);append(select,slot);for(let i=0;i<each_blocks.length;i+=1){if(each_blocks[i]){each_blocks[i].m(select,null);}}/*select_binding*/ctx[41](select);if(!mounted){dispose=listen(select,"change",/*onNativeSelect*/ctx[35]);mounted=true;}},p(ctx,dirty){if(dirty[0]&/*value, _options*/131080){each_value=/*_options*/ctx[17];let i;for(i=0;i<each_value.length;i+=1){const child_ctx=get_each_context$8(ctx,each_value,i);if(each_blocks[i]){each_blocks[i].p(child_ctx,dirty);}else {each_blocks[i]=create_each_block$8(child_ctx);each_blocks[i].c();each_blocks[i].m(select,null);}}for(;i<each_blocks.length;i+=1){each_blocks[i].d(1);}each_blocks.length=each_value.length;}if(dirty[0]&/*name*/1){attr(select,"name",/*name*/ctx[0]);}if(dirty[0]&/*arialabel, name*/3&&select_aria_label_value!==(select_aria_label_value=/*arialabel*/ctx[1]||/*name*/ctx[0])){attr(select,"aria-label",select_aria_label_value);}if(dirty[0]&/*arialabelledby*/4){attr(select,"aria-labelledby",/*arialabelledby*/ctx[2]);}if(dirty[0]&/*_disabled*/67108864){select.disabled=/*_disabled*/ctx[26];}if(dirty[0]&/*name*/1){attr(select,"id",/*name*/ctx[0]);}if(dirty[0]&/*_error*/134217728){toggle_class(select,"error",/*_error*/ctx[27]);}},d(detaching){if(detaching)detach(select);destroy_each(each_blocks,detaching);/*select_binding*/ctx[41](null);mounted=false;dispose();}};}// (467:8) {#if leadingicon}
181
- function create_if_block_2$a(ctx){let goa_icon;return {c(){goa_icon=element("goa-icon");set_custom_element_data(goa_icon,"class","dropdown-input--leading-icon");set_custom_element_data(goa_icon,"data-testid","leading-icon");set_custom_element_data(goa_icon,"type",/*leadingicon*/ctx[4]);},m(target,anchor){insert(target,goa_icon,anchor);},p(ctx,dirty){if(dirty[0]&/*leadingicon*/16){set_custom_element_data(goa_icon,"type",/*leadingicon*/ctx[4]);}},d(detaching){if(detaching)detach(goa_icon);}};}// (517:8) {:else}
182
- function create_else_block_2(ctx){let goa_icon;let goa_icon_arialabel_value;let goa_icon_ariacontrols_value;let goa_icon_ariaexpanded_value;let goa_icon_type_value;let mounted;let dispose;return {c(){goa_icon=element("goa-icon");set_custom_element_data(goa_icon,"role","button");set_custom_element_data(goa_icon,"tabindex","-1");set_custom_element_data(goa_icon,"id",/*name*/ctx[0]);set_custom_element_data(goa_icon,"arialabel",goa_icon_arialabel_value=/*arialabel*/ctx[1]||/*name*/ctx[0]);set_custom_element_data(goa_icon,"ariacontrols",goa_icon_ariacontrols_value=`menu-${/*name*/ctx[0]}`);set_custom_element_data(goa_icon,"ariaexpanded",goa_icon_ariaexpanded_value=fromBoolean(/*_isMenuVisible*/ctx[18]));set_custom_element_data(goa_icon,"class","dropdown-icon--arrow");set_custom_element_data(goa_icon,"size","medium");set_custom_element_data(goa_icon,"type",goa_icon_type_value=/*_isMenuVisible*/ctx[18]?"chevron-up":"chevron-down");},m(target,anchor){insert(target,goa_icon,anchor);if(!mounted){dispose=listen(goa_icon,"click",/*onChevronClick*/ctx[36]);mounted=true;}},p(ctx,dirty){if(dirty[0]&/*name*/1){set_custom_element_data(goa_icon,"id",/*name*/ctx[0]);}if(dirty[0]&/*arialabel, name*/3&&goa_icon_arialabel_value!==(goa_icon_arialabel_value=/*arialabel*/ctx[1]||/*name*/ctx[0])){set_custom_element_data(goa_icon,"arialabel",goa_icon_arialabel_value);}if(dirty[0]&/*name*/1&&goa_icon_ariacontrols_value!==(goa_icon_ariacontrols_value=`menu-${/*name*/ctx[0]}`)){set_custom_element_data(goa_icon,"ariacontrols",goa_icon_ariacontrols_value);}if(dirty[0]&/*_isMenuVisible*/262144&&goa_icon_ariaexpanded_value!==(goa_icon_ariaexpanded_value=fromBoolean(/*_isMenuVisible*/ctx[18]))){set_custom_element_data(goa_icon,"ariaexpanded",goa_icon_ariaexpanded_value);}if(dirty[0]&/*_isMenuVisible*/262144&&goa_icon_type_value!==(goa_icon_type_value=/*_isMenuVisible*/ctx[18]?"chevron-up":"chevron-down")){set_custom_element_data(goa_icon,"type",goa_icon_type_value);}},d(detaching){if(detaching)detach(goa_icon);mounted=false;dispose();}};}// (502:8) {#if _inputEl?.value && _filterable}
183
- function create_if_block_1$c(ctx){let goa_icon;let goa_icon_tabindex_value;let goa_icon_arialabel_value;let goa_icon_ariacontrols_value;let goa_icon_ariaexpanded_value;let mounted;let dispose;return {c(){goa_icon=element("goa-icon");set_custom_element_data(goa_icon,"id",/*name*/ctx[0]);set_custom_element_data(goa_icon,"tabindex",goa_icon_tabindex_value=/*_disabled*/ctx[26]?-1:0);set_custom_element_data(goa_icon,"role","button");set_custom_element_data(goa_icon,"arialabel",goa_icon_arialabel_value=`clear ${/*arialabel*/ctx[1]||/*name*/ctx[0]}`);set_custom_element_data(goa_icon,"ariacontrols",goa_icon_ariacontrols_value=`menu-${/*name*/ctx[0]}`);set_custom_element_data(goa_icon,"ariaexpanded",goa_icon_ariaexpanded_value=fromBoolean(/*_isMenuVisible*/ctx[18]));set_custom_element_data(goa_icon,"class","dropdown-icon--clear");set_custom_element_data(goa_icon,"size","medium");set_custom_element_data(goa_icon,"type","close");toggle_class(goa_icon,"disabled",/*_disabled*/ctx[26]);},m(target,anchor){insert(target,goa_icon,anchor);if(!mounted){dispose=[listen(goa_icon,"click",stop_propagation(/*onClearIconClick*/ctx[34])),listen(goa_icon,"keydown",/*onClearIconKeyDown*/ctx[33])];mounted=true;}},p(ctx,dirty){if(dirty[0]&/*name*/1){set_custom_element_data(goa_icon,"id",/*name*/ctx[0]);}if(dirty[0]&/*_disabled*/67108864&&goa_icon_tabindex_value!==(goa_icon_tabindex_value=/*_disabled*/ctx[26]?-1:0)){set_custom_element_data(goa_icon,"tabindex",goa_icon_tabindex_value);}if(dirty[0]&/*arialabel, name*/3&&goa_icon_arialabel_value!==(goa_icon_arialabel_value=`clear ${/*arialabel*/ctx[1]||/*name*/ctx[0]}`)){set_custom_element_data(goa_icon,"arialabel",goa_icon_arialabel_value);}if(dirty[0]&/*name*/1&&goa_icon_ariacontrols_value!==(goa_icon_ariacontrols_value=`menu-${/*name*/ctx[0]}`)){set_custom_element_data(goa_icon,"ariacontrols",goa_icon_ariacontrols_value);}if(dirty[0]&/*_isMenuVisible*/262144&&goa_icon_ariaexpanded_value!==(goa_icon_ariaexpanded_value=fromBoolean(/*_isMenuVisible*/ctx[18]))){set_custom_element_data(goa_icon,"ariaexpanded",goa_icon_ariaexpanded_value);}if(dirty[0]&/*_disabled*/67108864){toggle_class(goa_icon,"disabled",/*_disabled*/ctx[26]);}},d(detaching){if(detaching)detach(goa_icon);mounted=false;run_all(dispose);}};}// (565:8) {:else}
184
- function create_else_block_1(ctx){let li;return {c(){li=element("li");li.textContent="No matches found\n ";attr(li,"class","dropdown-item");attr(li,"data-testid","dropdown-item-not-found");},m(target,anchor){insert(target,li,anchor);},p:noop,d(detaching){if(detaching)detach(li);}};}// (549:8) {#each _filteredOptions as option, index (index)}
185
- function create_each_block_1$1(key_1,ctx){let li;let t0_value=(/*option*/ctx[61].label||/*option*/ctx[61].value)+"";let t0;let t1;let li_id_value;let li_aria_selected_value;let li_data_index_value;let li_data_testid_value;let li_data_value_value;let mounted;let dispose;function click_handler(){return(/*click_handler*/ctx[43](/*option*/ctx[61]));}return {key:key_1,first:null,c(){li=element("li");t0=text(t0_value);t1=space();attr(li,"id",li_id_value=/*option*/ctx[61].value);attr(li,"aria-selected",li_aria_selected_value=/*_inputEl*/ctx[23].value===(/*option*/ctx[61].label||/*option*/ctx[61].value));attr(li,"class","dropdown-item");attr(li,"data-index",li_data_index_value=/*index*/ctx[65]);attr(li,"data-testid",li_data_testid_value=`dropdown-item-${/*option*/ctx[61].value}`);attr(li,"data-value",li_data_value_value=/*option*/ctx[61].value);attr(li,"role","option");set_style(li,"display","block");toggle_class(li,"dropdown-item--highlighted",/*index*/ctx[65]===/*_highlightedIndex*/ctx[14]);toggle_class(li,"selected",/*_inputEl*/ctx[23].value===(/*option*/ctx[61].label||/*option*/ctx[61].value));this.first=li;},m(target,anchor){insert(target,li,anchor);append(li,t0);append(li,t1);if(!mounted){dispose=listen(li,"click",click_handler);mounted=true;}},p(new_ctx,dirty){ctx=new_ctx;if(dirty[0]&/*_filteredOptions*/32768&&t0_value!==(t0_value=(/*option*/ctx[61].label||/*option*/ctx[61].value)+""))set_data(t0,t0_value);if(dirty[0]&/*_filteredOptions*/32768&&li_id_value!==(li_id_value=/*option*/ctx[61].value)){attr(li,"id",li_id_value);}if(dirty[0]&/*_inputEl, _filteredOptions*/8421376&&li_aria_selected_value!==(li_aria_selected_value=/*_inputEl*/ctx[23].value===(/*option*/ctx[61].label||/*option*/ctx[61].value))){attr(li,"aria-selected",li_aria_selected_value);}if(dirty[0]&/*_filteredOptions*/32768&&li_data_index_value!==(li_data_index_value=/*index*/ctx[65])){attr(li,"data-index",li_data_index_value);}if(dirty[0]&/*_filteredOptions*/32768&&li_data_testid_value!==(li_data_testid_value=`dropdown-item-${/*option*/ctx[61].value}`)){attr(li,"data-testid",li_data_testid_value);}if(dirty[0]&/*_filteredOptions*/32768&&li_data_value_value!==(li_data_value_value=/*option*/ctx[61].value)){attr(li,"data-value",li_data_value_value);}if(dirty[0]&/*_filteredOptions, _highlightedIndex*/49152){toggle_class(li,"dropdown-item--highlighted",/*index*/ctx[65]===/*_highlightedIndex*/ctx[14]);}if(dirty[0]&/*_inputEl, _filteredOptions*/8421376){toggle_class(li,"selected",/*_inputEl*/ctx[23].value===(/*option*/ctx[61].label||/*option*/ctx[61].value));}},d(detaching){if(detaching)detach(li);mounted=false;dispose();}};}// (436:6) {#each _options as option}
186
- function create_each_block$8(ctx){let option;let t0_value=/*option*/ctx[61].label+"";let t0;let t1;let option_selected_value;let option_value_value;return {c(){option=element("option");t0=text(t0_value);t1=space();option.selected=option_selected_value=/*value*/ctx[3]===/*option*/ctx[61].value;option.__value=option_value_value=/*option*/ctx[61].value;option.value=option.__value;},m(target,anchor){insert(target,option,anchor);append(option,t0);append(option,t1);},p(ctx,dirty){if(dirty[0]&/*_options*/131072&&t0_value!==(t0_value=/*option*/ctx[61].label+""))set_data(t0,t0_value);if(dirty[0]&/*value, _options*/131080&&option_selected_value!==(option_selected_value=/*value*/ctx[3]===/*option*/ctx[61].value)){option.selected=option_selected_value;}if(dirty[0]&/*_options*/131072&&option_value_value!==(option_value_value=/*option*/ctx[61].value)){option.__value=option_value_value;option.value=option.__value;}},d(detaching){if(detaching)detach(option);}};}function create_fragment$J(ctx){let div;let div_data_testid_value;let div_style_value;function select_block_type(ctx,dirty){if(/*_native*/ctx[16])return create_if_block$o;return create_else_block$a;}let current_block_type=select_block_type(ctx);let if_block=current_block_type(ctx);return {c(){div=element("div");if_block.c();this.c=noop;attr(div,"data-testid",div_data_testid_value=`${/*name*/ctx[0]}-dropdown`);attr(div,"class","dropdown");attr(div,"style",div_style_value=`
187
- --width: ${/*_width*/ctx[19]};
188
- ${calculateMargin(/*mt*/ctx[10],/*mr*/ctx[11],/*mb*/ctx[12],/*ml*/ctx[13])}
189
- `);toggle_class(div,"dropdown-native",/*_native*/ctx[16]);},m(target,anchor){insert(target,div,anchor);if_block.m(div,null);/*div_binding*/ctx[45](div);},p(ctx,dirty){if(current_block_type===(current_block_type=select_block_type(ctx))&&if_block){if_block.p(ctx,dirty);}else {if_block.d(1);if_block=current_block_type(ctx);if(if_block){if_block.c();if_block.m(div,null);}}if(dirty[0]&/*name*/1&&div_data_testid_value!==(div_data_testid_value=`${/*name*/ctx[0]}-dropdown`)){attr(div,"data-testid",div_data_testid_value);}if(dirty[0]&/*_width, mt, mr, mb, ml*/539648&&div_style_value!==(div_style_value=`
190
- --width: ${/*_width*/ctx[19]};
191
- ${calculateMargin(/*mt*/ctx[10],/*mr*/ctx[11],/*mb*/ctx[12],/*ml*/ctx[13])}
192
- `)){attr(div,"style",div_style_value);}if(dirty[0]&/*_native*/65536){toggle_class(div,"dropdown-native",/*_native*/ctx[16]);}},i:noop,o:noop,d(detaching){if(detaching)detach(div);if_block.d();/*div_binding*/ctx[45](null);}};}function parseValues(selectedValue){let rawValue;try{rawValue=JSON.parse(selectedValue||`[""]`);}catch(e){rawValue=[selectedValue];}const rawValues=typeof rawValue==="object"?rawValue:[rawValue];// convert all values to strings to avoid later type comparison issues
193
- return rawValues.map(val=>`${val}`);}function isFilterMatch(option,filter){if(filter.length===0)return true;let value=option.filter||option.label||option.value;value=value.toLowerCase();filter=filter.toLowerCase();return value.startsWith(filter)||value.includes(" "+filter);}function instance$G($$self,$$props,$$invalidate){let _disabled;let _error;let _multiselect;let _native;let _filterable;let _activeDescendantId;let{name}=$$props;let{arialabel=""}=$$props;let{arialabelledby=""}=$$props;let{value=""}=$$props;let{filterable="false"}=$$props;let{leadingicon=null}=$$props;let{maxheight="276px"}=$$props;let{placeholder=""}=$$props;let{width=""}=$$props;let{disabled="false"}=$$props;let{error="false"}=$$props;let{multiselect="false"}=$$props;let{native="false"}=$$props;let{relative="false"}=$$props;let{mt=null}=$$props;let{mr=null}=$$props;let{mb=null}=$$props;let{ml=null}=$$props;//
194
- // Private
195
- //
196
- let _options=[];let _isMenuVisible=false;let _highlightedIndex=-1;let _width;let _rootEl;let _menuEl;let _selectEl;let _inputEl;let _eventHandler;let _isDirty=false;let _filteredOptions=[];let _values=[];//
197
- // Hooks
198
- //
199
- onMount(async()=>{var _a,_b;_eventHandler=_filterable?new ComboboxKeyUpHandler(_inputEl):new DropdownKeyUpHandler(_inputEl);// the following is required to appease the jest testing gods in that they don't respond
200
- // to the slotchange event
201
- $$invalidate(17,_options=getOptions());if(!_native){$$invalidate(23,_inputEl.value=(_b=(_a=_options.find(o=>o.value===value))===null||_a===void 0?void 0:_a.label)!==null&&_b!==void 0?_b:"",_inputEl);$$invalidate(19,_width=width||calculateWidth(_options));}syncFilteredOptions();// watch for DOM changes within the slot => dynamic binding
202
- const slot=_rootEl.querySelector("slot");slot===null||slot===void 0?void 0:slot.addEventListener("slotchange",_=>{var _a,_b;$$invalidate(17,_options=getOptions());syncFilteredOptions();$$invalidate(19,_width=width||calculateWidth(_options));if(!_native){$$invalidate(23,_inputEl.value=(_b=(_a=_options.find(o=>o.value===value))===null||_a===void 0?void 0:_a.label)!==null&&_b!==void 0?_b:"",_inputEl);}});});//
203
- // Functions
204
- //
205
- // prevents unwanted reactive updates.
206
- function setDisplayedValue(){var _a,_b;if(_inputEl){const option=_options.find(o=>o.value==_values[0]);// possible string number comparison
207
- $$invalidate(23,_inputEl.value=(_b=(_a=option===null||option===void 0?void 0:option.label)!==null&&_a!==void 0?_a:option===null||option===void 0?void 0:option.value)!==null&&_b!==void 0?_b:"",_inputEl);}}function getChildren(){const slot=_rootEl.querySelector("slot");if(slot){// default
208
- return slot.assignedElements();}// unit tests
209
- const el=_native?_selectEl:_rootEl;return [...el.children];}// Create a list of the options based on the children within the slot
210
- // The children don't have to be goa-dropdown-item elements. Any child element
211
- // work as long as it has a value and label content
212
- function getOptions(){return getChildren().filter(child=>child.tagName==="GOA-DROPDOWN-ITEM").map(el=>{const option=el;const value=el.getAttribute("value")||option.value||"";const label=el.getAttribute("label")||option.label||el.innerHTML||value;const filter=el.getAttribute("filter")||label||value||"";return {value,label,filter};});}// compute the required width to ensure all children fit
213
- function calculateWidth(options){// set width to longest item
214
- const optionsWidth=options.map(option=>{const label=`${option.label}`||`${option.value}`||"";return label.length;}).sort((a,b)=>a>b?1:-1).pop();// longest one defines the width
215
- let maxWidth=Math.max(optionsWidth,placeholder.length)+8;// compensate for icon width
216
- if(leadingicon){maxWidth+=2;}return `${maxWidth}ch`;}// Change the direction of highlighted options for Arrow up and down
217
- function changeHighlightedOption(offset){let index=_highlightedIndex+offset;let items=!(_filteredOptions===null||_filteredOptions===void 0?void 0:_filteredOptions.length)?_options:_filteredOptions;if(items.length===0)return;// if index is out of scope
218
- if(index<0){index=_filterable?items.length-1:0;}else if(index>=items.length){index=_filterable?0:items.length-1;}$$invalidate(14,_highlightedIndex=index);scrollToOption(index);}function scrollToOption(index){const liNode=_menuEl.querySelector(`li[data-index="${index}"]`);if(!liNode)return;const liOptionRect=liNode.getBoundingClientRect();const ulRect=_menuEl.getBoundingClientRect();const isInView=liOptionRect.top>=0&&liOptionRect.left>=0&&liOptionRect.bottom<=ulRect.height&&liOptionRect.right<=ulRect.width;if(isInView)return;liNode.scrollIntoView({behavior:"smooth",block:"nearest"});}function syncFilteredOptions(){$$invalidate(15,_filteredOptions=_filterable?_options.filter(option=>isFilterMatch(option,_inputEl.value)):_options);}function showMenu(){if(_disabled){return;}setTimeout(()=>{syncFilteredOptions();$$invalidate(18,_isMenuVisible=true);_inputEl.focus();},0);}function hideMenu(){$$invalidate(18,_isMenuVisible=false);}function dispatchValue(value){const detail=_multiselect?{name,values:[value,..._values]}:{name,value};setTimeout(()=>{_rootEl.dispatchEvent(new CustomEvent("_change",{composed:true,detail}));_isDirty=false;},1);}//
219
- // Event handlers
220
- //
221
- function onSelect(option){if(_disabled)return;if(!_native){_isDirty=true;hideMenu();$$invalidate(23,_inputEl.value=option.label,_inputEl);}dispatchValue(option.value);}function onInputKeyUp(e){if(_disabled)return;_eventHandler.handleKeyUp(e);}function onInputKeyDown(e){if(_disabled)return;_eventHandler.handleKeyDown(e);}function onClearIconKeyDown(e){if(e.key==="Enter"||e.key===" "){e.stopPropagation();reset();showMenu();}}function onClearIconClick(e){reset();showMenu();e.stopPropagation();}function onNativeSelect(e){const target=e.currentTarget;const option=_options[target.selectedIndex];onSelect(option);}function reset(){if(_disabled)return;$$invalidate(25,_activeDescendantId=undefined);$$invalidate(14,_highlightedIndex=-1);$$invalidate(23,_inputEl.value="",_inputEl);_isDirty=false;syncFilteredOptions();dispatchValue("");}function onChevronClick(e){showMenu();e.stopPropagation();}class ComboboxKeyUpHandler{constructor(input){this.input=input;input.addEventListener("blur",async function(e){if(!_isDirty)return;if(!_filterable)return;const input=e.target;const selectedOption=_filteredOptions.find(o=>o.label===input.value);if(!selectedOption){dispatchValue("");input.value="";}});}onEscape(e){reset();_inputEl.focus();e.preventDefault();e.stopPropagation();}onEnter(e){const option=_filteredOptions[_highlightedIndex];if(option){onSelect(option);}if(_inputEl.value){hideMenu();}else {showMenu();}e.stopPropagation();}onArrow(e,direction){if(!_isMenuVisible)showMenu();changeHighlightedOption(direction==="up"?-1:1);e.stopPropagation();}onTab(_){const matchedOption=_filteredOptions.find(option=>option.label.toLowerCase()===this.input.value.toLowerCase());if(matchedOption){onSelect(matchedOption);}hideMenu();}onKeyUp(_){showMenu();_isDirty=true;}handleKeyUp(e){switch(e.key){case"Enter":this.onEnter(e);break;case"ArrowUp":this.onArrow(e,"up");break;case"ArrowDown":this.onArrow(e,"down");break;case"Home":this.input.setSelectionRange(0,0);break;case"End":this.input.setSelectionRange(this.input.value.length,this.input.value.length);break;default:this.onKeyUp(e);break;}}handleKeyDown(e){switch(e.key){case"Escape":this.onEscape(e);break;case"Tab":this.onTab(e);break;}}}class DropdownKeyUpHandler{constructor(_input){}onEnter(e){if(_isMenuVisible){const option=_filteredOptions[_highlightedIndex];if(option){onSelect(option);}hideMenu();}else {showMenu();}e.preventDefault();e.stopPropagation();}onArrow(e,direction){if(!_isMenuVisible)showMenu();changeHighlightedOption(direction==="up"?-1:1);e.preventDefault();e.stopPropagation();}handleKeyDown(e){switch(e.key){case" ":case"Enter":this.onEnter(e);break;case"ArrowUp":this.onArrow(e,"up");break;case"ArrowDown":this.onArrow(e,"down");break;case"Tab":hideMenu();break;}return false;}handleKeyUp(e){switch(e.key){case"ArrowUp":case"ArrowDown":case" ":case"Enter":e.preventDefault();e.stopPropagation();}}}function select_binding($$value){binding_callbacks[$$value?'unshift':'push'](()=>{_selectEl=$$value;$$invalidate(22,_selectEl);$$invalidate(17,_options);});}function input_binding($$value){binding_callbacks[$$value?'unshift':'push'](()=>{_inputEl=$$value;$$invalidate(23,_inputEl);});}const click_handler=option=>onSelect(option);function ul_binding($$value){binding_callbacks[$$value?'unshift':'push'](()=>{_menuEl=$$value;$$invalidate(21,_menuEl);});}function div_binding($$value){binding_callbacks[$$value?'unshift':'push'](()=>{_rootEl=$$value;$$invalidate(20,_rootEl);});}$$self.$$set=$$props=>{if('name'in $$props)$$invalidate(0,name=$$props.name);if('arialabel'in $$props)$$invalidate(1,arialabel=$$props.arialabel);if('arialabelledby'in $$props)$$invalidate(2,arialabelledby=$$props.arialabelledby);if('value'in $$props)$$invalidate(3,value=$$props.value);if('filterable'in $$props)$$invalidate(37,filterable=$$props.filterable);if('leadingicon'in $$props)$$invalidate(4,leadingicon=$$props.leadingicon);if('maxheight'in $$props)$$invalidate(5,maxheight=$$props.maxheight);if('placeholder'in $$props)$$invalidate(6,placeholder=$$props.placeholder);if('width'in $$props)$$invalidate(7,width=$$props.width);if('disabled'in $$props)$$invalidate(8,disabled=$$props.disabled);if('error'in $$props)$$invalidate(38,error=$$props.error);if('multiselect'in $$props)$$invalidate(39,multiselect=$$props.multiselect);if('native'in $$props)$$invalidate(40,native=$$props.native);if('relative'in $$props)$$invalidate(9,relative=$$props.relative);if('mt'in $$props)$$invalidate(10,mt=$$props.mt);if('mr'in $$props)$$invalidate(11,mr=$$props.mr);if('mb'in $$props)$$invalidate(12,mb=$$props.mb);if('ml'in $$props)$$invalidate(13,ml=$$props.ml);};$$self.$$.update=()=>{if($$self.$$.dirty[0]&/*disabled*/256){//
222
- // Reactive
223
- //
224
- $$invalidate(26,_disabled=toBoolean(disabled));}if($$self.$$.dirty[1]&/*error*/128){$$invalidate(27,_error=toBoolean(error));}if($$self.$$.dirty[1]&/*multiselect*/256){_multiselect=toBoolean(multiselect);}if($$self.$$.dirty[1]&/*native*/512){$$invalidate(16,_native=toBoolean(native));}if($$self.$$.dirty[0]&/*_native*/65536|$$self.$$.dirty[1]&/*filterable*/64){$$invalidate(24,_filterable=toBoolean(filterable)&&!_native);}if($$self.$$.dirty[0]&/*_filteredOptions, _highlightedIndex*/49152){// To keep track of active descendant for the accessibility
225
- $$invalidate(25,_activeDescendantId=_filteredOptions[_highlightedIndex]?_filteredOptions[_highlightedIndex].value:undefined);}if($$self.$$.dirty[0]&/*value*/8){{_values=parseValues(value);// updating _inputEl.value is done within seperate function
226
- // to prevent unwanted reactive updates.
227
- setDisplayedValue();}}};return [name,arialabel,arialabelledby,value,leadingicon,maxheight,placeholder,width,disabled,relative,mt,mr,mb,ml,_highlightedIndex,_filteredOptions,_native,_options,_isMenuVisible,_width,_rootEl,_menuEl,_selectEl,_inputEl,_filterable,_activeDescendantId,_disabled,_error,showMenu,hideMenu,onSelect,onInputKeyUp,onInputKeyDown,onClearIconKeyDown,onClearIconClick,onNativeSelect,onChevronClick,filterable,error,multiselect,native,select_binding,input_binding,click_handler,ul_binding,div_binding];}class Dropdown extends SvelteElement{constructor(options){super();const style=document.createElement('style');style.textContent=`:host{box-sizing:border-box;font-family:var(--goa-font-family-sans)}.dropdown{cursor:pointer;display:inline-block;width:var(--width, 100%)}.dropdown-input-group{box-sizing:border-box;outline:none;transition:box-shadow 0.1s ease-in;border:1px solid var(--goa-color-greyscale-700);border-radius:var(--goa-border-radius-m);display:inline-flex;align-items:stretch;vertical-align:middle;background-color:var(--goa-color-greyscale-white);cursor:pointer;width:100%}.dropdown-input-group:hover{border-color:var(--goa-color-interactive-hover);box-shadow:0 0 0 var(--goa-border-width-m) var(--goa-color-interactive-hover)}.dropdown-input-group:focus,.dropdown-input-group:focus-within{box-shadow:0 0 0 3px var(--goa-color-interactive-focus)}@media screen and (max-width: 623px){@media not (max-color:2147477350){.dropdown-input-group{width:var(--width)}}}@media not screen and (max-width: 623px){@media not (color:2147477350){.dropdown-input-group{width:var(--width)}}}.dropdown-input-group.error,.dropdown-input-group.error:hover{border:2px solid var(--goa-color-interactive-error);box-shadow:0 0 0 1px var(--goa-color-interactive-error)}.dropdown-input-group.error:focus-within,.dropdown-input-group.error:focus{border:2px solid var(--goa-color-interactive-error);box-shadow:0 0 0 3px var(--goa-color-interactive-focus)}.dropdown-icon--arrow,.dropdown-icon--clear{margin-right:var(--goa-space-s)}.dropdown-icon--clear:focus:not(.disabled),.dropdown-icon--clear:active:not(.disabled){color:var(--goa-color-interactive-focus);outline:none}.dropdown-input--leading-icon{margin-left:0.75rem}.dropdown-input--leading-icon+input{padding-left:0.5rem}input{display:inline-block;color:var(--goa-color-text-default);font-size:var(--goa-font-size-4);padding:var(--goa-space-xs);padding-left:var(--goa-space-s);line-height:calc(40px - calc(var(--goa-space-xs) * 2));background-color:transparent;width:100%;flex:1 1 auto;font-family:var(--goa-font-family-sans);z-index:1}input,input:focus,input:hover,input:active{outline:none;border:none}input[aria-disabled="true"]{color:var(--goa-color-text-secondary)}.dropdown-input-group--disabled,.dropdown-input-group--disabled:hover,.dropdown-input-group--disabled:active,.dropdown-input-group--disabled:focus{background-color:var(--goa-color-greyscale-100);border-color:var(--goa-color-greyscale-200) !important;cursor:default;box-shadow:none !important}ul[role="listbox"]{border-radius:var(--goa-border-radius-m)}.dropdown-item{margin:0;padding:0.5rem;cursor:pointer;color:var(--goa-color-greyscale-black);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.dropdown-item:hover,.dropdown-item--highlighted{background:var(--goa-color-greyscale-100);color:var(--goa-color-interactive-hover)}.dropdown-item[aria-selected="true"]{background:var(--goa-color-interactive-default);color:var(--goa-color-greyscale-white)}.dropdown-item[aria-selected="true"]:hover,.dropdown-item[aria-selected="true"].dropdown-item--highlighted{background:var(--goa-color-interactive-hover);color:var(--goa-color-greyscale-white)}.dropdown-native{position:relative;border:1px solid var(--goa-color-greyscale-700);border-radius:var(--goa-border-radius-m);background-color:var(--goa-color-greyscale-white);transition:box-shadow 0.1s ease-in}.dropdown-native:has(select:disabled){background-color:var(--goa-color-greyscale-100);border-color:var(--goa-color-greyscale-200);box-shadow:none;color:var(--goa-color-text-secondary);cursor:default}.dropdown-native:has(select.error){border:2px solid var(--goa-color-interactive-error)}.dropdown-native:hover{border-color:var(--goa-color-interactive-hover);box-shadow:0 0 0 var(--goa-border-width-m) var(--goa-color-interactive-hover)}select{border:none;font:var(--goa-font-family-sans);background-color:transparent;color:var(--goa-color-text-default);font-size:var(--goa-font-size-4);-webkit-appearance:none;-moz-appearance:none;appearance:none;padding:calc(var(--goa-space-xs) + 1px);padding-left:var(--goa-space-s);padding-right:3rem;outline:none;width:100%}.dropdown-native::after{content:"";position:absolute;right:0.6rem;top:0.6rem;pointer-events:none;width:1.5rem;height:1.5rem;background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 512 512'><path fill='none' stroke='%23333333' stroke-linecap='round' stroke-linejoin='round' stroke-width='48' d='M112 184l144 144 144-144' /%3E%3C/svg%3E");background-repeat:none}.dropdown-native:focus-within{box-shadow:0 0 0 3px var(--goa-color-interactive-focus)}`;this.shadowRoot.appendChild(style);init(this,{target:this.shadowRoot,props:attribute_to_object(this.attributes),customElement:true},instance$G,create_fragment$J,safe_not_equal,{name:0,arialabel:1,arialabelledby:2,value:3,filterable:37,leadingicon:4,maxheight:5,placeholder:6,width:7,disabled:8,error:38,multiselect:39,native:40,relative:9,mt:10,mr:11,mb:12,ml:13},null,[-1,-1,-1]);if(options){if(options.target){insert(options.target,this,options.anchor);}if(options.props){this.$set(options.props);flush();}}}static get observedAttributes(){return ["name","arialabel","arialabelledby","value","filterable","leadingicon","maxheight","placeholder","width","disabled","error","multiselect","native","relative","mt","mr","mb","ml"];}get name(){return this.$$.ctx[0];}set name(name){this.$$set({name});flush();}get arialabel(){return this.$$.ctx[1];}set arialabel(arialabel){this.$$set({arialabel});flush();}get arialabelledby(){return this.$$.ctx[2];}set arialabelledby(arialabelledby){this.$$set({arialabelledby});flush();}get value(){return this.$$.ctx[3];}set value(value){this.$$set({value});flush();}get filterable(){return this.$$.ctx[37];}set filterable(filterable){this.$$set({filterable});flush();}get leadingicon(){return this.$$.ctx[4];}set leadingicon(leadingicon){this.$$set({leadingicon});flush();}get maxheight(){return this.$$.ctx[5];}set maxheight(maxheight){this.$$set({maxheight});flush();}get placeholder(){return this.$$.ctx[6];}set placeholder(placeholder){this.$$set({placeholder});flush();}get width(){return this.$$.ctx[7];}set width(width){this.$$set({width});flush();}get disabled(){return this.$$.ctx[8];}set disabled(disabled){this.$$set({disabled});flush();}get error(){return this.$$.ctx[38];}set error(error){this.$$set({error});flush();}get multiselect(){return this.$$.ctx[39];}set multiselect(multiselect){this.$$set({multiselect});flush();}get native(){return this.$$.ctx[40];}set native(native){this.$$set({native});flush();}get relative(){return this.$$.ctx[9];}set relative(relative){this.$$set({relative});flush();}get mt(){return this.$$.ctx[10];}set mt(mt){this.$$set({mt});flush();}get mr(){return this.$$.ctx[11];}set mr(mr){this.$$set({mr});flush();}get mb(){return this.$$.ctx[12];}set mb(mb){this.$$set({mb});flush();}get ml(){return this.$$.ctx[13];}set ml(ml){this.$$set({ml});flush();}}customElements.define("goa-dropdown",Dropdown);/* src/components/dropdown/DropdownItem.svelte generated by Svelte v3.59.2 */function create_fragment$I(ctx){return {c(){this.c=noop;},m:noop,p:noop,i:noop,o:noop,d:noop};}function instance$F($$self,$$props,$$invalidate){let{filter=""}=$$props;let{label=""}=$$props;let{value=""}=$$props;$$self.$$set=$$props=>{if('filter'in $$props)$$invalidate(0,filter=$$props.filter);if('label'in $$props)$$invalidate(1,label=$$props.label);if('value'in $$props)$$invalidate(2,value=$$props.value);};return [filter,label,value];}class DropdownItem extends SvelteElement{constructor(options){super();init(this,{target:this.shadowRoot,props:attribute_to_object(this.attributes),customElement:true},instance$F,create_fragment$I,safe_not_equal,{filter:0,label:1,value:2},null);if(options){if(options.target){insert(options.target,this,options.anchor);}if(options.props){this.$set(options.props);flush();}}}static get observedAttributes(){return ["filter","label","value"];}get filter(){return this.$$.ctx[0];}set filter(filter){this.$$set({filter});flush();}get label(){return this.$$.ctx[1];}set label(label){this.$$set({label});flush();}get value(){return this.$$.ctx[2];}set value(value){this.$$set({value});flush();}}customElements.define("goa-dropdown-item",DropdownItem);/* src/components/focus-trap/FocusTrap.svelte generated by Svelte v3.59.2 */function create_fragment$H(ctx){let div;return {c(){div=element("div");div.innerHTML=`<span data-tab-boundry="start" tabindex="0"></span>
228
- <slot></slot>
229
-
230
- <span data-tab-boundry="end" tabindex="0"></span>`;this.c=noop;},m(target,anchor){insert(target,div,anchor);/*div_binding*/ctx[1](div);},p:noop,i:noop,o:noop,d(detaching){if(detaching)detach(div);/*div_binding*/ctx[1](null);}};}function isFocusable(node){var _a;const element=node;const isTabbable=element.tabIndex>0||element.tabIndex===0&&element.getAttribute('tabIndex')!==null;if(isTabbable)return node;if(element["disabled"])return null;if(element.tabIndex<0||((_a=element.getAttribute)===null||_a===void 0?void 0:_a.call(element,"tabindex"))==="-1")return null;switch(element.nodeName){case'A':{const el=element;if(!!el.href&&el.rel!=='ignore')return node;}case'INPUT':{const el=element;if(el.type!=='hidden'&&el.type!=='file')return node;}case'BUTTON':case'SELECT':case'TEXTAREA':return node;default:return null;}}function instance$E($$self,$$props,$$invalidate){let rootEl;let boundryStartEl;let boundryEndEl;let isShiftPressed;// Hooks
231
- onMount(async()=>{await tick();// event is attached to the rootEl, eliminating the need to remove the listener since it
232
- // will be removed when the associated element is removed.
233
- rootEl.addEventListener("focus",onFocus,true);rootEl.addEventListener("keydown",onKeydown,true);rootEl.addEventListener("keyup",onKeyup,true);boundryStartEl=rootEl.querySelector("[data-tab-boundry=start]");boundryEndEl=rootEl.querySelector("[data-tab-boundry=end]");});function onKeydown(e){if(e.shiftKey)isShiftPressed=true;}function onKeyup(e){if(e.shiftKey)isShiftPressed=false;}// Focus event handler
234
- function onFocus(event){const el=event.target;if(el.dataset.tabBoundry==="start"){if(isShiftPressed){boundryEndEl.focus();return;}const next=findFirstNode([el.nextElementSibling],false);next===null||next===void 0?void 0:next.focus();return;}if(el.dataset.tabBoundry==="end"){if(!isShiftPressed){boundryStartEl.focus();return;}const next=findFirstNode([el.previousElementSibling],true);next===null||next===void 0?void 0:next.focus();return;}}function findFirstNode(nodes,reversed=false){const nodeList=reversed?[...nodes].reverse():nodes;for(const node of nodeList){const el=isFocusable(node)||findFirstNode(node.childNodes,reversed)||findFirstNodeOfSlot(node,reversed)||findFirstNodeOfShadowDOM(node,reversed);if(el){return el;}}return null;}function findFirstNodeOfSlot(node,reversed){if(!(node instanceof HTMLSlotElement))return null;return findFirstNode([...node.assignedNodes()],reversed);}function findFirstNodeOfShadowDOM(node,reversed){var _a;if(!(node instanceof HTMLElement))return null;return findFirstNode([...(((_a=node.shadowRoot)===null||_a===void 0?void 0:_a.childNodes)||[])],reversed);}function div_binding($$value){binding_callbacks[$$value?'unshift':'push'](()=>{rootEl=$$value;$$invalidate(0,rootEl);});}return [rootEl,div_binding];}class FocusTrap extends SvelteElement{constructor(options){super();const style=document.createElement('style');style.textContent=`div{display:inline}`;this.shadowRoot.appendChild(style);init(this,{target:this.shadowRoot,props:attribute_to_object(this.attributes),customElement:true},instance$E,create_fragment$H,safe_not_equal,{},null);if(options){if(options.target){insert(options.target,this,options.anchor);}}}}customElements.define("goa-focus-trap",FocusTrap);/* src/components/footer/Footer.svelte generated by Svelte v3.59.2 */function create_if_block$n(ctx){let goa_divider;return {c(){goa_divider=element("goa-divider");set_custom_element_data(goa_divider,"spacing","small");},m(target,anchor){insert(target,goa_divider,anchor);},d(detaching){if(detaching)detach(goa_divider);}};}function create_fragment$G(ctx){let div5;let div4;let div0;let t0;let t1;let div3;let div1;let t2;let div2;let a0;let t3;let a1;let div5_style_value;let if_block=/*navLinks*/ctx[2]&&/*navLinks*/ctx[2].length>0&&create_if_block$n();return {c(){div5=element("div");div4=element("div");div0=element("div");div0.innerHTML=`<slot name="nav"></slot>`;t0=space();if(if_block)if_block.c();t1=space();div3=element("div");div1=element("div");div1.innerHTML=`<slot name="meta"></slot>`;t2=space();div2=element("div");a0=element("a");a0.innerHTML=`<img alt="GoA Logo" class="logo" src="data:image/svg+xml,%3Csvg xmlns=&#39;http://www.w3.org/2000/svg&#39; xmlns:xlink=&#39;http://www.w3.org/1999/xlink&#39; width=&#39;149.351&#39; height=&#39;42&#39; viewBox=&#39;0 0 149.351 42&#39;%3E%3Cdefs%3E%3Cstyle%3E.a%7Bfill:none;%7D.b%7Bclip-path:url(%23a);%7D.c%7Bfill:%2300aad2;%7D.d%7Bfill:%235f6a72;%7D%3C/style%3E%3CclipPath id=&#39;a&#39;%3E%3Crect class=&#39;a&#39; width=&#39;149.351&#39; height=&#39;42&#39;/%3E%3C/clipPath%3E%3C/defs%3E%3Cg class=&#39;b&#39;%3E%3Crect class=&#39;c&#39; width=&#39;13.555&#39; height=&#39;13.555&#39; transform=&#39;translate(135.796 21.524)&#39;/%3E%3Cpath class=&#39;d&#39; d=&#39;M63.082,33.088c-1.383.138-2.835.277-4.357.346.553-4.357,2.835-10.373,5.671-9.405,1.66.553.761,5.671-1.314,9.059m-3.527,2.974a3.761,3.761,0,0,1-1.245,0,.851.851,0,0,0,.346-.692v-.553c.761,0,1.936-.138,3.389-.277a4.327,4.327,0,0,1-2.49,1.521M76.844,25.688c1.8-1.66,2.7-1.521,2.9-1.106.484.968-1.591,4.357-5.671,6.224a10.328,10.328,0,0,1,2.766-5.118m66.736,1.66c-.207-3.389-3.181-3.942-3.6-2.974-.138.346,1.106.207,1.106,2.628,0,3.942-4.011,9.129-9.129,9.129-5.532,0-6.985-4.357-7.261-6.432-.207-1.452.138-3.458-2.351-3.181-1.729.207-3.25,3.527-5.463,6.362-1.867,2.42-2.7,2.213-2.282.138.553-2.628,2.7-8.714,5.187-9.129,1.176-.207,1.591,1.8,2.075.553s.069-4.011-2.559-4.011c-1.8,0-3.942,1.936-5.74,4.08-1.521,1.936-9.336,13.416-12.656,10.927-1.521-1.176-1.383-5.878-.415-11.411,3.873-1.521,7.123-1.037,8.921-.138.9.415,1.037.346.622-.622-.553-1.452-3.665-3.734-8.575-2.7-.138,0-.207.069-.346.069.415-1.8.83-3.665,1.383-5.463.484-1.66,1.8-4.5-1.729-4.979-1.106-.207-.622.346-1.037,1.867-.692,2.766-1.521,6.362-2.144,10.028a19.745,19.745,0,0,0-7.538,8.091,38.59,38.59,0,0,0,.9-4.772,1.589,1.589,0,0,0-1.245-1.729c-.761-.207-1.729.138-2.628,1.452-2.144,3.043-4.841,7.815-8.99,9.82-2.974,1.452-4.288,0-4.357-2.282a9.869,9.869,0,0,0,1.521-.553c5.394-2.351,7.192-5.947,5.878-8.16-1.314-2.075-4.979-1.452-7.953,1.66a11.175,11.175,0,0,0-2.7,6.5c-1.245.277-2.628.484-4.219.692,2.49-4.08,2.282-9.613-1.383-10.581-4.288-1.106-6.432,3.043-7.331,6.5.346-3.873.9-7.745,1.591-11.549.346-1.66,1.452-4.5-2.075-4.979-1.106-.207-.968.346-.9,1.867.138,2.075-2.144,14.454-.968,19.848-1.521.484-2.144,1.66-.207,2.835,1.383.83,4.357,1.106,7.331-.346a9.3,9.3,0,0,0,2.766-2.144c1.8-.207,3.665-.553,5.394-.83.277,2.42,1.867,4.219,5.463,3.873,5.118-.484,9.682-6.777,11.411-9.82-.346,3.25-2.42,10.373,1.176,10.028,1.383-.138.83-.346.9-1.591.346-4.288,3.873-7.953,7.4-10.166-.622,5.256-.415,9.958,2.006,11.411,4.426,2.766,10.581-4.5,14.039-8.921-1.729,3.942-2.7,8.921-.138,9.682,3.043.9,5.463-4.219,8.3-8.091.346,2.766,2.213,7.607,9.682,7.607,8.022-.069,13.071-4.91,12.863-10.1m-108.3,8.645A66.439,66.439,0,0,1,27.4,32.534a59.168,59.168,0,0,0,6.777-2.974,54.453,54.453,0,0,0,1.106,6.432m20.4,3.873c-.069-.207-.622.069-1.106,0-1.452-.207-3.389-2.213-3.942-5.463-1.037-5.878-.415-11.687,1.314-20.332.346-1.66,1.452-4.5-2.075-5.048-1.106-.138-.553.415-.83,1.867C47.66,17.32,42.4,21.954,37.149,25.066,36.6,17.735,36.8,9.505,38.186,4.526c1.176-4.219,2.559-3.458.83-4.357s-3.734.277-5.325,3.458S24.839,23.89,13.221,35.439C7.273,41.317,1.879,38.274.842,37.375c-.9-.761-1.176.415-.138,1.591,4.772,5.256,11.826,2.282,14.384-.277,7.054-7.054,15.283-22.268,18.6-28.7a98.251,98.251,0,0,0,.277,16.874,50.129,50.129,0,0,1-8.3,3.181c-1.66.415-2.7,1.106-2.7,1.867s1.106,1.521,2.7,2.282c2.835,1.383,11.2,5.256,13.209,6.5,1.729,1.037,2.628.207,3.112-.9.692-1.452-1.176-2.282-2.974-2.766a60.545,60.545,0,0,1-1.66-9.267c4.219-2.628,8.437-6.086,10.788-10.443C47.522,20.916,46,33.3,49.873,38.482a5.451,5.451,0,0,0,4.564,2.213c.968-.069,1.383-.692,1.245-.83&#39; transform=&#39;translate(-0.038 0.124)&#39;/%3E%3C/g%3E%3C/svg%3E"/>`;t3=space();a1=element("a");a1.textContent=`© ${/*year*/ctx[4]} Government of Alberta`;this.c=noop;attr(div0,"class","nav-links");attr(div1,"class","meta-links");attr(a0,"href","https://alberta.ca");attr(a1,"href","https://alberta.ca");attr(a1,"class","goa-copyright");attr(div2,"class","abgov");toggle_class(div2,"with-meta-links",/*metaLinks*/ctx[3]&&/*metaLinks*/ctx[3].length>0);attr(div3,"class","meta-section");toggle_class(div3,"with-meta-links",/*metaLinks*/ctx[3]&&/*metaLinks*/ctx[3].length>0);attr(div4,"class","content");attr(div5,"class","app-footer");attr(div5,"style",div5_style_value=`--max-content-width: ${/*maxcontentwidth*/ctx[0]||"100%"}`);},m(target,anchor){insert(target,div5,anchor);append(div5,div4);append(div4,div0);append(div4,t0);if(if_block)if_block.m(div4,null);append(div4,t1);append(div4,div3);append(div3,div1);append(div3,t2);append(div3,div2);append(div2,a0);append(div2,t3);append(div2,a1);/*div5_binding*/ctx[5](div5);},p(ctx,[dirty]){if(/*navLinks*/ctx[2]&&/*navLinks*/ctx[2].length>0){if(if_block);else {if_block=create_if_block$n();if_block.c();if_block.m(div4,t1);}}else if(if_block){if_block.d(1);if_block=null;}if(dirty&/*metaLinks*/8){toggle_class(div2,"with-meta-links",/*metaLinks*/ctx[3]&&/*metaLinks*/ctx[3].length>0);}if(dirty&/*metaLinks*/8){toggle_class(div3,"with-meta-links",/*metaLinks*/ctx[3]&&/*metaLinks*/ctx[3].length>0);}if(dirty&/*maxcontentwidth*/1&&div5_style_value!==(div5_style_value=`--max-content-width: ${/*maxcontentwidth*/ctx[0]||"100%"}`)){attr(div5,"style",div5_style_value);}},i:noop,o:noop,d(detaching){if(detaching)detach(div5);if(if_block)if_block.d();/*div5_binding*/ctx[5](null);}};}function instance$D($$self,$$props,$$invalidate){let{maxcontentwidth=""}=$$props;let rootEl;let navLinks;let metaLinks;const year=new Date().getFullYear();onMount(async()=>{await tick();const navSlot=rootEl.querySelector("slot[name=nav]");const metaSlot=rootEl.querySelector("slot[name=meta]");$$invalidate(2,navLinks=navSlot.assignedElements());$$invalidate(3,metaLinks=metaSlot.assignedElements());});function div5_binding($$value){binding_callbacks[$$value?'unshift':'push'](()=>{rootEl=$$value;$$invalidate(1,rootEl);});}$$self.$$set=$$props=>{if('maxcontentwidth'in $$props)$$invalidate(0,maxcontentwidth=$$props.maxcontentwidth);};return [maxcontentwidth,rootEl,navLinks,metaLinks,year,div5_binding];}class Footer extends SvelteElement{constructor(options){super();const style=document.createElement('style');style.textContent=`*{box-sizing:border-box}.app-footer{background-color:var(--goa-color-greyscale-100);border-top:2px solid var(--goa-color-greyscale-200);border-bottom:1rem solid var(--goa-color-brand-default)}.content{margin:0 auto;width:min(var(--max-content-width), 100%)}@media screen and (max-width: 623px){.content{padding:2rem 1rem}}@media screen and (min-width: 624px) and (max-width: 1023px){.content{padding:2rem 2rem}}@media screen and (min-width: 1024px){.content{padding:2rem 4.5rem}}.meta-section{display:flex;flex-direction:column;padding:1rem 0}.meta-section.with-meta-links{gap:2rem;justify-content:space-between}.meta-links{display:none}.with-meta-links .meta-links{display:block}.nav-links{display:flex;flex-direction:column;gap:2rem}.abgov{display:flex;flex-direction:column;justify-content:space-between;width:100%}@media screen and (max-width: 623px){@media not (max-color:2147477350){.meta-section{flex-direction:row;gap:2rem}.nav-links{flex-direction:row}.abgov{align-items:center;flex-direction:row-reverse}}}@media not screen and (max-width: 623px){@media not (color:2147477350){.meta-section{flex-direction:row;gap:2rem}.nav-links{flex-direction:row}.abgov{align-items:center;flex-direction:row-reverse}}}.abgov.with-meta-links{gap:1rem;flex-direction:column;width:unset}@media screen and (max-width: 623px){@media not (max-color:2147477350){.abgov.with-meta-links{align-items:flex-end}}}@media not screen and (max-width: 623px){@media not (color:2147477350){.abgov.with-meta-links{align-items:flex-end}}}.goa-copyright{white-space:nowrap}a{color:var(--goa-color-text-secondary)}`;this.shadowRoot.appendChild(style);init(this,{target:this.shadowRoot,props:attribute_to_object(this.attributes),customElement:true},instance$D,create_fragment$G,safe_not_equal,{maxcontentwidth:0},null);if(options){if(options.target){insert(options.target,this,options.anchor);}if(options.props){this.$set(options.props);flush();}}}static get observedAttributes(){return ["maxcontentwidth"];}get maxcontentwidth(){return this.$$.ctx[0];}set maxcontentwidth(maxcontentwidth){this.$$set({maxcontentwidth});flush();}}customElements.define("goa-app-footer",Footer);/* src/components/footer-meta-section/FooterMetaSection.svelte generated by Svelte v3.59.2 */function get_each_context$7(ctx,list,i){const child_ctx=ctx.slice();child_ctx[3]=list[i];return child_ctx;}// (51:4) {#each children as child}
235
- function create_each_block$7(ctx){let li;let a;let t_value=/*child*/ctx[3].innerHTML+"";let t;let a_href_value;return {c(){li=element("li");a=element("a");t=text(t_value);attr(a,"href",a_href_value=/*child*/ctx[3].href);},m(target,anchor){insert(target,li,anchor);append(li,a);append(a,t);},p(ctx,dirty){if(dirty&/*children*/2&&t_value!==(t_value=/*child*/ctx[3].innerHTML+""))set_data(t,t_value);if(dirty&/*children*/2&&a_href_value!==(a_href_value=/*child*/ctx[3].href)){attr(a,"href",a_href_value);}},d(detaching){if(detaching)detach(li);}};}function create_fragment$F(ctx){let section;let div;let t;let ul;let each_value=/*children*/ctx[1];let each_blocks=[];for(let i=0;i<each_value.length;i+=1){each_blocks[i]=create_each_block$7(get_each_context$7(ctx,each_value,i));}return {c(){section=element("section");div=element("div");div.innerHTML=`<slot></slot>`;t=space();ul=element("ul");for(let i=0;i<each_blocks.length;i+=1){each_blocks[i].c();}this.c=noop;attr(div,"class","hidden");},m(target,anchor){insert(target,section,anchor);append(section,div);append(section,t);append(section,ul);for(let i=0;i<each_blocks.length;i+=1){if(each_blocks[i]){each_blocks[i].m(ul,null);}}/*section_binding*/ctx[2](section);},p(ctx,[dirty]){if(dirty&/*children*/2){each_value=/*children*/ctx[1];let i;for(i=0;i<each_value.length;i+=1){const child_ctx=get_each_context$7(ctx,each_value,i);if(each_blocks[i]){each_blocks[i].p(child_ctx,dirty);}else {each_blocks[i]=create_each_block$7(child_ctx);each_blocks[i].c();each_blocks[i].m(ul,null);}}for(;i<each_blocks.length;i+=1){each_blocks[i].d(1);}each_blocks.length=each_value.length;}},i:noop,o:noop,d(detaching){if(detaching)detach(section);destroy_each(each_blocks,detaching);/*section_binding*/ctx[2](null);}};}function instance$C($$self,$$props,$$invalidate){let rootEl;let children=[];onMount(async()=>{await tick();$$invalidate(1,children=rootEl.querySelector("slot").assignedElements());const isValid=children.map(child=>child.hasAttribute("href")).reduce((sum,valid)=>{return sum&&valid;},true);if(!isValid){$$invalidate(1,children=[]);console.warn("GoAFooterMetaSection children must be anchor elements.");return;}});function section_binding($$value){binding_callbacks[$$value?'unshift':'push'](()=>{rootEl=$$value;$$invalidate(0,rootEl);});}return [rootEl,children,section_binding];}class FooterMetaSection extends SvelteElement{constructor(options){super();const style=document.createElement('style');style.textContent=`.hidden{display:none}ul{display:flex;flex-wrap:wrap;gap:1rem;padding-left:0}li{list-style-type:none}a{color:var(--goa-color-text-default);white-space:nowrap}`;this.shadowRoot.appendChild(style);init(this,{target:this.shadowRoot,props:attribute_to_object(this.attributes),customElement:true},instance$C,create_fragment$F,safe_not_equal,{},null);if(options){if(options.target){insert(options.target,this,options.anchor);}}}}customElements.define("goa-app-footer-meta-section",FooterMetaSection);/* src/components/footer-nav-section/FooterNavSection.svelte generated by Svelte v3.59.2 */function get_each_context$6(ctx,list,i){const child_ctx=ctx.slice();child_ctx[5]=list[i];return child_ctx;}// (31:2) {#if heading}
236
- function create_if_block$m(ctx){let div;let t0;let t1;let goa_divider;return {c(){div=element("div");t0=text(/*heading*/ctx[0]);t1=space();goa_divider=element("goa-divider");attr(div,"class","title");set_custom_element_data(goa_divider,"spacing","small");},m(target,anchor){insert(target,div,anchor);append(div,t0);insert(target,t1,anchor);insert(target,goa_divider,anchor);},p(ctx,dirty){if(dirty&/*heading*/1)set_data(t0,/*heading*/ctx[0]);},d(detaching){if(detaching)detach(div);if(detaching)detach(t1);if(detaching)detach(goa_divider);}};}// (49:4) {#each children as child}
237
- function create_each_block$6(ctx){let li;let a;let t_value=/*child*/ctx[5].innerHTML+"";let t;let a_href_value;return {c(){li=element("li");a=element("a");t=text(t_value);attr(a,"href",a_href_value=/*child*/ctx[5].href);},m(target,anchor){insert(target,li,anchor);append(li,a);append(a,t);},p(ctx,dirty){if(dirty&/*children*/8&&t_value!==(t_value=/*child*/ctx[5].innerHTML+""))set_data(t,t_value);if(dirty&/*children*/8&&a_href_value!==(a_href_value=/*child*/ctx[5].href)){attr(a,"href",a_href_value);}},d(detaching){if(detaching)detach(li);}};}function create_fragment$E(ctx){let section;let t0;let div;let t1;let ul;let ul_style_value;let if_block=/*heading*/ctx[0]&&create_if_block$m(ctx);let each_value=/*children*/ctx[3];let each_blocks=[];for(let i=0;i<each_value.length;i+=1){each_blocks[i]=create_each_block$6(get_each_context$6(ctx,each_value,i));}return {c(){section=element("section");if(if_block)if_block.c();t0=space();div=element("div");div.innerHTML=`<slot></slot>`;t1=space();ul=element("ul");for(let i=0;i<each_blocks.length;i+=1){each_blocks[i].c();}this.c=noop;attr(div,"class","hidden");attr(ul,"class","links");attr(ul,"style",ul_style_value=`
238
- --narrow-display-type: ${Math.ceil(/*maxcolumncount*/ctx[1]/2)>1?"block":"flex"};
239
- --narrow-column-count: ${Math.ceil(/*maxcolumncount*/ctx[1]/2)};
240
- --wide-display-type: ${/*maxcolumncount*/ctx[1]>1?"block":"flex"};
241
- --wide-column-count: ${/*maxcolumncount*/ctx[1]};
242
- `);},m(target,anchor){insert(target,section,anchor);if(if_block)if_block.m(section,null);append(section,t0);append(section,div);append(section,t1);append(section,ul);for(let i=0;i<each_blocks.length;i+=1){if(each_blocks[i]){each_blocks[i].m(ul,null);}}/*section_binding*/ctx[4](section);},p(ctx,[dirty]){if(/*heading*/ctx[0]){if(if_block){if_block.p(ctx,dirty);}else {if_block=create_if_block$m(ctx);if_block.c();if_block.m(section,t0);}}else if(if_block){if_block.d(1);if_block=null;}if(dirty&/*children*/8){each_value=/*children*/ctx[3];let i;for(i=0;i<each_value.length;i+=1){const child_ctx=get_each_context$6(ctx,each_value,i);if(each_blocks[i]){each_blocks[i].p(child_ctx,dirty);}else {each_blocks[i]=create_each_block$6(child_ctx);each_blocks[i].c();each_blocks[i].m(ul,null);}}for(;i<each_blocks.length;i+=1){each_blocks[i].d(1);}each_blocks.length=each_value.length;}if(dirty&/*maxcolumncount*/2&&ul_style_value!==(ul_style_value=`
243
- --narrow-display-type: ${Math.ceil(/*maxcolumncount*/ctx[1]/2)>1?"block":"flex"};
244
- --narrow-column-count: ${Math.ceil(/*maxcolumncount*/ctx[1]/2)};
245
- --wide-display-type: ${/*maxcolumncount*/ctx[1]>1?"block":"flex"};
246
- --wide-column-count: ${/*maxcolumncount*/ctx[1]};
247
- `)){attr(ul,"style",ul_style_value);}},i:noop,o:noop,d(detaching){if(detaching)detach(section);if(if_block)if_block.d();destroy_each(each_blocks,detaching);/*section_binding*/ctx[4](null);}};}function instance$B($$self,$$props,$$invalidate){let{heading=""}=$$props;let{maxcolumncount=1}=$$props;let rootEl;let children=[];onMount(async()=>{await tick();// remap slot content
248
- $$invalidate(3,children=rootEl.querySelector("slot").assignedElements());const isValid=children.map(child=>child.hasAttribute("href")).reduce((sum,valid)=>{return sum&&valid;},true);if(!isValid){$$invalidate(3,children=[]);console.warn("GoAFooterNavSection children must be anchor elements.");return;}injectCss(rootEl,":host",{"flex-grow":maxcolumncount});});function section_binding($$value){binding_callbacks[$$value?'unshift':'push'](()=>{rootEl=$$value;$$invalidate(2,rootEl);});}$$self.$$set=$$props=>{if('heading'in $$props)$$invalidate(0,heading=$$props.heading);if('maxcolumncount'in $$props)$$invalidate(1,maxcolumncount=$$props.maxcolumncount);};return [heading,maxcolumncount,rootEl,children,section_binding];}class FooterNavSection extends SvelteElement{constructor(options){super();const style=document.createElement('style');style.textContent=`:host{flex:auto}.title{font-size:var(--goa-font-size-7);line-height:var(--goa-line-height-4);padding-bottom:var(--goa-space-l)}.hidden{display:none}.links{display:block;list-style-type:none;padding-left:0}@media screen and (max-width: 623px){@media not (max-color:2147477350){.links{list-style-type:none;padding-left:0;flex-direction:column}}}@media not screen and (max-width: 623px){@media not (color:2147477350){.links{list-style-type:none;padding-left:0;flex-direction:column}}}@media screen and (min-width: 624px) and (max-width: 1023px){.links{display:var(--narrow-display-type);-moz-column-count:var(--narrow-column-count);column-count:var(--narrow-column-count)}}@media screen and (min-width: 1024px){.links{display:var(--wide-display-type);-moz-column-count:var(--wide-column-count);column-count:var(--wide-column-count)}}li{padding:0.75rem 0}a{color:var(--goa-color-text-default)}`;this.shadowRoot.appendChild(style);init(this,{target:this.shadowRoot,props:attribute_to_object(this.attributes),customElement:true},instance$B,create_fragment$E,safe_not_equal,{heading:0,maxcolumncount:1},null);if(options){if(options.target){insert(options.target,this,options.anchor);}if(options.props){this.$set(options.props);flush();}}}static get observedAttributes(){return ["heading","maxcolumncount"];}get heading(){return this.$$.ctx[0];}set heading(heading){this.$$set({heading});flush();}get maxcolumncount(){return this.$$.ctx[1];}set maxcolumncount(maxcolumncount){this.$$set({maxcolumncount});flush();}}customElements.define("goa-app-footer-nav-section",FooterNavSection);/* src/components/form-item/FormItem.svelte generated by Svelte v3.59.2 */function create_if_block_2$9(ctx){let div;let t0;let t1;let show_if=/*requirement*/ctx[9]&&/*REQUIREMENT_TYPES*/ctx[11].includes(/*requirement*/ctx[9]);let div_class_value;let if_block=show_if&&create_if_block_3$9(ctx);return {c(){div=element("div");t0=text(/*label*/ctx[5]);t1=space();if(if_block)if_block.c();attr(div,"class",div_class_value=`label ${/*labelsize*/ctx[6]}`);attr(div,"id",/*id*/ctx[10]);},m(target,anchor){insert(target,div,anchor);append(div,t0);append(div,t1);if(if_block)if_block.m(div,null);},p(ctx,dirty){if(dirty&/*label*/32)set_data(t0,/*label*/ctx[5]);if(dirty&/*requirement*/512)show_if=/*requirement*/ctx[9]&&/*REQUIREMENT_TYPES*/ctx[11].includes(/*requirement*/ctx[9]);if(show_if){if(if_block){if_block.p(ctx,dirty);}else {if_block=create_if_block_3$9(ctx);if_block.c();if_block.m(div,null);}}else if(if_block){if_block.d(1);if_block=null;}if(dirty&/*labelsize*/64&&div_class_value!==(div_class_value=`label ${/*labelsize*/ctx[6]}`)){attr(div,"class",div_class_value);}if(dirty&/*id*/1024){attr(div,"id",/*id*/ctx[10]);}},d(detaching){if(detaching)detach(div);if(if_block)if_block.d();}};}// (36:6) {#if requirement && REQUIREMENT_TYPES.includes(requirement)}
249
- function create_if_block_3$9(ctx){let em;let t0;let t1;let t2;return {c(){em=element("em");t0=text("(");t1=text(/*requirement*/ctx[9]);t2=text(")");},m(target,anchor){insert(target,em,anchor);append(em,t0);append(em,t1);append(em,t2);},p(ctx,dirty){if(dirty&/*requirement*/512)set_data(t1,/*requirement*/ctx[9]);},d(detaching){if(detaching)detach(em);}};}// (44:2) {#if error}
250
- function create_if_block_1$b(ctx){let div;let goa_icon;let t0;let t1;return {c(){div=element("div");goa_icon=element("goa-icon");t0=space();t1=text(/*error*/ctx[8]);set_custom_element_data(goa_icon,"type","warning");set_custom_element_data(goa_icon,"size","small");set_custom_element_data(goa_icon,"theme","filled");set_style(goa_icon,"pointer-events","none");attr(div,"class","error-msg");},m(target,anchor){insert(target,div,anchor);append(div,goa_icon);append(div,t0);append(div,t1);},p(ctx,dirty){if(dirty&/*error*/256)set_data(t1,/*error*/ctx[8]);},d(detaching){if(detaching)detach(div);}};}// (50:2) {#if helptext}
251
- function create_if_block$l(ctx){let div;let t;return {c(){div=element("div");t=text(/*helptext*/ctx[7]);attr(div,"class","help-msg");},m(target,anchor){insert(target,div,anchor);append(div,t);},p(ctx,dirty){if(dirty&/*helptext*/128)set_data(t,/*helptext*/ctx[7]);},d(detaching){if(detaching)detach(div);}};}function create_fragment$D(ctx){let div1;let t0;let div0;let t1;let t2;let div1_style_value;let if_block0=/*label*/ctx[5]&&create_if_block_2$9(ctx);let if_block1=/*error*/ctx[8]&&create_if_block_1$b(ctx);let if_block2=/*helptext*/ctx[7]&&create_if_block$l(ctx);return {c(){div1=element("div");if(if_block0)if_block0.c();t0=space();div0=element("div");div0.innerHTML=`<slot></slot>`;t1=space();if(if_block1)if_block1.c();t2=space();if(if_block2)if_block2.c();this.c=noop;attr(div0,"class","form-item-input");attr(div1,"data-testid",/*testid*/ctx[0]);attr(div1,"style",div1_style_value=calculateMargin(/*mt*/ctx[1],/*mr*/ctx[2],/*mb*/ctx[3],/*ml*/ctx[4]));},m(target,anchor){insert(target,div1,anchor);if(if_block0)if_block0.m(div1,null);append(div1,t0);append(div1,div0);append(div1,t1);if(if_block1)if_block1.m(div1,null);append(div1,t2);if(if_block2)if_block2.m(div1,null);},p(ctx,[dirty]){if(/*label*/ctx[5]){if(if_block0){if_block0.p(ctx,dirty);}else {if_block0=create_if_block_2$9(ctx);if_block0.c();if_block0.m(div1,t0);}}else if(if_block0){if_block0.d(1);if_block0=null;}if(/*error*/ctx[8]){if(if_block1){if_block1.p(ctx,dirty);}else {if_block1=create_if_block_1$b(ctx);if_block1.c();if_block1.m(div1,t2);}}else if(if_block1){if_block1.d(1);if_block1=null;}if(/*helptext*/ctx[7]){if(if_block2){if_block2.p(ctx,dirty);}else {if_block2=create_if_block$l(ctx);if_block2.c();if_block2.m(div1,null);}}else if(if_block2){if_block2.d(1);if_block2=null;}if(dirty&/*testid*/1){attr(div1,"data-testid",/*testid*/ctx[0]);}if(dirty&/*mt, mr, mb, ml*/30&&div1_style_value!==(div1_style_value=calculateMargin(/*mt*/ctx[1],/*mr*/ctx[2],/*mb*/ctx[3],/*ml*/ctx[4]))){attr(div1,"style",div1_style_value);}},i:noop,o:noop,d(detaching){if(detaching)detach(div1);if(if_block0)if_block0.d();if(if_block1)if_block1.d();if(if_block2)if_block2.d();}};}function instance$A($$self,$$props,$$invalidate){const[REQUIREMENT_TYPES,validateRequirementType]=typeValidator("Requirement type",["optional","required"],false);let{testid=""}=$$props;let{mt=null}=$$props;let{mr=null}=$$props;let{mb=null}=$$props;let{ml=null}=$$props;let{label=""}=$$props;let{labelsize="regular"}=$$props;let{helptext=""}=$$props;let{error=""}=$$props;let{requirement=""}=$$props;let{id=""}=$$props;onMount(()=>{validateRequirementType(requirement);});$$self.$$set=$$props=>{if('testid'in $$props)$$invalidate(0,testid=$$props.testid);if('mt'in $$props)$$invalidate(1,mt=$$props.mt);if('mr'in $$props)$$invalidate(2,mr=$$props.mr);if('mb'in $$props)$$invalidate(3,mb=$$props.mb);if('ml'in $$props)$$invalidate(4,ml=$$props.ml);if('label'in $$props)$$invalidate(5,label=$$props.label);if('labelsize'in $$props)$$invalidate(6,labelsize=$$props.labelsize);if('helptext'in $$props)$$invalidate(7,helptext=$$props.helptext);if('error'in $$props)$$invalidate(8,error=$$props.error);if('requirement'in $$props)$$invalidate(9,requirement=$$props.requirement);if('id'in $$props)$$invalidate(10,id=$$props.id);};return [testid,mt,mr,mb,ml,label,labelsize,helptext,error,requirement,id,REQUIREMENT_TYPES];}class FormItem extends SvelteElement{constructor(options){super();const style=document.createElement('style');style.textContent=`:host{box-sizing:border-box;font-family:var(--goa-font-family-sans)}*{box-sizing:border-box}.label{display:block;font-weight:var(--goa-font-weight-bold);color:var(--goa-color-text-default);font-size:var(--goa-font-size-4);padding-bottom:0.5rem}.label.large{font:var(--goa-typography-heading-l)}.label em{color:var(--goa-color-greyscale-700);font-weight:var(--goa-font-weight-regular);font-size:var(--goa-font-size-2);line-height:var(--goa-line-height-1);font-style:normal}.form-item-input{margin-bottom:0.25rem}.help-msg{font-size:var(--goa-font-size-2);color:var(--goa-color-text-default);margin-right:56px}.error-msg{display:inline-flex;gap:0.25rem;font-size:var(--goa-font-size-2);color:var(--goa-color-interactive-error);margin-bottom:0.25rem}`;this.shadowRoot.appendChild(style);init(this,{target:this.shadowRoot,props:attribute_to_object(this.attributes),customElement:true},instance$A,create_fragment$D,safe_not_equal,{testid:0,mt:1,mr:2,mb:3,ml:4,label:5,labelsize:6,helptext:7,error:8,requirement:9,id:10},null);if(options){if(options.target){insert(options.target,this,options.anchor);}if(options.props){this.$set(options.props);flush();}}}static get observedAttributes(){return ["testid","mt","mr","mb","ml","label","labelsize","helptext","error","requirement","id"];}get testid(){return this.$$.ctx[0];}set testid(testid){this.$$set({testid});flush();}get mt(){return this.$$.ctx[1];}set mt(mt){this.$$set({mt});flush();}get mr(){return this.$$.ctx[2];}set mr(mr){this.$$set({mr});flush();}get mb(){return this.$$.ctx[3];}set mb(mb){this.$$set({mb});flush();}get ml(){return this.$$.ctx[4];}set ml(ml){this.$$set({ml});flush();}get label(){return this.$$.ctx[5];}set label(label){this.$$set({label});flush();}get labelsize(){return this.$$.ctx[6];}set labelsize(labelsize){this.$$set({labelsize});flush();}get helptext(){return this.$$.ctx[7];}set helptext(helptext){this.$$set({helptext});flush();}get error(){return this.$$.ctx[8];}set error(error){this.$$set({error});flush();}get requirement(){return this.$$.ctx[9];}set requirement(requirement){this.$$set({requirement});flush();}get id(){return this.$$.ctx[10];}set id(id){this.$$set({id});flush();}}customElements.define("goa-form-item",FormItem);/* src/components/grid/Grid.svelte generated by Svelte v3.59.2 */function create_fragment$C(ctx){let div;let slot;let div_style_value;return {c(){div=element("div");slot=element("slot");this.c=noop;attr(div,"class","goa-grid");attr(div,"style",div_style_value=`
252
- ${calculateMargin(/*mt*/ctx[2],/*mr*/ctx[3],/*mb*/ctx[4],/*ml*/ctx[5])}
253
- --min-child-width: ${/*minchildwidth*/ctx[1]||0};
254
- gap: var(--goa-space-${/*gap*/ctx[0]})
255
- `);},m(target,anchor){insert(target,div,anchor);append(div,slot);},p(ctx,[dirty]){if(dirty&/*mt, mr, mb, ml, minchildwidth, gap*/63&&div_style_value!==(div_style_value=`
256
- ${calculateMargin(/*mt*/ctx[2],/*mr*/ctx[3],/*mb*/ctx[4],/*ml*/ctx[5])}
257
- --min-child-width: ${/*minchildwidth*/ctx[1]||0};
258
- gap: var(--goa-space-${/*gap*/ctx[0]})
259
- `)){attr(div,"style",div_style_value);}},i:noop,o:noop,d(detaching){if(detaching)detach(div);}};}function instance$z($$self,$$props,$$invalidate){let{gap="m"}=$$props;let{minchildwidth=""}=$$props;let{mt=null}=$$props;let{mr=null}=$$props;let{mb=null}=$$props;let{ml=null}=$$props;onMount(()=>{validateRequired("Grid",{minchildwidth});});$$self.$$set=$$props=>{if('gap'in $$props)$$invalidate(0,gap=$$props.gap);if('minchildwidth'in $$props)$$invalidate(1,minchildwidth=$$props.minchildwidth);if('mt'in $$props)$$invalidate(2,mt=$$props.mt);if('mr'in $$props)$$invalidate(3,mr=$$props.mr);if('mb'in $$props)$$invalidate(4,mb=$$props.mb);if('ml'in $$props)$$invalidate(5,ml=$$props.ml);};return [gap,minchildwidth,mt,mr,mb,ml];}class Grid extends SvelteElement{constructor(options){super();const style=document.createElement('style');style.textContent=`:host{box-sizing:border-box;font-family:var(--goa-font-family-sans)}.goa-grid{display:flex;flex-direction:column;gap:var(--gap)}@media screen and (max-width: 623px){@media not (max-color:2147477350){.goa-grid{display:grid;grid-template-columns:repeat(auto-fit, minmax(var(--min-child-width), 1fr))}}}@media not screen and (max-width: 623px){@media not (color:2147477350){.goa-grid{display:grid;grid-template-columns:repeat(auto-fit, minmax(var(--min-child-width), 1fr))}}}`;this.shadowRoot.appendChild(style);init(this,{target:this.shadowRoot,props:attribute_to_object(this.attributes),customElement:true},instance$z,create_fragment$C,safe_not_equal,{gap:0,minchildwidth:1,mt:2,mr:3,mb:4,ml:5},null);if(options){if(options.target){insert(options.target,this,options.anchor);}if(options.props){this.$set(options.props);flush();}}}static get observedAttributes(){return ["gap","minchildwidth","mt","mr","mb","ml"];}get gap(){return this.$$.ctx[0];}set gap(gap){this.$$set({gap});flush();}get minchildwidth(){return this.$$.ctx[1];}set minchildwidth(minchildwidth){this.$$set({minchildwidth});flush();}get mt(){return this.$$.ctx[2];}set mt(mt){this.$$set({mt});flush();}get mr(){return this.$$.ctx[3];}set mr(mr){this.$$set({mr});flush();}get mb(){return this.$$.ctx[4];}set mb(mb){this.$$set({mb});flush();}get ml(){return this.$$.ctx[5];}set ml(ml){this.$$set({ml});flush();}}customElements.define("goa-grid",Grid);/* src/components/hero-banner/HeroBanner.svelte generated by Svelte v3.59.2 */function create_fragment$B(ctx){let div2;let goa_page_block;let h1;let t0;let t1;let div0;let t2;let div1;let goa_page_block_width_value;return {c(){div2=element("div");goa_page_block=element("goa-page-block");h1=element("h1");t0=text(/*heading*/ctx[1]);t1=space();div0=element("div");div0.innerHTML=`<slot></slot>`;t2=space();div1=element("div");div1.innerHTML=`<slot name="actions"></slot>`;this.c=noop;attr(div0,"class","goa-hero-banner-content");attr(div0,"role","note");attr(div1,"class","goa-hero-banner-actions");set_custom_element_data(goa_page_block,"width",goa_page_block_width_value=/*maxcontentwidth*/ctx[3]||"full");attr(div2,"class","goa-hero");attr(div2,"data-testid","background");set_style(div2,"min-height",/*minheight*/ctx[0]);set_style(div2,"--hero-banner-background-color",/*backgroundcolor*/ctx[4]);set_style(div2,"--hero-banner-text-color",/*textcolor*/ctx[5]);set_style(div2,"--hero-background-url","url("+/*backgroundurl*/ctx[2]+")");toggle_class(div2,"with-image",/*backgroundurl*/ctx[2]);},m(target,anchor){insert(target,div2,anchor);append(div2,goa_page_block);append(goa_page_block,h1);append(h1,t0);append(goa_page_block,t1);append(goa_page_block,div0);append(goa_page_block,t2);append(goa_page_block,div1);},p(ctx,[dirty]){if(dirty&/*heading*/2)set_data(t0,/*heading*/ctx[1]);if(dirty&/*maxcontentwidth*/8&&goa_page_block_width_value!==(goa_page_block_width_value=/*maxcontentwidth*/ctx[3]||"full")){set_custom_element_data(goa_page_block,"width",goa_page_block_width_value);}if(dirty&/*minheight*/1){set_style(div2,"min-height",/*minheight*/ctx[0]);}if(dirty&/*backgroundcolor*/16){set_style(div2,"--hero-banner-background-color",/*backgroundcolor*/ctx[4]);}if(dirty&/*textcolor*/32){set_style(div2,"--hero-banner-text-color",/*textcolor*/ctx[5]);}if(dirty&/*backgroundurl*/4){set_style(div2,"--hero-background-url","url("+/*backgroundurl*/ctx[2]+")");}if(dirty&/*backgroundurl*/4){toggle_class(div2,"with-image",/*backgroundurl*/ctx[2]);}},i:noop,o:noop,d(detaching){if(detaching)detach(div2);}};}function instance$y($$self,$$props,$$invalidate){let{heading}=$$props;let{backgroundurl}=$$props;let{minheight}=$$props;let{maxcontentwidth="100%"}=$$props;let{backgroundcolor="#f8f8f8"}=$$props;let{textcolor=""}=$$props;$$self.$$set=$$props=>{if('heading'in $$props)$$invalidate(1,heading=$$props.heading);if('backgroundurl'in $$props)$$invalidate(2,backgroundurl=$$props.backgroundurl);if('minheight'in $$props)$$invalidate(0,minheight=$$props.minheight);if('maxcontentwidth'in $$props)$$invalidate(3,maxcontentwidth=$$props.maxcontentwidth);if('backgroundcolor'in $$props)$$invalidate(4,backgroundcolor=$$props.backgroundcolor);if('textcolor'in $$props)$$invalidate(5,textcolor=$$props.textcolor);};$$self.$$.update=()=>{if($$self.$$.dirty&/*minheight, backgroundurl*/5){/* Set minheight to support old default value of 600px */if(!minheight&&backgroundurl)$$invalidate(0,minheight="600px");}};return [minheight,heading,backgroundurl,maxcontentwidth,backgroundcolor,textcolor];}class HeroBanner extends SvelteElement{constructor(options){super();const style=document.createElement('style');style.textContent=`:host{box-sizing:border-box;font-family:var(--goa-font-family-sans)}.goa-hero{background:var(--hero-banner-background-color);box-sizing:border-box;display:flex;align-items:center;justify-content:center;flex-direction:column;color:var(--hero-banner-text-color, var(--goa-color-text-default));background-position:center center;width:100%;padding:var(--goa-space-3xl) 0}.goa-hero.with-image{border-bottom:8px solid var(--goa-color-brand-default);justify-content:flex-end;background:unset;background-image:linear-gradient(
260
- rgba(0, 0, 0, 0) 0%,
261
- rgba(0, 0, 0, 0.4) 40%,
262
- rgba(0, 0, 0, 0.6) 100%
263
- ),
264
- var(--hero-background-url);background-size:cover;background-position:center;background-repeat:no-repeat;color:var(--hero-banner-text-color, var(--goa-color-text-light))}h1{font:var(--goa-typography-heading-xl);margin:0}.goa-hero-banner-content{font:var(--goa-typography-body-l);margin:var(--goa-space-l) 0 0}.goa-hero-banner-actions{margin:var(--goa-space-l) 0 0}`;this.shadowRoot.appendChild(style);init(this,{target:this.shadowRoot,props:attribute_to_object(this.attributes),customElement:true},instance$y,create_fragment$B,safe_not_equal,{heading:1,backgroundurl:2,minheight:0,maxcontentwidth:3,backgroundcolor:4,textcolor:5},null);if(options){if(options.target){insert(options.target,this,options.anchor);}if(options.props){this.$set(options.props);flush();}}}static get observedAttributes(){return ["heading","backgroundurl","minheight","maxcontentwidth","backgroundcolor","textcolor"];}get heading(){return this.$$.ctx[1];}set heading(heading){this.$$set({heading});flush();}get backgroundurl(){return this.$$.ctx[2];}set backgroundurl(backgroundurl){this.$$set({backgroundurl});flush();}get minheight(){return this.$$.ctx[0];}set minheight(minheight){this.$$set({minheight});flush();}get maxcontentwidth(){return this.$$.ctx[3];}set maxcontentwidth(maxcontentwidth){this.$$set({maxcontentwidth});flush();}get backgroundcolor(){return this.$$.ctx[4];}set backgroundcolor(backgroundcolor){this.$$set({backgroundcolor});flush();}get textcolor(){return this.$$.ctx[5];}set textcolor(textcolor){this.$$set({textcolor});flush();}}customElements.define("goa-hero-banner",HeroBanner);/* src/components/icon-button/IconButton.svelte generated by Svelte v3.59.2 */function create_fragment$A(ctx){let button;let goa_icon;let button_style_value;let mounted;let dispose;return {c(){button=element("button");goa_icon=element("goa-icon");this.c=noop;set_custom_element_data(goa_icon,"title",/*title*/ctx[3]);set_custom_element_data(goa_icon,"type",/*icon*/ctx[0]);set_custom_element_data(goa_icon,"size",/*size*/ctx[1]);set_custom_element_data(goa_icon,"theme",/*theme*/ctx[2]);set_custom_element_data(goa_icon,"inverted",/*isInverted*/ctx[9]);attr(button,"style",button_style_value=""+(calculateMargin(/*mt*/ctx[5],/*mr*/ctx[6],/*mb*/ctx[7],/*ml*/ctx[8])+"; --pading-size: "+/*_paddingSize*/ctx[10]));attr(button,"title",/*title*/ctx[3]);button.disabled=/*isDisabled*/ctx[11];attr(button,"class",/*css*/ctx[12]);attr(button,"data-testid",/*testid*/ctx[4]);},m(target,anchor){insert(target,button,anchor);append(button,goa_icon);if(!mounted){dispose=listen(button,"click",handleClick);mounted=true;}},p(ctx,[dirty]){if(dirty&/*title*/8){set_custom_element_data(goa_icon,"title",/*title*/ctx[3]);}if(dirty&/*icon*/1){set_custom_element_data(goa_icon,"type",/*icon*/ctx[0]);}if(dirty&/*size*/2){set_custom_element_data(goa_icon,"size",/*size*/ctx[1]);}if(dirty&/*theme*/4){set_custom_element_data(goa_icon,"theme",/*theme*/ctx[2]);}if(dirty&/*isInverted*/512){set_custom_element_data(goa_icon,"inverted",/*isInverted*/ctx[9]);}if(dirty&/*mt, mr, mb, ml, _paddingSize*/1504&&button_style_value!==(button_style_value=""+(calculateMargin(/*mt*/ctx[5],/*mr*/ctx[6],/*mb*/ctx[7],/*ml*/ctx[8])+"; --pading-size: "+/*_paddingSize*/ctx[10]))){attr(button,"style",button_style_value);}if(dirty&/*title*/8){attr(button,"title",/*title*/ctx[3]);}if(dirty&/*isDisabled*/2048){button.disabled=/*isDisabled*/ctx[11];}if(dirty&/*css*/4096){attr(button,"class",/*css*/ctx[12]);}if(dirty&/*testid*/16){attr(button,"data-testid",/*testid*/ctx[4]);}},i:noop,o:noop,d(detaching){if(detaching)detach(button);mounted=false;dispose();}};}function handleClick(e){e.target.dispatchEvent(new CustomEvent("_click",{composed:true,detail:{event:e}}));}function instance$x($$self,$$props,$$invalidate){let css;let isDisabled;let isInverted;let _paddingSize;const[Variants,validateVariant]=typeValidator("Icon Button Variant",["color","nocolor","dark","destructive"],true);let{icon}=$$props;let{size="medium"}=$$props;let{theme="outline"}=$$props;let{variant="color"}=$$props;let{title=""}=$$props;let{testid=""}=$$props;let{disabled="false"}=$$props;let{inverted="false"}=$$props;let{mt=null}=$$props;let{mr=null}=$$props;let{mb=null}=$$props;let{ml=null}=$$props;onMount(()=>{validateVariant(variant);});$$self.$$set=$$props=>{if('icon'in $$props)$$invalidate(0,icon=$$props.icon);if('size'in $$props)$$invalidate(1,size=$$props.size);if('theme'in $$props)$$invalidate(2,theme=$$props.theme);if('variant'in $$props)$$invalidate(13,variant=$$props.variant);if('title'in $$props)$$invalidate(3,title=$$props.title);if('testid'in $$props)$$invalidate(4,testid=$$props.testid);if('disabled'in $$props)$$invalidate(14,disabled=$$props.disabled);if('inverted'in $$props)$$invalidate(15,inverted=$$props.inverted);if('mt'in $$props)$$invalidate(5,mt=$$props.mt);if('mr'in $$props)$$invalidate(6,mr=$$props.mr);if('mb'in $$props)$$invalidate(7,mb=$$props.mb);if('ml'in $$props)$$invalidate(8,ml=$$props.ml);};$$self.$$.update=()=>{if($$self.$$.dirty&/*inverted*/32768){$$invalidate(9,isInverted=toBoolean(inverted));}if($$self.$$.dirty&/*variant, isInverted*/8704){// private
265
- $$invalidate(12,css=`${variant} ${isInverted?"inverted":""}`);}if($$self.$$.dirty&/*disabled*/16384){$$invalidate(11,isDisabled=toBoolean(disabled));}if($$self.$$.dirty&/*size*/2){$$invalidate(10,_paddingSize={small:"0.25rem",medium:"0.25rem",large:"0.5rem"}[size]);}};return [icon,size,theme,title,testid,mt,mr,mb,ml,isInverted,_paddingSize,isDisabled,css,variant,disabled,inverted];}class IconButton extends SvelteElement{constructor(options){super();const style=document.createElement('style');style.textContent=`:host{display:inline-flex;align-items:center;box-sizing:border-box;font-family:var(--goa-font-family-sans)}button,button *{box-sizing:border-box}button{display:inline-flex;align-items:center;box-sizing:border-box;justify-content:center;background:transparent;cursor:pointer;border:none;border-radius:var(--goa-border-radius-m);padding:var(--pading-size)}.color,.dark{color:var(--goa-color-interactive-default);fill:var(--goa-color-interactive-default);cursor:pointer;transition:background-color 100ms ease-in, transform 100ms ease-in}.dark:not(.inverted){color:unset}button:hover:not(.destructive){background-color:var(--goa-color-greyscale-100);border-color:var(--goa-color-greyscale-100);color:var(--goa-color-interactive-hover);outline:none}button:focus:not(.destructive),button:active:not(.destructive){background-color:var(--goa-color-greyscale-100);border-color:var(--goa-color-interactive-focus);color:var(--goa-color-interactive-focus);box-shadow:0 0 0 3px var(--goa-color-interactive-focus);outline:none}.color.inverted:hover{background-color:var(--goa-color-interactive-hover)}.destructive{color:var(--goa-color-emergency-dark);fill:var(--goa-color-emergency-dark)}.destructive:hover{background-color:var(--goa-color-emergency-light);border-color:var(--goa-color-emergency-light);outline:none}.destructive:focus,.destructive:active{background-color:var(--goa-color-emergency-light);border-color:var(--goa-color-interactive-focus);box-shadow:0 0 0 3px var(--goa-color-interactive-focus);outline:none}button:disabled{pointer-events:none;opacity:0.5;transform:none;cursor:default}button:disabled:hover{background-color:transparent}button.dark:hover{background-color:rgba(0, 0, 0, 0.3)}button.dark:focus,button.dark:active{background-color:rgba(0, 0, 0, 0.3);box-shadow:0 0 0 3px var(--goa-color-greyscale-white)}`;this.shadowRoot.appendChild(style);init(this,{target:this.shadowRoot,props:attribute_to_object(this.attributes),customElement:true},instance$x,create_fragment$A,safe_not_equal,{icon:0,size:1,theme:2,variant:13,title:3,testid:4,disabled:14,inverted:15,mt:5,mr:6,mb:7,ml:8},null);if(options){if(options.target){insert(options.target,this,options.anchor);}if(options.props){this.$set(options.props);flush();}}}static get observedAttributes(){return ["icon","size","theme","variant","title","testid","disabled","inverted","mt","mr","mb","ml"];}get icon(){return this.$$.ctx[0];}set icon(icon){this.$$set({icon});flush();}get size(){return this.$$.ctx[1];}set size(size){this.$$set({size});flush();}get theme(){return this.$$.ctx[2];}set theme(theme){this.$$set({theme});flush();}get variant(){return this.$$.ctx[13];}set variant(variant){this.$$set({variant});flush();}get title(){return this.$$.ctx[3];}set title(title){this.$$set({title});flush();}get testid(){return this.$$.ctx[4];}set testid(testid){this.$$set({testid});flush();}get disabled(){return this.$$.ctx[14];}set disabled(disabled){this.$$set({disabled});flush();}get inverted(){return this.$$.ctx[15];}set inverted(inverted){this.$$set({inverted});flush();}get mt(){return this.$$.ctx[5];}set mt(mt){this.$$set({mt});flush();}get mr(){return this.$$.ctx[6];}set mr(mr){this.$$set({mr});flush();}get mb(){return this.$$.ctx[7];}set mb(mb){this.$$set({mb});flush();}get ml(){return this.$$.ctx[8];}set ml(ml){this.$$set({ml});flush();}}customElements.define("goa-icon-button",IconButton);/* src/components/icon/Icon.svelte generated by Svelte v3.59.2 */function create_if_block$k(ctx){let show_if;let if_block_anchor;function select_block_type(ctx,dirty){if(dirty&/*type*/16)show_if=null;if(show_if==null)show_if=!!Object.keys(/*_iconOverrides*/ctx[16]).includes(/*type*/ctx[4]);if(show_if)return create_if_block_1$a;return create_else_block$9;}let current_block_type=select_block_type(ctx,-1);let if_block=current_block_type(ctx);return {c(){if_block.c();if_block_anchor=empty();},m(target,anchor){if_block.m(target,anchor);insert(target,if_block_anchor,anchor);},p(ctx,dirty){if(current_block_type===(current_block_type=select_block_type(ctx,dirty))&&if_block){if_block.p(ctx,dirty);}else {if_block.d(1);if_block=current_block_type(ctx);if(if_block){if_block.c();if_block.m(if_block_anchor.parentNode,if_block_anchor);}}},d(detaching){if_block.d(detaching);if(detaching)detach(if_block_anchor);}};}// (66:4) {:else}
266
- function create_else_block$9(ctx){let ion_icon;let ion_icon_name_value;return {c(){ion_icon=element("ion-icon");set_custom_element_data(ion_icon,"name",ion_icon_name_value=/*theme*/ctx[6]==="filled"||/*type*/ctx[4].indexOf("logo")===0?/*type*/ctx[4]:`${/*type*/ctx[4]}-${/*theme*/ctx[6]}`);},m(target,anchor){insert(target,ion_icon,anchor);},p(ctx,dirty){if(dirty&/*theme, type*/80&&ion_icon_name_value!==(ion_icon_name_value=/*theme*/ctx[6]==="filled"||/*type*/ctx[4].indexOf("logo")===0?/*type*/ctx[4]:`${/*type*/ctx[4]}-${/*theme*/ctx[6]}`)){set_custom_element_data(ion_icon,"name",ion_icon_name_value);}},d(detaching){if(detaching)detach(ion_icon);}};}// (62:4) {#if Object.keys(_iconOverrides).includes(type)}
267
- function create_if_block_1$a(ctx){let div;let raw_value=/*_iconOverrides*/ctx[16][/*type*/ctx[4]]+"";return {c(){div=element("div");attr(div,"class","icon-override");},m(target,anchor){insert(target,div,anchor);div.innerHTML=raw_value;},p(ctx,dirty){if(dirty&/*type*/16&&raw_value!==(raw_value=/*_iconOverrides*/ctx[16][/*type*/ctx[4]]+""))div.innerHTML=raw_value;},d(detaching){if(detaching)detach(div);}};}function create_fragment$z(ctx){let div;let div_aria_expanded_value;let div_class_value;let div_style_value;let if_block=/*type*/ctx[4]&&create_if_block$k(ctx);return {c(){div=element("div");if(if_block)if_block.c();this.c=noop;attr(div,"role",/*role*/ctx[13]);attr(div,"aria-label",/*arialabel*/ctx[11]);attr(div,"aria-controls",/*ariacontrols*/ctx[12]);attr(div,"aria-expanded",div_aria_expanded_value=/*_ariaexpanded*/ctx[14].length>0?/*_ariaexpanded*/ctx[14]:undefined);attr(div,"class",div_class_value=`goa-icon goa-icon--${/*size*/ctx[5]}`);attr(div,"data-testid",/*testid*/ctx[10]);attr(div,"title",/*title*/ctx[9]);attr(div,"style",div_style_value=`
268
- ${calculateMargin(/*mt*/ctx[0],/*mr*/ctx[1],/*mb*/ctx[2],/*ml*/ctx[3])}
269
- ${cssVar("--fill-color",/*fillcolor*/ctx[7])};
270
- ${cssVar("--opacity",/*opacity*/ctx[8])};
271
- `);toggle_class(div,"inverted",/*isInverted*/ctx[15]);},m(target,anchor){insert(target,div,anchor);if(if_block)if_block.m(div,null);},p(ctx,[dirty]){if(/*type*/ctx[4]){if(if_block){if_block.p(ctx,dirty);}else {if_block=create_if_block$k(ctx);if_block.c();if_block.m(div,null);}}else if(if_block){if_block.d(1);if_block=null;}if(dirty&/*role*/8192){attr(div,"role",/*role*/ctx[13]);}if(dirty&/*arialabel*/2048){attr(div,"aria-label",/*arialabel*/ctx[11]);}if(dirty&/*ariacontrols*/4096){attr(div,"aria-controls",/*ariacontrols*/ctx[12]);}if(dirty&/*_ariaexpanded*/16384&&div_aria_expanded_value!==(div_aria_expanded_value=/*_ariaexpanded*/ctx[14].length>0?/*_ariaexpanded*/ctx[14]:undefined)){attr(div,"aria-expanded",div_aria_expanded_value);}if(dirty&/*size*/32&&div_class_value!==(div_class_value=`goa-icon goa-icon--${/*size*/ctx[5]}`)){attr(div,"class",div_class_value);}if(dirty&/*testid*/1024){attr(div,"data-testid",/*testid*/ctx[10]);}if(dirty&/*title*/512){attr(div,"title",/*title*/ctx[9]);}if(dirty&/*mt, mr, mb, ml, fillcolor, opacity*/399&&div_style_value!==(div_style_value=`
272
- ${calculateMargin(/*mt*/ctx[0],/*mr*/ctx[1],/*mb*/ctx[2],/*ml*/ctx[3])}
273
- ${cssVar("--fill-color",/*fillcolor*/ctx[7])};
274
- ${cssVar("--opacity",/*opacity*/ctx[8])};
275
- `)){attr(div,"style",div_style_value);}if(dirty&/*size, isInverted*/32800){toggle_class(div,"inverted",/*isInverted*/ctx[15]);}},i:noop,o:noop,d(detaching){if(detaching)detach(div);if(if_block)if_block.d();}};}function instance$w($$self,$$props,$$invalidate){let isInverted;let _ariaexpanded;let{mt=null}=$$props;let{mr=null}=$$props;let{mb=null}=$$props;let{ml=null}=$$props;let{type}=$$props;let{size="medium"}=$$props;let{theme="outline"}=$$props;let{inverted="false"}=$$props;let{fillcolor=""}=$$props;let{opacity=1}=$$props;let{title=""}=$$props;let{testid=""}=$$props;let{arialabel=""}=$$props;let{ariacontrols=""}=$$props;let{ariaexpanded=""}=$$props;let{role="img"}=$$props;// Private
276
- const _iconOverrides={pencil:`<svg width="18" height="18" viewBox="0 0 18 18" fill="none" xmlns="http://www.w3.org/2000/svg"> <path d="M16.1442 5.47956L12.5355 1.87088L13.7196 0.686776C14.0391 0.367257 14.4385 0.212197 14.9178 0.221594C15.3971 0.230992 15.7965 0.39545 16.116 0.714969L17.3283 1.92726C17.6478 2.24678 17.8076 2.64148 17.8076 3.11136C17.8076 3.58124 17.6478 3.97594 17.3283 4.29546L16.1442 5.47956ZM1.03951 17.8424C0.795173 17.8424 0.593125 17.7626 0.433365 17.6028C0.273605 17.443 0.193726 17.241 0.193726 16.9966V14.5721C0.193726 14.4593 0.212521 14.356 0.250112 14.262C0.287702 14.168 0.353485 14.074 0.447461 13.9801L11.4689 2.93435L15.0776 6.54303L4.05615 17.5887C3.96217 17.6827 3.8682 17.7485 3.77422 17.7861C3.68024 17.8236 3.57687 17.8424 3.4641 17.8424H1.03951Z" fill="currentcolor"/> </svg>`,checkmark:`<svg width="18" height="14" viewBox="0 0 18 14" fill="none" xmlns="http://www.w3.org/2000/svg"> <path fill-rule="evenodd" clip-rule="evenodd" d="M6.20129 11.5368L15.9974 0.341265C16.3611 -0.0743717 16.9929 -0.116489 17.4085 0.247193C17.8241 0.610875 17.8663 1.24264 17.5026 1.65827L7.00258 13.6583C6.82032 13.8666 6.5599 13.99 6.28328 13.9992C6.00666 14.0084 5.7386 13.9026 5.54289 13.7069L1.04289 9.20688C0.652369 8.81635 0.652369 8.18319 1.04289 7.79266C1.43342 7.40214 2.06658 7.40214 2.45711 7.79266L6.20129 11.5368Z" fill="currentcolor"/> </svg>`,remove:`<svg width="16" height="20" viewBox="0 0 16 1" fill="none" xmlns="http://www.w3.org/2000/svg"> <path d="M1.5 -0.000244141C0.947715 -0.000244141 0.5 0.447471 0.5 0.999756C0.5 1.55204 0.947715 1.99976 1.5 1.99976H15C15.5523 1.99976 16 1.55204 16 0.999756C16 0.447471 15.5523 -0.000244141 15 -0.000244141H1.5Z" fill="currentcolor"/> </svg>`,"goa-file":`<svg width="39" height="48" viewBox="0 0 39 48" fill="none" xmlns="http://www.w3.org/2000/svg"> <g clip-path="url(#clip0_1357_108691)"> <path d="M38.741 14C38.541 13.07 38.081 12.22 37.401 11.54L36.861 11L27.861 2L27.321 1.46C26.641 0.78 25.781 0.32 24.861 0.12C24.511 0.04 24.151 0 23.791 0H5.86096C3.10096 0 0.860962 2.24 0.860962 5V43C0.860962 45.76 3.10096 48 5.86096 48H33.861C36.621 48 38.861 45.76 38.861 43V15.07C38.861 14.71 38.811 14.35 38.741 14ZM35.041 12H29.871C28.221 12 26.871 10.65 26.871 9V3.83L35.041 12ZM36.871 43C36.871 44.65 35.521 46 33.871 46H5.87097C4.22097 46 2.87097 44.65 2.87097 43V5C2.87097 3.35 4.22097 2 5.87097 2H23.801C24.171 2 24.531 2.07 24.871 2.2V9C24.871 11.76 27.111 14 29.871 14H36.671C36.801 14.34 36.871 14.7 36.871 15.07V43Z" fill="currentcolor"/> </g> <defs> <clipPath id="clip0_1357_108691"><rect width="38" height="48" fill="white" transform="translate(0.861328)"/></clipPath></defs></svg>`,"goa-text":`<svg width="39" height="48" viewBox="0 0 39 48" fill="none" xmlns="http://www.w3.org/2000/svg"> <path d="M38.7953 14C38.5953 13.07 38.1353 12.22 37.4553 11.54L36.9153 11L27.9153 2L27.3753 1.46C26.6953 0.78 25.8353 0.32 24.9153 0.12C24.5653 0.04 24.2053 0 23.8453 0H5.91528C3.15528 0 0.915283 2.24 0.915283 5V43C0.915283 45.76 3.15528 48 5.91528 48H33.9153C36.6753 48 38.9153 45.76 38.9153 43V15.07C38.9153 14.71 38.8653 14.35 38.7953 14ZM35.0953 12H29.9253C28.2753 12 26.9253 10.65 26.9253 9V3.83L35.0953 12ZM36.9253 43C36.9253 44.65 35.5753 46 33.9253 46H5.91528C4.26528 46 2.91528 44.65 2.91528 43V5C2.91528 3.35 4.26528 2 5.91528 2H23.8453C24.2153 2 24.5753 2.07 24.9153 2.2V9C24.9153 11.76 27.1553 14 29.9153 14H36.7153C36.8453 14.34 36.9153 14.7 36.9153 15.07V43H36.9253Z" fill="currentcolor"/> <path d="M27.9153 34H11.9153C11.363 34 10.9153 34.4477 10.9153 35C10.9153 35.5523 11.363 36 11.9153 36H27.9153C28.4676 36 28.9153 35.5523 28.9153 35C28.9153 34.4477 28.4676 34 27.9153 34Z" fill="currentcolor"/> <path d="M27.9153 26H11.9153C11.363 26 10.9153 26.4477 10.9153 27C10.9153 27.5523 11.363 28 11.9153 28H27.9153C28.4676 28 28.9153 27.5523 28.9153 27C28.9153 26.4477 28.4676 26 27.9153 26Z" fill="currentcolor"/> </svg>`,"goa-pdf":`<svg width="39" height="48" viewBox="0 0 39 48" fill="none" xmlns="http://www.w3.org/2000/svg"> <path d="M37.8861 14C37.6861 13.07 37.2261 12.22 36.5461 11.54L36.0061 11L27.0061 2L26.4661 1.46C25.7861 0.78 24.9261 0.32 24.0061 0.12C23.6561 0.04 23.2961 0 22.9361 0H5.0061C2.2461 0 0.00610352 2.24 0.00610352 5V43C0.00610352 45.76 2.2461 48 5.0061 48H33.0061C35.7661 48 38.0061 45.76 38.0061 43V15.07C38.0061 14.71 37.9561 14.35 37.8861 14ZM34.1861 12H29.0161C27.3661 12 26.0161 10.65 26.0161 9V3.83L34.1861 12ZM36.0161 43C36.0161 44.65 34.6661 46 33.0161 46H5.0061C3.3561 46 2.0061 44.65 2.0061 43V5C2.0061 3.35 3.3561 2 5.0061 2H22.9361C23.3061 2 23.6661 2.07 24.0061 2.2V9C24.0061 11.76 26.2461 14 29.0061 14H35.8061C35.9361 14.34 36.0061 14.7 36.0061 15.07V43H36.0161Z" fill="currentcolor"/> <path d="M5.02611 27C5.02611 26.45 5.47611 26 6.02611 26H9.05611C11.1161 26 12.9261 27.06 12.9261 29.28C12.9261 31.5 11.2461 32.74 8.85611 32.74H7.25611V35.85C7.25611 36.47 6.75611 36.97 6.13611 36.97C5.51611 36.97 5.01611 36.47 5.01611 35.85V27.01L5.02611 27ZM7.26611 30.96H8.73611C9.91611 30.96 10.6561 30.53 10.6561 29.31C10.6561 28.22 9.90611 27.77 8.79611 27.77H7.25611V30.96H7.26611Z" fill="currentcolor"/> <path d="M15.0361 27C15.0361 26.45 15.4861 26 16.0361 26H18.8461C22.1761 26 24.0161 28.03 24.0161 31.25C24.0161 34.82 22.0961 36.96 18.7661 36.96H16.0361C15.4861 36.96 15.0361 36.51 15.0361 35.96V27ZM17.2961 35.2H18.7361C20.6861 35.2 21.6961 33.74 21.6961 31.28C21.6961 29.25 20.7861 27.79 18.7461 27.79H17.2861V35.2H17.2961Z" fill="currentcolor"/> <path d="M25.9761 27C25.9761 26.45 26.4261 26 26.9761 26H32.0861C32.5961 26 33.0061 26.41 33.0061 26.92C33.0061 27.43 32.5961 27.84 32.0861 27.84H28.1761V30.63H31.8161C32.3161 30.63 32.7161 31.03 32.7161 31.53C32.7161 32.03 32.3161 32.43 31.8161 32.43H28.1761V35.86C28.1761 36.47 27.6861 36.96 27.0761 36.96C26.4661 36.96 25.9761 36.47 25.9761 35.86V26.99V27Z" fill="currentcolor"/> </svg> `,"goa-doc":`<svg width="39" height="48" viewBox="0 0 39 48" fill="none" xmlns="http://www.w3.org/2000/svg"> <path d="M38.6134 14C38.4134 13.07 37.9534 12.22 37.2734 11.54L36.7334 11L27.7334 2L27.1934 1.46C26.5134 0.78 25.6534 0.32 24.7334 0.12C24.3834 0.04 24.0234 0 23.6634 0H5.7334C2.9734 0 0.733398 2.24 0.733398 5V43C0.733398 45.76 2.9734 48 5.7334 48H33.7334C36.4934 48 38.7334 45.76 38.7334 43V15.07C38.7334 14.71 38.6834 14.35 38.6134 14ZM34.9134 12H29.7434C28.0934 12 26.7434 10.65 26.7434 9V3.83L34.9134 12ZM36.7434 43C36.7434 44.65 35.3934 46 33.7434 46H5.7334C4.0834 46 2.7334 44.65 2.7334 43V5C2.7334 3.35 4.0834 2 5.7334 2H23.6634C24.0334 2 24.3934 2.07 24.7334 2.2V9C24.7334 11.76 26.9734 14 29.7334 14H36.5334C36.6634 14.34 36.7334 14.7 36.7334 15.07V43H36.7434Z" fill="currentcolor"/> <path d="M13.7834 36.6406L10.9034 24.5806C10.6934 23.7206 11.3534 22.8906 12.2334 22.8906C12.8734 22.8906 13.4334 23.3406 13.5734 23.9706C14.4934 28.2306 15.3434 32.5006 15.6434 34.9706H15.6634C16.0934 32.6806 17.3834 27.7106 18.2434 24.0806C18.4134 23.3806 19.0334 22.8906 19.7534 22.8906C20.4634 22.8906 21.0834 23.3706 21.2534 24.0606C22.0734 27.3606 23.3634 32.5806 23.7534 34.8406H23.7734C24.1834 32.0406 25.4534 26.8306 26.1134 23.8706C26.2434 23.3006 26.7434 22.8906 27.3334 22.8906C28.1534 22.8906 28.7434 23.6606 28.5434 24.4506L25.4134 36.6706C25.2134 37.4606 24.5034 38.0106 23.6934 38.0106C22.8634 38.0106 22.1534 37.4506 21.9634 36.6406C21.1734 33.2806 20.0434 28.8506 19.6434 26.6306H19.6234C19.1834 28.9106 18.0234 33.4506 17.2234 36.6606C17.0234 37.4506 16.3134 38.0006 15.5034 38.0006C14.6834 38.0006 13.9634 37.4406 13.7734 36.6406H13.7834Z" fill="currentcolor"/> </svg> `,"goa-ppt":`<svg width="39" height="48" viewBox="0 0 39 48" fill="none" xmlns="http://www.w3.org/2000/svg"> <path d="M38.2498 14C38.0498 13.07 37.5898 12.22 36.9098 11.54L36.3698 11L27.3698 2L26.8298 1.46C26.1497 0.78 25.2898 0.32 24.3698 0.12C24.0198 0.04 23.6598 0 23.2998 0H5.36975C2.60975 0 0.369751 2.24 0.369751 5V43C0.369751 45.76 2.60975 48 5.36975 48H33.3698C36.1297 48 38.3698 45.76 38.3698 43V15.07C38.3698 14.71 38.3198 14.35 38.2498 14ZM34.5498 12H29.3798C27.7298 12 26.3798 10.65 26.3798 9V3.83L34.5498 12ZM36.3797 43C36.3797 44.65 35.0298 46 33.3797 46H5.36975C3.71975 46 2.36975 44.65 2.36975 43V5C2.36975 3.35 3.71975 2 5.36975 2H23.2998C23.6698 2 24.0298 2.07 24.3698 2.2V9C24.3698 11.76 26.6098 14 29.3698 14H36.1698C36.2998 14.34 36.3698 14.7 36.3698 15.07V43H36.3797Z" fill="currentcolor"/> <path d="M14.0798 24.8906C14.0798 23.7906 14.9798 22.8906 16.0798 22.8906H19.4698C22.3098 22.8906 24.6598 24.3406 24.6598 27.2906C24.6598 30.2406 22.4198 31.9306 19.2298 31.9306H16.7698V36.6606C16.7698 37.4006 16.1698 38.0006 15.4298 38.0006C14.6898 38.0006 14.0898 37.4006 14.0898 36.6606V24.8906H14.0798ZM16.7598 29.8206H19.0698C20.8098 29.8206 21.9498 29.1806 21.9498 27.3606C21.9498 25.7306 20.7798 25.0306 19.1298 25.0306H16.7498V29.8306L16.7598 29.8206Z" fill="currentcolor"/> </svg> `,"goa-xls":`<svg width="39" height="48" viewBox="0 0 39 48" fill="none" xmlns="http://www.w3.org/2000/svg"> <path d="M38.3407 14C38.1407 13.07 37.6807 12.22 37.0007 11.54L36.4607 11L27.4607 2L26.9207 1.46C26.2407 0.78 25.3807 0.32 24.4607 0.12C24.1107 0.04 23.7507 0 23.3907 0H5.46069C2.70069 0 0.460693 2.24 0.460693 5V43C0.460693 45.76 2.70069 48 5.46069 48H33.4607C36.2207 48 38.4607 45.76 38.4607 43V15.07C38.4607 14.71 38.4107 14.35 38.3407 14ZM34.6407 12H29.4707C27.8207 12 26.4707 10.65 26.4707 9V3.83L34.6407 12ZM36.4707 43C36.4707 44.65 35.1207 46 33.4707 46H5.46069C3.81069 46 2.46069 44.65 2.46069 43V5C2.46069 3.35 3.81069 2 5.46069 2H23.3907C23.7607 2 24.1207 2.07 24.4607 2.2V9C24.4607 11.76 26.7007 14 29.4607 14H36.2607C36.3907 14.34 36.4607 14.7 36.4607 15.07V43H36.4707Z" fill="currentcolor"/> <path d="M23.4107 38.0006C22.9407 38.0006 22.5107 37.7506 22.2707 37.3406L19.3907 32.2806H19.3707L16.4607 37.3906C16.2507 37.7706 15.8407 38.0006 15.4107 38.0006C14.4707 38.0006 13.8907 36.9706 14.3807 36.1606L17.9207 30.3906L14.5807 24.8606C14.0607 23.9906 14.6807 22.8906 15.6907 22.8906C16.1607 22.8906 16.5907 23.1406 16.8207 23.5406L19.5307 28.2806L19.5507 28.2606L22.3507 23.4806C22.5607 23.1206 22.9507 22.8906 23.3807 22.8906C24.3107 22.8906 24.8807 23.9106 24.3907 24.7006L21.0307 30.1206L24.5407 36.0206C25.0607 36.8906 24.4307 38.0006 23.4207 38.0006H23.4107Z" fill="currentcolor"/> </svg> `,"goa-zip":`<svg width="39" height="48" viewBox="0 0 39 48" fill="none" xmlns="http://www.w3.org/2000/svg"> <path d="M38.7043 14C38.5043 13.07 38.0443 12.22 37.3643 11.54L36.8243 11L27.8243 2L27.2843 1.46C26.6043 0.78 25.7443 0.32 24.8243 0.12C24.4743 0.04 24.1143 0 23.7543 0H5.82434C3.06434 0 0.824341 2.24 0.824341 5V43C0.824341 45.76 3.06434 48 5.82434 48H33.8243C36.5843 48 38.8243 45.76 38.8243 43V15.07C38.8243 14.71 38.7743 14.35 38.7043 14ZM35.0043 12H29.8343C28.1843 12 26.8343 10.65 26.8343 9V3.83L35.0043 12ZM36.8343 43C36.8343 44.65 35.4843 46 33.8343 46H5.82434C4.17434 46 2.82434 44.65 2.82434 43V5C2.82434 3.35 4.17434 2 5.82434 2H23.7543C24.1243 2 24.4843 2.07 24.8243 2.2V9C24.8243 11.76 27.0643 14 29.8243 14H36.6243C36.7543 14.34 36.8243 14.7 36.8243 15.07V43H36.8343Z" fill="currentcolor"/> <path d="M14.8243 20H12.8243V22H14.8243V20Z" fill="currentcolor"/> <path d="M12.8243 18H10.8243V20H12.8243V18Z" fill="currentcolor"/> <path d="M14.8243 16H12.8243V18H14.8243V16Z" fill="currentcolor"/> <path d="M12.8243 14H10.8243V16H12.8243V14Z" fill="currentcolor"/> <path d="M14.8243 12H12.8243V14H14.8243V12Z" fill="currentcolor"/> <path d="M12.8243 10H10.8243V12H12.8243V10Z" fill="currentcolor"/> <path d="M14.8243 8H12.8243V10H14.8243V8Z" fill="currentcolor"/> <path d="M12.8243 6H10.8243V8H12.8243V6Z" fill="currentcolor"/> <path d="M14.8243 4H12.8243V6H14.8243V4Z" fill="currentcolor"/> <path d="M12.8243 2H10.8243V4H12.8243V2Z" fill="currentcolor"/> <path d="M17.7244 32.14L15.4744 23.69C15.3644 23.29 15.0044 23 14.5844 23H11.0644C10.6444 23 10.2744 23.28 10.1744 23.69L7.92435 32.14C7.30435 35.17 9.62435 37.97 12.8244 38C16.0144 37.98 18.3444 35.18 17.7244 32.14ZM15.1944 34.89C14.6244 35.58 13.7644 35.98 12.8244 35.99C11.8844 35.98 11.0244 35.58 10.4544 34.89C9.92435 34.24 9.71435 33.42 9.87435 32.59L11.8944 25H13.7544L15.7744 32.59C15.9344 33.42 15.7244 34.24 15.1944 34.89Z" fill="currentcolor"/> <path d="M13.8243 32H11.8243C11.2721 32 10.8243 32.4477 10.8243 33C10.8243 33.5523 11.2721 34 11.8243 34H13.8243C14.3766 34 14.8243 33.5523 14.8243 33C14.8243 32.4477 14.3766 32 13.8243 32Z" fill="currentcolor"/> </svg> `,"goa-video":`<svg width="39" height="48" viewBox="0 0 39 48" fill="none" xmlns="http://www.w3.org/2000/svg"> <path d="M37.977 14C37.777 13.07 37.317 12.22 36.637 11.54L36.097 11L27.097 2L26.557 1.46C25.877 0.78 25.017 0.32 24.097 0.12C23.747 0.04 23.387 0 23.027 0H5.09705C2.33705 0 0.0970459 2.24 0.0970459 5V43C0.0970459 45.76 2.33705 48 5.09705 48H33.097C35.857 48 38.097 45.76 38.097 43V15.07C38.097 14.71 38.047 14.35 37.977 14ZM34.277 12H29.107C27.457 12 26.107 10.65 26.107 9V3.83L34.277 12ZM36.107 43C36.107 44.65 34.757 46 33.107 46H5.09705C3.44705 46 2.09705 44.65 2.09705 43V5C2.09705 3.35 3.44705 2 5.09705 2H23.027C23.397 2 23.757 2.07 24.097 2.2V9C24.097 11.76 26.337 14 29.097 14H35.897C36.027 14.34 36.097 14.7 36.097 15.07V43H36.107Z" fill="currentcolor"/> <path d="M22.097 26.0002V29.0102C22.097 29.7802 22.927 30.2602 23.587 29.8802L25.077 29.0302L28.087 27.3202V34.6902L25.077 32.9802L23.587 32.1302C22.917 31.7502 22.097 32.2302 22.097 33.0002V35.9902H10.097V25.9902H22.097M22.097 23.9902H10.097C8.99705 23.9902 8.09705 24.8902 8.09705 25.9902V35.9902C8.09705 37.0902 8.99705 37.9902 10.097 37.9902H22.097C23.197 37.9902 24.097 37.0902 24.097 35.9902V34.7202L27.107 36.4302C27.427 36.6102 27.767 36.6902 28.087 36.6902C29.137 36.6902 30.087 35.8502 30.087 34.6902V27.3202C30.087 26.1502 29.127 25.3202 28.087 25.3202C27.757 25.3202 27.417 25.4002 27.107 25.5802L24.097 27.2902V25.9902C24.097 24.8902 23.197 23.9902 22.097 23.9902Z" fill="currentcolor"/> </svg> `,"goa-audio":`<svg width="39" height="49" viewBox="0 0 39 49" fill="none" xmlns="http://www.w3.org/2000/svg"> <path d="M38.0679 14.2305C37.8679 13.3005 37.4079 12.4505 36.7279 11.7705L36.1879 11.2305L27.1879 2.23047L26.6479 1.69047C25.9679 1.01047 25.1079 0.550469 24.1879 0.350469C23.8379 0.270469 23.4779 0.230469 23.1179 0.230469H5.18793C2.42793 0.230469 0.187927 2.47047 0.187927 5.23047V43.2305C0.187927 45.9905 2.42793 48.2305 5.18793 48.2305H33.1879C35.9479 48.2305 38.1879 45.9905 38.1879 43.2305V15.3005C38.1879 14.9405 38.1379 14.5805 38.0679 14.2305ZM34.3679 12.2305H29.1979C27.5479 12.2305 26.1979 10.8805 26.1979 9.23047V4.06047L34.3679 12.2305ZM36.1979 43.2305C36.1979 44.8805 34.8479 46.2305 33.1979 46.2305H5.19792C3.54792 46.2305 2.19792 44.8805 2.19792 43.2305V5.23047C2.19792 3.58047 3.54792 2.23047 5.19792 2.23047H23.1279C23.4979 2.23047 23.8579 2.30047 24.1979 2.43047V9.23047C24.1979 11.9905 26.4379 14.2305 29.1979 14.2305H35.9979C36.1279 14.5705 36.1979 14.9305 36.1979 15.3005V43.2305Z" fill="currentcolor"/> <path d="M20.1879 25.1189V37.3489L16.3479 34.6089L15.8279 34.2389H10.1879V28.2389H15.8279L16.3479 27.8689L20.1879 25.1289M20.1879 23.1289C19.7979 23.1289 19.3979 23.2489 19.0279 23.5089L15.1879 26.2489H10.1879C9.08793 26.2489 8.18793 27.1489 8.18793 28.2489V34.2489C8.18793 35.3489 9.08793 36.2489 10.1879 36.2489H15.1879L19.0279 38.9889C19.3879 39.2489 19.7879 39.3689 20.1879 39.3689C21.2279 39.3689 22.1979 38.5489 22.1979 37.3689V25.1389C22.1979 23.9589 21.2279 23.1389 20.1879 23.1389V23.1289Z" fill="currentcolor"/> <path d="M26.1381 23.707C26.6381 24.037 27.1081 24.417 27.5481 24.857C27.9881 25.297 28.3681 25.767 28.6981 26.267C29.0281 26.767 29.2981 27.287 29.5181 27.837C29.7381 28.387 29.8981 28.937 30.0081 29.507C30.1181 30.077 30.1681 30.647 30.1681 31.227C30.1681 31.807 30.1181 32.377 30.0081 32.947C29.8981 33.517 29.7381 34.077 29.5181 34.617C29.2981 35.157 29.0281 35.687 28.6981 36.187C28.3681 36.687 27.9881 37.157 27.5481 37.597C27.1081 38.037 26.6381 38.417 26.1381 38.747" stroke="currentcolor" stroke-width="2" stroke-miterlimit="10" stroke-linecap="round"/> </svg> `,"goa-image":`<svg width="39" height="49" viewBox="0 0 39 49" fill="none" xmlns="http://www.w3.org/2000/svg"> <path d="M38.1588 14.2305C37.9588 13.3005 37.4988 12.4505 36.8188 11.7705L36.2788 11.2305L27.2788 2.23047L26.7388 1.69047C26.0588 1.01047 25.1988 0.550469 24.2788 0.350469C23.9288 0.270469 23.5688 0.230469 23.2088 0.230469H5.27881C2.51881 0.230469 0.278809 2.47047 0.278809 5.23047V43.2305C0.278809 45.9905 2.51881 48.2305 5.27881 48.2305H33.2788C36.0388 48.2305 38.2788 45.9905 38.2788 43.2305V15.3005C38.2788 14.9405 38.2288 14.5805 38.1588 14.2305ZM34.4588 12.2305H29.2888C27.6388 12.2305 26.2888 10.8805 26.2888 9.23047V4.06047L34.4588 12.2305ZM36.2888 43.2305C36.2888 44.8805 34.9388 46.2305 33.2888 46.2305H5.2888C3.6388 46.2305 2.2888 44.8805 2.2888 43.2305V5.23047C2.2888 3.58047 3.6388 2.23047 5.2888 2.23047H23.2188C23.5888 2.23047 23.9488 2.30047 24.2888 2.43047V9.23047C24.2888 11.9905 26.5288 14.2305 29.2888 14.2305H36.0888C36.2188 14.5705 36.2888 14.9305 36.2888 15.3005V43.2305Z" fill="currentcolor"/> <path d="M20.9985 28.2305C21.3585 28.2305 21.6485 28.4405 21.7885 28.7305L27.1085 36.7305C27.3185 37.0205 27.3185 37.4405 27.1785 37.7305C27.0385 38.0905 26.6785 38.2305 26.3185 38.2305H12.2385C11.8785 38.2305 11.5885 38.0905 11.3785 37.7305C11.2385 37.4405 11.2385 37.0205 11.4485 36.7305L14.8285 31.7305C14.9685 31.4405 15.3285 31.2305 15.6185 31.2305C15.9785 31.2305 16.2685 31.4405 16.4785 31.7305L17.3385 32.9405L20.1385 28.7305C20.3585 28.4405 20.6385 28.2305 20.9985 28.2305ZM20.9985 26.2305C20.0485 26.2305 19.1685 26.6905 18.5385 27.5305L18.4985 27.5805L18.4685 27.6305L17.1185 29.6605C16.6585 29.3805 16.1485 29.2405 15.6085 29.2405C14.6085 29.2405 13.6185 29.8205 13.1085 30.6905L9.79851 35.5905C9.17851 36.4505 9.08851 37.6705 9.57851 38.6305L9.60851 38.7005L9.6485 38.7705C10.2085 39.7005 11.1485 40.2405 12.2285 40.2405H26.3085C27.5185 40.2405 28.5385 39.6005 28.9985 38.5605C29.4385 37.6105 29.3385 36.4405 28.7485 35.6005L23.5085 27.7105C22.9885 26.8005 22.0485 26.2405 21.0085 26.2405L20.9985 26.2305Z" fill="currentcolor"/> <path d="M12.7788 23.2305C13.6088 23.2305 14.2788 23.9005 14.2788 24.7305C14.2788 25.5605 13.6088 26.2305 12.7788 26.2305C11.9488 26.2305 11.2788 25.5605 11.2788 24.7305C11.2788 23.9005 11.9488 23.2305 12.7788 23.2305ZM12.7788 21.2305C10.8488 21.2305 9.27881 22.8005 9.27881 24.7305C9.27881 26.6605 10.8488 28.2305 12.7788 28.2305C14.7088 28.2305 16.2788 26.6605 16.2788 24.7305C16.2788 22.8005 14.7088 21.2305 12.7788 21.2305Z" fill="currentcolor"/> </svg> `};$$self.$$set=$$props=>{if('mt'in $$props)$$invalidate(0,mt=$$props.mt);if('mr'in $$props)$$invalidate(1,mr=$$props.mr);if('mb'in $$props)$$invalidate(2,mb=$$props.mb);if('ml'in $$props)$$invalidate(3,ml=$$props.ml);if('type'in $$props)$$invalidate(4,type=$$props.type);if('size'in $$props)$$invalidate(5,size=$$props.size);if('theme'in $$props)$$invalidate(6,theme=$$props.theme);if('inverted'in $$props)$$invalidate(17,inverted=$$props.inverted);if('fillcolor'in $$props)$$invalidate(7,fillcolor=$$props.fillcolor);if('opacity'in $$props)$$invalidate(8,opacity=$$props.opacity);if('title'in $$props)$$invalidate(9,title=$$props.title);if('testid'in $$props)$$invalidate(10,testid=$$props.testid);if('arialabel'in $$props)$$invalidate(11,arialabel=$$props.arialabel);if('ariacontrols'in $$props)$$invalidate(12,ariacontrols=$$props.ariacontrols);if('ariaexpanded'in $$props)$$invalidate(18,ariaexpanded=$$props.ariaexpanded);if('role'in $$props)$$invalidate(13,role=$$props.role);};$$self.$$.update=()=>{if($$self.$$.dirty&/*inverted*/131072){$$invalidate(15,isInverted=toBoolean(inverted));}if($$self.$$.dirty&/*ariaexpanded*/262144){$$invalidate(14,_ariaexpanded=ariaexpanded);}};return [mt,mr,mb,ml,type,size,theme,fillcolor,opacity,title,testid,arialabel,ariacontrols,role,_ariaexpanded,isInverted,_iconOverrides,inverted,ariaexpanded];}class Icon extends SvelteElement{constructor(options){super();const style=document.createElement('style');style.textContent=`:host{display:inline-flex;align-items:center}ion-icon{pointer-events:none;width:100%;height:100%}.goa-icon{fill:var(--fill-color);color:var(--fill-color);opacity:var(--opacity);display:inline-flex;align-items:center;justify-content:center}.goa-icon--small{width:var(--goa-icon-size-m);height:var(--goa-icon-size-m)}.goa-icon--medium{width:var(--goa-icon-size-l);height:var(--goa-icon-size-l)}.goa-icon--large{width:2rem;height:2rem}.goa-icon--xlarge{width:2.5rem;height:2.5rem}.goa-icon:has(.icon-override){height:-moz-fit-content;height:fit-content}.icon-override{display:flex;flex-direction:column;align-items:center}.inverted *{color:#fff;fill:#fff}`;this.shadowRoot.appendChild(style);init(this,{target:this.shadowRoot,props:attribute_to_object(this.attributes),customElement:true},instance$w,create_fragment$z,safe_not_equal,{mt:0,mr:1,mb:2,ml:3,type:4,size:5,theme:6,inverted:17,fillcolor:7,opacity:8,title:9,testid:10,arialabel:11,ariacontrols:12,ariaexpanded:18,role:13},null);if(options){if(options.target){insert(options.target,this,options.anchor);}if(options.props){this.$set(options.props);flush();}}}static get observedAttributes(){return ["mt","mr","mb","ml","type","size","theme","inverted","fillcolor","opacity","title","testid","arialabel","ariacontrols","ariaexpanded","role"];}get mt(){return this.$$.ctx[0];}set mt(mt){this.$$set({mt});flush();}get mr(){return this.$$.ctx[1];}set mr(mr){this.$$set({mr});flush();}get mb(){return this.$$.ctx[2];}set mb(mb){this.$$set({mb});flush();}get ml(){return this.$$.ctx[3];}set ml(ml){this.$$set({ml});flush();}get type(){return this.$$.ctx[4];}set type(type){this.$$set({type});flush();}get size(){return this.$$.ctx[5];}set size(size){this.$$set({size});flush();}get theme(){return this.$$.ctx[6];}set theme(theme){this.$$set({theme});flush();}get inverted(){return this.$$.ctx[17];}set inverted(inverted){this.$$set({inverted});flush();}get fillcolor(){return this.$$.ctx[7];}set fillcolor(fillcolor){this.$$set({fillcolor});flush();}get opacity(){return this.$$.ctx[8];}set opacity(opacity){this.$$set({opacity});flush();}get title(){return this.$$.ctx[9];}set title(title){this.$$set({title});flush();}get testid(){return this.$$.ctx[10];}set testid(testid){this.$$set({testid});flush();}get arialabel(){return this.$$.ctx[11];}set arialabel(arialabel){this.$$set({arialabel});flush();}get ariacontrols(){return this.$$.ctx[12];}set ariacontrols(ariacontrols){this.$$set({ariacontrols});flush();}get ariaexpanded(){return this.$$.ctx[18];}set ariaexpanded(ariaexpanded){this.$$set({ariaexpanded});flush();}get role(){return this.$$.ctx[13];}set role(role){this.$$set({role});flush();}}customElements.define("goa-icon",Icon);/* src/components/input/Input.svelte generated by Svelte v3.59.2 */function create_if_block_4$2(ctx){let div;let t;return {c(){div=element("div");t=text(/*prefix*/ctx[15]);attr(div,"class","prefix");},m(target,anchor){insert(target,div,anchor);append(div,t);},p(ctx,dirty){if(dirty[0]&/*prefix*/32768)set_data(t,/*prefix*/ctx[15]);},d(detaching){if(detaching)detach(div);}};}// (137:4) {#if leadingicon}
277
- function create_if_block_3$8(ctx){let goa_icon;return {c(){goa_icon=element("goa-icon");set_custom_element_data(goa_icon,"class","goa-input-leading-icon");set_custom_element_data(goa_icon,"data-testid","leading-icon");set_custom_element_data(goa_icon,"type",/*leadingicon*/ctx[5]);},m(target,anchor){insert(target,goa_icon,anchor);},p(ctx,dirty){if(dirty[0]&/*leadingicon*/32){set_custom_element_data(goa_icon,"type",/*leadingicon*/ctx[5]);}},d(detaching){if(detaching)detach(goa_icon);}};}// (174:4) {#if trailingicon && !handlesTrailingIconClick}
278
- function create_if_block_2$8(ctx){let goa_icon;return {c(){goa_icon=element("goa-icon");set_custom_element_data(goa_icon,"class","goa-input-trailing-icon");set_custom_element_data(goa_icon,"data-testid","trailing-icon");set_custom_element_data(goa_icon,"size","medium");set_custom_element_data(goa_icon,"type",/*trailingicon*/ctx[6]);},m(target,anchor){insert(target,goa_icon,anchor);},p(ctx,dirty){if(dirty[0]&/*trailingicon*/64){set_custom_element_data(goa_icon,"type",/*trailingicon*/ctx[6]);}},d(detaching){if(detaching)detach(goa_icon);}};}// (184:4) {#if trailingicon && handlesTrailingIconClick}
279
- function create_if_block_1$9(ctx){let goa_icon_button;let mounted;let dispose;return {c(){goa_icon_button=element("goa-icon-button");set_custom_element_data(goa_icon_button,"disabled",/*isDisabled*/ctx[28]);set_custom_element_data(goa_icon_button,"variant","nocolor");set_custom_element_data(goa_icon_button,"size","medium");set_custom_element_data(goa_icon_button,"icon",/*trailingicon*/ctx[6]);set_custom_element_data(goa_icon_button,"data-testid","trailing-icon-button");set_custom_element_data(goa_icon_button,"class","goa-input-trailing-icon-button");},m(target,anchor){insert(target,goa_icon_button,anchor);if(!mounted){dispose=listen(goa_icon_button,"click",doClick);mounted=true;}},p(ctx,dirty){if(dirty[0]&/*isDisabled*/268435456){set_custom_element_data(goa_icon_button,"disabled",/*isDisabled*/ctx[28]);}if(dirty[0]&/*trailingicon*/64){set_custom_element_data(goa_icon_button,"icon",/*trailingicon*/ctx[6]);}},d(detaching){if(detaching)detach(goa_icon_button);mounted=false;dispose();}};}// (197:4) {#if suffix}
280
- function create_if_block$j(ctx){let span;let t;return {c(){span=element("span");t=text(/*suffix*/ctx[16]);attr(span,"class","suffix");},m(target,anchor){insert(target,span,anchor);append(span,t);},p(ctx,dirty){if(dirty[0]&/*suffix*/65536)set_data(t,/*suffix*/ctx[16]);},d(detaching){if(detaching)detach(span);}};}function create_fragment$y(ctx){let div3;let div2;let t0;let div0;let t1;let t2;let input;let input_class_value;let input_style_value;let input_id_value;let input_aria_label_value;let t3;let t4;let t5;let t6;let div1;let div2_class_value;let div3_style_value;let mounted;let dispose;let if_block0=/*prefix*/ctx[15]&&create_if_block_4$2(ctx);let if_block1=/*leadingicon*/ctx[5]&&create_if_block_3$8(ctx);let if_block2=/*trailingicon*/ctx[6]&&!/*handlesTrailingIconClick*/ctx[30]&&create_if_block_2$8(ctx);let if_block3=/*trailingicon*/ctx[6]&&/*handlesTrailingIconClick*/ctx[30]&&create_if_block_1$9(ctx);let if_block4=/*suffix*/ctx[16]&&create_if_block$j(ctx);return {c(){div3=element("div");div2=element("div");if(if_block0)if_block0.c();t0=space();div0=element("div");div0.innerHTML=`<slot name="leadingContent"></slot>`;t1=space();if(if_block1)if_block1.c();t2=space();input=element("input");t3=space();if(if_block2)if_block2.c();t4=space();if(if_block3)if_block3.c();t5=space();if(if_block4)if_block4.c();t6=space();div1=element("div");div1.innerHTML=`<slot name="trailingContent"></slot>`;this.c=noop;attr(div0,"class","leading-content");attr(input,"class",input_class_value="input--"+/*variant*/ctx[7]);attr(input,"style",input_style_value=`--search-icon-offset: ${/*trailingicon*/ctx[6]?"-0.5rem":"0"}`);input.readOnly=/*isReadonly*/ctx[27];input.disabled=/*isDisabled*/ctx[28];attr(input,"data-testid",/*testid*/ctx[8]);attr(input,"autocapitalize",/*autocapitalize*/ctx[3]);attr(input,"name",/*name*/ctx[2]);attr(input,"type",/*type*/ctx[1]);input.value=/*value*/ctx[0];attr(input,"placeholder",/*placeholder*/ctx[4]);attr(input,"min",/*min*/ctx[12]);attr(input,"max",/*max*/ctx[13]);attr(input,"step",/*step*/ctx[14]);attr(input,"maxlength",/*maxlength*/ctx[17]);attr(input,"id",input_id_value=/*id*/ctx[18]||/*name*/ctx[2]);attr(input,"role","textbox");attr(input,"aria-label",input_aria_label_value=/*arialabel*/ctx[10]||/*name*/ctx[2]);attr(input,"aria-labelledby",/*arialabelledby*/ctx[11]);toggle_class(input,"input-leading-content",/*_leadingContentSlot*/ctx[25]&&!/*isDisabled*/ctx[28]);toggle_class(input,"input-trailing-content",/*_trailingContentSlot*/ctx[26]&&!/*isDisabled*/ctx[28]);attr(div1,"class","trailing-content");attr(div2,"class",div2_class_value="goa-input variant--"+/*variant*/ctx[7]+" type--"+/*type*/ctx[1]);toggle_class(div2,"input--disabled",/*isDisabled*/ctx[28]);toggle_class(div2,"input-leading-content",/*_leadingContentSlot*/ctx[25]);toggle_class(div2,"input-trailing-content",/*_trailingContentSlot*/ctx[26]);toggle_class(div2,"error",/*isError*/ctx[29]);attr(div3,"class","container");attr(div3,"style",div3_style_value=`--width: ${/*width*/ctx[9]};${calculateMargin(/*mt*/ctx[19],/*mr*/ctx[20],/*mb*/ctx[21],/*ml*/ctx[22])}`);},m(target,anchor){insert(target,div3,anchor);append(div3,div2);if(if_block0)if_block0.m(div2,null);append(div2,t0);append(div2,div0);append(div2,t1);if(if_block1)if_block1.m(div2,null);append(div2,t2);append(div2,input);/*input_binding*/ctx[41](input);append(div2,t3);if(if_block2)if_block2.m(div2,null);append(div2,t4);if(if_block3)if_block3.m(div2,null);append(div2,t5);if(if_block4)if_block4.m(div2,null);append(div2,t6);append(div2,div1);/*div3_binding*/ctx[42](div3);if(!mounted){dispose=[listen(input,"keyup",/*onKeyUp*/ctx[31]),listen(input,"change",/*onKeyUp*/ctx[31]),listen(input,"focus",/*onFocus*/ctx[32]),listen(input,"blur",/*onBlur*/ctx[33])];mounted=true;}},p(ctx,dirty){if(/*prefix*/ctx[15]){if(if_block0){if_block0.p(ctx,dirty);}else {if_block0=create_if_block_4$2(ctx);if_block0.c();if_block0.m(div2,t0);}}else if(if_block0){if_block0.d(1);if_block0=null;}if(/*leadingicon*/ctx[5]){if(if_block1){if_block1.p(ctx,dirty);}else {if_block1=create_if_block_3$8(ctx);if_block1.c();if_block1.m(div2,t2);}}else if(if_block1){if_block1.d(1);if_block1=null;}if(dirty[0]&/*variant*/128&&input_class_value!==(input_class_value="input--"+/*variant*/ctx[7])){attr(input,"class",input_class_value);}if(dirty[0]&/*trailingicon*/64&&input_style_value!==(input_style_value=`--search-icon-offset: ${/*trailingicon*/ctx[6]?"-0.5rem":"0"}`)){attr(input,"style",input_style_value);}if(dirty[0]&/*isReadonly*/134217728){input.readOnly=/*isReadonly*/ctx[27];}if(dirty[0]&/*isDisabled*/268435456){input.disabled=/*isDisabled*/ctx[28];}if(dirty[0]&/*testid*/256){attr(input,"data-testid",/*testid*/ctx[8]);}if(dirty[0]&/*autocapitalize*/8){attr(input,"autocapitalize",/*autocapitalize*/ctx[3]);}if(dirty[0]&/*name*/4){attr(input,"name",/*name*/ctx[2]);}if(dirty[0]&/*type*/2){attr(input,"type",/*type*/ctx[1]);}if(dirty[0]&/*value*/1&&input.value!==/*value*/ctx[0]){input.value=/*value*/ctx[0];}if(dirty[0]&/*placeholder*/16){attr(input,"placeholder",/*placeholder*/ctx[4]);}if(dirty[0]&/*min*/4096){attr(input,"min",/*min*/ctx[12]);}if(dirty[0]&/*max*/8192){attr(input,"max",/*max*/ctx[13]);}if(dirty[0]&/*step*/16384){attr(input,"step",/*step*/ctx[14]);}if(dirty[0]&/*maxlength*/131072){attr(input,"maxlength",/*maxlength*/ctx[17]);}if(dirty[0]&/*id, name*/262148&&input_id_value!==(input_id_value=/*id*/ctx[18]||/*name*/ctx[2])){attr(input,"id",input_id_value);}if(dirty[0]&/*arialabel, name*/1028&&input_aria_label_value!==(input_aria_label_value=/*arialabel*/ctx[10]||/*name*/ctx[2])){attr(input,"aria-label",input_aria_label_value);}if(dirty[0]&/*arialabelledby*/2048){attr(input,"aria-labelledby",/*arialabelledby*/ctx[11]);}if(dirty[0]&/*variant, _leadingContentSlot, isDisabled*/301990016){toggle_class(input,"input-leading-content",/*_leadingContentSlot*/ctx[25]&&!/*isDisabled*/ctx[28]);}if(dirty[0]&/*variant, _trailingContentSlot, isDisabled*/335544448){toggle_class(input,"input-trailing-content",/*_trailingContentSlot*/ctx[26]&&!/*isDisabled*/ctx[28]);}if(/*trailingicon*/ctx[6]&&!/*handlesTrailingIconClick*/ctx[30]){if(if_block2){if_block2.p(ctx,dirty);}else {if_block2=create_if_block_2$8(ctx);if_block2.c();if_block2.m(div2,t4);}}else if(if_block2){if_block2.d(1);if_block2=null;}if(/*trailingicon*/ctx[6]&&/*handlesTrailingIconClick*/ctx[30]){if(if_block3){if_block3.p(ctx,dirty);}else {if_block3=create_if_block_1$9(ctx);if_block3.c();if_block3.m(div2,t5);}}else if(if_block3){if_block3.d(1);if_block3=null;}if(/*suffix*/ctx[16]){if(if_block4){if_block4.p(ctx,dirty);}else {if_block4=create_if_block$j(ctx);if_block4.c();if_block4.m(div2,t6);}}else if(if_block4){if_block4.d(1);if_block4=null;}if(dirty[0]&/*variant, type*/130&&div2_class_value!==(div2_class_value="goa-input variant--"+/*variant*/ctx[7]+" type--"+/*type*/ctx[1])){attr(div2,"class",div2_class_value);}if(dirty[0]&/*variant, type, isDisabled*/268435586){toggle_class(div2,"input--disabled",/*isDisabled*/ctx[28]);}if(dirty[0]&/*variant, type, _leadingContentSlot*/33554562){toggle_class(div2,"input-leading-content",/*_leadingContentSlot*/ctx[25]);}if(dirty[0]&/*variant, type, _trailingContentSlot*/67108994){toggle_class(div2,"input-trailing-content",/*_trailingContentSlot*/ctx[26]);}if(dirty[0]&/*variant, type, isError*/536871042){toggle_class(div2,"error",/*isError*/ctx[29]);}if(dirty[0]&/*width, mt, mr, mb, ml*/7864832&&div3_style_value!==(div3_style_value=`--width: ${/*width*/ctx[9]};${calculateMargin(/*mt*/ctx[19],/*mr*/ctx[20],/*mb*/ctx[21],/*ml*/ctx[22])}`)){attr(div3,"style",div3_style_value);}},i:noop,o:noop,d(detaching){if(detaching)detach(div3);if(if_block0)if_block0.d();if(if_block1)if_block1.d();/*input_binding*/ctx[41](null);if(if_block2)if_block2.d();if(if_block3)if_block3.d();if(if_block4)if_block4.d();/*div3_binding*/ctx[42](null);mounted=false;run_all(dispose);}};}function doClick(){this.dispatchEvent(new CustomEvent("_trailingIconClick",{composed:true}));}function instance$v($$self,$$props,$$invalidate){let handlesTrailingIconClick;let isFocused;let isReadonly;let isError;let isDisabled;const[Types,validateType]=typeValidator("Input type",["text","number","password","email","date","datetime-local","month","range","search","tel","time","url","week"]);const[AutoCapitalize,validateAutoCapitalize]=typeValidator("Input auto capitalize",["on","off","none","sentences","words","characters"]);let{type="text"}=$$props;let{name=""}=$$props;let{value=""}=$$props;let{autocapitalize="off"}=$$props;let{placeholder=""}=$$props;let{leadingicon=null}=$$props;let{trailingicon=null}=$$props;let{variant="goa"}=$$props;let{disabled="false"}=$$props;let{handletrailingiconclick="false"}=$$props;let{focused="false"}=$$props;let{readonly="false"}=$$props;let{error="false"}=$$props;let{testid=""}=$$props;let{width="30ch"}=$$props;let{arialabel=null}=$$props;let{arialabelledby=null}=$$props;let{min=""}=$$props;let{max=""}=$$props;let{step=1}=$$props;let{prefix=""}=$$props;let{suffix=""}=$$props;let{debounce=0}=$$props;let{maxlength=null}=$$props;let{id=""}=$$props;let{mt=null}=$$props;let{mr=null}=$$props;let{mb=null}=$$props;let{ml=null}=$$props;let inputEl;let _rootEL;let _leadingContentSlot=false;let _trailingContentSlot=false;let _debounceId=null;function onKeyUp(e){const input=e.target;if(!input)return;if(isReadonly)return;if(_debounceId!=null){clearTimeout(_debounceId);}_debounceId=setTimeout(()=>{input.dispatchEvent(new CustomEvent("_change",{composed:true,bubbles:false,cancelable:true,detail:{name,value:input.value}}));},debounce);$$invalidate(0,value=input.value);}function onFocus(e){const input=e.target;input.dispatchEvent(new CustomEvent("_focus",{composed:true,detail:{name,value:input.value}}));}function onBlur(e){const input=e.target;input.dispatchEvent(new CustomEvent("_blur",{composed:true,detail:{name,value:input.value}}));}onMount(async()=>{await tick();validateType(type);validateAutoCapitalize(autocapitalize);if(prefix!=""||suffix!=""){console.warn("GoAInput [prefix] and [suffix] properties are deprecated. Instead use leadingContent and trailingContent.");}const leadingContentSlot=_rootEL.querySelector("slot[name=leadingContent]");if(leadingContentSlot&&leadingContentSlot.assignedNodes().length>0){$$invalidate(25,_leadingContentSlot=true);}const trailingContentSlot=_rootEL.querySelector("slot[name=trailingContent]");if(trailingContentSlot&&trailingContentSlot.assignedNodes().length>0){$$invalidate(26,_trailingContentSlot=true);}});function input_binding($$value){binding_callbacks[$$value?'unshift':'push'](()=>{inputEl=$$value;$$invalidate(23,inputEl);});}function div3_binding($$value){binding_callbacks[$$value?'unshift':'push'](()=>{_rootEL=$$value;$$invalidate(24,_rootEL);});}$$self.$$set=$$props=>{if('type'in $$props)$$invalidate(1,type=$$props.type);if('name'in $$props)$$invalidate(2,name=$$props.name);if('value'in $$props)$$invalidate(0,value=$$props.value);if('autocapitalize'in $$props)$$invalidate(3,autocapitalize=$$props.autocapitalize);if('placeholder'in $$props)$$invalidate(4,placeholder=$$props.placeholder);if('leadingicon'in $$props)$$invalidate(5,leadingicon=$$props.leadingicon);if('trailingicon'in $$props)$$invalidate(6,trailingicon=$$props.trailingicon);if('variant'in $$props)$$invalidate(7,variant=$$props.variant);if('disabled'in $$props)$$invalidate(34,disabled=$$props.disabled);if('handletrailingiconclick'in $$props)$$invalidate(35,handletrailingiconclick=$$props.handletrailingiconclick);if('focused'in $$props)$$invalidate(36,focused=$$props.focused);if('readonly'in $$props)$$invalidate(37,readonly=$$props.readonly);if('error'in $$props)$$invalidate(38,error=$$props.error);if('testid'in $$props)$$invalidate(8,testid=$$props.testid);if('width'in $$props)$$invalidate(9,width=$$props.width);if('arialabel'in $$props)$$invalidate(10,arialabel=$$props.arialabel);if('arialabelledby'in $$props)$$invalidate(11,arialabelledby=$$props.arialabelledby);if('min'in $$props)$$invalidate(12,min=$$props.min);if('max'in $$props)$$invalidate(13,max=$$props.max);if('step'in $$props)$$invalidate(14,step=$$props.step);if('prefix'in $$props)$$invalidate(15,prefix=$$props.prefix);if('suffix'in $$props)$$invalidate(16,suffix=$$props.suffix);if('debounce'in $$props)$$invalidate(39,debounce=$$props.debounce);if('maxlength'in $$props)$$invalidate(17,maxlength=$$props.maxlength);if('id'in $$props)$$invalidate(18,id=$$props.id);if('mt'in $$props)$$invalidate(19,mt=$$props.mt);if('mr'in $$props)$$invalidate(20,mr=$$props.mr);if('mb'in $$props)$$invalidate(21,mb=$$props.mb);if('ml'in $$props)$$invalidate(22,ml=$$props.ml);};$$self.$$.update=()=>{if($$self.$$.dirty[1]&/*handletrailingiconclick*/16){$$invalidate(30,handlesTrailingIconClick=toBoolean(handletrailingiconclick));}if($$self.$$.dirty[1]&/*focused*/32){$$invalidate(40,isFocused=toBoolean(focused));}if($$self.$$.dirty[1]&/*readonly*/64){$$invalidate(27,isReadonly=toBoolean(readonly));}if($$self.$$.dirty[1]&/*error*/128){$$invalidate(29,isError=toBoolean(error));}if($$self.$$.dirty[1]&/*disabled*/8){$$invalidate(28,isDisabled=toBoolean(disabled));}if($$self.$$.dirty[0]&/*inputEl*/8388608|$$self.$$.dirty[1]&/*isFocused*/512){if(isFocused&&inputEl){setTimeout(()=>inputEl.focus(),1);}}if($$self.$$.dirty[0]&/*inputEl, type*/8388610){if(inputEl&&type==="search"){inputEl.addEventListener("search",e=>{onKeyUp(e);});}}};return [value,type,name,autocapitalize,placeholder,leadingicon,trailingicon,variant,testid,width,arialabel,arialabelledby,min,max,step,prefix,suffix,maxlength,id,mt,mr,mb,ml,inputEl,_rootEL,_leadingContentSlot,_trailingContentSlot,isReadonly,isDisabled,isError,handlesTrailingIconClick,onKeyUp,onFocus,onBlur,disabled,handletrailingiconclick,focused,readonly,error,debounce,isFocused,input_binding,div3_binding];}class Input extends SvelteElement{constructor(options){super();const style=document.createElement('style');style.textContent=`:host{box-sizing:border-box}.container{position:relative;width:100%;display:inline-block}@media screen and (max-width: 623px){@media not (max-color:2147477350){.container{width:var(--width)}}}@media not screen and (max-width: 623px){@media not (color:2147477350){.container{width:var(--width)}}}.goa-input,.goa-input *{box-sizing:border-box;line-height:normal}.goa-input{box-sizing:border-box;outline:none;transition:box-shadow 0.1s ease-in;border:1px solid var(--goa-color-greyscale-700);border-radius:var(--goa-border-radius-m);display:inline-flex;align-items:stretch;vertical-align:middle;min-width:100%;background-color:var(--goa-color-greyscale-white)}.goa-input:hover:not(.goa-input-leading-content):not(.goa-input-trailing-content){border-color:var(--goa-color-interactive-hover);box-shadow:0 0 0 var(--goa-border-width-m) var(--goa-color-interactive-hover)}.goa-input:active:not(.goa-input-leading-content):not(.goa-input-trailing-content),.goa-input:focus:not(.goa-input-leading-content):not(.goa-input-trailing-content),.goa-input:focus-within:not(.goa-input-leading-content):not(.goa-input-trailing-content){box-shadow:0 0 0 3px var(--goa-color-interactive-focus)}.goa-input.type--range{border:none}.goa-input.type--range:active,.goa-input.type--range:focus,.goa-input.type--range:focus-within{box-shadow:none}.goa-input-leading-icon{margin-left:0.75rem}.goa-input-trailing-icon{margin-right:var(--goa-space-s)}.goa-input-trailing-icon-button{margin-right:var(--goa-space-xs)}input{display:inline-block;color:var(--goa-color-text-default);font-size:var(--goa-font-size-4);padding:var(--goa-space-xs) var(--goa-space-s);line-height:calc(40px - calc(var(--goa-space-xs) * 2));background-color:transparent;width:100%;flex:1 1 auto;font-family:var(--goa-font-family-sans);z-index:1}input[readonly]{cursor:pointer}.goa-input-leading-icon+input{padding-left:0.5rem}input,input:focus,input:hover,input:active{outline:none;border:none}.goa-input--disabled,.goa-input--disabled:hover,.goa-input--disabled:active,.goa-input--disabled:focus{background-color:var(--goa-color-greyscale-100);border-color:var(--goa-color-greyscale-200) !important;cursor:default;box-shadow:none !important}.goa-input--disabled input,.goa-input--disabled input:hover,.goa-input--disabled input:active,.goa-input--disabled input:focus{color:var(--goa-color-text-secondary)}.goa-input--disabled input:hover{cursor:default !important}.prefix,.suffix,.leading-content ::slotted(div),.trailing-content ::slotted(div){background-color:var(--goa-color-greyscale-100);padding:0 0.75rem;display:flex;align-items:center}.leading-content ::slotted(div),.trailing-content ::slotted(div){padding:0.5rem 0.75rem}.prefix,.leading-content ::slotted(div){border-top-left-radius:var(--goa-border-radius-m);border-bottom-left-radius:var(--goa-border-radius-m);border-right:1px solid var(--goa-color-greyscale-700)}.suffix,.trailing-content ::slotted(div){border-top-right-radius:var(--goa-border-radius-m);border-bottom-right-radius:var(--goa-border-radius-m);border-left:1px solid var(--goa-color-greyscale-700)}.goa-input--disabled .prefix,.goa-input--disabled .leading-content ::slotted(div){border-right:1px solid var(--goa-color-greyscale-200)}.goa-input--disabled .suffix,.goa-input--disabled .trailing-content ::slotted(div){border-left:1px solid var(--goa-color-greyscale-200)}input.input--goa{display:block;border:none;flex:1 1 auto}.variant--bare{border:none}.variant--bare:focus,.variant--bare:active,.variant--bare:focus-within{box-shadow:none}.error:not(.goa-input-leading-content):not(.goa-input-trailing-content),.error:hover:not(.goa-input-leading-content):not(.goa-input-trailing-content){border:2px solid var(--goa-color-interactive-error);box-shadow:0 0 0 1px var(--goa-color-interactive-error)}.error:focus-within:hover:not(.goa-input-leading-content):not(.goa-input-trailing-content){border:2px solid var(--goa-color-interactive-error);box-shadow:0 0 0 3px var(--goa-color-interactive-focus)}.error .input-leading-content,.error .input-leading-content:hover,.error .input-trailing-content,.error .input-trailing-content:hover{outline:var(--goa-border-width-s) solid var(--goa-color-interactive-error);box-shadow:inset 0 0 0 var(--goa-border-width-m) var(--goa-color-interactive-error)}.error .input-leading-content:focus,.error .input-trailing-content:focus,.error .input-leading-content:active,.error .input-trailing-content:active{outline:var(--goa-border-width-s) solid var(--goa-color-interactive-error);box-shadow:0 0 0 var(--goa-border-width-l) var(--goa-color-interactive-focus)}.input-leading-content:hover,.input-trailing-content:hover{box-shadow:inset 0 0 0 var(--goa-border-width-m) var(--goa-color-interactive-hover);outline:var(--goa-border-width-s) solid var(--goa-color-interactive-hover)}.input-leading-content:active,.input-leading-content:focus,.input-leading-content:focus-within,.input-trailing-content:active,.input-trailing-content:focus,.input-trailing-content:focus-within{box-shadow:0 0 0 var(--goa-border-width-l) var(--goa-color-interactive-focus);outline:var(--goa-border-width-s) solid var(--goa-color-greyscale-700)}.error .input-trailing-content,.input-trailing-content:hover,.input-trailing-content:active,.input-trailing-content:focus,.input-trailing-content:focus-within{border-top-left-radius:var(--goa-border-radius-m);border-bottom-left-radius:var(--goa-border-radius-m)}.error .input-leading-content,.input-leading-content:hover,.input-leading-content:active,.input-leading-content:focus,.input-leading-content:focus-within{border-top-right-radius:var(--goa-border-radius-m);border-bottom-right-radius:var(--goa-border-radius-m)}.input-leading-content.input-trailing-content,.input-leading-content.input-trailing-content:hover,.input-leading-content.input-trailing-content:active,.input-leading-content.input-trailing-content:focus,.input-leading-content.input-trailing-content:focus-within{border-radius:0}input[type="search"]:enabled:read-write:-webkit-any(:focus, :hover)::-webkit-search-cancel-button{position:relative;right:var(--search-icon-offset);cursor:pointer;-webkit-appearance:none;height:1.2rem;width:1.2rem;background:url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path fill="%23333" d="M405 136.798L375.202 107 256 226.202 136.798 107 107 136.798 226.202 256 107 375.202 136.798 405 256 285.798 375.202 405 405 375.202 285.798 256z"/></svg>')
281
- center center no-repeat}`;this.shadowRoot.appendChild(style);init(this,{target:this.shadowRoot,props:attribute_to_object(this.attributes),customElement:true},instance$v,create_fragment$y,safe_not_equal,{type:1,name:2,value:0,autocapitalize:3,placeholder:4,leadingicon:5,trailingicon:6,variant:7,disabled:34,handletrailingiconclick:35,focused:36,readonly:37,error:38,testid:8,width:9,arialabel:10,arialabelledby:11,min:12,max:13,step:14,prefix:15,suffix:16,debounce:39,maxlength:17,id:18,mt:19,mr:20,mb:21,ml:22},null,[-1,-1]);if(options){if(options.target){insert(options.target,this,options.anchor);}if(options.props){this.$set(options.props);flush();}}}static get observedAttributes(){return ["type","name","value","autocapitalize","placeholder","leadingicon","trailingicon","variant","disabled","handletrailingiconclick","focused","readonly","error","testid","width","arialabel","arialabelledby","min","max","step","prefix","suffix","debounce","maxlength","id","mt","mr","mb","ml"];}get type(){return this.$$.ctx[1];}set type(type){this.$$set({type});flush();}get name(){return this.$$.ctx[2];}set name(name){this.$$set({name});flush();}get value(){return this.$$.ctx[0];}set value(value){this.$$set({value});flush();}get autocapitalize(){return this.$$.ctx[3];}set autocapitalize(autocapitalize){this.$$set({autocapitalize});flush();}get placeholder(){return this.$$.ctx[4];}set placeholder(placeholder){this.$$set({placeholder});flush();}get leadingicon(){return this.$$.ctx[5];}set leadingicon(leadingicon){this.$$set({leadingicon});flush();}get trailingicon(){return this.$$.ctx[6];}set trailingicon(trailingicon){this.$$set({trailingicon});flush();}get variant(){return this.$$.ctx[7];}set variant(variant){this.$$set({variant});flush();}get disabled(){return this.$$.ctx[34];}set disabled(disabled){this.$$set({disabled});flush();}get handletrailingiconclick(){return this.$$.ctx[35];}set handletrailingiconclick(handletrailingiconclick){this.$$set({handletrailingiconclick});flush();}get focused(){return this.$$.ctx[36];}set focused(focused){this.$$set({focused});flush();}get readonly(){return this.$$.ctx[37];}set readonly(readonly){this.$$set({readonly});flush();}get error(){return this.$$.ctx[38];}set error(error){this.$$set({error});flush();}get testid(){return this.$$.ctx[8];}set testid(testid){this.$$set({testid});flush();}get width(){return this.$$.ctx[9];}set width(width){this.$$set({width});flush();}get arialabel(){return this.$$.ctx[10];}set arialabel(arialabel){this.$$set({arialabel});flush();}get arialabelledby(){return this.$$.ctx[11];}set arialabelledby(arialabelledby){this.$$set({arialabelledby});flush();}get min(){return this.$$.ctx[12];}set min(min){this.$$set({min});flush();}get max(){return this.$$.ctx[13];}set max(max){this.$$set({max});flush();}get step(){return this.$$.ctx[14];}set step(step){this.$$set({step});flush();}get prefix(){return this.$$.ctx[15];}set prefix(prefix){this.$$set({prefix});flush();}get suffix(){return this.$$.ctx[16];}set suffix(suffix){this.$$set({suffix});flush();}get debounce(){return this.$$.ctx[39];}set debounce(debounce){this.$$set({debounce});flush();}get maxlength(){return this.$$.ctx[17];}set maxlength(maxlength){this.$$set({maxlength});flush();}get id(){return this.$$.ctx[18];}set id(id){this.$$set({id});flush();}get mt(){return this.$$.ctx[19];}set mt(mt){this.$$set({mt});flush();}get mr(){return this.$$.ctx[20];}set mr(mr){this.$$set({mr});flush();}get mb(){return this.$$.ctx[21];}set mb(mb){this.$$set({mb});flush();}get ml(){return this.$$.ctx[22];}set ml(ml){this.$$set({ml});flush();}}customElements.define("goa-input",Input);/* src/components/microsite-header/MicrositeHeader.svelte generated by Svelte v3.59.2 */function create_if_block_3$7(ctx){let div;let t0;let a;let t1;let a_target_value;return {c(){div=element("div");t0=text("An official site of the ");a=element("a");t1=text("Alberta Government");attr(a,"href","https://www.alberta.ca/index.aspx");attr(a,"target",a_target_value=`_${/*headerurltarget*/ctx[4]}`);attr(div,"data-testid","type");attr(div,"class","site-text");},m(target,anchor){insert(target,div,anchor);append(div,t0);append(div,a);append(a,t1);},p(ctx,dirty){if(dirty&/*headerurltarget*/16&&a_target_value!==(a_target_value=`_${/*headerurltarget*/ctx[4]}`)){attr(a,"target",a_target_value);}},d(detaching){if(detaching)detach(div);}};}// (37:4) {#if ["alpha", "beta"].includes(type)}
282
- function create_if_block_1$8(ctx){let div0;let t0_value=capitalize(/*type*/ctx[0])+"";let t0;let div0_class_value;let t1;let div1;let t2;let a;let t3;let a_target_value;let t4;let if_block=/*feedbackurl*/ctx[2]&&create_if_block_2$7(ctx);return {c(){div0=element("div");t0=text(t0_value);t1=space();div1=element("div");t2=text("This is a new ");a=element("a");t3=text("Alberta Government");t4=text(" service\n ");if(if_block)if_block.c();attr(div0,"data-testid","type");attr(div0,"class",div0_class_value="service-type service-type--"+/*type*/ctx[0].toLowerCase());attr(a,"href","https://www.alberta.ca/index.aspx");attr(a,"target",a_target_value=`_${/*headerurltarget*/ctx[4]}`);attr(div1,"data-testid","site-text");attr(div1,"class","site-text");},m(target,anchor){insert(target,div0,anchor);append(div0,t0);insert(target,t1,anchor);insert(target,div1,anchor);append(div1,t2);append(div1,a);append(a,t3);append(div1,t4);if(if_block)if_block.m(div1,null);},p(ctx,dirty){if(dirty&/*type*/1&&t0_value!==(t0_value=capitalize(/*type*/ctx[0])+""))set_data(t0,t0_value);if(dirty&/*type*/1&&div0_class_value!==(div0_class_value="service-type service-type--"+/*type*/ctx[0].toLowerCase())){attr(div0,"class",div0_class_value);}if(dirty&/*headerurltarget*/16&&a_target_value!==(a_target_value=`_${/*headerurltarget*/ctx[4]}`)){attr(a,"target",a_target_value);}if(/*feedbackurl*/ctx[2]){if(if_block){if_block.p(ctx,dirty);}else {if_block=create_if_block_2$7(ctx);if_block.c();if_block.m(div1,null);}}else if(if_block){if_block.d(1);if_block=null;}},d(detaching){if(detaching)detach(div0);if(detaching)detach(t1);if(detaching)detach(div1);if(if_block)if_block.d();}};}// (46:8) {#if feedbackurl}
283
- function create_if_block_2$7(ctx){let span;let t0;let a;let t1;let a_target_value;return {c(){span=element("span");t0=text("— help us improve it by giving ");a=element("a");t1=text("feedback");attr(a,"href",/*feedbackurl*/ctx[2]);attr(a,"target",a_target_value=`_${/*feedbackurltarget*/ctx[5]}`);attr(span,"data-testid","feedback");},m(target,anchor){insert(target,span,anchor);append(span,t0);append(span,a);append(a,t1);},p(ctx,dirty){if(dirty&/*feedbackurl*/4){attr(a,"href",/*feedbackurl*/ctx[2]);}if(dirty&/*feedbackurltarget*/32&&a_target_value!==(a_target_value=`_${/*feedbackurltarget*/ctx[5]}`)){attr(a,"target",a_target_value);}},d(detaching){if(detaching)detach(span);}};}// (52:4) {#if version}
284
- function create_if_block$i(ctx){let div;let t;return {c(){div=element("div");t=text(/*version*/ctx[1]);attr(div,"data-testid","version");attr(div,"class","version");},m(target,anchor){insert(target,div,anchor);append(div,t);},p(ctx,dirty){if(dirty&/*version*/2)set_data(t,/*version*/ctx[1]);},d(detaching){if(detaching)detach(div);}};}function create_fragment$x(ctx){let header;let div1;let t0;let show_if=["alpha","beta"].includes(/*type*/ctx[0]);let t1;let div0;let t2;let header_style_value;let if_block0=/*type*/ctx[0]==="live"&&create_if_block_3$7(ctx);let if_block1=show_if&&create_if_block_1$8(ctx);let if_block2=/*version*/ctx[1]&&create_if_block$i(ctx);return {c(){header=element("header");div1=element("div");if(if_block0)if_block0.c();t0=space();if(if_block1)if_block1.c();t1=space();div0=element("div");t2=space();if(if_block2)if_block2.c();this.c=noop;attr(div0,"class","spacer");attr(div1,"class","content-container");attr(header,"class","goa-official-site-header");attr(header,"style",header_style_value=`--max-content-width: ${/*maxcontentwidth*/ctx[3]}`);},m(target,anchor){insert(target,header,anchor);append(header,div1);if(if_block0)if_block0.m(div1,null);append(div1,t0);if(if_block1)if_block1.m(div1,null);append(div1,t1);append(div1,div0);append(div1,t2);if(if_block2)if_block2.m(div1,null);},p(ctx,[dirty]){if(/*type*/ctx[0]==="live"){if(if_block0){if_block0.p(ctx,dirty);}else {if_block0=create_if_block_3$7(ctx);if_block0.c();if_block0.m(div1,t0);}}else if(if_block0){if_block0.d(1);if_block0=null;}if(dirty&/*type*/1)show_if=["alpha","beta"].includes(/*type*/ctx[0]);if(show_if){if(if_block1){if_block1.p(ctx,dirty);}else {if_block1=create_if_block_1$8(ctx);if_block1.c();if_block1.m(div1,t1);}}else if(if_block1){if_block1.d(1);if_block1=null;}if(/*version*/ctx[1]){if(if_block2){if_block2.p(ctx,dirty);}else {if_block2=create_if_block$i(ctx);if_block2.c();if_block2.m(div1,null);}}else if(if_block2){if_block2.d(1);if_block2=null;}if(dirty&/*maxcontentwidth*/8&&header_style_value!==(header_style_value=`--max-content-width: ${/*maxcontentwidth*/ctx[3]}`)){attr(header,"style",header_style_value);}},i:noop,o:noop,d(detaching){if(detaching)detach(header);if(if_block0)if_block0.d();if(if_block1)if_block1.d();if(if_block2)if_block2.d();}};}function capitalize(val){if(!val||val&&val.length===0)return "";return val[0].toUpperCase()+val.slice(1);}function instance$u($$self,$$props,$$invalidate){const[Types,validateType]=typeValidator("Microsite header type",["live","alpha","beta"],true);let{type}=$$props;let{version=""}=$$props;let{feedbackurl=""}=$$props;let{maxcontentwidth="100%"}=$$props;let{headerurltarget="blank"}=$$props;let{feedbackurltarget="blank"}=$$props;// Validator
285
- const[UrlTarget,validateUrlTargetType]=typeValidator("URL target values",["self","blank"]);onMount(()=>{setTimeout(()=>validateType(type),1);validateUrlTargetType(headerurltarget);validateUrlTargetType(feedbackurltarget);});$$self.$$set=$$props=>{if('type'in $$props)$$invalidate(0,type=$$props.type);if('version'in $$props)$$invalidate(1,version=$$props.version);if('feedbackurl'in $$props)$$invalidate(2,feedbackurl=$$props.feedbackurl);if('maxcontentwidth'in $$props)$$invalidate(3,maxcontentwidth=$$props.maxcontentwidth);if('headerurltarget'in $$props)$$invalidate(4,headerurltarget=$$props.headerurltarget);if('feedbackurltarget'in $$props)$$invalidate(5,feedbackurltarget=$$props.feedbackurltarget);};return [type,version,feedbackurl,maxcontentwidth,headerurltarget,feedbackurltarget];}class MicrositeHeader extends SvelteElement{constructor(options){super();const style=document.createElement('style');style.textContent=`:host{box-sizing:border-box;font-family:var(--goa-font-family-sans)}a{color:var(--goa-color-interactive-default);cursor:pointer}a:hover{color:var(--goa-color-interactive-hover)}a:focus{outline-width:thin;outline-style:solid;outline-color:var(--goa-color-interactive-hover);outline-offset:0px}a[target="_blank"]::after{content:"";width:var(--goa-icon-size-s);height:var(--goa-icon-size-s);background-color:var(--goa-color-interactive-default);display:inline-block;margin-left:var(--goa-space-2xs);vertical-align:sub;mask:url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20class%3D%22ionicon%22%20viewBox%3D%220%200%20512%20512%22%3E%3Cpath%20d%3D%22M384%20224v184a40%2040%200%200%201-40%2040H104a40%2040%200%200%201-40-40V168a40%2040%200%200%201%2040-40h167.48M336%2064h112v112M224%20288%20440%2072%22%20fill%3D%22none%22%20stroke%3D%22currentColor%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%20stroke-width%3D%2232%22%2F%3E%3C%2Fsvg%3E")
286
- center bottom no-repeat;-webkit-mask:url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20class%3D%22ionicon%22%20viewBox%3D%220%200%20512%20512%22%3E%3Cpath%20d%3D%22M384%20224v184a40%2040%200%200%201-40%2040H104a40%2040%200%200%201-40-40V168a40%2040%200%200%201%2040-40h167.48M336%2064h112v112M224%20288%20440%2072%22%20fill%3D%22none%22%20stroke%3D%22currentColor%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%20stroke-width%3D%2232%22%2F%3E%3C%2Fsvg%3E")
287
- center bottom no-repeat}a[target="_blank"]:hover:after{background-color:var(--goa-color-interactive-hover)}.goa-official-site-header{font-size:var(--goa-font-size-2);background-color:var(--goa-color-greyscale-100);padding:0.5rem 1rem}.content-container{display:flex;align-items:start;justify-content:space-between;max-width:min(var(--max-content-width), 100%);margin:0 auto}@media screen and (max-width: 623px){@media not (max-color:2147477350){.goa-official-site-header{padding:0.25rem 2rem}.content-container{align-items:center}}}@media not screen and (max-width: 623px){@media not (color:2147477350){.goa-official-site-header{padding:0.25rem 2rem}.content-container{align-items:center}}}@media screen and (min-width: 1024px){.goa-official-site-header{padding:0.25rem 4.5rem}}.spacer{flex:1 1 auto}.version{color:var(--goa-color-text-secondary);padding-left:1rem;line-height:1.25rem}.service-type{font-weight:bold;padding:0.125rem 0.25rem;display:flex;margin-right:1rem;line-height:initial}.service-type--alpha{background-color:var(--goa-color-warning-default);color:var(--goa-color-text-default)}.service-type--beta{background-color:var(--goa-color-brand-default);color:var(--goa-color-text-light)}.site-text{color:var(--goa-color-text-default);line-height:1.25rem}`;this.shadowRoot.appendChild(style);init(this,{target:this.shadowRoot,props:attribute_to_object(this.attributes),customElement:true},instance$u,create_fragment$x,safe_not_equal,{type:0,version:1,feedbackurl:2,maxcontentwidth:3,headerurltarget:4,feedbackurltarget:5},null);if(options){if(options.target){insert(options.target,this,options.anchor);}if(options.props){this.$set(options.props);flush();}}}static get observedAttributes(){return ["type","version","feedbackurl","maxcontentwidth","headerurltarget","feedbackurltarget"];}get type(){return this.$$.ctx[0];}set type(type){this.$$set({type});flush();}get version(){return this.$$.ctx[1];}set version(version){this.$$set({version});flush();}get feedbackurl(){return this.$$.ctx[2];}set feedbackurl(feedbackurl){this.$$set({feedbackurl});flush();}get maxcontentwidth(){return this.$$.ctx[3];}set maxcontentwidth(maxcontentwidth){this.$$set({maxcontentwidth});flush();}get headerurltarget(){return this.$$.ctx[4];}set headerurltarget(headerurltarget){this.$$set({headerurltarget});flush();}get feedbackurltarget(){return this.$$.ctx[5];}set feedbackurltarget(feedbackurltarget){this.$$set({feedbackurltarget});flush();}}customElements.define("goa-microsite-header",MicrositeHeader);/* src/components/modal/Modal.svelte generated by Svelte v3.59.2 */function create_if_block$h(ctx){let goa_focus_trap;let div6;let div0;let t0;let div5;let t1;let div4;let header;let div1;let t2;let t3;let div2;let goa_scrollable;let t4;let div3;let div5_intro;let div5_outro;let div6_style_value;let noscroll_action;let div6_intro;let div6_outro;let current;let mounted;let dispose;let if_block0=/*calloutvariant*/ctx[3]!==null&&create_if_block_3$6(ctx);function select_block_type(ctx,dirty){if(/*heading*/ctx[1])return create_if_block_2$6;return create_else_block$8;}let current_block_type=select_block_type(ctx);let if_block1=current_block_type(ctx);let if_block2=/*_isClosable*/ctx[9]&&create_if_block_1$7(ctx);return {c(){goa_focus_trap=element("goa-focus-trap");div6=element("div");div0=element("div");t0=space();div5=element("div");if(if_block0)if_block0.c();t1=space();div4=element("div");header=element("header");div1=element("div");if_block1.c();t2=space();if(if_block2)if_block2.c();t3=space();div2=element("div");goa_scrollable=element("goa-scrollable");goa_scrollable.innerHTML=`<slot></slot>`;t4=space();div3=element("div");div3.innerHTML=`<slot name="actions"></slot>`;attr(div0,"data-testid","modal-overlay");attr(div0,"class","modal-overlay");attr(div1,"data-testid","modal-title");attr(div1,"class","modal-title");set_custom_element_data(goa_scrollable,"direction","vertical");set_custom_element_data(goa_scrollable,"hpadding","1.9rem");set_custom_element_data(goa_scrollable,"maxheight","70vh");attr(div2,"data-testid","modal-content");attr(div2,"class","modal-content");attr(div3,"class","modal-actions");attr(div3,"data-testid","modal-actions");attr(div4,"class","content");attr(div5,"class","modal-pane");attr(div6,"data-testid","modal");attr(div6,"class","modal");attr(div6,"style",div6_style_value=`--maxwidth: ${/*maxwidth*/ctx[0]};`);set_custom_element_data(goa_focus_trap,"open",/*open*/ctx[2]);},m(target,anchor){insert(target,goa_focus_trap,anchor);append(goa_focus_trap,div6);append(div6,div0);append(div6,t0);append(div6,div5);if(if_block0)if_block0.m(div5,null);append(div5,t1);append(div5,div4);append(div4,header);append(header,div1);if_block1.m(div1,null);append(header,t2);if(if_block2)if_block2.m(header,null);/*header_binding*/ctx[17](header);append(div4,t3);append(div4,div2);append(div2,goa_scrollable);/*goa_scrollable_binding*/ctx[18](goa_scrollable);/*div2_binding*/ctx[19](div2);append(div4,t4);append(div4,div3);/*div6_binding*/ctx[20](div6);current=true;if(!mounted){dispose=[listen(div0,"click",/*close*/ctx[12]),listen(goa_scrollable,"_scroll",/*handleScroll*/ctx[13]),action_destroyer(noscroll_action=noscroll.call(null,div6,{enable:/*_isOpen*/ctx[7]}))];mounted=true;}},p(new_ctx,dirty){ctx=new_ctx;if(/*calloutvariant*/ctx[3]!==null){if(if_block0){if_block0.p(ctx,dirty);}else {if_block0=create_if_block_3$6(ctx);if_block0.c();if_block0.m(div5,t1);}}else if(if_block0){if_block0.d(1);if_block0=null;}if(current_block_type===(current_block_type=select_block_type(ctx))&&if_block1){if_block1.p(ctx,dirty);}else {if_block1.d(1);if_block1=current_block_type(ctx);if(if_block1){if_block1.c();if_block1.m(div1,null);}}if(/*_isClosable*/ctx[9]){if(if_block2){if_block2.p(ctx,dirty);}else {if_block2=create_if_block_1$7(ctx);if_block2.c();if_block2.m(header,null);}}else if(if_block2){if_block2.d(1);if_block2=null;}if(!current||dirty&/*maxwidth*/1&&div6_style_value!==(div6_style_value=`--maxwidth: ${/*maxwidth*/ctx[0]};`)){attr(div6,"style",div6_style_value);}if(noscroll_action&&is_function(noscroll_action.update)&&dirty&/*_isOpen*/128)noscroll_action.update.call(null,{enable:/*_isOpen*/ctx[7]});if(!current||dirty&/*open*/4){set_custom_element_data(goa_focus_trap,"open",/*open*/ctx[2]);}},i(local){if(current)return;add_render_callback(()=>{if(!current)return;if(div5_outro)div5_outro.end(1);div5_intro=create_in_transition(div5,fly,{duration:/*_transitionTime*/ctx[11],y:200});div5_intro.start();});add_render_callback(()=>{if(!current)return;if(div6_outro)div6_outro.end(1);div6_intro=create_in_transition(div6,fade,{duration:/*_transitionTime*/ctx[11]});div6_intro.start();});current=true;},o(local){if(div5_intro)div5_intro.invalidate();div5_outro=create_out_transition(div5,fly,{delay:/*_transitionTime*/ctx[11],duration:/*_transitionTime*/ctx[11],y:-100});if(div6_intro)div6_intro.invalidate();div6_outro=create_out_transition(div6,fade,{delay:/*_transitionTime*/ctx[11],duration:/*_transitionTime*/ctx[11]});current=false;},d(detaching){if(detaching)detach(goa_focus_trap);if(if_block0)if_block0.d();if_block1.d();if(if_block2)if_block2.d();/*header_binding*/ctx[17](null);/*goa_scrollable_binding*/ctx[18](null);/*div2_binding*/ctx[19](null);if(detaching&&div5_outro)div5_outro.end();/*div6_binding*/ctx[20](null);if(detaching&&div6_outro)div6_outro.end();mounted=false;run_all(dispose);}};}// (143:8) {#if calloutvariant !== null}
288
- function create_if_block_3$6(ctx){let div;let goa_icon;let goa_icon_inverted_value;let div_class_value;return {c(){div=element("div");goa_icon=element("goa-icon");set_custom_element_data(goa_icon,"type",/*_iconType*/ctx[10]);set_custom_element_data(goa_icon,"inverted",goa_icon_inverted_value=/*calloutvariant*/ctx[3]==="important"?"false":"true");attr(div,"class",div_class_value="callout-bar "+/*calloutvariant*/ctx[3]);},m(target,anchor){insert(target,div,anchor);append(div,goa_icon);},p(ctx,dirty){if(dirty&/*_iconType*/1024){set_custom_element_data(goa_icon,"type",/*_iconType*/ctx[10]);}if(dirty&/*calloutvariant*/8&&goa_icon_inverted_value!==(goa_icon_inverted_value=/*calloutvariant*/ctx[3]==="important"?"false":"true")){set_custom_element_data(goa_icon,"inverted",goa_icon_inverted_value);}if(dirty&/*calloutvariant*/8&&div_class_value!==(div_class_value="callout-bar "+/*calloutvariant*/ctx[3])){attr(div,"class",div_class_value);}},d(detaching){if(detaching)detach(div);}};}// (156:14) {:else}
289
- function create_else_block$8(ctx){let slot;return {c(){slot=element("slot");attr(slot,"name","heading");},m(target,anchor){insert(target,slot,anchor);},p:noop,d(detaching){if(detaching)detach(slot);}};}// (154:14) {#if heading}
290
- function create_if_block_2$6(ctx){let t;return {c(){t=text(/*heading*/ctx[1]);},m(target,anchor){insert(target,t,anchor);},p(ctx,dirty){if(dirty&/*heading*/2)set_data(t,/*heading*/ctx[1]);},d(detaching){if(detaching)detach(t);}};}// (160:12) {#if _isClosable}
291
- function create_if_block_1$7(ctx){let div;let goa_icon_button;let mounted;let dispose;return {c(){div=element("div");goa_icon_button=element("goa-icon-button");set_custom_element_data(goa_icon_button,"data-testid","modal-close-button");set_custom_element_data(goa_icon_button,"icon","close");set_custom_element_data(goa_icon_button,"variant","nocolor");attr(div,"class","modal-close");},m(target,anchor){insert(target,div,anchor);append(div,goa_icon_button);if(!mounted){dispose=listen(goa_icon_button,"click",/*close*/ctx[12]);mounted=true;}},p:noop,d(detaching){if(detaching)detach(div);mounted=false;dispose();}};}function create_fragment$w(ctx){let if_block_anchor;let current;let if_block=/*_isOpen*/ctx[7]&&create_if_block$h(ctx);return {c(){if(if_block)if_block.c();if_block_anchor=empty();this.c=noop;},m(target,anchor){if(if_block)if_block.m(target,anchor);insert(target,if_block_anchor,anchor);current=true;},p(ctx,[dirty]){if(/*_isOpen*/ctx[7]){if(if_block){if_block.p(ctx,dirty);if(dirty&/*_isOpen*/128){transition_in(if_block,1);}}else {if_block=create_if_block$h(ctx);if_block.c();transition_in(if_block,1);if_block.m(if_block_anchor.parentNode,if_block_anchor);}}else if(if_block){group_outros();transition_out(if_block,1,1,()=>{if_block=null;});check_outros();}},i(local){if(current)return;transition_in(if_block);current=true;},o(local){transition_out(if_block);current=false;},d(detaching){if(if_block)if_block.d(detaching);if(detaching)detach(if_block_anchor);}};}function instance$t($$self,$$props,$$invalidate){let _isClosable;let _transitionTime;let _iconType;let{heading=""}=$$props;let{closable="false"}=$$props;let{open="false"}=$$props;let{transition="none"}=$$props;let{calloutvariant=null}=$$props;let{maxwidth="60ch"}=$$props;let{width=""}=$$props;// Private
292
- let _rootEl=null;let _contentEl=null;let _scrollEl=null;let _headerEl=null;// Type verification
293
- const[CALLOUT_VARIANT,validateCalloutVariant]=typeValidator("Callout variant",["emergency","important","information","success","event"]);const[Transitions,validateTransition]=typeValidator("Modal transition",["fast","slow","none"]);// Moving the reactive var into a timeout prevents accessing null stylesheet
294
- // reference to allow for creation of the @keyframes for the in:fade and out:fade transitions.
295
- // DDIDS-1288
296
- let _isOpen=false;// Hooks
297
- onMount(async()=>{await tick();validateCalloutVariant(calloutvariant);validateTransition(transition);if(width){$$invalidate(0,maxwidth=width);console.warn("`width` is deprecated. Please use `maxwidth` instead.");}});// Functions
298
- function close(e){if(!_isClosable){return;}_rootEl===null||_rootEl===void 0?void 0:_rootEl.dispatchEvent(new CustomEvent("_close",{composed:true}));e.stopPropagation();}const onInputKeyDown=e=>{switch(e.key){case"Escape":close(e);e.preventDefault();break;}};function handleScroll(e){const hasScroll=e.detail.scrollHeight>e.detail.offsetHeight;if(_isOpen&&hasScroll){const atTop=e.detail.scrollTop==0;const atBottom=Math.abs(e.detail.scrollHeight-e.detail.scrollTop-e.detail.offsetHeight)<1;_contentEl.classList.remove("scroll-top","scroll-bottom","scroll-middle");if(atTop){_contentEl.classList.add("scroll-top");}else if(atBottom){_contentEl.classList.add("scroll-bottom");}else {_contentEl.classList.add("scroll-middle");}}}function getChildren(){const slot=_headerEl.querySelector("slot");if(slot){return [...slot.assignedElements()];}else {return [..._headerEl.children];// unit tests
299
- }}function header_binding($$value){binding_callbacks[$$value?'unshift':'push'](()=>{_headerEl=$$value;($$invalidate(6,_headerEl),$$invalidate(7,_isOpen)),$$invalidate(2,open);});}function goa_scrollable_binding($$value){binding_callbacks[$$value?'unshift':'push'](()=>{_scrollEl=$$value;($$invalidate(5,_scrollEl),$$invalidate(7,_isOpen)),$$invalidate(2,open);});}function div2_binding($$value){binding_callbacks[$$value?'unshift':'push'](()=>{_contentEl=$$value;($$invalidate(4,_contentEl),$$invalidate(7,_isOpen)),$$invalidate(2,open);});}function div6_binding($$value){binding_callbacks[$$value?'unshift':'push'](()=>{_rootEl=$$value;($$invalidate(8,_rootEl),$$invalidate(7,_isOpen)),$$invalidate(2,open);});}$$self.$$set=$$props=>{if('heading'in $$props)$$invalidate(1,heading=$$props.heading);if('closable'in $$props)$$invalidate(14,closable=$$props.closable);if('open'in $$props)$$invalidate(2,open=$$props.open);if('transition'in $$props)$$invalidate(15,transition=$$props.transition);if('calloutvariant'in $$props)$$invalidate(3,calloutvariant=$$props.calloutvariant);if('maxwidth'in $$props)$$invalidate(0,maxwidth=$$props.maxwidth);if('width'in $$props)$$invalidate(16,width=$$props.width);};$$self.$$.update=()=>{if($$self.$$.dirty&/*closable*/16384){// Reactive
300
- $$invalidate(9,_isClosable=toBoolean(closable));}if($$self.$$.dirty&/*open*/4){setTimeout(()=>$$invalidate(7,_isOpen=toBoolean(open)),1);}if($$self.$$.dirty&/*_isOpen*/128){if(!_isOpen){// prevent null issues
301
- $$invalidate(4,_contentEl=$$invalidate(5,_scrollEl=$$invalidate(8,_rootEl=$$invalidate(6,_headerEl=null))));window.removeEventListener('keydown',onInputKeyDown);}}if($$self.$$.dirty&/*_isOpen, _scrollEl, _contentEl*/176){if(_isOpen&&_scrollEl&&_contentEl){const hasScroll=_scrollEl.scrollHeight>_scrollEl.offsetHeight;if(hasScroll){_contentEl.classList.add("scroll-top");}}}if($$self.$$.dirty&/*_isOpen, _contentEl, _headerEl*/208){if(_isOpen&&_contentEl){window.addEventListener('keydown',onInputKeyDown);const children=getChildren();if(_headerEl.querySelector("div.modal-title").textContent||_headerEl.querySelector("div.modal-close")||children.length){_headerEl.classList.add("has-content");}}}if($$self.$$.dirty&/*transition*/32768){$$invalidate(11,_transitionTime=transition==="none"?0:transition==="slow"?400:200);}if($$self.$$.dirty&/*calloutvariant*/8){$$invalidate(10,_iconType=calloutvariant==="emergency"?"warning":calloutvariant==="important"?"alert-circle":calloutvariant==="information"?"information-circle":calloutvariant==="success"?"checkmark-circle":calloutvariant==="event"?"calendar":"");}};return [maxwidth,heading,open,calloutvariant,_contentEl,_scrollEl,_headerEl,_isOpen,_rootEl,_isClosable,_iconType,_transitionTime,close,handleScroll,closable,transition,width,header_binding,goa_scrollable_binding,div2_binding,div6_binding];}class Modal extends SvelteElement{constructor(options){super();const style=document.createElement('style');style.textContent=`:host{box-sizing:border-box;font-family:var(--goa-font-family-sans)}:host *{box-sizing:border-box}.modal{font-family:var(--goa-font-family-sans);position:fixed;inset:0;display:flex;align-items:center;justify-content:center;height:100vh;width:100%;z-index:100}.modal-overlay{position:absolute;top:0;left:0;width:100%;height:100%;background-color:rgba(0, 0, 0, 0.2);z-index:1000}.emergency{background-color:var(--goa-color-emergency-default)}.important{background-color:var(--goa-color-warning-default)}.information{background-color:var(--goa-color-info-default)}.event{background-color:var(--goa-color-info-default)}.success{background-color:var(--goa-color-success-default)}.callout-bar{flex:0 0 3rem;text-align:center;padding-top:2rem;border-radius:4px 0px 0px 4px}.content{flex:1 1 auto;width:100%;margin:var(--goa-space-xl)}.content header{display:flex;justify-content:space-between}.content header.has-content{margin-bottom:var(--goa-space-l)}@media screen and (max-width: 623px){.content{margin:var(--goa-space-l)}.content header.has-content{margin-bottom:var(--goa-space-m)}.modal-actions ::slotted(*){padding:var(--goa-space-l) 0 0}}@media screen and (min-width: 1024px){.modal-pane{max-width:var(--maxwidth)}}.modal-pane{background-color:#fff;z-index:1001;width:90%;display:flex;box-shadow:var(--goa-shadow-modal);border-radius:4px;border:1px solid var(--goa-color-greyscale-700)}.modal-actions ::slotted(*){padding:var(--goa-space-xl) 0 0}.modal-content{margin:0 -2rem;line-height:1.75rem}.modal-content ::slotted(:last-child){margin-bottom:0 !important}.modal-title{font:var(--goa-typography-heading-m)}.modal-close{padding-left:var(--goa-space-m);margin-top:var(--goa-space-2xs)}.scroll-top{box-shadow:inset 0px -8px 6px -6px rgba(0, 0, 0, 0.1)}.scroll-middle{box-shadow:inset 0px -8px 6px -6px rgba(0, 0, 0, 0.1), inset 0px 8px 6px -6px rgba(0, 0, 0, 0.1)}.scroll-bottom{box-shadow:inset 0px 8px 6px -6px rgba(0, 0, 0, 0.1)}`;this.shadowRoot.appendChild(style);init(this,{target:this.shadowRoot,props:attribute_to_object(this.attributes),customElement:true},instance$t,create_fragment$w,safe_not_equal,{heading:1,closable:14,open:2,transition:15,calloutvariant:3,maxwidth:0,width:16},null);if(options){if(options.target){insert(options.target,this,options.anchor);}if(options.props){this.$set(options.props);flush();}}}static get observedAttributes(){return ["heading","closable","open","transition","calloutvariant","maxwidth","width"];}get heading(){return this.$$.ctx[1];}set heading(heading){this.$$set({heading});flush();}get closable(){return this.$$.ctx[14];}set closable(closable){this.$$set({closable});flush();}get open(){return this.$$.ctx[2];}set open(open){this.$$set({open});flush();}get transition(){return this.$$.ctx[15];}set transition(transition){this.$$set({transition});flush();}get calloutvariant(){return this.$$.ctx[3];}set calloutvariant(calloutvariant){this.$$set({calloutvariant});flush();}get maxwidth(){return this.$$.ctx[0];}set maxwidth(maxwidth){this.$$set({maxwidth});flush();}get width(){return this.$$.ctx[16];}set width(width){this.$$set({width});flush();}}customElements.define("goa-modal",Modal);/* src/components/notification/Notification.svelte generated by Svelte v3.59.2 */function create_if_block$g(ctx){let div4;let div3;let div0;let goa_icon0;let goa_icon0_inverted_value;let t0;let div1;let t1;let div2;let button;let goa_icon1;let goa_icon1_inverted_value;let div4_class_value;let div4_style_value;let div4_transition;let current;let mounted;let dispose;return {c(){div4=element("div");div3=element("div");div0=element("div");goa_icon0=element("goa-icon");t0=space();div1=element("div");div1.innerHTML=`<slot></slot>`;t1=space();div2=element("div");button=element("button");goa_icon1=element("goa-icon");set_custom_element_data(goa_icon0,"type",/*iconType*/ctx[4]);set_custom_element_data(goa_icon0,"inverted",goa_icon0_inverted_value=/*type*/ctx[0]==="important"?"false":"true");attr(div0,"class","icon");attr(div1,"class","content");set_custom_element_data(goa_icon1,"type","close");set_custom_element_data(goa_icon1,"inverted",goa_icon1_inverted_value=/*type*/ctx[0]==="important"?"false":"true");attr(button,"class",/*type*/ctx[0]);attr(div2,"class","close");attr(div3,"class","content-container");attr(div3,"role","alert");attr(div3,"aria-live",/*arialive*/ctx[2]);attr(div3,"aria-atomic","true");attr(div4,"class",div4_class_value="notification "+/*type*/ctx[0]);attr(div4,"style",div4_style_value=`--max-content-width: ${/*maxcontentwidth*/ctx[1]}`);},m(target,anchor){insert(target,div4,anchor);append(div4,div3);append(div3,div0);append(div0,goa_icon0);append(div3,t0);append(div3,div1);append(div3,t1);append(div3,div2);append(div2,button);append(button,goa_icon1);current=true;if(!mounted){dispose=listen(button,"click",/*close*/ctx[5]);mounted=true;}},p(ctx,dirty){if(!current||dirty&/*iconType*/16){set_custom_element_data(goa_icon0,"type",/*iconType*/ctx[4]);}if(!current||dirty&/*type*/1&&goa_icon0_inverted_value!==(goa_icon0_inverted_value=/*type*/ctx[0]==="important"?"false":"true")){set_custom_element_data(goa_icon0,"inverted",goa_icon0_inverted_value);}if(!current||dirty&/*type*/1&&goa_icon1_inverted_value!==(goa_icon1_inverted_value=/*type*/ctx[0]==="important"?"false":"true")){set_custom_element_data(goa_icon1,"inverted",goa_icon1_inverted_value);}if(!current||dirty&/*type*/1){attr(button,"class",/*type*/ctx[0]);}if(!current||dirty&/*arialive*/4){attr(div3,"aria-live",/*arialive*/ctx[2]);}if(!current||dirty&/*type*/1&&div4_class_value!==(div4_class_value="notification "+/*type*/ctx[0])){attr(div4,"class",div4_class_value);}if(!current||dirty&/*maxcontentwidth*/2&&div4_style_value!==(div4_style_value=`--max-content-width: ${/*maxcontentwidth*/ctx[1]}`)){attr(div4,"style",div4_style_value);}},i(local){if(current)return;add_render_callback(()=>{if(!current)return;if(!div4_transition)div4_transition=create_bidirectional_transition(div4,fade,{},true);div4_transition.run(1);});current=true;},o(local){if(!div4_transition)div4_transition=create_bidirectional_transition(div4,fade,{},false);div4_transition.run(0);current=false;},d(detaching){if(detaching)detach(div4);if(detaching&&div4_transition)div4_transition.end();mounted=false;dispose();}};}function create_fragment$v(ctx){let if_block_anchor;let current;let if_block=/*show*/ctx[3]&&create_if_block$g(ctx);return {c(){if(if_block)if_block.c();if_block_anchor=empty();this.c=noop;},m(target,anchor){if(if_block)if_block.m(target,anchor);insert(target,if_block_anchor,anchor);current=true;},p(ctx,[dirty]){if(/*show*/ctx[3]){if(if_block){if_block.p(ctx,dirty);if(dirty&/*show*/8){transition_in(if_block,1);}}else {if_block=create_if_block$g(ctx);if_block.c();transition_in(if_block,1);if_block.m(if_block_anchor.parentNode,if_block_anchor);}}else if(if_block){group_outros();transition_out(if_block,1,1,()=>{if_block=null;});check_outros();}},i(local){if(current)return;transition_in(if_block);current=true;},o(local){transition_out(if_block);current=false;},d(detaching){if(if_block)if_block.d(detaching);if(detaching)detach(if_block_anchor);}};}function instance$s($$self,$$props,$$invalidate){let iconType;const[Types,validateType]=typeValidator("Notification type",["emergency","important","information","event"],true);const[AriaLiveTypes,validateAriaLiveType]=typeValidator("Aria-Live type",["assertive","off","polite"],true);let{type=""}=$$props;let{maxcontentwidth="100%"}=$$props;let{arialive="polite"}=$$props;let show=true;onMount(()=>{validateAriaLiveType(arialive);setTimeout(()=>validateType(type),1);});function close(e){$$invalidate(3,show=false);e.target.dispatchEvent(new CustomEvent("_dismiss",{composed:true}));e.stopPropagation();}$$self.$$set=$$props=>{if('type'in $$props)$$invalidate(0,type=$$props.type);if('maxcontentwidth'in $$props)$$invalidate(1,maxcontentwidth=$$props.maxcontentwidth);if('arialive'in $$props)$$invalidate(2,arialive=$$props.arialive);};$$self.$$.update=()=>{if($$self.$$.dirty&/*type*/1){$$invalidate(4,iconType=type==="emergency"?"warning":type==="important"?"alert-circle":type==="information"?"information-circle":type==="event"?"calendar":"");}};return [type,maxcontentwidth,arialive,show,iconType,close];}class Notification extends SvelteElement{constructor(options){super();const style=document.createElement('style');style.textContent=`:host{box-sizing:border-box;font-family:var(--goa-font-family-sans)}.notification{padding:var(--goa-space-l) var(--goa-space-m);display:flex}@media screen and (max-width: 623px){@media not (max-color:2147477350){.notification{padding:var(--goa-space-l) var(--goa-space-xl)}}}@media not screen and (max-width: 623px){@media not (color:2147477350){.notification{padding:var(--goa-space-l) var(--goa-space-xl)}}}@media screen and (min-width: 1024px){.notification{padding:var(--goa-space-l) calc(3 * var(--goa-space-l))}}.emergency{background-color:var(--goa-color-emergency-default);color:var(--goa-color-text-light)}.important{background-color:var(--goa-color-warning-default);color:var(--goa-color-text-default)}.information,.event{background-color:var(--goa-color-info-default);color:var(--goa-color-text-light)}.icon{flex:0 0 auto}.content-container{display:flex;flex-direction:row;flex:1 1 auto;gap:var(--goa-space-m);margin:0 auto;max-width:min(var(--max-content-width), 100%)}.content{flex:1 1 auto}::slotted(a){color:unset !important;outline:unset !important}::slotted(a:focus){outline:auto!important;border-radius:var(--goa-border-radius-m)}.notification.important ::slotted(a:focus){outline:unset!important;box-shadow:0 0 0 3px var(--goa-color-greyscale-black);border-radius:var(--goa-border-radius-m)}.close{flex:0 0 auto}.close button{background-color:transparent;border:none;cursor:pointer;padding:var(--goa-space-2xs);margin:0;outline:none;border-radius:var(--goa-border-radius-m);display:inline-flex}.close button.information:hover,.close button.information:focus,.close button.event:hover,.close button.event:focus{background-color:var(--goa-color-info-dark)}.close button.information:focus,.close button.event:focus{box-shadow:0 0 0 3px var(--goa-color-greyscale-white)}.close button.important:hover,.close button.important:focus{background-color:var(--goa-color-warning-dark)}.close button.important:focus{box-shadow:0 0 0 3px var(--goa-color-greyscale-black)}.close button.emergency:hover,.close button.emergency:focus{background-color:var(--goa-color-emergency-dark)}.close button.emergency:focus{box-shadow:0 0 0 3px var(--goa-color-greyscale-white)}`;this.shadowRoot.appendChild(style);init(this,{target:this.shadowRoot,props:attribute_to_object(this.attributes),customElement:true},instance$s,create_fragment$v,safe_not_equal,{type:0,maxcontentwidth:1,arialive:2},null);if(options){if(options.target){insert(options.target,this,options.anchor);}if(options.props){this.$set(options.props);flush();}}}static get observedAttributes(){return ["type","maxcontentwidth","arialive"];}get type(){return this.$$.ctx[0];}set type(type){this.$$set({type});flush();}get maxcontentwidth(){return this.$$.ctx[1];}set maxcontentwidth(maxcontentwidth){this.$$set({maxcontentwidth});flush();}get arialive(){return this.$$.ctx[2];}set arialive(arialive){this.$$set({arialive});flush();}}customElements.define("goa-notification",Notification);const dimensionRegex=/^[1-9]+[0-9]*(px|em|rem|ch|vh|vw|%)$/;function isValidDimension(value){return dimensionRegex.test(value);}/* src/components/page-block/PageBlock.svelte generated by Svelte v3.59.2 */function create_fragment$u(ctx){let div;let slot;let div_style_value;return {c(){div=element("div");slot=element("slot");this.c=noop;attr(div,"class","page-content");attr(div,"style",div_style_value=`--max-width: ${/*_width*/ctx[0]}`);},m(target,anchor){insert(target,div,anchor);append(div,slot);},p(ctx,[dirty]){if(dirty&/*_width*/1&&div_style_value!==(div_style_value=`--max-width: ${/*_width*/ctx[0]}`)){attr(div,"style",div_style_value);}},i:noop,o:noop,d(detaching){if(detaching)detach(div);}};}function instance$r($$self,$$props,$$invalidate){const Sizes={"full":"100%"};let{width}=$$props;let{_width}=$$props;function isValidSize(value){if(["full"].includes(width))return true;if(isValidDimension(value))return true;return false;}onMount(()=>{if(!isValidSize(width)){console.error("Invalid PageBlock width");}$$invalidate(0,_width=Sizes[width]||width);});$$self.$$set=$$props=>{if('width'in $$props)$$invalidate(1,width=$$props.width);if('_width'in $$props)$$invalidate(0,_width=$$props._width);};return [_width,width];}class PageBlock extends SvelteElement{constructor(options){super();const style=document.createElement('style');style.textContent=`:host{box-sizing:border-box;font-family:var(--goa-font-family-sans)}.page-content{max-width:var(--max-width);margin:0 auto;padding:0 1rem}@media screen and (max-width: 623px){@media not (max-color:2147477350){.page-content{padding:0 2rem}}}@media not screen and (max-width: 623px){@media not (color:2147477350){.page-content{padding:0 2rem}}}@media screen and (min-width: 1024px){.page-content{padding:0 4.5rem}}`;this.shadowRoot.appendChild(style);init(this,{target:this.shadowRoot,props:attribute_to_object(this.attributes),customElement:true},instance$r,create_fragment$u,safe_not_equal,{width:1,_width:0},null);if(options){if(options.target){insert(options.target,this,options.anchor);}if(options.props){this.$set(options.props);flush();}}}static get observedAttributes(){return ["width","_width"];}get width(){return this.$$.ctx[1];}set width(width){this.$$set({width});flush();}get _width(){return this.$$.ctx[0];}set _width(_width){this.$$set({_width});flush();}}customElements.define("goa-page-block",PageBlock);/* src/components/pagination/Pagination.svelte generated by Svelte v3.59.2 */function get_each_context$5(ctx,list,i){const child_ctx=ctx.slice();child_ctx[18]=list[i];child_ctx[20]=i;return child_ctx;}// (78:4) {#if variant === "all"}
302
- function create_if_block$f(ctx){let goa_block;let span0;let t1;let input;let t2;let goa_dropdown;let t3;let span1;let t4;let t5;let each_value={length:/*_pageCount*/ctx[8]};let each_blocks=[];for(let i=0;i<each_value.length;i+=1){each_blocks[i]=create_each_block$5(get_each_context$5(ctx,each_value,i));}return {c(){goa_block=element("goa-block");span0=element("span");span0.textContent="Page";t1=space();input=element("input");t2=space();goa_dropdown=element("goa-dropdown");for(let i=0;i<each_blocks.length;i+=1){each_blocks[i].c();}t3=space();span1=element("span");t4=text("of ");t5=text(/*_pageCount*/ctx[8]);attr(input,"type","hidden");set_custom_element_data(goa_dropdown,"value",/*pagenumber*/ctx[0]);set_custom_element_data(goa_block,"data-testid","page-selector");set_custom_element_data(goa_block,"alignment","center");set_custom_element_data(goa_block,"gap","s");},m(target,anchor){insert(target,goa_block,anchor);append(goa_block,span0);append(goa_block,t1);append(goa_block,input);/*input_binding*/ctx[12](input);append(goa_block,t2);append(goa_block,goa_dropdown);for(let i=0;i<each_blocks.length;i+=1){if(each_blocks[i]){each_blocks[i].m(goa_dropdown,null);}}/*goa_dropdown_binding*/ctx[13](goa_dropdown);append(goa_block,t3);append(goa_block,span1);append(span1,t4);append(span1,t5);},p(ctx,dirty){if(dirty&/*_pageCount*/256){each_value={length:/*_pageCount*/ctx[8]};let i;for(i=0;i<each_value.length;i+=1){const child_ctx=get_each_context$5(ctx,each_value,i);if(each_blocks[i]){each_blocks[i].p(child_ctx,dirty);}else {each_blocks[i]=create_each_block$5(child_ctx);each_blocks[i].c();each_blocks[i].m(goa_dropdown,null);}}for(;i<each_blocks.length;i+=1){each_blocks[i].d(1);}each_blocks.length=each_value.length;}if(dirty&/*pagenumber*/1){set_custom_element_data(goa_dropdown,"value",/*pagenumber*/ctx[0]);}if(dirty&/*_pageCount*/256)set_data(t5,/*_pageCount*/ctx[8]);},d(detaching){if(detaching)detach(goa_block);/*input_binding*/ctx[12](null);destroy_each(each_blocks,detaching);/*goa_dropdown_binding*/ctx[13](null);}};}// (83:10) {#each {length: _pageCount} as _, i}
303
- function create_each_block$5(ctx){let goa_dropdown_item;return {c(){goa_dropdown_item=element("goa-dropdown-item");set_custom_element_data(goa_dropdown_item,"value",/*i*/ctx[20]+1);set_custom_element_data(goa_dropdown_item,"label",/*i*/ctx[20]+1);},m(target,anchor){insert(target,goa_dropdown_item,anchor);},p:noop,d(detaching){if(detaching)detach(goa_dropdown_item);}};}function create_fragment$t(ctx){let goa_block1;let div;let t0;let goa_block0;let goa_button0;let t1;let goa_button0_disabled_value;let t2;let goa_button1;let t3;let goa_button1_disabled_value;let mounted;let dispose;let if_block=/*variant*/ctx[1]==="all"&&create_if_block$f(ctx);return {c(){goa_block1=element("goa-block");div=element("div");if(if_block)if_block.c();t0=space();goa_block0=element("goa-block");goa_button0=element("goa-button");t1=text("Previous");t2=space();goa_button1=element("goa-button");t3=text("Next");this.c=noop;set_custom_element_data(goa_button0,"type","tertiary");set_custom_element_data(goa_button0,"leadingicon","arrow-back");set_custom_element_data(goa_button0,"disabled",goa_button0_disabled_value=/*pagenumber*/ctx[0]==1?"true":"false");set_custom_element_data(goa_button1,"type","tertiary");set_custom_element_data(goa_button1,"trailingicon","arrow-forward");set_custom_element_data(goa_button1,"disabled",goa_button1_disabled_value=/*pagenumber*/ctx[0]==/*_pageCount*/ctx[8]?"true":"false");set_custom_element_data(goa_block0,"alignment","center");set_custom_element_data(goa_block0,"gap","m");set_custom_element_data(goa_block0,"data-testid","page-links");attr(div,"class","controls");set_custom_element_data(goa_block1,"id","root");set_custom_element_data(goa_block1,"ml",/*ml*/ctx[5]);set_custom_element_data(goa_block1,"mr",/*mr*/ctx[3]);set_custom_element_data(goa_block1,"mb",/*mb*/ctx[4]);set_custom_element_data(goa_block1,"mt",/*mt*/ctx[2]);},m(target,anchor){insert(target,goa_block1,anchor);append(goa_block1,div);if(if_block)if_block.m(div,null);append(div,t0);append(div,goa_block0);append(goa_block0,goa_button0);append(goa_button0,t1);append(goa_block0,t2);append(goa_block0,goa_button1);append(goa_button1,t3);if(!mounted){dispose=[listen(goa_button0,"click",/*click_handler*/ctx[14]),listen(goa_button1,"click",/*click_handler_1*/ctx[15])];mounted=true;}},p(ctx,[dirty]){if(/*variant*/ctx[1]==="all"){if(if_block){if_block.p(ctx,dirty);}else {if_block=create_if_block$f(ctx);if_block.c();if_block.m(div,t0);}}else if(if_block){if_block.d(1);if_block=null;}if(dirty&/*pagenumber*/1&&goa_button0_disabled_value!==(goa_button0_disabled_value=/*pagenumber*/ctx[0]==1?"true":"false")){set_custom_element_data(goa_button0,"disabled",goa_button0_disabled_value);}if(dirty&/*pagenumber, _pageCount*/257&&goa_button1_disabled_value!==(goa_button1_disabled_value=/*pagenumber*/ctx[0]==/*_pageCount*/ctx[8]?"true":"false")){set_custom_element_data(goa_button1,"disabled",goa_button1_disabled_value);}if(dirty&/*ml*/32){set_custom_element_data(goa_block1,"ml",/*ml*/ctx[5]);}if(dirty&/*mr*/8){set_custom_element_data(goa_block1,"mr",/*mr*/ctx[3]);}if(dirty&/*mb*/16){set_custom_element_data(goa_block1,"mb",/*mb*/ctx[4]);}if(dirty&/*mt*/4){set_custom_element_data(goa_block1,"mt",/*mt*/ctx[2]);}},i:noop,o:noop,d(detaching){if(detaching)detach(goa_block1);if(if_block)if_block.d();mounted=false;run_all(dispose);}};}function instance$q($$self,$$props,$$invalidate){let _pageCount;const[Variants,validateVariant]=typeValidator("Pagination variant",["all","links-only"]);let{pagenumber}=$$props;let{itemcount}=$$props;let{perpagecount=10}=$$props;let{variant="all"}=$$props;let{mt=null}=$$props;let{mr=null}=$$props;let{mb="m"}=$$props;let{ml=null}=$$props;// private
304
- let pageDropdownEl=null;let hiddenEl=null;// needed to allow the inputEl's event to be cancelled
305
- // hooks
306
- onMount(async()=>{await tick();validateRequired("GoAPagination",{itemcount,pagenumber});validateVariant(variant);// prevent event propagation
307
- pageDropdownEl&&pageDropdownEl.addEventListener("_change",e=>{const page=Number.parseInt(e.detail.value);e.stopPropagation();hiddenEl.dispatchEvent(new CustomEvent("_change",{composed:true,bubbles:true,detail:{page}}));});});// functions
308
- function goto(e,offset){const newPage=Number.parseInt(pagenumber+"")+offset;if(newPage>0&&newPage<=_pageCount){e.target.dispatchEvent(new CustomEvent("_change",{composed:true,bubbles:true,detail:{page:newPage}}));}e.preventDefault();}function input_binding($$value){binding_callbacks[$$value?'unshift':'push'](()=>{hiddenEl=$$value;$$invalidate(7,hiddenEl);});}function goa_dropdown_binding($$value){binding_callbacks[$$value?'unshift':'push'](()=>{pageDropdownEl=$$value;$$invalidate(6,pageDropdownEl);});}const click_handler=e=>goto(e,-1);const click_handler_1=e=>goto(e,1);$$self.$$set=$$props=>{if('pagenumber'in $$props)$$invalidate(0,pagenumber=$$props.pagenumber);if('itemcount'in $$props)$$invalidate(10,itemcount=$$props.itemcount);if('perpagecount'in $$props)$$invalidate(11,perpagecount=$$props.perpagecount);if('variant'in $$props)$$invalidate(1,variant=$$props.variant);if('mt'in $$props)$$invalidate(2,mt=$$props.mt);if('mr'in $$props)$$invalidate(3,mr=$$props.mr);if('mb'in $$props)$$invalidate(4,mb=$$props.mb);if('ml'in $$props)$$invalidate(5,ml=$$props.ml);};$$self.$$.update=()=>{if($$self.$$.dirty&/*itemcount, perpagecount*/3072){// reactive
309
- $$invalidate(8,_pageCount=Math.ceil(itemcount/perpagecount));}};return [pagenumber,variant,mt,mr,mb,ml,pageDropdownEl,hiddenEl,_pageCount,goto,itemcount,perpagecount,input_binding,goa_dropdown_binding,click_handler,click_handler_1];}class Pagination extends SvelteElement{constructor(options){super();const style=document.createElement('style');style.textContent=`span{white-space:nowrap}.controls{display:flex;gap:1rem;flex-direction:column;align-items:center;width:100%}@media screen and (max-width: 623px){@media not (max-color:2147477350){.controls{flex-direction:row;justify-content:space-between}}}@media not screen and (max-width: 623px){@media not (color:2147477350){.controls{flex-direction:row;justify-content:space-between}}}`;this.shadowRoot.appendChild(style);init(this,{target:this.shadowRoot,props:attribute_to_object(this.attributes),customElement:true},instance$q,create_fragment$t,safe_not_equal,{pagenumber:0,itemcount:10,perpagecount:11,variant:1,mt:2,mr:3,mb:4,ml:5},null);if(options){if(options.target){insert(options.target,this,options.anchor);}if(options.props){this.$set(options.props);flush();}}}static get observedAttributes(){return ["pagenumber","itemcount","perpagecount","variant","mt","mr","mb","ml"];}get pagenumber(){return this.$$.ctx[0];}set pagenumber(pagenumber){this.$$set({pagenumber});flush();}get itemcount(){return this.$$.ctx[10];}set itemcount(itemcount){this.$$set({itemcount});flush();}get perpagecount(){return this.$$.ctx[11];}set perpagecount(perpagecount){this.$$set({perpagecount});flush();}get variant(){return this.$$.ctx[1];}set variant(variant){this.$$set({variant});flush();}get mt(){return this.$$.ctx[2];}set mt(mt){this.$$set({mt});flush();}get mr(){return this.$$.ctx[3];}set mr(mr){this.$$set({mr});flush();}get mb(){return this.$$.ctx[4];}set mb(mb){this.$$set({mb});flush();}get ml(){return this.$$.ctx[5];}set ml(ml){this.$$set({ml});flush();}}customElements.define("goa-pagination",Pagination);/* src/components/popover/Popover.svelte generated by Svelte v3.59.2 */function create_if_block$e(ctx){let div0;let t;let div2;let section;let goa_focus_trap;let div1;let section_style_value;let section_resize_listener;let mounted;let dispose;return {c(){div0=element("div");t=space();div2=element("div");section=element("section");goa_focus_trap=element("goa-focus-trap");div1=element("div");div1.innerHTML=`<slot></slot>`;attr(div0,"data-testid","popover-background");attr(div0,"class","popover-background");set_custom_element_data(goa_focus_trap,"open","true");attr(section,"data-testid","popover-content");attr(section,"class","popover-content");attr(section,"style",section_style_value=`
310
- ${cssVar("width",/*width*/ctx[2])}
311
- max-width: ${/*maxwidth*/ctx[1]};
312
- padding: ${/*_padded*/ctx[19]?"var(--goa-space-m)":"0"};
313
- `);add_render_callback(()=>/*section_elementresize_handler*/ctx[29].call(section));attr(div2,"class","popover-container");},m(target,anchor){insert(target,div0,anchor);insert(target,t,anchor);insert(target,div2,anchor);append(div2,section);append(section,goa_focus_trap);append(goa_focus_trap,div1);/*div1_binding*/ctx[28](div1);section_resize_listener=add_iframe_resize_listener(section,/*section_elementresize_handler*/ctx[29].bind(section));/*section_binding*/ctx[30](section);if(!mounted){dispose=listen(div0,"click",/*closePopover*/ctx[21]);mounted=true;}},p(ctx,dirty){if(dirty[0]&/*width, maxwidth, _padded*/524294&&section_style_value!==(section_style_value=`
314
- ${cssVar("width",/*width*/ctx[2])}
315
- max-width: ${/*maxwidth*/ctx[1]};
316
- padding: ${/*_padded*/ctx[19]?"var(--goa-space-m)":"0"};
317
- `)){attr(section,"style",section_style_value);}},d(detaching){if(detaching)detach(div0);if(detaching)detach(t);if(detaching)detach(div2);/*div1_binding*/ctx[28](null);section_resize_listener();/*section_binding*/ctx[30](null);mounted=false;dispose();}};}function create_fragment$s(ctx){let div1;let div0;let slot;let div0_tabindex_value;let t;let div1_style_value;let mounted;let dispose;let if_block=/*_open*/ctx[13]&&create_if_block$e(ctx);return {c(){div1=element("div");div0=element("div");slot=element("slot");t=space();if(if_block)if_block.c();this.c=noop;attr(slot,"name","target");attr(div0,"class","popover-target");attr(div0,"tabindex",div0_tabindex_value=+/*tabindex*/ctx[7]);attr(div0,"data-testid","popover-target");attr(div1,"data-testid",/*testid*/ctx[0]);attr(div1,"style",div1_style_value=`
318
- ${/*_relative*/ctx[18]&&"position: relative;"}
319
- ${calculateMargin(/*mt*/ctx[3],/*mr*/ctx[4],/*mb*/ctx[5],/*ml*/ctx[6])}
320
- ${cssVar("--offset-top",/*voffset*/ctx[8])}
321
- ${cssVar("--offset-bottom",/*voffset*/ctx[8])}
322
- ${cssVar("--offset-left",/*hoffset*/ctx[9])}
323
- ${cssVar("--offset-right",/*hoffset*/ctx[9])}
324
- ${cssVar("--focus-border-width",/*focusborderwidth*/ctx[10])}
325
- ${cssVar("--border-radius",/*borderradius*/ctx[11])}
326
- ${cssVar("width","100%")}
327
- `);},m(target,anchor){insert(target,div1,anchor);append(div1,div0);append(div0,slot);/*div0_binding*/ctx[27](div0);append(div1,t);if(if_block)if_block.m(div1,null);/*div1_binding_1*/ctx[31](div1);if(!mounted){dispose=listen(div0,"click",/*openPopover*/ctx[20]);mounted=true;}},p(ctx,dirty){if(dirty[0]&/*tabindex*/128&&div0_tabindex_value!==(div0_tabindex_value=+/*tabindex*/ctx[7])){attr(div0,"tabindex",div0_tabindex_value);}if(/*_open*/ctx[13]){if(if_block){if_block.p(ctx,dirty);}else {if_block=create_if_block$e(ctx);if_block.c();if_block.m(div1,null);}}else if(if_block){if_block.d(1);if_block=null;}if(dirty[0]&/*testid*/1){attr(div1,"data-testid",/*testid*/ctx[0]);}if(dirty[0]&/*_relative, mt, mr, mb, ml, voffset, hoffset, focusborderwidth, borderradius*/266104&&div1_style_value!==(div1_style_value=`
328
- ${/*_relative*/ctx[18]&&"position: relative;"}
329
- ${calculateMargin(/*mt*/ctx[3],/*mr*/ctx[4],/*mb*/ctx[5],/*ml*/ctx[6])}
330
- ${cssVar("--offset-top",/*voffset*/ctx[8])}
331
- ${cssVar("--offset-bottom",/*voffset*/ctx[8])}
332
- ${cssVar("--offset-left",/*hoffset*/ctx[9])}
333
- ${cssVar("--offset-right",/*hoffset*/ctx[9])}
334
- ${cssVar("--focus-border-width",/*focusborderwidth*/ctx[10])}
335
- ${cssVar("--border-radius",/*borderradius*/ctx[11])}
336
- ${cssVar("width","100%")}
337
- `)){attr(div1,"style",div1_style_value);}},i:noop,o:noop,d(detaching){if(detaching)detach(div1);/*div0_binding*/ctx[27](null);if(if_block)if_block.d();/*div1_binding_1*/ctx[31](null);mounted=false;dispose();}};}function getBoundingClientRectWithMargins(el){const rect=el.getBoundingClientRect();const style=window.getComputedStyle(el);const mTop=parseInt(style.marginTop,10)||0;const mRight=parseInt(style.marginRight,10)||0;const mBottom=parseInt(style.marginBottom,10)||0;const mLeft=parseInt(style.marginLeft,10)||0;return {top:rect.top-mTop,right:rect.right+mRight,bottom:rect.bottom+mBottom,left:rect.left-mLeft,width:rect.width+mLeft+mRight,height:rect.height+mTop+mBottom,x:rect.x-mLeft,y:rect.y-mTop};}function instance$p($$self,$$props,$$invalidate){let _padded;let _open;let _disabled;let _relative;let{testid="popover"}=$$props;let{maxwidth="320px"}=$$props;let{width=""}=$$props;let{padded="true"}=$$props;let{position="auto"}=$$props;let{relative="false"}=$$props;let{mt=null}=$$props;let{mr=null}=$$props;let{mb=null}=$$props;let{ml=null}=$$props;let{open="false"}=$$props;let{disabled="false"}=$$props;let{tabindex="0"}=$$props;let{voffset=""}=$$props;let{hoffset=""}=$$props;let{focusborderwidth="var(--goa-border-width-l)"}=$$props;let{borderradius="var(--goa-border-radius-m)"}=$$props;// Private
338
- let _rootEl;let _targetEl;let _popoverEl;let _focusTrapEl;let _initFocusedEl;let _sectionHeight;// Hooks
339
- onMount(async()=>{await tick();_targetEl.addEventListener("keydown",onTargetEvent);const slot=_targetEl.querySelector("slot");let children;if(slot){children=slot.assignedElements();}else {// for unit tests only
340
- children=[..._targetEl.children];}_initFocusedEl=children.find(el=>el.tabIndex>=0)||_targetEl;});// Functions
341
- // Called on window popstate changes. This allows for clicking links within
342
- // the popover to close the popover
343
- function handleUrlChange(_e){closePopover();}// Handles events when the targetEl has focus
344
- function onTargetEvent(e){switch(e.key){case" ":case"Enter":openPopover();break;case"Escape":closePopover();break;}}// Event binding when the focusTrapEl has focus. This is required since the
345
- // popover exists within the slot of the FocusTrap which prevents the existing
346
- // targetEl eventing binding from "hearing" the events
347
- function onFocusTrapEvent(e){switch(e.key){case"Escape":closePopover();break;}}// Opens the popover and adds the required binding to the new slot element
348
- function openPopover(){if(_disabled)return;(async()=>{$$invalidate(13,_open=true);await tick();_focusTrapEl.addEventListener("keydown",onFocusTrapEvent,true);_rootEl.dispatchEvent(new CustomEvent("_open",{composed:true}));})();}// Ensures that upon closing of the popover that the element that triggered
349
- // the popover to be shown re-attains focus and that any window event binding
350
- // is removed (it may not have been added if target was clicked)
351
- function closePopover(){_initFocusedEl.focus();$$invalidate(13,_open=false);window.removeEventListener("popstate",handleUrlChange,true);_rootEl.dispatchEvent(new CustomEvent("_close",{composed:true}));}async function setPopoverPosition(){await tick();// Get target and content rectangles
352
- const rootRect=_rootEl.getBoundingClientRect();const targetRect=getBoundingClientRectWithMargins(_targetEl);const contentRect=getBoundingClientRectWithMargins(_popoverEl);// Calculate available space above and below the target element
353
- const spaceAbove=targetRect.top;const spaceBelow=window.innerHeight-targetRect.bottom;// Determine if there's more space above or below the target element
354
- const displayOnTop=position==="auto"?spaceBelow<contentRect.height&&spaceAbove>contentRect.height&&spaceAbove>spaceBelow:position==="above";// when popover is within a modal and the scrollbars are hidden we don't need to take into
355
- // account the scroll offset
356
- const usingNoScroll=document.body.style.overflow==="hidden";const windowOffset=usingNoScroll?0:window.scrollY;// If there's more space above, display the popover above the target element
357
- if(_relative){$$invalidate(16,_popoverEl.style.top=displayOnTop?`-${contentRect.height}px`:`${rootRect.height}px`,_popoverEl);}else {$$invalidate(16,_popoverEl.style.top=displayOnTop?`${rootRect.top-contentRect.height+windowOffset}px`:`${rootRect.top+rootRect.height+windowOffset}px`,_popoverEl);}// Move the popover to the left if it is too far to the right and only if there is space to the left
358
- const displayOnRight=document.body.clientWidth-targetRect.left<contentRect.width&&targetRect.left>contentRect.width;if(_relative){if(displayOnRight){$$invalidate(16,_popoverEl.style.right="0",_popoverEl);}else {$$invalidate(16,_popoverEl.style.left="0",_popoverEl);}}else {$$invalidate(16,_popoverEl.style.left=displayOnRight?`${rootRect.left+targetRect.width-contentRect.width}px`:`${rootRect.left}px`,_popoverEl);}}function div0_binding($$value){binding_callbacks[$$value?'unshift':'push'](()=>{_targetEl=$$value;$$invalidate(15,_targetEl);});}function div1_binding($$value){binding_callbacks[$$value?'unshift':'push'](()=>{_focusTrapEl=$$value;$$invalidate(17,_focusTrapEl);});}function section_elementresize_handler(){_sectionHeight=this.clientHeight;$$invalidate(12,_sectionHeight);}function section_binding($$value){binding_callbacks[$$value?'unshift':'push'](()=>{_popoverEl=$$value;$$invalidate(16,_popoverEl);});}function div1_binding_1($$value){binding_callbacks[$$value?'unshift':'push'](()=>{_rootEl=$$value;$$invalidate(14,_rootEl);});}$$self.$$set=$$props=>{if('testid'in $$props)$$invalidate(0,testid=$$props.testid);if('maxwidth'in $$props)$$invalidate(1,maxwidth=$$props.maxwidth);if('width'in $$props)$$invalidate(2,width=$$props.width);if('padded'in $$props)$$invalidate(22,padded=$$props.padded);if('position'in $$props)$$invalidate(23,position=$$props.position);if('relative'in $$props)$$invalidate(24,relative=$$props.relative);if('mt'in $$props)$$invalidate(3,mt=$$props.mt);if('mr'in $$props)$$invalidate(4,mr=$$props.mr);if('mb'in $$props)$$invalidate(5,mb=$$props.mb);if('ml'in $$props)$$invalidate(6,ml=$$props.ml);if('open'in $$props)$$invalidate(25,open=$$props.open);if('disabled'in $$props)$$invalidate(26,disabled=$$props.disabled);if('tabindex'in $$props)$$invalidate(7,tabindex=$$props.tabindex);if('voffset'in $$props)$$invalidate(8,voffset=$$props.voffset);if('hoffset'in $$props)$$invalidate(9,hoffset=$$props.hoffset);if('focusborderwidth'in $$props)$$invalidate(10,focusborderwidth=$$props.focusborderwidth);if('borderradius'in $$props)$$invalidate(11,borderradius=$$props.borderradius);};$$self.$$.update=()=>{if($$self.$$.dirty[0]&/*padded*/4194304){// Reactive
359
- $$invalidate(19,_padded=toBoolean(padded));}if($$self.$$.dirty[0]&/*open*/33554432){$$invalidate(13,_open=toBoolean(open));}if($$self.$$.dirty[0]&/*disabled*/67108864){_disabled=toBoolean(disabled);}if($$self.$$.dirty[0]&/*relative*/16777216){$$invalidate(18,_relative=toBoolean(relative));}if($$self.$$.dirty[0]&/*_open*/8192){(async()=>_open&&(await setPopoverPosition()))();}if($$self.$$.dirty[0]&/*_sectionHeight*/4096){(async()=>_sectionHeight&&(await setPopoverPosition()))();}if($$self.$$.dirty[0]&/*_open*/8192){{if(_open){window.addEventListener("popstate",handleUrlChange,true);}else {window.removeEventListener("popstate",handleUrlChange,true);}}}};return [testid,maxwidth,width,mt,mr,mb,ml,tabindex,voffset,hoffset,focusborderwidth,borderradius,_sectionHeight,_open,_rootEl,_targetEl,_popoverEl,_focusTrapEl,_relative,_padded,openPopover,closePopover,padded,position,relative,open,disabled,div0_binding,div1_binding,section_elementresize_handler,section_binding,div1_binding_1];}class Popover extends SvelteElement{constructor(options){super();const style=document.createElement('style');style.textContent=`:host{box-sizing:border-box;font-family:var(--goa-font-family-sans);font-size:var(--goa-font-size-4);display:flex;align-items:center}.popover-target{cursor:pointer}.popover-target:focus{outline:var(--focus-border-width) solid var(--goa-color-interactive-focus)}.popover-content{color:var(--goa-color-text-default);position:absolute;width:-moz-fit-content;width:fit-content;list-style-type:none;background:var(--goa-color-greyscale-white);border-radius:var(--border-radius);outline:none;filter:drop-shadow(0px 2px 4px rgba(0, 0, 0, 0.2));z-index:99;width:-moz-max-content;width:max-content;margin-top:var(--offset-top, 3px);margin-bottom:var(--offset-bottom, 3px);margin-left:var(--offset-left, 0);margin-right:var(--offset-right, 0)}::slotted(ul){display:block;padding:0;margin:0;list-style-type:none;line-height:2rem}.popover-background{cursor:default;position:fixed;z-index:98;inset:0}`;this.shadowRoot.appendChild(style);init(this,{target:this.shadowRoot,props:attribute_to_object(this.attributes),customElement:true},instance$p,create_fragment$s,safe_not_equal,{testid:0,maxwidth:1,width:2,padded:22,position:23,relative:24,mt:3,mr:4,mb:5,ml:6,open:25,disabled:26,tabindex:7,voffset:8,hoffset:9,focusborderwidth:10,borderradius:11},null,[-1,-1]);if(options){if(options.target){insert(options.target,this,options.anchor);}if(options.props){this.$set(options.props);flush();}}}static get observedAttributes(){return ["testid","maxwidth","width","padded","position","relative","mt","mr","mb","ml","open","disabled","tabindex","voffset","hoffset","focusborderwidth","borderradius"];}get testid(){return this.$$.ctx[0];}set testid(testid){this.$$set({testid});flush();}get maxwidth(){return this.$$.ctx[1];}set maxwidth(maxwidth){this.$$set({maxwidth});flush();}get width(){return this.$$.ctx[2];}set width(width){this.$$set({width});flush();}get padded(){return this.$$.ctx[22];}set padded(padded){this.$$set({padded});flush();}get position(){return this.$$.ctx[23];}set position(position){this.$$set({position});flush();}get relative(){return this.$$.ctx[24];}set relative(relative){this.$$set({relative});flush();}get mt(){return this.$$.ctx[3];}set mt(mt){this.$$set({mt});flush();}get mr(){return this.$$.ctx[4];}set mr(mr){this.$$set({mr});flush();}get mb(){return this.$$.ctx[5];}set mb(mb){this.$$set({mb});flush();}get ml(){return this.$$.ctx[6];}set ml(ml){this.$$set({ml});flush();}get open(){return this.$$.ctx[25];}set open(open){this.$$set({open});flush();}get disabled(){return this.$$.ctx[26];}set disabled(disabled){this.$$set({disabled});flush();}get tabindex(){return this.$$.ctx[7];}set tabindex(tabindex){this.$$set({tabindex});flush();}get voffset(){return this.$$.ctx[8];}set voffset(voffset){this.$$set({voffset});flush();}get hoffset(){return this.$$.ctx[9];}set hoffset(hoffset){this.$$set({hoffset});flush();}get focusborderwidth(){return this.$$.ctx[10];}set focusborderwidth(focusborderwidth){this.$$set({focusborderwidth});flush();}get borderradius(){return this.$$.ctx[11];}set borderradius(borderradius){this.$$set({borderradius});flush();}}customElements.define("goa-popover",Popover);/* src/components/radio-group/RadioGroup.svelte generated by Svelte v3.59.2 */function get_each_context$4(ctx,list,i){const child_ctx=ctx.slice();child_ctx[22]=list[i];child_ctx[24]=i;return child_ctx;}// (105:6) {#if option.description}
360
- function create_if_block$d(ctx){let div;let t_value=/*option*/ctx[22].description+"";let t;let div_id_value;return {c(){div=element("div");t=text(t_value);attr(div,"class","goa-radio-description");attr(div,"id",div_id_value=`description-${/*name*/ctx[1]}-${/*index*/ctx[24]}`);},m(target,anchor){insert(target,div,anchor);append(div,t);},p(ctx,dirty){if(dirty&/*options*/512&&t_value!==(t_value=/*option*/ctx[22].description+""))set_data(t,t_value);if(dirty&/*name, options*/514&&div_id_value!==(div_id_value=`description-${/*name*/ctx[1]}-${/*index*/ctx[24]}`)){attr(div,"id",div_id_value);}},d(detaching){if(detaching)detach(div);}};}// (82:2) {#each options as option, index (option.value)}
361
- function create_each_block$4(key_1,ctx){let div1;let label;let input;let input_value_value;let input_checked_value;let input_aria_label_value;let input_aria_describedby_value;let t0;let div0;let t1;let span;let t2_value=(/*option*/ctx[22].label||/*option*/ctx[22].value)+"";let t2;let label_data_testid_value;let t3;let t4;let mounted;let dispose;function change_handler(){return(/*change_handler*/ctx[16](/*option*/ctx[22]));}let if_block=/*option*/ctx[22].description&&create_if_block$d(ctx);return {key:key_1,first:null,c(){div1=element("div");label=element("label");input=element("input");t0=space();div0=element("div");t1=space();span=element("span");t2=text(t2_value);t3=space();if(if_block)if_block.c();t4=space();attr(input,"type","radio");attr(input,"name",/*name*/ctx[1]);input.value=input_value_value=/*option*/ctx[22].value;input.disabled=/*isDisabled*/ctx[12];input.checked=input_checked_value=/*option*/ctx[22].value===/*value*/ctx[0];attr(input,"aria-label",input_aria_label_value=/*arialabel*/ctx[4]||/*name*/ctx[1]);attr(input,"aria-describedby",input_aria_describedby_value=`description-${/*name*/ctx[1]}-${/*index*/ctx[24]}`);attr(div0,"class","goa-radio-icon");attr(span,"class","goa-radio-label");attr(label,"data-testid",label_data_testid_value="radio-option-"+/*option*/ctx[22].value);attr(label,"class","goa-radio");toggle_class(label,"goa-radio--disabled",/*isDisabled*/ctx[12]);toggle_class(label,"goa-radio--error",/*isError*/ctx[11]);attr(div1,"class","goa-radio-container");this.first=div1;},m(target,anchor){insert(target,div1,anchor);append(div1,label);append(label,input);append(label,t0);append(label,div0);append(label,t1);append(label,span);append(span,t2);append(div1,t3);if(if_block)if_block.m(div1,null);append(div1,t4);if(!mounted){dispose=listen(input,"change",change_handler);mounted=true;}},p(new_ctx,dirty){ctx=new_ctx;if(dirty&/*name*/2){attr(input,"name",/*name*/ctx[1]);}if(dirty&/*options*/512&&input_value_value!==(input_value_value=/*option*/ctx[22].value)){input.value=input_value_value;}if(dirty&/*isDisabled*/4096){input.disabled=/*isDisabled*/ctx[12];}if(dirty&/*options, value*/513&&input_checked_value!==(input_checked_value=/*option*/ctx[22].value===/*value*/ctx[0])){input.checked=input_checked_value;}if(dirty&/*arialabel, name*/18&&input_aria_label_value!==(input_aria_label_value=/*arialabel*/ctx[4]||/*name*/ctx[1])){attr(input,"aria-label",input_aria_label_value);}if(dirty&/*name, options*/514&&input_aria_describedby_value!==(input_aria_describedby_value=`description-${/*name*/ctx[1]}-${/*index*/ctx[24]}`)){attr(input,"aria-describedby",input_aria_describedby_value);}if(dirty&/*options*/512&&t2_value!==(t2_value=(/*option*/ctx[22].label||/*option*/ctx[22].value)+""))set_data(t2,t2_value);if(dirty&/*options*/512&&label_data_testid_value!==(label_data_testid_value="radio-option-"+/*option*/ctx[22].value)){attr(label,"data-testid",label_data_testid_value);}if(dirty&/*isDisabled*/4096){toggle_class(label,"goa-radio--disabled",/*isDisabled*/ctx[12]);}if(dirty&/*isError*/2048){toggle_class(label,"goa-radio--error",/*isError*/ctx[11]);}if(/*option*/ctx[22].description){if(if_block){if_block.p(ctx,dirty);}else {if_block=create_if_block$d(ctx);if_block.c();if_block.m(div1,t4);}}else if(if_block){if_block.d(1);if_block=null;}},d(detaching){if(detaching)detach(div1);if(if_block)if_block.d();mounted=false;dispose();}};}function create_fragment$r(ctx){let div;let slot;let t;let each_blocks=[];let each_1_lookup=new Map();let div_style_value;let div_class_value;let each_value=/*options*/ctx[9];const get_key=ctx=>/*option*/ctx[22].value;for(let i=0;i<each_value.length;i+=1){let child_ctx=get_each_context$4(ctx,each_value,i);let key=get_key(child_ctx);each_1_lookup.set(key,each_blocks[i]=create_each_block$4(key,child_ctx));}return {c(){div=element("div");slot=element("slot");t=space();for(let i=0;i<each_blocks.length;i+=1){each_blocks[i].c();}this.c=noop;attr(div,"style",div_style_value=calculateMargin(/*mt*/ctx[5],/*mr*/ctx[6],/*mb*/ctx[7],/*ml*/ctx[8]));attr(div,"class",div_class_value=`goa-radio-group--${/*orientation*/ctx[2]}`);attr(div,"data-testid",/*testid*/ctx[3]);},m(target,anchor){insert(target,div,anchor);append(div,slot);append(div,t);for(let i=0;i<each_blocks.length;i+=1){if(each_blocks[i]){each_blocks[i].m(div,null);}}/*div_binding*/ctx[17](div);},p(ctx,[dirty]){if(dirty&/*name, options, isDisabled, isError, value, arialabel, onChange*/14867){each_value=/*options*/ctx[9];each_blocks=update_keyed_each(each_blocks,dirty,get_key,1,ctx,each_value,each_1_lookup,div,destroy_block,create_each_block$4,null,get_each_context$4);}if(dirty&/*mt, mr, mb, ml*/480&&div_style_value!==(div_style_value=calculateMargin(/*mt*/ctx[5],/*mr*/ctx[6],/*mb*/ctx[7],/*ml*/ctx[8]))){attr(div,"style",div_style_value);}if(dirty&/*orientation*/4&&div_class_value!==(div_class_value=`goa-radio-group--${/*orientation*/ctx[2]}`)){attr(div,"class",div_class_value);}if(dirty&/*testid*/8){attr(div,"data-testid",/*testid*/ctx[3]);}},i:noop,o:noop,d(detaching){if(detaching)detach(div);for(let i=0;i<each_blocks.length;i+=1){each_blocks[i].d();}/*div_binding*/ctx[17](null);}};}function instance$o($$self,$$props,$$invalidate){let isDisabled;let isError;const[Orientations,validateOrientation]=typeValidator("Radio group orientation",["vertical","horizontal"]);let{name}=$$props;let{value}=$$props;let{orientation="vertical"}=$$props;let{disabled="false"}=$$props;let{error="false"}=$$props;let{testid=""}=$$props;let{arialabel=""}=$$props;let{mt=null}=$$props;let{mr=null}=$$props;let{mb=null}=$$props;let{ml=null}=$$props;let options=[];let el;onMount(async()=>{await tick();$$invalidate(9,options=getOptions());});/**
362
- * Allows the child elements to be obtainable within unit tests
363
- * @returns List of child elements
364
- */function getChildren(){const slot=el.querySelector("slot");if(slot)// default
365
- return [...slot.assignedElements()];else// unit tests
366
- return [...el.children];}/**
367
- * Maps the child elements to a list of RadioOptions
368
- */function getOptions(){const children=getChildren();return children.map(el=>{const option=el;const value=el.getAttribute("value")||option.value;const label=el.getAttribute("label")||el.innerText||option.label||option.innerText;const description=el.getAttribute("description")||option.description;return {value,label,description};});}/**
369
- * Handles changing of the radio items
370
- * @param newValue Selected value
371
- */function onChange(newValue){if(newValue===value)return;$$invalidate(0,value=newValue);el.dispatchEvent(new CustomEvent("_change",{composed:true,detail:{name,value}}));}onMount(()=>{validateOrientation(orientation);});const change_handler=option=>onChange(option.value);function div_binding($$value){binding_callbacks[$$value?'unshift':'push'](()=>{el=$$value;$$invalidate(10,el);});}$$self.$$set=$$props=>{if('name'in $$props)$$invalidate(1,name=$$props.name);if('value'in $$props)$$invalidate(0,value=$$props.value);if('orientation'in $$props)$$invalidate(2,orientation=$$props.orientation);if('disabled'in $$props)$$invalidate(14,disabled=$$props.disabled);if('error'in $$props)$$invalidate(15,error=$$props.error);if('testid'in $$props)$$invalidate(3,testid=$$props.testid);if('arialabel'in $$props)$$invalidate(4,arialabel=$$props.arialabel);if('mt'in $$props)$$invalidate(5,mt=$$props.mt);if('mr'in $$props)$$invalidate(6,mr=$$props.mr);if('mb'in $$props)$$invalidate(7,mb=$$props.mb);if('ml'in $$props)$$invalidate(8,ml=$$props.ml);};$$self.$$.update=()=>{if($$self.$$.dirty&/*disabled*/16384){// private
372
- $$invalidate(12,isDisabled=toBoolean(disabled));}if($$self.$$.dirty&/*error*/32768){$$invalidate(11,isError=toBoolean(error));}};return [value,name,orientation,testid,arialabel,mt,mr,mb,ml,options,el,isError,isDisabled,onChange,disabled,error,change_handler,div_binding];}class RadioGroup extends SvelteElement{constructor(options){super();const style=document.createElement('style');style.textContent=`:host{box-sizing:border-box;font-family:var(--goa-font-family-sans)}.goa-radio-group--horizontal{display:flex;flex-direction:row}.goa-radio-group--vertical{display:inline-block}label.goa-radio{--goa-radio-outline-width:3px;--goa-radio-diameter:1.5rem;--goa-radio-border-width:1px;--goa-radio-border-width--checked:7px;display:inline-block;box-sizing:border-box;display:flex}.goa-radio-container{padding-bottom:1rem}.goa-radio:hover{cursor:pointer}.goa-radio *,.goa-radio *:before,.goa-radio *:after{box-sizing:border-box}.goa-radio input[type="radio"]{width:0;height:0;margin:0;opacity:0}.goa-radio-label{padding:0 0.5rem;font-weight:var(--goa-font-weight-regular)}.goa-radio-description{font:var(--goa-typography-body-xs);margin-left:var(--goa-space-xl);margin-top:var(--goa-space-2xs)}.goa-radio-icon{display:inline-block;height:var(--goa-radio-diameter);width:var(--goa-radio-diameter);border-radius:50%;background-color:#fff;transition:box-shadow 100ms ease-in-out;flex:0 0 auto;margin-top:var(--font-valign-fix)}.goa-radio:focus>input:not(:disabled)~.goa-radio-icon{box-shadow:0 0 0 var(--goa-radio-outline-width) var(--goa-color-interactive-focus)}.goa-radio--disabled .goa-radio-label{opacity:0.4}.goa-radio--disabled:hover{cursor:default}input[type="radio"]:not(:checked)~.goa-radio-icon{border:var(--goa-radio-border-width) solid var(--goa-color-greyscale-700)}input[type="radio"]:hover~.goa-radio-icon{border:1px solid var(--goa-color-interactive-hover);box-shadow:0 0 0 1px var(--goa-color-interactive-hover)}input[type="radio"]:checked:hover~.goa-radio-icon{border:7px solid var(--goa-color-interactive-hover);box-shadow:0 0 0 1px var(--goa-color-interactive-hover)}input[type="radio"]:focus~.goa-radio-icon,input[type="radio"]:hover:active~.goa-radio-icon,input[type="radio"]:hover:focus~.goa-radio-icon,input[type="radio"]:active~.goa-radio-icon{box-shadow:0 0 0 var(--goa-radio-outline-width) var(--goa-color-interactive-focus)}input[type="radio"]:checked~.goa-radio-icon{border:var(--goa-radio-border-width--checked) solid var(--goa-color-interactive-default)}input[type="radio"]:disabled~.goa-radio-icon{border:var(--goa-radio-border-width) solid var(--goa-color-greyscale-700);box-shadow:none;opacity:40%}input[type="radio"]:disabled:checked~.goa-radio-icon{border:var(--goa-radio-border-width--checked) solid
373
- var(--goa-color-interactive-hover);box-shadow:none}.goa-radio--error input[type="radio"]:checked~.goa-radio-icon{border:7px solid var(--goa-color-emergency-default)}.goa-radio--error input[type="radio"]:hover~.goa-radio-icon{box-shadow:0 0 0 1px var(--goa-color-emergency-default)}.goa-radio--error input[type="radio"]:disabled:hover~.goa-radio-icon{box-shadow:none}.goa-radio--error input[type="radio"]:not(:checked)~.goa-radio-icon{border:2px solid var(--goa-color-emergency-default)}`;this.shadowRoot.appendChild(style);init(this,{target:this.shadowRoot,props:attribute_to_object(this.attributes),customElement:true},instance$o,create_fragment$r,safe_not_equal,{name:1,value:0,orientation:2,disabled:14,error:15,testid:3,arialabel:4,mt:5,mr:6,mb:7,ml:8},null);if(options){if(options.target){insert(options.target,this,options.anchor);}if(options.props){this.$set(options.props);flush();}}}static get observedAttributes(){return ["name","value","orientation","disabled","error","testid","arialabel","mt","mr","mb","ml"];}get name(){return this.$$.ctx[1];}set name(name){this.$$set({name});flush();}get value(){return this.$$.ctx[0];}set value(value){this.$$set({value});flush();}get orientation(){return this.$$.ctx[2];}set orientation(orientation){this.$$set({orientation});flush();}get disabled(){return this.$$.ctx[14];}set disabled(disabled){this.$$set({disabled});flush();}get error(){return this.$$.ctx[15];}set error(error){this.$$set({error});flush();}get testid(){return this.$$.ctx[3];}set testid(testid){this.$$set({testid});flush();}get arialabel(){return this.$$.ctx[4];}set arialabel(arialabel){this.$$set({arialabel});flush();}get mt(){return this.$$.ctx[5];}set mt(mt){this.$$set({mt});flush();}get mr(){return this.$$.ctx[6];}set mr(mr){this.$$set({mr});flush();}get mb(){return this.$$.ctx[7];}set mb(mb){this.$$set({mb});flush();}get ml(){return this.$$.ctx[8];}set ml(ml){this.$$set({ml});flush();}}customElements.define("goa-radio-group",RadioGroup);/* src/components/scrollable/Scrollable.svelte generated by Svelte v3.59.2 */function create_fragment$q(ctx){let div;let slot;let div_style_value;let mounted;let dispose;return {c(){div=element("div");slot=element("slot");this.c=noop;attr(div,"class","goa-scrollable");attr(div,"style",div_style_value=`
374
- max-height: ${/*maxheight*/ctx[3]||"50vh"};
375
- overflow-y: ${/*direction*/ctx[0]==="vertical"?'auto':'hidden'};
376
- overflow-x: ${/*direction*/ctx[0]==="horizontal"?'auto':'hidden'};
377
- margin: ${/*vpadding*/ctx[2]} 0;
378
- padding: 0 ${/*hpadding*/ctx[1]};
379
- `);},m(target,anchor){insert(target,div,anchor);append(div,slot);/*div_binding*/ctx[8](div);if(!mounted){dispose=listen(div,"scroll",/*onScroll*/ctx[5]);mounted=true;}},p(ctx,[dirty]){if(dirty&/*maxheight, direction, vpadding, hpadding*/15&&div_style_value!==(div_style_value=`
380
- max-height: ${/*maxheight*/ctx[3]||"50vh"};
381
- overflow-y: ${/*direction*/ctx[0]==="vertical"?'auto':'hidden'};
382
- overflow-x: ${/*direction*/ctx[0]==="horizontal"?'auto':'hidden'};
383
- margin: ${/*vpadding*/ctx[2]} 0;
384
- padding: 0 ${/*hpadding*/ctx[1]};
385
- `)){attr(div,"style",div_style_value);}},i:noop,o:noop,d(detaching){if(detaching)detach(div);/*div_binding*/ctx[8](null);mounted=false;dispose();}};}function instance$n($$self,$$props,$$invalidate){let{direction="vertical"}=$$props;let{hpadding=""}=$$props;let{vpadding=""}=$$props;let{maxheight=""}=$$props;let{offsetHeight}=$$props;let{scrollHeight}=$$props;// Private
386
- let _el;function onScroll(e){e.target.dispatchEvent(new CustomEvent("_scroll",{composed:true,detail:{offsetHeight:_el.offsetHeight,scrollHeight:_el.scrollHeight,scrollTop:_el.scrollTop}}));e.stopPropagation();}onMount(async()=>{await tick();$$invalidate(6,offsetHeight=_el.offsetHeight);$$invalidate(7,scrollHeight=_el.scrollHeight);});function div_binding($$value){binding_callbacks[$$value?'unshift':'push'](()=>{_el=$$value;$$invalidate(4,_el);});}$$self.$$set=$$props=>{if('direction'in $$props)$$invalidate(0,direction=$$props.direction);if('hpadding'in $$props)$$invalidate(1,hpadding=$$props.hpadding);if('vpadding'in $$props)$$invalidate(2,vpadding=$$props.vpadding);if('maxheight'in $$props)$$invalidate(3,maxheight=$$props.maxheight);if('offsetHeight'in $$props)$$invalidate(6,offsetHeight=$$props.offsetHeight);if('scrollHeight'in $$props)$$invalidate(7,scrollHeight=$$props.scrollHeight);};return [direction,hpadding,vpadding,maxheight,_el,onScroll,offsetHeight,scrollHeight,div_binding];}class Scrollable extends SvelteElement{constructor(options){super();const style=document.createElement('style');style.textContent=`.goa-scrollable{scroll-behavior:smooth}.goa-scrollable::-webkit-scrollbar{width:6px}.goa-scrollable::-webkit-scrollbar-track{background:#f1f1f1}.goa-scrollable::-webkit-scrollbar-thumb{background:#888}.goa-scrollable::-webkit-scrollbar-thumb:hover{background:#555}`;this.shadowRoot.appendChild(style);init(this,{target:this.shadowRoot,props:attribute_to_object(this.attributes),customElement:true},instance$n,create_fragment$q,safe_not_equal,{direction:0,hpadding:1,vpadding:2,maxheight:3,offsetHeight:6,scrollHeight:7},null);if(options){if(options.target){insert(options.target,this,options.anchor);}if(options.props){this.$set(options.props);flush();}}}static get observedAttributes(){return ["direction","hpadding","vpadding","maxheight","offsetHeight","scrollHeight"];}get direction(){return this.$$.ctx[0];}set direction(direction){this.$$set({direction});flush();}get hpadding(){return this.$$.ctx[1];}set hpadding(hpadding){this.$$set({hpadding});flush();}get vpadding(){return this.$$.ctx[2];}set vpadding(vpadding){this.$$set({vpadding});flush();}get maxheight(){return this.$$.ctx[3];}set maxheight(maxheight){this.$$set({maxheight});flush();}get offsetHeight(){return this.$$.ctx[6];}set offsetHeight(offsetHeight){this.$$set({offsetHeight});flush();}get scrollHeight(){return this.$$.ctx[7];}set scrollHeight(scrollHeight){this.$$set({scrollHeight});flush();}}customElements.define("goa-scrollable",Scrollable);/* src/components/skeleton/Skeleton.svelte generated by Svelte v3.59.2 */function get_each_context$3(ctx,list,i){const child_ctx=ctx.slice();child_ctx[13]=list[i];return child_ctx;}// (81:2) {:else}
387
- function create_else_block$7(ctx){let div;let div_class_value;return {c(){div=element("div");attr(div,"class",div_class_value="skeleton "+/*type*/ctx[3]+" "+`${/*type*/ctx[3]}-${/*size*/ctx[1]}`);},m(target,anchor){insert(target,div,anchor);},p(ctx,dirty){if(dirty&/*type, size*/10&&div_class_value!==(div_class_value="skeleton "+/*type*/ctx[3]+" "+`${/*type*/ctx[3]}-${/*size*/ctx[1]}`)){attr(div,"class",div_class_value);}},i:noop,o:noop,d(detaching){if(detaching)detach(div);}};}// (68:31)
388
- function create_if_block_3$5(ctx){let div3;let div2;let div0;let skeleton0;let t0;let div1;let skeleton1;let t1;let skeleton2;let t2;let skeleton3;let current;skeleton0=new Skeleton({props:{type:"image",size:/*size*/ctx[1]}});skeleton1=new Skeleton({props:{type:"header",size:"4"}});skeleton2=new Skeleton({props:{type:"header",size:"1"}});skeleton3=new Skeleton({props:{type:"lines",size:/*size*/ctx[1]}});return {c(){div3=element("div");div2=element("div");div0=element("div");create_component(skeleton0.$$.fragment);t0=space();div1=element("div");create_component(skeleton1.$$.fragment);t1=space();create_component(skeleton2.$$.fragment);t2=space();create_component(skeleton3.$$.fragment);set_style(div0,"flex","1 1 auto");set_style(div1,"flex","2 2 auto");set_style(div2,"display","flex");set_style(div2,"gap","1rem");},m(target,anchor){insert(target,div3,anchor);append(div3,div2);append(div2,div0);mount_component(skeleton0,div0,null);append(div2,t0);append(div2,div1);mount_component(skeleton1,div1,null);append(div1,t1);mount_component(skeleton2,div1,null);append(div3,t2);mount_component(skeleton3,div3,null);current=true;},p(ctx,dirty){const skeleton0_changes={};if(dirty&/*size*/2)skeleton0_changes.size=/*size*/ctx[1];skeleton0.$set(skeleton0_changes);const skeleton3_changes={};if(dirty&/*size*/2)skeleton3_changes.size=/*size*/ctx[1];skeleton3.$set(skeleton3_changes);},i(local){if(current)return;transition_in(skeleton0.$$.fragment,local);transition_in(skeleton1.$$.fragment,local);transition_in(skeleton2.$$.fragment,local);transition_in(skeleton3.$$.fragment,local);current=true;},o(local){transition_out(skeleton0.$$.fragment,local);transition_out(skeleton1.$$.fragment,local);transition_out(skeleton2.$$.fragment,local);transition_out(skeleton3.$$.fragment,local);current=false;},d(detaching){if(detaching)detach(div3);destroy_component(skeleton0);destroy_component(skeleton1);destroy_component(skeleton2);destroy_component(skeleton3);}};}// (64:29)
389
- function create_if_block_2$5(ctx){let each_1_anchor;let current;let each_value=Array(Number.parseInt(/*linecount*/ctx[2]+""));let each_blocks=[];for(let i=0;i<each_value.length;i+=1){each_blocks[i]=create_each_block$3(get_each_context$3(ctx,each_value,i));}const out=i=>transition_out(each_blocks[i],1,1,()=>{each_blocks[i]=null;});return {c(){for(let i=0;i<each_blocks.length;i+=1){each_blocks[i].c();}each_1_anchor=empty();},m(target,anchor){for(let i=0;i<each_blocks.length;i+=1){if(each_blocks[i]){each_blocks[i].m(target,anchor);}}insert(target,each_1_anchor,anchor);current=true;},p(ctx,dirty){if(dirty&/*size, linecount*/6){each_value=Array(Number.parseInt(/*linecount*/ctx[2]+""));let i;for(i=0;i<each_value.length;i+=1){const child_ctx=get_each_context$3(ctx,each_value,i);if(each_blocks[i]){each_blocks[i].p(child_ctx,dirty);transition_in(each_blocks[i],1);}else {each_blocks[i]=create_each_block$3(child_ctx);each_blocks[i].c();transition_in(each_blocks[i],1);each_blocks[i].m(each_1_anchor.parentNode,each_1_anchor);}}group_outros();for(i=each_value.length;i<each_blocks.length;i+=1){out(i);}check_outros();}},i(local){if(current)return;for(let i=0;i<each_value.length;i+=1){transition_in(each_blocks[i]);}current=true;},o(local){each_blocks=each_blocks.filter(Boolean);for(let i=0;i<each_blocks.length;i+=1){transition_out(each_blocks[i]);}current=false;},d(detaching){destroy_each(each_blocks,detaching);if(detaching)detach(each_1_anchor);}};}// (54:31)
390
- function create_if_block_1$6(ctx){let div2;let div0;let skeleton0;let t0;let div1;let skeleton1;let t1;let skeleton2;let div2_class_value;let current;skeleton0=new Skeleton({props:{type:"avatar",size:/*size*/ctx[1]}});skeleton1=new Skeleton({props:{type:"title",size:/*size*/ctx[1]}});skeleton2=new Skeleton({props:{type:"text-small",size:/*size*/ctx[1]}});return {c(){div2=element("div");div0=element("div");create_component(skeleton0.$$.fragment);t0=space();div1=element("div");create_component(skeleton1.$$.fragment);t1=space();create_component(skeleton2.$$.fragment);attr(div0,"class","profile-avatar");attr(div1,"class","profile-name");attr(div2,"class",div2_class_value="profile profile-"+/*size*/ctx[1]);},m(target,anchor){insert(target,div2,anchor);append(div2,div0);mount_component(skeleton0,div0,null);append(div2,t0);append(div2,div1);mount_component(skeleton1,div1,null);append(div1,t1);mount_component(skeleton2,div1,null);current=true;},p(ctx,dirty){const skeleton0_changes={};if(dirty&/*size*/2)skeleton0_changes.size=/*size*/ctx[1];skeleton0.$set(skeleton0_changes);const skeleton1_changes={};if(dirty&/*size*/2)skeleton1_changes.size=/*size*/ctx[1];skeleton1.$set(skeleton1_changes);const skeleton2_changes={};if(dirty&/*size*/2)skeleton2_changes.size=/*size*/ctx[1];skeleton2.$set(skeleton2_changes);if(!current||dirty&/*size*/2&&div2_class_value!==(div2_class_value="profile profile-"+/*size*/ctx[1])){attr(div2,"class",div2_class_value);}},i(local){if(current)return;transition_in(skeleton0.$$.fragment,local);transition_in(skeleton1.$$.fragment,local);transition_in(skeleton2.$$.fragment,local);current=true;},o(local){transition_out(skeleton0.$$.fragment,local);transition_out(skeleton1.$$.fragment,local);transition_out(skeleton2.$$.fragment,local);current=false;},d(detaching){if(detaching)detach(div2);destroy_component(skeleton0);destroy_component(skeleton1);destroy_component(skeleton2);}};}// (43:2) {#if type === "card"}
391
- function create_if_block$c(ctx){let div1;let skeleton0;let t0;let div0;let skeleton1;let t1;let skeleton2;let div1_class_value;let current;skeleton0=new Skeleton({props:{type:"image",size:/*size*/ctx[1]}});skeleton1=new Skeleton({props:{type:"header",size:/*size*/ctx[1]}});skeleton2=new Skeleton({props:{type:"lines",size:/*size*/ctx[1],linecount:/*linecount*/ctx[2]}});return {c(){div1=element("div");create_component(skeleton0.$$.fragment);t0=space();div0=element("div");create_component(skeleton1.$$.fragment);t1=space();create_component(skeleton2.$$.fragment);attr(div0,"class","card-content");attr(div1,"class",div1_class_value="card card-"+/*size*/ctx[1]);set_style(div1,"--max-width",/*maxwidth*/ctx[0]);},m(target,anchor){insert(target,div1,anchor);mount_component(skeleton0,div1,null);append(div1,t0);append(div1,div0);mount_component(skeleton1,div0,null);append(div0,t1);mount_component(skeleton2,div0,null);current=true;},p(ctx,dirty){const skeleton0_changes={};if(dirty&/*size*/2)skeleton0_changes.size=/*size*/ctx[1];skeleton0.$set(skeleton0_changes);const skeleton1_changes={};if(dirty&/*size*/2)skeleton1_changes.size=/*size*/ctx[1];skeleton1.$set(skeleton1_changes);const skeleton2_changes={};if(dirty&/*size*/2)skeleton2_changes.size=/*size*/ctx[1];if(dirty&/*linecount*/4)skeleton2_changes.linecount=/*linecount*/ctx[2];skeleton2.$set(skeleton2_changes);if(!current||dirty&/*size*/2&&div1_class_value!==(div1_class_value="card card-"+/*size*/ctx[1])){attr(div1,"class",div1_class_value);}if(!current||dirty&/*maxwidth*/1){set_style(div1,"--max-width",/*maxwidth*/ctx[0]);}},i(local){if(current)return;transition_in(skeleton0.$$.fragment,local);transition_in(skeleton1.$$.fragment,local);transition_in(skeleton2.$$.fragment,local);current=true;},o(local){transition_out(skeleton0.$$.fragment,local);transition_out(skeleton1.$$.fragment,local);transition_out(skeleton2.$$.fragment,local);current=false;},d(detaching){if(detaching)detach(div1);destroy_component(skeleton0);destroy_component(skeleton1);destroy_component(skeleton2);}};}// (65:4) {#each Array(Number.parseInt(linecount+"")) as _item}
392
- function create_each_block$3(ctx){let skeleton;let current;skeleton=new Skeleton({props:{type:"text",size:/*size*/ctx[1],linecount:/*linecount*/ctx[2]}});return {c(){create_component(skeleton.$$.fragment);},m(target,anchor){mount_component(skeleton,target,anchor);current=true;},p(ctx,dirty){const skeleton_changes={};if(dirty&/*size*/2)skeleton_changes.size=/*size*/ctx[1];if(dirty&/*linecount*/4)skeleton_changes.linecount=/*linecount*/ctx[2];skeleton.$set(skeleton_changes);},i(local){if(current)return;transition_in(skeleton.$$.fragment,local);current=true;},o(local){transition_out(skeleton.$$.fragment,local);current=false;},d(detaching){destroy_component(skeleton,detaching);}};}function create_fragment$p(ctx){let div;let current_block_type_index;let if_block;let div_style_value;let current;const if_block_creators=[create_if_block$c,create_if_block_1$6,create_if_block_2$5,create_if_block_3$5,create_else_block$7];const if_blocks=[];function select_block_type(ctx,dirty){if(/*type*/ctx[3]==="card")return 0;if(/*type*/ctx[3]==="profile")return 1;if(/*type*/ctx[3]==="lines")return 2;if(/*type*/ctx[3]==="article")return 3;return 4;}current_block_type_index=select_block_type(ctx);if_block=if_blocks[current_block_type_index]=if_block_creators[current_block_type_index](ctx);return {c(){div=element("div");if_block.c();this.c=noop;attr(div,"data-testid",/*testid*/ctx[4]);attr(div,"style",div_style_value=""+(calculateMargin(/*mt*/ctx[5],/*mr*/ctx[6],/*mb*/ctx[7],/*ml*/ctx[8])+";"));},m(target,anchor){insert(target,div,anchor);if_blocks[current_block_type_index].m(div,null);current=true;},p(ctx,[dirty]){let previous_block_index=current_block_type_index;current_block_type_index=select_block_type(ctx);if(current_block_type_index===previous_block_index){if_blocks[current_block_type_index].p(ctx,dirty);}else {group_outros();transition_out(if_blocks[previous_block_index],1,1,()=>{if_blocks[previous_block_index]=null;});check_outros();if_block=if_blocks[current_block_type_index];if(!if_block){if_block=if_blocks[current_block_type_index]=if_block_creators[current_block_type_index](ctx);if_block.c();}else {if_block.p(ctx,dirty);}transition_in(if_block,1);if_block.m(div,null);}if(!current||dirty&/*testid*/16){attr(div,"data-testid",/*testid*/ctx[4]);}if(!current||dirty&/*mt, mr, mb, ml*/480&&div_style_value!==(div_style_value=""+(calculateMargin(/*mt*/ctx[5],/*mr*/ctx[6],/*mb*/ctx[7],/*ml*/ctx[8])+";"))){attr(div,"style",div_style_value);}},i(local){if(current)return;transition_in(if_block);current=true;},o(local){transition_out(if_block);current=false;},d(detaching){if(detaching)detach(div);if_blocks[current_block_type_index].d();}};}function instance$m($$self,$$props,$$invalidate){const[Types,validateType]=typeValidator("Skeleton type",["image","text","title","text-small","avatar","header","paragraph","thumbnail","card","lines","profile","article"],true);const[Sizes,validateSize]=typeValidator("Skeleton size",["1","2","3","4"]);let{maxwidth=""}=$$props;let{size="1"}=$$props;let{linecount=3}=$$props;let{type}=$$props;let{testid=""}=$$props;let{mt=null}=$$props;let{mr=null}=$$props;let{mb=null}=$$props;let{ml=null}=$$props;onMount(()=>{setTimeout(()=>validateType(type),1);validateSize(size);});$$self.$$set=$$props=>{if('maxwidth'in $$props)$$invalidate(0,maxwidth=$$props.maxwidth);if('size'in $$props)$$invalidate(1,size=$$props.size);if('linecount'in $$props)$$invalidate(2,linecount=$$props.linecount);if('type'in $$props)$$invalidate(3,type=$$props.type);if('testid'in $$props)$$invalidate(4,testid=$$props.testid);if('mt'in $$props)$$invalidate(5,mt=$$props.mt);if('mr'in $$props)$$invalidate(6,mr=$$props.mr);if('mb'in $$props)$$invalidate(7,mb=$$props.mb);if('ml'in $$props)$$invalidate(8,ml=$$props.ml);};return [maxwidth,size,linecount,type,testid,mt,mr,mb,ml];}class Skeleton extends SvelteElement{constructor(options){super();const style=document.createElement('style');style.textContent=`:host{box-sizing:border-box;font-family:var(--goa-font-family-sans)}@keyframes pulse{0%{opacity:0.5}50%{opacity:1}100%{opacity:0.5}}.skeleton{background-color:var(--goa-color-greyscale-100);animation:pulse 2s infinite ease-in-out;overflow:hidden;margin:10px 0}.image,.image-1{background-color:var(--goa-color-greyscale-100);flex:1 1 100px;height:100px;margin:0}.image-2{height:140px}.image-3{height:200px}.image-4{height:300px}.text,.text-1,.text-2,.text-3,.text-4{width:100%;height:.75rem;border-radius:0.25rem;margin:6px 0}.title,.title-1,.title-2{width:100%;height:.75rem;border-radius:0.25rem}.title-3{height:.8rem}.title-4{height:1rem}.text-small,.text-small-1{width:30%;height:6px;border-radius:2px}.text-small-2{width:40%;height:8px;border-radius:2px}.text-small-3{width:50%;height:10px;border-radius:3px}.text-small-4{width:70%;height:12px;border-radius:4px}.paragraph{width:100%;height:70px;border-radius:4px}.header,.header-1{width:50%;height:18px;margin:12px 0;border-radius:0.25rem}.header-2{width:60%;height:20px;margin:14px 0;border-radius:0.25rem}.header-3{width:70%;height:22px;margin:16px 0;border-radius:0.25rem}.header-4{width:80%;height:24px;margin:18px 0;border-radius:0.3rem}.avatar{display:inline-block}.avatar,.avatar-1{width:40px;height:40px;border-radius:50%}.avatar-2{width:60px;height:60px;border-radius:50%}.avatar-3{width:80px;height:80px;border-radius:50%}.avatar-4{width:120px;height:120px;border-radius:50%}.thumbnail{display:inline-block}.thumbnail,.thumbnail-1{width:40px;height:40px;border-radius:4px}.thumbnail-2{width:60px;height:60px;border-radius:4px}.thumbnail-3{width:80px;height:80px;border-radius:4px}.thumbnail-4{width:120px;height:120px;border-radius:4px}.card{display:inline-block}.card,.card-1,.card-2,.card-3,.card-4{border:1px solid var(--goa-color-greyscale-100);border-radius:4px}.card{width:100%}@media screen and (max-width: 623px){@media not (max-color:2147477350){.card{max-width:var(--max-width)}}}@media not screen and (max-width: 623px){@media not (color:2147477350){.card{max-width:var(--max-width)}}}.card-content{flex:1 1 auto;padding:1rem}.profile{display:flex;flex-direction:row;align-items:center}.profile-1{max-width:280px;gap:1rem}.profile-2{max-width:360px;gap:1rem}.profile-3{max-width:480px;gap:1rem}.profile-4{max-width:560px;gap:1rem}.profile .profile-avatar{flex-shrink:0}.profile .profile-name{flex:1 1 auto}`;this.shadowRoot.appendChild(style);init(this,{target:this.shadowRoot,props:attribute_to_object(this.attributes),customElement:true},instance$m,create_fragment$p,safe_not_equal,{maxwidth:0,size:1,linecount:2,type:3,testid:4,mt:5,mr:6,mb:7,ml:8},null);if(options){if(options.target){insert(options.target,this,options.anchor);}if(options.props){this.$set(options.props);flush();}}}static get observedAttributes(){return ["maxwidth","size","linecount","type","testid","mt","mr","mb","ml"];}get maxwidth(){return this.$$.ctx[0];}set maxwidth(maxwidth){this.$$set({maxwidth});flush();}get size(){return this.$$.ctx[1];}set size(size){this.$$set({size});flush();}get linecount(){return this.$$.ctx[2];}set linecount(linecount){this.$$set({linecount});flush();}get type(){return this.$$.ctx[3];}set type(type){this.$$set({type});flush();}get testid(){return this.$$.ctx[4];}set testid(testid){this.$$set({testid});flush();}get mt(){return this.$$.ctx[5];}set mt(mt){this.$$set({mt});flush();}get mr(){return this.$$.ctx[6];}set mr(mr){this.$$set({mr});flush();}get mb(){return this.$$.ctx[7];}set mb(mb){this.$$set({mb});flush();}get ml(){return this.$$.ctx[8];}set ml(ml){this.$$set({ml});flush();}}customElements.define("goa-skeleton",Skeleton);/* src/components/spacer/Spacer.svelte generated by Svelte v3.59.2 */function create_fragment$o(ctx){let div;return {c(){div=element("div");this.c=noop;},m(target,anchor){insert(target,div,anchor);/*div_binding*/ctx[3](div);},p:noop,i:noop,o:noop,d(detaching){if(detaching)detach(div);/*div_binding*/ctx[3](null);}};}function instance$l($$self,$$props,$$invalidate){let{hspacing="none"}=$$props;let{vspacing="none"}=$$props;let rootEl;onMount(()=>{injectCss(rootEl,":host",{display:"block",width:hspacing==="fill"?"100%":`var(--goa-space-${hspacing})`,height:`var(--goa-space-${vspacing})`});});function div_binding($$value){binding_callbacks[$$value?'unshift':'push'](()=>{rootEl=$$value;$$invalidate(0,rootEl);});}$$self.$$set=$$props=>{if('hspacing'in $$props)$$invalidate(1,hspacing=$$props.hspacing);if('vspacing'in $$props)$$invalidate(2,vspacing=$$props.vspacing);};return [rootEl,hspacing,vspacing,div_binding];}class Spacer extends SvelteElement{constructor(options){super();init(this,{target:this.shadowRoot,props:attribute_to_object(this.attributes),customElement:true},instance$l,create_fragment$o,safe_not_equal,{hspacing:1,vspacing:2},null);if(options){if(options.target){insert(options.target,this,options.anchor);}if(options.props){this.$set(options.props);flush();}}}static get observedAttributes(){return ["hspacing","vspacing"];}get hspacing(){return this.$$.ctx[1];}set hspacing(hspacing){this.$$set({hspacing});flush();}get vspacing(){return this.$$.ctx[2];}set vspacing(vspacing){this.$$set({vspacing});flush();}}customElements.define("goa-spacer",Spacer);const subscriber_queue=[];/**
393
- * Create a `Writable` store that allows both updating and reading by subscription.
394
- * @param {*=}value initial value
395
- * @param {StartStopNotifier=} start
396
- */function writable(value,start=noop){let stop;const subscribers=new Set();function set(new_value){if(safe_not_equal(value,new_value)){value=new_value;if(stop){// store is ready
397
- const run_queue=!subscriber_queue.length;for(const subscriber of subscribers){subscriber[1]();subscriber_queue.push(subscriber,value);}if(run_queue){for(let i=0;i<subscriber_queue.length;i+=2){subscriber_queue[i][0](subscriber_queue[i+1]);}subscriber_queue.length=0;}}}}function update(fn){set(fn(value));}function subscribe(run,invalidate=noop){const subscriber=[run,invalidate];subscribers.add(subscriber);if(subscribers.size===1){stop=start(set)||noop;}run(value);return ()=>{subscribers.delete(subscriber);if(subscribers.size===0&&stop){stop();stop=null;}};}return {set,update,subscribe};}function is_date(obj){return Object.prototype.toString.call(obj)==='[object Date]';}function get_interpolator(a,b){if(a===b||a!==a)return ()=>a;const type=typeof a;if(type!==typeof b||Array.isArray(a)!==Array.isArray(b)){throw new Error('Cannot interpolate values of different type');}if(Array.isArray(a)){const arr=b.map((bi,i)=>{return get_interpolator(a[i],bi);});return t=>arr.map(fn=>fn(t));}if(type==='object'){if(!a||!b)throw new Error('Object cannot be null');if(is_date(a)&&is_date(b)){a=a.getTime();b=b.getTime();const delta=b-a;return t=>new Date(a+t*delta);}const keys=Object.keys(b);const interpolators={};keys.forEach(key=>{interpolators[key]=get_interpolator(a[key],b[key]);});return t=>{const result={};keys.forEach(key=>{result[key]=interpolators[key](t);});return result;};}if(type==='number'){const delta=b-a;return t=>a+t*delta;}throw new Error(`Cannot interpolate ${type} values`);}function tweened(value,defaults={}){const store=writable(value);let task;let target_value=value;function set(new_value,opts){if(value==null){store.set(value=new_value);return Promise.resolve();}target_value=new_value;let previous_task=task;let started=false;let{delay=0,duration=400,easing=identity,interpolate=get_interpolator}=assign(assign({},defaults),opts);if(duration===0){if(previous_task){previous_task.abort();previous_task=null;}store.set(value=target_value);return Promise.resolve();}const start=now()+delay;let fn;task=loop(now=>{if(now<start)return true;if(!started){fn=interpolate(value,new_value);if(typeof duration==='function')duration=duration(value,new_value);started=true;}if(previous_task){previous_task.abort();previous_task=null;}const elapsed=now-start;if(elapsed>duration){store.set(value=new_value);return false;}// @ts-ignore
398
- store.set(value=fn(easing(elapsed/duration)));return true;});return task.promise;}return {set,update:(fn,opts)=>set(fn(target_value,value),opts),subscribe:store.subscribe};}/* src/components/spinner/Spinner.svelte generated by Svelte v3.59.2 */function create_if_block$b(ctx){let svg;let circle;let circle_stroke_value;let circle_r_value;let path;let path_d_value;let path_stroke_value;let svg_class_value;let svg_viewBox_value;return {c(){svg=svg_element("svg");circle=svg_element("circle");path=svg_element("path");attr(circle,"cx",/*radius*/ctx[3]);attr(circle,"cy",/*radius*/ctx[3]);attr(circle,"stroke",circle_stroke_value=/*invert*/ctx[0]?"var(--goa-color-info-hover)":"var(--goa-color-brand-light)");attr(circle,"stroke-width",/*strokewidth*/ctx[4]);attr(circle,"r",circle_r_value=/*radius*/ctx[3]-/*strokewidth*/ctx[4]/2);attr(path,"d",path_d_value=/*getArc*/ctx[9](/*$_progress*/ctx[7]));attr(path,"stroke-width",/*strokewidth*/ctx[4]);attr(path,"stroke",path_stroke_value=/*invert*/ctx[0]?"var(--goa-color-brand-light)":"var(--goa-color-info-default)");attr(path,"stroke-linecap","round");attr(svg,"class",svg_class_value=`spinner-${/*type*/ctx[2]}`);attr(svg,"fill","none");attr(svg,"viewBox",svg_viewBox_value="0 0 "+/*diameter*/ctx[5]+" "+/*diameter*/ctx[5]);attr(svg,"width",/*diameter*/ctx[5]);attr(svg,"height",/*diameter*/ctx[5]);attr(svg,"data-testid",/*testid*/ctx[1]);attr(svg,"xmlns","http://www.w3.org/2000/svg");},m(target,anchor){insert(target,svg,anchor);append(svg,circle);append(svg,path);},p(ctx,dirty){if(dirty&/*radius*/8){attr(circle,"cx",/*radius*/ctx[3]);}if(dirty&/*radius*/8){attr(circle,"cy",/*radius*/ctx[3]);}if(dirty&/*invert*/1&&circle_stroke_value!==(circle_stroke_value=/*invert*/ctx[0]?"var(--goa-color-info-hover)":"var(--goa-color-brand-light)")){attr(circle,"stroke",circle_stroke_value);}if(dirty&/*strokewidth*/16){attr(circle,"stroke-width",/*strokewidth*/ctx[4]);}if(dirty&/*radius, strokewidth*/24&&circle_r_value!==(circle_r_value=/*radius*/ctx[3]-/*strokewidth*/ctx[4]/2)){attr(circle,"r",circle_r_value);}if(dirty&/*$_progress*/128&&path_d_value!==(path_d_value=/*getArc*/ctx[9](/*$_progress*/ctx[7]))){attr(path,"d",path_d_value);}if(dirty&/*strokewidth*/16){attr(path,"stroke-width",/*strokewidth*/ctx[4]);}if(dirty&/*invert*/1&&path_stroke_value!==(path_stroke_value=/*invert*/ctx[0]?"var(--goa-color-brand-light)":"var(--goa-color-info-default)")){attr(path,"stroke",path_stroke_value);}if(dirty&/*type*/4&&svg_class_value!==(svg_class_value=`spinner-${/*type*/ctx[2]}`)){attr(svg,"class",svg_class_value);}if(dirty&/*diameter*/32&&svg_viewBox_value!==(svg_viewBox_value="0 0 "+/*diameter*/ctx[5]+" "+/*diameter*/ctx[5])){attr(svg,"viewBox",svg_viewBox_value);}if(dirty&/*diameter*/32){attr(svg,"width",/*diameter*/ctx[5]);}if(dirty&/*diameter*/32){attr(svg,"height",/*diameter*/ctx[5]);}if(dirty&/*testid*/2){attr(svg,"data-testid",/*testid*/ctx[1]);}},d(detaching){if(detaching)detach(svg);}};}function create_fragment$n(ctx){let if_block_anchor;let if_block=/*ready*/ctx[6]&&create_if_block$b(ctx);return {c(){if(if_block)if_block.c();if_block_anchor=empty();this.c=noop;},m(target,anchor){if(if_block)if_block.m(target,anchor);insert(target,if_block_anchor,anchor);},p(ctx,[dirty]){if(/*ready*/ctx[6]){if(if_block){if_block.p(ctx,dirty);}else {if_block=create_if_block$b(ctx);if_block.c();if_block.m(if_block_anchor.parentNode,if_block_anchor);}}else if(if_block){if_block.d(1);if_block=null;}},i:noop,o:noop,d(detaching){if(if_block)if_block.d(detaching);if(detaching)detach(if_block_anchor);}};}function instance$k($$self,$$props,$$invalidate){let diameter;let strokewidth;let radius;let pathRadius;let ready;let $_progress;let{size}=$$props;let{invert=false}=$$props;let{progress=-1}=$$props;let{testid=""}=$$props;let type="infinite";const _progress=tweened(0,{duration:500,easing:quartOut});component_subscribe($$self,_progress,value=>$$invalidate(7,$_progress=value));// Functions
399
- function getCoords(radians){const x=radius+pathRadius*Math.cos(radians);const y=radius+pathRadius*Math.sin(radians);return x+" "+y;}function getArc(progress){switch(type){case"progress":{const start=getCoords(-Math.PI/2);const end=getCoords(-Math.PI/2+2*Math.PI*(progress/100));const largeArcFlag=progress%100<50?0:1;return `M ${start} A ${pathRadius} ${pathRadius} 0 ${largeArcFlag} 1 ${end}`;}case"infinite":{const start=getCoords(Math.PI*1.5);const end=getCoords(0);return `M ${start} A ${pathRadius} ${pathRadius} 0 1 0 ${end}`;}}}$$self.$$set=$$props=>{if('size'in $$props)$$invalidate(10,size=$$props.size);if('invert'in $$props)$$invalidate(0,invert=$$props.invert);if('progress'in $$props)$$invalidate(11,progress=$$props.progress);if('testid'in $$props)$$invalidate(1,testid=$$props.testid);};$$self.$$.update=()=>{if($$self.$$.dirty&/*progress*/2048){// Reactive
400
- {// Typescript recognizes `progress` as a number, but once compiled, due to it being a web component, progress is a string.
401
- // This line makes both sides happy.
402
- const p=parseFloat(progress+'');if(p>=0){_progress.set(p||1);// start at 1 to prevent incorrect arc calculations
403
- $$invalidate(2,type="progress");}}}if($$self.$$.dirty&/*size*/1024){$$invalidate(5,diameter=size&&{small:16,medium:32,large:64,xlarge:100}[size]);}if($$self.$$.dirty&/*size*/1024){$$invalidate(4,strokewidth=size&&{small:2,medium:4,large:7,xlarge:9}[size]);}if($$self.$$.dirty&/*diameter*/32){$$invalidate(3,radius=diameter/2);}if($$self.$$.dirty&/*radius, strokewidth*/24){$$invalidate(12,pathRadius=radius-strokewidth/2);}if($$self.$$.dirty&/*type, pathRadius, progress*/6148){$$invalidate(6,ready=type==="infinite"?pathRadius:pathRadius&&progress);}};return [invert,testid,type,radius,strokewidth,diameter,ready,$_progress,_progress,getArc,size,progress,pathRadius];}class Spinner extends SvelteElement{constructor(options){super();const style=document.createElement('style');style.textContent=`:host{box-sizing:border-box;font-family:var(--goa-font-family-sans)}@keyframes rotate{100%{transform:rotate(360deg)}}.spinner-infinite{animation:rotate 2s linear infinite}`;this.shadowRoot.appendChild(style);init(this,{target:this.shadowRoot,props:attribute_to_object(this.attributes),customElement:true},instance$k,create_fragment$n,safe_not_equal,{size:10,invert:0,progress:11,testid:1},null);if(options){if(options.target){insert(options.target,this,options.anchor);}if(options.props){this.$set(options.props);flush();}}}static get observedAttributes(){return ["size","invert","progress","testid"];}get size(){return this.$$.ctx[10];}set size(size){this.$$set({size});flush();}get invert(){return this.$$.ctx[0];}set invert(invert){this.$$set({invert});flush();}get progress(){return this.$$.ctx[11];}set progress(progress){this.$$set({progress});flush();}get testid(){return this.$$.ctx[1];}set testid(testid){this.$$set({testid});flush();}}customElements.define("goa-spinner",Spinner);/* src/components/table/Table.svelte generated by Svelte v3.59.2 */function create_else_block$6(ctx){let table;let slot;let table_style_value;return {c(){table=element("table");slot=element("slot");attr(table,"style",table_style_value=/*width*/ctx[0]&&"width: 100%;");},m(target,anchor){insert(target,table,anchor);append(table,slot);},p(ctx,dirty){if(dirty&/*width*/1&&table_style_value!==(table_style_value=/*width*/ctx[0]&&"width: 100%;")){attr(table,"style",table_style_value);}},d(detaching){if(detaching)detach(table);}};}// (85:2) {#if _isTableRoot}
404
- function create_if_block$a(ctx){let slot;return {c(){slot=element("slot");},m(target,anchor){insert(target,slot,anchor);},p:noop,d(detaching){if(detaching)detach(slot);}};}function create_fragment$m(ctx){let div;let div_class_value;let div_style_value;function select_block_type(ctx,dirty){if(/*_isTableRoot*/ctx[7])return create_if_block$a;return create_else_block$6;}let current_block_type=select_block_type(ctx);let if_block=current_block_type(ctx);return {c(){div=element("div");if_block.c();this.c=noop;attr(div,"class",div_class_value=`goatable ${/*variant*/ctx[1]}`);attr(div,"style",div_style_value=`
405
- ${/*width*/ctx[0]&&`width: ${/*width*/ctx[0]};`}
406
- ${calculateMargin(/*mt*/ctx[2],/*mr*/ctx[3],/*mb*/ctx[4],/*ml*/ctx[5])}
407
- `);toggle_class(div,"sticky",/*_stickyHeader*/ctx[8]);},m(target,anchor){insert(target,div,anchor);if_block.m(div,null);/*div_binding*/ctx[10](div);},p(ctx,[dirty]){if(current_block_type===(current_block_type=select_block_type(ctx))&&if_block){if_block.p(ctx,dirty);}else {if_block.d(1);if_block=current_block_type(ctx);if(if_block){if_block.c();if_block.m(div,null);}}if(dirty&/*variant*/2&&div_class_value!==(div_class_value=`goatable ${/*variant*/ctx[1]}`)){attr(div,"class",div_class_value);}if(dirty&/*width, mt, mr, mb, ml*/61&&div_style_value!==(div_style_value=`
408
- ${/*width*/ctx[0]&&`width: ${/*width*/ctx[0]};`}
409
- ${calculateMargin(/*mt*/ctx[2],/*mr*/ctx[3],/*mb*/ctx[4],/*ml*/ctx[5])}
410
- `)){attr(div,"style",div_style_value);}if(dirty&/*variant, _stickyHeader*/258){toggle_class(div,"sticky",/*_stickyHeader*/ctx[8]);}},i:noop,o:noop,d(detaching){if(detaching)detach(div);if_block.d();/*div_binding*/ctx[10](null);}};}function dispatch(el,params){el.dispatchEvent(new CustomEvent("_sort",{composed:true,bubbles:true,cancelable:false,detail:params}));}function instance$j($$self,$$props,$$invalidate){let _stickyHeader;const[Variants,validateVariant]=typeValidator("Table variant",["normal","relaxed"],true);let{width=""}=$$props;let{stickyheader="false"}=$$props;let{variant="normal"}=$$props;let{mt=null}=$$props;let{mr=null}=$$props;let{mb=null}=$$props;let{ml=null}=$$props;// Private
411
- let _rootEl;let _isTableRoot=false;onMount(()=>{validateVariant(variant);// without setTimeout it won't properly sort in Safari
412
- setTimeout(attachSortEventHandling,0);// exit here if when running tests (tests don't have assignedElements)
413
- const slot=_rootEl.querySelector("slot");if(!slot||slot.assignedElements().length===0){return;}// React has everything nested in a table to prevent invalid DOM errors
414
- $$invalidate(7,_isTableRoot=slot.assignedElements()[0].tagName==="TABLE");});async function attachSortEventHandling(){var _a;await tick();const contentSlot=_rootEl.querySelector("slot");const headings=(_a=contentSlot.assignedElements().find(el=>el.tagName==="THEAD"||el.tagName==="TABLE"))===null||_a===void 0?void 0:_a.querySelectorAll("goa-table-sort-header");headings===null||headings===void 0?void 0:headings.forEach(heading=>{heading.addEventListener("click",()=>{const sortBy=heading.getAttribute("name");let sortDir;// relay state to all children
415
- headings.forEach(child=>{if(child.getAttribute("name")===sortBy){const direction=child["direction"];// starting direction is asc
416
- const newDirection=direction==="asc"?"desc":"asc";sortDir=newDirection==="asc"?1:-1;child.setAttribute("direction",newDirection);}else {child.setAttribute("direction","none");}});dispatch(heading,{sortBy,sortDir});});// dispatch the default sort params if initially set
417
- const initialSortBy=heading.getAttribute("name");const initialDirection=heading["direction"];if(initialDirection&&initialDirection!=="none"){setTimeout(()=>{dispatch(heading,{sortBy:initialSortBy,sortDir:initialDirection==="asc"?1:-1});},10);}});}function div_binding($$value){binding_callbacks[$$value?'unshift':'push'](()=>{_rootEl=$$value;$$invalidate(6,_rootEl);});}$$self.$$set=$$props=>{if('width'in $$props)$$invalidate(0,width=$$props.width);if('stickyheader'in $$props)$$invalidate(9,stickyheader=$$props.stickyheader);if('variant'in $$props)$$invalidate(1,variant=$$props.variant);if('mt'in $$props)$$invalidate(2,mt=$$props.mt);if('mr'in $$props)$$invalidate(3,mr=$$props.mr);if('mb'in $$props)$$invalidate(4,mb=$$props.mb);if('ml'in $$props)$$invalidate(5,ml=$$props.ml);};$$self.$$.update=()=>{if($$self.$$.dirty&/*stickyheader*/512){$$invalidate(8,_stickyHeader=toBoolean(stickyheader));}};return [width,variant,mt,mr,mb,ml,_rootEl,_isTableRoot,_stickyHeader,stickyheader,div_binding];}class Table extends SvelteElement{constructor(options){super();const style=document.createElement('style');style.textContent=`:host{overflow-x:auto}.goatable{width:0}table{border-collapse:collapse}`;this.shadowRoot.appendChild(style);init(this,{target:this.shadowRoot,props:attribute_to_object(this.attributes),customElement:true},instance$j,create_fragment$m,safe_not_equal,{width:0,stickyheader:9,variant:1,mt:2,mr:3,mb:4,ml:5},null);if(options){if(options.target){insert(options.target,this,options.anchor);}if(options.props){this.$set(options.props);flush();}}}static get observedAttributes(){return ["width","stickyheader","variant","mt","mr","mb","ml"];}get width(){return this.$$.ctx[0];}set width(width){this.$$set({width});flush();}get stickyheader(){return this.$$.ctx[9];}set stickyheader(stickyheader){this.$$set({stickyheader});flush();}get variant(){return this.$$.ctx[1];}set variant(variant){this.$$set({variant});flush();}get mt(){return this.$$.ctx[2];}set mt(mt){this.$$set({mt});flush();}get mr(){return this.$$.ctx[3];}set mr(mr){this.$$set({mr});flush();}get mb(){return this.$$.ctx[4];}set mb(mb){this.$$set({mb});flush();}get ml(){return this.$$.ctx[5];}set ml(ml){this.$$set({ml});flush();}}customElements.define("goa-table",Table);/* src/components/table/TableSortHeader.svelte generated by Svelte v3.59.2 */function create_else_block$5(ctx){let div;return {c(){div=element("div");div.innerHTML=`<goa-icon type="caret-up" size="small"></goa-icon>
418
- <goa-icon type="caret-down" size="small"></goa-icon>`;attr(div,"class","direction--none");},m(target,anchor){insert(target,div,anchor);},d(detaching){if(detaching)detach(div);}};}// (69:32)
419
- function create_if_block_1$5(ctx){let goa_icon;return {c(){goa_icon=element("goa-icon");set_custom_element_data(goa_icon,"type","caret-up");set_custom_element_data(goa_icon,"size","small");},m(target,anchor){insert(target,goa_icon,anchor);},d(detaching){if(detaching)detach(goa_icon);}};}// (67:2) {#if direction === "desc"}
420
- function create_if_block$9(ctx){let goa_icon;return {c(){goa_icon=element("goa-icon");set_custom_element_data(goa_icon,"type","caret-down");set_custom_element_data(goa_icon,"size","small");},m(target,anchor){insert(target,goa_icon,anchor);},d(detaching){if(detaching)detach(goa_icon);}};}function create_fragment$l(ctx){let button;let slot;let t;function select_block_type(ctx,dirty){if(/*direction*/ctx[0]==="desc")return create_if_block$9;if(/*direction*/ctx[0]==="asc")return create_if_block_1$5;return create_else_block$5;}let current_block_type=select_block_type(ctx);let if_block=current_block_type(ctx);return {c(){button=element("button");slot=element("slot");t=space();if_block.c();this.c=noop;},m(target,anchor){insert(target,button,anchor);append(button,slot);append(button,t);if_block.m(button,null);},p(ctx,[dirty]){if(current_block_type!==(current_block_type=select_block_type(ctx))){if_block.d(1);if_block=current_block_type(ctx);if(if_block){if_block.c();if_block.m(button,null);}}},i:noop,o:noop,d(detaching){if(detaching)detach(button);if_block.d();}};}function instance$i($$self,$$props,$$invalidate){let{direction="none"}=$$props;$$self.$$set=$$props=>{if('direction'in $$props)$$invalidate(0,direction=$$props.direction);};return [direction];}class TableSortHeader extends SvelteElement{constructor(options){super();const style=document.createElement('style');style.textContent=`:host{display:flex;align-items:flex-end}button{border:none;background:none;display:flex;font-family:inherit;font-size:inherit;font-weight:inherit;color:inherit;width:100%;height:3.75rem;align-items:center;padding:0 1rem;text-align:left;gap:0.25rem;align-items:center}button:hover{background-color:var(--goa-color-greyscale-100);cursor:pointer;color:var(--goa-color-interactive-hover)}button goa-icon{color:var(--goa-color-interactive-default)}button:hover goa-icon{color:var(--goa-color-interactive-hover)}button .direction--none goa-icon{color:var(--goa-color-greyscale-400)}button:hover .direction--none goa-icon{color:var(--goa-color-greyscale-400)}goa-icon{scale:0.8}.direction--none goa-icon{height:0.625rem}.direction--none{display:inline-flex;flex-direction:column;align-items:center}`;this.shadowRoot.appendChild(style);init(this,{target:this.shadowRoot,props:attribute_to_object(this.attributes),customElement:true},instance$i,create_fragment$l,safe_not_equal,{direction:0},null);if(options){if(options.target){insert(options.target,this,options.anchor);}if(options.props){this.$set(options.props);flush();}}}static get observedAttributes(){return ["direction"];}get direction(){return this.$$.ctx[0];}set direction(direction){this.$$set({direction});flush();}}customElements.define("goa-table-sort-header",TableSortHeader);/* src/components/text-area/TextArea.svelte generated by Svelte v3.59.2 */function create_fragment$k(ctx){let div;let textarea;let textarea_aria_label_value;let t;let div_style_value;let mounted;let dispose;return {c(){div=element("div");textarea=element("textarea");t=space();this.c=noop;attr(textarea,"name",/*name*/ctx[1]);attr(textarea,"placeholder",/*placeholder*/ctx[2]);attr(textarea,"rows",/*rows*/ctx[3]);attr(textarea,"aria-label",textarea_aria_label_value=/*arialabel*/ctx[6]||/*name*/ctx[1]);attr(textarea,"class","goa-textarea");textarea.disabled=/*isDisabled*/ctx[13];textarea.readOnly=/*isReadonly*/ctx[14];attr(textarea,"data-testid",/*testid*/ctx[4]);toggle_class(textarea,"error",/*isError*/ctx[15]);attr(div,"class","container");attr(div,"style",div_style_value=`
421
- ${calculateMargin(/*mt*/ctx[7],/*mr*/ctx[8],/*mb*/ctx[9],/*ml*/ctx[10])};
422
- --width: ${/*width*/ctx[5]};
423
- `);},m(target,anchor){insert(target,div,anchor);append(div,textarea);/*textarea_binding*/ctx[19](textarea);set_input_value(textarea,/*value*/ctx[0]);append(div,t);if(!mounted){dispose=listen(textarea,"input",/*textarea_input_handler*/ctx[20]);mounted=true;}},p(ctx,[dirty]){if(dirty&/*name*/2){attr(textarea,"name",/*name*/ctx[1]);}if(dirty&/*placeholder*/4){attr(textarea,"placeholder",/*placeholder*/ctx[2]);}if(dirty&/*rows*/8){attr(textarea,"rows",/*rows*/ctx[3]);}if(dirty&/*arialabel, name*/66&&textarea_aria_label_value!==(textarea_aria_label_value=/*arialabel*/ctx[6]||/*name*/ctx[1])){attr(textarea,"aria-label",textarea_aria_label_value);}if(dirty&/*isDisabled*/8192){textarea.disabled=/*isDisabled*/ctx[13];}if(dirty&/*isReadonly*/16384){textarea.readOnly=/*isReadonly*/ctx[14];}if(dirty&/*testid*/16){attr(textarea,"data-testid",/*testid*/ctx[4]);}if(dirty&/*value*/1){set_input_value(textarea,/*value*/ctx[0]);}if(dirty&/*isError*/32768){toggle_class(textarea,"error",/*isError*/ctx[15]);}if(dirty&/*mt, mr, mb, ml, width*/1952&&div_style_value!==(div_style_value=`
424
- ${calculateMargin(/*mt*/ctx[7],/*mr*/ctx[8],/*mb*/ctx[9],/*ml*/ctx[10])};
425
- --width: ${/*width*/ctx[5]};
426
- `)){attr(div,"style",div_style_value);}},i:noop,o:noop,d(detaching){if(detaching)detach(div);/*textarea_binding*/ctx[19](null);mounted=false;dispose();}};}function instance$h($$self,$$props,$$invalidate){let isError;let isDisabled;let isReadonly;let{name}=$$props;let{value=""}=$$props;let{placeholder=""}=$$props;let{rows=3}=$$props;let{testid=""}=$$props;let{width="60ch"}=$$props;let{error="false"}=$$props;let{readonly="false"}=$$props;let{disabled="false"}=$$props;let{arialabel=""}=$$props;let{mt=null}=$$props;let{mr=null}=$$props;let{mb=null}=$$props;let{ml=null}=$$props;let{maxcharcount=0}=$$props;let _textAreaEl;function textarea_binding($$value){binding_callbacks[$$value?'unshift':'push'](()=>{_textAreaEl=$$value;$$invalidate(12,_textAreaEl);});}function textarea_input_handler(){value=this.value;$$invalidate(0,value);}$$self.$$set=$$props=>{if('name'in $$props)$$invalidate(1,name=$$props.name);if('value'in $$props)$$invalidate(0,value=$$props.value);if('placeholder'in $$props)$$invalidate(2,placeholder=$$props.placeholder);if('rows'in $$props)$$invalidate(3,rows=$$props.rows);if('testid'in $$props)$$invalidate(4,testid=$$props.testid);if('width'in $$props)$$invalidate(5,width=$$props.width);if('error'in $$props)$$invalidate(16,error=$$props.error);if('readonly'in $$props)$$invalidate(17,readonly=$$props.readonly);if('disabled'in $$props)$$invalidate(18,disabled=$$props.disabled);if('arialabel'in $$props)$$invalidate(6,arialabel=$$props.arialabel);if('mt'in $$props)$$invalidate(7,mt=$$props.mt);if('mr'in $$props)$$invalidate(8,mr=$$props.mr);if('mb'in $$props)$$invalidate(9,mb=$$props.mb);if('ml'in $$props)$$invalidate(10,ml=$$props.ml);if('maxcharcount'in $$props)$$invalidate(11,maxcharcount=$$props.maxcharcount);};$$self.$$.update=()=>{if($$self.$$.dirty&/*error*/65536){$$invalidate(15,isError=toBoolean(error));}if($$self.$$.dirty&/*disabled*/262144){$$invalidate(13,isDisabled=toBoolean(disabled));}if($$self.$$.dirty&/*readonly*/131072){$$invalidate(14,isReadonly=toBoolean(readonly));}if($$self.$$.dirty&/*_textAreaEl, isDisabled, name, value*/12291){// $: showCounter = toBoolean(showcounter);
427
- {if(_textAreaEl&&!isDisabled){_textAreaEl.dispatchEvent(new CustomEvent("_change",{composed:true,bubbles:false,cancelable:true,detail:{name,value}}));}}}};return [value,name,placeholder,rows,testid,width,arialabel,mt,mr,mb,ml,maxcharcount,_textAreaEl,isDisabled,isReadonly,isError,error,readonly,disabled,textarea_binding,textarea_input_handler];}class TextArea extends SvelteElement{constructor(options){super();const style=document.createElement('style');style.textContent=`:host{--textarea-padding-vertical:0.625rem;--textarea-padding-horizontal:var(--goa-space-s);box-sizing:border-box;font-family:var(--goa-font-family-sans)}.container{position:relative;width:100%}@media screen and (max-width: 623px){@media not (max-color:2147477350){.container{max-width:var(--width)}}}@media not screen and (max-width: 623px){@media not (color:2147477350){.container{max-width:var(--width)}}}.goa-textarea{display:block;width:100%;box-sizing:border-box;outline:none;border:1px solid var(--goa-color-greyscale-700);border-radius:3px;color:var(--goa-color-greyscale-black, #ccc);padding:var(--textarea-padding-vertical) var(--textarea-padding-horizontal);font-size:var(--goa-font-size-4);font-family:var(--goa-font-family-sans);min-width:100%;resize:vertical}@media screen and (max-width: 623px){@media not (max-color:2147477350){.goa-textarea{min-width:0;width:var(--width)}}}@media not screen and (max-width: 623px){@media not (color:2147477350){.goa-textarea{min-width:0;width:var(--width)}}}.goa-textarea[readonly]{cursor:pointer}.goa-textarea:hover{box-shadow:0 0 0 var(--goa-border-width-m) var(--goa-color-interactive-hover)}.goa-textarea:active,.goa-textarea:focus,.goa-textarea:focus-within{box-shadow:0 0 0 var(--goa-border-width-l) var(--goa-color-interactive-focus)}.goa-textarea:disabled,.goa-textarea:disabled:hover,.goa-textarea:disabled:active,.goa-textarea:disabled:focus{background-color:var(--goa-color-greyscale-100);border-color:var(--goa-color-greyscale-200);cursor:default;box-shadow:none}.counter{position:absolute;right:0;padding-top:0.25rem;font-size:var(--goa-font-size-2)}.counter-error{color:var(--goa-color-interactive-error)
428
- }.error{border:var(--goa-border-width-m) solid var(--goa-color-interactive-error);box-shadow:0 0 0 var(--goa-border-width-s) var(--goa-color-interactive-error)}.error:hover{box-shadow:0 0 0 var(--goa-border-width-m) var(--goa-color-interactive-error)}.error:active,.error:focus{box-shadow:0 0 0 var(--goa-border-width-l) var(--goa-color-interactive-focus)}`;this.shadowRoot.appendChild(style);init(this,{target:this.shadowRoot,props:attribute_to_object(this.attributes),customElement:true},instance$h,create_fragment$k,safe_not_equal,{name:1,value:0,placeholder:2,rows:3,testid:4,width:5,error:16,readonly:17,disabled:18,arialabel:6,mt:7,mr:8,mb:9,ml:10,maxcharcount:11},null);if(options){if(options.target){insert(options.target,this,options.anchor);}if(options.props){this.$set(options.props);flush();}}}static get observedAttributes(){return ["name","value","placeholder","rows","testid","width","error","readonly","disabled","arialabel","mt","mr","mb","ml","maxcharcount"];}get name(){return this.$$.ctx[1];}set name(name){this.$$set({name});flush();}get value(){return this.$$.ctx[0];}set value(value){this.$$set({value});flush();}get placeholder(){return this.$$.ctx[2];}set placeholder(placeholder){this.$$set({placeholder});flush();}get rows(){return this.$$.ctx[3];}set rows(rows){this.$$set({rows});flush();}get testid(){return this.$$.ctx[4];}set testid(testid){this.$$set({testid});flush();}get width(){return this.$$.ctx[5];}set width(width){this.$$set({width});flush();}get error(){return this.$$.ctx[16];}set error(error){this.$$set({error});flush();}get readonly(){return this.$$.ctx[17];}set readonly(readonly){this.$$set({readonly});flush();}get disabled(){return this.$$.ctx[18];}set disabled(disabled){this.$$set({disabled});flush();}get arialabel(){return this.$$.ctx[6];}set arialabel(arialabel){this.$$set({arialabel});flush();}get mt(){return this.$$.ctx[7];}set mt(mt){this.$$set({mt});flush();}get mr(){return this.$$.ctx[8];}set mr(mr){this.$$set({mr});flush();}get mb(){return this.$$.ctx[9];}set mb(mb){this.$$set({mb});flush();}get ml(){return this.$$.ctx[10];}set ml(ml){this.$$set({ml});flush();}get maxcharcount(){return this.$$.ctx[11];}set maxcharcount(maxcharcount){this.$$set({maxcharcount});flush();}}customElements.define("goa-textarea",TextArea);/* src/components/tooltip/Tooltip.svelte generated by Svelte v3.59.2 */const{window:window_1$1}=globals;function create_fragment$j(ctx){let div1;let div0;let t0;let span;let t1;let span_id_value;let span_class_value;let div1_class_value;let div1_aria_describedby_value;let div1_style_value;let mounted;let dispose;add_render_callback(/*onwindowresize*/ctx[16]);return {c(){div1=element("div");div0=element("div");div0.innerHTML=`<slot></slot>`;t0=space();span=element("span");t1=text(/*content*/ctx[1]);this.c=noop;attr(div0,"class","tooltiptarget");attr(span,"id",span_id_value=""+(/*_tooltipInstanceId*/ctx[13]+"-tooltip"));attr(span,"class",span_class_value="tooltiptext "+/*position*/ctx[0]+" align-"+/*halign*/ctx[3]);set_style(span,"visibility",/*_tooltipVisible*/ctx[11]?'visible':'hidden');attr(div1,"class",div1_class_value="tooltip align-"+/*halign*/ctx[3]);attr(div1,"data-testid",/*testid*/ctx[2]);attr(div1,"role","tooltip");attr(div1,"aria-describedby",div1_aria_describedby_value=""+(/*_tooltipInstanceId*/ctx[13]+"-tooltip"));attr(div1,"tabindex","0");attr(div1,"style",div1_style_value=calculateMargin(/*mt*/ctx[4],/*mr*/ctx[5],/*mb*/ctx[6],/*ml*/ctx[7]));},m(target,anchor){insert(target,div1,anchor);append(div1,div0);append(div1,t0);append(div1,span);append(span,t1);/*span_binding*/ctx[17](span);/*div1_binding*/ctx[18](div1);if(!mounted){dispose=[listen(window_1$1,"resize",/*onwindowresize*/ctx[16]),listen(div1,"mouseenter",/*mouseenter_handler*/ctx[19]),listen(div1,"mouseleave",/*hideTooltip*/ctx[15]),listen(div1,"focus",/*focus_handler*/ctx[20]),listen(div1,"blur",/*hideTooltip*/ctx[15])];mounted=true;}},p(ctx,[dirty]){if(dirty&/*content*/2)set_data(t1,/*content*/ctx[1]);if(dirty&/*_tooltipInstanceId*/8192&&span_id_value!==(span_id_value=""+(/*_tooltipInstanceId*/ctx[13]+"-tooltip"))){attr(span,"id",span_id_value);}if(dirty&/*position, halign*/9&&span_class_value!==(span_class_value="tooltiptext "+/*position*/ctx[0]+" align-"+/*halign*/ctx[3])){attr(span,"class",span_class_value);}if(dirty&/*_tooltipVisible*/2048){set_style(span,"visibility",/*_tooltipVisible*/ctx[11]?'visible':'hidden');}if(dirty&/*halign*/8&&div1_class_value!==(div1_class_value="tooltip align-"+/*halign*/ctx[3])){attr(div1,"class",div1_class_value);}if(dirty&/*testid*/4){attr(div1,"data-testid",/*testid*/ctx[2]);}if(dirty&/*_tooltipInstanceId*/8192&&div1_aria_describedby_value!==(div1_aria_describedby_value=""+(/*_tooltipInstanceId*/ctx[13]+"-tooltip"))){attr(div1,"aria-describedby",div1_aria_describedby_value);}if(dirty&/*mt, mr, mb, ml*/240&&div1_style_value!==(div1_style_value=calculateMargin(/*mt*/ctx[4],/*mr*/ctx[5],/*mb*/ctx[6],/*ml*/ctx[7]))){attr(div1,"style",div1_style_value);}},i:noop,o:noop,d(detaching){if(detaching)detach(div1);/*span_binding*/ctx[17](null);/*div1_binding*/ctx[18](null);mounted=false;run_all(dispose);}};}function instance$g($$self,$$props,$$invalidate){const[Positions,validatePosition]=typeValidator("Tooltip positions",["top","bottom","left","right"],false);const[Alignment,validateAlignment]=typeValidator("Tooltip alignment",["left","right","center"],false);const validator=(position,align)=>{if(position==="left"||position==="right"){if(align!=="center"){console.error(`[${align}] is an invalid option for position ${position}`);}}};let{content=""}=$$props;let{testid=""}=$$props;let{position="top"}=$$props;let{halign="center"}=$$props;let{mt=null}=$$props;let{mr=null}=$$props;let{mb=null}=$$props;let{ml=null}=$$props;let _screenSize=0;let _rootEl;let _tooltipEl;let _initialPosition;let _tooltipVisible=false;let _showTooltipTimeout=null;let _hideTooltipTimeout=null;/**
429
- * Use a unique id for each tooltip instance.
430
- * So screen readers can identify the tooltip instance when
431
- * there are multiple tooltips on the same page
432
- */let _tooltipInstanceId;onMount(()=>{setTimeout(()=>{validatePosition(position);validateAlignment(halign);validator(position,halign);},1);_initialPosition=position;$$invalidate(13,_tooltipInstanceId=Math.random().toString(36));_tooltipEl.getBoundingClientRect().width;window.addEventListener("resize",checkAndAdjustPosition);checkAndAdjustPosition();});onDestroy(()=>{window.removeEventListener("resize",checkAndAdjustPosition);clearTimeout(_showTooltipTimeout);clearTimeout(_hideTooltipTimeout);});const showTooltip=()=>{_showTooltipTimeout=setTimeout(()=>{$$invalidate(11,_tooltipVisible=true);checkAndAdjustPosition();},300);// delay of 0.3s
433
- };const hideTooltip=()=>{clearTimeout(_showTooltipTimeout);// cancel any pending show action
434
- $$invalidate(12,_hideTooltipTimeout=setTimeout(()=>{$$invalidate(11,_tooltipVisible=false);$$invalidate(0,position=_initialPosition);// reset position back to initial
435
- },500));// delay of 0.5s
436
- };function checkAndAdjustPosition(){if(!_tooltipEl||!_rootEl){return;}// determine the bounding rectangle of the tooltip and root element
437
- const tooltipRect=_tooltipEl.getBoundingClientRect();const rootRect=_rootEl.getBoundingClientRect();const spaceTop=rootRect.top;const spaceBottom=window.innerHeight-rootRect.bottom;const spaceLeft=rootRect.left;const spaceRight=window.innerWidth-rootRect.right;const newWidth=Math.min(_screenSize*0.8,400,tooltipRect.width,Math.max(spaceLeft,spaceRight)-10);const shouldWrapContent=newWidth>rootRect.width||newWidth>spaceLeft||newWidth>spaceRight;$$invalidate(9,_tooltipEl.style.width=`${newWidth-32}px`,_tooltipEl);if(shouldWrapContent){$$invalidate(9,_tooltipEl.style.whiteSpace="normal",_tooltipEl);}else {$$invalidate(9,_tooltipEl.style.whiteSpace="nowrap",_tooltipEl);}let newPosition=position;// use a local variable to determine the new position
438
- let newAlign=halign;// use a local variable to determine the new position
439
- // check if there is enough space for the tooltip in the initial position
440
- if(position==="bottom"&&tooltipRect.height>spaceBottom){newPosition="top";}else if(position==="top"&&tooltipRect.height>spaceTop){newPosition="bottom";}// similar check for left and right position
441
- if(position==="right"&&tooltipRect.width>spaceRight){newPosition="left";}else if(position==="left"&&tooltipRect.width>spaceLeft){newPosition="right";}// similar check for left and right alignmewnt
442
- if(halign==="right"&&tooltipRect.width>spaceRight){newAlign="left";}else if(halign==="left"&&tooltipRect.width>spaceLeft){newAlign="right";}else if(halign==="center"&&(position==="top"||position==="bottom")&&(tooltipRect.width/2>spaceLeft||tooltipRect.width/2>spaceRight)){newAlign=spaceLeft>spaceRight?"left":"right";}// update tooltip position
443
- $$invalidate(9,_tooltipEl.className=`tooltiptext ${newPosition} align-${newAlign}`,_tooltipEl);}function onwindowresize(){$$invalidate(10,_screenSize=window_1$1.innerWidth);}function span_binding($$value){binding_callbacks[$$value?'unshift':'push'](()=>{_tooltipEl=$$value;$$invalidate(9,_tooltipEl);});}function div1_binding($$value){binding_callbacks[$$value?'unshift':'push'](()=>{_rootEl=$$value;$$invalidate(8,_rootEl);});}const mouseenter_handler=()=>{clearTimeout(_hideTooltipTimeout);showTooltip();};const focus_handler=()=>{clearTimeout(_hideTooltipTimeout);showTooltip();};$$self.$$set=$$props=>{if('content'in $$props)$$invalidate(1,content=$$props.content);if('testid'in $$props)$$invalidate(2,testid=$$props.testid);if('position'in $$props)$$invalidate(0,position=$$props.position);if('halign'in $$props)$$invalidate(3,halign=$$props.halign);if('mt'in $$props)$$invalidate(4,mt=$$props.mt);if('mr'in $$props)$$invalidate(5,mr=$$props.mr);if('mb'in $$props)$$invalidate(6,mb=$$props.mb);if('ml'in $$props)$$invalidate(7,ml=$$props.ml);};$$self.$$.update=()=>{if($$self.$$.dirty&/*_rootEl, _tooltipEl*/768){{if(_rootEl&&_tooltipEl){_rootEl.style.setProperty("--target-width",`${_rootEl.getBoundingClientRect().width/2}px`);}}}if($$self.$$.dirty&/*content*/2){// call checkAndAdjustPosition function when content changes
444
- {checkAndAdjustPosition();}}};return [position,content,testid,halign,mt,mr,mb,ml,_rootEl,_tooltipEl,_screenSize,_tooltipVisible,_hideTooltipTimeout,_tooltipInstanceId,showTooltip,hideTooltip,onwindowresize,span_binding,div1_binding,mouseenter_handler,focus_handler];}class Tooltip extends SvelteElement{constructor(options){super();const style=document.createElement('style');style.textContent=`:host{box-sizing:border-box;font-family:var(--goa-font-family-sans)}.tooltip{position:relative;display:inline-flex;justify-content:center;align-items:center;cursor:pointer}.tooltiptext{visibility:hidden;font:var(--goa-typography-body-s);background-color:var(--goa-color-greyscale-700);color:var(--goa-color-text-light);text-align:center;border-radius:var(--goa-border-radius-m);position:absolute;z-index:1;opacity:0;transition:opacity 0.3s;padding:var(--goa-space-xs) var(--goa-space-m);text-align:left;white-space:nowrap;display:flex;flex-direction:column}.tooltiptarget{margin:4px}.tooltiptext.bottom{top:calc(100% + 10px)}.tooltiptext.top{bottom:calc(100% + 10px)}.tooltiptext.right{left:calc(100% + 10px)}.tooltiptext.left{right:calc(100% + 10px)}.tooltip:hover .tooltiptext,.tooltip:focus .tooltiptext{opacity:1}.tooltiptext.bottom::before,.tooltiptext.top::before,.tooltiptext.left::before,.tooltiptext.right::before{content:"";position:absolute;border-style:solid;aria-hidden:true}.tooltiptext.bottom::before{top:-10px;left:50%;border-width:0 10px 10px 10px;transform:translateX(-50%);border-color:transparent transparent var(--goa-color-greyscale-700) transparent}.tooltiptext.top::before{bottom:-10px;left:50%;transform:translateX(-50%);border-width:10px 10px 0 10px;border-color:var(--goa-color-greyscale-700) transparent transparent transparent}.tooltiptext.left::before{top:50%;right:-10px;transform:translateY(-50%);border-width:10px 0 10px 10px;border-color:transparent transparent transparent var(--goa-color-greyscale-700)}.tooltiptext.right::before{top:50%;left:-10px;transform:translateY(-50%);border-width:10px 10px 10px 0;border-style:solid;border-color:transparent var(--goa-color-greyscale-700) transparent transparent}.tooltiptext.bottom.align-left::before,.tooltiptext.top.align-left::before{left:calc(100% - (var(--target-width) + 1rem))}.tooltiptext.bottom.align-right::before,.tooltiptext.top.align-right::before{left:calc(var(--target-width) + 1rem)}.tooltip.align-right{justify-content:flex-start}.tooltip.align-left{justify-content:flex-end}.tooltiptext.align-right{left:0;margin-left:-1rem}.tooltiptext.align-left{right:0;margin-right:-1rem}`;this.shadowRoot.appendChild(style);init(this,{target:this.shadowRoot,props:attribute_to_object(this.attributes),customElement:true},instance$g,create_fragment$j,safe_not_equal,{content:1,testid:2,position:0,halign:3,mt:4,mr:5,mb:6,ml:7},null);if(options){if(options.target){insert(options.target,this,options.anchor);}if(options.props){this.$set(options.props);flush();}}}static get observedAttributes(){return ["content","testid","position","halign","mt","mr","mb","ml"];}get content(){return this.$$.ctx[1];}set content(content){this.$$set({content});flush();}get testid(){return this.$$.ctx[2];}set testid(testid){this.$$set({testid});flush();}get position(){return this.$$.ctx[0];}set position(position){this.$$set({position});flush();}get halign(){return this.$$.ctx[3];}set halign(halign){this.$$set({halign});flush();}get mt(){return this.$$.ctx[4];}set mt(mt){this.$$set({mt});flush();}get mr(){return this.$$.ctx[5];}set mr(mr){this.$$set({mr});flush();}get mb(){return this.$$.ctx[6];}set mb(mb){this.$$set({mb});flush();}get ml(){return this.$$.ctx[7];}set ml(ml){this.$$set({ml});flush();}}customElements.define("goa-tooltip",Tooltip);/* src/layouts/FullScreenNavbarLayout.svelte generated by Svelte v3.59.2 */function create_fragment$i(ctx){let div;return {c(){div=element("div");div.innerHTML=`<header class="header"><slot name="header"></slot></header>
445
-
446
- <nav class="nav"><slot name="nav"></slot></nav>
447
-
448
- <main><slot></slot></main>
449
-
450
- <footer class="footer"><slot name="footer"></slot></footer>`;this.c=noop;attr(div,"class","page");},m(target,anchor){insert(target,div,anchor);},p:noop,i:noop,o:noop,d(detaching){if(detaching)detach(div);}};}class FullScreenNavbarLayout extends SvelteElement{constructor(options){super();const style=document.createElement('style');style.textContent=`.page{height:100vh;grid-template-columns:auto;grid-template-rows:min-content auto min-content;grid-template-areas:"header"
451
- "content"
452
- "nav"
453
- "footer";display:grid;place-content:stretch stretch;gap:0 0}@media screen and (max-width: 623px){.page{grid-template-columns:300px auto;grid-template-rows:min-content auto min-content;grid-template-areas:"header header"
454
- "nav content"
455
- "footer footer"}}.header{grid-area:header}.footer{grid-area:footer}main{grid-area:content;justify-self:stretch;padding:1rem}.nav{grid-area:nav;padding:1rem;background-color:var(--goa-color-greyscale-100)}`;this.shadowRoot.appendChild(style);init(this,{target:this.shadowRoot,props:attribute_to_object(this.attributes),customElement:true},null,create_fragment$i,safe_not_equal,{},null);if(options){if(options.target){insert(options.target,this,options.anchor);}}}}customElements.define("goa-layout-full-nav",FullScreenNavbarLayout);/* src/layouts/one-column-layout/OneColumnLayout.svelte generated by Svelte v3.59.2 */function create_fragment$h(ctx){let div;return {c(){div=element("div");div.innerHTML=`<section class="header"><slot name="header"></slot></section>
456
-
457
- <main><slot></slot></main>
458
-
459
- <section class="footer"><slot name="footer"></slot></section>`;this.c=noop;attr(div,"class","page");},m(target,anchor){insert(target,div,anchor);},p:noop,i:noop,o:noop,d(detaching){if(detaching)detach(div);}};}class OneColumnLayout extends SvelteElement{constructor(options){super();const style=document.createElement('style');style.textContent=`.page{min-height:100vh;display:flex;flex-direction:column}.header,.footer{flex:0 0 auto}main{flex:1 1 auto}`;this.shadowRoot.appendChild(style);init(this,{target:this.shadowRoot,props:attribute_to_object(this.attributes),customElement:true},null,create_fragment$h,safe_not_equal,{},null);if(options){if(options.target){insert(options.target,this,options.anchor);}}}}customElements.define("goa-one-column-layout",OneColumnLayout);/* src/layouts/two-column-layout/TwoColumnLayout.svelte generated by Svelte v3.59.2 */function create_fragment$g(ctx){let div;let header;let t0;let section;let t2;let footer;let div_style_value;return {c(){div=element("div");header=element("header");header.innerHTML=`<slot name="header"></slot>`;t0=space();section=element("section");section.innerHTML=`<nav class="nav"><slot name="nav"></slot></nav>
460
-
461
- <main><slot></slot></main>`;t2=space();footer=element("footer");footer.innerHTML=`<slot name="footer"></slot>`;this.c=noop;attr(header,"class","header");attr(section,"class","content");attr(footer,"class","footer");attr(div,"class","page");attr(div,"style",div_style_value=`
462
- --max-content-width: ${/*maxcontentwidth*/ctx[1]||"100%"};
463
- --nav-column-width: ${/*navcolumnwidth*/ctx[0]||"256px"};
464
- `);},m(target,anchor){insert(target,div,anchor);append(div,header);append(div,t0);append(div,section);append(div,t2);append(div,footer);},p(ctx,[dirty]){if(dirty&/*maxcontentwidth, navcolumnwidth*/3&&div_style_value!==(div_style_value=`
465
- --max-content-width: ${/*maxcontentwidth*/ctx[1]||"100%"};
466
- --nav-column-width: ${/*navcolumnwidth*/ctx[0]||"256px"};
467
- `)){attr(div,"style",div_style_value);}},i:noop,o:noop,d(detaching){if(detaching)detach(div);}};}function instance$f($$self,$$props,$$invalidate){let{navcolumnwidth=""}=$$props;let{maxcontentwidth=""}=$$props;$$self.$$set=$$props=>{if('navcolumnwidth'in $$props)$$invalidate(0,navcolumnwidth=$$props.navcolumnwidth);if('maxcontentwidth'in $$props)$$invalidate(1,maxcontentwidth=$$props.maxcontentwidth);};return [navcolumnwidth,maxcontentwidth];}class TwoColumnLayout extends SvelteElement{constructor(options){super();const style=document.createElement('style');style.textContent=`*{box-sizing:border-box}.page{min-height:100vh;display:flex;flex-direction:column}.content{flex:1 1 auto;display:flex;flex-direction:column;gap:2rem}.header,.footer{flex:0 0 auto}main{flex:1 1 auto;padding:0 1rem}.nav{padding:0 1rem;transition:transform 200ms ease-in-out;background-color:var(--goa-color-greyscale-white)}.nav>*{display:block;padding:0.5rem 0}@media screen and (max-width: 623px){@media not (max-color:2147477350){.page{gap:2rem}.content{display:flex;flex-direction:row;justify-content:center;width:min(var(--max-content-width), 100vw);margin:0 auto}.nav{padding:0 2rem;transform:translateX(0);flex:0 0 var(--nav-column-width)}main{padding-right:2rem}}}@media not screen and (max-width: 623px){@media not (color:2147477350){.page{gap:2rem}.content{display:flex;flex-direction:row;justify-content:center;width:min(var(--max-content-width), 100vw);margin:0 auto}.nav{padding:0 2rem;transform:translateX(0);flex:0 0 var(--nav-column-width)}main{padding-right:2rem}}}@media screen and (min-width: 1024px){main{padding-right:4.5rem}}`;this.shadowRoot.appendChild(style);init(this,{target:this.shadowRoot,props:attribute_to_object(this.attributes),customElement:true},instance$f,create_fragment$g,safe_not_equal,{navcolumnwidth:0,maxcontentwidth:1},null);if(options){if(options.target){insert(options.target,this,options.anchor);}if(options.props){this.$set(options.props);flush();}}}static get observedAttributes(){return ["navcolumnwidth","maxcontentwidth"];}get navcolumnwidth(){return this.$$.ctx[0];}set navcolumnwidth(navcolumnwidth){this.$$set({navcolumnwidth});flush();}get maxcontentwidth(){return this.$$.ctx[1];}set maxcontentwidth(maxcontentwidth){this.$$set({maxcontentwidth});flush();}}customElements.define("goa-two-column-layout",TwoColumnLayout);/* src/layouts/three-column-layout/ThreeColumnLayout.svelte generated by Svelte v3.59.2 */function create_fragment$f(ctx){let div;let header;let t0;let section;let t4;let footer;let div_style_value;return {c(){div=element("div");header=element("header");header.innerHTML=`<slot name="header"></slot>`;t0=space();section=element("section");section.innerHTML=`<nav class="nav"><slot name="nav"></slot></nav>
468
-
469
- <main><slot></slot></main>
470
-
471
- <nav class="nav side-menu"><slot name="sidebar"></slot>
472
- <slot name="side-menu"></slot></nav>`;t4=space();footer=element("footer");footer.innerHTML=`<slot name="footer"></slot>`;this.c=noop;attr(header,"class","header");attr(section,"class","content");attr(footer,"class","footer");attr(div,"class","page");attr(div,"style",div_style_value=`
473
- --max-content-width: ${/*maxcontentwidth*/ctx[2]||"100%"};
474
- --nav-column-width: ${/*leftcolumnwidth*/ctx[0]||"256px"};
475
- --side-menu-column-width: ${/*rightcolumnwidth*/ctx[1]||"256px"}
476
- `);},m(target,anchor){insert(target,div,anchor);append(div,header);append(div,t0);append(div,section);append(div,t4);append(div,footer);},p(ctx,[dirty]){if(dirty&/*maxcontentwidth, leftcolumnwidth, rightcolumnwidth*/7&&div_style_value!==(div_style_value=`
477
- --max-content-width: ${/*maxcontentwidth*/ctx[2]||"100%"};
478
- --nav-column-width: ${/*leftcolumnwidth*/ctx[0]||"256px"};
479
- --side-menu-column-width: ${/*rightcolumnwidth*/ctx[1]||"256px"}
480
- `)){attr(div,"style",div_style_value);}},i:noop,o:noop,d(detaching){if(detaching)detach(div);}};}function instance$e($$self,$$props,$$invalidate){let{leftcolumnwidth}=$$props;let{rightcolumnwidth}=$$props;let{maxcontentwidth}=$$props;$$self.$$set=$$props=>{if('leftcolumnwidth'in $$props)$$invalidate(0,leftcolumnwidth=$$props.leftcolumnwidth);if('rightcolumnwidth'in $$props)$$invalidate(1,rightcolumnwidth=$$props.rightcolumnwidth);if('maxcontentwidth'in $$props)$$invalidate(2,maxcontentwidth=$$props.maxcontentwidth);};return [leftcolumnwidth,rightcolumnwidth,maxcontentwidth];}class ThreeColumnLayout extends SvelteElement{constructor(options){super();const style=document.createElement('style');style.textContent=`*{box-sizing:border-box}.page{min-height:100vh;display:flex;flex-direction:column}.content{flex:1 1 auto;display:flex;flex-direction:column;gap:2rem}.header,.footer{flex:0 0 auto}main{flex:1 1 auto;padding:0 1rem}.nav{padding:0 1rem;transition:transform 200ms ease-in-out;background-color:var(--goa-color-greyscale-white)}.nav>*{display:block;padding:0.5rem 0}@media screen and (max-width: 623px){@media not (max-color:2147477350){.page{gap:2rem}.content{display:flex;flex-direction:row;justify-content:center;width:min(var(--max-content-width), 100vw);margin:0 auto}.nav{padding:0 2rem;transform:translateX(0)}.nav:not(.side-menu){flex:0 0 var(--nav-column-width)}.nav.side-menu{flex:0 0 var(--side-menu-column-width)}main{padding-right:2rem}}}@media not screen and (max-width: 623px){@media not (color:2147477350){.page{gap:2rem}.content{display:flex;flex-direction:row;justify-content:center;width:min(var(--max-content-width), 100vw);margin:0 auto}.nav{padding:0 2rem;transform:translateX(0)}.nav:not(.side-menu){flex:0 0 var(--nav-column-width)}.nav.side-menu{flex:0 0 var(--side-menu-column-width)}main{padding-right:2rem}}}@media screen and (min-width: 1024px){main{padding-right:4.5rem}}`;this.shadowRoot.appendChild(style);init(this,{target:this.shadowRoot,props:attribute_to_object(this.attributes),customElement:true},instance$e,create_fragment$f,safe_not_equal,{leftcolumnwidth:0,rightcolumnwidth:1,maxcontentwidth:2},null);if(options){if(options.target){insert(options.target,this,options.anchor);}if(options.props){this.$set(options.props);flush();}}}static get observedAttributes(){return ["leftcolumnwidth","rightcolumnwidth","maxcontentwidth"];}get leftcolumnwidth(){return this.$$.ctx[0];}set leftcolumnwidth(leftcolumnwidth){this.$$set({leftcolumnwidth});flush();}get rightcolumnwidth(){return this.$$.ctx[1];}set rightcolumnwidth(rightcolumnwidth){this.$$set({rightcolumnwidth});flush();}get maxcontentwidth(){return this.$$.ctx[2];}set maxcontentwidth(maxcontentwidth){this.$$set({maxcontentwidth});flush();}}customElements.define("goa-three-column-layout",ThreeColumnLayout);/* src/components/_experimental/sidebar/Sidebar.svelte generated by Svelte v3.59.2 */function get_each_context$2(ctx,list,i){const child_ctx=ctx.slice();child_ctx[14]=list[i];child_ctx[16]=i;return child_ctx;}// (88:6) {#if true}
481
- function create_if_block_1$4(ctx){let li;let span;let t0_value=/*item*/ctx[14].displayname+"";let t0;let t1;let li_aria_selected_value;let li_aria_label_value;let mounted;let dispose;let if_block=/*item*/ctx[14].items&&/*item*/ctx[14].items.length>0&&create_if_block_2$4(ctx);function click_handler(){return(/*click_handler*/ctx[8](/*item*/ctx[14]));}function keydown_handler(...args){return(/*keydown_handler*/ctx[9](/*item*/ctx[14],...args));}return {c(){li=element("li");span=element("span");t0=text(t0_value);t1=space();if(if_block)if_block.c();attr(span,"class","label");attr(li,"role","menuitem");attr(li,"aria-selected",li_aria_selected_value=/*item*/ctx[14].active);attr(li,"aria-label",li_aria_label_value=`${/*item*/ctx[14].displayname}${/*item*/ctx[14].items&&/*item*/ctx[14].items.length>0?/*isExpanded*/ctx[5](/*item*/ctx[14])?" Expanded":" Collapsed":""}`);attr(li,"tabindex","0");toggle_class(li,"active",/*item*/ctx[14].active);toggle_class(li,"expanded",/*isExpanded*/ctx[5](/*item*/ctx[14])&&hasSubItemSelected(/*item*/ctx[14]));toggle_class(li,"sub-level",/*level*/ctx[0]>0);},m(target,anchor){insert(target,li,anchor);append(li,span);append(span,t0);append(li,t1);if(if_block)if_block.m(li,null);if(!mounted){dispose=[listen(li,"click",click_handler),listen(li,"keydown",keydown_handler)];mounted=true;}},p(new_ctx,dirty){ctx=new_ctx;if(dirty&/*_items*/4&&t0_value!==(t0_value=/*item*/ctx[14].displayname+""))set_data(t0,t0_value);if(/*item*/ctx[14].items&&/*item*/ctx[14].items.length>0){if(if_block){if_block.p(ctx,dirty);}else {if_block=create_if_block_2$4(ctx);if_block.c();if_block.m(li,null);}}else if(if_block){if_block.d(1);if_block=null;}if(dirty&/*_items*/4&&li_aria_selected_value!==(li_aria_selected_value=/*item*/ctx[14].active)){attr(li,"aria-selected",li_aria_selected_value);}if(dirty&/*_items*/4&&li_aria_label_value!==(li_aria_label_value=`${/*item*/ctx[14].displayname}${/*item*/ctx[14].items&&/*item*/ctx[14].items.length>0?/*isExpanded*/ctx[5](/*item*/ctx[14])?" Expanded":" Collapsed":""}`)){attr(li,"aria-label",li_aria_label_value);}if(dirty&/*_items*/4){toggle_class(li,"active",/*item*/ctx[14].active);}if(dirty&/*isExpanded, _items, hasSubItemSelected*/36){toggle_class(li,"expanded",/*isExpanded*/ctx[5](/*item*/ctx[14])&&hasSubItemSelected(/*item*/ctx[14]));}if(dirty&/*level*/1){toggle_class(li,"sub-level",/*level*/ctx[0]>0);}},d(detaching){if(detaching)detach(li);if(if_block)if_block.d();mounted=false;run_all(dispose);}};}// (102:8) {#if item.items && item.items.length > 0}
482
- function create_if_block_2$4(ctx){let show_if;let if_block_anchor;function select_block_type(ctx,dirty){if(dirty&/*_items*/4)show_if=null;if(show_if==null)show_if=!!/*isExpanded*/ctx[5](/*item*/ctx[14]);if(show_if)return create_if_block_3$4;return create_else_block$4;}let current_block_type=select_block_type(ctx,-1);let if_block=current_block_type(ctx);return {c(){if_block.c();if_block_anchor=empty();},m(target,anchor){if_block.m(target,anchor);insert(target,if_block_anchor,anchor);},p(ctx,dirty){if(current_block_type!==(current_block_type=select_block_type(ctx,dirty))){if_block.d(1);if_block=current_block_type(ctx);if(if_block){if_block.c();if_block.m(if_block_anchor.parentNode,if_block_anchor);}}},d(detaching){if_block.d(detaching);if(detaching)detach(if_block_anchor);}};}// (105:10) {:else}
483
- function create_else_block$4(ctx){let goa_icon;return {c(){goa_icon=element("goa-icon");set_custom_element_data(goa_icon,"type","chevron-forward");set_custom_element_data(goa_icon,"size","medium");},m(target,anchor){insert(target,goa_icon,anchor);},d(detaching){if(detaching)detach(goa_icon);}};}// (103:10) {#if isExpanded(item)}
484
- function create_if_block_3$4(ctx){let goa_icon;return {c(){goa_icon=element("goa-icon");set_custom_element_data(goa_icon,"type","chevron-down");set_custom_element_data(goa_icon,"size","medium");},m(target,anchor){insert(target,goa_icon,anchor);},d(detaching){if(detaching)detach(goa_icon);}};}// (112:6) {#if item.items && item.items.length > 0 && isExpanded(item)}
485
- function create_if_block$8(ctx){let div;let sidebar;let t;let current;sidebar=new Sidebar({props:{navitems:/*item*/ctx[14].items,level:/*level*/ctx[0]+1}});return {c(){div=element("div");create_component(sidebar.$$.fragment);t=space();attr(div,"style",/*calculateMarginLeft*/ctx[4]());},m(target,anchor){insert(target,div,anchor);mount_component(sidebar,div,null);append(div,t);current=true;},p(ctx,dirty){const sidebar_changes={};if(dirty&/*_items*/4)sidebar_changes.navitems=/*item*/ctx[14].items;if(dirty&/*level*/1)sidebar_changes.level=/*level*/ctx[0]+1;sidebar.$set(sidebar_changes);},i(local){if(current)return;transition_in(sidebar.$$.fragment,local);current=true;},o(local){transition_out(sidebar.$$.fragment,local);current=false;},d(detaching){if(detaching)detach(div);destroy_component(sidebar);}};}// (87:4) {#each _items as item, index (index)}
486
- function create_each_block$2(key_1,ctx){let first;let t;let show_if=/*item*/ctx[14].items&&/*item*/ctx[14].items.length>0&&/*isExpanded*/ctx[5](/*item*/ctx[14]);let if_block1_anchor;let current;let if_block0=create_if_block_1$4(ctx);let if_block1=show_if&&create_if_block$8(ctx);return {key:key_1,first:null,c(){first=empty();if(if_block0)if_block0.c();t=space();if(if_block1)if_block1.c();if_block1_anchor=empty();this.first=first;},m(target,anchor){insert(target,first,anchor);if(if_block0)if_block0.m(target,anchor);insert(target,t,anchor);if(if_block1)if_block1.m(target,anchor);insert(target,if_block1_anchor,anchor);current=true;},p(new_ctx,dirty){ctx=new_ctx;if_block0.p(ctx,dirty);if(dirty&/*_items*/4)show_if=/*item*/ctx[14].items&&/*item*/ctx[14].items.length>0&&/*isExpanded*/ctx[5](/*item*/ctx[14]);if(show_if){if(if_block1){if_block1.p(ctx,dirty);if(dirty&/*_items*/4){transition_in(if_block1,1);}}else {if_block1=create_if_block$8(ctx);if_block1.c();transition_in(if_block1,1);if_block1.m(if_block1_anchor.parentNode,if_block1_anchor);}}else if(if_block1){group_outros();transition_out(if_block1,1,1,()=>{if_block1=null;});check_outros();}},i(local){if(current)return;transition_in(if_block1);current=true;},o(local){transition_out(if_block1);current=false;},d(detaching){if(detaching)detach(first);if(if_block0)if_block0.d(detaching);if(detaching)detach(t);if(if_block1)if_block1.d(detaching);if(detaching)detach(if_block1_anchor);}};}function create_fragment$e(ctx){let div;let ul;let slot;let t;let each_blocks=[];let each_1_lookup=new Map();let current;let each_value=/*_items*/ctx[2];const get_key=ctx=>/*index*/ctx[16];for(let i=0;i<each_value.length;i+=1){let child_ctx=get_each_context$2(ctx,each_value,i);let key=get_key(child_ctx);each_1_lookup.set(key,each_blocks[i]=create_each_block$2(key,child_ctx));}return {c(){div=element("div");ul=element("ul");slot=element("slot");t=space();for(let i=0;i<each_blocks.length;i+=1){each_blocks[i].c();}this.c=noop;attr(ul,"role","menu");attr(ul,"aria-label","Side Menu");attr(ul,"tabindex","-1");toggle_class(div,"first-level",/*level*/ctx[0]===0);},m(target,anchor){insert(target,div,anchor);append(div,ul);append(ul,slot);append(ul,t);for(let i=0;i<each_blocks.length;i+=1){if(each_blocks[i]){each_blocks[i].m(ul,null);}}/*div_binding*/ctx[10](div);current=true;},p(ctx,[dirty]){if(dirty&/*calculateMarginLeft, _items, level, isExpanded, hasSubItemSelected, toggle, handleKeyDown*/125){each_value=/*_items*/ctx[2];group_outros();each_blocks=update_keyed_each(each_blocks,dirty,get_key,1,ctx,each_value,each_1_lookup,ul,outro_and_destroy_block,create_each_block$2,null,get_each_context$2);check_outros();}if(!current||dirty&/*level*/1){toggle_class(div,"first-level",/*level*/ctx[0]===0);}},i(local){if(current)return;for(let i=0;i<each_value.length;i+=1){transition_in(each_blocks[i]);}current=true;},o(local){for(let i=0;i<each_blocks.length;i+=1){transition_out(each_blocks[i]);}current=false;},d(detaching){if(detaching)detach(div);for(let i=0;i<each_blocks.length;i+=1){each_blocks[i].d();}/*div_binding*/ctx[10](null);}};}function hasSubItemSelected(item){return item.items&&item.items.length>0&&item.items.some(_item=>_item.active);}function instance$d($$self,$$props,$$invalidate){let{level=0}=$$props;let{navitems=[]}=$$props;// Private
487
- let _rootElement;let _items=[];let _expandedNavItems=[];onMount(async()=>{const slot=_rootElement.querySelector("slot");slot===null||slot===void 0?void 0:slot.addEventListener("slotchange",_e=>{$$invalidate(2,_items=level===0?[...getItems()]:[...navitems]);});});function toggle(item){// Only dispatch back when the nav item is the lowest level (no children)
488
- if(!item.items||item.items.length===0){_rootElement.dispatchEvent(new CustomEvent("_change",{composed:true,detail:item}));}// Updated this expanded item to our _expandedNavItems array
489
- _expandedNavItems=item&&!_expandedNavItems.includes(item)?[..._expandedNavItems,item]:_expandedNavItems.filter(_item=>_item!==item);$$invalidate(2,_items=[..._items]);}function getItems(nodes=null){const children=nodes||getChildren();return children.filter(child=>child.tagName==="GOAX-SIDEBAR-ITEM").map(el=>{return {displayname:el.displayname,active:el.active,url:el.url,name:el.name,items:el.children.length>0?getItems([...el.children]):[]};});}function getChildren(){const slot=_rootElement.querySelector("slot");if(slot){return slot.assignedElements();}return [..._rootElement.children];}function calculateMarginLeft(){const marginLeft=32;return `margin-left: ${marginLeft*(level+1)}px`;}/**
490
- * Check if the item is expanded by action (verify with _expandedNavItems) or by sub item selection (default by user)
491
- */function isExpanded(item){if(item.items&&item.items.length>0){return _expandedNavItems.includes(item)||hasSubItemSelected(item);}return false;}/**
492
- * Accessibility when press enter to select the item
493
- */function handleKeyDown(event,item){if(event.key==="Enter"){toggle(item);}}const click_handler=item=>toggle(item);const keydown_handler=(item,event)=>handleKeyDown(event,item);function div_binding($$value){binding_callbacks[$$value?'unshift':'push'](()=>{_rootElement=$$value;$$invalidate(1,_rootElement);});}$$self.$$set=$$props=>{if('level'in $$props)$$invalidate(0,level=$$props.level);if('navitems'in $$props)$$invalidate(7,navitems=$$props.navitems);};$$self.$$.update=()=>{if($$self.$$.dirty&/*_rootElement, level, navitems*/131){{if(_rootElement){$$invalidate(2,_items=level===0?[...getItems()]:[...navitems]);}}}};return [level,_rootElement,_items,toggle,calculateMarginLeft,isExpanded,handleKeyDown,navitems,click_handler,keydown_handler,div_binding];}class Sidebar extends SvelteElement{constructor(options){super();const style=document.createElement('style');style.textContent=`div.first-level{margin-top:var(--goa-space-m)}:host{box-sizing:border-box;font-family:var(--goa-font-family-sans);color:var(--goa-color-text-default)}ul{list-style:none;padding:0;margin:0}li{display:flex;flex-direction:row;justify-content:space-between;align-items:center;padding:0.625rem var(--goa-space-s) 1vh var(--goa-space-xl);gap:var(--goa-line-height-05);overflow:hidden;text-overflow:ellipsis;white-space:nowrap;cursor:pointer}.label{font:var(--goa-typography-body-m);display:flex;align-items:center}li.active .label{font:var(--goa-typography-heading-s)}li:hover{background:#CEDFEE}li.expanded{background:#CEDFEE}li.active{background:var(--goa-color-info-background)}li:focus{outline:var(--goa-border-width-l) solid var(--goa-color-interactive-focus)}li.sub-level{padding:0.625rem var(--goa-space-s) 1vh var(--goa-space-m)}li.active.sub-level{border-left:4px solid var(--goa-color-interactive-disabled)}li.sub-level:not(.active):not(:hover){border-left:4px solid var(--goa-color-greyscale-100)}li.sub-level:hover{background:var(--goa-color-info-background);border-left:4px solid var(--goa-color-greyscale-200)}`;this.shadowRoot.appendChild(style);init(this,{target:this.shadowRoot,props:attribute_to_object(this.attributes),customElement:true},instance$d,create_fragment$e,safe_not_equal,{level:0,navitems:7},null);if(options){if(options.target){insert(options.target,this,options.anchor);}if(options.props){this.$set(options.props);flush();}}}static get observedAttributes(){return ["level","navitems"];}get level(){return this.$$.ctx[0];}set level(level){this.$$set({level});flush();}get navitems(){return this.$$.ctx[7];}set navitems(navitems){this.$$set({navitems});flush();}}customElements.define("goax-sidebar",Sidebar);/* src/components/_experimental/sidebar/SidebarItem.svelte generated by Svelte v3.59.2 */function create_fragment$d(ctx){return {c(){this.c=noop;},m:noop,p:noop,i:noop,o:noop,d:noop};}class SidebarItem extends SvelteElement{constructor(options){super();init(this,{target:this.shadowRoot,props:attribute_to_object(this.attributes),customElement:true},null,create_fragment$d,safe_not_equal,{},null);if(options){if(options.target){insert(options.target,this,options.anchor);}}}}customElements.define("goax-sidebar-item",SidebarItem);/* src/components/app-header-menu/AppHeaderMenu.svelte generated by Svelte v3.59.2 */const{window:window_1}=globals;function create_else_block$3(ctx){let button;let t0;let span;let t1;let t2;let goa_spacer;let t3;let goa_icon;let goa_icon_type_value;let t4;let if_block1_anchor;let mounted;let dispose;let if_block0=/*leadingicon*/ctx[1]&&create_if_block_3$3(ctx);let if_block1=/*_open*/ctx[8]&&create_if_block_2$3(ctx);return {c(){button=element("button");if(if_block0)if_block0.c();t0=space();span=element("span");t1=text(/*heading*/ctx[0]);t2=space();goa_spacer=element("goa-spacer");t3=space();goa_icon=element("goa-icon");t4=space();if(if_block1)if_block1.c();if_block1_anchor=empty();attr(span,"class","heading");set_custom_element_data(goa_spacer,"hspacing","fill");set_custom_element_data(goa_icon,"type",goa_icon_type_value=/*_open*/ctx[8]?"chevron-up":"chevron-down");set_custom_element_data(goa_icon,"mt","1");attr(button,"class",/*type*/ctx[2]);toggle_class(button,"open",/*_open*/ctx[8]);},m(target,anchor){insert(target,button,anchor);if(if_block0)if_block0.m(button,null);append(button,t0);append(button,span);append(span,t1);append(button,t2);append(button,goa_spacer);append(button,t3);append(button,goa_icon);insert(target,t4,anchor);if(if_block1)if_block1.m(target,anchor);insert(target,if_block1_anchor,anchor);if(!mounted){dispose=listen(button,"click",/*toggleMenu*/ctx[9]);mounted=true;}},p(ctx,dirty){if(/*leadingicon*/ctx[1]){if(if_block0){if_block0.p(ctx,dirty);}else {if_block0=create_if_block_3$3(ctx);if_block0.c();if_block0.m(button,t0);}}else if(if_block0){if_block0.d(1);if_block0=null;}if(dirty&/*heading*/1)set_data(t1,/*heading*/ctx[0]);if(dirty&/*_open*/256&&goa_icon_type_value!==(goa_icon_type_value=/*_open*/ctx[8]?"chevron-up":"chevron-down")){set_custom_element_data(goa_icon,"type",goa_icon_type_value);}if(dirty&/*type*/4){attr(button,"class",/*type*/ctx[2]);}if(dirty&/*type, _open*/260){toggle_class(button,"open",/*_open*/ctx[8]);}if(/*_open*/ctx[8]){if(if_block1){if_block1.p(ctx,dirty);}else {if_block1=create_if_block_2$3(ctx);if_block1.c();if_block1.m(if_block1_anchor.parentNode,if_block1_anchor);}}else if(if_block1){if_block1.d(1);if_block1=null;}},d(detaching){if(detaching)detach(button);if(if_block0)if_block0.d();if(detaching)detach(t4);if(if_block1)if_block1.d(detaching);if(detaching)detach(if_block1_anchor);mounted=false;dispose();}};}// (79:0) {#if _desktop}
494
- function create_if_block$7(ctx){let goa_popover;let button;let t0;let t1;let t2;let goa_icon;let goa_icon_type_value;let t3;let div;let if_block=/*leadingicon*/ctx[1]&&create_if_block_1$3(ctx);return {c(){goa_popover=element("goa-popover");button=element("button");if(if_block)if_block.c();t0=space();t1=text(/*heading*/ctx[0]);t2=space();goa_icon=element("goa-icon");t3=space();div=element("div");div.innerHTML=`<slot></slot>`;set_custom_element_data(goa_icon,"type",goa_icon_type_value=/*_open*/ctx[8]?"chevron-up":"chevron-down");set_custom_element_data(goa_icon,"mt","1");attr(button,"slot","target");set_style(button,"padding","0 0.75rem");attr(button,"class",/*type*/ctx[2]);toggle_class(button,"current",/*_hasCurrentLink*/ctx[7]);attr(div,"class","desktop");set_custom_element_data(goa_popover,"context","app-header-menu");set_custom_element_data(goa_popover,"focusborderwidth","0");set_custom_element_data(goa_popover,"borderradius","0");set_custom_element_data(goa_popover,"padded","false");set_custom_element_data(goa_popover,"tabindex","-1");set_custom_element_data(goa_popover,"width","16rem");set_custom_element_data(goa_popover,"position","below");},m(target,anchor){insert(target,goa_popover,anchor);append(goa_popover,button);if(if_block)if_block.m(button,null);append(button,t0);append(button,t1);append(button,t2);append(button,goa_icon);append(goa_popover,t3);append(goa_popover,div);/*div_binding*/ctx[11](div);/*goa_popover_binding*/ctx[12](goa_popover);},p(ctx,dirty){if(/*leadingicon*/ctx[1]){if(if_block){if_block.p(ctx,dirty);}else {if_block=create_if_block_1$3(ctx);if_block.c();if_block.m(button,t0);}}else if(if_block){if_block.d(1);if_block=null;}if(dirty&/*heading*/1)set_data(t1,/*heading*/ctx[0]);if(dirty&/*_open*/256&&goa_icon_type_value!==(goa_icon_type_value=/*_open*/ctx[8]?"chevron-up":"chevron-down")){set_custom_element_data(goa_icon,"type",goa_icon_type_value);}if(dirty&/*type*/4){attr(button,"class",/*type*/ctx[2]);}if(dirty&/*type, _hasCurrentLink*/132){toggle_class(button,"current",/*_hasCurrentLink*/ctx[7]);}},d(detaching){if(detaching)detach(goa_popover);if(if_block)if_block.d();/*div_binding*/ctx[11](null);/*goa_popover_binding*/ctx[12](null);}};}// (113:4) {#if leadingicon}
495
- function create_if_block_3$3(ctx){let goa_icon;return {c(){goa_icon=element("goa-icon");set_custom_element_data(goa_icon,"type",/*leadingicon*/ctx[1]);set_custom_element_data(goa_icon,"mt","1");},m(target,anchor){insert(target,goa_icon,anchor);},p(ctx,dirty){if(dirty&/*leadingicon*/2){set_custom_element_data(goa_icon,"type",/*leadingicon*/ctx[1]);}},d(detaching){if(detaching)detach(goa_icon);}};}// (120:2) {#if _open}
496
- function create_if_block_2$3(ctx){let div;return {c(){div=element("div");div.innerHTML=`<slot></slot>`;attr(div,"class","not-desktop");},m(target,anchor){insert(target,div,anchor);/*div_binding_1*/ctx[13](div);},p:noop,d(detaching){if(detaching)detach(div);/*div_binding_1*/ctx[13](null);}};}// (96:6) {#if leadingicon}
497
- function create_if_block_1$3(ctx){let goa_icon;return {c(){goa_icon=element("goa-icon");set_custom_element_data(goa_icon,"type",/*leadingicon*/ctx[1]);set_custom_element_data(goa_icon,"mt","1");},m(target,anchor){insert(target,goa_icon,anchor);},p(ctx,dirty){if(dirty&/*leadingicon*/2){set_custom_element_data(goa_icon,"type",/*leadingicon*/ctx[1]);}},d(detaching){if(detaching)detach(goa_icon);}};}function create_fragment$c(ctx){let if_block_anchor;let mounted;let dispose;add_render_callback(/*onwindowresize*/ctx[10]);function select_block_type(ctx,dirty){if(/*_desktop*/ctx[4])return create_if_block$7;return create_else_block$3;}let current_block_type=select_block_type(ctx);let if_block=current_block_type(ctx);return {c(){if_block.c();if_block_anchor=empty();this.c=noop;},m(target,anchor){if_block.m(target,anchor);insert(target,if_block_anchor,anchor);if(!mounted){dispose=listen(window_1,"resize",/*onwindowresize*/ctx[10]);mounted=true;}},p(ctx,[dirty]){if(current_block_type===(current_block_type=select_block_type(ctx))&&if_block){if_block.p(ctx,dirty);}else {if_block.d(1);if_block=current_block_type(ctx);if(if_block){if_block.c();if_block.m(if_block_anchor.parentNode,if_block_anchor);}}},i:noop,o:noop,d(detaching){if_block.d(detaching);if(detaching)detach(if_block_anchor);mounted=false;dispose();}};}function instance$c($$self,$$props,$$invalidate){let _desktop;let{heading}=$$props;let{leadingicon}=$$props;let{type="primary"}=$$props;// Private
498
- // media queries are not sufficient as they don't allow for the same slot
499
- // to be used in different query selectors
500
- let _innerWidth=window.innerWidth;// allows listening to popover events
501
- let _popoverEl;// allow for finding of contained link elements within slot
502
- let _slotParentEl;// internal state of when the window location matches with a link within this element's slot
503
- let _hasCurrentLink=false;// open state
504
- let _open=false;// Hooks
505
- onMount(async()=>{await tick();validateRequired("GoaAppHeaderMenu",{heading});$$invalidate(7,_hasCurrentLink=hasCurrentLink());window.addEventListener("popstate",()=>{$$invalidate(7,_hasCurrentLink=hasCurrentLink());},true);});// Functions
506
- // Determine if the current browser url matches one of this element's child links
507
- function hasCurrentLink(){if(!_slotParentEl)return;const slot=_slotParentEl.querySelector("slot");if(!slot)return;const link=slot.assignedElements().filter(el=>el.tagName==="A").find(el=>{const href=el.href;const url=`${window.location.pathname}${window.location.search}${window.location.hash}`;return href.endsWith(url);});return !!link;}// Ensures that the Popover _close event has a handler if the window
508
- // is resized after initial load
509
- async function bindToPopoverCloseEvent(){await tick();if(!_popoverEl)return;_popoverEl.removeEventListener("_close",closeMenu);_popoverEl.removeEventListener("_open",openMenu);_popoverEl.addEventListener("_close",closeMenu);_popoverEl.addEventListener("_open",openMenu);}function openMenu(){$$invalidate(8,_open=true);}function closeMenu(){// timeout is required to allow any other events to fire before DOM is changed
510
- setTimeout(()=>{$$invalidate(8,_open=false);},1);}function toggleMenu(){_open?closeMenu():openMenu();}function onwindowresize(){$$invalidate(3,_innerWidth=window_1.innerWidth);}function div_binding($$value){binding_callbacks[$$value?'unshift':'push'](()=>{_slotParentEl=$$value;$$invalidate(6,_slotParentEl);});}function goa_popover_binding($$value){binding_callbacks[$$value?'unshift':'push'](()=>{_popoverEl=$$value;$$invalidate(5,_popoverEl);});}function div_binding_1($$value){binding_callbacks[$$value?'unshift':'push'](()=>{_slotParentEl=$$value;$$invalidate(6,_slotParentEl);});}$$self.$$set=$$props=>{if('heading'in $$props)$$invalidate(0,heading=$$props.heading);if('leadingicon'in $$props)$$invalidate(1,leadingicon=$$props.leadingicon);if('type'in $$props)$$invalidate(2,type=$$props.type);};$$self.$$.update=()=>{if($$self.$$.dirty&/*_innerWidth*/8){// Reactive
511
- $$invalidate(4,_desktop=_innerWidth>=TABLET_BP);}if($$self.$$.dirty&/*_desktop*/16){// call the method when window changes to desktop size
512
- _desktop&&bindToPopoverCloseEvent();}};return [heading,leadingicon,type,_innerWidth,_desktop,_popoverEl,_slotParentEl,_hasCurrentLink,_open,toggleMenu,onwindowresize,div_binding,goa_popover_binding,div_binding_1];}class AppHeaderMenu extends SvelteElement{constructor(options){super();const style=document.createElement('style');style.textContent=`*{font:var(--goa-typography-body-m)}button{padding:0;border:none;background:transparent;outline:none;color:var(--goa-color-text-default);cursor:pointer;display:flex;align-items:center;gap:0.5rem}button:active,button:hover,button:focus-within,[slot="target"]:focus-within{background:var(--goa-color-greyscale-100);color:var(--goa-color-interactive-hover)}button.current{border-top:4px solid var(--goa-color-interactive-default);border-bottom:4px solid transparent}button.current:hover{border-top:4px solid var(--goa-color-interactive-hover)}button.open{border-bottom:1px solid var(--goa-color-greyscale-200)}::slotted(a),::slotted(a:visited){box-shadow:inset 0 1px 0 0 var(--goa-color-greyscale-200);color:var(--goa-color-text-default);display:block;padding:calc((3rem - var(--goa-line-height-3)) / 2) 1rem;text-decoration:none}.not-desktop ::slotted(a){padding:calc((3rem - var(--goa-line-height-3)) / 2) 2.75rem}::slotted(a:first-child){box-shadow:none}::slotted(a:hover){background:var(--goa-color-greyscale-100);color:var(--goa-color-interactive-hover)}::slotted(a:focus-visible){outline:var(--goa-border-width-l) solid var(--goa-color-interactive-focus);outline-offset:-3px;color:var(--goa-color-interactive-hover)}::slotted(a.interactive){text-decoration:underline;color:var(--goa-color-interactive-default)}@media screen and (min-width: 1024px){@media not (max-color:2147477350){button{box-shadow:inset 0 1px 0 0 var(--goa-color-greyscale-200);height:3rem;flex:1 1 auto;padding:0 1rem;width:100%}button:focus{outline:var(--goa-border-width-l) solid var(--goa-color-interactive-focus);outline-offset:-3px}.heading{flex:0 0 auto}}}@media not screen and (min-width: 1024px){@media not (color:2147477350){button{box-shadow:inset 0 1px 0 0 var(--goa-color-greyscale-200);height:3rem;flex:1 1 auto;padding:0 1rem;width:100%}button:focus{outline:var(--goa-border-width-l) solid var(--goa-color-interactive-focus);outline-offset:-3px}.heading{flex:0 0 auto}}}@media screen and (min-width: 1024px){button[slot=target]{font-weight:var(--goa-font-weight-bold);height:4rem;white-space:nowrap}button.secondary{font-weight:var(--goa-font-weight-regular)}}`;this.shadowRoot.appendChild(style);init(this,{target:this.shadowRoot,props:attribute_to_object(this.attributes),customElement:true},instance$c,create_fragment$c,safe_not_equal,{heading:0,leadingicon:1,type:2},null);if(options){if(options.target){insert(options.target,this,options.anchor);}if(options.props){this.$set(options.props);flush();}}}static get observedAttributes(){return ["heading","leadingicon","type"];}get heading(){return this.$$.ctx[0];}set heading(heading){this.$$set({heading});flush();}get leadingicon(){return this.$$.ctx[1];}set leadingicon(leadingicon){this.$$set({leadingicon});flush();}get type(){return this.$$.ctx[2];}set type(type){this.$$set({type});flush();}}customElements.define("goa-app-header-menu",AppHeaderMenu);function toInteger(dirtyNumber){if(dirtyNumber===null||dirtyNumber===true||dirtyNumber===false){return NaN;}var number=Number(dirtyNumber);if(isNaN(number)){return number;}return number<0?Math.ceil(number):Math.floor(number);}function requiredArgs(required,args){if(args.length<required){throw new TypeError(required+' argument'+(required>1?'s':'')+' required, but only '+args.length+' present');}}/**
513
- * @name toDate
514
- * @category Common Helpers
515
- * @summary Convert the given argument to an instance of Date.
516
- *
517
- * @description
518
- * Convert the given argument to an instance of Date.
519
- *
520
- * If the argument is an instance of Date, the function returns its clone.
521
- *
522
- * If the argument is a number, it is treated as a timestamp.
523
- *
524
- * If the argument is none of the above, the function returns Invalid Date.
525
- *
526
- * **Note**: *all* Date arguments passed to any *date-fns* function is processed by `toDate`.
527
- *
528
- * @param {Date|Number} argument - the value to convert
529
- * @returns {Date} the parsed date in the local time zone
530
- * @throws {TypeError} 1 argument required
531
- *
532
- * @example
533
- * // Clone the date:
534
- * const result = toDate(new Date(2014, 1, 11, 11, 30, 30))
535
- * //=> Tue Feb 11 2014 11:30:30
536
- *
537
- * @example
538
- * // Convert the timestamp to date:
539
- * const result = toDate(1392098430000)
540
- * //=> Tue Feb 11 2014 11:30:30
541
- */function toDate(argument){requiredArgs(1,arguments);var argStr=Object.prototype.toString.call(argument);// Clone the date
542
- if(argument instanceof Date||typeof argument==='object'&&argStr==='[object Date]'){// Prevent the date to lose the milliseconds when passed to new Date() in IE10
543
- return new Date(argument.getTime());}else if(typeof argument==='number'||argStr==='[object Number]'){return new Date(argument);}else {if((typeof argument==='string'||argStr==='[object String]')&&typeof console!=='undefined'){// eslint-disable-next-line no-console
544
- console.warn("Starting with v2.0.0-beta.1 date-fns doesn't accept strings as date arguments. Please use `parseISO` to parse strings. See: https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#string-arguments");// eslint-disable-next-line no-console
545
- console.warn(new Error().stack);}return new Date(NaN);}}/**
546
- * @name addDays
547
- * @category Day Helpers
548
- * @summary Add the specified number of days to the given date.
549
- *
550
- * @description
551
- * Add the specified number of days to the given date.
552
- *
553
- * @param {Date|Number} date - the date to be changed
554
- * @param {Number} amount - the amount of days to be added. Positive decimals will be rounded using `Math.floor`, decimals less than zero will be rounded using `Math.ceil`.
555
- * @returns {Date} - the new date with the days added
556
- * @throws {TypeError} - 2 arguments required
557
- *
558
- * @example
559
- * // Add 10 days to 1 September 2014:
560
- * const result = addDays(new Date(2014, 8, 1), 10)
561
- * //=> Thu Sep 11 2014 00:00:00
562
- */function addDays(dirtyDate,dirtyAmount){requiredArgs(2,arguments);var date=toDate(dirtyDate);var amount=toInteger(dirtyAmount);if(isNaN(amount)){return new Date(NaN);}if(!amount){// If 0 days, no-op to avoid changing times in the hour before end of DST
563
- return date;}date.setDate(date.getDate()+amount);return date;}/**
564
- * @name addMonths
565
- * @category Month Helpers
566
- * @summary Add the specified number of months to the given date.
567
- *
568
- * @description
569
- * Add the specified number of months to the given date.
570
- *
571
- * @param {Date|Number} date - the date to be changed
572
- * @param {Number} amount - the amount of months to be added. Positive decimals will be rounded using `Math.floor`, decimals less than zero will be rounded using `Math.ceil`.
573
- * @returns {Date} the new date with the months added
574
- * @throws {TypeError} 2 arguments required
575
- *
576
- * @example
577
- * // Add 5 months to 1 September 2014:
578
- * const result = addMonths(new Date(2014, 8, 1), 5)
579
- * //=> Sun Feb 01 2015 00:00:00
580
- */function addMonths(dirtyDate,dirtyAmount){requiredArgs(2,arguments);var date=toDate(dirtyDate);var amount=toInteger(dirtyAmount);if(isNaN(amount)){return new Date(NaN);}if(!amount){// If 0 months, no-op to avoid changing times in the hour before end of DST
581
- return date;}var dayOfMonth=date.getDate();// The JS Date object supports date math by accepting out-of-bounds values for
582
- // month, day, etc. For example, new Date(2020, 0, 0) returns 31 Dec 2019 and
583
- // new Date(2020, 13, 1) returns 1 Feb 2021. This is *almost* the behavior we
584
- // want except that dates will wrap around the end of a month, meaning that
585
- // new Date(2020, 13, 31) will return 3 Mar 2021 not 28 Feb 2021 as desired. So
586
- // we'll default to the end of the desired month by adding 1 to the desired
587
- // month and using a date of 0 to back up one day to the end of the desired
588
- // month.
589
- var endOfDesiredMonth=new Date(date.getTime());endOfDesiredMonth.setMonth(date.getMonth()+amount+1,0);var daysInMonth=endOfDesiredMonth.getDate();if(dayOfMonth>=daysInMonth){// If we're already at the end of the month, then this is the correct date
590
- // and we're done.
591
- return endOfDesiredMonth;}else {// Otherwise, we now know that setting the original day-of-month value won't
592
- // cause an overflow, so set the desired day-of-month. Note that we can't
593
- // just set the date of `endOfDesiredMonth` because that object may have had
594
- // its time changed in the unusual case where where a DST transition was on
595
- // the last day of the month and its local time was in the hour skipped or
596
- // repeated next to a DST transition. So we use `date` instead which is
597
- // guaranteed to still have the original time.
598
- date.setFullYear(endOfDesiredMonth.getFullYear(),endOfDesiredMonth.getMonth(),dayOfMonth);return date;}}/**
599
- * @name addMilliseconds
600
- * @category Millisecond Helpers
601
- * @summary Add the specified number of milliseconds to the given date.
602
- *
603
- * @description
604
- * Add the specified number of milliseconds to the given date.
605
- *
606
- * @param {Date|Number} date - the date to be changed
607
- * @param {Number} amount - the amount of milliseconds to be added. Positive decimals will be rounded using `Math.floor`, decimals less than zero will be rounded using `Math.ceil`.
608
- * @returns {Date} the new date with the milliseconds added
609
- * @throws {TypeError} 2 arguments required
610
- *
611
- * @example
612
- * // Add 750 milliseconds to 10 July 2014 12:45:30.000:
613
- * const result = addMilliseconds(new Date(2014, 6, 10, 12, 45, 30, 0), 750)
614
- * //=> Thu Jul 10 2014 12:45:30.750
615
- */function addMilliseconds(dirtyDate,dirtyAmount){requiredArgs(2,arguments);var timestamp=toDate(dirtyDate).getTime();var amount=toInteger(dirtyAmount);return new Date(timestamp+amount);}var defaultOptions={};function getDefaultOptions(){return defaultOptions;}/**
616
- * Google Chrome as of 67.0.3396.87 introduced timezones with offset that includes seconds.
617
- * They usually appear for dates that denote time before the timezones were introduced
618
- * (e.g. for 'Europe/Prague' timezone the offset is GMT+00:57:44 before 1 October 1891
619
- * and GMT+01:00:00 after that date)
620
- *
621
- * Date#getTimezoneOffset returns the offset in minutes and would return 57 for the example above,
622
- * which would lead to incorrect calculations.
623
- *
624
- * This function returns the timezone offset in milliseconds that takes seconds in account.
625
- */function getTimezoneOffsetInMilliseconds(date){var utcDate=new Date(Date.UTC(date.getFullYear(),date.getMonth(),date.getDate(),date.getHours(),date.getMinutes(),date.getSeconds(),date.getMilliseconds()));utcDate.setUTCFullYear(date.getFullYear());return date.getTime()-utcDate.getTime();}/**
626
- * @name startOfDay
627
- * @category Day Helpers
628
- * @summary Return the start of a day for the given date.
629
- *
630
- * @description
631
- * Return the start of a day for the given date.
632
- * The result will be in the local timezone.
633
- *
634
- * @param {Date|Number} date - the original date
635
- * @returns {Date} the start of a day
636
- * @throws {TypeError} 1 argument required
637
- *
638
- * @example
639
- * // The start of a day for 2 September 2014 11:55:00:
640
- * const result = startOfDay(new Date(2014, 8, 2, 11, 55, 0))
641
- * //=> Tue Sep 02 2014 00:00:00
642
- */function startOfDay(dirtyDate){requiredArgs(1,arguments);var date=toDate(dirtyDate);date.setHours(0,0,0,0);return date;}/**
643
- * @name addYears
644
- * @category Year Helpers
645
- * @summary Add the specified number of years to the given date.
646
- *
647
- * @description
648
- * Add the specified number of years to the given date.
649
- *
650
- * @param {Date|Number} date - the date to be changed
651
- * @param {Number} amount - the amount of years to be added. Positive decimals will be rounded using `Math.floor`, decimals less than zero will be rounded using `Math.ceil`.
652
- * @returns {Date} the new date with the years added
653
- * @throws {TypeError} 2 arguments required
654
- *
655
- * @example
656
- * // Add 5 years to 1 September 2014:
657
- * const result = addYears(new Date(2014, 8, 1), 5)
658
- * //=> Sun Sep 01 2019 00:00:00
659
- */function addYears(dirtyDate,dirtyAmount){requiredArgs(2,arguments);var amount=toInteger(dirtyAmount);return addMonths(dirtyDate,amount*12);}/**
660
- * @name isSameDay
661
- * @category Day Helpers
662
- * @summary Are the given dates in the same day (and year and month)?
663
- *
664
- * @description
665
- * Are the given dates in the same day (and year and month)?
666
- *
667
- * @param {Date|Number} dateLeft - the first date to check
668
- * @param {Date|Number} dateRight - the second date to check
669
- * @returns {Boolean} the dates are in the same day (and year and month)
670
- * @throws {TypeError} 2 arguments required
671
- *
672
- * @example
673
- * // Are 4 September 06:00:00 and 4 September 18:00:00 in the same day?
674
- * const result = isSameDay(new Date(2014, 8, 4, 6, 0), new Date(2014, 8, 4, 18, 0))
675
- * //=> true
676
- *
677
- * @example
678
- * // Are 4 September and 4 October in the same day?
679
- * const result = isSameDay(new Date(2014, 8, 4), new Date(2014, 9, 4))
680
- * //=> false
681
- *
682
- * @example
683
- * // Are 4 September, 2014 and 4 September, 2015 in the same day?
684
- * const result = isSameDay(new Date(2014, 8, 4), new Date(2015, 8, 4))
685
- * //=> false
686
- */function isSameDay(dirtyDateLeft,dirtyDateRight){requiredArgs(2,arguments);var dateLeftStartOfDay=startOfDay(dirtyDateLeft);var dateRightStartOfDay=startOfDay(dirtyDateRight);return dateLeftStartOfDay.getTime()===dateRightStartOfDay.getTime();}/**
687
- * @name isDate
688
- * @category Common Helpers
689
- * @summary Is the given value a date?
690
- *
691
- * @description
692
- * Returns true if the given value is an instance of Date. The function works for dates transferred across iframes.
693
- *
694
- * @param {*} value - the value to check
695
- * @returns {boolean} true if the given value is a date
696
- * @throws {TypeError} 1 arguments required
697
- *
698
- * @example
699
- * // For a valid date:
700
- * const result = isDate(new Date())
701
- * //=> true
702
- *
703
- * @example
704
- * // For an invalid date:
705
- * const result = isDate(new Date(NaN))
706
- * //=> true
707
- *
708
- * @example
709
- * // For some value:
710
- * const result = isDate('2014-02-31')
711
- * //=> false
712
- *
713
- * @example
714
- * // For an object:
715
- * const result = isDate({})
716
- * //=> false
717
- */function isDate(value){requiredArgs(1,arguments);return value instanceof Date||typeof value==='object'&&Object.prototype.toString.call(value)==='[object Date]';}/**
718
- * @name isValid
719
- * @category Common Helpers
720
- * @summary Is the given date valid?
721
- *
722
- * @description
723
- * Returns false if argument is Invalid Date and true otherwise.
724
- * Argument is converted to Date using `toDate`. See [toDate]{@link https://date-fns.org/docs/toDate}
725
- * Invalid Date is a Date, whose time value is NaN.
726
- *
727
- * Time value of Date: http://es5.github.io/#x15.9.1.1
728
- *
729
- * @param {*} date - the date to check
730
- * @returns {Boolean} the date is valid
731
- * @throws {TypeError} 1 argument required
732
- *
733
- * @example
734
- * // For the valid date:
735
- * const result = isValid(new Date(2014, 1, 31))
736
- * //=> true
737
- *
738
- * @example
739
- * // For the value, convertable into a date:
740
- * const result = isValid(1393804800000)
741
- * //=> true
742
- *
743
- * @example
744
- * // For the invalid date:
745
- * const result = isValid(new Date(''))
746
- * //=> false
747
- */function isValid(dirtyDate){requiredArgs(1,arguments);if(!isDate(dirtyDate)&&typeof dirtyDate!=='number'){return false;}var date=toDate(dirtyDate);return !isNaN(Number(date));}/**
748
- * @name subMilliseconds
749
- * @category Millisecond Helpers
750
- * @summary Subtract the specified number of milliseconds from the given date.
751
- *
752
- * @description
753
- * Subtract the specified number of milliseconds from the given date.
754
- *
755
- * @param {Date|Number} date - the date to be changed
756
- * @param {Number} amount - the amount of milliseconds to be subtracted. Positive decimals will be rounded using `Math.floor`, decimals less than zero will be rounded using `Math.ceil`.
757
- * @returns {Date} the new date with the milliseconds subtracted
758
- * @throws {TypeError} 2 arguments required
759
- *
760
- * @example
761
- * // Subtract 750 milliseconds from 10 July 2014 12:45:30.000:
762
- * const result = subMilliseconds(new Date(2014, 6, 10, 12, 45, 30, 0), 750)
763
- * //=> Thu Jul 10 2014 12:45:29.250
764
- */function subMilliseconds(dirtyDate,dirtyAmount){requiredArgs(2,arguments);var amount=toInteger(dirtyAmount);return addMilliseconds(dirtyDate,-amount);}var MILLISECONDS_IN_DAY=86400000;function getUTCDayOfYear(dirtyDate){requiredArgs(1,arguments);var date=toDate(dirtyDate);var timestamp=date.getTime();date.setUTCMonth(0,1);date.setUTCHours(0,0,0,0);var startOfYearTimestamp=date.getTime();var difference=timestamp-startOfYearTimestamp;return Math.floor(difference/MILLISECONDS_IN_DAY)+1;}function startOfUTCISOWeek(dirtyDate){requiredArgs(1,arguments);var weekStartsOn=1;var date=toDate(dirtyDate);var day=date.getUTCDay();var diff=(day<weekStartsOn?7:0)+day-weekStartsOn;date.setUTCDate(date.getUTCDate()-diff);date.setUTCHours(0,0,0,0);return date;}function getUTCISOWeekYear(dirtyDate){requiredArgs(1,arguments);var date=toDate(dirtyDate);var year=date.getUTCFullYear();var fourthOfJanuaryOfNextYear=new Date(0);fourthOfJanuaryOfNextYear.setUTCFullYear(year+1,0,4);fourthOfJanuaryOfNextYear.setUTCHours(0,0,0,0);var startOfNextYear=startOfUTCISOWeek(fourthOfJanuaryOfNextYear);var fourthOfJanuaryOfThisYear=new Date(0);fourthOfJanuaryOfThisYear.setUTCFullYear(year,0,4);fourthOfJanuaryOfThisYear.setUTCHours(0,0,0,0);var startOfThisYear=startOfUTCISOWeek(fourthOfJanuaryOfThisYear);if(date.getTime()>=startOfNextYear.getTime()){return year+1;}else if(date.getTime()>=startOfThisYear.getTime()){return year;}else {return year-1;}}function startOfUTCISOWeekYear(dirtyDate){requiredArgs(1,arguments);var year=getUTCISOWeekYear(dirtyDate);var fourthOfJanuary=new Date(0);fourthOfJanuary.setUTCFullYear(year,0,4);fourthOfJanuary.setUTCHours(0,0,0,0);var date=startOfUTCISOWeek(fourthOfJanuary);return date;}var MILLISECONDS_IN_WEEK$1=604800000;function getUTCISOWeek(dirtyDate){requiredArgs(1,arguments);var date=toDate(dirtyDate);var diff=startOfUTCISOWeek(date).getTime()-startOfUTCISOWeekYear(date).getTime();// Round the number of days to the nearest integer
765
- // because the number of milliseconds in a week is not constant
766
- // (e.g. it's different in the week of the daylight saving time clock shift)
767
- return Math.round(diff/MILLISECONDS_IN_WEEK$1)+1;}function startOfUTCWeek(dirtyDate,options){var _ref,_ref2,_ref3,_options$weekStartsOn,_options$locale,_options$locale$optio,_defaultOptions$local,_defaultOptions$local2;requiredArgs(1,arguments);var defaultOptions=getDefaultOptions();var weekStartsOn=toInteger((_ref=(_ref2=(_ref3=(_options$weekStartsOn=options===null||options===void 0?void 0:options.weekStartsOn)!==null&&_options$weekStartsOn!==void 0?_options$weekStartsOn:options===null||options===void 0?void 0:(_options$locale=options.locale)===null||_options$locale===void 0?void 0:(_options$locale$optio=_options$locale.options)===null||_options$locale$optio===void 0?void 0:_options$locale$optio.weekStartsOn)!==null&&_ref3!==void 0?_ref3:defaultOptions.weekStartsOn)!==null&&_ref2!==void 0?_ref2:(_defaultOptions$local=defaultOptions.locale)===null||_defaultOptions$local===void 0?void 0:(_defaultOptions$local2=_defaultOptions$local.options)===null||_defaultOptions$local2===void 0?void 0:_defaultOptions$local2.weekStartsOn)!==null&&_ref!==void 0?_ref:0);// Test if weekStartsOn is between 0 and 6 _and_ is not NaN
768
- if(!(weekStartsOn>=0&&weekStartsOn<=6)){throw new RangeError('weekStartsOn must be between 0 and 6 inclusively');}var date=toDate(dirtyDate);var day=date.getUTCDay();var diff=(day<weekStartsOn?7:0)+day-weekStartsOn;date.setUTCDate(date.getUTCDate()-diff);date.setUTCHours(0,0,0,0);return date;}function getUTCWeekYear(dirtyDate,options){var _ref,_ref2,_ref3,_options$firstWeekCon,_options$locale,_options$locale$optio,_defaultOptions$local,_defaultOptions$local2;requiredArgs(1,arguments);var date=toDate(dirtyDate);var year=date.getUTCFullYear();var defaultOptions=getDefaultOptions();var firstWeekContainsDate=toInteger((_ref=(_ref2=(_ref3=(_options$firstWeekCon=options===null||options===void 0?void 0:options.firstWeekContainsDate)!==null&&_options$firstWeekCon!==void 0?_options$firstWeekCon:options===null||options===void 0?void 0:(_options$locale=options.locale)===null||_options$locale===void 0?void 0:(_options$locale$optio=_options$locale.options)===null||_options$locale$optio===void 0?void 0:_options$locale$optio.firstWeekContainsDate)!==null&&_ref3!==void 0?_ref3:defaultOptions.firstWeekContainsDate)!==null&&_ref2!==void 0?_ref2:(_defaultOptions$local=defaultOptions.locale)===null||_defaultOptions$local===void 0?void 0:(_defaultOptions$local2=_defaultOptions$local.options)===null||_defaultOptions$local2===void 0?void 0:_defaultOptions$local2.firstWeekContainsDate)!==null&&_ref!==void 0?_ref:1);// Test if weekStartsOn is between 1 and 7 _and_ is not NaN
769
- if(!(firstWeekContainsDate>=1&&firstWeekContainsDate<=7)){throw new RangeError('firstWeekContainsDate must be between 1 and 7 inclusively');}var firstWeekOfNextYear=new Date(0);firstWeekOfNextYear.setUTCFullYear(year+1,0,firstWeekContainsDate);firstWeekOfNextYear.setUTCHours(0,0,0,0);var startOfNextYear=startOfUTCWeek(firstWeekOfNextYear,options);var firstWeekOfThisYear=new Date(0);firstWeekOfThisYear.setUTCFullYear(year,0,firstWeekContainsDate);firstWeekOfThisYear.setUTCHours(0,0,0,0);var startOfThisYear=startOfUTCWeek(firstWeekOfThisYear,options);if(date.getTime()>=startOfNextYear.getTime()){return year+1;}else if(date.getTime()>=startOfThisYear.getTime()){return year;}else {return year-1;}}function startOfUTCWeekYear(dirtyDate,options){var _ref,_ref2,_ref3,_options$firstWeekCon,_options$locale,_options$locale$optio,_defaultOptions$local,_defaultOptions$local2;requiredArgs(1,arguments);var defaultOptions=getDefaultOptions();var firstWeekContainsDate=toInteger((_ref=(_ref2=(_ref3=(_options$firstWeekCon=options===null||options===void 0?void 0:options.firstWeekContainsDate)!==null&&_options$firstWeekCon!==void 0?_options$firstWeekCon:options===null||options===void 0?void 0:(_options$locale=options.locale)===null||_options$locale===void 0?void 0:(_options$locale$optio=_options$locale.options)===null||_options$locale$optio===void 0?void 0:_options$locale$optio.firstWeekContainsDate)!==null&&_ref3!==void 0?_ref3:defaultOptions.firstWeekContainsDate)!==null&&_ref2!==void 0?_ref2:(_defaultOptions$local=defaultOptions.locale)===null||_defaultOptions$local===void 0?void 0:(_defaultOptions$local2=_defaultOptions$local.options)===null||_defaultOptions$local2===void 0?void 0:_defaultOptions$local2.firstWeekContainsDate)!==null&&_ref!==void 0?_ref:1);var year=getUTCWeekYear(dirtyDate,options);var firstWeek=new Date(0);firstWeek.setUTCFullYear(year,0,firstWeekContainsDate);firstWeek.setUTCHours(0,0,0,0);var date=startOfUTCWeek(firstWeek,options);return date;}var MILLISECONDS_IN_WEEK=604800000;function getUTCWeek(dirtyDate,options){requiredArgs(1,arguments);var date=toDate(dirtyDate);var diff=startOfUTCWeek(date,options).getTime()-startOfUTCWeekYear(date,options).getTime();// Round the number of days to the nearest integer
770
- // because the number of milliseconds in a week is not constant
771
- // (e.g. it's different in the week of the daylight saving time clock shift)
772
- return Math.round(diff/MILLISECONDS_IN_WEEK)+1;}function addLeadingZeros(number,targetLength){var sign=number<0?'-':'';var output=Math.abs(number).toString();while(output.length<targetLength){output='0'+output;}return sign+output;}/*
773
- * | | Unit | | Unit |
774
- * |-----|--------------------------------|-----|--------------------------------|
775
- * | a | AM, PM | A* | |
776
- * | d | Day of month | D | |
777
- * | h | Hour [1-12] | H | Hour [0-23] |
778
- * | m | Minute | M | Month |
779
- * | s | Second | S | Fraction of second |
780
- * | y | Year (abs) | Y | |
781
- *
782
- * Letters marked by * are not implemented but reserved by Unicode standard.
783
- */var formatters$2={// Year
784
- y:function(date,token){// From http://www.unicode.org/reports/tr35/tr35-31/tr35-dates.html#Date_Format_tokens
785
- // | Year | y | yy | yyy | yyyy | yyyyy |
786
- // |----------|-------|----|-------|-------|-------|
787
- // | AD 1 | 1 | 01 | 001 | 0001 | 00001 |
788
- // | AD 12 | 12 | 12 | 012 | 0012 | 00012 |
789
- // | AD 123 | 123 | 23 | 123 | 0123 | 00123 |
790
- // | AD 1234 | 1234 | 34 | 1234 | 1234 | 01234 |
791
- // | AD 12345 | 12345 | 45 | 12345 | 12345 | 12345 |
792
- var signedYear=date.getUTCFullYear();// Returns 1 for 1 BC (which is year 0 in JavaScript)
793
- var year=signedYear>0?signedYear:1-signedYear;return addLeadingZeros(token==='yy'?year%100:year,token.length);},// Month
794
- M:function(date,token){var month=date.getUTCMonth();return token==='M'?String(month+1):addLeadingZeros(month+1,2);},// Day of the month
795
- d:function(date,token){return addLeadingZeros(date.getUTCDate(),token.length);},// AM or PM
796
- a:function(date,token){var dayPeriodEnumValue=date.getUTCHours()/12>=1?'pm':'am';switch(token){case'a':case'aa':return dayPeriodEnumValue.toUpperCase();case'aaa':return dayPeriodEnumValue;case'aaaaa':return dayPeriodEnumValue[0];case'aaaa':default:return dayPeriodEnumValue==='am'?'a.m.':'p.m.';}},// Hour [1-12]
797
- h:function(date,token){return addLeadingZeros(date.getUTCHours()%12||12,token.length);},// Hour [0-23]
798
- H:function(date,token){return addLeadingZeros(date.getUTCHours(),token.length);},// Minute
799
- m:function(date,token){return addLeadingZeros(date.getUTCMinutes(),token.length);},// Second
800
- s:function(date,token){return addLeadingZeros(date.getUTCSeconds(),token.length);},// Fraction of second
801
- S:function(date,token){var numberOfDigits=token.length;var milliseconds=date.getUTCMilliseconds();var fractionalSeconds=Math.floor(milliseconds*Math.pow(10,numberOfDigits-3));return addLeadingZeros(fractionalSeconds,token.length);}};var formatters$3=formatters$2;var dayPeriodEnum={am:'am',pm:'pm',midnight:'midnight',noon:'noon',morning:'morning',afternoon:'afternoon',evening:'evening',night:'night'};/*
802
- * | | Unit | | Unit |
803
- * |-----|--------------------------------|-----|--------------------------------|
804
- * | a | AM, PM | A* | Milliseconds in day |
805
- * | b | AM, PM, noon, midnight | B | Flexible day period |
806
- * | c | Stand-alone local day of week | C* | Localized hour w/ day period |
807
- * | d | Day of month | D | Day of year |
808
- * | e | Local day of week | E | Day of week |
809
- * | f | | F* | Day of week in month |
810
- * | g* | Modified Julian day | G | Era |
811
- * | h | Hour [1-12] | H | Hour [0-23] |
812
- * | i! | ISO day of week | I! | ISO week of year |
813
- * | j* | Localized hour w/ day period | J* | Localized hour w/o day period |
814
- * | k | Hour [1-24] | K | Hour [0-11] |
815
- * | l* | (deprecated) | L | Stand-alone month |
816
- * | m | Minute | M | Month |
817
- * | n | | N | |
818
- * | o! | Ordinal number modifier | O | Timezone (GMT) |
819
- * | p! | Long localized time | P! | Long localized date |
820
- * | q | Stand-alone quarter | Q | Quarter |
821
- * | r* | Related Gregorian year | R! | ISO week-numbering year |
822
- * | s | Second | S | Fraction of second |
823
- * | t! | Seconds timestamp | T! | Milliseconds timestamp |
824
- * | u | Extended year | U* | Cyclic year |
825
- * | v* | Timezone (generic non-locat.) | V* | Timezone (location) |
826
- * | w | Local week of year | W* | Week of month |
827
- * | x | Timezone (ISO-8601 w/o Z) | X | Timezone (ISO-8601) |
828
- * | y | Year (abs) | Y | Local week-numbering year |
829
- * | z | Timezone (specific non-locat.) | Z* | Timezone (aliases) |
830
- *
831
- * Letters marked by * are not implemented but reserved by Unicode standard.
832
- *
833
- * Letters marked by ! are non-standard, but implemented by date-fns:
834
- * - `o` modifies the previous token to turn it into an ordinal (see `format` docs)
835
- * - `i` is ISO day of week. For `i` and `ii` is returns numeric ISO week days,
836
- * i.e. 7 for Sunday, 1 for Monday, etc.
837
- * - `I` is ISO week of year, as opposed to `w` which is local week of year.
838
- * - `R` is ISO week-numbering year, as opposed to `Y` which is local week-numbering year.
839
- * `R` is supposed to be used in conjunction with `I` and `i`
840
- * for universal ISO week-numbering date, whereas
841
- * `Y` is supposed to be used in conjunction with `w` and `e`
842
- * for week-numbering date specific to the locale.
843
- * - `P` is long localized date format
844
- * - `p` is long localized time format
845
- */var formatters={// Era
846
- G:function(date,token,localize){var era=date.getUTCFullYear()>0?1:0;switch(token){// AD, BC
847
- case'G':case'GG':case'GGG':return localize.era(era,{width:'abbreviated'});// A, B
848
- case'GGGGG':return localize.era(era,{width:'narrow'});// Anno Domini, Before Christ
849
- case'GGGG':default:return localize.era(era,{width:'wide'});}},// Year
850
- y:function(date,token,localize){// Ordinal number
851
- if(token==='yo'){var signedYear=date.getUTCFullYear();// Returns 1 for 1 BC (which is year 0 in JavaScript)
852
- var year=signedYear>0?signedYear:1-signedYear;return localize.ordinalNumber(year,{unit:'year'});}return formatters$3.y(date,token);},// Local week-numbering year
853
- Y:function(date,token,localize,options){var signedWeekYear=getUTCWeekYear(date,options);// Returns 1 for 1 BC (which is year 0 in JavaScript)
854
- var weekYear=signedWeekYear>0?signedWeekYear:1-signedWeekYear;// Two digit year
855
- if(token==='YY'){var twoDigitYear=weekYear%100;return addLeadingZeros(twoDigitYear,2);}// Ordinal number
856
- if(token==='Yo'){return localize.ordinalNumber(weekYear,{unit:'year'});}// Padding
857
- return addLeadingZeros(weekYear,token.length);},// ISO week-numbering year
858
- R:function(date,token){var isoWeekYear=getUTCISOWeekYear(date);// Padding
859
- return addLeadingZeros(isoWeekYear,token.length);},// Extended year. This is a single number designating the year of this calendar system.
860
- // The main difference between `y` and `u` localizers are B.C. years:
861
- // | Year | `y` | `u` |
862
- // |------|-----|-----|
863
- // | AC 1 | 1 | 1 |
864
- // | BC 1 | 1 | 0 |
865
- // | BC 2 | 2 | -1 |
866
- // Also `yy` always returns the last two digits of a year,
867
- // while `uu` pads single digit years to 2 characters and returns other years unchanged.
868
- u:function(date,token){var year=date.getUTCFullYear();return addLeadingZeros(year,token.length);},// Quarter
869
- Q:function(date,token,localize){var quarter=Math.ceil((date.getUTCMonth()+1)/3);switch(token){// 1, 2, 3, 4
870
- case'Q':return String(quarter);// 01, 02, 03, 04
871
- case'QQ':return addLeadingZeros(quarter,2);// 1st, 2nd, 3rd, 4th
872
- case'Qo':return localize.ordinalNumber(quarter,{unit:'quarter'});// Q1, Q2, Q3, Q4
873
- case'QQQ':return localize.quarter(quarter,{width:'abbreviated',context:'formatting'});// 1, 2, 3, 4 (narrow quarter; could be not numerical)
874
- case'QQQQQ':return localize.quarter(quarter,{width:'narrow',context:'formatting'});// 1st quarter, 2nd quarter, ...
875
- case'QQQQ':default:return localize.quarter(quarter,{width:'wide',context:'formatting'});}},// Stand-alone quarter
876
- q:function(date,token,localize){var quarter=Math.ceil((date.getUTCMonth()+1)/3);switch(token){// 1, 2, 3, 4
877
- case'q':return String(quarter);// 01, 02, 03, 04
878
- case'qq':return addLeadingZeros(quarter,2);// 1st, 2nd, 3rd, 4th
879
- case'qo':return localize.ordinalNumber(quarter,{unit:'quarter'});// Q1, Q2, Q3, Q4
880
- case'qqq':return localize.quarter(quarter,{width:'abbreviated',context:'standalone'});// 1, 2, 3, 4 (narrow quarter; could be not numerical)
881
- case'qqqqq':return localize.quarter(quarter,{width:'narrow',context:'standalone'});// 1st quarter, 2nd quarter, ...
882
- case'qqqq':default:return localize.quarter(quarter,{width:'wide',context:'standalone'});}},// Month
883
- M:function(date,token,localize){var month=date.getUTCMonth();switch(token){case'M':case'MM':return formatters$3.M(date,token);// 1st, 2nd, ..., 12th
884
- case'Mo':return localize.ordinalNumber(month+1,{unit:'month'});// Jan, Feb, ..., Dec
885
- case'MMM':return localize.month(month,{width:'abbreviated',context:'formatting'});// J, F, ..., D
886
- case'MMMMM':return localize.month(month,{width:'narrow',context:'formatting'});// January, February, ..., December
887
- case'MMMM':default:return localize.month(month,{width:'wide',context:'formatting'});}},// Stand-alone month
888
- L:function(date,token,localize){var month=date.getUTCMonth();switch(token){// 1, 2, ..., 12
889
- case'L':return String(month+1);// 01, 02, ..., 12
890
- case'LL':return addLeadingZeros(month+1,2);// 1st, 2nd, ..., 12th
891
- case'Lo':return localize.ordinalNumber(month+1,{unit:'month'});// Jan, Feb, ..., Dec
892
- case'LLL':return localize.month(month,{width:'abbreviated',context:'standalone'});// J, F, ..., D
893
- case'LLLLL':return localize.month(month,{width:'narrow',context:'standalone'});// January, February, ..., December
894
- case'LLLL':default:return localize.month(month,{width:'wide',context:'standalone'});}},// Local week of year
895
- w:function(date,token,localize,options){var week=getUTCWeek(date,options);if(token==='wo'){return localize.ordinalNumber(week,{unit:'week'});}return addLeadingZeros(week,token.length);},// ISO week of year
896
- I:function(date,token,localize){var isoWeek=getUTCISOWeek(date);if(token==='Io'){return localize.ordinalNumber(isoWeek,{unit:'week'});}return addLeadingZeros(isoWeek,token.length);},// Day of the month
897
- d:function(date,token,localize){if(token==='do'){return localize.ordinalNumber(date.getUTCDate(),{unit:'date'});}return formatters$3.d(date,token);},// Day of year
898
- D:function(date,token,localize){var dayOfYear=getUTCDayOfYear(date);if(token==='Do'){return localize.ordinalNumber(dayOfYear,{unit:'dayOfYear'});}return addLeadingZeros(dayOfYear,token.length);},// Day of week
899
- E:function(date,token,localize){var dayOfWeek=date.getUTCDay();switch(token){// Tue
900
- case'E':case'EE':case'EEE':return localize.day(dayOfWeek,{width:'abbreviated',context:'formatting'});// T
901
- case'EEEEE':return localize.day(dayOfWeek,{width:'narrow',context:'formatting'});// Tu
902
- case'EEEEEE':return localize.day(dayOfWeek,{width:'short',context:'formatting'});// Tuesday
903
- case'EEEE':default:return localize.day(dayOfWeek,{width:'wide',context:'formatting'});}},// Local day of week
904
- e:function(date,token,localize,options){var dayOfWeek=date.getUTCDay();var localDayOfWeek=(dayOfWeek-options.weekStartsOn+8)%7||7;switch(token){// Numerical value (Nth day of week with current locale or weekStartsOn)
905
- case'e':return String(localDayOfWeek);// Padded numerical value
906
- case'ee':return addLeadingZeros(localDayOfWeek,2);// 1st, 2nd, ..., 7th
907
- case'eo':return localize.ordinalNumber(localDayOfWeek,{unit:'day'});case'eee':return localize.day(dayOfWeek,{width:'abbreviated',context:'formatting'});// T
908
- case'eeeee':return localize.day(dayOfWeek,{width:'narrow',context:'formatting'});// Tu
909
- case'eeeeee':return localize.day(dayOfWeek,{width:'short',context:'formatting'});// Tuesday
910
- case'eeee':default:return localize.day(dayOfWeek,{width:'wide',context:'formatting'});}},// Stand-alone local day of week
911
- c:function(date,token,localize,options){var dayOfWeek=date.getUTCDay();var localDayOfWeek=(dayOfWeek-options.weekStartsOn+8)%7||7;switch(token){// Numerical value (same as in `e`)
912
- case'c':return String(localDayOfWeek);// Padded numerical value
913
- case'cc':return addLeadingZeros(localDayOfWeek,token.length);// 1st, 2nd, ..., 7th
914
- case'co':return localize.ordinalNumber(localDayOfWeek,{unit:'day'});case'ccc':return localize.day(dayOfWeek,{width:'abbreviated',context:'standalone'});// T
915
- case'ccccc':return localize.day(dayOfWeek,{width:'narrow',context:'standalone'});// Tu
916
- case'cccccc':return localize.day(dayOfWeek,{width:'short',context:'standalone'});// Tuesday
917
- case'cccc':default:return localize.day(dayOfWeek,{width:'wide',context:'standalone'});}},// ISO day of week
918
- i:function(date,token,localize){var dayOfWeek=date.getUTCDay();var isoDayOfWeek=dayOfWeek===0?7:dayOfWeek;switch(token){// 2
919
- case'i':return String(isoDayOfWeek);// 02
920
- case'ii':return addLeadingZeros(isoDayOfWeek,token.length);// 2nd
921
- case'io':return localize.ordinalNumber(isoDayOfWeek,{unit:'day'});// Tue
922
- case'iii':return localize.day(dayOfWeek,{width:'abbreviated',context:'formatting'});// T
923
- case'iiiii':return localize.day(dayOfWeek,{width:'narrow',context:'formatting'});// Tu
924
- case'iiiiii':return localize.day(dayOfWeek,{width:'short',context:'formatting'});// Tuesday
925
- case'iiii':default:return localize.day(dayOfWeek,{width:'wide',context:'formatting'});}},// AM or PM
926
- a:function(date,token,localize){var hours=date.getUTCHours();var dayPeriodEnumValue=hours/12>=1?'pm':'am';switch(token){case'a':case'aa':return localize.dayPeriod(dayPeriodEnumValue,{width:'abbreviated',context:'formatting'});case'aaa':return localize.dayPeriod(dayPeriodEnumValue,{width:'abbreviated',context:'formatting'}).toLowerCase();case'aaaaa':return localize.dayPeriod(dayPeriodEnumValue,{width:'narrow',context:'formatting'});case'aaaa':default:return localize.dayPeriod(dayPeriodEnumValue,{width:'wide',context:'formatting'});}},// AM, PM, midnight, noon
927
- b:function(date,token,localize){var hours=date.getUTCHours();var dayPeriodEnumValue;if(hours===12){dayPeriodEnumValue=dayPeriodEnum.noon;}else if(hours===0){dayPeriodEnumValue=dayPeriodEnum.midnight;}else {dayPeriodEnumValue=hours/12>=1?'pm':'am';}switch(token){case'b':case'bb':return localize.dayPeriod(dayPeriodEnumValue,{width:'abbreviated',context:'formatting'});case'bbb':return localize.dayPeriod(dayPeriodEnumValue,{width:'abbreviated',context:'formatting'}).toLowerCase();case'bbbbb':return localize.dayPeriod(dayPeriodEnumValue,{width:'narrow',context:'formatting'});case'bbbb':default:return localize.dayPeriod(dayPeriodEnumValue,{width:'wide',context:'formatting'});}},// in the morning, in the afternoon, in the evening, at night
928
- B:function(date,token,localize){var hours=date.getUTCHours();var dayPeriodEnumValue;if(hours>=17){dayPeriodEnumValue=dayPeriodEnum.evening;}else if(hours>=12){dayPeriodEnumValue=dayPeriodEnum.afternoon;}else if(hours>=4){dayPeriodEnumValue=dayPeriodEnum.morning;}else {dayPeriodEnumValue=dayPeriodEnum.night;}switch(token){case'B':case'BB':case'BBB':return localize.dayPeriod(dayPeriodEnumValue,{width:'abbreviated',context:'formatting'});case'BBBBB':return localize.dayPeriod(dayPeriodEnumValue,{width:'narrow',context:'formatting'});case'BBBB':default:return localize.dayPeriod(dayPeriodEnumValue,{width:'wide',context:'formatting'});}},// Hour [1-12]
929
- h:function(date,token,localize){if(token==='ho'){var hours=date.getUTCHours()%12;if(hours===0)hours=12;return localize.ordinalNumber(hours,{unit:'hour'});}return formatters$3.h(date,token);},// Hour [0-23]
930
- H:function(date,token,localize){if(token==='Ho'){return localize.ordinalNumber(date.getUTCHours(),{unit:'hour'});}return formatters$3.H(date,token);},// Hour [0-11]
931
- K:function(date,token,localize){var hours=date.getUTCHours()%12;if(token==='Ko'){return localize.ordinalNumber(hours,{unit:'hour'});}return addLeadingZeros(hours,token.length);},// Hour [1-24]
932
- k:function(date,token,localize){var hours=date.getUTCHours();if(hours===0)hours=24;if(token==='ko'){return localize.ordinalNumber(hours,{unit:'hour'});}return addLeadingZeros(hours,token.length);},// Minute
933
- m:function(date,token,localize){if(token==='mo'){return localize.ordinalNumber(date.getUTCMinutes(),{unit:'minute'});}return formatters$3.m(date,token);},// Second
934
- s:function(date,token,localize){if(token==='so'){return localize.ordinalNumber(date.getUTCSeconds(),{unit:'second'});}return formatters$3.s(date,token);},// Fraction of second
935
- S:function(date,token){return formatters$3.S(date,token);},// Timezone (ISO-8601. If offset is 0, output is always `'Z'`)
936
- X:function(date,token,_localize,options){var originalDate=options._originalDate||date;var timezoneOffset=originalDate.getTimezoneOffset();if(timezoneOffset===0){return 'Z';}switch(token){// Hours and optional minutes
937
- case'X':return formatTimezoneWithOptionalMinutes(timezoneOffset);// Hours, minutes and optional seconds without `:` delimiter
938
- // Note: neither ISO-8601 nor JavaScript supports seconds in timezone offsets
939
- // so this token always has the same output as `XX`
940
- case'XXXX':case'XX':// Hours and minutes without `:` delimiter
941
- return formatTimezone(timezoneOffset);// Hours, minutes and optional seconds with `:` delimiter
942
- // Note: neither ISO-8601 nor JavaScript supports seconds in timezone offsets
943
- // so this token always has the same output as `XXX`
944
- case'XXXXX':case'XXX':// Hours and minutes with `:` delimiter
945
- default:return formatTimezone(timezoneOffset,':');}},// Timezone (ISO-8601. If offset is 0, output is `'+00:00'` or equivalent)
946
- x:function(date,token,_localize,options){var originalDate=options._originalDate||date;var timezoneOffset=originalDate.getTimezoneOffset();switch(token){// Hours and optional minutes
947
- case'x':return formatTimezoneWithOptionalMinutes(timezoneOffset);// Hours, minutes and optional seconds without `:` delimiter
948
- // Note: neither ISO-8601 nor JavaScript supports seconds in timezone offsets
949
- // so this token always has the same output as `xx`
950
- case'xxxx':case'xx':// Hours and minutes without `:` delimiter
951
- return formatTimezone(timezoneOffset);// Hours, minutes and optional seconds with `:` delimiter
952
- // Note: neither ISO-8601 nor JavaScript supports seconds in timezone offsets
953
- // so this token always has the same output as `xxx`
954
- case'xxxxx':case'xxx':// Hours and minutes with `:` delimiter
955
- default:return formatTimezone(timezoneOffset,':');}},// Timezone (GMT)
956
- O:function(date,token,_localize,options){var originalDate=options._originalDate||date;var timezoneOffset=originalDate.getTimezoneOffset();switch(token){// Short
957
- case'O':case'OO':case'OOO':return 'GMT'+formatTimezoneShort(timezoneOffset,':');// Long
958
- case'OOOO':default:return 'GMT'+formatTimezone(timezoneOffset,':');}},// Timezone (specific non-location)
959
- z:function(date,token,_localize,options){var originalDate=options._originalDate||date;var timezoneOffset=originalDate.getTimezoneOffset();switch(token){// Short
960
- case'z':case'zz':case'zzz':return 'GMT'+formatTimezoneShort(timezoneOffset,':');// Long
961
- case'zzzz':default:return 'GMT'+formatTimezone(timezoneOffset,':');}},// Seconds timestamp
962
- t:function(date,token,_localize,options){var originalDate=options._originalDate||date;var timestamp=Math.floor(originalDate.getTime()/1000);return addLeadingZeros(timestamp,token.length);},// Milliseconds timestamp
963
- T:function(date,token,_localize,options){var originalDate=options._originalDate||date;var timestamp=originalDate.getTime();return addLeadingZeros(timestamp,token.length);}};function formatTimezoneShort(offset,dirtyDelimiter){var sign=offset>0?'-':'+';var absOffset=Math.abs(offset);var hours=Math.floor(absOffset/60);var minutes=absOffset%60;if(minutes===0){return sign+String(hours);}var delimiter=dirtyDelimiter||'';return sign+String(hours)+delimiter+addLeadingZeros(minutes,2);}function formatTimezoneWithOptionalMinutes(offset,dirtyDelimiter){if(offset%60===0){var sign=offset>0?'-':'+';return sign+addLeadingZeros(Math.abs(offset)/60,2);}return formatTimezone(offset,dirtyDelimiter);}function formatTimezone(offset,dirtyDelimiter){var delimiter=dirtyDelimiter||'';var sign=offset>0?'-':'+';var absOffset=Math.abs(offset);var hours=addLeadingZeros(Math.floor(absOffset/60),2);var minutes=addLeadingZeros(absOffset%60,2);return sign+hours+delimiter+minutes;}var formatters$1=formatters;var dateLongFormatter=function dateLongFormatter(pattern,formatLong){switch(pattern){case'P':return formatLong.date({width:'short'});case'PP':return formatLong.date({width:'medium'});case'PPP':return formatLong.date({width:'long'});case'PPPP':default:return formatLong.date({width:'full'});}};var timeLongFormatter=function timeLongFormatter(pattern,formatLong){switch(pattern){case'p':return formatLong.time({width:'short'});case'pp':return formatLong.time({width:'medium'});case'ppp':return formatLong.time({width:'long'});case'pppp':default:return formatLong.time({width:'full'});}};var dateTimeLongFormatter=function dateTimeLongFormatter(pattern,formatLong){var matchResult=pattern.match(/(P+)(p+)?/)||[];var datePattern=matchResult[1];var timePattern=matchResult[2];if(!timePattern){return dateLongFormatter(pattern,formatLong);}var dateTimeFormat;switch(datePattern){case'P':dateTimeFormat=formatLong.dateTime({width:'short'});break;case'PP':dateTimeFormat=formatLong.dateTime({width:'medium'});break;case'PPP':dateTimeFormat=formatLong.dateTime({width:'long'});break;case'PPPP':default:dateTimeFormat=formatLong.dateTime({width:'full'});break;}return dateTimeFormat.replace('{{date}}',dateLongFormatter(datePattern,formatLong)).replace('{{time}}',timeLongFormatter(timePattern,formatLong));};var longFormatters={p:timeLongFormatter,P:dateTimeLongFormatter};var longFormatters$1=longFormatters;var protectedDayOfYearTokens=['D','DD'];var protectedWeekYearTokens=['YY','YYYY'];function isProtectedDayOfYearToken(token){return protectedDayOfYearTokens.indexOf(token)!==-1;}function isProtectedWeekYearToken(token){return protectedWeekYearTokens.indexOf(token)!==-1;}function throwProtectedError(token,format,input){if(token==='YYYY'){throw new RangeError("Use `yyyy` instead of `YYYY` (in `".concat(format,"`) for formatting years to the input `").concat(input,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));}else if(token==='YY'){throw new RangeError("Use `yy` instead of `YY` (in `".concat(format,"`) for formatting years to the input `").concat(input,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));}else if(token==='D'){throw new RangeError("Use `d` instead of `D` (in `".concat(format,"`) for formatting days of the month to the input `").concat(input,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));}else if(token==='DD'){throw new RangeError("Use `dd` instead of `DD` (in `".concat(format,"`) for formatting days of the month to the input `").concat(input,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));}}var formatDistanceLocale={lessThanXSeconds:{one:'less than a second',other:'less than {{count}} seconds'},xSeconds:{one:'1 second',other:'{{count}} seconds'},halfAMinute:'half a minute',lessThanXMinutes:{one:'less than a minute',other:'less than {{count}} minutes'},xMinutes:{one:'1 minute',other:'{{count}} minutes'},aboutXHours:{one:'about 1 hour',other:'about {{count}} hours'},xHours:{one:'1 hour',other:'{{count}} hours'},xDays:{one:'1 day',other:'{{count}} days'},aboutXWeeks:{one:'about 1 week',other:'about {{count}} weeks'},xWeeks:{one:'1 week',other:'{{count}} weeks'},aboutXMonths:{one:'about 1 month',other:'about {{count}} months'},xMonths:{one:'1 month',other:'{{count}} months'},aboutXYears:{one:'about 1 year',other:'about {{count}} years'},xYears:{one:'1 year',other:'{{count}} years'},overXYears:{one:'over 1 year',other:'over {{count}} years'},almostXYears:{one:'almost 1 year',other:'almost {{count}} years'}};var formatDistance=function formatDistance(token,count,options){var result;var tokenValue=formatDistanceLocale[token];if(typeof tokenValue==='string'){result=tokenValue;}else if(count===1){result=tokenValue.one;}else {result=tokenValue.other.replace('{{count}}',count.toString());}if(options!==null&&options!==void 0&&options.addSuffix){if(options.comparison&&options.comparison>0){return 'in '+result;}else {return result+' ago';}}return result;};var formatDistance$1=formatDistance;function buildFormatLongFn(args){return function(){var options=arguments.length>0&&arguments[0]!==undefined?arguments[0]:{};// TODO: Remove String()
964
- var width=options.width?String(options.width):args.defaultWidth;var format=args.formats[width]||args.formats[args.defaultWidth];return format;};}var dateFormats={full:'EEEE, MMMM do, y',long:'MMMM do, y',medium:'MMM d, y',short:'MM/dd/yyyy'};var timeFormats={full:'h:mm:ss a zzzz',long:'h:mm:ss a z',medium:'h:mm:ss a',short:'h:mm a'};var dateTimeFormats={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:'{{date}}, {{time}}',short:'{{date}}, {{time}}'};var formatLong={date:buildFormatLongFn({formats:dateFormats,defaultWidth:'full'}),time:buildFormatLongFn({formats:timeFormats,defaultWidth:'full'}),dateTime:buildFormatLongFn({formats:dateTimeFormats,defaultWidth:'full'})};var formatLong$1=formatLong;var formatRelativeLocale={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:'P'};var formatRelative=function formatRelative(token,_date,_baseDate,_options){return formatRelativeLocale[token];};var formatRelative$1=formatRelative;function buildLocalizeFn(args){return function(dirtyIndex,options){var context=options!==null&&options!==void 0&&options.context?String(options.context):'standalone';var valuesArray;if(context==='formatting'&&args.formattingValues){var defaultWidth=args.defaultFormattingWidth||args.defaultWidth;var width=options!==null&&options!==void 0&&options.width?String(options.width):defaultWidth;valuesArray=args.formattingValues[width]||args.formattingValues[defaultWidth];}else {var _defaultWidth=args.defaultWidth;var _width=options!==null&&options!==void 0&&options.width?String(options.width):args.defaultWidth;valuesArray=args.values[_width]||args.values[_defaultWidth];}var index=args.argumentCallback?args.argumentCallback(dirtyIndex):dirtyIndex;// @ts-ignore: For some reason TypeScript just don't want to match it, no matter how hard we try. I challenge you to try to remove it!
965
- return valuesArray[index];};}var eraValues={narrow:['B','A'],abbreviated:['BC','AD'],wide:['Before Christ','Anno Domini']};var quarterValues={narrow:['1','2','3','4'],abbreviated:['Q1','Q2','Q3','Q4'],wide:['1st quarter','2nd quarter','3rd quarter','4th quarter']};// Note: in English, the names of days of the week and months are capitalized.
966
- // If you are making a new locale based on this one, check if the same is true for the language you're working on.
967
- // Generally, formatted dates should look like they are in the middle of a sentence,
968
- // e.g. in Spanish language the weekdays and months should be in the lowercase.
969
- var monthValues={narrow:['J','F','M','A','M','J','J','A','S','O','N','D'],abbreviated:['Jan','Feb','Mar','Apr','May','Jun','Jul','Aug','Sep','Oct','Nov','Dec'],wide:['January','February','March','April','May','June','July','August','September','October','November','December']};var dayValues={narrow:['S','M','T','W','T','F','S'],short:['Su','Mo','Tu','We','Th','Fr','Sa'],abbreviated:['Sun','Mon','Tue','Wed','Thu','Fri','Sat'],wide:['Sunday','Monday','Tuesday','Wednesday','Thursday','Friday','Saturday']};var dayPeriodValues={narrow:{am:'a',pm:'p',midnight:'mi',noon:'n',morning:'morning',afternoon:'afternoon',evening:'evening',night:'night'},abbreviated:{am:'AM',pm:'PM',midnight:'midnight',noon:'noon',morning:'morning',afternoon:'afternoon',evening:'evening',night:'night'},wide:{am:'a.m.',pm:'p.m.',midnight:'midnight',noon:'noon',morning:'morning',afternoon:'afternoon',evening:'evening',night:'night'}};var formattingDayPeriodValues={narrow:{am:'a',pm:'p',midnight:'mi',noon:'n',morning:'in the morning',afternoon:'in the afternoon',evening:'in the evening',night:'at night'},abbreviated:{am:'AM',pm:'PM',midnight:'midnight',noon:'noon',morning:'in the morning',afternoon:'in the afternoon',evening:'in the evening',night:'at night'},wide:{am:'a.m.',pm:'p.m.',midnight:'midnight',noon:'noon',morning:'in the morning',afternoon:'in the afternoon',evening:'in the evening',night:'at night'}};var ordinalNumber=function ordinalNumber(dirtyNumber,_options){var number=Number(dirtyNumber);// If ordinal numbers depend on context, for example,
970
- // if they are different for different grammatical genders,
971
- // use `options.unit`.
972
- //
973
- // `unit` can be 'year', 'quarter', 'month', 'week', 'date', 'dayOfYear',
974
- // 'day', 'hour', 'minute', 'second'.
975
- var rem100=number%100;if(rem100>20||rem100<10){switch(rem100%10){case 1:return number+'st';case 2:return number+'nd';case 3:return number+'rd';}}return number+'th';};var localize={ordinalNumber:ordinalNumber,era:buildLocalizeFn({values:eraValues,defaultWidth:'wide'}),quarter:buildLocalizeFn({values:quarterValues,defaultWidth:'wide',argumentCallback:function(quarter){return quarter-1;}}),month:buildLocalizeFn({values:monthValues,defaultWidth:'wide'}),day:buildLocalizeFn({values:dayValues,defaultWidth:'wide'}),dayPeriod:buildLocalizeFn({values:dayPeriodValues,defaultWidth:'wide',formattingValues:formattingDayPeriodValues,defaultFormattingWidth:'wide'})};var localize$1=localize;function buildMatchFn(args){return function(string){var options=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{};var width=options.width;var matchPattern=width&&args.matchPatterns[width]||args.matchPatterns[args.defaultMatchWidth];var matchResult=string.match(matchPattern);if(!matchResult){return null;}var matchedString=matchResult[0];var parsePatterns=width&&args.parsePatterns[width]||args.parsePatterns[args.defaultParseWidth];var key=Array.isArray(parsePatterns)?findIndex(parsePatterns,function(pattern){return pattern.test(matchedString);}):findKey(parsePatterns,function(pattern){return pattern.test(matchedString);});var value;value=args.valueCallback?args.valueCallback(key):key;value=options.valueCallback?options.valueCallback(value):value;var rest=string.slice(matchedString.length);return {value:value,rest:rest};};}function findKey(object,predicate){for(var key in object){if(object.hasOwnProperty(key)&&predicate(object[key])){return key;}}return undefined;}function findIndex(array,predicate){for(var key=0;key<array.length;key++){if(predicate(array[key])){return key;}}return undefined;}function buildMatchPatternFn(args){return function(string){var options=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{};var matchResult=string.match(args.matchPattern);if(!matchResult)return null;var matchedString=matchResult[0];var parseResult=string.match(args.parsePattern);if(!parseResult)return null;var value=args.valueCallback?args.valueCallback(parseResult[0]):parseResult[0];value=options.valueCallback?options.valueCallback(value):value;var rest=string.slice(matchedString.length);return {value:value,rest:rest};};}var matchOrdinalNumberPattern=/^(\d+)(th|st|nd|rd)?/i;var parseOrdinalNumberPattern=/\d+/i;var matchEraPatterns={narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i};var parseEraPatterns={any:[/^b/i,/^(a|c)/i]};var matchQuarterPatterns={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i};var parseQuarterPatterns={any:[/1/i,/2/i,/3/i,/4/i]};var matchMonthPatterns={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i};var parseMonthPatterns={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]};var matchDayPatterns={narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i};var parseDayPatterns={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]};var matchDayPeriodPatterns={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i};var parseDayPeriodPatterns={any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}};var match={ordinalNumber:buildMatchPatternFn({matchPattern:matchOrdinalNumberPattern,parsePattern:parseOrdinalNumberPattern,valueCallback:function(value){return parseInt(value,10);}}),era:buildMatchFn({matchPatterns:matchEraPatterns,defaultMatchWidth:'wide',parsePatterns:parseEraPatterns,defaultParseWidth:'any'}),quarter:buildMatchFn({matchPatterns:matchQuarterPatterns,defaultMatchWidth:'wide',parsePatterns:parseQuarterPatterns,defaultParseWidth:'any',valueCallback:function(index){return index+1;}}),month:buildMatchFn({matchPatterns:matchMonthPatterns,defaultMatchWidth:'wide',parsePatterns:parseMonthPatterns,defaultParseWidth:'any'}),day:buildMatchFn({matchPatterns:matchDayPatterns,defaultMatchWidth:'wide',parsePatterns:parseDayPatterns,defaultParseWidth:'any'}),dayPeriod:buildMatchFn({matchPatterns:matchDayPeriodPatterns,defaultMatchWidth:'any',parsePatterns:parseDayPeriodPatterns,defaultParseWidth:'any'})};var match$1=match;/**
976
- * @type {Locale}
977
- * @category Locales
978
- * @summary English locale (United States).
979
- * @language English
980
- * @iso-639-2 eng
981
- * @author Sasha Koss [@kossnocorp]{@link https://github.com/kossnocorp}
982
- * @author Lesha Koss [@leshakoss]{@link https://github.com/leshakoss}
983
- */var locale={code:'en-US',formatDistance:formatDistance$1,formatLong:formatLong$1,formatRelative:formatRelative$1,localize:localize$1,match:match$1,options:{weekStartsOn:0/* Sunday */,firstWeekContainsDate:1}};var defaultLocale=locale;// - [yYQqMLwIdDecihHKkms]o matches any available ordinal number token
984
- // (one of the certain letters followed by `o`)
985
- // - (\w)\1* matches any sequences of the same letter
986
- // - '' matches two quote characters in a row
987
- // - '(''|[^'])+('|$) matches anything surrounded by two quote characters ('),
988
- // except a single quote symbol, which ends the sequence.
989
- // Two quote characters do not end the sequence.
990
- // If there is no matching single quote
991
- // then the sequence will continue until the end of the string.
992
- // - . matches any single character unmatched by previous parts of the RegExps
993
- var formattingTokensRegExp=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g;// This RegExp catches symbols escaped by quotes, and also
994
- // sequences of symbols P, p, and the combinations like `PPPPPPPppppp`
995
- var longFormattingTokensRegExp=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g;var escapedStringRegExp=/^'([^]*?)'?$/;var doubleQuoteRegExp=/''/g;var unescapedLatinCharacterRegExp=/[a-zA-Z]/;/**
996
- * @name format
997
- * @category Common Helpers
998
- * @summary Format the date.
999
- *
1000
- * @description
1001
- * Return the formatted date string in the given format. The result may vary by locale.
1002
- *
1003
- * > ⚠️ Please note that the `format` tokens differ from Moment.js and other libraries.
1004
- * > See: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md
1005
- *
1006
- * The characters wrapped between two single quotes characters (') are escaped.
1007
- * Two single quotes in a row, whether inside or outside a quoted sequence, represent a 'real' single quote.
1008
- * (see the last example)
1009
- *
1010
- * Format of the string is based on Unicode Technical Standard #35:
1011
- * https://www.unicode.org/reports/tr35/tr35-dates.html#Date_Field_Symbol_Table
1012
- * with a few additions (see note 7 below the table).
1013
- *
1014
- * Accepted patterns:
1015
- * | Unit | Pattern | Result examples | Notes |
1016
- * |---------------------------------|---------|-----------------------------------|-------|
1017
- * | Era | G..GGG | AD, BC | |
1018
- * | | GGGG | Anno Domini, Before Christ | 2 |
1019
- * | | GGGGG | A, B | |
1020
- * | Calendar year | y | 44, 1, 1900, 2017 | 5 |
1021
- * | | yo | 44th, 1st, 0th, 17th | 5,7 |
1022
- * | | yy | 44, 01, 00, 17 | 5 |
1023
- * | | yyy | 044, 001, 1900, 2017 | 5 |
1024
- * | | yyyy | 0044, 0001, 1900, 2017 | 5 |
1025
- * | | yyyyy | ... | 3,5 |
1026
- * | Local week-numbering year | Y | 44, 1, 1900, 2017 | 5 |
1027
- * | | Yo | 44th, 1st, 1900th, 2017th | 5,7 |
1028
- * | | YY | 44, 01, 00, 17 | 5,8 |
1029
- * | | YYY | 044, 001, 1900, 2017 | 5 |
1030
- * | | YYYY | 0044, 0001, 1900, 2017 | 5,8 |
1031
- * | | YYYYY | ... | 3,5 |
1032
- * | ISO week-numbering year | R | -43, 0, 1, 1900, 2017 | 5,7 |
1033
- * | | RR | -43, 00, 01, 1900, 2017 | 5,7 |
1034
- * | | RRR | -043, 000, 001, 1900, 2017 | 5,7 |
1035
- * | | RRRR | -0043, 0000, 0001, 1900, 2017 | 5,7 |
1036
- * | | RRRRR | ... | 3,5,7 |
1037
- * | Extended year | u | -43, 0, 1, 1900, 2017 | 5 |
1038
- * | | uu | -43, 01, 1900, 2017 | 5 |
1039
- * | | uuu | -043, 001, 1900, 2017 | 5 |
1040
- * | | uuuu | -0043, 0001, 1900, 2017 | 5 |
1041
- * | | uuuuu | ... | 3,5 |
1042
- * | Quarter (formatting) | Q | 1, 2, 3, 4 | |
1043
- * | | Qo | 1st, 2nd, 3rd, 4th | 7 |
1044
- * | | QQ | 01, 02, 03, 04 | |
1045
- * | | QQQ | Q1, Q2, Q3, Q4 | |
1046
- * | | QQQQ | 1st quarter, 2nd quarter, ... | 2 |
1047
- * | | QQQQQ | 1, 2, 3, 4 | 4 |
1048
- * | Quarter (stand-alone) | q | 1, 2, 3, 4 | |
1049
- * | | qo | 1st, 2nd, 3rd, 4th | 7 |
1050
- * | | qq | 01, 02, 03, 04 | |
1051
- * | | qqq | Q1, Q2, Q3, Q4 | |
1052
- * | | qqqq | 1st quarter, 2nd quarter, ... | 2 |
1053
- * | | qqqqq | 1, 2, 3, 4 | 4 |
1054
- * | Month (formatting) | M | 1, 2, ..., 12 | |
1055
- * | | Mo | 1st, 2nd, ..., 12th | 7 |
1056
- * | | MM | 01, 02, ..., 12 | |
1057
- * | | MMM | Jan, Feb, ..., Dec | |
1058
- * | | MMMM | January, February, ..., December | 2 |
1059
- * | | MMMMM | J, F, ..., D | |
1060
- * | Month (stand-alone) | L | 1, 2, ..., 12 | |
1061
- * | | Lo | 1st, 2nd, ..., 12th | 7 |
1062
- * | | LL | 01, 02, ..., 12 | |
1063
- * | | LLL | Jan, Feb, ..., Dec | |
1064
- * | | LLLL | January, February, ..., December | 2 |
1065
- * | | LLLLL | J, F, ..., D | |
1066
- * | Local week of year | w | 1, 2, ..., 53 | |
1067
- * | | wo | 1st, 2nd, ..., 53th | 7 |
1068
- * | | ww | 01, 02, ..., 53 | |
1069
- * | ISO week of year | I | 1, 2, ..., 53 | 7 |
1070
- * | | Io | 1st, 2nd, ..., 53th | 7 |
1071
- * | | II | 01, 02, ..., 53 | 7 |
1072
- * | Day of month | d | 1, 2, ..., 31 | |
1073
- * | | do | 1st, 2nd, ..., 31st | 7 |
1074
- * | | dd | 01, 02, ..., 31 | |
1075
- * | Day of year | D | 1, 2, ..., 365, 366 | 9 |
1076
- * | | Do | 1st, 2nd, ..., 365th, 366th | 7 |
1077
- * | | DD | 01, 02, ..., 365, 366 | 9 |
1078
- * | | DDD | 001, 002, ..., 365, 366 | |
1079
- * | | DDDD | ... | 3 |
1080
- * | Day of week (formatting) | E..EEE | Mon, Tue, Wed, ..., Sun | |
1081
- * | | EEEE | Monday, Tuesday, ..., Sunday | 2 |
1082
- * | | EEEEE | M, T, W, T, F, S, S | |
1083
- * | | EEEEEE | Mo, Tu, We, Th, Fr, Sa, Su | |
1084
- * | ISO day of week (formatting) | i | 1, 2, 3, ..., 7 | 7 |
1085
- * | | io | 1st, 2nd, ..., 7th | 7 |
1086
- * | | ii | 01, 02, ..., 07 | 7 |
1087
- * | | iii | Mon, Tue, Wed, ..., Sun | 7 |
1088
- * | | iiii | Monday, Tuesday, ..., Sunday | 2,7 |
1089
- * | | iiiii | M, T, W, T, F, S, S | 7 |
1090
- * | | iiiiii | Mo, Tu, We, Th, Fr, Sa, Su | 7 |
1091
- * | Local day of week (formatting) | e | 2, 3, 4, ..., 1 | |
1092
- * | | eo | 2nd, 3rd, ..., 1st | 7 |
1093
- * | | ee | 02, 03, ..., 01 | |
1094
- * | | eee | Mon, Tue, Wed, ..., Sun | |
1095
- * | | eeee | Monday, Tuesday, ..., Sunday | 2 |
1096
- * | | eeeee | M, T, W, T, F, S, S | |
1097
- * | | eeeeee | Mo, Tu, We, Th, Fr, Sa, Su | |
1098
- * | Local day of week (stand-alone) | c | 2, 3, 4, ..., 1 | |
1099
- * | | co | 2nd, 3rd, ..., 1st | 7 |
1100
- * | | cc | 02, 03, ..., 01 | |
1101
- * | | ccc | Mon, Tue, Wed, ..., Sun | |
1102
- * | | cccc | Monday, Tuesday, ..., Sunday | 2 |
1103
- * | | ccccc | M, T, W, T, F, S, S | |
1104
- * | | cccccc | Mo, Tu, We, Th, Fr, Sa, Su | |
1105
- * | AM, PM | a..aa | AM, PM | |
1106
- * | | aaa | am, pm | |
1107
- * | | aaaa | a.m., p.m. | 2 |
1108
- * | | aaaaa | a, p | |
1109
- * | AM, PM, noon, midnight | b..bb | AM, PM, noon, midnight | |
1110
- * | | bbb | am, pm, noon, midnight | |
1111
- * | | bbbb | a.m., p.m., noon, midnight | 2 |
1112
- * | | bbbbb | a, p, n, mi | |
1113
- * | Flexible day period | B..BBB | at night, in the morning, ... | |
1114
- * | | BBBB | at night, in the morning, ... | 2 |
1115
- * | | BBBBB | at night, in the morning, ... | |
1116
- * | Hour [1-12] | h | 1, 2, ..., 11, 12 | |
1117
- * | | ho | 1st, 2nd, ..., 11th, 12th | 7 |
1118
- * | | hh | 01, 02, ..., 11, 12 | |
1119
- * | Hour [0-23] | H | 0, 1, 2, ..., 23 | |
1120
- * | | Ho | 0th, 1st, 2nd, ..., 23rd | 7 |
1121
- * | | HH | 00, 01, 02, ..., 23 | |
1122
- * | Hour [0-11] | K | 1, 2, ..., 11, 0 | |
1123
- * | | Ko | 1st, 2nd, ..., 11th, 0th | 7 |
1124
- * | | KK | 01, 02, ..., 11, 00 | |
1125
- * | Hour [1-24] | k | 24, 1, 2, ..., 23 | |
1126
- * | | ko | 24th, 1st, 2nd, ..., 23rd | 7 |
1127
- * | | kk | 24, 01, 02, ..., 23 | |
1128
- * | Minute | m | 0, 1, ..., 59 | |
1129
- * | | mo | 0th, 1st, ..., 59th | 7 |
1130
- * | | mm | 00, 01, ..., 59 | |
1131
- * | Second | s | 0, 1, ..., 59 | |
1132
- * | | so | 0th, 1st, ..., 59th | 7 |
1133
- * | | ss | 00, 01, ..., 59 | |
1134
- * | Fraction of second | S | 0, 1, ..., 9 | |
1135
- * | | SS | 00, 01, ..., 99 | |
1136
- * | | SSS | 000, 001, ..., 999 | |
1137
- * | | SSSS | ... | 3 |
1138
- * | Timezone (ISO-8601 w/ Z) | X | -08, +0530, Z | |
1139
- * | | XX | -0800, +0530, Z | |
1140
- * | | XXX | -08:00, +05:30, Z | |
1141
- * | | XXXX | -0800, +0530, Z, +123456 | 2 |
1142
- * | | XXXXX | -08:00, +05:30, Z, +12:34:56 | |
1143
- * | Timezone (ISO-8601 w/o Z) | x | -08, +0530, +00 | |
1144
- * | | xx | -0800, +0530, +0000 | |
1145
- * | | xxx | -08:00, +05:30, +00:00 | 2 |
1146
- * | | xxxx | -0800, +0530, +0000, +123456 | |
1147
- * | | xxxxx | -08:00, +05:30, +00:00, +12:34:56 | |
1148
- * | Timezone (GMT) | O...OOO | GMT-8, GMT+5:30, GMT+0 | |
1149
- * | | OOOO | GMT-08:00, GMT+05:30, GMT+00:00 | 2 |
1150
- * | Timezone (specific non-locat.) | z...zzz | GMT-8, GMT+5:30, GMT+0 | 6 |
1151
- * | | zzzz | GMT-08:00, GMT+05:30, GMT+00:00 | 2,6 |
1152
- * | Seconds timestamp | t | 512969520 | 7 |
1153
- * | | tt | ... | 3,7 |
1154
- * | Milliseconds timestamp | T | 512969520900 | 7 |
1155
- * | | TT | ... | 3,7 |
1156
- * | Long localized date | P | 04/29/1453 | 7 |
1157
- * | | PP | Apr 29, 1453 | 7 |
1158
- * | | PPP | April 29th, 1453 | 7 |
1159
- * | | PPPP | Friday, April 29th, 1453 | 2,7 |
1160
- * | Long localized time | p | 12:00 AM | 7 |
1161
- * | | pp | 12:00:00 AM | 7 |
1162
- * | | ppp | 12:00:00 AM GMT+2 | 7 |
1163
- * | | pppp | 12:00:00 AM GMT+02:00 | 2,7 |
1164
- * | Combination of date and time | Pp | 04/29/1453, 12:00 AM | 7 |
1165
- * | | PPpp | Apr 29, 1453, 12:00:00 AM | 7 |
1166
- * | | PPPppp | April 29th, 1453 at ... | 7 |
1167
- * | | PPPPpppp| Friday, April 29th, 1453 at ... | 2,7 |
1168
- * Notes:
1169
- * 1. "Formatting" units (e.g. formatting quarter) in the default en-US locale
1170
- * are the same as "stand-alone" units, but are different in some languages.
1171
- * "Formatting" units are declined according to the rules of the language
1172
- * in the context of a date. "Stand-alone" units are always nominative singular:
1173
- *
1174
- * `format(new Date(2017, 10, 6), 'do LLLL', {locale: cs}) //=> '6. listopad'`
1175
- *
1176
- * `format(new Date(2017, 10, 6), 'do MMMM', {locale: cs}) //=> '6. listopadu'`
1177
- *
1178
- * 2. Any sequence of the identical letters is a pattern, unless it is escaped by
1179
- * the single quote characters (see below).
1180
- * If the sequence is longer than listed in table (e.g. `EEEEEEEEEEE`)
1181
- * the output will be the same as default pattern for this unit, usually
1182
- * the longest one (in case of ISO weekdays, `EEEE`). Default patterns for units
1183
- * are marked with "2" in the last column of the table.
1184
- *
1185
- * `format(new Date(2017, 10, 6), 'MMM') //=> 'Nov'`
1186
- *
1187
- * `format(new Date(2017, 10, 6), 'MMMM') //=> 'November'`
1188
- *
1189
- * `format(new Date(2017, 10, 6), 'MMMMM') //=> 'N'`
1190
- *
1191
- * `format(new Date(2017, 10, 6), 'MMMMMM') //=> 'November'`
1192
- *
1193
- * `format(new Date(2017, 10, 6), 'MMMMMMM') //=> 'November'`
1194
- *
1195
- * 3. Some patterns could be unlimited length (such as `yyyyyyyy`).
1196
- * The output will be padded with zeros to match the length of the pattern.
1197
- *
1198
- * `format(new Date(2017, 10, 6), 'yyyyyyyy') //=> '00002017'`
1199
- *
1200
- * 4. `QQQQQ` and `qqqqq` could be not strictly numerical in some locales.
1201
- * These tokens represent the shortest form of the quarter.
1202
- *
1203
- * 5. The main difference between `y` and `u` patterns are B.C. years:
1204
- *
1205
- * | Year | `y` | `u` |
1206
- * |------|-----|-----|
1207
- * | AC 1 | 1 | 1 |
1208
- * | BC 1 | 1 | 0 |
1209
- * | BC 2 | 2 | -1 |
1210
- *
1211
- * Also `yy` always returns the last two digits of a year,
1212
- * while `uu` pads single digit years to 2 characters and returns other years unchanged:
1213
- *
1214
- * | Year | `yy` | `uu` |
1215
- * |------|------|------|
1216
- * | 1 | 01 | 01 |
1217
- * | 14 | 14 | 14 |
1218
- * | 376 | 76 | 376 |
1219
- * | 1453 | 53 | 1453 |
1220
- *
1221
- * The same difference is true for local and ISO week-numbering years (`Y` and `R`),
1222
- * except local week-numbering years are dependent on `options.weekStartsOn`
1223
- * and `options.firstWeekContainsDate` (compare [getISOWeekYear]{@link https://date-fns.org/docs/getISOWeekYear}
1224
- * and [getWeekYear]{@link https://date-fns.org/docs/getWeekYear}).
1225
- *
1226
- * 6. Specific non-location timezones are currently unavailable in `date-fns`,
1227
- * so right now these tokens fall back to GMT timezones.
1228
- *
1229
- * 7. These patterns are not in the Unicode Technical Standard #35:
1230
- * - `i`: ISO day of week
1231
- * - `I`: ISO week of year
1232
- * - `R`: ISO week-numbering year
1233
- * - `t`: seconds timestamp
1234
- * - `T`: milliseconds timestamp
1235
- * - `o`: ordinal number modifier
1236
- * - `P`: long localized date
1237
- * - `p`: long localized time
1238
- *
1239
- * 8. `YY` and `YYYY` tokens represent week-numbering years but they are often confused with years.
1240
- * You should enable `options.useAdditionalWeekYearTokens` to use them. See: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md
1241
- *
1242
- * 9. `D` and `DD` tokens represent days of the year but they are often confused with days of the month.
1243
- * You should enable `options.useAdditionalDayOfYearTokens` to use them. See: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md
1244
- *
1245
- * @param {Date|Number} date - the original date
1246
- * @param {String} format - the string of tokens
1247
- * @param {Object} [options] - an object with options.
1248
- * @param {Locale} [options.locale=defaultLocale] - the locale object. See [Locale]{@link https://date-fns.org/docs/Locale}
1249
- * @param {0|1|2|3|4|5|6} [options.weekStartsOn=0] - the index of the first day of the week (0 - Sunday)
1250
- * @param {Number} [options.firstWeekContainsDate=1] - the day of January, which is
1251
- * @param {Boolean} [options.useAdditionalWeekYearTokens=false] - if true, allows usage of the week-numbering year tokens `YY` and `YYYY`;
1252
- * see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md
1253
- * @param {Boolean} [options.useAdditionalDayOfYearTokens=false] - if true, allows usage of the day of year tokens `D` and `DD`;
1254
- * see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md
1255
- * @returns {String} the formatted date string
1256
- * @throws {TypeError} 2 arguments required
1257
- * @throws {RangeError} `date` must not be Invalid Date
1258
- * @throws {RangeError} `options.locale` must contain `localize` property
1259
- * @throws {RangeError} `options.locale` must contain `formatLong` property
1260
- * @throws {RangeError} `options.weekStartsOn` must be between 0 and 6
1261
- * @throws {RangeError} `options.firstWeekContainsDate` must be between 1 and 7
1262
- * @throws {RangeError} use `yyyy` instead of `YYYY` for formatting years using [format provided] to the input [input provided]; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md
1263
- * @throws {RangeError} use `yy` instead of `YY` for formatting years using [format provided] to the input [input provided]; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md
1264
- * @throws {RangeError} use `d` instead of `D` for formatting days of the month using [format provided] to the input [input provided]; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md
1265
- * @throws {RangeError} use `dd` instead of `DD` for formatting days of the month using [format provided] to the input [input provided]; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md
1266
- * @throws {RangeError} format string contains an unescaped latin alphabet character
1267
- *
1268
- * @example
1269
- * // Represent 11 February 2014 in middle-endian format:
1270
- * const result = format(new Date(2014, 1, 11), 'MM/dd/yyyy')
1271
- * //=> '02/11/2014'
1272
- *
1273
- * @example
1274
- * // Represent 2 July 2014 in Esperanto:
1275
- * import { eoLocale } from 'date-fns/locale/eo'
1276
- * const result = format(new Date(2014, 6, 2), "do 'de' MMMM yyyy", {
1277
- * locale: eoLocale
1278
- * })
1279
- * //=> '2-a de julio 2014'
1280
- *
1281
- * @example
1282
- * // Escape string by single quote characters:
1283
- * const result = format(new Date(2014, 6, 2, 15), "h 'o''clock'")
1284
- * //=> "3 o'clock"
1285
- */function format(dirtyDate,dirtyFormatStr,options){var _ref,_options$locale,_ref2,_ref3,_ref4,_options$firstWeekCon,_options$locale2,_options$locale2$opti,_defaultOptions$local,_defaultOptions$local2,_ref5,_ref6,_ref7,_options$weekStartsOn,_options$locale3,_options$locale3$opti,_defaultOptions$local3,_defaultOptions$local4;requiredArgs(2,arguments);var formatStr=String(dirtyFormatStr);var defaultOptions=getDefaultOptions();var locale=(_ref=(_options$locale=options===null||options===void 0?void 0:options.locale)!==null&&_options$locale!==void 0?_options$locale:defaultOptions.locale)!==null&&_ref!==void 0?_ref:defaultLocale;var firstWeekContainsDate=toInteger((_ref2=(_ref3=(_ref4=(_options$firstWeekCon=options===null||options===void 0?void 0:options.firstWeekContainsDate)!==null&&_options$firstWeekCon!==void 0?_options$firstWeekCon:options===null||options===void 0?void 0:(_options$locale2=options.locale)===null||_options$locale2===void 0?void 0:(_options$locale2$opti=_options$locale2.options)===null||_options$locale2$opti===void 0?void 0:_options$locale2$opti.firstWeekContainsDate)!==null&&_ref4!==void 0?_ref4:defaultOptions.firstWeekContainsDate)!==null&&_ref3!==void 0?_ref3:(_defaultOptions$local=defaultOptions.locale)===null||_defaultOptions$local===void 0?void 0:(_defaultOptions$local2=_defaultOptions$local.options)===null||_defaultOptions$local2===void 0?void 0:_defaultOptions$local2.firstWeekContainsDate)!==null&&_ref2!==void 0?_ref2:1);// Test if weekStartsOn is between 1 and 7 _and_ is not NaN
1286
- if(!(firstWeekContainsDate>=1&&firstWeekContainsDate<=7)){throw new RangeError('firstWeekContainsDate must be between 1 and 7 inclusively');}var weekStartsOn=toInteger((_ref5=(_ref6=(_ref7=(_options$weekStartsOn=options===null||options===void 0?void 0:options.weekStartsOn)!==null&&_options$weekStartsOn!==void 0?_options$weekStartsOn:options===null||options===void 0?void 0:(_options$locale3=options.locale)===null||_options$locale3===void 0?void 0:(_options$locale3$opti=_options$locale3.options)===null||_options$locale3$opti===void 0?void 0:_options$locale3$opti.weekStartsOn)!==null&&_ref7!==void 0?_ref7:defaultOptions.weekStartsOn)!==null&&_ref6!==void 0?_ref6:(_defaultOptions$local3=defaultOptions.locale)===null||_defaultOptions$local3===void 0?void 0:(_defaultOptions$local4=_defaultOptions$local3.options)===null||_defaultOptions$local4===void 0?void 0:_defaultOptions$local4.weekStartsOn)!==null&&_ref5!==void 0?_ref5:0);// Test if weekStartsOn is between 0 and 6 _and_ is not NaN
1287
- if(!(weekStartsOn>=0&&weekStartsOn<=6)){throw new RangeError('weekStartsOn must be between 0 and 6 inclusively');}if(!locale.localize){throw new RangeError('locale must contain localize property');}if(!locale.formatLong){throw new RangeError('locale must contain formatLong property');}var originalDate=toDate(dirtyDate);if(!isValid(originalDate)){throw new RangeError('Invalid time value');}// Convert the date in system timezone to the same date in UTC+00:00 timezone.
1288
- // This ensures that when UTC functions will be implemented, locales will be compatible with them.
1289
- // See an issue about UTC functions: https://github.com/date-fns/date-fns/issues/376
1290
- var timezoneOffset=getTimezoneOffsetInMilliseconds(originalDate);var utcDate=subMilliseconds(originalDate,timezoneOffset);var formatterOptions={firstWeekContainsDate:firstWeekContainsDate,weekStartsOn:weekStartsOn,locale:locale,_originalDate:originalDate};var result=formatStr.match(longFormattingTokensRegExp).map(function(substring){var firstCharacter=substring[0];if(firstCharacter==='p'||firstCharacter==='P'){var longFormatter=longFormatters$1[firstCharacter];return longFormatter(substring,locale.formatLong);}return substring;}).join('').match(formattingTokensRegExp).map(function(substring){// Replace two single quote characters with one single quote character
1291
- if(substring==="''"){return "'";}var firstCharacter=substring[0];if(firstCharacter==="'"){return cleanEscapedString(substring);}var formatter=formatters$1[firstCharacter];if(formatter){if(!(options!==null&&options!==void 0&&options.useAdditionalWeekYearTokens)&&isProtectedWeekYearToken(substring)){throwProtectedError(substring,dirtyFormatStr,String(dirtyDate));}if(!(options!==null&&options!==void 0&&options.useAdditionalDayOfYearTokens)&&isProtectedDayOfYearToken(substring)){throwProtectedError(substring,dirtyFormatStr,String(dirtyDate));}return formatter(utcDate,substring,locale.localize,formatterOptions);}if(firstCharacter.match(unescapedLatinCharacterRegExp)){throw new RangeError('Format string contains an unescaped latin alphabet character `'+firstCharacter+'`');}return substring;}).join('');return result;}function cleanEscapedString(input){var matched=input.match(escapedStringRegExp);if(!matched){return input;}return matched[1].replace(doubleQuoteRegExp,"'");}/**
1292
- * @name getDaysInMonth
1293
- * @category Month Helpers
1294
- * @summary Get the number of days in a month of the given date.
1295
- *
1296
- * @description
1297
- * Get the number of days in a month of the given date.
1298
- *
1299
- * @param {Date|Number} date - the given date
1300
- * @returns {Number} the number of days in a month
1301
- * @throws {TypeError} 1 argument required
1302
- *
1303
- * @example
1304
- * // How many days are in February 2000?
1305
- * const result = getDaysInMonth(new Date(2000, 1))
1306
- * //=> 29
1307
- */function getDaysInMonth(dirtyDate){requiredArgs(1,arguments);var date=toDate(dirtyDate);var year=date.getFullYear();var monthIndex=date.getMonth();var lastDayOfMonth=new Date(0);lastDayOfMonth.setFullYear(year,monthIndex+1,0);lastDayOfMonth.setHours(0,0,0,0);return lastDayOfMonth.getDate();}/**
1308
- * @name lastDayOfMonth
1309
- * @category Month Helpers
1310
- * @summary Return the last day of a month for the given date.
1311
- *
1312
- * @description
1313
- * Return the last day of a month for the given date.
1314
- * The result will be in the local timezone.
1315
- *
1316
- * @param {Date|Number} date - the original date
1317
- * @returns {Date} the last day of a month
1318
- * @throws {TypeError} 1 argument required
1319
- *
1320
- * @example
1321
- * // The last day of a month for 2 September 2014 11:55:00:
1322
- * const result = lastDayOfMonth(new Date(2014, 8, 2, 11, 55, 0))
1323
- * //=> Tue Sep 30 2014 00:00:00
1324
- */function lastDayOfMonth(dirtyDate){requiredArgs(1,arguments);var date=toDate(dirtyDate);var month=date.getMonth();date.setFullYear(date.getFullYear(),month+1,0);date.setHours(0,0,0,0);return date;}/**
1325
- * @name isAfter
1326
- * @category Common Helpers
1327
- * @summary Is the first date after the second one?
1328
- *
1329
- * @description
1330
- * Is the first date after the second one?
1331
- *
1332
- * @param {Date|Number} date - the date that should be after the other one to return true
1333
- * @param {Date|Number} dateToCompare - the date to compare with
1334
- * @returns {Boolean} the first date is after the second date
1335
- * @throws {TypeError} 2 arguments required
1336
- *
1337
- * @example
1338
- * // Is 10 July 1989 after 11 February 1987?
1339
- * const result = isAfter(new Date(1989, 6, 10), new Date(1987, 1, 11))
1340
- * //=> true
1341
- */function isAfter(dirtyDate,dirtyDateToCompare){requiredArgs(2,arguments);var date=toDate(dirtyDate);var dateToCompare=toDate(dirtyDateToCompare);return date.getTime()>dateToCompare.getTime();}/**
1342
- * @name isBefore
1343
- * @category Common Helpers
1344
- * @summary Is the first date before the second one?
1345
- *
1346
- * @description
1347
- * Is the first date before the second one?
1348
- *
1349
- * @param {Date|Number} date - the date that should be before the other one to return true
1350
- * @param {Date|Number} dateToCompare - the date to compare with
1351
- * @returns {Boolean} the first date is before the second date
1352
- * @throws {TypeError} 2 arguments required
1353
- *
1354
- * @example
1355
- * // Is 10 July 1989 before 11 February 1987?
1356
- * const result = isBefore(new Date(1989, 6, 10), new Date(1987, 1, 11))
1357
- * //=> false
1358
- */function isBefore(dirtyDate,dirtyDateToCompare){requiredArgs(2,arguments);var date=toDate(dirtyDate);var dateToCompare=toDate(dirtyDateToCompare);return date.getTime()<dateToCompare.getTime();}/**
1359
- * @name isSameMonth
1360
- * @category Month Helpers
1361
- * @summary Are the given dates in the same month (and year)?
1362
- *
1363
- * @description
1364
- * Are the given dates in the same month (and year)?
1365
- *
1366
- * @param {Date|Number} dateLeft - the first date to check
1367
- * @param {Date|Number} dateRight - the second date to check
1368
- * @returns {Boolean} the dates are in the same month (and year)
1369
- * @throws {TypeError} 2 arguments required
1370
- *
1371
- * @example
1372
- * // Are 2 September 2014 and 25 September 2014 in the same month?
1373
- * const result = isSameMonth(new Date(2014, 8, 2), new Date(2014, 8, 25))
1374
- * //=> true
1375
- *
1376
- * @example
1377
- * // Are 2 September 2014 and 25 September 2015 in the same month?
1378
- * const result = isSameMonth(new Date(2014, 8, 2), new Date(2015, 8, 25))
1379
- * //=> false
1380
- */function isSameMonth(dirtyDateLeft,dirtyDateRight){requiredArgs(2,arguments);var dateLeft=toDate(dirtyDateLeft);var dateRight=toDate(dirtyDateRight);return dateLeft.getFullYear()===dateRight.getFullYear()&&dateLeft.getMonth()===dateRight.getMonth();}/**
1381
- * @name setDate
1382
- * @category Day Helpers
1383
- * @summary Set the day of the month to the given date.
1384
- *
1385
- * @description
1386
- * Set the day of the month to the given date.
1387
- *
1388
- * @param {Date|Number} date - the date to be changed
1389
- * @param {Number} dayOfMonth - the day of the month of the new date
1390
- * @returns {Date} the new date with the day of the month set
1391
- * @throws {TypeError} 2 arguments required
1392
- *
1393
- * @example
1394
- * // Set the 30th day of the month to 1 September 2014:
1395
- * const result = setDate(new Date(2014, 8, 1), 30)
1396
- * //=> Tue Sep 30 2014 00:00:00
1397
- */function setDate(dirtyDate,dirtyDayOfMonth){requiredArgs(2,arguments);var date=toDate(dirtyDate);var dayOfMonth=toInteger(dirtyDayOfMonth);date.setDate(dayOfMonth);return date;}/* src/components/calendar/Calendar.svelte generated by Svelte v3.59.2 */function get_each_context$1(ctx,list,i){const child_ctx=ctx.slice();child_ctx[27]=list[i];return child_ctx;}function get_each_context_1(ctx,list,i){const child_ctx=ctx.slice();child_ctx[27]=list[i];return child_ctx;}function get_each_context_2(ctx,list,i){const child_ctx=ctx.slice();child_ctx[27]=list[i];return child_ctx;}function get_each_context_3(ctx,list,i){const child_ctx=ctx.slice();child_ctx[34]=list[i];return child_ctx;}function get_each_context_4(ctx,list,i){const child_ctx=ctx.slice();child_ctx[37]=list[i];child_ctx[39]=i;return child_ctx;}// (209:8) {#each _months as month, i}
1398
- function create_each_block_4(ctx){let goa_dropdown_item;let goa_dropdown_item_value_value;let goa_dropdown_item_label_value;return {c(){goa_dropdown_item=element("goa-dropdown-item");set_custom_element_data(goa_dropdown_item,"value",goa_dropdown_item_value_value=/*i*/ctx[39]);set_custom_element_data(goa_dropdown_item,"label",goa_dropdown_item_label_value=/*month*/ctx[37]);},m(target,anchor){insert(target,goa_dropdown_item,anchor);},p:noop,d(detaching){if(detaching)detach(goa_dropdown_item);}};}// (217:8) {#each _years as year}
1399
- function create_each_block_3(ctx){let goa_dropdown_item;let goa_dropdown_item_value_value;return {c(){goa_dropdown_item=element("goa-dropdown-item");set_custom_element_data(goa_dropdown_item,"value",goa_dropdown_item_value_value=/*year*/ctx[34]);},m(target,anchor){insert(target,goa_dropdown_item,anchor);},p(ctx,dirty){if(dirty[0]&/*_years*/16384&&goa_dropdown_item_value_value!==(goa_dropdown_item_value_value=/*year*/ctx[34])){set_custom_element_data(goa_dropdown_item,"value",goa_dropdown_item_value_value);}},d(detaching){if(detaching)detach(goa_dropdown_item);}};}// (232:4) {#each _previousMonthDays as d}
1400
- function create_each_block_2(ctx){let button;let div;let t_value=/*d*/ctx[27].getDate()+"";let t;let button_aria_label_value;let button_data_date_value;let button_data_day_value;let button_tabindex_value;let mounted;let dispose;return {c(){button=element("button");div=element("div");t=text(t_value);attr(div,"class","day-num");attr(div,"data-testid","date");attr(button,"aria-label",button_aria_label_value=format(/*d*/ctx[27],"PPPP"));attr(button,"data-date",button_data_date_value=format(/*d*/ctx[27],"T"));attr(button,"data-day",button_data_day_value=format(/*d*/ctx[27],"eee"));attr(button,"class","day other-month");attr(button,"tabindex",button_tabindex_value=isSameDay(/*d*/ctx[27],/*_calendarDate*/ctx[8])?0:-1);toggle_class(button,"disabled",isBefore(/*d*/ctx[27],/*_min*/ctx[9])||isAfter(/*d*/ctx[27],/*_max*/ctx[10]));},m(target,anchor){insert(target,button,anchor);append(button,div);append(div,t);if(!mounted){dispose=listen(button,"click",/*onDateClick*/ctx[19]);mounted=true;}},p(ctx,dirty){if(dirty[0]&/*_previousMonthDays*/4096&&t_value!==(t_value=/*d*/ctx[27].getDate()+""))set_data(t,t_value);if(dirty[0]&/*_previousMonthDays*/4096&&button_aria_label_value!==(button_aria_label_value=format(/*d*/ctx[27],"PPPP"))){attr(button,"aria-label",button_aria_label_value);}if(dirty[0]&/*_previousMonthDays*/4096&&button_data_date_value!==(button_data_date_value=format(/*d*/ctx[27],"T"))){attr(button,"data-date",button_data_date_value);}if(dirty[0]&/*_previousMonthDays*/4096&&button_data_day_value!==(button_data_day_value=format(/*d*/ctx[27],"eee"))){attr(button,"data-day",button_data_day_value);}if(dirty[0]&/*_previousMonthDays, _calendarDate*/4352&&button_tabindex_value!==(button_tabindex_value=isSameDay(/*d*/ctx[27],/*_calendarDate*/ctx[8])?0:-1)){attr(button,"tabindex",button_tabindex_value);}if(dirty[0]&/*_previousMonthDays, _min, _max*/5632){toggle_class(button,"disabled",isBefore(/*d*/ctx[27],/*_min*/ctx[9])||isAfter(/*d*/ctx[27],/*_max*/ctx[10]));}},d(detaching){if(detaching)detach(button);mounted=false;dispose();}};}// (245:4) {#each _monthDays as d}
1401
- function create_each_block_1(ctx){let button;let div;let t_value=/*d*/ctx[27].getDate()+"";let t;let button_aria_label_value;let button_data_date_value;let button_data_day_value;let button_tabindex_value;let mounted;let dispose;return {c(){button=element("button");div=element("div");t=text(t_value);attr(div,"class","day-num");attr(div,"data-testid","date");attr(button,"aria-label",button_aria_label_value=format(/*d*/ctx[27],"PPPP"));attr(button,"data-date",button_data_date_value=format(/*d*/ctx[27],"T"));attr(button,"data-day",button_data_day_value=format(/*d*/ctx[27],"eee"));attr(button,"class","day");attr(button,"tabindex",button_tabindex_value=isSameDay(/*d*/ctx[27],/*_calendarDate*/ctx[8])?0:-1);toggle_class(button,"today",isSameDay(/*d*/ctx[27],new Date()));toggle_class(button,"selected",/*value*/ctx[0]&&isSameDay(/*d*/ctx[27],/*_selectedDate*/ctx[7]));toggle_class(button,"disabled",isBefore(/*d*/ctx[27],/*_min*/ctx[9])||isAfter(/*d*/ctx[27],/*_max*/ctx[10]));},m(target,anchor){insert(target,button,anchor);append(button,div);append(div,t);if(!mounted){dispose=listen(button,"click",/*onDateClick*/ctx[19]);mounted=true;}},p(ctx,dirty){if(dirty[0]&/*_monthDays*/2048&&t_value!==(t_value=/*d*/ctx[27].getDate()+""))set_data(t,t_value);if(dirty[0]&/*_monthDays*/2048&&button_aria_label_value!==(button_aria_label_value=format(/*d*/ctx[27],"PPPP"))){attr(button,"aria-label",button_aria_label_value);}if(dirty[0]&/*_monthDays*/2048&&button_data_date_value!==(button_data_date_value=format(/*d*/ctx[27],"T"))){attr(button,"data-date",button_data_date_value);}if(dirty[0]&/*_monthDays*/2048&&button_data_day_value!==(button_data_day_value=format(/*d*/ctx[27],"eee"))){attr(button,"data-day",button_data_day_value);}if(dirty[0]&/*_monthDays, _calendarDate*/2304&&button_tabindex_value!==(button_tabindex_value=isSameDay(/*d*/ctx[27],/*_calendarDate*/ctx[8])?0:-1)){attr(button,"tabindex",button_tabindex_value);}if(dirty[0]&/*_monthDays*/2048){toggle_class(button,"today",isSameDay(/*d*/ctx[27],new Date()));}if(dirty[0]&/*value, _monthDays, _selectedDate*/2177){toggle_class(button,"selected",/*value*/ctx[0]&&isSameDay(/*d*/ctx[27],/*_selectedDate*/ctx[7]));}if(dirty[0]&/*_monthDays, _min, _max*/3584){toggle_class(button,"disabled",isBefore(/*d*/ctx[27],/*_min*/ctx[9])||isAfter(/*d*/ctx[27],/*_max*/ctx[10]));}},d(detaching){if(detaching)detach(button);mounted=false;dispose();}};}// (260:4) {#each _nextMonthDays as d}
1402
- function create_each_block$1(ctx){let button;let div;let t0_value=/*d*/ctx[27].getDate()+"";let t0;let t1;let button_aria_label_value;let button_data_date_value;let button_data_day_value;let button_tabindex_value;let mounted;let dispose;return {c(){button=element("button");div=element("div");t0=text(t0_value);t1=space();attr(div,"class","day-num");attr(div,"data-testid","date");attr(button,"aria-label",button_aria_label_value=format(/*d*/ctx[27],"PPPP"));attr(button,"data-date",button_data_date_value=format(/*d*/ctx[27],"T"));attr(button,"data-day",button_data_day_value=format(/*d*/ctx[27],"eee"));attr(button,"class","day other-month");attr(button,"tabindex",button_tabindex_value=isSameDay(/*d*/ctx[27],/*_calendarDate*/ctx[8])?0:-1);toggle_class(button,"disabled",isBefore(/*d*/ctx[27],/*_min*/ctx[9])||isAfter(/*d*/ctx[27],/*_max*/ctx[10]));},m(target,anchor){insert(target,button,anchor);append(button,div);append(div,t0);append(button,t1);if(!mounted){dispose=listen(button,"click",/*onDateClick*/ctx[19]);mounted=true;}},p(ctx,dirty){if(dirty[0]&/*_nextMonthDays*/8192&&t0_value!==(t0_value=/*d*/ctx[27].getDate()+""))set_data(t0,t0_value);if(dirty[0]&/*_nextMonthDays*/8192&&button_aria_label_value!==(button_aria_label_value=format(/*d*/ctx[27],"PPPP"))){attr(button,"aria-label",button_aria_label_value);}if(dirty[0]&/*_nextMonthDays*/8192&&button_data_date_value!==(button_data_date_value=format(/*d*/ctx[27],"T"))){attr(button,"data-date",button_data_date_value);}if(dirty[0]&/*_nextMonthDays*/8192&&button_data_day_value!==(button_data_day_value=format(/*d*/ctx[27],"eee"))){attr(button,"data-day",button_data_day_value);}if(dirty[0]&/*_nextMonthDays, _calendarDate*/8448&&button_tabindex_value!==(button_tabindex_value=isSameDay(/*d*/ctx[27],/*_calendarDate*/ctx[8])?0:-1)){attr(button,"tabindex",button_tabindex_value);}if(dirty[0]&/*_nextMonthDays, _min, _max*/9728){toggle_class(button,"disabled",isBefore(/*d*/ctx[27],/*_min*/ctx[9])||isAfter(/*d*/ctx[27],/*_max*/ctx[10]));}},d(detaching){if(detaching)detach(button);mounted=false;dispose();}};}function create_fragment$b(ctx){let div1;let goa_block;let goa_form_item0;let goa_dropdown0;let goa_dropdown0_arialabel_value;let goa_dropdown0_value_value;let t0;let goa_form_item1;let goa_dropdown1;let goa_dropdown1_arialabel_value;let goa_dropdown1_value_value;let t1;let div0;let h50;let t3;let h51;let t5;let h52;let t7;let h53;let t9;let h54;let t11;let h55;let t13;let h56;let t15;let t16;let t17;let div1_style_value;let mounted;let dispose;let each_value_4=/*_months*/ctx[16];let each_blocks_4=[];for(let i=0;i<each_value_4.length;i+=1){each_blocks_4[i]=create_each_block_4(get_each_context_4(ctx,each_value_4,i));}let each_value_3=/*_years*/ctx[14];let each_blocks_3=[];for(let i=0;i<each_value_3.length;i+=1){each_blocks_3[i]=create_each_block_3(get_each_context_3(ctx,each_value_3,i));}let each_value_2=/*_previousMonthDays*/ctx[12];let each_blocks_2=[];for(let i=0;i<each_value_2.length;i+=1){each_blocks_2[i]=create_each_block_2(get_each_context_2(ctx,each_value_2,i));}let each_value_1=/*_monthDays*/ctx[11];let each_blocks_1=[];for(let i=0;i<each_value_1.length;i+=1){each_blocks_1[i]=create_each_block_1(get_each_context_1(ctx,each_value_1,i));}let each_value=/*_nextMonthDays*/ctx[13];let each_blocks=[];for(let i=0;i<each_value.length;i+=1){each_blocks[i]=create_each_block$1(get_each_context$1(ctx,each_value,i));}return {c(){var _ctx$2,_ctx$3;div1=element("div");goa_block=element("goa-block");goa_form_item0=element("goa-form-item");goa_dropdown0=element("goa-dropdown");for(let i=0;i<each_blocks_4.length;i+=1){each_blocks_4[i].c();}t0=space();goa_form_item1=element("goa-form-item");goa_dropdown1=element("goa-dropdown");for(let i=0;i<each_blocks_3.length;i+=1){each_blocks_3[i].c();}t1=space();div0=element("div");h50=element("h5");h50.textContent="Sun";t3=space();h51=element("h5");h51.textContent="Mon";t5=space();h52=element("h5");h52.textContent="Tue";t7=space();h53=element("h5");h53.textContent="Wed";t9=space();h54=element("h5");h54.textContent="Thu";t11=space();h55=element("h5");h55.textContent="Fri";t13=space();h56=element("h5");h56.textContent="Sat";t15=space();for(let i=0;i<each_blocks_2.length;i+=1){each_blocks_2[i].c();}t16=space();for(let i=0;i<each_blocks_1.length;i+=1){each_blocks_1[i].c();}t17=space();for(let i=0;i<each_blocks.length;i+=1){each_blocks[i].c();}this.c=noop;set_custom_element_data(goa_dropdown0,"arialabel",goa_dropdown0_arialabel_value=`${/*name*/ctx[1]} month`);set_custom_element_data(goa_dropdown0,"data-testid","months");set_custom_element_data(goa_dropdown0,"width","calc(314px / 2 - 1.5rem)");set_custom_element_data(goa_dropdown0,"relative","true");set_custom_element_data(goa_dropdown0,"value",goa_dropdown0_value_value=/*_calendarDate*/(_ctx$2=ctx[8])===null||_ctx$2===void 0?void 0:_ctx$2.getMonth());set_custom_element_data(goa_form_item0,"label","Month");set_custom_element_data(goa_form_item0,"mt","0");set_custom_element_data(goa_dropdown1,"arialabel",goa_dropdown1_arialabel_value=`${/*name*/ctx[1]} year`);set_custom_element_data(goa_dropdown1,"data-testid","years");set_custom_element_data(goa_dropdown1,"width","calc(314px / 2 - 1.5rem)");set_custom_element_data(goa_dropdown1,"relative","true");set_custom_element_data(goa_dropdown1,"value",goa_dropdown1_value_value=/*_calendarDate*/(_ctx$3=ctx[8])===null||_ctx$3===void 0?void 0:_ctx$3.getFullYear());set_custom_element_data(goa_form_item1,"label","Year");set_custom_element_data(goa_form_item1,"mt","0");set_custom_element_data(goa_block,"mb","m");attr(div0,"data-testid","calendar");attr(div0,"class","calendar");attr(div1,"style",div1_style_value=calculateMargin(/*mt*/ctx[2],/*mr*/ctx[3],/*mb*/ctx[4],/*ml*/ctx[5]));toggle_class(div1,"bordered",/*bordered*/ctx[6]==="true");},m(target,anchor){insert(target,div1,anchor);append(div1,goa_block);append(goa_block,goa_form_item0);append(goa_form_item0,goa_dropdown0);for(let i=0;i<each_blocks_4.length;i+=1){if(each_blocks_4[i]){each_blocks_4[i].m(goa_dropdown0,null);}}append(goa_block,t0);append(goa_block,goa_form_item1);append(goa_form_item1,goa_dropdown1);for(let i=0;i<each_blocks_3.length;i+=1){if(each_blocks_3[i]){each_blocks_3[i].m(goa_dropdown1,null);}}append(div1,t1);append(div1,div0);append(div0,h50);append(div0,t3);append(div0,h51);append(div0,t5);append(div0,h52);append(div0,t7);append(div0,h53);append(div0,t9);append(div0,h54);append(div0,t11);append(div0,h55);append(div0,t13);append(div0,h56);append(div0,t15);for(let i=0;i<each_blocks_2.length;i+=1){if(each_blocks_2[i]){each_blocks_2[i].m(div0,null);}}append(div0,t16);for(let i=0;i<each_blocks_1.length;i+=1){if(each_blocks_1[i]){each_blocks_1[i].m(div0,null);}}append(div0,t17);for(let i=0;i<each_blocks.length;i+=1){if(each_blocks[i]){each_blocks[i].m(div0,null);}}/*div0_binding*/ctx[22](div0);if(!mounted){dispose=[listen(goa_dropdown0,"_change",/*setMonth*/ctx[17]),listen(goa_dropdown1,"_change",/*setYear*/ctx[18])];mounted=true;}},p(ctx,dirty){var _ctx$4,_ctx$5;if(dirty[0]&/*_months*/65536){each_value_4=/*_months*/ctx[16];let i;for(i=0;i<each_value_4.length;i+=1){const child_ctx=get_each_context_4(ctx,each_value_4,i);if(each_blocks_4[i]){each_blocks_4[i].p(child_ctx,dirty);}else {each_blocks_4[i]=create_each_block_4(child_ctx);each_blocks_4[i].c();each_blocks_4[i].m(goa_dropdown0,null);}}for(;i<each_blocks_4.length;i+=1){each_blocks_4[i].d(1);}each_blocks_4.length=each_value_4.length;}if(dirty[0]&/*name*/2&&goa_dropdown0_arialabel_value!==(goa_dropdown0_arialabel_value=`${/*name*/ctx[1]} month`)){set_custom_element_data(goa_dropdown0,"arialabel",goa_dropdown0_arialabel_value);}if(dirty[0]&/*_calendarDate*/256&&goa_dropdown0_value_value!==(goa_dropdown0_value_value=/*_calendarDate*/(_ctx$4=ctx[8])===null||_ctx$4===void 0?void 0:_ctx$4.getMonth())){set_custom_element_data(goa_dropdown0,"value",goa_dropdown0_value_value);}if(dirty[0]&/*_years*/16384){each_value_3=/*_years*/ctx[14];let i;for(i=0;i<each_value_3.length;i+=1){const child_ctx=get_each_context_3(ctx,each_value_3,i);if(each_blocks_3[i]){each_blocks_3[i].p(child_ctx,dirty);}else {each_blocks_3[i]=create_each_block_3(child_ctx);each_blocks_3[i].c();each_blocks_3[i].m(goa_dropdown1,null);}}for(;i<each_blocks_3.length;i+=1){each_blocks_3[i].d(1);}each_blocks_3.length=each_value_3.length;}if(dirty[0]&/*name*/2&&goa_dropdown1_arialabel_value!==(goa_dropdown1_arialabel_value=`${/*name*/ctx[1]} year`)){set_custom_element_data(goa_dropdown1,"arialabel",goa_dropdown1_arialabel_value);}if(dirty[0]&/*_calendarDate*/256&&goa_dropdown1_value_value!==(goa_dropdown1_value_value=/*_calendarDate*/(_ctx$5=ctx[8])===null||_ctx$5===void 0?void 0:_ctx$5.getFullYear())){set_custom_element_data(goa_dropdown1,"value",goa_dropdown1_value_value);}if(dirty[0]&/*_previousMonthDays, _calendarDate, _min, _max, onDateClick*/530176){each_value_2=/*_previousMonthDays*/ctx[12];let i;for(i=0;i<each_value_2.length;i+=1){const child_ctx=get_each_context_2(ctx,each_value_2,i);if(each_blocks_2[i]){each_blocks_2[i].p(child_ctx,dirty);}else {each_blocks_2[i]=create_each_block_2(child_ctx);each_blocks_2[i].c();each_blocks_2[i].m(div0,t16);}}for(;i<each_blocks_2.length;i+=1){each_blocks_2[i].d(1);}each_blocks_2.length=each_value_2.length;}if(dirty[0]&/*_monthDays, _calendarDate, value, _selectedDate, _min, _max, onDateClick*/528257){each_value_1=/*_monthDays*/ctx[11];let i;for(i=0;i<each_value_1.length;i+=1){const child_ctx=get_each_context_1(ctx,each_value_1,i);if(each_blocks_1[i]){each_blocks_1[i].p(child_ctx,dirty);}else {each_blocks_1[i]=create_each_block_1(child_ctx);each_blocks_1[i].c();each_blocks_1[i].m(div0,t17);}}for(;i<each_blocks_1.length;i+=1){each_blocks_1[i].d(1);}each_blocks_1.length=each_value_1.length;}if(dirty[0]&/*_nextMonthDays, _calendarDate, _min, _max, onDateClick*/534272){each_value=/*_nextMonthDays*/ctx[13];let i;for(i=0;i<each_value.length;i+=1){const child_ctx=get_each_context$1(ctx,each_value,i);if(each_blocks[i]){each_blocks[i].p(child_ctx,dirty);}else {each_blocks[i]=create_each_block$1(child_ctx);each_blocks[i].c();each_blocks[i].m(div0,null);}}for(;i<each_blocks.length;i+=1){each_blocks[i].d(1);}each_blocks.length=each_value.length;}if(dirty[0]&/*mt, mr, mb, ml*/60&&div1_style_value!==(div1_style_value=calculateMargin(/*mt*/ctx[2],/*mr*/ctx[3],/*mb*/ctx[4],/*ml*/ctx[5]))){attr(div1,"style",div1_style_value);}if(dirty[0]&/*bordered*/64){toggle_class(div1,"bordered",/*bordered*/ctx[6]==="true");}},i:noop,o:noop,d(detaching){if(detaching)detach(div1);destroy_each(each_blocks_4,detaching);destroy_each(each_blocks_3,detaching);destroy_each(each_blocks_2,detaching);destroy_each(each_blocks_1,detaching);destroy_each(each_blocks,detaching);/*div0_binding*/ctx[22](null);mounted=false;run_all(dispose);}};}function instance$b($$self,$$props,$$invalidate){let{name=""}=$$props;let{value=""}=$$props;let{min=""}=$$props;let{max=""}=$$props;let{mt=null}=$$props;let{mr=null}=$$props;let{mb=null}=$$props;let{ml=null}=$$props;let{bordered="true"}=$$props;// ********
1403
- // Privates
1404
- // ********
1405
- let _selectedDate;// date set by the user
1406
- let _calendarDate;// date that the calendar is synced to (days of month, month/year dropdowns)
1407
- let _min;let _max;let _monthDays=[];let _previousMonthDays=[];let _nextMonthDays=[];let _nextMonthDayCount;let _months=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];let _years=[];let _calendarEl;// *****
1408
- // Hooks
1409
- // *****
1410
- onMount(()=>{$$invalidate(8,_calendarDate=$$invalidate(7,_selectedDate=value?startOfDay(new Date(value)):startOfDay(new Date())));$$invalidate(9,_min=min&&new Date(min)||addYears(_selectedDate,-5));$$invalidate(10,_max=max&&new Date(max)||addYears(_selectedDate,5));// define year range to show in dropdown
1411
- const yearCount=_max.getFullYear()-_min.getFullYear()+1;let yearStart=_min.getFullYear();$$invalidate(14,_years=new Array(yearCount).fill(undefined).map((_,i)=>yearStart+i).sort());renderCalendar({type:"date",value:_selectedDate});initKeybindings();});function renderCalendar(change){switch(change.type){case"date":$$invalidate(8,_calendarDate=change.value);break;case"month":_calendarDate.setMonth(change.value);break;case"year":_calendarDate.setFullYear(change.value);break;}// day count
1412
- const dayCount=getDaysInMonth(_calendarDate);$$invalidate(11,_monthDays=new Array(dayCount).fill(undefined).map((_,i)=>new Date(_calendarDate.getFullYear(),_calendarDate.getMonth(),i+1)));// previous month days to fill the start of the calendar
1413
- const prevMonthEnd=lastDayOfMonth(addMonths(_calendarDate,-1));const selectedMonthStart=setDate(_calendarDate,1);$$invalidate(12,_previousMonthDays=[]);for(let i=0;i<selectedMonthStart.getDay();i++){$$invalidate(12,_previousMonthDays=[..._previousMonthDays,addDays(prevMonthEnd,-i)]);}_previousMonthDays.reverse();// next month days to fill the end of the calendar
1414
- $$invalidate(13,_nextMonthDays=[]);_nextMonthDayCount=7-(_previousMonthDays.length+_monthDays.length)%7;// ensure a full week is not appended to the end
1415
- if(_nextMonthDayCount<7){const nextMonthStart=setDate(addMonths(_calendarDate,1),1);for(let i=0;i<_nextMonthDayCount;i++){$$invalidate(13,_nextMonthDays=[..._nextMonthDays,addDays(nextMonthStart,i)]);}}}function initKeybindings(){const handleKeyClick=async(e,newDate)=>{e.stopPropagation();e.preventDefault();// prevent selection outsite min/max boundies
1416
- if(newDate<_min||newDate>_max){return;}// re-initialize calendar days if arrow keys move to a different month
1417
- if(!isSameMonth(newDate,_calendarDate)){renderCalendar({type:"date",value:newDate});}$$invalidate(8,_calendarDate=newDate);await tick();const focusedDateEl=_calendarEl.querySelector(`[data-date="${newDate.getTime()}"]`);focusedDateEl===null||focusedDateEl===void 0?void 0:focusedDateEl.focus();};_calendarEl.addEventListener("keydown",e=>{switch(e.key){case"ArrowUp":handleKeyClick(e,addDays(_calendarDate,-7));break;case"ArrowDown":handleKeyClick(e,addDays(_calendarDate,7));break;case"ArrowLeft":handleKeyClick(e,addDays(_calendarDate,-1));break;case"ArrowRight":handleKeyClick(e,addDays(_calendarDate,1));break;case"Delete":case"Backspace":$$invalidate(7,_selectedDate=null);break;case"Home":{let homeDate=new Date(_calendarDate);homeDate.setDate(1);handleKeyClick(e,homeDate);break;}case"End":handleKeyClick(e,lastDayOfMonth(_calendarDate));break;case"PageUp":if(e.shiftKey){handleKeyClick(e,addYears(_calendarDate,-1));}else {handleKeyClick(e,addMonths(_calendarDate,-1));}break;case"PageDown":if(e.shiftKey){handleKeyClick(e,addYears(_calendarDate,1));}else {handleKeyClick(e,addMonths(_calendarDate,1));}break;case"Enter":$$invalidate(7,_selectedDate=_calendarDate);dispatchValue();e.stopPropagation();e.preventDefault();break;case"Escape":e.stopPropagation();e.preventDefault();break;}});}function dispatchValue(){$$invalidate(0,value=_selectedDate.toISOString());_calendarEl.dispatchEvent(new CustomEvent("_change",{composed:true,detail:{type:"date",name,value:_selectedDate}}));}// **************
1418
- // Event Handlers
1419
- // **************
1420
- function setMonth(e){renderCalendar({type:"month",value:+e.detail.value});e.preventDefault();e.stopPropagation();}function setYear(e){renderCalendar({type:"year",value:+e.detail.value});e.preventDefault();e.stopPropagation();}function onDateClick(e){const newDate=new Date(+e.target.dataset.date);if(newDate<_min||newDate>_max){return;}// re-initialize calendar days if user clicked on day outside current month
1421
- if(!isSameMonth(newDate,_calendarDate)){renderCalendar({type:"date",value:newDate});}$$invalidate(7,_selectedDate=$$invalidate(8,_calendarDate=newDate));dispatchValue();}function div0_binding($$value){binding_callbacks[$$value?'unshift':'push'](()=>{_calendarEl=$$value;$$invalidate(15,_calendarEl);});}$$self.$$set=$$props=>{if('name'in $$props)$$invalidate(1,name=$$props.name);if('value'in $$props)$$invalidate(0,value=$$props.value);if('min'in $$props)$$invalidate(20,min=$$props.min);if('max'in $$props)$$invalidate(21,max=$$props.max);if('mt'in $$props)$$invalidate(2,mt=$$props.mt);if('mr'in $$props)$$invalidate(3,mr=$$props.mr);if('mb'in $$props)$$invalidate(4,mb=$$props.mb);if('ml'in $$props)$$invalidate(5,ml=$$props.ml);if('bordered'in $$props)$$invalidate(6,bordered=$$props.bordered);};return [value,name,mt,mr,mb,ml,bordered,_selectedDate,_calendarDate,_min,_max,_monthDays,_previousMonthDays,_nextMonthDays,_years,_calendarEl,_months,setMonth,setYear,onDateClick,min,max,div0_binding];}class Calendar extends SvelteElement{constructor(options){super();const style=document.createElement('style');style.textContent=`:host{font:var(--goa-typography-body-s)}.bordered{display:inline-block;border:1px solid var(--goa-color-greyscale-700);border-radius:var(--goa-border-radius-m);padding:1rem}.calendar{display:grid;justify-items:center;grid-template-columns:repeat(7, 1fr);gap:2px 0;width:280px;font:var(--goa-typography-body-s)}h5{margin:0;font:var(--goa-typography-heading-xs)}.day{align-items:center;background:var(--goa-color-white);border:none;border-radius:var(--goa-border-radius-m);color:var(--goa-color-greyscale-black);display:inline-flex;font:var(--goa-typography-body-s);height:2.5rem;justify-content:center;margin:0;width:2.5rem}.day.other-month{color:var(--goa-color-greyscale-400)}.day.today{font-weight:var(--goa-font-weight-bold)}.day:focus-within{outline:var(--goa-border-width-l) solid var(--goa-color-interactive-focus)}.day.selected{background:var(--goa-color-interactive-default);color:var(--goa-color-greyscale-white)}.day:hover{background:var(--goa-color-greyscale-200);color:var(--goa-color-greyscale-black);cursor:pointer}.day.selected:hover{background:var(--goa-color-interactive-hover);text-decoration-color:var(--goa-color-white);color:var(--goa-color-greyscale-white)}.day.today.selected:hover{background:var(--goa-color-interactive-hover);text-decoration-color:var(--goa-color-white);color:var(--goa-color-greyscale-white)}.day.disabled{color:var(--goa-color-greyscale-400);cursor:default}.day.disabled:hover{background:var(--goa-color-white)}.day-num{width:100%;margin:0 6px;pointer-events:none;padding-bottom:2px}.selected .day-num{border-bottom:none;padding-bottom:0;width:1.5rem}.today .day-num{border-bottom:3px solid var(--goa-color-interactive-default)}.today.selected .day-num{border-bottom:3px solid var(--goa-color-greyscale-white)}`;this.shadowRoot.appendChild(style);init(this,{target:this.shadowRoot,props:attribute_to_object(this.attributes),customElement:true},instance$b,create_fragment$b,safe_not_equal,{name:1,value:0,min:20,max:21,mt:2,mr:3,mb:4,ml:5,bordered:6},null,[-1,-1]);if(options){if(options.target){insert(options.target,this,options.anchor);}if(options.props){this.$set(options.props);flush();}}}static get observedAttributes(){return ["name","value","min","max","mt","mr","mb","ml","bordered"];}get name(){return this.$$.ctx[1];}set name(name){this.$$set({name});flush();}get value(){return this.$$.ctx[0];}set value(value){this.$$set({value});flush();}get min(){return this.$$.ctx[20];}set min(min){this.$$set({min});flush();}get max(){return this.$$.ctx[21];}set max(max){this.$$set({max});flush();}get mt(){return this.$$.ctx[2];}set mt(mt){this.$$set({mt});flush();}get mr(){return this.$$.ctx[3];}set mr(mr){this.$$set({mr});flush();}get mb(){return this.$$.ctx[4];}set mb(mb){this.$$set({mb});flush();}get ml(){return this.$$.ctx[5];}set ml(ml){this.$$set({ml});flush();}get bordered(){return this.$$.ctx[6];}set bordered(bordered){this.$$set({bordered});flush();}}customElements.define("goa-calendar",Calendar);/* src/components/date-picker/DatePicker.svelte generated by Svelte v3.59.2 */function create_fragment$a(ctx){let goa_popover;let goa_input;let goa_input_value_value;let t;let goa_calendar;let mounted;let dispose;return {c(){goa_popover=element("goa-popover");goa_input=element("goa-input");t=space();goa_calendar=element("goa-calendar");this.c=noop;set_custom_element_data(goa_input,"slot","target");set_custom_element_data(goa_input,"readonly","true");set_custom_element_data(goa_input,"trailingicon","calendar");set_custom_element_data(goa_input,"value",goa_input_value_value=/*formatDate*/ctx[13](/*_date*/ctx[9]));set_custom_element_data(goa_calendar,"value",/*value*/ctx[0]);set_custom_element_data(goa_calendar,"min",/*min*/ctx[1]);set_custom_element_data(goa_calendar,"max",/*max*/ctx[2]);set_custom_element_data(goa_calendar,"bordered","false");set_custom_element_data(goa_popover,"tabindex","-1");set_custom_element_data(goa_popover,"relative",/*relative*/ctx[3]);set_custom_element_data(goa_popover,"mt",/*mt*/ctx[4]);set_custom_element_data(goa_popover,"mb",/*mb*/ctx[6]);set_custom_element_data(goa_popover,"ml",/*ml*/ctx[7]);set_custom_element_data(goa_popover,"mr",/*mr*/ctx[5]);set_custom_element_data(goa_popover,"open",/*_showPopover*/ctx[10]);},m(target,anchor){insert(target,goa_popover,anchor);append(goa_popover,goa_input);append(goa_popover,t);append(goa_popover,goa_calendar);/*goa_popover_binding*/ctx[16](goa_popover);if(!mounted){dispose=[listen(goa_input,"click",/*showCalendar*/ctx[14]),listen(goa_input,"keydown",/*handleKeyDown*/ctx[15]),listen(goa_calendar,"_change",/*onCalendarChange*/ctx[11]),listen(goa_popover,"_close",/*close_handler*/ctx[17])];mounted=true;}},p(ctx,[dirty]){if(dirty&/*_date*/512&&goa_input_value_value!==(goa_input_value_value=/*formatDate*/ctx[13](/*_date*/ctx[9]))){set_custom_element_data(goa_input,"value",goa_input_value_value);}if(dirty&/*value*/1){set_custom_element_data(goa_calendar,"value",/*value*/ctx[0]);}if(dirty&/*min*/2){set_custom_element_data(goa_calendar,"min",/*min*/ctx[1]);}if(dirty&/*max*/4){set_custom_element_data(goa_calendar,"max",/*max*/ctx[2]);}if(dirty&/*relative*/8){set_custom_element_data(goa_popover,"relative",/*relative*/ctx[3]);}if(dirty&/*mt*/16){set_custom_element_data(goa_popover,"mt",/*mt*/ctx[4]);}if(dirty&/*mb*/64){set_custom_element_data(goa_popover,"mb",/*mb*/ctx[6]);}if(dirty&/*ml*/128){set_custom_element_data(goa_popover,"ml",/*ml*/ctx[7]);}if(dirty&/*mr*/32){set_custom_element_data(goa_popover,"mr",/*mr*/ctx[5]);}if(dirty&/*_showPopover*/1024){set_custom_element_data(goa_popover,"open",/*_showPopover*/ctx[10]);}},i:noop,o:noop,d(detaching){if(detaching)detach(goa_popover);/*goa_popover_binding*/ctx[16](null);mounted=false;run_all(dispose);}};}function instance$a($$self,$$props,$$invalidate){let{value=""}=$$props;let{min=""}=$$props;let{max=""}=$$props;let{relative="false"}=$$props;let{mt=null}=$$props;let{mr=null}=$$props;let{mb=null}=$$props;let{ml=null}=$$props;let _rootEl;let _date;let _showPopover=false;onMount(async()=>{$$invalidate(9,_date=value&&startOfDay(new Date(value)));if(value&&!isValid(_date)){console.error(`${value} is not a valid date`);}});function onCalendarChange(e){$$invalidate(9,_date=e.detail.value);hideCalendar();e.stopPropagation();e.preventDefault();}function dispatchValue(date){if(!date)return;_rootEl.dispatchEvent(new CustomEvent("_change",{composed:true,bubbles:true,detail:{type:"date",value:date}}));}function formatDate(d){if(!d)return "";if(typeof d==="string"){return format(new Date(d),"PPP");}return format(d,"PPP");}function hideCalendar(){$$invalidate(10,_showPopover=false);}function showCalendar(){$$invalidate(10,_showPopover=true);}function handleKeyDown(e){if(["Space","Enter"].includes(e.key)){showCalendar();return;}// in the key event handling below the first line `_date ||= ...` is to initialize the date, if
1422
- // it hasn't yet been set to 1 unit opposite of what the keybinding does ex. if ArrowDown is
1423
- // clicked, which moves the datepicker one week ahead, the date is initialize one week before.
1424
- // This is to allow the starting date displayed to be that of today no matter what key is
1425
- // pressed.
1426
- switch(e.key){case"ArrowLeft":_date||$$invalidate(9,_date=addDays(new Date(),1));$$invalidate(9,_date=addDays(_date,-1));break;case"ArrowRight":_date||$$invalidate(9,_date=addDays(new Date(),-1));$$invalidate(9,_date=addDays(_date,1));break;case"ArrowDown":_date||$$invalidate(9,_date=addDays(new Date(),-7));$$invalidate(9,_date=addDays(_date,7));break;case"ArrowUp":_date||$$invalidate(9,_date=addDays(new Date(),7));$$invalidate(9,_date=addDays(_date,-7));break;case"PageUp":_date||$$invalidate(9,_date=e.shiftKey?addYears(new Date(),1):addMonths(new Date(),1));$$invalidate(9,_date=e.shiftKey?addYears(_date,-1):addMonths(_date,-1));break;case"PageDown":_date||$$invalidate(9,_date=e.shiftKey?addYears(new Date(),-1):addMonths(new Date(),-1));$$invalidate(9,_date=e.shiftKey?addYears(_date,1):addMonths(_date,1));break;default:return;}dispatchValue(_date);e.preventDefault();e.stopPropagation();}function goa_popover_binding($$value){binding_callbacks[$$value?'unshift':'push'](()=>{_rootEl=$$value;$$invalidate(8,_rootEl);});}const close_handler=()=>dispatchValue(_date);$$self.$$set=$$props=>{if('value'in $$props)$$invalidate(0,value=$$props.value);if('min'in $$props)$$invalidate(1,min=$$props.min);if('max'in $$props)$$invalidate(2,max=$$props.max);if('relative'in $$props)$$invalidate(3,relative=$$props.relative);if('mt'in $$props)$$invalidate(4,mt=$$props.mt);if('mr'in $$props)$$invalidate(5,mr=$$props.mr);if('mb'in $$props)$$invalidate(6,mb=$$props.mb);if('ml'in $$props)$$invalidate(7,ml=$$props.ml);};return [value,min,max,relative,mt,mr,mb,ml,_rootEl,_date,_showPopover,onCalendarChange,dispatchValue,formatDate,showCalendar,handleKeyDown,goa_popover_binding,close_handler];}class DatePicker extends SvelteElement{constructor(options){super();init(this,{target:this.shadowRoot,props:attribute_to_object(this.attributes),customElement:true},instance$a,create_fragment$a,safe_not_equal,{value:0,min:1,max:2,relative:3,mt:4,mr:5,mb:6,ml:7},null);if(options){if(options.target){insert(options.target,this,options.anchor);}if(options.props){this.$set(options.props);flush();}}}static get observedAttributes(){return ["value","min","max","relative","mt","mr","mb","ml"];}get value(){return this.$$.ctx[0];}set value(value){this.$$set({value});flush();}get min(){return this.$$.ctx[1];}set min(min){this.$$set({min});flush();}get max(){return this.$$.ctx[2];}set max(max){this.$$set({max});flush();}get relative(){return this.$$.ctx[3];}set relative(relative){this.$$set({relative});flush();}get mt(){return this.$$.ctx[4];}set mt(mt){this.$$set({mt});flush();}get mr(){return this.$$.ctx[5];}set mr(mr){this.$$set({mr});flush();}get mb(){return this.$$.ctx[6];}set mb(mb){this.$$set({mb});flush();}get ml(){return this.$$.ctx[7];}set ml(ml){this.$$set({ml});flush();}}customElements.define("goa-date-picker",DatePicker);/* src/components/file-upload-card/FileUploadCard.svelte generated by Svelte v3.59.2 */function create_else_block$2(ctx){let goa_icon;return {c(){goa_icon=element("goa-icon");set_custom_element_data(goa_icon,"class","fileicon");set_custom_element_data(goa_icon,"data-testid","icon");set_custom_element_data(goa_icon,"type","goa-file");set_custom_element_data(goa_icon,"fillcolor","#dcdcdc");set_custom_element_data(goa_icon,"size","xlarge");},m(target,anchor){insert(target,goa_icon,anchor);},p:noop,d(detaching){if(detaching)detach(goa_icon);}};}// (71:4) {#if _status === "uploaded"}
1427
- function create_if_block_7(ctx){let goa_icon;return {c(){goa_icon=element("goa-icon");set_custom_element_data(goa_icon,"class","fileicon");set_custom_element_data(goa_icon,"data-testid","icon");set_custom_element_data(goa_icon,"type",/*_fileIcon*/ctx[6]);set_custom_element_data(goa_icon,"fillcolor","#0070c4");set_custom_element_data(goa_icon,"size","xlarge");},m(target,anchor){insert(target,goa_icon,anchor);},p(ctx,dirty){if(dirty&/*_fileIcon*/64){set_custom_element_data(goa_icon,"type",/*_fileIcon*/ctx[6]);}},d(detaching){if(detaching)detach(goa_icon);}};}// (78:6) {#if _status !== "error"}
1428
- function create_if_block_6(ctx){let div;let t_value=formatFileSize(/*size*/ctx[1])+"";let t;return {c(){div=element("div");t=text(t_value);attr(div,"class","filesize");attr(div,"data-testid","filesize");},m(target,anchor){insert(target,div,anchor);append(div,t);},p(ctx,dirty){if(dirty&/*size*/2&&t_value!==(t_value=formatFileSize(/*size*/ctx[1])+""))set_data(t,t_value);},d(detaching){if(detaching)detach(div);}};}// (89:36)
1429
- function create_if_block_5(ctx){let div;let goa_icon;let t0;let t1;return {c(){div=element("div");goa_icon=element("goa-icon");t0=space();t1=text(/*error*/ctx[3]);set_custom_element_data(goa_icon,"type","warning");set_custom_element_data(goa_icon,"size","small");set_custom_element_data(goa_icon,"theme","filled");attr(div,"class","error-msg");attr(div,"data-testid","error");},m(target,anchor){insert(target,div,anchor);append(div,goa_icon);append(div,t0);append(div,t1);},p(ctx,dirty){if(dirty&/*error*/8)set_data(t1,/*error*/ctx[3]);},d(detaching){if(detaching)detach(div);}};}// (85:39)
1430
- function create_if_block_4$1(ctx){let div;return {c(){div=element("div");div.textContent=`Uploaded on ${getTimestamp()}`;attr(div,"class","timestamp");attr(div,"data-testid","timestamp");},m(target,anchor){insert(target,div,anchor);},p:noop,d(detaching){if(detaching)detach(div);}};}// (81:6) {#if _status === "uploading"}
1431
- function create_if_block_3$2(ctx){let div;let progress_1;let t0;let t1_value=Math.ceil(/*progress*/ctx[2])+"";let t1;let t2;return {c(){div=element("div");progress_1=element("progress");t0=space();t1=text(t1_value);t2=text("%");progress_1.value=/*progress*/ctx[2];attr(progress_1,"max","100");attr(div,"class","progress");attr(div,"data-testid","progress");},m(target,anchor){insert(target,div,anchor);append(div,progress_1);append(div,t0);append(div,t1);append(div,t2);},p(ctx,dirty){if(dirty&/*progress*/4){progress_1.value=/*progress*/ctx[2];}if(dirty&/*progress*/4&&t1_value!==(t1_value=Math.ceil(/*progress*/ctx[2])+""))set_data(t1,t1_value);},d(detaching){if(detaching)detach(div);}};}// (102:36)
1432
- function create_if_block_2$2(ctx){let goa_button;let mounted;let dispose;return {c(){goa_button=element("goa-button");goa_button.textContent="Cancel";set_custom_element_data(goa_button,"type","tertiary");set_custom_element_data(goa_button,"size","compact");set_custom_element_data(goa_button,"variant","destructive");},m(target,anchor){insert(target,goa_button,anchor);if(!mounted){dispose=listen(goa_button,"click",/*click_handler_2*/ctx[11]);mounted=true;}},p:noop,d(detaching){if(detaching)detach(goa_button);mounted=false;dispose();}};}// (100:39)
1433
- function create_if_block_1$2(ctx){let goa_button;let mounted;let dispose;return {c(){goa_button=element("goa-button");goa_button.textContent="Remove";set_custom_element_data(goa_button,"type","tertiary");set_custom_element_data(goa_button,"size","compact");set_custom_element_data(goa_button,"leadingicon","trash");},m(target,anchor){insert(target,goa_button,anchor);if(!mounted){dispose=listen(goa_button,"click",/*click_handler_1*/ctx[10]);mounted=true;}},p:noop,d(detaching){if(detaching)detach(goa_button);mounted=false;dispose();}};}// (98:6) {#if _status === "uploading"}
1434
- function create_if_block$6(ctx){let goa_button;let mounted;let dispose;return {c(){goa_button=element("goa-button");goa_button.textContent="Cancel";set_custom_element_data(goa_button,"type","tertiary");set_custom_element_data(goa_button,"size","compact");},m(target,anchor){insert(target,goa_button,anchor);if(!mounted){dispose=listen(goa_button,"click",/*click_handler*/ctx[9]);mounted=true;}},p:noop,d(detaching){if(detaching)detach(goa_button);mounted=false;dispose();}};}function create_fragment$9(ctx){let div3;let t0;let div1;let div0;let t1;let t2;let t3;let t4;let div2;let div3_class_value;function select_block_type(ctx,dirty){if(/*_status*/ctx[4]==="uploaded")return create_if_block_7;return create_else_block$2;}let current_block_type=select_block_type(ctx);let if_block0=current_block_type(ctx);let if_block1=/*_status*/ctx[4]!=="error"&&create_if_block_6(ctx);function select_block_type_1(ctx,dirty){if(/*_status*/ctx[4]==="uploading")return create_if_block_3$2;if(/*_status*/ctx[4]==="uploaded")return create_if_block_4$1;if(/*_status*/ctx[4]==="error")return create_if_block_5;}let current_block_type_1=select_block_type_1(ctx);let if_block2=current_block_type_1&&current_block_type_1(ctx);function select_block_type_2(ctx,dirty){if(/*_status*/ctx[4]==="uploading")return create_if_block$6;if(/*_status*/ctx[4]==="uploaded")return create_if_block_1$2;if(/*_status*/ctx[4]==="error")return create_if_block_2$2;}let current_block_type_2=select_block_type_2(ctx);let if_block3=current_block_type_2&&current_block_type_2(ctx);return {c(){div3=element("div");if_block0.c();t0=space();div1=element("div");div0=element("div");t1=text(/*filename*/ctx[0]);t2=space();if(if_block1)if_block1.c();t3=space();if(if_block2)if_block2.c();t4=space();div2=element("div");if(if_block3)if_block3.c();this.c=noop;attr(div0,"class","filename");attr(div0,"data-testid","filename");attr(div1,"class","details");attr(div2,"class","actions");attr(div2,"data-testid","actions");attr(div3,"data-testid","root");attr(div3,"class",div3_class_value=`root ${/*_status*/ctx[4]}`);toggle_class(div3,"error",/*error*/ctx[3]);},m(target,anchor){insert(target,div3,anchor);if_block0.m(div3,null);append(div3,t0);append(div3,div1);append(div1,div0);append(div0,t1);append(div1,t2);if(if_block1)if_block1.m(div1,null);append(div1,t3);if(if_block2)if_block2.m(div1,null);append(div3,t4);append(div3,div2);if(if_block3)if_block3.m(div2,null);/*div3_binding*/ctx[12](div3);},p(ctx,[dirty]){if(current_block_type===(current_block_type=select_block_type(ctx))&&if_block0){if_block0.p(ctx,dirty);}else {if_block0.d(1);if_block0=current_block_type(ctx);if(if_block0){if_block0.c();if_block0.m(div3,t0);}}if(dirty&/*filename*/1)set_data(t1,/*filename*/ctx[0]);if(/*_status*/ctx[4]!=="error"){if(if_block1){if_block1.p(ctx,dirty);}else {if_block1=create_if_block_6(ctx);if_block1.c();if_block1.m(div1,t3);}}else if(if_block1){if_block1.d(1);if_block1=null;}if(current_block_type_1===(current_block_type_1=select_block_type_1(ctx))&&if_block2){if_block2.p(ctx,dirty);}else {if(if_block2)if_block2.d(1);if_block2=current_block_type_1&&current_block_type_1(ctx);if(if_block2){if_block2.c();if_block2.m(div1,null);}}if(current_block_type_2===(current_block_type_2=select_block_type_2(ctx))&&if_block3){if_block3.p(ctx,dirty);}else {if(if_block3)if_block3.d(1);if_block3=current_block_type_2&&current_block_type_2(ctx);if(if_block3){if_block3.c();if_block3.m(div2,null);}}if(dirty&/*_status*/16&&div3_class_value!==(div3_class_value=`root ${/*_status*/ctx[4]}`)){attr(div3,"class",div3_class_value);}if(dirty&/*_status, error*/24){toggle_class(div3,"error",/*error*/ctx[3]);}},i:noop,o:noop,d(detaching){if(detaching)detach(div3);if_block0.d();if(if_block1)if_block1.d();if(if_block2){if_block2.d();}if(if_block3){if_block3.d();}/*div3_binding*/ctx[12](null);}};}function getFiletypeIcon(filename,type){// file extensions
1435
- const parts=filename.split(".");const ext=parts[parts.length-1];const extTypeIcon=ext==="xlxs"&&"goa-xls"||ext==="xls"&&"goa-xls"||ext==="zip"&&"goa-zip"||ext==="docx"&&"goa-doc"||ext==="doc"&&"goa-doc"||ext==="pptx"&&"goa-ppt"||ext==="ppt"&&"goa-ppt"||ext==="pdf"&&"goa-pdf"||ext==="html"&&"goa-html";if(extTypeIcon)return extTypeIcon;// mimetype
1436
- const mimeTypeIcon=type==="application/vnd.ms-powerpoint"&&"goa-ppt"||type.includes("presentationml")&&"goa-ppt"||type.includes("wordprocessingml")&&"goa-doc"||type.includes("spreadsheet")&&"goa-xls"||type.startsWith("video")&&"goa-video"||type.startsWith("audio")&&"goa-audio"||type.startsWith("image")&&"goa-image"||type==="application/msword"&&"goa-doc"||"goa-file";return mimeTypeIcon;}function formatFileSize(bytes){switch(true){case bytes<1024:return bytes+"B";case bytes<1024*1024:return Math.round(bytes/1024)+"KB";case bytes<Math.pow(1024,3):return Math.round(bytes/Math.pow(1024,2))+"MB";}}function instance$9($$self,$$props,$$invalidate){let{filename}=$$props;let{size}=$$props;let{type=""}=$$props;let{progress=-1}=$$props;let{error=""}=$$props;// Private
1437
- let _status="uploading";let _rootEl;let _fileIcon="goa-file";function dispatch(action){_rootEl.dispatchEvent(new CustomEvent(action,{composed:true}));}const click_handler=()=>dispatch("_cancel");const click_handler_1=()=>dispatch("_delete");const click_handler_2=()=>dispatch("_delete");function div3_binding($$value){binding_callbacks[$$value?'unshift':'push'](()=>{_rootEl=$$value;$$invalidate(5,_rootEl);});}$$self.$$set=$$props=>{if('filename'in $$props)$$invalidate(0,filename=$$props.filename);if('size'in $$props)$$invalidate(1,size=$$props.size);if('type'in $$props)$$invalidate(8,type=$$props.type);if('progress'in $$props)$$invalidate(2,progress=$$props.progress);if('error'in $$props)$$invalidate(3,error=$$props.error);};$$self.$$.update=()=>{if($$self.$$.dirty&/*error, progress*/12){// Reactive
1438
- $$invalidate(4,_status=error&&"error"||progress>=0&&progress<100&&"uploading"||"uploaded");}if($$self.$$.dirty&/*filename, type*/257){$$invalidate(6,_fileIcon=filename&&type&&getFiletypeIcon(filename,type));}};return [filename,size,progress,error,_status,_rootEl,_fileIcon,dispatch,type,click_handler,click_handler_1,click_handler_2,div3_binding];}class FileUploadCard extends SvelteElement{constructor(options){super();const style=document.createElement('style');style.textContent=`.root{padding:var(--goa-space-l);border:var(--goa-border-width-s) solid var(--goa-color-greyscale-200);border-radius:var(--goa-border-radius-m);margin:0.5rem 0;display:grid;grid-template-columns:38px auto;grid-template-rows:repeat(2, auto);grid-template-areas:"icon details"
1439
- "action action";gap:1rem;align-items:center}.root.error{border:var(--goa-border-width-m) solid var(--goa-color-interactive-error)}@media screen and (max-width: 623px){@media not (max-color:2147477350){.root{grid-template-columns:38px 1fr auto;grid-template-rows:auto;grid-template-areas:"icon details action"}.details{margin-left:0.5rem}}}@media not screen and (max-width: 623px){@media not (color:2147477350){.root{grid-template-columns:38px 1fr auto;grid-template-rows:auto;grid-template-areas:"icon details action"}.details{margin-left:0.5rem}}}.fileicon{grid-area:icon;align-self:center}.actions{grid-area:action}.details{grid-area:details;display:flex;flex-direction:column;overflow-x:hidden}.filename{grid-area:filename;font-size:var(--goa-font-size-4);overflow-wrap:anywhere}.error-msg{display:flex;align-items:flex-start;margin-top:0.5rem;gap:var(--goa-space-2xs);color:var(--goa-color-interactive-error);font:var(--goa-typography-body-xs)}.timestamp,.filesize{color:var(--goa-color-greyscale-700);font:var(--goa-typography-body-s)}.progress{display:flex;align-items:center;font:var(--goa-typography-body-xs);gap:0.5rem}progress{flex:1 1 auto;-webkit-appearance:none;-moz-appearance:none;appearance:none;height:4px;border:none;border-radius:var(--goa-border-radius-m);background:var(--goa-color-greyscale-200);color:var(--goa-color-greyscale-700)}progress::-webkit-progress-value{background:var(--goa-color-interactive-default)}progress::-webkit-progress-bar{background:var(--goa-color-greyscale-200)}progress::-moz-progress-bar{background:var(--goa-color-interactive-default)}`;this.shadowRoot.appendChild(style);init(this,{target:this.shadowRoot,props:attribute_to_object(this.attributes),customElement:true},instance$9,create_fragment$9,safe_not_equal,{filename:0,size:1,type:8,progress:2,error:3},null);if(options){if(options.target){insert(options.target,this,options.anchor);}if(options.props){this.$set(options.props);flush();}}}static get observedAttributes(){return ["filename","size","type","progress","error"];}get filename(){return this.$$.ctx[0];}set filename(filename){this.$$set({filename});flush();}get size(){return this.$$.ctx[1];}set size(size){this.$$set({size});flush();}get type(){return this.$$.ctx[8];}set type(type){this.$$set({type});flush();}get progress(){return this.$$.ctx[2];}set progress(progress){this.$$set({progress});flush();}get error(){return this.$$.ctx[3];}set error(error){this.$$set({error});flush();}}customElements.define("goa-file-upload-card",FileUploadCard);/* src/components/file-upload-input/FileUploadInput.svelte generated by Svelte v3.59.2 */function get_each_context(ctx,list,i){const child_ctx=ctx.slice();child_ctx[21]=list[i];return child_ctx;}// (126:0) {#if variant === "dragdrop"}
1440
- function create_if_block_3$1(ctx){let div3;let div2;let t6;let t7;let input;let div3_class_value;let mounted;let dispose;let if_block=/*maxfilesize*/ctx[2]&&create_if_block_4(ctx);return {c(){div3=element("div");div2=element("div");div2.innerHTML=`<goa-icon type="cloud-upload" size="large"></goa-icon>
1441
- <div>Drag and drop files here</div>
1442
- <em>or</em>
1443
- <div class="browse-files">Browse files</div>`;t6=space();if(if_block)if_block.c();t7=space();input=element("input");attr(div2,"class","instructions");attr(input,"data-testid","input");attr(input,"tabindex","0");attr(input,"type","file");attr(input,"accept",/*accept*/ctx[1]);input.multiple=true;attr(div3,"data-testid","dragdrop");attr(div3,"class",div3_class_value=`dragdrop state-${/*_state*/ctx[5]}`);},m(target,anchor){insert(target,div3,anchor);append(div3,div2);append(div3,t6);if(if_block)if_block.m(div3,null);append(div3,t7);append(div3,input);/*input_binding*/ctx[13](input);/*div3_binding*/ctx[14](div3);if(!mounted){dispose=[listen(div3,"click",/*openFilePicker*/ctx[7]),listen(div3,"drop",/*onDrop*/ctx[8]),listen(div3,"mouseover",/*onMouseOver*/ctx[11]),listen(div3,"mouseout",/*onMouseOut*/ctx[12]),listen(div3,"dragenter",/*onDragEnter*/ctx[9]),listen(div3,"dragleave",/*onDragLeave*/ctx[10]),listen(div3,"dragover",onDrag)];mounted=true;}},p(ctx,dirty){if(/*maxfilesize*/ctx[2]){if(if_block){if_block.p(ctx,dirty);}else {if_block=create_if_block_4(ctx);if_block.c();if_block.m(div3,t7);}}else if(if_block){if_block.d(1);if_block=null;}if(dirty&/*accept*/2){attr(input,"accept",/*accept*/ctx[1]);}if(dirty&/*_state*/32&&div3_class_value!==(div3_class_value=`dragdrop state-${/*_state*/ctx[5]}`)){attr(div3,"class",div3_class_value);}},d(detaching){if(detaching)detach(div3);if(if_block)if_block.d();/*input_binding*/ctx[13](null);/*div3_binding*/ctx[14](null);mounted=false;run_all(dispose);}};}// (146:4) {#if maxfilesize}
1444
- function create_if_block_4(ctx){let em;let t0;let t1;let t2;return {c(){em=element("em");t0=text("Maximum file size is ");t1=text(/*maxfilesize*/ctx[2]);t2=text(".");attr(em,"class","max-file-size");attr(em,"data-testid","max-file-size");},m(target,anchor){insert(target,em,anchor);append(em,t0);append(em,t1);append(em,t2);},p(ctx,dirty){if(dirty&/*maxfilesize*/4)set_data(t1,/*maxfilesize*/ctx[2]);},d(detaching){if(detaching)detach(em);}};}// (154:0) {#if variant === "button"}
1445
- function create_if_block_1$1(ctx){let div;let goa_button;let t1;let t2;let input;let mounted;let dispose;let if_block=/*maxfilesize*/ctx[2]&&create_if_block_2$1(ctx);return {c(){div=element("div");goa_button=element("goa-button");goa_button.textContent="Choose file";t1=space();if(if_block)if_block.c();t2=space();input=element("input");set_custom_element_data(goa_button,"type","secondary");attr(div,"class","button");attr(input,"data-testid","input");attr(input,"tabindex","-1");attr(input,"type","file");attr(input,"accept",/*accept*/ctx[1]);input.multiple=true;},m(target,anchor){insert(target,div,anchor);append(div,goa_button);append(div,t1);if(if_block)if_block.m(div,null);/*div_binding*/ctx[15](div);insert(target,t2,anchor);insert(target,input,anchor);/*input_binding_1*/ctx[16](input);if(!mounted){dispose=listen(goa_button,"click",/*openFilePicker*/ctx[7]);mounted=true;}},p(ctx,dirty){if(/*maxfilesize*/ctx[2]){if(if_block){if_block.p(ctx,dirty);}else {if_block=create_if_block_2$1(ctx);if_block.c();if_block.m(div,null);}}else if(if_block){if_block.d(1);if_block=null;}if(dirty&/*accept*/2){attr(input,"accept",/*accept*/ctx[1]);}},d(detaching){if(detaching)detach(div);if(if_block)if_block.d();/*div_binding*/ctx[15](null);if(detaching)detach(t2);if(detaching)detach(input);/*input_binding_1*/ctx[16](null);mounted=false;dispose();}};}// (158:4) {#if maxfilesize}
1446
- function create_if_block_2$1(ctx){let em;let t0;let t1;let t2;return {c(){em=element("em");t0=text("Maximum file size is ");t1=text(/*maxfilesize*/ctx[2]);t2=text(".");attr(em,"class","max-file-size");attr(em,"data-testid","max-file-size");},m(target,anchor){insert(target,em,anchor);append(em,t0);append(em,t1);append(em,t2);},p(ctx,dirty){if(dirty&/*maxfilesize*/4)set_data(t1,/*maxfilesize*/ctx[2]);},d(detaching){if(detaching)detach(em);}};}// (166:0) {#if issues.length}
1447
- function create_if_block$5(ctx){let div;let each_value=/*issues*/ctx[6];let each_blocks=[];for(let i=0;i<each_value.length;i+=1){each_blocks[i]=create_each_block(get_each_context(ctx,each_value,i));}return {c(){div=element("div");for(let i=0;i<each_blocks.length;i+=1){each_blocks[i].c();}attr(div,"class","issues");},m(target,anchor){insert(target,div,anchor);for(let i=0;i<each_blocks.length;i+=1){if(each_blocks[i]){each_blocks[i].m(div,null);}}},p(ctx,dirty){if(dirty&/*issues*/64){each_value=/*issues*/ctx[6];let i;for(i=0;i<each_value.length;i+=1){const child_ctx=get_each_context(ctx,each_value,i);if(each_blocks[i]){each_blocks[i].p(child_ctx,dirty);}else {each_blocks[i]=create_each_block(child_ctx);each_blocks[i].c();each_blocks[i].m(div,null);}}for(;i<each_blocks.length;i+=1){each_blocks[i].d(1);}each_blocks.length=each_value.length;}},d(detaching){if(detaching)detach(div);destroy_each(each_blocks,detaching);}};}// (168:4) {#each issues as issue}
1448
- function create_each_block(ctx){let div1;let t0_value=/*issue*/ctx[21].filename+"";let t0;let t1;let div0;let goa_icon;let t2;let t3_value=/*issue*/ctx[21].error+"";let t3;let t4;return {c(){div1=element("div");t0=text(t0_value);t1=space();div0=element("div");goa_icon=element("goa-icon");t2=space();t3=text(t3_value);t4=space();set_custom_element_data(goa_icon,"type","warning");set_custom_element_data(goa_icon,"size","small");set_custom_element_data(goa_icon,"theme","filled");attr(div0,"class","error");attr(div0,"data-testid","error");attr(div1,"class","issue");},m(target,anchor){insert(target,div1,anchor);append(div1,t0);append(div1,t1);append(div1,div0);append(div0,goa_icon);append(div0,t2);append(div0,t3);append(div1,t4);},p(ctx,dirty){if(dirty&/*issues*/64&&t0_value!==(t0_value=/*issue*/ctx[21].filename+""))set_data(t0,t0_value);if(dirty&/*issues*/64&&t3_value!==(t3_value=/*issue*/ctx[21].error+""))set_data(t3,t3_value);},d(detaching){if(detaching)detach(div1);}};}function create_fragment$8(ctx){let t0;let t1;let if_block2_anchor;let if_block0=/*variant*/ctx[0]==="dragdrop"&&create_if_block_3$1(ctx);let if_block1=/*variant*/ctx[0]==="button"&&create_if_block_1$1(ctx);let if_block2=/*issues*/ctx[6].length&&create_if_block$5(ctx);return {c(){if(if_block0)if_block0.c();t0=space();if(if_block1)if_block1.c();t1=space();if(if_block2)if_block2.c();if_block2_anchor=empty();this.c=noop;},m(target,anchor){if(if_block0)if_block0.m(target,anchor);insert(target,t0,anchor);if(if_block1)if_block1.m(target,anchor);insert(target,t1,anchor);if(if_block2)if_block2.m(target,anchor);insert(target,if_block2_anchor,anchor);},p(ctx,[dirty]){if(/*variant*/ctx[0]==="dragdrop"){if(if_block0){if_block0.p(ctx,dirty);}else {if_block0=create_if_block_3$1(ctx);if_block0.c();if_block0.m(t0.parentNode,t0);}}else if(if_block0){if_block0.d(1);if_block0=null;}if(/*variant*/ctx[0]==="button"){if(if_block1){if_block1.p(ctx,dirty);}else {if_block1=create_if_block_1$1(ctx);if_block1.c();if_block1.m(t1.parentNode,t1);}}else if(if_block1){if_block1.d(1);if_block1=null;}if(/*issues*/ctx[6].length){if(if_block2){if_block2.p(ctx,dirty);}else {if_block2=create_if_block$5(ctx);if_block2.c();if_block2.m(if_block2_anchor.parentNode,if_block2_anchor);}}else if(if_block2){if_block2.d(1);if_block2=null;}},i:noop,o:noop,d(detaching){if(if_block0)if_block0.d(detaching);if(detaching)detach(t0);if(if_block1)if_block1.d(detaching);if(detaching)detach(t1);if(if_block2)if_block2.d(detaching);if(detaching)detach(if_block2_anchor);}};}function onDrag(e){e.preventDefault();return false;}function instance$8($$self,$$props,$$invalidate){let{variant="dragdrop"}=$$props;let{accept="*"}=$$props;let{maxfilesize="5MB"}=$$props;// Private
1449
- let _el;let _fileInput;let _state="default";let issues=[];// Hooks
1450
- onMount(()=>{_fileInput.addEventListener("change",()=>{$$invalidate(6,issues=[]);// reset on every new batch of files
1451
- [..._fileInput.files].forEach(file=>{const error=validate(file);if(error){$$invalidate(6,issues=[{filename:file.name,error},...issues]);return;}dispatch(file);});$$invalidate(4,_fileInput.value=null,_fileInput);},true);});// Functions
1452
- function validate(file){if(!isValidFileType(file)){return "Invalid file type";}if(!isValidFileSize(file)){return `The file must be less than ${maxfilesize}`;}}function isValidFileType(file){const typeMatchers=accept.split(",");for(const matcher of typeMatchers){const matches=file.type.match(matcher.replace("*",".*").replace("/","\/"))||file.name.endsWith(accept);if(matches){return true;}}return false;}function isValidFileSize(file){const[_,size,units]=maxfilesize.match(/(\d*)(\w*$)/);const factor={"B":1,"KB":1024,"MB":Math.pow(1024,2),"GB":Math.pow(1024,3)};if(file.size/factor[units]>parseInt(size)){return false;}return true;}function dispatch(file){_el.dispatchEvent(new CustomEvent("_selectFile",{composed:true,detail:{file}}));}function openFilePicker(){_fileInput.click();}function onDrop(e){e.preventDefault();$$invalidate(6,issues=[]);// reset on every new batch of files
1453
- if(e.dataTransfer.items){[...e.dataTransfer.items].forEach(item=>{if(item.kind==='file'){const file=item.getAsFile();const error=validate(file);if(error){$$invalidate(6,issues=[{filename:file.name,error},...issues]);return;}dispatch(item.getAsFile());}});}else {[...e.dataTransfer.files].forEach(file=>{const error=validate(file);if(error){$$invalidate(6,issues=[{filename:file.name,error},...issues]);return;}dispatch(file);});}$$invalidate(4,_fileInput.value=null,_fileInput);}function onDragEnter(){$$invalidate(5,_state="dragenter");}function onDragLeave(e){// hovering over child components will result in the dragleave event to be fired,
1454
- // so we must validate to whether the mouse pointer is within the bounds of the
1455
- // dropable area
1456
- const rect=_el.getBoundingClientRect();const withinBounds=e.clientX>rect.x&&e.clientX<=rect.x+rect.width&&e.clientY>rect.y&&e.clientY<=rect.y+rect.height;if(!withinBounds){$$invalidate(5,_state="default");}}function onMouseOver(){$$invalidate(5,_state="hover");}function onMouseOut(){$$invalidate(5,_state="default");}function input_binding($$value){binding_callbacks[$$value?'unshift':'push'](()=>{_fileInput=$$value;$$invalidate(4,_fileInput);});}function div3_binding($$value){binding_callbacks[$$value?'unshift':'push'](()=>{_el=$$value;$$invalidate(3,_el);});}function div_binding($$value){binding_callbacks[$$value?'unshift':'push'](()=>{_el=$$value;$$invalidate(3,_el);});}function input_binding_1($$value){binding_callbacks[$$value?'unshift':'push'](()=>{_fileInput=$$value;$$invalidate(4,_fileInput);});}$$self.$$set=$$props=>{if('variant'in $$props)$$invalidate(0,variant=$$props.variant);if('accept'in $$props)$$invalidate(1,accept=$$props.accept);if('maxfilesize'in $$props)$$invalidate(2,maxfilesize=$$props.maxfilesize);};return [variant,accept,maxfilesize,_el,_fileInput,_state,issues,openFilePicker,onDrop,onDragEnter,onDragLeave,onMouseOver,onMouseOut,input_binding,div3_binding,div_binding,input_binding_1];}class FileUploadInput extends SvelteElement{constructor(options){super();const style=document.createElement('style');style.textContent=`.dragdrop{border-radius:var(--goa-border-radius-m);border:var(--goa-border-width-m) dashed var(--goa-color-interactive-default);display:flex;font:var(--goa-typography-body-m);flex-direction:column;align-items:center;justify-content:center;gap:0.25rem;padding:var(--goa-space-xl);color:var(--goa-color-interactive-default);text-align:center;cursor:pointer}@media screen and (max-width: 623px){.dragdrop{padding-top:1.75rem}}.dragdrop:active,.dragdrop:focus-within{border-style:solid;outline:none}.dragdrop:hover div{color:var(--goa-color-interactive-hover)}.state-default{background:var(--goa-color-info-background)}.state-hover{background:var(--goa-color-greyscale-100);border-style:dashed}.state-dragenter{background:var(--goa-color-info-background);border-style:solid}.instructions{display:flex;align-items:center;gap:0.5rem}@media screen and (max-width: 623px){.instructions{flex-direction:column}}goa-icon{margin-top:4px;margin-right:4px}.browse-files{text-decoration:underline}em{font-style:normal;font:var(--goa-typography-body-s);color:var(--goa-color-greyscale-700)}.max-file-size{display:block;margin-top:0.5rem}input[type="file"]{position:absolute;left:-9999px}.issues{border-bottom:1px solid var(--goa-color-greyscale-200);margin:1rem 0}.issue{margin-bottom:1rem}.error{color:var(--goa-color-interactive-error);font-size:0.9em;display:flex;align-items:center;gap:0.5rem}`;this.shadowRoot.appendChild(style);init(this,{target:this.shadowRoot,props:attribute_to_object(this.attributes),customElement:true},instance$8,create_fragment$8,safe_not_equal,{variant:0,accept:1,maxfilesize:2},null);if(options){if(options.target){insert(options.target,this,options.anchor);}if(options.props){this.$set(options.props);flush();}}}static get observedAttributes(){return ["variant","accept","maxfilesize"];}get variant(){return this.$$.ctx[0];}set variant(variant){this.$$set({variant});flush();}get accept(){return this.$$.ctx[1];}set accept(accept){this.$$set({accept});flush();}get maxfilesize(){return this.$$.ctx[2];}set maxfilesize(maxfilesize){this.$$set({maxfilesize});flush();}}customElements.define("goa-file-upload-input",FileUploadInput);/* src/components/form-step/FormStep.svelte generated by Svelte v3.59.2 */function create_else_block$1(ctx){let div;let t;return {c(){div=element("div");t=text(/*childindex*/ctx[1]);attr(div,"data-testid","child-index");attr(div,"class","step-number");},m(target,anchor){insert(target,div,anchor);append(div,t);},p(ctx,dirty){if(dirty&/*childindex*/2)set_data(t,/*childindex*/ctx[1]);},d(detaching){if(detaching)detach(div);}};}// (160:38)
1457
- function create_if_block_3(ctx){let goa_icon;return {c(){goa_icon=element("goa-icon");set_custom_element_data(goa_icon,"type","remove");},m(target,anchor){insert(target,goa_icon,anchor);},p:noop,d(detaching){if(detaching)detach(goa_icon);}};}// (158:36)
1458
- function create_if_block_2(ctx){let goa_icon;return {c(){goa_icon=element("goa-icon");set_custom_element_data(goa_icon,"type","checkmark");set_custom_element_data(goa_icon,"inverted","");},m(target,anchor){insert(target,goa_icon,anchor);},p:noop,d(detaching){if(detaching)detach(goa_icon);}};}// (156:4) {#if _isCurrent}
1459
- function create_if_block_1(ctx){let goa_icon;return {c(){goa_icon=element("goa-icon");set_custom_element_data(goa_icon,"type","pencil");},m(target,anchor){insert(target,goa_icon,anchor);},p:noop,d(detaching){if(detaching)detach(goa_icon);}};}// (168:4) {#if status === "incomplete"}
1460
- function create_if_block$4(ctx){let div;return {c(){div=element("div");div.textContent="Partially complete";attr(div,"class","subtext");attr(div,"data-testid","subtext");},m(target,anchor){insert(target,div,anchor);},d(detaching){if(detaching)detach(div);}};}function create_fragment$7(ctx){let label;let input;let input_aria_disabled_value;let t0;let div0;let t1;let div2;let div1;let t2;let t3;let label_aria_disabled_value;let label_aria_current_value;let label_aria_label_value;function select_block_type(ctx,dirty){if(/*_isCurrent*/ctx[7])return create_if_block_1;if(/*status*/ctx[3]==="complete")return create_if_block_2;if(/*status*/ctx[3]==="incomplete")return create_if_block_3;return create_else_block$1;}let current_block_type=select_block_type(ctx);let if_block0=current_block_type(ctx);let if_block1=/*status*/ctx[3]==="incomplete"&&create_if_block$4();return {c(){label=element("label");input=element("input");t0=space();div0=element("div");if_block0.c();t1=space();div2=element("div");div1=element("div");t2=text(/*text*/ctx[0]);t3=space();if(if_block1)if_block1.c();this.c=noop;attr(input,"id",/*text*/ctx[0]);attr(input,"type","checkbox");input.checked=/*_isCurrent*/ctx[7];attr(input,"aria-disabled",input_aria_disabled_value=!/*_isEnabled*/ctx[6]);attr(div0,"data-testid","status");attr(div0,"class","status");attr(div1,"class","text");attr(div1,"data-testid","text");attr(div2,"class","details");attr(label,"id",/*arialabel*/ctx[2]);attr(label,"role","listitem");attr(label,"tabindex","-1");attr(label,"for",/*text*/ctx[0]);attr(label,"data-status",/*status*/ctx[3]);attr(label,"aria-disabled",label_aria_disabled_value=!/*_isEnabled*/ctx[6]?"true":"false");attr(label,"aria-current",label_aria_current_value=/*_isCurrent*/ctx[7]?"step":"false");attr(label,"aria-label",label_aria_label_value=`${/*arialabel*/ctx[2]} ${/*text*/ctx[0]} ${/*status*/ctx[3]||""}`);},m(target,anchor){insert(target,label,anchor);append(label,input);/*input_binding*/ctx[10](input);append(label,t0);append(label,div0);if_block0.m(div0,null);append(label,t1);append(label,div2);append(div2,div1);append(div1,t2);append(div2,t3);if(if_block1)if_block1.m(div2,null);/*label_binding*/ctx[11](label);},p(ctx,[dirty]){if(dirty&/*text*/1){attr(input,"id",/*text*/ctx[0]);}if(dirty&/*_isCurrent*/128){input.checked=/*_isCurrent*/ctx[7];}if(dirty&/*_isEnabled*/64&&input_aria_disabled_value!==(input_aria_disabled_value=!/*_isEnabled*/ctx[6])){attr(input,"aria-disabled",input_aria_disabled_value);}if(current_block_type===(current_block_type=select_block_type(ctx))&&if_block0){if_block0.p(ctx,dirty);}else {if_block0.d(1);if_block0=current_block_type(ctx);if(if_block0){if_block0.c();if_block0.m(div0,null);}}if(dirty&/*text*/1)set_data(t2,/*text*/ctx[0]);if(/*status*/ctx[3]==="incomplete"){if(if_block1);else {if_block1=create_if_block$4();if_block1.c();if_block1.m(div2,null);}}else if(if_block1){if_block1.d(1);if_block1=null;}if(dirty&/*arialabel*/4){attr(label,"id",/*arialabel*/ctx[2]);}if(dirty&/*text*/1){attr(label,"for",/*text*/ctx[0]);}if(dirty&/*status*/8){attr(label,"data-status",/*status*/ctx[3]);}if(dirty&/*_isEnabled*/64&&label_aria_disabled_value!==(label_aria_disabled_value=!/*_isEnabled*/ctx[6]?"true":"false")){attr(label,"aria-disabled",label_aria_disabled_value);}if(dirty&/*_isCurrent*/128&&label_aria_current_value!==(label_aria_current_value=/*_isCurrent*/ctx[7]?"step":"false")){attr(label,"aria-current",label_aria_current_value);}if(dirty&/*arialabel, text, status*/13&&label_aria_label_value!==(label_aria_label_value=`${/*arialabel*/ctx[2]} ${/*text*/ctx[0]} ${/*status*/ctx[3]||""}`)){attr(label,"aria-label",label_aria_label_value);}},i:noop,o:noop,d(detaching){if(detaching)detach(label);/*input_binding*/ctx[10](null);if_block0.d();if(if_block1)if_block1.d();/*label_binding*/ctx[11](null);}};}function instance$7($$self,$$props,$$invalidate){let _isCurrent;let _isEnabled;const[StatusTypes,validateStatus]=typeValidator("Form Step status",["incomplete","complete"],true);let{text}=$$props;let{current="false"}=$$props;let{enabled="false"}=$$props;let{childindex=""}=$$props;let{arialabel=""}=$$props;let{status}=$$props;// =======
1461
- // Private
1462
- // =======
1463
- let _stepEl;let _checkbox;onMount(()=>{validateStatus(status);// event binding
1464
- _stepEl.addEventListener("click",()=>{if(!_isEnabled)return;$$invalidate(5,_checkbox.checked=!_checkbox.checked,_checkbox);_stepEl.dispatchEvent(new CustomEvent("_click",{composed:true,bubbles:true,detail:+childindex}));});});function input_binding($$value){binding_callbacks[$$value?'unshift':'push'](()=>{_checkbox=$$value;$$invalidate(5,_checkbox);});}function label_binding($$value){binding_callbacks[$$value?'unshift':'push'](()=>{_stepEl=$$value;$$invalidate(4,_stepEl);});}$$self.$$set=$$props=>{if('text'in $$props)$$invalidate(0,text=$$props.text);if('current'in $$props)$$invalidate(8,current=$$props.current);if('enabled'in $$props)$$invalidate(9,enabled=$$props.enabled);if('childindex'in $$props)$$invalidate(1,childindex=$$props.childindex);if('arialabel'in $$props)$$invalidate(2,arialabel=$$props.arialabel);if('status'in $$props)$$invalidate(3,status=$$props.status);};$$self.$$.update=()=>{if($$self.$$.dirty&/*current*/256){// ========
1465
- // Reactive
1466
- // ========
1467
- $$invalidate(7,_isCurrent=toBoolean(current));}if($$self.$$.dirty&/*enabled, status*/520){$$invalidate(6,_isEnabled=toBoolean(enabled)||status==="complete");}};return [text,childindex,arialabel,status,_stepEl,_checkbox,_isEnabled,_isCurrent,current,enabled,input_binding,label_binding];}class FormStep extends SvelteElement{constructor(options){super();const style=document.createElement('style');style.textContent=`input[type=checkbox]{position:absolute;left:-9999px}[role="listitem"]{display:flex;box-sizing:border-box;height:100%;text-align:center;flex-direction:column;align-items:center;padding:var(--goa-space-l)}[role="listitem"]:not([aria-disabled="true"]):not([aria-current="step"]):focus-within,[role="listitem"]:not([aria-disabled="true"]):not([aria-current="step"]):focus,[role="listitem"]:not([aria-disabled="true"]):not([aria-current="step"]):active{outline:var(--goa-color-interactive-focus) solid var(--goa-border-width-l)}[role="listitem"]:not([aria-disabled="true"]):not([aria-current="step"]):hover{background-color:rgba(0,0,0,0.05);cursor:pointer}.status{flex:0 0 auto;display:flex;align-items:center;justify-content:center;box-sizing:border-box;border-radius:999px;border:4px solid var(--goa-color-interactive-default);background:var(--goa-color-greyscale-white);height:2.5rem;width:2.5rem}.status>*{fill:var(--fill-color, var(--goa-color-interactive-default));color:var(--fill-color, var(--goa-color-interactive-default))}[aria-current="step"] .text{font-weight:var(--goa-font-weight-bold)
1468
- }[data-status=complete] .status{background:var(--goa-color-interactive-default)}[aria-current="step"][data-status=complete] .status{background:var(--goa-color-greyscale-white)}.step-number{margin-bottom:var(--font-valign-fix);font-weight:var(--goa-font-weight-bold);color:var(--goa-color-text-secondary)}[role="listitem"]:not(
1469
- [data-status=complete],
1470
- [data-status=incomplete],
1471
- [aria-current="step"]
1472
- ) .status{border-color:var(--goa-color-greyscale-500)}.text{font:var(--goa-typography-body-s)}.subtext{margin-top:0.25rem;font:var(--goa-typography-body-xs);color:var(--goa-color-text-secondary)}.details{margin-top:0.75rem}@media screen and (max-width: 623px){[role="listitem"]{flex-direction:row;align-items:center;text-align:start}.details{margin-left:1rem;margin-top:0}}`;this.shadowRoot.appendChild(style);init(this,{target:this.shadowRoot,props:attribute_to_object(this.attributes),customElement:true},instance$7,create_fragment$7,safe_not_equal,{text:0,current:8,enabled:9,childindex:1,arialabel:2,status:3},null);if(options){if(options.target){insert(options.target,this,options.anchor);}if(options.props){this.$set(options.props);flush();}}}static get observedAttributes(){return ["text","current","enabled","childindex","arialabel","status"];}get text(){return this.$$.ctx[0];}set text(text){this.$$set({text});flush();}get current(){return this.$$.ctx[8];}set current(current){this.$$set({current});flush();}get enabled(){return this.$$.ctx[9];}set enabled(enabled){this.$$set({enabled});flush();}get childindex(){return this.$$.ctx[1];}set childindex(childindex){this.$$set({childindex});flush();}get arialabel(){return this.$$.ctx[2];}set arialabel(arialabel){this.$$set({arialabel});flush();}get status(){return this.$$.ctx[3];}set status(status){this.$$set({status});flush();}}customElements.define("goa-form-step",FormStep);/* src/components/form-stepper/FormStepper.svelte generated by Svelte v3.59.2 */function create_if_block$3(ctx){let progress0;let t;let progress1;return {c(){progress0=element("progress");t=space();progress1=element("progress");attr(progress0,"class","horizontal");progress0.value=/*_progress*/ctx[11];attr(progress0,"max","100");attr(progress1,"class","vertical");progress1.value=/*_progress*/ctx[11];attr(progress1,"max","100");},m(target,anchor){insert(target,progress0,anchor);insert(target,t,anchor);insert(target,progress1,anchor);},p(ctx,dirty){if(dirty&/*_progress*/2048){progress0.value=/*_progress*/ctx[11];}if(dirty&/*_progress*/2048){progress1.value=/*_progress*/ctx[11];}},d(detaching){if(detaching)detach(progress0);if(detaching)detach(t);if(detaching)detach(progress1);}};}function create_fragment$6(ctx){let section;let div1;let t;let div0;let div1_style_value;let if_block=/*_steps*/ctx[4].length>0&&/*_showProgressBars*/ctx[10]&&create_if_block$3(ctx);return {c(){section=element("section");div1=element("div");if(if_block)if_block.c();t=space();div0=element("div");div0.innerHTML=`<goa-grid minchildwidth="1px"><slot></slot></goa-grid>`;this.c=noop;attr(div0,"class","slots");attr(div1,"class","form-stepper");attr(div1,"style",div1_style_value=`
1473
- ${calculateMargin(/*mt*/ctx[0],/*mr*/ctx[1],/*mb*/ctx[2],/*ml*/ctx[3])};
1474
- --progress: ${/*_progress*/ctx[11]}%;
1475
- --step-width: ${/*_stepWidth*/ctx[7]}px;
1476
- --step-height: ${/*_stepHeight*/ctx[8]}px;
1477
- --height: ${/*_progressHeight*/ctx[9]}px;
1478
- `);attr(section,"role","list");},m(target,anchor){insert(target,section,anchor);append(section,div1);if(if_block)if_block.m(div1,null);append(div1,t);append(div1,div0);/*div0_binding*/ctx[15](div0);/*div1_binding*/ctx[16](div1);},p(ctx,[dirty]){if(/*_steps*/ctx[4].length>0&&/*_showProgressBars*/ctx[10]){if(if_block){if_block.p(ctx,dirty);}else {if_block=create_if_block$3(ctx);if_block.c();if_block.m(div1,t);}}else if(if_block){if_block.d(1);if_block=null;}if(dirty&/*mt, mr, mb, ml, _progress, _stepWidth, _stepHeight, _progressHeight*/2959&&div1_style_value!==(div1_style_value=`
1479
- ${calculateMargin(/*mt*/ctx[0],/*mr*/ctx[1],/*mb*/ctx[2],/*ml*/ctx[3])};
1480
- --progress: ${/*_progress*/ctx[11]}%;
1481
- --step-width: ${/*_stepWidth*/ctx[7]}px;
1482
- --step-height: ${/*_stepHeight*/ctx[8]}px;
1483
- --height: ${/*_progressHeight*/ctx[9]}px;
1484
- `)){attr(div1,"style",div1_style_value);}},i:noop,o:noop,d(detaching){if(detaching)detach(section);if(if_block)if_block.d();/*div0_binding*/ctx[15](null);/*div1_binding*/ctx[16](null);}};}function instance$6($$self,$$props,$$invalidate){let _progress;let{step=-1}=$$props;let{mt=null}=$$props;let{mr=null}=$$props;let{mb=null}=$$props;let{ml=null}=$$props;// =======
1485
- // Private
1486
- // =======
1487
- let _rootEl;// events bound to it
1488
- let _gridEl;// used to obtain component dimensions
1489
- let _steps=[];// step DOM elements to allow for width calculations
1490
- let _stepWidth;// calculated x distance (px) between each step point
1491
- let _stepHeight;// calculated y distance (px) between each step point
1492
- let _progressHeight;// allow css calculations for mobile view
1493
- let _maxAllowedStep=1;// prevent users from using the stepper to access future steps
1494
- let _maxProgressStep=1;// controls the progress bars value
1495
- let _showProgressBars=false;// delays the showing of the progress bars to prevent it from
1496
- onMount(async()=>{await tick();// children steps
1497
- const slot=_rootEl.querySelector("slot");if(slot){$$invalidate(4,_steps=slot.assignedElements());}else {// for unit tests only
1498
- $$invalidate(4,_steps=[..._rootEl.querySelector("goa-grid").children]);}// set step a11y label
1499
- _steps.forEach((_step,index)=>{const s=_step;s.setAttribute("arialabel",`Step ${index+1} of ${_steps.length}`);s.setAttribute("childindex",`${index+1}`);});// handle click events from progress items
1500
- _rootEl.addEventListener("_click",e=>{$$invalidate(12,step=e.detail);dispatch(step);});setCurrentStepStatus(step);calcStepDims();setTimeout(()=>{$$invalidate(10,_showProgressBars=true);},10);// add listener to recalculate the step widths
1501
- window.addEventListener('resize',calcStepDims);window.addEventListener('orientationchange',calcStepDims);return ()=>{window.removeEventListener('resize',calcStepDims);window.removeEventListener('orientationchange',calcStepDims);};});function dispatch(step){_rootEl.dispatchEvent(new CustomEvent("_change",{composed:true,bubbles:true,detail:{step}}));}function setCurrentStepStatus(step){_steps.forEach((stepEl,index)=>{stepEl.setAttribute("current",index===step-1?"true":"false");});}function calcStepDims(){// timeout required, without it the _steps elements width was not yet updated
1502
- setTimeout(()=>{$$invalidate(7,_stepWidth=_steps.length>0&&_steps[0].offsetWidth);$$invalidate(8,_stepHeight=_steps.length>0&&_steps[0].offsetHeight);$$invalidate(9,_progressHeight=_gridEl===null||_gridEl===void 0?void 0:_gridEl.offsetHeight);},1);}function div0_binding($$value){binding_callbacks[$$value?'unshift':'push'](()=>{_gridEl=$$value;$$invalidate(6,_gridEl);});}function div1_binding($$value){binding_callbacks[$$value?'unshift':'push'](()=>{_rootEl=$$value;$$invalidate(5,_rootEl);});}$$self.$$set=$$props=>{if('step'in $$props)$$invalidate(12,step=$$props.step);if('mt'in $$props)$$invalidate(0,mt=$$props.mt);if('mr'in $$props)$$invalidate(1,mr=$$props.mr);if('mb'in $$props)$$invalidate(2,mb=$$props.mb);if('ml'in $$props)$$invalidate(3,ml=$$props.ml);};$$self.$$.update=()=>{if($$self.$$.dirty&/*_steps, step, _maxProgressStep, _maxAllowedStep*/28688){{if(_steps.length){// allow access to all steps if not step property is provided
1503
- if(step<=0){$$invalidate(12,step=1);setTimeout(()=>{dispatch(step);},1);$$invalidate(13,_maxAllowedStep=_steps.length);}if(step>_maxProgressStep)$$invalidate(14,_maxProgressStep=step);if(step>_maxAllowedStep)$$invalidate(13,_maxAllowedStep=step);_steps.forEach((stepEl,index)=>{stepEl.setAttribute("enabled",index>_maxAllowedStep-1?"false":"true");});}}}if($$self.$$.dirty&/*_maxProgressStep, _steps*/16400){// being temporarily visible with an unwanted offset
1504
- // ========
1505
- // Reactive
1506
- // ========
1507
- // handles the 1-based step value and the number of line segments is one less
1508
- // than the number of steps
1509
- $$invalidate(11,_progress=(_maxProgressStep-1)/(_steps.length-1)*100);}if($$self.$$.dirty&/*step*/4096){setCurrentStepStatus(step);}};return [mt,mr,mb,ml,_steps,_rootEl,_gridEl,_stepWidth,_stepHeight,_progressHeight,_showProgressBars,_progress,step,_maxAllowedStep,_maxProgressStep,div0_binding,div1_binding];}class FormStepper extends SvelteElement{constructor(options){super();const style=document.createElement('style');style.textContent=`.form-stepper{position:relative}.slots{position:relative;inset:0;z-index:2}progress{position:absolute;z-index:1;-webkit-appearance:none;-moz-appearance:none;appearance:none;height:4px;border:none;background:var(--goa-color-greyscale-200);pointer-events:none}progress.horizontal{display:block;top:calc(1.5rem + (2.5rem / 2) - 2px);left:calc(var(--step-width) / 2);width:calc(100% - var(--step-width))}progress.vertical{display:none;width:calc(var(--height) - var(--step-height));transform:rotate(90deg)
1510
- translate(
1511
- calc(50% + 1.25rem + 1.75rem),
1512
- calc((var(--height) - var(--step-height)) / 2 - 1.25rem - 1.5rem)
1513
- )}progress::-webkit-progress-value{background:var(--goa-color-interactive-default)}progress::-webkit-progress-bar{background:var(--goa-color-greyscale-200)}progress::-moz-progress-bar{background:var(--goa-color-interactive-default)}@media screen and (max-width: 623px){progress.horizontal{display:none}progress.vertical{display:inline-block}.form-stepper{display:inline-block}}`;this.shadowRoot.appendChild(style);init(this,{target:this.shadowRoot,props:attribute_to_object(this.attributes),customElement:true},instance$6,create_fragment$6,safe_not_equal,{step:12,mt:0,mr:1,mb:2,ml:3},null);if(options){if(options.target){insert(options.target,this,options.anchor);}if(options.props){this.$set(options.props);flush();}}}static get observedAttributes(){return ["step","mt","mr","mb","ml"];}get step(){return this.$$.ctx[12];}set step(step){this.$$set({step});flush();}get mt(){return this.$$.ctx[0];}set mt(mt){this.$$set({mt});flush();}get mr(){return this.$$.ctx[1];}set mr(mr){this.$$set({mr});flush();}get mb(){return this.$$.ctx[2];}set mb(mb){this.$$set({mb});flush();}get ml(){return this.$$.ctx[3];}set ml(ml){this.$$set({ml});flush();}}customElements.define("goa-form-stepper",FormStepper);/* src/components/pages/Pages.svelte generated by Svelte v3.59.2 */function create_fragment$5(ctx){let div;let slot;let div_style_value;return {c(){div=element("div");slot=element("slot");this.c=noop;attr(div,"style",div_style_value=calculateMargin(/*mt*/ctx[0],/*mr*/ctx[1],/*mb*/ctx[2],/*ml*/ctx[3]));attr(div,"class","pages");},m(target,anchor){insert(target,div,anchor);append(div,slot);/*div_binding*/ctx[6](div);},p(ctx,[dirty]){if(dirty&/*mt, mr, mb, ml*/15&&div_style_value!==(div_style_value=calculateMargin(/*mt*/ctx[0],/*mr*/ctx[1],/*mb*/ctx[2],/*ml*/ctx[3]))){attr(div,"style",div_style_value);}},i:noop,o:noop,d(detaching){if(detaching)detach(div);/*div_binding*/ctx[6](null);}};}function instance$5($$self,$$props,$$invalidate){let{current=1}=$$props;let{mt=null}=$$props;let{mr=null}=$$props;let{mb=null}=$$props;let{ml=null}=$$props;// Private
1514
- let _rootEl;// Hooks
1515
- onMount(async()=>{await tick();setCurrentPage(current);});function setCurrentPage(current){if(!_rootEl)return;const children=getChildren();children.forEach((child,index)=>{const _child=child;_child.style.display=index+1===+current?"block":"none";});}function getChildren(){const slot=_rootEl.querySelector("slot");if(slot){return [...slot.assignedElements()];}else {return [..._rootEl.children];// unit tests
1516
- }}function div_binding($$value){binding_callbacks[$$value?'unshift':'push'](()=>{_rootEl=$$value;$$invalidate(4,_rootEl);});}$$self.$$set=$$props=>{if('current'in $$props)$$invalidate(5,current=$$props.current);if('mt'in $$props)$$invalidate(0,mt=$$props.mt);if('mr'in $$props)$$invalidate(1,mr=$$props.mr);if('mb'in $$props)$$invalidate(2,mb=$$props.mb);if('ml'in $$props)$$invalidate(3,ml=$$props.ml);};$$self.$$.update=()=>{if($$self.$$.dirty&/*current*/32){// Reactive
1517
- setCurrentPage(current);}};return [mt,mr,mb,ml,_rootEl,current,div_binding];}class Pages extends SvelteElement{constructor(options){super();init(this,{target:this.shadowRoot,props:attribute_to_object(this.attributes),customElement:true},instance$5,create_fragment$5,safe_not_equal,{current:5,mt:0,mr:1,mb:2,ml:3},null);if(options){if(options.target){insert(options.target,this,options.anchor);}if(options.props){this.$set(options.props);flush();}}}static get observedAttributes(){return ["current","mt","mr","mb","ml"];}get current(){return this.$$.ctx[5];}set current(current){this.$$set({current});flush();}get mt(){return this.$$.ctx[0];}set mt(mt){this.$$set({mt});flush();}get mr(){return this.$$.ctx[1];}set mr(mr){this.$$set({mr});flush();}get mb(){return this.$$.ctx[2];}set mb(mb){this.$$set({mb});flush();}get ml(){return this.$$.ctx[3];}set ml(ml){this.$$set({ml});flush();}}customElements.define("goa-pages",Pages);function isUrlMatch(windowUrl,testUrl){if(testUrl===void 0)return -1;const windowUrlParts=windowUrl.pathname.replace(/^\//,"").split("/");const urlParts=testUrl.replace(/^\//,"").split("/");if(windowUrlParts.length<urlParts.length){return -1;}if(windowUrl.hash.length>0&&windowUrl.hash===testUrl){return 1;}if(urlParts.length===1&&urlParts[0]===""){return 0;}let weight=-1;let index=0;for(const part of windowUrlParts){if(urlParts[index]!==part){break;}weight+=1;index++;}return weight>=0?weight+1:weight;}/* src/components/side-menu/SideMenu.svelte generated by Svelte v3.59.2 */function create_fragment$4(ctx){let div;return {c(){div=element("div");div.innerHTML=`<slot></slot>`;this.c=noop;attr(div,"class","side-menu");},m(target,anchor){insert(target,div,anchor);/*div_binding*/ctx[1](div);},p:noop,i:noop,o:noop,d(detaching){if(detaching)detach(div);/*div_binding*/ctx[1](null);}};}function instance$4($$self,$$props,$$invalidate){let _rootEl;onMount(async()=>{await tick();setCurrentUrl();addEventListeners();});function setCurrentUrl(){const slot=_rootEl.querySelector("slot");if(!slot){return false;}const links=slot.assignedElements().filter(el=>el.tagName==="A");let currentEl;let maxWeight=0;links.forEach(child=>{const weight=isUrlMatch(document.location,child.getAttribute("href"));if(weight>maxWeight){maxWeight=weight;currentEl=child;}child.classList.remove("current");});if(currentEl){currentEl.classList.add("current");}}function addEventListeners(){// watch path changes
1518
- let currentLocation=document.location.href;const observer=new MutationObserver(_mutationList=>{if(isUrlMatch(document.location,currentLocation)){currentLocation=document.location.href;setCurrentUrl();}});observer.observe(document.body,{childList:true,subtree:true});// watch hash / browser history changes
1519
- window.addEventListener("popstate",()=>{setCurrentUrl();});}function div_binding($$value){binding_callbacks[$$value?'unshift':'push'](()=>{_rootEl=$$value;$$invalidate(0,_rootEl);});}return [_rootEl,div_binding];}class SideMenu extends SvelteElement{constructor(options){super();const style=document.createElement('style');style.textContent=`::slotted(a),::slotted(a:visited){color:var(--goa-color-text-default) !important;display:block;font:var(--goa-typography-body-m);padding:0.5rem 1rem 0.5rem 2rem;text-decoration:none}::slotted(a.current){font:var(--goa-typography-heading-s);background:#CEDFEE}::slotted(a:hover:not(.current)){background:#CEDFEE}::slotted(a:focus-visible){outline:var(--goa-border-width-l) solid var(--goa-color-interactive-focus)}.side-menu{display:block}`;this.shadowRoot.appendChild(style);init(this,{target:this.shadowRoot,props:attribute_to_object(this.attributes),customElement:true},instance$4,create_fragment$4,safe_not_equal,{},null);if(options){if(options.target){insert(options.target,this,options.anchor);}}}}customElements.define("goa-side-menu",SideMenu);/* src/components/side-menu-group/SideMenuGroup.svelte generated by Svelte v3.59.2 */function create_else_block(ctx){let goa_icon;return {c(){goa_icon=element("goa-icon");set_custom_element_data(goa_icon,"type","chevron-forward");},m(target,anchor){insert(target,goa_icon,anchor);},d(detaching){if(detaching)detach(goa_icon);}};}// (193:4) {#if _open}
1520
- function create_if_block$2(ctx){let goa_icon;return {c(){goa_icon=element("goa-icon");set_custom_element_data(goa_icon,"type","chevron-down");},m(target,anchor){insert(target,goa_icon,anchor);},d(detaching){if(detaching)detach(goa_icon);}};}function create_fragment$3(ctx){let div1;let a;let t0;let t1;let a_href_value;let t2;let div0;let mounted;let dispose;function select_block_type(ctx,dirty){if(/*_open*/ctx[1])return create_if_block$2;return create_else_block;}let current_block_type=select_block_type(ctx);let if_block=current_block_type(ctx);return {c(){div1=element("div");a=element("a");t0=text(/*heading*/ctx[0]);t1=space();if_block.c();t2=space();div0=element("div");div0.innerHTML=`<slot></slot>`;this.c=noop;attr(a,"href",a_href_value=`#${/*_slug*/ctx[4]}`);attr(a,"class","heading");attr(div0,"class","group");attr(div0,"data-testid","group");toggle_class(div0,"hidden",!/*_open*/ctx[1]);attr(div1,"class","side-menu-group");toggle_class(div1,"current",/*_current*/ctx[2]);},m(target,anchor){insert(target,div1,anchor);append(div1,a);append(a,t0);append(a,t1);if_block.m(a,null);append(div1,t2);append(div1,div0);/*div1_binding*/ctx[6](div1);if(!mounted){dispose=listen(a,"click",/*handleClick*/ctx[5]);mounted=true;}},p(ctx,[dirty]){if(dirty&/*heading*/1)set_data(t0,/*heading*/ctx[0]);if(current_block_type!==(current_block_type=select_block_type(ctx))){if_block.d(1);if_block=current_block_type(ctx);if(if_block){if_block.c();if_block.m(a,null);}}if(dirty&/*_slug*/16&&a_href_value!==(a_href_value=`#${/*_slug*/ctx[4]}`)){attr(a,"href",a_href_value);}if(dirty&/*_open*/2){toggle_class(div0,"hidden",!/*_open*/ctx[1]);}if(dirty&/*_current*/4){toggle_class(div1,"current",/*_current*/ctx[2]);}},i:noop,o:noop,d(detaching){if(detaching)detach(div1);if_block.d();/*div1_binding*/ctx[6](null);mounted=false;dispose();}};}function toSlug(path){return path===null||path===void 0?void 0:path.toLowerCase().replace(/ /g,"-");}function instance$3($$self,$$props,$$invalidate){let _slug;let{heading}=$$props;let _open=false;let _current=false;let _rootEl;onMount(async()=>{await tick();// needed to allow for window location to be read
1521
- checkUrlMatches();setCurrent();addEventListeners();});function checkUrlMatches(){$$invalidate(1,_open=matchesMenu()||matchesChild(_rootEl));if(_open){notifyParent(true);}}function addEventListeners(){// listen to events by children (if child is open the parent also has to be open)
1522
- _rootEl.addEventListener("_open",()=>{$$invalidate(1,_open=true);$$invalidate(2,_current=true);});// watch path changes
1523
- let currentLocation=document.location.href;const observer=new MutationObserver(_mutationList=>{// if path change occurs
1524
- if(currentLocation!==document.location.href){currentLocation=document.location.href;setCurrent();}});observer.observe(document.body,{childList:true,subtree:true});// watch hash / browser history changes
1525
- window.addEventListener("popstate",()=>{setCurrent();});}function matchesMenu(){return isUrlMatch(document.location,_slug)>=0;}function matchesChild(el){if(isUrlMatch(document.location,toSlug(el.heading))>=0){return true;}const slot=el.querySelector("slot");if(!slot){return false;}const children=slot.assignedElements();return !!children.find(child=>{return isUrlMatch(document.location,child.getAttribute("href"))>=0;});}function setCurrent(){const slot=_rootEl.querySelector("slot");if(!slot){return false;}const children=slot.assignedElements();let maxMatchWeight=-1;let matchedChild=null;$$invalidate(2,_current=false);children.forEach(child=>{const url=child.getAttribute("href");const weight=isUrlMatch(document.location,url);if(weight>maxMatchWeight){maxMatchWeight=weight;matchedChild=child;}child.classList.remove("current");// get side-menu-group (level >= 2) marked as children
1526
- if(child.tagName==="GOA-SIDE-MENU-GROUP"){child.setAttribute("child","true");}});if(matchedChild){$$invalidate(2,_current=true);matchedChild.classList.add("current");notifyParent(true);}}function handleClick(e){$$invalidate(1,_open=!_open);e.preventDefault();}function notifyParent(current){_rootEl.dispatchEvent(new CustomEvent("_open",{bubbles:true,composed:true,detail:{current}}));}function div1_binding($$value){binding_callbacks[$$value?'unshift':'push'](()=>{_rootEl=$$value;$$invalidate(3,_rootEl);});}$$self.$$set=$$props=>{if('heading'in $$props)$$invalidate(0,heading=$$props.heading);};$$self.$$.update=()=>{if($$self.$$.dirty&/*heading*/1){$$invalidate(4,_slug=toSlug(heading));}};return [heading,_open,_current,_rootEl,_slug,handleClick,div1_binding];}class SideMenuGroup extends SvelteElement{constructor(options){super();const style=document.createElement('style');style.textContent=`::slotted(a),::slotted(goa-side-menu-heading),::slotted(a:visited){color:var(--goa-color-text-default) !important;display:block;font:var(--goa-typography-body-m);margin-left:1rem}::slotted(a),::slotted(a:visited){padding:0.5rem 1rem;text-decoration:none;border-left:4px solid var(--goa-color-greyscale-100)}::slotted(a.current){font:var(--goa-typography-heading-s);border-left:4px solid var(--goa-color-interactive-disabled);background:var(--goa-color-info-background)}::slotted(a:hover:not(.current)){background:var(--goa-color-info-background);border-color:var(--goa-color-greyscale-200)}::slotted(a:focus-visible),.heading:focus-visible{outline:var(--goa-border-width-l) solid var(--goa-color-interactive-focus)}:host([child=true]) a.heading,.heading{color:var(--goa-color-text-default);display:flex;align-items:center;justify-content:space-between;line-height:2rem;padding:0.5rem 1rem 0.5rem 2rem;text-decoration:none}:host([child=true]) a.heading{margin-left:1rem;border-left:4px solid var(--goa-color-greyscale-100);padding:0.5rem 1rem 0.5rem 1rem}:host([child=true]) a.heading:hover{border-color:var(--goa-color-greyscale-200);background:var(--goa-color-info-background)}:host([child=true]) .side-menu-group.current a.heading{background:var(--goa-color-info-background);border-left:4px solid var(--goa-color-interactive-disabled)}.side-menu-group.current .heading{background:#CEDFEE}.heading:hover{background:#CEDFEE}.hidden{display:none}.group{padding-left:1rem}`;this.shadowRoot.appendChild(style);init(this,{target:this.shadowRoot,props:attribute_to_object(this.attributes),customElement:true},instance$3,create_fragment$3,safe_not_equal,{heading:0},null);if(options){if(options.target){insert(options.target,this,options.anchor);}if(options.props){this.$set(options.props);flush();}}}static get observedAttributes(){return ["heading"];}get heading(){return this.$$.ctx[0];}set heading(heading){this.$$set({heading});flush();}}customElements.define("goa-side-menu-group",SideMenuGroup);/* src/components/side-menu-heading/SideMenuHeading.svelte generated by Svelte v3.59.2 */function create_if_block$1(ctx){let goa_icon;return {c(){goa_icon=element("goa-icon");set_custom_element_data(goa_icon,"id","heading-icon");set_custom_element_data(goa_icon,"type",/*icon*/ctx[0]);set_custom_element_data(goa_icon,"theme","filled");},m(target,anchor){insert(target,goa_icon,anchor);},p(ctx,dirty){if(dirty&/*icon*/1){set_custom_element_data(goa_icon,"type",/*icon*/ctx[0]);}},d(detaching){if(detaching)detach(goa_icon);}};}function create_fragment$2(ctx){let h2;let t0;let slot0;let t1;let slot1;let if_block=/*icon*/ctx[0]&&create_if_block$1(ctx);return {c(){h2=element("h2");if(if_block)if_block.c();t0=space();slot0=element("slot");t1=space();slot1=element("slot");this.c=noop;attr(slot1,"name","meta");attr(h2,"data-testid","section-heading");toggle_class(h2,"icon",/*icon*/ctx[0]);},m(target,anchor){insert(target,h2,anchor);if(if_block)if_block.m(h2,null);append(h2,t0);append(h2,slot0);append(h2,t1);append(h2,slot1);},p(ctx,[dirty]){if(/*icon*/ctx[0]){if(if_block){if_block.p(ctx,dirty);}else {if_block=create_if_block$1(ctx);if_block.c();if_block.m(h2,t0);}}else if(if_block){if_block.d(1);if_block=null;}if(dirty&/*icon*/1){toggle_class(h2,"icon",/*icon*/ctx[0]);}},i:noop,o:noop,d(detaching){if(detaching)detach(h2);if(if_block)if_block.d();}};}function instance$2($$self,$$props,$$invalidate){let{icon=null}=$$props;$$self.$$set=$$props=>{if('icon'in $$props)$$invalidate(0,icon=$$props.icon);};return [icon];}class SideMenuHeading extends SvelteElement{constructor(options){super();const style=document.createElement('style');style.textContent=`h2{border-top:var(--goa-border-width-m) solid var(--goa-color-greyscale-200, #DCDCDC);background:var(--goa-color-greyscale-100, #F1F1F1);padding:0.75rem 0.75rem 0.5rem 1.5rem;margin:0;color:var(--goa-color-text-secondary, #666);font:var(--goa-typography-heading-s);display:flex;align-items:flex-start;gap:0.5rem}`;this.shadowRoot.appendChild(style);init(this,{target:this.shadowRoot,props:attribute_to_object(this.attributes),customElement:true},instance$2,create_fragment$2,safe_not_equal,{icon:0},null);if(options){if(options.target){insert(options.target,this,options.anchor);}if(options.props){this.$set(options.props);flush();}}}static get observedAttributes(){return ["icon"];}get icon(){return this.$$.ctx[0];}set icon(icon){this.$$set({icon});flush();}}customElements.define("goa-side-menu-heading",SideMenuHeading);/* src/components/tab/Tab.svelte generated by Svelte v3.59.2 */function create_if_block(ctx){let div;return {c(){div=element("div");div.innerHTML=`<slot></slot>`;attr(div,"role","tabpanel");},m(target,anchor){insert(target,div,anchor);},d(detaching){if(detaching)detach(div);}};}function create_fragment$1(ctx){let slot;let t0;let t1;let if_block_anchor;let if_block=/*_isOpen*/ctx[1]&&create_if_block();return {c(){slot=element("slot");t0=text(/*heading*/ctx[0]);t1=space();if(if_block)if_block.c();if_block_anchor=empty();this.c=noop;set_style(slot,"display","none");attr(slot,"name","heading");},m(target,anchor){insert(target,slot,anchor);append(slot,t0);insert(target,t1,anchor);if(if_block)if_block.m(target,anchor);insert(target,if_block_anchor,anchor);},p(ctx,[dirty]){if(dirty&/*heading*/1)set_data(t0,/*heading*/ctx[0]);if(/*_isOpen*/ctx[1]){if(if_block);else {if_block=create_if_block();if_block.c();if_block.m(if_block_anchor.parentNode,if_block_anchor);}}else if(if_block){if_block.d(1);if_block=null;}},i:noop,o:noop,d(detaching){if(detaching)detach(slot);if(detaching)detach(t1);if(if_block)if_block.d(detaching);if(detaching)detach(if_block_anchor);}};}function instance$1($$self,$$props,$$invalidate){let{heading=""}=$$props;let{open="false"}=$$props;let _isOpen;$$self.$$set=$$props=>{if('heading'in $$props)$$invalidate(0,heading=$$props.heading);if('open'in $$props)$$invalidate(2,open=$$props.open);};$$self.$$.update=()=>{if($$self.$$.dirty&/*open*/4){$$invalidate(1,_isOpen=toBoolean(open));}};return [heading,_isOpen,open];}class Tab extends SvelteElement{constructor(options){super();const style=document.createElement('style');style.textContent=`[role=tabpanel]{padding-top:2rem}`;this.shadowRoot.appendChild(style);init(this,{target:this.shadowRoot,props:attribute_to_object(this.attributes),customElement:true},instance$1,create_fragment$1,safe_not_equal,{heading:0,open:2},null);if(options){if(options.target){insert(options.target,this,options.anchor);}if(options.props){this.$set(options.props);flush();}}}static get observedAttributes(){return ["heading","open"];}get heading(){return this.$$.ctx[0];}set heading(heading){this.$$set({heading});flush();}get open(){return this.$$.ctx[2];}set open(open){this.$$set({open});flush();}}customElements.define("goa-tab",Tab);/* src/components/tabs/Tabs.svelte generated by Svelte v3.59.2 */function create_fragment(ctx){let div2;let div0;let t0;let div1;let t1;let button0;let t2;let button1;return {c(){div2=element("div");div0=element("div");t0=space();div1=element("div");div1.innerHTML=`<slot></slot>`;t1=space();button0=element("button");button0.innerHTML=`<div class="tab"></div>`;t2=space();button1=element("button");this.c=noop;attr(div0,"class","tabs");attr(div1,"class","tabpanel");attr(div1,"tabindex","0");attr(div1,"role","tabpanel");attr(div2,"role","tablist");attr(button0,"role","tab");attr(button0,"aria-selected","false");set_style(button0,"display","none");attr(button1,"role","tab");attr(button1,"aria-selected","true");set_style(button1,"display","none");},m(target,anchor){insert(target,div2,anchor);append(div2,div0);/*div0_binding*/ctx[4](div0);append(div2,t0);append(div2,div1);/*div1_binding*/ctx[5](div1);/*div2_binding*/ctx[6](div2);insert(target,t1,anchor);insert(target,button0,anchor);insert(target,t2,anchor);insert(target,button1,anchor);},p:noop,i:noop,o:noop,d(detaching){if(detaching)detach(div2);/*div0_binding*/ctx[4](null);/*div1_binding*/ctx[5](null);/*div2_binding*/ctx[6](null);if(detaching)detach(t1);if(detaching)detach(button0);if(detaching)detach(t2);if(detaching)detach(button1);}};}function instance($$self,$$props,$$invalidate){let{initialtab=1}=$$props;// Private
1527
- let _rootEl;let _tabItems=[];let _tabs;let _panelEl;let _currentTab=1;// ========
1528
- // Hooks
1529
- // ========
1530
- onMount(async()=>{await tick();// init listeners
1531
- addKeyboardEventListeners();// setup tabs
1532
- const slot=_rootEl.querySelector("slot");if(slot){_tabItems=slot.assignedElements();}else {_tabItems=[..._rootEl.querySelectorAll("goa-tab")];// for unit tests
1533
- }_tabItems.map((el,index)=>{let tab=[...el.children].find(child=>child.getAttribute("slot")==="heading");if(!tab&&el.getAttribute("heading")){// If heading is not a slot, create a new element
1534
- tab=document.createElement("div");tab.textContent=el.getAttribute("heading");}const button=document.createElement("button");tab.classList.add("tab");button.appendChild(tab);button.setAttribute("id",`tab-${index+1}`);button.setAttribute("role","tab");button.addEventListener("click",()=>setCurrentTab(index+1));button.setAttribute("aria-controls",`tabpanel-${index+1}`);_tabs.appendChild(button);});setCurrentTab(initialtab);});onDestroy(()=>{removeKeyboardEventListeners();});// =========
1535
- // Functions
1536
- // =========
1537
- function addKeyboardEventListeners(){_rootEl.addEventListener("focus",handleKeydownEvents,true);}function removeKeyboardEventListeners(){_rootEl.removeEventListener("focus",handleKeydownEvents,true);}function setCurrentTab(tab){if(tab>_tabItems.length){tab=_tabItems.length;}if(tab<1){tab=1;}_currentTab=+tab;[..._tabs.querySelectorAll("[role=tab]")].map((el,index)=>{_tabItems[index].setAttribute("open","false");el.setAttribute("aria-selected",index+1===_currentTab?"true":"false");el.setAttribute("tabindex",index+1===_currentTab?"0":"-1");if(index+1===_currentTab){el.focus();el.removeAttribute("tabindex");// allow tabbing to the button when the tab is active
1538
- _tabItems[index].setAttribute("open","true");// display tab content
1539
- }});_panelEl.setAttribute("aria-labelledby",`tab-${_currentTab}`);_panelEl.setAttribute("id",`tabpanel-${_currentTab}`);}function handleKeydownEvents(){_rootEl.addEventListener("keydown",onKeyDown);}function onKeyDown(e){let isHandled=false;switch(e.key){case'ArrowUp':case'ArrowLeft':if(_currentTab===1){setCurrentTab(_tabItems.length);}else {setCurrentTab(_currentTab-1);}isHandled=true;break;case'ArrowDown':case'ArrowRight':if(_currentTab===_tabItems.length){setCurrentTab(1);}else {setCurrentTab(_currentTab+1);}isHandled=true;break;case'Home':setCurrentTab(1);isHandled=true;break;case'End':setCurrentTab(_tabItems.length);isHandled=true;break;}if(isHandled){e.stopPropagation();e.preventDefault();}}function div0_binding($$value){binding_callbacks[$$value?'unshift':'push'](()=>{_tabs=$$value;$$invalidate(1,_tabs);});}function div1_binding($$value){binding_callbacks[$$value?'unshift':'push'](()=>{_panelEl=$$value;$$invalidate(2,_panelEl);});}function div2_binding($$value){binding_callbacks[$$value?'unshift':'push'](()=>{_rootEl=$$value;$$invalidate(0,_rootEl);});}$$self.$$set=$$props=>{if('initialtab'in $$props)$$invalidate(3,initialtab=$$props.initialtab);};return [_rootEl,_tabs,_panelEl,initialtab,div0_binding,div1_binding,div2_binding];}class Tabs extends SvelteElement{constructor(options){super();const style=document.createElement('style');style.textContent=`:host{box-sizing:border-box;font:var(--goa-typography-body-m)}.tab{display:flex;gap:var(--goa-space-xs)}[role="tab"]{background:none;overflow:hidden;white-space:nowrap;cursor:pointer;border:none;font:var(--goa-typography-body-m);color:var(--goa-color-text-default);letter-spacing:0.03125rem}[role="tab"][aria-selected="true"]{font:var(--goa-typography-heading-s)}[role="tab"]:focus-visible{outline:var(--goa-border-width-l) solid var(--goa-color-interactive-focus)}[role="tab"]:hover:not([aria-selected="true"]),[role="tab"]:focus:not([aria-selected="true"]),[role="tab"]:focus-visible:not([aria-selected="true"]){border-color:var(--goa-color-greyscale-200)}@media screen and (max-width: 623px){@media not (max-color:2147477350){[role="tablist"]{border-bottom:none}.tabs{border-bottom:var(--goa-border-width-s) solid var(--goa-color-greyscale-200);display:flex;gap:var(--goa-space-xl)}[role="tab"]{padding:var(--goa-space-s) var(--goa-space-m);border-bottom:4px solid transparent}[role="tab"][aria-selected="true"]{border-color:var(--goa-color-interactive-default)}}}@media not screen and (max-width: 623px){@media not (color:2147477350){[role="tablist"]{border-bottom:none}.tabs{border-bottom:var(--goa-border-width-s) solid var(--goa-color-greyscale-200);display:flex;gap:var(--goa-space-xl)}[role="tab"]{padding:var(--goa-space-s) var(--goa-space-m);border-bottom:4px solid transparent}[role="tab"][aria-selected="true"]{border-color:var(--goa-color-interactive-default)}}}@media screen and (max-width: 623px){[role="tab"]{width:100%;padding:var(--goa-space-xs) 0;padding-left:12px;border-left:4px solid transparent}[role="tab"][aria-selected="true"]{border-color:var(--goa-color-interactive-default);background:var(--goa-color-info-background)}}`;this.shadowRoot.appendChild(style);init(this,{target:this.shadowRoot,props:attribute_to_object(this.attributes),customElement:true},instance,create_fragment,safe_not_equal,{initialtab:3},null);if(options){if(options.target){insert(options.target,this,options.anchor);}if(options.props){this.$set(options.props);flush();}}}static get observedAttributes(){return ["initialtab"];}get initialtab(){return this.$$.ctx[3];}set initialtab(initialtab){this.$$set({initialtab});flush();}}customElements.define("goa-tabs",Tabs);
1540
-
1541
- const GoADatePicker = ({
1542
- name,
1543
- value,
1544
- min,
1545
- max,
1546
- mt,
1547
- mr,
1548
- mb,
1549
- ml,
1550
- onChange
1551
- }) => {
1552
- const ref = useRef(null);
1553
- useEffect(() => {
1554
- if (!ref.current) {
1555
- return;
1556
- }
1557
-
1558
- const current = ref.current;
1559
- current.addEventListener("_change", e => {
1560
- onChange(name || "", e.detail.value);
1561
- });
1562
- });
1563
- return jsx("goa-date-picker", {
1564
- ref: ref,
1565
- name: name,
1566
- value: value === null || value === void 0 ? void 0 : value.toISOString(),
1567
- min: min === null || min === void 0 ? void 0 : min.toISOString(),
1568
- max: max === null || max === void 0 ? void 0 : max.toISOString(),
1569
- mt: mt,
1570
- mr: mr,
1571
- mb: mb,
1572
- ml: ml
1573
- }, void 0);
1574
- };
1575
-
1576
- const GoACalendar = ({
1577
- name,
1578
- value,
1579
- min,
1580
- max,
1581
- mt,
1582
- mr,
1583
- mb,
1584
- ml,
1585
- onChange
1586
- }) => {
1587
- const ref = useRef(null);
1588
- useEffect(() => {
1589
- if (!ref.current) {
1590
- return;
1591
- }
1592
-
1593
- const current = ref.current;
1594
- current.addEventListener("_change", e => {
1595
- onChange(name || "", e.detail.value);
1596
- });
1597
- });
1598
- return jsx("goa-calendar", {
1599
- ref: ref,
1600
- name: name,
1601
- value: value === null || value === void 0 ? void 0 : value.toISOString(),
1602
- min: min === null || min === void 0 ? void 0 : min.toISOString(),
1603
- max: max === null || max === void 0 ? void 0 : max.toISOString(),
1604
- mt: mt,
1605
- mr: mr,
1606
- mb: mb,
1607
- ml: ml
1608
- }, void 0);
1609
- };
1610
-
1611
- function GoASideMenuGroup(props) {
1612
- return jsx("goa-side-menu-group", Object.assign({
1613
- heading: props.heading
1614
- }, {
1615
- children: props.children
1616
- }), void 0);
1617
- }
1618
-
1619
- function GoASideMenuHeading(props) {
1620
- return jsxs("goa-side-menu-heading", Object.assign({
1621
- icon: props.icon
1622
- }, {
1623
- children: [props.children, props.meta && jsx("span", Object.assign({
1624
- slot: "meta"
1625
- }, {
1626
- children: props.meta
1627
- }), void 0)]
1628
- }), void 0);
1629
- }
1630
-
1631
- function GoASideMenu(props) {
1632
- return jsx("goa-side-menu", {
1633
- children: props.children
1634
- }, void 0);
1635
- }
1636
-
1637
- function GoAAppHeaderMenu(props) {
1638
- return jsx("goa-app-header-menu", Object.assign({
1639
- heading: props.heading,
1640
- leadingicon: props.leadingIcon
1641
- }, {
1642
- children: props.children
1643
- }), void 0);
1644
- }
1645
-
1646
- function GoAPages(props) {
1647
- return jsx("goa-pages", Object.assign({
1648
- current: props.current,
1649
- ml: props.ml,
1650
- mr: props.mr,
1651
- mt: props.mt,
1652
- mb: props.mb
1653
- }, {
1654
- children: props.children
1655
- }), void 0);
1656
- }
1657
-
1658
- function GoAFileUploadCard({
1659
- filename,
1660
- size,
1661
- type,
1662
- progress,
1663
- error,
1664
- onDelete,
1665
- onCancel
1666
- }) {
1667
- const el = useRef(null);
1668
- useEffect(() => {
1669
- if (!el.current) return;
1670
- const current = el.current;
1671
-
1672
- const deleteHandler = () => onDelete === null || onDelete === void 0 ? void 0 : onDelete();
1673
-
1674
- const cancelHandler = () => onCancel === null || onCancel === void 0 ? void 0 : onCancel();
1675
-
1676
- current.addEventListener("_delete", deleteHandler);
1677
- current.addEventListener("_cancel", cancelHandler);
1678
- return () => {
1679
- current.removeEventListener("_delete", deleteHandler);
1680
- current.removeEventListener("_cancel", cancelHandler);
1681
- };
1682
- }, [el, onDelete, onCancel]);
1683
- return jsx("goa-file-upload-card", {
1684
- ref: el,
1685
- filename: filename,
1686
- size: size,
1687
- type: type,
1688
- progress: progress,
1689
- error: error
1690
- }, void 0);
1691
- }
1692
-
1693
- function GoAFileUploadInput({
1694
- variant,
1695
- accept,
1696
- maxFileSize,
1697
- onSelectFile
1698
- }) {
1699
- const el = useRef(null);
1700
- useEffect(() => {
1701
- if (!el.current) return;
1702
- const current = el.current;
1703
-
1704
- const handler = e => {
1705
- onSelectFile(e.detail.file);
1706
- };
1707
-
1708
- current.addEventListener("_selectFile", handler);
1709
- return () => {
1710
- current.removeEventListener("_selectFile", handler);
1711
- };
1712
- }, [el, onSelectFile]);
1713
- return jsx("goa-file-upload-input", {
1714
- ref: el,
1715
- variant: variant,
1716
- accept: accept,
1717
- maxfilesize: maxFileSize
1718
- }, void 0);
1719
- }
1720
-
1721
- const GoAAccordion = ({
1722
- open,
1723
- heading,
1724
- headingSize,
1725
- secondaryText,
1726
- headingContent,
1727
- testid,
1728
- children,
1729
- mt,
1730
- mr,
1731
- mb,
1732
- ml
1733
- }) => {
1734
- return jsxs("goa-accordion", Object.assign({
1735
- open: open,
1736
- headingSize: headingSize,
1737
- heading: heading,
1738
- secondaryText: secondaryText,
1739
- "data-testid": testid,
1740
- mt: mt,
1741
- mr: mr,
1742
- mb: mb,
1743
- ml: ml
1744
- }, {
1745
- children: [headingContent && jsx("div", Object.assign({
1746
- slot: "headingcontent"
1747
- }, {
1748
- children: headingContent
1749
- }), void 0), children]
1750
- }), void 0);
1751
- };
1752
-
1753
- function GoAFormStep(props) {
1754
- return jsx("goa-form-step", {
1755
- text: props.text,
1756
- status: props.status
1757
- }, void 0);
1758
- }
1759
-
1760
- function GoAFormStepper({
1761
- testId,
1762
- step,
1763
- mt,
1764
- mb,
1765
- ml,
1766
- mr,
1767
- onChange,
1768
- children
1769
- }) {
1770
- const ref = useRef(null);
1771
- useEffect(() => {
1772
- if (!ref.current) {
1773
- return;
1774
- }
1775
-
1776
- const current = ref.current;
1777
-
1778
- const changeListener = e => {
1779
- const {
1780
- step
1781
- } = e.detail;
1782
- onChange === null || onChange === void 0 ? void 0 : onChange(+step);
1783
- };
1784
-
1785
- current.addEventListener("_change", changeListener);
1786
- return () => {
1787
- current.removeEventListener("_change", changeListener);
1788
- };
1789
- }, [ref, onChange]);
1790
- return jsx("goa-form-stepper", Object.assign({
1791
- ref: ref,
1792
- "data-testid": testId,
1793
- step: step,
1794
- mt: mt,
1795
- mr: mr,
1796
- mb: mb,
1797
- ml: ml
1798
- }, {
1799
- children: children
1800
- }), void 0);
1801
- }
1802
-
1803
- const GoAAppHeader = ({
1804
- heading,
1805
- url,
1806
- maxContentWidth,
1807
- testId,
1808
- children
1809
- }) => {
1810
- return jsx("goa-app-header", Object.assign({
1811
- heading: heading,
1812
- url: url,
1813
- maxcontentwidth: maxContentWidth,
1814
- "data-testid": testId
1815
- }, {
1816
- children: children
1817
- }), void 0);
1818
- };
1819
-
1820
- const GoABadge = ({
1821
- type,
1822
- content,
1823
- icon,
1824
- testId,
1825
- mt,
1826
- mr,
1827
- mb,
1828
- ml,
1829
- ariaLabel
1830
- }) => {
1831
- return jsx("goa-badge", {
1832
- type: type,
1833
- content: content,
1834
- icon: icon,
1835
- "data-testid": testId,
1836
- arialabel: ariaLabel,
1837
- mt: mt,
1838
- mr: mr,
1839
- mb: mb,
1840
- ml: ml
1841
- }, void 0);
1842
- };
1843
- /**
1844
- * @deprecated
1845
- */
1846
-
1847
- const GoAInfoBadge = ({
1848
- content,
1849
- testId,
1850
- icon,
1851
- mt,
1852
- mr,
1853
- mb,
1854
- ml,
1855
- ariaLabel
1856
- }) => {
1857
- return jsx(GoABadge, {
1858
- type: "information",
1859
- icon: icon,
1860
- content: content,
1861
- testId: testId,
1862
- ariaLabel: ariaLabel,
1863
- mt: mt,
1864
- mr: mr,
1865
- mb: mb,
1866
- ml: ml
1867
- }, void 0);
1868
- };
1869
- /**
1870
- * @deprecated
1871
- */
1872
-
1873
- const GoASuccessBadge = ({
1874
- content,
1875
- testId,
1876
- icon,
1877
- mt,
1878
- mr,
1879
- mb,
1880
- ml,
1881
- ariaLabel
1882
- }) => {
1883
- return jsx(GoABadge, {
1884
- type: "success",
1885
- icon: icon,
1886
- content: content,
1887
- ariaLabel: ariaLabel,
1888
- testId: testId,
1889
- mt: mt,
1890
- mr: mr,
1891
- mb: mb,
1892
- ml: ml
1893
- }, void 0);
1894
- };
1895
- /**
1896
- * @deprecated
1897
- */
1898
-
1899
- const GoAImportantBadge = ({
1900
- content,
1901
- testId,
1902
- icon,
1903
- mt,
1904
- mr,
1905
- mb,
1906
- ml,
1907
- ariaLabel
1908
- }) => {
1909
- return jsx(GoABadge, {
1910
- type: "important",
1911
- icon: icon,
1912
- content: content,
1913
- testId: testId,
1914
- ariaLabel: ariaLabel,
1915
- mt: mt,
1916
- mr: mr,
1917
- mb: mb,
1918
- ml: ml
1919
- }, void 0);
1920
- };
1921
- /**
1922
- * @deprecated
1923
- */
1924
-
1925
- const GoAEmergencyBadge = ({
1926
- content,
1927
- testId,
1928
- icon,
1929
- mt,
1930
- mr,
1931
- mb,
1932
- ml,
1933
- ariaLabel
1934
- }) => {
1935
- return jsx(GoABadge, {
1936
- type: "emergency",
1937
- icon: icon,
1938
- content: content,
1939
- testId: testId,
1940
- ariaLabel: ariaLabel,
1941
- mt: mt,
1942
- mr: mr,
1943
- mb: mb,
1944
- ml: ml
1945
- }, void 0);
1946
- };
1947
-
1948
- function GoABlock(props) {
1949
- return jsx("goa-block", Object.assign({
1950
- gap: props.gap,
1951
- direction: props.direction,
1952
- alignment: props.alignment,
1953
- mt: props.mt,
1954
- mr: props.mr,
1955
- mb: props.mb,
1956
- ml: props.ml,
1957
- "data-testid": props.testId
1958
- }, {
1959
- children: props.children
1960
- }), void 0);
1961
- }
1962
-
1963
- const GoAButtonGroup = ({
1964
- alignment,
1965
- gap,
1966
- testId,
1967
- children,
1968
- mt,
1969
- mr,
1970
- mb,
1971
- ml
1972
- }) => {
1973
- return jsx("goa-button-group", Object.assign({
1974
- alignment: alignment,
1975
- gap: gap,
1976
- mt: mt,
1977
- mr: mr,
1978
- mb: mb,
1979
- ml: ml,
1980
- "data-testid": testId
1981
- }, {
1982
- children: children
1983
- }), void 0);
1984
- };
1985
-
1986
- const GoAButton = ({
1987
- disabled: _disabled = false,
1988
- type: _type = "primary",
1989
- size,
1990
- variant,
1991
- leadingIcon,
1992
- trailingIcon,
1993
- testId,
1994
- children,
1995
- onClick,
1996
- mt,
1997
- mr,
1998
- mb,
1999
- ml
2000
- }) => {
2001
- const el = useRef(null);
2002
- useEffect(() => {
2003
- if (!el.current) {
2004
- return;
2005
- }
2006
-
2007
- if (!onClick) {
2008
- return;
2009
- }
2010
-
2011
- const current = el.current;
2012
-
2013
- const listener = () => {
2014
- onClick();
2015
- };
2016
-
2017
- current.addEventListener("_click", listener);
2018
- return () => {
2019
- current.removeEventListener("_click", listener);
2020
- };
2021
- }, [el, onClick]);
2022
- return jsx("goa-button", Object.assign({
2023
- ref: el,
2024
- type: _type,
2025
- size: size,
2026
- variant: variant,
2027
- disabled: _disabled,
2028
- leadingicon: leadingIcon,
2029
- trailingicon: trailingIcon,
2030
- "data-testid": testId,
2031
- mt: mt,
2032
- mr: mr,
2033
- mb: mb,
2034
- ml: ml
2035
- }, {
2036
- children: children
2037
- }), void 0);
2038
- };
2039
-
2040
- const GoACallout = ({
2041
- heading,
2042
- type: _type = "information",
2043
- size: _size = "large",
2044
- testId,
2045
- children,
2046
- mt,
2047
- mr,
2048
- mb,
2049
- ml
2050
- }) => {
2051
- return jsx("goa-callout", Object.assign({
2052
- heading: heading,
2053
- type: _type,
2054
- size: _size,
2055
- mt: mt,
2056
- mr: mr,
2057
- mb: mb,
2058
- ml: ml,
2059
- "data-testid": testId
2060
- }, {
2061
- children: children
2062
- }), void 0);
2063
- };
2064
-
2065
- const GoACheckbox = ({
2066
- id,
2067
- name,
2068
- testId,
2069
- error,
2070
- disabled,
2071
- checked,
2072
- value,
2073
- text,
2074
- description,
2075
- children,
2076
- onChange,
2077
- ariaLabel,
2078
- mt,
2079
- mr,
2080
- mb,
2081
- ml
2082
- }) => {
2083
- const el = useRef(null);
2084
- useEffect(() => {
2085
- if (!el.current) {
2086
- return;
2087
- }
2088
-
2089
- const current = el.current;
2090
-
2091
- const listener = e => {
2092
- const ce = e;
2093
- onChange === null || onChange === void 0 ? void 0 : onChange(name, ce.detail.checked, ce.detail.value);
2094
- };
2095
-
2096
- current.addEventListener("_change", listener);
2097
- return () => {
2098
- current.removeEventListener("_change", listener);
2099
- };
2100
- }, [name, onChange]);
2101
- return jsx("goa-checkbox", Object.assign({
2102
- "data-testid": testId,
2103
- ref: el,
2104
- id: id,
2105
- name: name,
2106
- error: error,
2107
- checked: checked,
2108
- disabled: disabled,
2109
- text: text,
2110
- value: value,
2111
- arialabel: ariaLabel,
2112
- description: description,
2113
- mt: mt,
2114
- mr: mr,
2115
- mb: mb,
2116
- ml: ml
2117
- }, {
2118
- children: children
2119
- }), void 0);
2120
- };
2121
-
2122
- const GoAChip = ({
2123
- leadingIcon: _leadingIcon = "",
2124
- deletable: _deletable = false,
2125
- error: _error = false,
2126
- variant,
2127
- content,
2128
- onClick,
2129
- mt,
2130
- mr,
2131
- mb,
2132
- ml,
2133
- testId
2134
- }) => {
2135
- const el = useRef(null);
2136
- useEffect(() => {
2137
- if (!el.current) return;
2138
- if (!onClick) return;
2139
- const current = el.current;
2140
-
2141
- const listener = () => {
2142
- onClick();
2143
- };
2144
-
2145
- current.addEventListener("_click", listener);
2146
- return () => {
2147
- current.removeEventListener("_click", listener);
2148
- };
2149
- }, [el, onClick]);
2150
- return jsx("goa-chip", {
2151
- ref: el,
2152
- leadingicon: _leadingIcon,
2153
- error: _error,
2154
- deletable: _deletable,
2155
- content: content,
2156
- variant: variant,
2157
- mt: mt,
2158
- mr: mr,
2159
- mb: mb,
2160
- ml: ml,
2161
- "data-testid": testId
2162
- }, void 0);
2163
- };
2164
-
2165
- const GoACircularProgress = ({
2166
- visible,
2167
- message,
2168
- progress,
2169
- variant,
2170
- size,
2171
- testId
2172
- }) => {
2173
- return jsx("goa-circular-progress", {
2174
- visible: visible ? "true" : "false",
2175
- message: message,
2176
- progress: progress,
2177
- variant: variant,
2178
- size: size,
2179
- "data-testid": testId
2180
- }, void 0);
2181
- };
2182
-
2183
- const GoAContainer = ({
2184
- accent,
2185
- heading,
2186
- title,
2187
- padding,
2188
- children,
2189
- actions,
2190
- type,
2191
- mt,
2192
- mr,
2193
- mb,
2194
- ml,
2195
- testId
2196
- }) => {
2197
- const headingContent = heading || title;
2198
- return jsxs("goa-container", Object.assign({
2199
- type: type,
2200
- padding: padding,
2201
- accent: accent,
2202
- mt: mt,
2203
- mr: mr,
2204
- mb: mb,
2205
- ml: ml,
2206
- "data-testid": testId
2207
- }, {
2208
- children: [headingContent && jsx("div", Object.assign({
2209
- slot: "title"
2210
- }, {
2211
- children: headingContent
2212
- }), void 0), children, actions && jsx("div", Object.assign({
2213
- slot: "actions"
2214
- }, {
2215
- children: actions
2216
- }), void 0)]
2217
- }), void 0);
2218
- };
2219
-
2220
- function GoADetails(props) {
2221
- return jsx("goa-details", Object.assign({
2222
- heading: props.heading,
2223
- open: props.open,
2224
- mt: props.mt,
2225
- mr: props.mr,
2226
- mb: props.mb,
2227
- ml: props.ml
2228
- }, {
2229
- children: props.children
2230
- }), void 0);
2231
- }
2232
-
2233
- function GoADivider(props) {
2234
- return jsx("goa-divider", {
2235
- mt: props.mt,
2236
- mr: props.mr,
2237
- mb: props.mb,
2238
- ml: props.ml,
2239
- "data-testid": props.testId
2240
- }, void 0);
2241
- }
2242
-
2243
- function stringify(value) {
2244
- if (typeof value === "undefined") {
2245
- return "";
2246
- }
2247
-
2248
- if (typeof value === "string") {
2249
- return value;
2250
- }
2251
-
2252
- return JSON.stringify(value);
2253
- }
2254
-
2255
- const GoADropdown = props => {
2256
- const el = useRef(null);
2257
- useEffect(() => {
2258
- if (!el.current) {
2259
- return;
2260
- }
2261
-
2262
- const current = el.current;
2263
-
2264
- const handler = e => {
2265
- const {
2266
- name,
2267
- value,
2268
- values
2269
- } = e.detail;
2270
- props.onChange(name, props.multiselect ? values : value);
2271
- };
2272
-
2273
- current.addEventListener("_change", handler);
2274
- return () => {
2275
- current.removeEventListener("_change", handler);
2276
- };
2277
- }, [el, props]);
2278
- return jsx("goa-dropdown", Object.assign({
2279
- ref: el,
2280
- name: props.name,
2281
- value: stringify(props.value),
2282
- arialabel: props.ariaLabel,
2283
- arialabelledby: props.ariaLabelledBy,
2284
- disabled: props.disabled,
2285
- error: props.error,
2286
- filterable: props.filterable,
2287
- leadingicon: props.leadingIcon,
2288
- maxheight: props.maxHeight,
2289
- mb: props.mb,
2290
- ml: props.ml,
2291
- mr: props.mr,
2292
- mt: props.mt,
2293
- multiselect: props.multiselect,
2294
- native: props.native,
2295
- placeholder: props.placeholder,
2296
- "data-testid": props.testId,
2297
- width: props.width,
2298
- relative: props.relative,
2299
- id: props.id
2300
- }, {
2301
- children: props.children
2302
- }), void 0);
2303
- };
2304
-
2305
- function GoADropdownOption(props) {
2306
- useEffect(() => {
2307
- console.warn("GoADropdownOption is deprecated. Please use GoADropdownItem");
2308
- }, []);
2309
- return jsx(GoADropdownItem, Object.assign({}, props), void 0);
2310
- }
2311
- function GoADropdownItem({
2312
- value,
2313
- label,
2314
- filter,
2315
- name,
2316
- testId
2317
- }) {
2318
- return jsx("goa-dropdown-item", {
2319
- "data-testid": testId,
2320
- value: value,
2321
- label: label,
2322
- filter: filter,
2323
- name: name
2324
- }, void 0);
2325
- }
2326
-
2327
- function GoAAppFooterMetaSection({
2328
- children
2329
- }) {
2330
- return jsx("goa-app-footer-meta-section", Object.assign({
2331
- slot: "meta"
2332
- }, {
2333
- children: children
2334
- }), void 0);
2335
- }
2336
-
2337
- function GoAAppFooterNavSection({
2338
- heading,
2339
- maxColumnCount = 1,
2340
- testId,
2341
- children
2342
- }) {
2343
- return jsx("goa-app-footer-nav-section", Object.assign({
2344
- slot: "nav",
2345
- heading: heading,
2346
- maxcolumncount: maxColumnCount,
2347
- "data-testid": testId
2348
- }, {
2349
- children: children
2350
- }), void 0);
2351
- }
2352
-
2353
- function GoAAppFooter({
2354
- maxContentWidth,
2355
- children,
2356
- testId
2357
- }) {
2358
- return jsx("goa-app-footer", Object.assign({
2359
- maxcontentwidth: maxContentWidth,
2360
- "data-testid": testId
2361
- }, {
2362
- children: children
2363
- }), void 0);
2364
- }
2365
-
2366
- const GoAFormItem = ({
2367
- children,
2368
- helpText,
2369
- error,
2370
- requirement,
2371
- label,
2372
- labelSize,
2373
- mt,
2374
- mr,
2375
- mb,
2376
- ml,
2377
- testId,
2378
- id
2379
- }) => {
2380
- return jsx("goa-form-item", Object.assign({
2381
- label: label,
2382
- labelsize: labelSize,
2383
- error: error,
2384
- requirement: requirement,
2385
- helptext: helpText,
2386
- mt: mt,
2387
- mr: mr,
2388
- mb: mb,
2389
- ml: ml,
2390
- "data-testid": testId,
2391
- id: id
2392
- }, {
2393
- children: children
2394
- }), void 0);
2395
- };
2396
-
2397
- const GoAGrid = ({
2398
- gap,
2399
- minChildWidth,
2400
- mt,
2401
- mr,
2402
- mb,
2403
- ml,
2404
- testId,
2405
- children
2406
- }) => {
2407
- return jsx("goa-grid", Object.assign({
2408
- gap: gap,
2409
- mt: mt,
2410
- minchildwidth: minChildWidth,
2411
- mr: mr,
2412
- mb: mb,
2413
- ml: ml,
2414
- "data-testid": testId
2415
- }, {
2416
- children: children
2417
- }), void 0);
2418
- };
2419
-
2420
- const GoAHeroBanner = ({
2421
- heading,
2422
- backgroundUrl,
2423
- minHeight,
2424
- maxContentWidth,
2425
- backgroundColor,
2426
- textColor,
2427
- children,
2428
- testId
2429
- }) => {
2430
- return jsx("goa-hero-banner", Object.assign({
2431
- heading: heading,
2432
- backgroundurl: backgroundUrl,
2433
- minheight: minHeight,
2434
- maxcontentwidth: maxContentWidth,
2435
- backgroundcolor: backgroundColor,
2436
- textcolor: textColor,
2437
- "data-testid": testId
2438
- }, {
2439
- children: children
2440
- }), void 0);
2441
- };
2442
-
2443
- const GoAHeroBannerActions = ({
2444
- children
2445
- }) => {
2446
- return jsx("div", Object.assign({
2447
- slot: "actions"
2448
- }, {
2449
- children: children
2450
- }), void 0);
2451
- };
2452
-
2453
- const GoAIconButton = ({
2454
- icon,
2455
- disabled,
2456
- variant: _variant = "color",
2457
- onClick,
2458
- size: _size = "medium",
2459
- title,
2460
- testId,
2461
- children,
2462
- mt,
2463
- mr,
2464
- mb,
2465
- ml
2466
- }) => {
2467
- const ref = useRef(null);
2468
- useEffect(() => {
2469
- if (!ref.current) {
2470
- return;
2471
- }
2472
-
2473
- if (!onClick) {
2474
- return;
2475
- }
2476
-
2477
- const current = ref.current;
2478
-
2479
- const listener = () => {
2480
- onClick();
2481
- };
2482
-
2483
- current.addEventListener("_click", listener);
2484
- return () => {
2485
- current.removeEventListener("_click", listener);
2486
- };
2487
- }, [ref, onClick]);
2488
- return jsx("goa-icon-button", Object.assign({
2489
- ref: ref,
2490
- icon: icon,
2491
- disabled: disabled,
2492
- variant: _variant,
2493
- size: _size,
2494
- title: title,
2495
- mt: mt,
2496
- mr: mr,
2497
- mb: mb,
2498
- ml: ml,
2499
- "data-testid": testId
2500
- }, {
2501
- children: children
2502
- }), void 0);
2503
- };
2504
-
2505
- function GoAIcon({
2506
- type,
2507
- theme,
2508
- size,
2509
- mt,
2510
- mr,
2511
- mb,
2512
- ml,
2513
- testId
2514
- }) {
2515
- return jsx("goa-icon", {
2516
- type: type,
2517
- theme: theme,
2518
- size: size,
2519
- mt: mt,
2520
- mr: mr,
2521
- mb: mb,
2522
- ml: ml,
2523
- "data-testid": testId
2524
- }, void 0);
2525
- }
2526
-
2527
- /*! *****************************************************************************
2528
- Copyright (c) Microsoft Corporation.
2529
-
2530
- Permission to use, copy, modify, and/or distribute this software for any
2531
- purpose with or without fee is hereby granted.
2532
-
2533
- THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
2534
- REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
2535
- AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
2536
- INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
2537
- LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
2538
- OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
2539
- PERFORMANCE OF THIS SOFTWARE.
2540
- ***************************************************************************** */
2541
-
2542
- function __rest(s, e) {
2543
- var t = {};
2544
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
2545
- t[p] = s[p];
2546
- if (s != null && typeof Object.getOwnPropertySymbols === "function")
2547
- for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
2548
- if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
2549
- t[p[i]] = s[p[i]];
2550
- }
2551
- return t;
2552
- }
2553
-
2554
- const GoAInput = ({
2555
- id,
2556
- debounce,
2557
- name,
2558
- type,
2559
- autoCapitalize,
2560
- leadingIcon,
2561
- trailingIcon,
2562
- variant: _variant = "goa",
2563
- focused,
2564
- disabled,
2565
- readonly,
2566
- value,
2567
- placeholder,
2568
- error,
2569
- width,
2570
- testId,
2571
- min,
2572
- max,
2573
- step,
2574
- prefix,
2575
- suffix,
2576
- ariaLabel,
2577
- mt,
2578
- mr,
2579
- mb,
2580
- ml,
2581
- leadingContent,
2582
- trailingContent,
2583
- maxLength,
2584
- onTrailingIconClick,
2585
- onChange,
2586
- onFocus,
2587
- onBlur
2588
- }) => {
2589
- const ref = useRef(null);
2590
- useEffect(() => {
2591
- if (!ref.current) {
2592
- return;
2593
- }
2594
-
2595
- const current = ref.current;
2596
-
2597
- const changeListener = e => {
2598
- const {
2599
- name,
2600
- value
2601
- } = e.detail;
2602
- onChange(name, value);
2603
- };
2604
-
2605
- const clickListener = () => {
2606
- onTrailingIconClick === null || onTrailingIconClick === void 0 ? void 0 : onTrailingIconClick();
2607
- };
2608
-
2609
- const focusListener = e => {
2610
- const {
2611
- name,
2612
- value
2613
- } = e.detail;
2614
- onFocus === null || onFocus === void 0 ? void 0 : onFocus(name, value);
2615
- };
2616
-
2617
- const blurListener = e => {
2618
- const {
2619
- name,
2620
- value
2621
- } = e.detail;
2622
- onBlur === null || onBlur === void 0 ? void 0 : onBlur(name, value);
2623
- };
2624
-
2625
- current.addEventListener("_change", changeListener);
2626
- current.addEventListener("_trailingIconClick", clickListener);
2627
- current.addEventListener("_focus", focusListener);
2628
- current.addEventListener("_blur", blurListener);
2629
- return () => {
2630
- current.removeEventListener("_change", changeListener);
2631
- current.removeEventListener("_trailingIconClick", clickListener);
2632
- current.removeEventListener("_focus", focusListener);
2633
- current.removeEventListener("_blur", blurListener);
2634
- };
2635
- }, [ref, onChange, onTrailingIconClick, onFocus, onBlur]);
2636
- return jsxs("goa-input", Object.assign({
2637
- ref: ref,
2638
- debounce: debounce,
2639
- focused: focused,
2640
- type: type,
2641
- name: name,
2642
- autocapitalize: autoCapitalize,
2643
- id: id,
2644
- leadingicon: leadingIcon,
2645
- trailingicon: trailingIcon,
2646
- variant: _variant,
2647
- disabled: disabled,
2648
- readonly: readonly,
2649
- placeholder: placeholder,
2650
- error: error,
2651
- "data-testid": testId,
2652
- value: value,
2653
- width: width,
2654
- min: min,
2655
- max: max,
2656
- step: step,
2657
- maxlength: maxLength,
2658
- prefix: prefix,
2659
- suffix: suffix,
2660
- arialabel: ariaLabel,
2661
- mt: mt,
2662
- mr: mr,
2663
- mb: mb,
2664
- ml: ml,
2665
- handletrailingiconclick: !!onTrailingIconClick
2666
- }, {
2667
- children: [leadingContent && jsx("div", Object.assign({
2668
- slot: "leadingContent"
2669
- }, {
2670
- children: leadingContent
2671
- }), void 0), trailingContent && jsx("div", Object.assign({
2672
- slot: "trailingContent"
2673
- }, {
2674
- children: trailingContent
2675
- }), void 0)]
2676
- }), void 0);
2677
- };
2678
-
2679
- const onDateChangeHandler = onChange => {
2680
- return (name, value) => {
2681
- if (!value) {
2682
- onChange(name, "");
2683
- return;
2684
- }
2685
-
2686
- if (isValid$1(new Date(value))) {
2687
- onChange(name, parseISO(value));
2688
- }
2689
- };
2690
- };
2691
-
2692
- const onTimeChangeHandler = onChange => {
2693
- return (name, value) => {
2694
- if (!value) {
2695
- onChange(name, "");
2696
- return;
2697
- }
2698
-
2699
- onChange(name, value);
2700
- };
2701
- };
2702
-
2703
- function toString(value, tmpl = "yyyy-MM-dd") {
2704
- if (!value) {
2705
- return "";
2706
- }
2707
-
2708
- if (typeof value === "string") {
2709
- return format$1(parseISO(value), tmpl);
2710
- }
2711
-
2712
- if (value.toISOString() === new Date(0).toISOString()) {
2713
- return "";
2714
- }
2715
-
2716
- return format$1(value, tmpl);
2717
- }
2718
-
2719
- const GoAInputText = props => {
2720
- return jsx(GoAInput, Object.assign({}, props, {
2721
- type: "text"
2722
- }), void 0);
2723
- };
2724
- const GoAInputPassword = props => {
2725
- return jsx(GoAInput, Object.assign({}, props, {
2726
- type: "password"
2727
- }), void 0);
2728
- };
2729
- const GoAInputDate = _a => {
2730
- var {
2731
- value,
2732
- min = "",
2733
- max = ""
2734
- } = _a,
2735
- props = __rest(_a, ["value", "min", "max"]);
2736
-
2737
- return jsx(GoAInput, Object.assign({}, props, {
2738
- type: "date",
2739
- onChange: onDateChangeHandler(props.onChange),
2740
- min: toString(min),
2741
- max: toString(max),
2742
- value: toString(value)
2743
- }), void 0);
2744
- };
2745
- const GoAInputTime = _a => {
2746
- var {
2747
- value,
2748
- min = "",
2749
- max = ""
2750
- } = _a,
2751
- props = __rest(_a, ["value", "min", "max"]);
2752
-
2753
- return jsx(GoAInput, Object.assign({}, props, {
2754
- onChange: onTimeChangeHandler(props.onChange),
2755
- value: value,
2756
- type: "time"
2757
- }), void 0);
2758
- };
2759
- const GoAInputDateTime = _a => {
2760
- var {
2761
- value,
2762
- min = "",
2763
- max = ""
2764
- } = _a,
2765
- props = __rest(_a, ["value", "min", "max"]);
2766
-
2767
- return jsx(GoAInput, Object.assign({}, props, {
2768
- onChange: onDateChangeHandler(props.onChange),
2769
- value: toString(value, "yyyy-MM-dd'T'HH:mm"),
2770
- type: "datetime-local"
2771
- }), void 0);
2772
- };
2773
- const GoAInputEmail = props => {
2774
- return jsx(GoAInput, Object.assign({}, props, {
2775
- type: "email"
2776
- }), void 0);
2777
- };
2778
- const GoAInputSearch = props => {
2779
- return jsx(GoAInput, Object.assign({}, props, {
2780
- type: "search",
2781
- trailingIcon: "search"
2782
- }), void 0);
2783
- };
2784
- const GoAInputUrl = props => {
2785
- return jsx(GoAInput, Object.assign({}, props, {
2786
- type: "url"
2787
- }), void 0);
2788
- };
2789
- const GoAInputTel = props => {
2790
- return jsx(GoAInput, Object.assign({}, props, {
2791
- type: "tel"
2792
- }), void 0);
2793
- };
2794
- const GoAInputFile = props => {
2795
- return jsx("input", {
2796
- id: props.id,
2797
- name: props.name,
2798
- type: "file",
2799
- onChange: e => props.onChange(e.target.name, e.target.value),
2800
- style: {
2801
- backgroundColor: "revert"
2802
- }
2803
- }, void 0);
2804
- };
2805
- const GoAInputMonth = props => {
2806
- return jsx(GoAInput, Object.assign({}, props, {
2807
- type: "month"
2808
- }), void 0);
2809
- };
2810
- const GoAInputNumber = _a => {
2811
- var {
2812
- min = Number.MIN_VALUE,
2813
- max = Number.MAX_VALUE,
2814
- value
2815
- } = _a,
2816
- props = __rest(_a, ["min", "max", "value"]);
2817
-
2818
- const onNumberChange = (name, value) => {
2819
- props.onChange(name, parseInt(value));
2820
- };
2821
-
2822
- const onFocus = (name, value) => {
2823
- var _a;
2824
-
2825
- (_a = props.onFocus) === null || _a === void 0 ? void 0 : _a.call(props, name, parseInt(value));
2826
- };
2827
-
2828
- const onBlur = (name, value) => {
2829
- var _a;
2830
-
2831
- (_a = props.onBlur) === null || _a === void 0 ? void 0 : _a.call(props, name, parseInt(value));
2832
- };
2833
-
2834
- return jsx(GoAInput, Object.assign({}, props, {
2835
- onChange: onNumberChange,
2836
- min: min === null || min === void 0 ? void 0 : min.toString(),
2837
- max: max === null || max === void 0 ? void 0 : max.toString(),
2838
- value: value.toString(),
2839
- onFocus: onFocus,
2840
- onBlur: onBlur,
2841
- type: "number"
2842
- }), void 0);
2843
- };
2844
- const GoAInputRange = props => {
2845
- return jsx(GoAInput, Object.assign({}, props, {
2846
- type: "range"
2847
- }), void 0);
2848
- };
2849
-
2850
- const GoAMicrositeHeader = ({
2851
- type,
2852
- version,
2853
- feedbackUrl,
2854
- maxContentWidth,
2855
- feedbackUrlTarget,
2856
- headerUrlTarget,
2857
- testId
2858
- }) => {
2859
- return jsx("goa-microsite-header", {
2860
- type: type,
2861
- version: version,
2862
- feedbackurl: feedbackUrl,
2863
- "data-testid": testId,
2864
- maxcontentwidth: maxContentWidth,
2865
- feedbackurltarget: feedbackUrlTarget,
2866
- headerurltarget: headerUrlTarget
2867
- }, void 0);
2868
- };
2869
-
2870
- const GoAModal = ({
2871
- heading,
2872
- children,
2873
- maxWidth,
2874
- open,
2875
- actions,
2876
- transition,
2877
- type,
2878
- calloutVariant,
2879
- onClose,
2880
- testId,
2881
- width
2882
- }) => {
2883
- const el = useRef(null); // deprecation
2884
-
2885
- useEffect(() => {
2886
- if (type) {
2887
- console.warn("GoAModal [type] is deprecated.");
2888
- }
2889
- }, [type]); // deprecation
2890
-
2891
- useEffect(() => {
2892
- maxWidth = width;
2893
- }, [width]);
2894
- useEffect(() => {
2895
- if (!el.current) {
2896
- return;
2897
- }
2898
-
2899
- const current = el.current;
2900
-
2901
- const listener = () => {
2902
- onClose === null || onClose === void 0 ? void 0 : onClose();
2903
- };
2904
-
2905
- current.addEventListener("_close", listener);
2906
- return () => {
2907
- current.removeEventListener("_close", listener);
2908
- };
2909
- }, [el, onClose]);
2910
- return jsxs("goa-modal", Object.assign({
2911
- ref: el,
2912
- open: open,
2913
- closable: !!onClose,
2914
- maxwidth: maxWidth,
2915
- transition: transition,
2916
- calloutVariant: calloutVariant,
2917
- "data-testid": testId
2918
- }, {
2919
- children: [heading && jsx("div", Object.assign({
2920
- slot: "heading"
2921
- }, {
2922
- children: heading
2923
- }), void 0), actions && jsx("div", Object.assign({
2924
- slot: "actions"
2925
- }, {
2926
- children: actions
2927
- }), void 0), children]
2928
- }), void 0);
2929
- };
2930
-
2931
- const GoANotification = ({
2932
- type: _type = "information",
2933
- ariaLive,
2934
- maxContentWidth,
2935
- children,
2936
- testId,
2937
- onDismiss
2938
- }) => {
2939
- const el = useRef(null);
2940
- useEffect(() => {
2941
- if (!el.current) {
2942
- return;
2943
- }
2944
-
2945
- const current = el.current;
2946
-
2947
- const listener = () => {
2948
- onDismiss === null || onDismiss === void 0 ? void 0 : onDismiss();
2949
- };
2950
-
2951
- current.addEventListener("_dismiss", listener);
2952
- return () => {
2953
- current.removeEventListener("_dismiss", listener);
2954
- };
2955
- }, [el, onDismiss]);
2956
- return jsx("goa-notification", Object.assign({
2957
- ref: el,
2958
- type: _type,
2959
- "data-testid": testId,
2960
- maxcontentwidth: maxContentWidth,
2961
- arialive: ariaLive
2962
- }, {
2963
- children: children
2964
- }), void 0);
2965
- };
2966
-
2967
- function GoAOneColumnLayout(props) {
2968
- return jsx("goa-one-column-layout", {
2969
- children: props.children
2970
- }, void 0);
2971
- }
2972
-
2973
- const GoAPageBlock = props => {
2974
- return jsx("goa-page-block", Object.assign({
2975
- width: props.width,
2976
- "data-testid": props.testId
2977
- }, {
2978
- children: props.children
2979
- }), void 0);
2980
- };
2981
-
2982
- const GoARadioItem = ({
2983
- name,
2984
- label,
2985
- value,
2986
- description,
2987
- disabled,
2988
- checked,
2989
- error,
2990
- testId,
2991
- children
2992
- }) => {
2993
- return jsx("goa-radio-item", Object.assign({
2994
- name: name,
2995
- label: label,
2996
- value: value,
2997
- description: description,
2998
- error: error,
2999
- disabled: disabled,
3000
- checked: checked,
3001
- "data-testid": testId
3002
- }, {
3003
- children: children
3004
- }), void 0);
3005
- };
3006
-
3007
- const GoARadioGroup = ({
3008
- name,
3009
- value,
3010
- children,
3011
- orientation: _orientation = "vertical",
3012
- disabled: _disabled = false,
3013
- error: _error = false,
3014
- testId,
3015
- ariaLabel,
3016
- mt,
3017
- mr,
3018
- mb,
3019
- ml,
3020
- onChange
3021
- }) => {
3022
- const el = useRef(null);
3023
- useEffect(() => {
3024
- if (!el.current) {
3025
- return;
3026
- }
3027
-
3028
- const listener = e => {
3029
- if (!onChange) {
3030
- console.warn("Missing onChange function");
3031
- return;
3032
- }
3033
-
3034
- onChange(name, e.detail.value);
3035
- };
3036
-
3037
- const currentEl = el.current;
3038
- currentEl.addEventListener("_change", listener);
3039
- return () => {
3040
- currentEl.removeEventListener("_change", listener);
3041
- };
3042
- }, [name, onChange]);
3043
- return jsx("goa-radio-group", Object.assign({
3044
- "data-testid": testId,
3045
- ref: el,
3046
- name: name,
3047
- value: value,
3048
- orientation: _orientation,
3049
- disabled: _disabled,
3050
- error: _error,
3051
- arialabel: ariaLabel,
3052
- mt: mt,
3053
- mr: mr,
3054
- mb: mb,
3055
- ml: ml
3056
- }, {
3057
- children: children
3058
- }), void 0);
3059
- };
3060
-
3061
- function GoAPagination(props) {
3062
- const ref = useRef();
3063
- useEffect(() => {
3064
- if (!ref.current) {
3065
- return;
3066
- }
3067
-
3068
- const current = ref.current;
3069
-
3070
- const changeListener = e => {
3071
- const {
3072
- page
3073
- } = e.detail;
3074
- props.onChange(page);
3075
- };
3076
-
3077
- current.addEventListener("_change", changeListener);
3078
- return () => {
3079
- current.removeEventListener("_change", changeListener);
3080
- };
3081
- }, [ref, props.onChange]);
3082
- return jsx("goa-pagination", {
3083
- ref: ref,
3084
- itemcount: props.itemCount,
3085
- perpagecount: props.perPageCount,
3086
- pagenumber: props.pageNumber,
3087
- variant: props.variant,
3088
- mt: props.mt,
3089
- mb: props.mb,
3090
- ml: props.ml,
3091
- mr: props.mr,
3092
- "data-testid": props.testId
3093
- }, void 0);
3094
- }
3095
-
3096
- const GoAPopover = ({
3097
- target,
3098
- testId,
3099
- maxWidth,
3100
- padded,
3101
- position,
3102
- relative,
3103
- children,
3104
- mt,
3105
- mr,
3106
- mb,
3107
- ml
3108
- }) => {
3109
- return jsxs("goa-popover", Object.assign({
3110
- "data-testid": testId,
3111
- maxwidth: maxWidth,
3112
- padded: padded,
3113
- position: position,
3114
- relative: relative,
3115
- mt: mt,
3116
- mr: mr,
3117
- mb: mb,
3118
- ml: ml
3119
- }, {
3120
- children: [children, target && jsx("div", Object.assign({
3121
- slot: "target"
3122
- }, {
3123
- children: target
3124
- }), void 0)]
3125
- }), void 0);
3126
- };
3127
-
3128
- const GoASkeleton = ({
3129
- maxWidth,
3130
- size,
3131
- lineCount,
3132
- type,
3133
- testId,
3134
- mt,
3135
- mr,
3136
- mb,
3137
- ml
3138
- }) => {
3139
- return jsx("goa-skeleton", {
3140
- maxwidth: maxWidth,
3141
- linecount: lineCount,
3142
- type: type,
3143
- size: size,
3144
- mt: mt,
3145
- mr: mr,
3146
- mb: mb,
3147
- ml: ml,
3148
- "data-testid": testId
3149
- }, void 0);
3150
- };
3151
-
3152
- function GoASpacer(props) {
3153
- return jsx("goa-spacer", {
3154
- hspacing: props.hSpacing,
3155
- vspacing: props.vSpacing,
3156
- "data-testid": props.testId
3157
- }, void 0);
3158
- }
3159
-
3160
- const GoASpinner = ({
3161
- type,
3162
- size,
3163
- progress,
3164
- invert,
3165
- testId
3166
- }) => {
3167
- return jsx("goa-spinner", {
3168
- type: type,
3169
- size: size,
3170
- progress: progress,
3171
- invert: invert,
3172
- "data-testid": testId
3173
- }, void 0);
3174
- };
3175
-
3176
- function GoATable(props) {
3177
- const ref = useRef(null);
3178
- useEffect(() => {
3179
- if (!ref.current) {
3180
- return;
3181
- }
3182
-
3183
- const current = ref.current;
3184
-
3185
- const sortListener = e => {
3186
- var _a;
3187
-
3188
- const {
3189
- sortBy,
3190
- sortDir
3191
- } = e.detail;
3192
- (_a = props.onSort) === null || _a === void 0 ? void 0 : _a.call(props, sortBy, sortDir);
3193
- };
3194
-
3195
- current.addEventListener("_sort", sortListener);
3196
- return () => {
3197
- current.removeEventListener("_sort", sortListener);
3198
- };
3199
- }, [ref, props.onSort]);
3200
- return jsx("goa-table", Object.assign({
3201
- ref: ref,
3202
- width: props.width,
3203
- stickyheader: false,
3204
- variant: props.variant,
3205
- "data-testid": props.testId,
3206
- mt: props.mt,
3207
- mb: props.mb,
3208
- ml: props.ml,
3209
- mr: props.mr
3210
- }, {
3211
- children: jsx("table", Object.assign({
3212
- style: {
3213
- width: "100%"
3214
- }
3215
- }, {
3216
- children: props.children
3217
- }), void 0)
3218
- }), void 0);
3219
- }
3220
-
3221
- const GoATableSortHeader = ({
3222
- name,
3223
- direction: _direction = "none",
3224
- children
3225
- }) => {
3226
- return jsx("goa-table-sort-header", Object.assign({
3227
- name: name,
3228
- direction: _direction
3229
- }, {
3230
- children: children
3231
- }), void 0);
3232
- };
3233
-
3234
- const GoATextArea = ({
3235
- name,
3236
- value,
3237
- placeholder,
3238
- rows,
3239
- disabled,
3240
- showCounter,
3241
- maxCharCount,
3242
- width,
3243
- testId,
3244
- error,
3245
- ariaLabel,
3246
- mt,
3247
- mr,
3248
- mb,
3249
- ml,
3250
- onChange
3251
- }) => {
3252
- const el = useRef(null);
3253
- useEffect(() => {
3254
- if (!el.current) {
3255
- return;
3256
- }
3257
-
3258
- const current = el.current;
3259
-
3260
- const listener = e => {
3261
- const {
3262
- name,
3263
- value
3264
- } = e.detail;
3265
- onChange(name, value);
3266
- };
3267
-
3268
- current.addEventListener("_change", listener);
3269
- return () => {
3270
- current.removeEventListener("_change", listener);
3271
- };
3272
- }, [el, onChange]);
3273
- return jsx("goa-textarea", {
3274
- ref: el,
3275
- name: name,
3276
- placeholder: placeholder,
3277
- value: value,
3278
- rows: rows,
3279
- disabled: disabled,
3280
- showcounter: showCounter,
3281
- maxcharcount: maxCharCount,
3282
- width: width,
3283
- error: error,
3284
- "data-testid": testId,
3285
- arialabel: ariaLabel,
3286
- mt: mt,
3287
- mr: mr,
3288
- mb: mb,
3289
- ml: ml
3290
- }, void 0);
3291
- };
3292
-
3293
- const GoATooltip = props => {
3294
- return jsx("goa-tooltip", Object.assign({
3295
- position: props.position,
3296
- content: props.content,
3297
- halign: props.hAlign,
3298
- "data-testid": props.testId,
3299
- mt: props.mt,
3300
- mr: props.mr,
3301
- mb: props.mb,
3302
- ml: props.ml
3303
- }, {
3304
- children: props.children
3305
- }), void 0);
3306
- };
3307
-
3308
- function GoATwoColumnLayout(props) {
3309
- return jsxs("goa-two-column-layout", Object.assign({
3310
- navcolumnwidth: props.navColumnWidth,
3311
- maxcontentwidth: props.maxContentWidth
3312
- }, {
3313
- children: [props.header && jsx("div", Object.assign({
3314
- slot: "header"
3315
- }, {
3316
- children: props.header
3317
- }), void 0), props.nav && jsx("div", Object.assign({
3318
- slot: "nav"
3319
- }, {
3320
- children: props.nav
3321
- }), void 0), props.children, props.footer && jsx("div", Object.assign({
3322
- slot: "footer"
3323
- }, {
3324
- children: props.footer
3325
- }), void 0)]
3326
- }), void 0);
3327
- }
3328
-
3329
- function GoAThreeColumnLayout(props) {
3330
- return jsxs("goa-three-column-layout", Object.assign({
3331
- leftcolumnwidth: props.leftColumnWidth,
3332
- rightcolumnwidth: props.rightColumnWidth,
3333
- maxcontentwidth: props.maxContentWidth
3334
- }, {
3335
- children: [props.header && jsx("div", Object.assign({
3336
- slot: "header"
3337
- }, {
3338
- children: props.header
3339
- }), void 0), props.nav && jsx("div", Object.assign({
3340
- slot: "nav"
3341
- }, {
3342
- children: props.nav
3343
- }), void 0), props.sidebar && jsx("div", Object.assign({
3344
- slot: "side-menu"
3345
- }, {
3346
- children: props.sidebar
3347
- }), void 0), props.sideMenu && jsx("div", Object.assign({
3348
- slot: "side-menu"
3349
- }, {
3350
- children: props.sideMenu
3351
- }), void 0), props.children, props.footer && jsx("div", Object.assign({
3352
- slot: "footer"
3353
- }, {
3354
- children: props.footer
3355
- }), void 0)]
3356
- }), void 0);
3357
- }
3358
-
3359
- function GoATabs({
3360
- initialTab,
3361
- children
3362
- }) {
3363
- return jsx("goa-tabs", Object.assign({
3364
- initialtab: initialTab
3365
- }, {
3366
- children: children
3367
- }), void 0);
3368
- }
3369
-
3370
- const GoATab = ({
3371
- heading,
3372
- children
3373
- }) => {
3374
- return jsxs("goa-tab", {
3375
- children: [heading && jsx("span", Object.assign({
3376
- slot: "heading"
3377
- }, {
3378
- children: heading
3379
- }), void 0), children]
3380
- }, void 0);
3381
- };
3382
-
3383
- export { GoAAccordion, GoAAppFooter, GoAAppFooterMetaSection, GoAAppFooterNavSection, GoAAppHeader, GoAAppHeaderMenu, GoABadge, GoABlock, GoAButton, GoAButtonGroup, GoACalendar, GoACallout, GoACheckbox, GoAChip, GoACircularProgress, GoAContainer, GoADatePicker, GoADetails, GoADivider, GoADropdown, GoADropdownItem, GoADropdownOption, GoAEmergencyBadge, GoAFileUploadCard, GoAFileUploadInput, GoAFormItem, GoAFormStep, GoAFormStepper, GoAGrid, GoAHeroBanner, GoAHeroBannerActions, GoAIcon, GoAIconButton, GoAImportantBadge, GoAInfoBadge, GoAInput, GoAInputDate, GoAInputDateTime, GoAInputEmail, GoAInputFile, GoAInputMonth, GoAInputNumber, GoAInputPassword, GoAInputRange, GoAInputSearch, GoAInputTel, GoAInputText, GoAInputTime, GoAInputUrl, GoAMicrositeHeader, GoAModal, GoANotification, GoAOneColumnLayout, GoAPageBlock, GoAPages, GoAPagination, GoAPopover, GoARadioGroup, GoARadioItem, GoASideMenu, GoASideMenuGroup, GoASideMenuHeading, GoASkeleton, GoASpacer, GoASpinner, GoASuccessBadge, GoATab, GoATable, GoATableSortHeader, GoATabs, GoATextArea, GoAThreeColumnLayout, GoATooltip, GoATwoColumnLayout };