@spscommerce/ds-web-components 8.21.0 → 8.21.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,4 +1,4 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const R=require("@spscommerce/ds-shared"),l=require("@spscommerce/utils"),Xe={};var d={};Object.defineProperty(d,"__esModule",{value:!0});/**
1
+ (function(a,A){typeof exports=="object"&&typeof module<"u"?A(exports,require("@spscommerce/ds-shared"),require("@spscommerce/utils")):typeof define=="function"&&define.amd?define(["exports","@spscommerce/ds-shared","@spscommerce/utils"],A):(a=typeof globalThis<"u"?globalThis:a||self,A(a.DSWebComponents={},a.dsShared,a.utils))})(this,function(a,A,c){"use strict";const Xe={};var d={};Object.defineProperty(d,"__esModule",{value:!0});/**
2
2
  * @license
3
3
  * Copyright 2018 The Incremental DOM Authors. All Rights Reserved.
4
4
  *
@@ -13,7 +13,7 @@
13
13
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
14
  * See the License for the specific language governing permissions and
15
15
  * limitations under the License.
16
- */var ae={default:"__default"};/**
16
+ */var ee={default:"__default"};/**
17
17
  * @license
18
18
  * Copyright 2018 The Incremental DOM Authors. All Rights Reserved.
19
19
  *
@@ -28,7 +28,7 @@
28
28
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
29
29
  * See the License for the specific language governing permissions and
30
30
  * limitations under the License.
31
- */var Ke=Object.prototype.hasOwnProperty;function _e(){}_e.prototype=Object.create(null);function Qe(e,t){return Ke.call(e,t)}function Se(){return new _e}function oe(e,t){for(;e.length>t;)e.pop()}/**
31
+ */var Ke=Object.prototype.hasOwnProperty;function ve(){}ve.prototype=Object.create(null);function Qe(e,t){return Ke.call(e,t)}function Ce(){return new ve}function te(e,t){for(;e.length>t;)e.pop()}/**
32
32
  * @license
33
33
  * Copyright 2018 The Incremental DOM Authors. All Rights Reserved.
34
34
  *
@@ -43,7 +43,7 @@
43
43
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
44
44
  * See the License for the specific language governing permissions and
45
45
  * limitations under the License.
46
- */function Ze(e){if(e.lastIndexOf("xml:",0)===0)return"http://www.w3.org/XML/1998/namespace";if(e.lastIndexOf("xlink:",0)===0)return"http://www.w3.org/1999/xlink"}function Ne(e,t,n){if(n==null)e.removeAttribute(t);else{var s=Ze(t);s?e.setAttributeNS(s,t,String(n)):e.setAttribute(t,String(n))}}function xe(e,t,n){e[t]=n}function Je(e,t,n){t.indexOf("-")>=0?e.setProperty(t,n):e[t]=n}function Ye(e,t,n){if(typeof n=="string")e.style.cssText=n;else{e.style.cssText="";var s=e.style;for(var i in n)Qe(n,i)&&Je(s,i,n[i])}}function Me(e,t,n){var s=typeof n;s==="object"||s==="function"?xe(e,t,n):Ne(e,t,n)}var B=Se();B[ae.default]=Me;B.style=Ye;function U(e,t,n){var s=B[t]||B[ae.default];s(e,t,n)}/**
46
+ */function Ze(e){if(e.lastIndexOf("xml:",0)===0)return"http://www.w3.org/XML/1998/namespace";if(e.lastIndexOf("xlink:",0)===0)return"http://www.w3.org/1999/xlink"}function be(e,t,n){if(n==null)e.removeAttribute(t);else{var s=Ze(t);s?e.setAttributeNS(s,t,String(n)):e.setAttribute(t,String(n))}}function we(e,t,n){e[t]=n}function Je(e,t,n){t.indexOf("-")>=0?e.setProperty(t,n):e[t]=n}function Ye(e,t,n){if(typeof n=="string")e.style.cssText=n;else{e.style.cssText="";var s=e.style;for(var i in n)Qe(n,i)&&Je(s,i,n[i])}}function Me(e,t,n){var s=typeof n;s==="object"||s==="function"?we(e,t,n):be(e,t,n)}var R=Ce();R[ee.default]=Me,R.style=Ye;function B(e,t,n){var s=R[t]||R[ee.default];s(e,t,n)}/**
47
47
  * @license
48
48
  * Copyright 2018 The Incremental DOM Authors. All Rights Reserved.
49
49
  *
@@ -58,9 +58,9 @@
58
58
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
59
59
  * See the License for the specific language governing permissions and
60
60
  * limitations under the License.
61
- */var $=!1,ee=!1;function ye(e,t){if(!t)throw new Error("Cannot call "+e+"() unless in patch.")}function et(e,t){if(e!==t){for(var n=e,s=[];n&&n!==t;)s.push(n.nodeName.toLowerCase()),n=n.parentNode;throw new Error(`One or more tags were not closed:
61
+ */var $=!1,ne=!1;function _e(e,t){if(!t)throw new Error("Cannot call "+e+"() unless in patch.")}function et(e,t){if(e!==t){for(var n=e,s=[];n&&n!==t;)s.push(n.nodeName.toLowerCase()),n=n.parentNode;throw new Error(`One or more tags were not closed:
62
62
  `+s.join(`
63
- `))}}function tt(e){e||console.warn("patchOuter requires the node have a parent if there is a key.")}function k(e){if($)throw new Error(e+"() can not be called between elementOpenStart() and elementOpenEnd().")}function Ae(e){if(ee)throw new Error(e+"() may not be called inside an element that has called skip().")}function le(e){if(!$)throw new Error(e+"() can only be called after calling elementOpenStart().")}function nt(){if($)throw new Error("elementOpenEnd() must be called after calling elementOpenStart().")}function st(e,t){if(e!==t)throw new Error('Received a call to close "'+t+'" but "'+e+'" was open.')}function it(e,t){if(t!==null)throw new Error(e+"() must come before any child declarations inside the current element.")}function rt(e,t,n,s){X(e);var i=e,r=t,o=r.nextSibling===n&&r.previousSibling===s,p=r.nextSibling===i.nextSibling&&r.previousSibling===s,u=r===i;if(!o&&!p&&!u)throw new Error("There must be exactly one top level call corresponding to the patched element.")}function H(e){var t=$;return $=e,t}function q(e){var t=ee;return ee=e,t}function X(e){if(process.env.NODE_ENV!=="production"&&!e)throw new Error("Expected value to be defined");return e}/**
63
+ `))}}function tt(e){e||console.warn("patchOuter requires the node have a parent if there is a key.")}function k(e){if($)throw new Error(e+"() can not be called between elementOpenStart() and elementOpenEnd().")}function Se(e){if(ne)throw new Error(e+"() may not be called inside an element that has called skip().")}function se(e){if(!$)throw new Error(e+"() can only be called after calling elementOpenStart().")}function nt(){if($)throw new Error("elementOpenEnd() must be called after calling elementOpenStart().")}function st(e,t){if(e!==t)throw new Error('Received a call to close "'+t+'" but "'+e+'" was open.')}function it(e,t){if(t!==null)throw new Error(e+"() must come before any child declarations inside the current element.")}function at(e,t,n,s){H(e);var i=e,r=t,l=r.nextSibling===n&&r.previousSibling===s,h=r.nextSibling===i.nextSibling&&r.previousSibling===s,g=r===i;if(!l&&!h&&!g)throw new Error("There must be exactly one top level call corresponding to the patched element.")}function W(e){var t=$;return $=e,t}function V(e){var t=ne;return ne=e,t}function H(e){if(process.env.NODE_ENV!=="production"&&!e)throw new Error("Expected value to be defined");return e}/**
64
64
  * @license
65
65
  * Copyright 2018 The Incremental DOM Authors. All Rights Reserved.
66
66
  *
@@ -75,7 +75,7 @@
75
75
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
76
76
  * See the License for the specific language governing permissions and
77
77
  * limitations under the License.
78
- */var T={nodesCreated:null,nodesDeleted:null};/**
78
+ */var j={nodesCreated:null,nodesDeleted:null};/**
79
79
  * @license
80
80
  * Copyright 2018 The Incremental DOM Authors. All Rights Reserved.
81
81
  *
@@ -90,7 +90,7 @@
90
90
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
91
91
  * See the License for the specific language governing permissions and
92
92
  * limitations under the License.
93
- */var at=function(){function e(){this.created=[],this.deleted=[]}return e.prototype.markCreated=function(t){this.created.push(t)},e.prototype.markDeleted=function(t){this.deleted.push(t)},e.prototype.notifyChanges=function(){T.nodesCreated&&this.created.length>0&&T.nodesCreated(this.created),T.nodesDeleted&&this.deleted.length>0&&T.nodesDeleted(this.deleted)},e}();/**
93
+ */var rt=function(){function e(){this.created=[],this.deleted=[]}return e.prototype.markCreated=function(t){this.created.push(t)},e.prototype.markDeleted=function(t){this.deleted.push(t)},e.prototype.notifyChanges=function(){j.nodesCreated&&this.created.length>0&&j.nodesCreated(this.created),j.nodesDeleted&&this.deleted.length>0&&j.nodesDeleted(this.deleted)},e}();/**
94
94
  * @license
95
95
  * Copyright 2018 The Incremental DOM Authors. All Rights Reserved.
96
96
  *
@@ -105,7 +105,7 @@
105
105
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
106
106
  * See the License for the specific language governing permissions and
107
107
  * limitations under the License.
108
- */function ot(e){return e.nodeType===11||e.nodeType===9}function M(e){return e.nodeType===1}function lt(e){return e.nodeType===3}function ct(e,t){for(var n=[],s=e;s!==t;){var i=s;n.push(i),s=i.parentNode}return n}var pt=Node.prototype.getRootNode||function(){for(var e=this,t=e;e;)t=e,e=e.parentNode;return t};function dt(e){var t=pt.call(e);return ot(t)?t.activeElement:null}function ht(e,t){var n=dt(e);return!n||!e.contains(n)?[]:ct(n,t)}function ut(e,t,n){for(var s=t.nextSibling,i=n;i!==null&&i!==t;){var r=i.nextSibling;e.insertBefore(i,s),i=r}}/**
108
+ */function ot(e){return e.nodeType===11||e.nodeType===9}function ie(e){return e.nodeType===1}function lt(e){return e.nodeType===3}function ct(e,t){for(var n=[],s=e;s!==t;){var i=s;n.push(i),s=i.parentNode}return n}var pt=Node.prototype.getRootNode||function(){for(var e=this,t=e;e;)t=e,e=e.parentNode;return t};function dt(e){var t=pt.call(e);return ot(t)?t.activeElement:null}function ht(e,t){var n=dt(e);return!n||!e.contains(n)?[]:ct(n,t)}function ut(e,t,n){for(var s=t.nextSibling,i=n;i!==null&&i!==t;){var r=i.nextSibling;e.insertBefore(i,s),i=r}}/**
109
109
  * @license
110
110
  * Copyright 2018 The Incremental DOM Authors. All Rights Reserved.
111
111
  *
@@ -120,7 +120,7 @@
120
120
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
121
121
  * See the License for the specific language governing permissions and
122
122
  * limitations under the License.
123
- */var ft=function(){function e(t,n,s){this._attrsArr=null,this.staticsApplied=!1,this.nameOrCtor=t,this.key=n,this.text=s}return e.prototype.hasEmptyAttrsArr=function(){var t=this._attrsArr;return!t||!t.length},e.prototype.getAttrsArr=function(t){return this._attrsArr||(this._attrsArr=new Array(t))},e}();function ce(e,t,n,s){var i=new ft(t,n,s);return e.__incrementalDOMData=i,i}function L(e,t){return Oe(e,t)}function mt(e){return!!e.__incrementalDOMData}function gt(e){return X(e.__incrementalDOMData),L(e).key}function Oe(e,t){if(e.__incrementalDOMData)return e.__incrementalDOMData;var n=M(e)?e.localName:e.nodeName,s=M(e)?e.getAttribute("key")||t:null,i=lt(e)?e.data:void 0,r=ce(e,n,s,i);return M(e)&&vt(e,r),r}function Pe(e){Oe(e);for(var t=e.firstChild;t;t=t.nextSibling)Pe(t)}function De(e){e.__incrementalDOMData=null;for(var t=e.firstChild;t;t=t.nextSibling)De(t)}function vt(e,t){var n=e.attributes,s=n.length;if(s)for(var i=t.getAttrsArr(s),r=0,o=0;r<s;r+=1,o+=2){var p=n[r],u=p.name,f=p.value;i[o]=u,i[o+1]=f}}/**
123
+ */var ft=function(){function e(t,n,s){this._attrsArr=null,this.staticsApplied=!1,this.nameOrCtor=t,this.key=n,this.text=s}return e.prototype.hasEmptyAttrsArr=function(){var t=this._attrsArr;return!t||!t.length},e.prototype.getAttrsArr=function(t){return this._attrsArr||(this._attrsArr=new Array(t))},e}();function ae(e,t,n,s){var i=new ft(t,n,s);return e.__incrementalDOMData=i,i}function L(e,t){return Ne(e,t)}function mt(e){return!!e.__incrementalDOMData}function gt(e){return H(e.__incrementalDOMData),L(e).key}function Ne(e,t){if(e.__incrementalDOMData)return e.__incrementalDOMData;var n=ie(e)?e.localName:e.nodeName,s=ie(e)?e.getAttribute("key")||t:null,i=lt(e)?e.data:void 0,r=ae(e,n,s,i);return ie(e)&&vt(e,r),r}function ye(e){Ne(e);for(var t=e.firstChild;t;t=t.nextSibling)ye(t)}function Ae(e){e.__incrementalDOMData=null;for(var t=e.firstChild;t;t=t.nextSibling)Ae(t)}function vt(e,t){var n=e.attributes,s=n.length;if(s)for(var i=t.getAttrsArr(s),r=0,l=0;r<s;r+=1,l+=2){var h=n[r],g=h.name,v=h.value;i[l]=g,i[l+1]=v}}/**
124
124
  * @license
125
125
  * Copyright 2018 The Incremental DOM Authors. All Rights Reserved.
126
126
  *
@@ -135,7 +135,7 @@
135
135
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
136
136
  * See the License for the specific language governing permissions and
137
137
  * limitations under the License.
138
- */function Ct(e,t){return e==="svg"?"http://www.w3.org/2000/svg":e==="math"?"http://www.w3.org/1998/Math/MathML":t==null||L(t).nameOrCtor==="foreignObject"?null:t.namespaceURI}function bt(e,t,n,s){var i;if(typeof n=="function")i=new n;else{var r=Ct(n,t);r?i=e.createElementNS(r,n):i=e.createElement(n)}return ce(i,n,s),i}function wt(e){var t=e.createTextNode("");return ce(t,"#text",null),t}/**
138
+ */function Ct(e,t){return e==="svg"?"http://www.w3.org/2000/svg":e==="math"?"http://www.w3.org/1998/Math/MathML":t==null||L(t).nameOrCtor==="foreignObject"?null:t.namespaceURI}function bt(e,t,n,s){var i;if(typeof n=="function")i=new n;else{var r=Ct(n,t);r?i=e.createElementNS(r,n):i=e.createElement(n)}return ae(i,n,s),i}function wt(e){var t=e.createTextNode("");return ae(t,"#text",null),t}/**
139
139
  * @license
140
140
  * Copyright 2018 The Incremental DOM Authors. All Rights Reserved.
141
141
  *
@@ -150,7 +150,7 @@
150
150
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
151
151
  * See the License for the specific language governing permissions and
152
152
  * limitations under the License.
153
- */var I=null,h=null,v=null,O=null,W=[],V=[];function K(){return V}function Ee(e){var t=function(n,s,i){var r=I,o=O,p=W,u=V,f=h,C=v,S=!1,z=!1;I=new at,O=n.ownerDocument,V=[],v=n.parentNode,W=ht(n,v),process.env.NODE_ENV!=="production"&&(S=H(!1),z=q(!1));try{var Ge=e(n,s,i);return process.env.NODE_ENV!=="production"&&nt(),Ge}finally{O=o,V=u,h=f,v=C,W=p,I.notifyChanges(),H(S),q(z),I=r}};return t}var Ie=Ee(function(e,t,n){return h=e,Le(),t(n),Te(),process.env.NODE_ENV!=="production"&&et(h,e),e}),_t=Ee(function(e,t,n){var s={nextSibling:e},i=null,r=null;return process.env.NODE_ENV!=="production"&&(i=e.nextSibling,r=e.previousSibling),h=s,t(n),process.env.NODE_ENV!=="production"&&(tt(v),rt(s,h,i,r)),v&&ke(v,Q(),e.nextSibling),s===h?null:h});function ge(e,t,n){var s=L(e,n);return t==s.nameOrCtor&&n==s.key}function St(e,t,n){if(!e)return null;if(ge(e,t,n))return e;if(n){for(;e=e.nextSibling;)if(ge(e,t,n))return e}return null}function Nt(e,t){var n;return e==="#text"?n=wt(O):n=bt(O,v,e,t),I.markCreated(n),n}function Fe(e,t){var n=St(h,e,t),s=n||Nt(e,t);s!==h&&(W.indexOf(s)>=0?ut(v,s,h):v.insertBefore(s,h),h=s)}function ke(e,t,n){for(var s=e,i=t;i!==n;){var r=i.nextSibling;s.removeChild(i),I.markDeleted(i),i=r}}function Le(){v=h,h=null}function Q(){return h?h.nextSibling:v.firstChild}function pe(){h=Q()}function Te(){ke(v,Q(),null),h=v,v=v.parentNode}function Ue(e,t){return pe(),Fe(e,t),Le(),v}function Re(){return process.env.NODE_ENV!=="production"&&q(!1),Te(),h}function xt(){return pe(),Fe("#text",null),h}function yt(){return process.env.NODE_ENV!=="production"&&(ye("currentElement",O),k("currentElement")),v}function At(){return process.env.NODE_ENV!=="production"&&(ye("currentPointer",O),k("currentPointer")),Q()}function Ot(){process.env.NODE_ENV!=="production"&&(it("skip",h),q(!0)),h=v.lastChild}/**
153
+ */var T=null,u=null,C=null,P=null,q=[],G=[];function X(){return G}function Oe(e){var t=function(n,s,i){var r=T,l=P,h=q,g=G,v=u,_=C,y=!1,M=!1;T=new rt,P=n.ownerDocument,G=[],C=n.parentNode,q=ht(n,C),process.env.NODE_ENV!=="production"&&(y=W(!1),M=V(!1));try{var ln=e(n,s,i);return process.env.NODE_ENV!=="production"&&nt(),ln}finally{P=l,G=g,u=v,C=_,q=h,T.notifyChanges(),W(y),V(M),T=r}};return t}var De=Oe(function(e,t,n){return u=e,xe(),t(n),Fe(),process.env.NODE_ENV!=="production"&&et(u,e),e}),_t=Oe(function(e,t,n){var s={nextSibling:e},i=null,r=null;return process.env.NODE_ENV!=="production"&&(i=e.nextSibling,r=e.previousSibling),u=s,t(n),process.env.NODE_ENV!=="production"&&(tt(C),at(s,u,i,r)),C&&Ie(C,K(),e.nextSibling),s===u?null:u});function Pe(e,t,n){var s=L(e,n);return t==s.nameOrCtor&&n==s.key}function St(e,t,n){if(!e)return null;if(Pe(e,t,n))return e;if(n){for(;e=e.nextSibling;)if(Pe(e,t,n))return e}return null}function Nt(e,t){var n;return e==="#text"?n=wt(P):n=bt(P,C,e,t),T.markCreated(n),n}function Ee(e,t){var n=St(u,e,t),s=n||Nt(e,t);s!==u&&(q.indexOf(s)>=0?ut(C,s,u):C.insertBefore(s,u),u=s)}function Ie(e,t,n){for(var s=e,i=t;i!==n;){var r=i.nextSibling;s.removeChild(i),T.markDeleted(i),i=r}}function xe(){C=u,u=null}function K(){return u?u.nextSibling:C.firstChild}function re(){u=K()}function Fe(){Ie(C,K(),null),u=C,C=C.parentNode}function ke(e,t){return re(),Ee(e,t),xe(),C}function Le(){return process.env.NODE_ENV!=="production"&&V(!1),Fe(),u}function yt(){return re(),Ee("#text",null),u}function At(){return process.env.NODE_ENV!=="production"&&(_e("currentElement",P),k("currentElement")),C}function Ot(){return process.env.NODE_ENV!=="production"&&(_e("currentPointer",P),k("currentPointer")),K()}function Dt(){process.env.NODE_ENV!=="production"&&(it("skip",u),V(!0)),u=C.lastChild}/**
154
154
  * @license
155
155
  * Copyright 2018 The Incremental DOM Authors. All Rights Reserved.
156
156
  *
@@ -165,7 +165,7 @@
165
165
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
166
166
  * See the License for the specific language governing permissions and
167
167
  * limitations under the License.
168
- */var ve=3,_=Se();function Pt(e,t,n){if(t.staticsApplied=!0,!(!n||!n.length)){if(t.hasEmptyAttrsArr()){for(var s=0;s<n.length;s+=2)U(e,n[s],n[s+1]);return}for(var s=0;s<n.length;s+=2)_[n[s]]=s+1;for(var i=t.getAttrsArr(0),r=0,s=0;s<i.length;s+=2){var o=i[s],p=i[s+1],u=_[o];if(u){n[u]===p&&delete _[o];continue}i[r]=o,i[r+1]=p,r+=2}oe(i,r);for(var o in _)U(e,o,n[_[o]]),delete _[o]}}function de(e,t,n){process.env.NODE_ENV!=="production"&&(k("elementOpen"),Ae("elementOpen"));var s=Ue(e,t),i=L(s);i.staticsApplied||Pt(s,i,n);var r=Math.max(0,arguments.length-ve),o=i.hasEmptyAttrsArr();if(!r&&o)return s;for(var p=i.getAttrsArr(r),u=ve,f=0;u<arguments.length;u+=2,f+=2){var C=arguments[u];if(o)p[f]=C;else if(p[f]!==C)break;var S=arguments[u+1];(o||p[f+1]!==S)&&(p[f+1]=S,U(s,C,S))}if(u<arguments.length||f<p.length){for(var z=f;f<p.length;f+=2)_[p[f]]=p[f+1];for(f=z;u<arguments.length;u+=2,f+=2){var C=arguments[u],S=arguments[u+1];_[C]!==S&&U(s,C,S),p[f]=C,p[f+1]=S,delete _[C]}oe(p,f);for(var C in _)U(s,C,void 0),delete _[C]}return s}function Dt(e,t,n){var s=K();process.env.NODE_ENV!=="production"&&(k("elementOpenStart"),H(!0)),s[0]=e,s[1]=t,s[2]=n}function Et(e){var t=K();process.env.NODE_ENV!=="production"&&(le("key"),X(t)),t[1]=e}function It(e,t){var n=K();process.env.NODE_ENV!=="production"&&le("attr"),n.push(e),n.push(t)}function Ft(){var e=K();process.env.NODE_ENV!=="production"&&(le("elementOpenEnd"),H(!1)),X(e);var t=de.apply(null,e);return oe(e,0),t}function Be(e){process.env.NODE_ENV!=="production"&&k("elementClose");var t=Re();return process.env.NODE_ENV!=="production"&&st(L(t).nameOrCtor,e),t}function kt(e,t,n){return de.apply(null,arguments),Be(e)}function Lt(e){process.env.NODE_ENV!=="production"&&(k("text"),Ae("text"));var t=xt(),n=L(t);if(n.text!==e){n.text=e;for(var s=e,i=1;i<arguments.length;i+=1){var r=arguments[i];s=r(s)}t.data=s}return t}/**
168
+ */var Te=3,S=Ce();function Pt(e,t,n){if(t.staticsApplied=!0,!(!n||!n.length)){if(t.hasEmptyAttrsArr()){for(var s=0;s<n.length;s+=2)B(e,n[s],n[s+1]);return}for(var s=0;s<n.length;s+=2)S[n[s]]=s+1;for(var i=t.getAttrsArr(0),r=0,s=0;s<i.length;s+=2){var l=i[s],h=i[s+1],g=S[l];if(g){n[g]===h&&delete S[l];continue}i[r]=l,i[r+1]=h,r+=2}te(i,r);for(var l in S)B(e,l,n[S[l]]),delete S[l]}}function oe(e,t,n){process.env.NODE_ENV!=="production"&&(k("elementOpen"),Se("elementOpen"));var s=ke(e,t),i=L(s);i.staticsApplied||Pt(s,i,n);var r=Math.max(0,arguments.length-Te),l=i.hasEmptyAttrsArr();if(!r&&l)return s;for(var h=i.getAttrsArr(r),g=Te,v=0;g<arguments.length;g+=2,v+=2){var _=arguments[g];if(l)h[v]=_;else if(h[v]!==_)break;var y=arguments[g+1];(l||h[v+1]!==y)&&(h[v+1]=y,B(s,_,y))}if(g<arguments.length||v<h.length){for(var M=v;v<h.length;v+=2)S[h[v]]=h[v+1];for(v=M;g<arguments.length;g+=2,v+=2){var _=arguments[g],y=arguments[g+1];S[_]!==y&&B(s,_,y),h[v]=_,h[v+1]=y,delete S[_]}te(h,v);for(var _ in S)B(s,_,void 0),delete S[_]}return s}function Et(e,t,n){var s=X();process.env.NODE_ENV!=="production"&&(k("elementOpenStart"),W(!0)),s[0]=e,s[1]=t,s[2]=n}function It(e){var t=X();process.env.NODE_ENV!=="production"&&(se("key"),H(t)),t[1]=e}function xt(e,t){var n=X();process.env.NODE_ENV!=="production"&&se("attr"),n.push(e),n.push(t)}function Ft(){var e=X();process.env.NODE_ENV!=="production"&&(se("elementOpenEnd"),W(!1)),H(e);var t=oe.apply(null,e);return te(e,0),t}function Ue(e){process.env.NODE_ENV!=="production"&&k("elementClose");var t=Le();return process.env.NODE_ENV!=="production"&&st(L(t).nameOrCtor,e),t}function kt(e,t,n){return oe.apply(null,arguments),Ue(e)}function Lt(e){process.env.NODE_ENV!=="production"&&(k("text"),Se("text"));var t=yt(),n=L(t);if(n.text!==e){n.text=e;for(var s=e,i=1;i<arguments.length;i+=1){var r=arguments[i];s=r(s)}t.data=s}return t}/**
169
169
  * @license
170
170
  * Copyright 2018 The Incremental DOM Authors. All Rights Reserved.
171
171
  *
@@ -180,9 +180,9 @@
180
180
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
181
181
  * See the License for the specific language governing permissions and
182
182
  * limitations under the License.
183
- */d.applyAttr=Ne;d.applyProp=xe;d.attributes=B;d.close=Re;var he=d.currentElement=yt,te=d.currentPointer=At;d.open=Ue;var Tt=d.patch=Ie;d.patchInner=Ie;d.patchOuter=_t;d.skip=Ot;var ne=d.skipNode=pe;d.getKey=gt;d.clearCache=De;d.importNode=Pe;d.isDataInitialized=mt;d.notifications=T;d.symbols=ae;var Ce=d.attr=It,Ut=d.elementClose=Be;d.elementOpen=de;var Rt=d.elementOpenEnd=Ft,Bt=d.elementOpenStart=Dt;d.elementVoid=kt;var $t=d.text=Lt;d.key=Et;function be(e){let t=te();return t instanceof Comment&&t.data!==e?t.data=e:(t=document.createComment(e),he().appendChild(t)),ne(),t}let $e=R.noI18nI18n;function jt(e){$e=e}function zt(){return $e}const A=Symbol("ComponentMetadata"),w=Object.freeze({has(e,t){return!!(e[A]&&Object.prototype.hasOwnProperty.call(e[A],t))},add(e,t){e[A]?Object.assign(e[A],t):e[A]=t},get(e,t,n){return e[A]&&e[A][t]||n}}),we=Symbol("ds-web-components:pragma:listeners-attached"),je="idom-pragma:content-begin",se="idom-pragma:content-end";function ie(e){for(const t of e)if(typeof t=="function")t();else if(typeof t=="string")$t(t);else if(t instanceof Set)ie(Array.from(t));else if(Array.isArray(t)&&t.length>0){let n=te();if(be(je),n===null){const s=he();for(let i=0;i<t.length;i+=1)s.contains(t[i])||s.appendChild(t[i]),ne()}for(;n&&n.data!==se;)ne(),n=te();be(se)}}function a(e,t,...n){if(t){for(const s of Object.keys(t))if(s.toUpperCase()==="DATA-FRAGMENT")return()=>ie(n)}return()=>{Bt(e);const s=[];if(t)for(const r of Object.keys(t))r.toUpperCase()==="CLASSNAME"?Ce("class",t[r]):/^on[A-Z]/.test(r)?s.push(r):Ce(r,t[r]);Rt(e);const i=he();if(!i[we]){for(const r of s)i.addEventListener(r.substr(2).toLowerCase(),t[r]);i[we]=!0}ie(n),Ut(e)}}function ze(e,t){customElements.get(e)||customElements.define(e,t)}function Wt(...e){for(const t of e)ze(w.get(t,"tag"),t)}function Vt(e){return function(...n){for(const s of n){const i=`${e}${w.get(s,"tag").substr(3)}`;ze(i,s)}}}const re=Symbol("Component Attribute Bindings"),P=Symbol("Component Class Bindings"),G=Symbol("Component Style Bindings"),Ht={__initialized:!1,__observer:null,__queuedUpdate:null,__managedClasses:new Set,__updateHostBindings(){const e=this;for(const t of Object.keys(e[re]||{}))e.setAttribute(t,e[re][t]);for(const t of Object.keys(e[G]||{}))e.style[t]=e[G][t];for(const t of e.__managedClasses)e.classList.remove(t);for(const t of(e[P]||[]).filter(Boolean))e.__managedClasses.add(t),e.classList.add(t);for(const t of(e.getAttribute("classname")||"").split(/\w+/).filter(Boolean))e.classList.add(t)},__updateChildQueries(e){const t=this;for(const n of w.get(t.constructor,"childQueries",[]))if(!e||e&&n.refresh){const s=n.all?t.querySelectorAll:t.querySelector;t[n.key]=s.call(t,n.selector)}},__gatherChildren(){const e=this;let t=Array.from(e.childNodes),n=null,s=t.length;for(let i=0;i<t.length;i+=1){const r=t[i];r instanceof Comment&&(r.data===je?n=i+1:r.data===se&&(s=i-1))}if(n===null)for(const i of t)i.parentNode.removeChild(i);else t=t.slice(n,s);w.has(e.constructor,"contentProp")&&(e[w.get(e.constructor,"contentProp")]=t)},__startMutObs(){const e=this;e.__observer||(e.__observer=new MutationObserver(()=>{e.contentChangedCallback&&e.contentChangedCallback(),e.__gatherChildren(),e.update()})),e.__observer.observe(e,{childList:!0})},__stopMutObs(){const e=this;e.__observer&&e.__observer.disconnect()},__doRender(){const e=this;e.__stopMutObs(),Tt(e,e.render(zt())),e.__startMutObs()},update(){const e=this;e.__initialized&&!e.__queuedUpdate&&(e.__queuedUpdate=window.requestAnimationFrame(()=>{e.__doRender(),setTimeout(()=>{e.__updateChildQueries(!0),e.__updateHostBindings()},0),e.__queuedUpdate=null}))},attributeChangedCallback(e,t,n){const s=this,i=n===""?!0:n;i!==t&&(s.__cbAttributeChanged&&s.__cbAttributeChanged(e,s[e],i),e!=="style"&&(s[e]=i),s.__initialized&&s.update())},connectedCallback(){const e=this;e.__cbConnected&&e.__cbConnected();const t=w.get(e.constructor,"eventListeners",[]);setTimeout(()=>{if(!e.__initialized){e.__gatherChildren();for(const[,n]of t)e[n]=e[n].bind(e);e.__initialized=!0}for(const[n,s]of t)e.addEventListener(n,e[s]);e.__doRender(),setTimeout(()=>{e.__updateChildQueries(),e.__updateHostBindings()},0)},0)},disconnectedCallback(){const e=this;e.__cbDisconnected&&e.__cbDisconnected();for(const[t,n]of w.get(e.constructor,"eventListeners",[]))e.removeEventListener(t,e[n]);e.__stopMutObs()}};function D(e){return t=>{w.add(t,e),Object.assign(t.prototype,{__cbAttributeChanged:t.prototype.attributeChangedCallback,__cbConnected:t.prototype.connectedCallback,__cbDisconnected:t.prototype.disconnectedCallback},Ht)}}function Z(){return(e,t)=>{w.add(e.constructor,{contentProp:t})}}function J(e){return(t,n)=>{Object.defineProperty(t,n,{get(){return Object.defineProperty(this,n,{value:{dispatch:s=>{const i=new CustomEvent(e||n,{detail:s});return this.dispatchEvent(i),i}}}),this[n]},configurable:!0})}}function j(e){return(t,n)=>{const s=w.get(t.constructor,"eventListeners",[]);s.push([e,n]),w.add(t.constructor,{eventListeners:s})}}function c(e){return(t,n)=>{const s=t.constructor,i=n.toLowerCase();if(s.observedAttributes=s.observedAttributes||["classname","className","style"],s.observedAttributes.push(n),s.observedAttributes.push(i),i!==n&&Object.defineProperty(t,n,{get(){return this[i]},set(r){this[i]=r}}),e){const r=Symbol.for(n);Object.defineProperty(t,i,{get(){return this[r]},set(o){let p=o;e===Boolean&&typeof o=="string"&&o.toLowerCase()==="false"?p=!1:p=e(o),this[r]=p}})}}}function We(e,t,n){return(s,i)=>{const r=w.get(s.constructor,"childQueries",[]);r.push({key:i,selector:e,all:n,refresh:t.refresh}),w.add(s.constructor,{childQueries:r})}}function Y(e,t={}){return We(e,t)}function Ve(e,t={}){return We(e,t,!0)}function ue(){return(e,t)=>{const n=Symbol(t);Object.defineProperties(e,{[n]:{writable:!0,enumerable:!1,configurable:!1,value:e[t]},[t]:{get(){return this[n]},set(s){this[n]!==s&&(this[n]=s,this.update())}}})}}var fe=(e=>(e["7Z"]="application/x-7z-compressed",e.AAC="audio/aac",e.ABW="application/x-abiword",e.ARC="application/octet-stream",e.AVI="video/x-msvideo",e.AZW="application/vnd.amazon.ebook",e.BIN="application/octet-stream",e.BMP="image/bmp",e.BZ="application/x-bzip",e.BZ2="application/x-bzip2",e.CER="application/pkix-cert",e.CSH="application/x-csh",e.CSS="text/css",e.CSV="text/csv,application/vnd.ms-excel",e.DOC="application/msword",e.DOCX="application/vnd.openxmlformats-officedocument.wordprocessingml.document",e.EOT="application/vnd.ms-fontobject",e.EPUB="application/epub+zip",e.ES="application/ecmascript",e.FLV="video/x-flv",e.GIF="image/gif",e.GZ="application/x-gzip",e.HTM="text/html",e.HTML="text/html",e.ICO="image/x-icon",e.ICS="text/calendar",e.JAR="application/java-archive",e.JPEG="image/jpeg",e.JPG="image/jpeg",e.JS="application/javascript",e.JSON="application/json",e.M3U="audio/x-mpequrl",e.MID="audio/midi",e.MIDI="audio/midi",e.MOV="video/quicktime",e.MP3="audio/mpeg3",e.MP4="video/mp4",e.MPEG="video/mpeg",e.MPKG="application/vnd.apple.installer+xml",e.ODP="application/vnd.oasis.opendocument.presentation",e.ODS="application/vnd.oasis.opendocument.spreadsheet",e.ODT="application/vnd.oasis.opendocument.text",e.OGA="audio/ogg",e.OGV="video/ogg",e.OGX="application/ogg",e.OTF="font/otf",e.PNG="image/png",e.PDF="application/pdf",e.PPT="application/vnd.ms-powerpoint",e.PPTX="application/vnd.openxmlformats-officedocument.presentationml.presentation",e.RAR="application/x-rar-compressed",e.RTF="application/rtf",e.SH="application/x-sh",e.SVG="image/svg+xml",e.SWF="application/x-shockwave-flash",e.TAR="application/x-tar",e.TIF="image/tiff",e.TIFF="image/tiff",e.TS="application/typescript",e.TTF="font/ttf",e.TXT="text/plain",e.VSD="application/vnd.visio",e.WAV="audio/wav",e.WEBA="audio/webm",e.WEBM="video/webm",e.WEBP="image/webp",e.WOFF="font/woff",e.WOFF2="font/woff2",e.XHTML="application/xhtml+xml",e.XLS="application/vnd.ms-excel",e.XLSX="application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",e.XML="application/xml",e.XUL="application/vnd.mozilla.xul+xml",e.ZIP="application/zip",e))(fe||{}),qt=Object.defineProperty,Gt=Object.getOwnPropertyDescriptor,g=(e,t,n,s)=>{for(var i=s>1?void 0:s?Gt(t,n):t,r=e.length-1,o;r>=0;r--)(o=e[r])&&(i=(s?o(t,n,i):o(i))||i);return s&&i&&qt(t,n,i),i};const m="sps-file-upload";exports.SpsFileUploadComponent=class extends HTMLElement{constructor(){super(),this.shown=!0,this.files=[],this.acceptMIMETypes=new Set,this.active=!1,this.error=!1,this.namesOfUnsupportedFiles=[],this.handleBrowseLinkClick=this.handleBrowseLinkClick.bind(this),this.handleDownloadButtonClick=this.handleDownloadButtonClick.bind(this),this.handleFileInputChange=this.handleFileInputChange.bind(this),this.dismiss=this.dismiss.bind(this)}get[P](){return[m,this.active&&`${m}--active`,this.error&&`${m}--error`,!this.shown&&`${m}--hidden`,this.mini&&`${m}--mini`,this.constrainContentWidth&&`${m}--constrained-content-width`]}connectedCallback(){this.description=this.description||(this.multiple?"Files":"File"),this.acceptExtensions&&this.processAcceptExtensions(this.acceptExtensions),this.maxSize&&this.parseAndValidateMaxSize(this.maxSize)}attributeChangedCallback(t,n,s){t==="acceptExtensions"&&this.processAcceptExtensions(s),t==="maxSize"&&this.parseAndValidateMaxSize(s)}dismiss(){this.dismissable&&(this.shown=!1,this.update(),this.dismissal.dispatch())}show(){this.dismissable&&(this.shown=!0,this.update())}render({t}){const n=this.error?R.SpsIcon.EXCLAMATION_CIRCLE:R.SpsIcon.UPLOAD_CLOUD,s=(this.multiple?t("design-system:fileUpload.instructions_plural"):t("design-system:fileUpload.instructions")).split("|");return a("div",{"data-fragment":!0},a("div",{className:`${m}__content`},this.processing?a("div",{"data-fragment":!0},a("i",{className:"sps-spinner sps-spinner--medium","aria-hidden":"true"}),a("div",{className:`${m}__instructions`},t("design-system:fileUpload.processing"))):a("div",{"data-fragment":!0},a("i",{className:`sps-icon sps-icon-${n} ${m}__icon-primary`,"aria-hidden":"true"}),a("div",{className:`${m}__title`},this.error?a("div",{"data-fragment":!0},t(this.namesOfUnsupportedFiles.length>1?"design-system:fileUpload.cancelled_plural":"design-system:fileUpload.cancelled")):a("div",{"data-fragment":!0},t("design-system:fileUpload.title",{description:this.description}))),this.error?a("div",{className:`${m}__errored-files`},new Set(this.namesOfUnsupportedFiles.map((i,r)=>{const o=Math.floor(i.length/2);return a("div",{className:`${m}__errored-filename`,key:i},a("span",{className:`${m}__errored-filename-segment`},i.substr(0,o)),a("div",{className:`${m}__errored-filename-segment`},a("span",null,i.substr(o))),r<this.namesOfUnsupportedFiles.length-1?",":"")}))):a("span",null),a("div",{className:`${m}__instructions`},a("div",{"data-fragment":!0},a("span",null,s[0]),a("a",{href:"",onClick:this.handleBrowseLinkClick},s[1]),a("span",null,s[2]))),a("div",{className:`${m}__requirements`},this.acceptExtensions?a("span",null,"("," ",t("design-system:fileUpload.acceptedTypes",{fileTypes:this.acceptExtensionsDescription})," ",")"):"",this.maxSize?a("span",null,"("," ",t("design-system:fileUpload.maximumSize",{size:this.maxSize})," ",")"):"",this.customRequirement?a("span",null," ",this.customRequirement," "):""),this.downloadLabel&&a("div",{className:`sps-button sps-button--link ${m}__download-button`,onClick:this.handleDownloadButtonClick},a("button",{type:"button"},a("i",{className:"sps-icon sps-icon-download-cloud","aria-hidden":"true"})," ",this.downloadLabel)))),this.dismissable&&!this.processing&&a("div",{className:`sps-button sps-button--icon ${m}__close-button`,onClick:this.dismiss},a("button",{type:"button",title:t("design-system:fileUpload.close")},a("i",{className:"sps-icon sps-icon-x","aria-hidden":"true"}))),a("form",null,a("input",{type:"file",accept:this.accept||"*/*",multiple:this.multiple||null,onChange:this.handleFileInputChange})))}parseAndValidateMaxSize(t){try{this.maxSizeBytes=l.parseFileSize(t)}catch{throw new Error(`Could not parse "${t}" as a file size.`)}}processAcceptExtensions(t){const s=(Array.isArray(t)?t:t.trim().split(/\s?,\s?/)).map(r=>r.replace(/^\./,"")),i=s.map(r=>`.${r}`.toLowerCase());this.acceptExtensionsDescription=i.map((r,o)=>o>0&&o===i.length-1?`or ${r}`:r).join(i.length>2?", ":" "),this.acceptMIMETypes.clear();for(const r of s)for(const o of fe[r.toUpperCase()].split(","))this.acceptMIMETypes.add(o);this.accept=i.concat(Array.from(this.acceptMIMETypes)).join(",")}selectFiles(t){this.namesOfUnsupportedFiles=[];const n=Array.from(t);for(const s of n)this.acceptExtensions&&!this.acceptMIMETypes.has(s.type)&&this.namesOfUnsupportedFiles.push(s.name),this.maxSize&&s.size>this.maxSizeBytes&&this.namesOfUnsupportedFiles.indexOf(s.name)===-1&&this.namesOfUnsupportedFiles.push(s.name);this.namesOfUnsupportedFiles.length?(this.error=!0,this.fileInput.value=null,this.update()):(this.files=n,this.selection.dispatch(n))}handleDragOver(t){t.preventDefault(),t.stopPropagation()}handleDragEnter(t){t.preventDefault(),this.active=!0,this.error=!1,this.update()}handleDragLeave(t){t.preventDefault(),this.active=!1,this.update()}handleDrop(t){t.preventDefault(),t.stopPropagation(),this.active=!1,t.dataTransfer.items?this.selectFiles(Array.from(t.dataTransfer.items).map(n=>n.getAsFile())):this.selectFiles(t.dataTransfer.files),this.update()}handleBrowseLinkClick(t){t.preventDefault(),this.error=!1,this.update(),this.fileInput.click()}handleDownloadButtonClick(){this.download.dispatch()}handleFileInputChange(t){t.stopPropagation(),this.selectFiles(t.target.files)}};exports.SpsFileUploadComponent.displayName=m;exports.SpsFileUploadComponent.props={description:"string",multiple:"boolean",dismissable:"boolean",processing:"boolean",mini:"boolean",downloadLabel:"string",acceptExtensions:"Array<string> | string",maxSize:"string",customRequirement:"string",selection:{event:!0,type:"CustomEvent<Array<File>>"},dismissal:{event:!0,type:"CustomEvent<void>"},download:{event:!0,type:"CustomEvent<void>"}};g([c()],exports.SpsFileUploadComponent.prototype,"description",2);g([c(Boolean)],exports.SpsFileUploadComponent.prototype,"multiple",2);g([c(Boolean)],exports.SpsFileUploadComponent.prototype,"shown",2);g([c(Boolean)],exports.SpsFileUploadComponent.prototype,"dismissable",2);g([c(Boolean)],exports.SpsFileUploadComponent.prototype,"processing",2);g([c(Boolean)],exports.SpsFileUploadComponent.prototype,"mini",2);g([c(Boolean)],exports.SpsFileUploadComponent.prototype,"constrainContentWidth",2);g([c()],exports.SpsFileUploadComponent.prototype,"downloadLabel",2);g([c()],exports.SpsFileUploadComponent.prototype,"acceptExtensions",2);g([c()],exports.SpsFileUploadComponent.prototype,"maxSize",2);g([c()],exports.SpsFileUploadComponent.prototype,"customRequirement",2);g([J()],exports.SpsFileUploadComponent.prototype,"selection",2);g([J()],exports.SpsFileUploadComponent.prototype,"dismissal",2);g([J()],exports.SpsFileUploadComponent.prototype,"download",2);g([Y("input[type='file']")],exports.SpsFileUploadComponent.prototype,"fileInput",2);g([j("dragover")],exports.SpsFileUploadComponent.prototype,"handleDragOver",1);g([j("dragenter")],exports.SpsFileUploadComponent.prototype,"handleDragEnter",1);g([j("dragleave")],exports.SpsFileUploadComponent.prototype,"handleDragLeave",1);g([j("drop")],exports.SpsFileUploadComponent.prototype,"handleDrop",1);exports.SpsFileUploadComponent=g([D({tag:m})],exports.SpsFileUploadComponent);const Xt={basic:{label:"Basic File Upload",description:l.code`
183
+ */d.applyAttr=be,d.applyProp=we,d.attributes=R,d.close=Le;var le=d.currentElement=At,ce=d.currentPointer=Ot;d.open=ke;var Tt=d.patch=De;d.patchInner=De,d.patchOuter=_t,d.skip=Dt;var pe=d.skipNode=re;d.getKey=gt,d.clearCache=Ae,d.importNode=ye,d.isDataInitialized=mt,d.notifications=j,d.symbols=ee;var Re=d.attr=xt,Ut=d.elementClose=Ue;d.elementOpen=oe;var Rt=d.elementOpenEnd=Ft,Bt=d.elementOpenStart=Et;d.elementVoid=kt;var $t=d.text=Lt;d.key=It;function Be(e){let t=ce();return t instanceof Comment&&t.data!==e?t.data=e:(t=document.createComment(e),le().appendChild(t)),pe(),t}let $e=A.noI18nI18n;function jt(e){$e=e}function zt(){return $e}const E=Symbol("ComponentMetadata"),b=Object.freeze({has(e,t){return!!(e[E]&&Object.prototype.hasOwnProperty.call(e[E],t))},add(e,t){e[E]?Object.assign(e[E],t):e[E]=t},get(e,t,n){return e[E]&&e[E][t]||n}}),je=Symbol("ds-web-components:pragma:listeners-attached"),ze="idom-pragma:content-begin",de="idom-pragma:content-end";function he(e){for(const t of e)if(typeof t=="function")t();else if(typeof t=="string")$t(t);else if(t instanceof Set)he(Array.from(t));else if(Array.isArray(t)&&t.length>0){let n=ce();if(Be(ze),n===null){const s=le();for(let i=0;i<t.length;i+=1)s.contains(t[i])||s.appendChild(t[i]),pe()}for(;n&&n.data!==de;)pe(),n=ce();Be(de)}}function o(e,t,...n){if(t){for(const s of Object.keys(t))if(s.toUpperCase()==="DATA-FRAGMENT")return()=>he(n)}return()=>{Bt(e);const s=[];if(t)for(const r of Object.keys(t))r.toUpperCase()==="CLASSNAME"?Re("class",t[r]):/^on[A-Z]/.test(r)?s.push(r):Re(r,t[r]);Rt(e);const i=le();if(!i[je]){for(const r of s)i.addEventListener(r.substr(2).toLowerCase(),t[r]);i[je]=!0}he(n),Ut(e)}}function We(e,t){customElements.get(e)||customElements.define(e,t)}function Wt(...e){for(const t of e)We(b.get(t,"tag"),t)}function Vt(e){return function(...n){for(const s of n){const i=`${e}${b.get(s,"tag").substr(3)}`;We(i,s)}}}const ue=Symbol("Component Attribute Bindings"),I=Symbol("Component Class Bindings"),Q=Symbol("Component Style Bindings"),Ht={__initialized:!1,__observer:null,__queuedUpdate:null,__managedClasses:new Set,__updateHostBindings(){const e=this;for(const t of Object.keys(e[ue]||{}))e.setAttribute(t,e[ue][t]);for(const t of Object.keys(e[Q]||{}))e.style[t]=e[Q][t];for(const t of e.__managedClasses)e.classList.remove(t);for(const t of(e[I]||[]).filter(Boolean))e.__managedClasses.add(t),e.classList.add(t);for(const t of(e.getAttribute("classname")||"").split(/\w+/).filter(Boolean))e.classList.add(t)},__updateChildQueries(e){const t=this;for(const n of b.get(t.constructor,"childQueries",[]))if(!e||e&&n.refresh){const s=n.all?t.querySelectorAll:t.querySelector;t[n.key]=s.call(t,n.selector)}},__gatherChildren(){const e=this;let t=Array.from(e.childNodes),n=null,s=t.length;for(let i=0;i<t.length;i+=1){const r=t[i];r instanceof Comment&&(r.data===ze?n=i+1:r.data===de&&(s=i-1))}if(n===null)for(const i of t)i.parentNode.removeChild(i);else t=t.slice(n,s);b.has(e.constructor,"contentProp")&&(e[b.get(e.constructor,"contentProp")]=t)},__startMutObs(){const e=this;e.__observer||(e.__observer=new MutationObserver(()=>{e.contentChangedCallback&&e.contentChangedCallback(),e.__gatherChildren(),e.update()})),e.__observer.observe(e,{childList:!0})},__stopMutObs(){const e=this;e.__observer&&e.__observer.disconnect()},__doRender(){const e=this;e.__stopMutObs(),Tt(e,e.render(zt())),e.__startMutObs()},update(){const e=this;e.__initialized&&!e.__queuedUpdate&&(e.__queuedUpdate=window.requestAnimationFrame(()=>{e.__doRender(),setTimeout(()=>{e.__updateChildQueries(!0),e.__updateHostBindings()},0),e.__queuedUpdate=null}))},attributeChangedCallback(e,t,n){const s=this,i=n===""?!0:n;i!==t&&(s.__cbAttributeChanged&&s.__cbAttributeChanged(e,s[e],i),e!=="style"&&(s[e]=i),s.__initialized&&s.update())},connectedCallback(){const e=this;e.__cbConnected&&e.__cbConnected();const t=b.get(e.constructor,"eventListeners",[]);setTimeout(()=>{if(!e.__initialized){e.__gatherChildren();for(const[,n]of t)e[n]=e[n].bind(e);e.__initialized=!0}for(const[n,s]of t)e.addEventListener(n,e[s]);e.__doRender(),setTimeout(()=>{e.__updateChildQueries(),e.__updateHostBindings()},0)},0)},disconnectedCallback(){const e=this;e.__cbDisconnected&&e.__cbDisconnected();for(const[t,n]of b.get(e.constructor,"eventListeners",[]))e.removeEventListener(t,e[n]);e.__stopMutObs()}};function x(e){return t=>{b.add(t,e),Object.assign(t.prototype,{__cbAttributeChanged:t.prototype.attributeChangedCallback,__cbConnected:t.prototype.connectedCallback,__cbDisconnected:t.prototype.disconnectedCallback},Ht)}}function Z(){return(e,t)=>{b.add(e.constructor,{contentProp:t})}}function J(e){return(t,n)=>{Object.defineProperty(t,n,{get(){return Object.defineProperty(this,n,{value:{dispatch:s=>{const i=new CustomEvent(e||n,{detail:s});return this.dispatchEvent(i),i}}}),this[n]},configurable:!0})}}function z(e){return(t,n)=>{const s=b.get(t.constructor,"eventListeners",[]);s.push([e,n]),b.add(t.constructor,{eventListeners:s})}}function p(e){return(t,n)=>{const s=t.constructor,i=n.toLowerCase();if(s.observedAttributes=s.observedAttributes||["classname","className","style"],s.observedAttributes.push(n),s.observedAttributes.push(i),i!==n&&Object.defineProperty(t,n,{get(){return this[i]},set(r){this[i]=r}}),e){const r=Symbol.for(n);Object.defineProperty(t,i,{get(){return this[r]},set(l){let h=l;e===Boolean&&typeof l=="string"&&l.toLowerCase()==="false"?h=!1:h=e(l),this[r]=h}})}}}function Ve(e,t,n){return(s,i)=>{const r=b.get(s.constructor,"childQueries",[]);r.push({key:i,selector:e,all:n,refresh:t.refresh}),b.add(s.constructor,{childQueries:r})}}function Y(e,t={}){return Ve(e,t)}function He(e,t={}){return Ve(e,t,!0)}function fe(){return(e,t)=>{const n=Symbol(t);Object.defineProperties(e,{[n]:{writable:!0,enumerable:!1,configurable:!1,value:e[t]},[t]:{get(){return this[n]},set(s){this[n]!==s&&(this[n]=s,this.update())}}})}}var me=(e=>(e["7Z"]="application/x-7z-compressed",e.AAC="audio/aac",e.ABW="application/x-abiword",e.ARC="application/octet-stream",e.AVI="video/x-msvideo",e.AZW="application/vnd.amazon.ebook",e.BIN="application/octet-stream",e.BMP="image/bmp",e.BZ="application/x-bzip",e.BZ2="application/x-bzip2",e.CER="application/pkix-cert",e.CSH="application/x-csh",e.CSS="text/css",e.CSV="text/csv,application/vnd.ms-excel",e.DOC="application/msword",e.DOCX="application/vnd.openxmlformats-officedocument.wordprocessingml.document",e.EOT="application/vnd.ms-fontobject",e.EPUB="application/epub+zip",e.ES="application/ecmascript",e.FLV="video/x-flv",e.GIF="image/gif",e.GZ="application/x-gzip",e.HTM="text/html",e.HTML="text/html",e.ICO="image/x-icon",e.ICS="text/calendar",e.JAR="application/java-archive",e.JPEG="image/jpeg",e.JPG="image/jpeg",e.JS="application/javascript",e.JSON="application/json",e.M3U="audio/x-mpequrl",e.MID="audio/midi",e.MIDI="audio/midi",e.MOV="video/quicktime",e.MP3="audio/mpeg3",e.MP4="video/mp4",e.MPEG="video/mpeg",e.MPKG="application/vnd.apple.installer+xml",e.ODP="application/vnd.oasis.opendocument.presentation",e.ODS="application/vnd.oasis.opendocument.spreadsheet",e.ODT="application/vnd.oasis.opendocument.text",e.OGA="audio/ogg",e.OGV="video/ogg",e.OGX="application/ogg",e.OTF="font/otf",e.PNG="image/png",e.PDF="application/pdf",e.PPT="application/vnd.ms-powerpoint",e.PPTX="application/vnd.openxmlformats-officedocument.presentationml.presentation",e.RAR="application/x-rar-compressed",e.RTF="application/rtf",e.SH="application/x-sh",e.SVG="image/svg+xml",e.SWF="application/x-shockwave-flash",e.TAR="application/x-tar",e.TIF="image/tiff",e.TIFF="image/tiff",e.TS="application/typescript",e.TTF="font/ttf",e.TXT="text/plain",e.VSD="application/vnd.visio",e.WAV="audio/wav",e.WEBA="audio/webm",e.WEBM="video/webm",e.WEBP="image/webp",e.WOFF="font/woff",e.WOFF2="font/woff2",e.XHTML="application/xhtml+xml",e.XLS="application/vnd.ms-excel",e.XLSX="application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",e.XML="application/xml",e.XUL="application/vnd.mozilla.xul+xml",e.ZIP="application/zip",e))(me||{}),qt=Object.defineProperty,Gt=Object.getOwnPropertyDescriptor,f=(e,t,n,s)=>{for(var i=s>1?void 0:s?Gt(t,n):t,r=e.length-1,l;r>=0;r--)(l=e[r])&&(i=(s?l(t,n,i):l(i))||i);return s&&i&&qt(t,n,i),i};const m="sps-file-upload";a.SpsFileUploadComponent=class extends HTMLElement{constructor(){super(),this.shown=!0,this.files=[],this.acceptMIMETypes=new Set,this.active=!1,this.error=!1,this.namesOfUnsupportedFiles=[],this.handleBrowseLinkClick=this.handleBrowseLinkClick.bind(this),this.handleDownloadButtonClick=this.handleDownloadButtonClick.bind(this),this.handleFileInputChange=this.handleFileInputChange.bind(this),this.dismiss=this.dismiss.bind(this)}get[I](){return[m,this.active&&`${m}--active`,this.error&&`${m}--error`,!this.shown&&`${m}--hidden`,this.mini&&`${m}--mini`,this.constrainContentWidth&&`${m}--constrained-content-width`]}connectedCallback(){this.description=this.description||(this.multiple?"Files":"File"),this.acceptExtensions&&this.processAcceptExtensions(this.acceptExtensions),this.maxSize&&this.parseAndValidateMaxSize(this.maxSize)}attributeChangedCallback(t,n,s){t==="acceptExtensions"&&this.processAcceptExtensions(s),t==="maxSize"&&this.parseAndValidateMaxSize(s)}dismiss(){this.dismissable&&(this.shown=!1,this.update(),this.dismissal.dispatch())}show(){this.dismissable&&(this.shown=!0,this.update())}render({t}){const n=this.error?A.SpsIcon.EXCLAMATION_CIRCLE:A.SpsIcon.UPLOAD_CLOUD,s=(this.multiple?t("design-system:fileUpload.instructions_plural"):t("design-system:fileUpload.instructions")).split("|");return o("div",{"data-fragment":!0},o("div",{className:`${m}__content`},this.processing?o("div",{"data-fragment":!0},o("i",{className:"sps-spinner sps-spinner--medium","aria-hidden":"true"}),o("div",{className:`${m}__instructions`},t("design-system:fileUpload.processing"))):o("div",{"data-fragment":!0},o("i",{className:`sps-icon sps-icon-${n} ${m}__icon-primary`,"aria-hidden":"true"}),o("div",{className:`${m}__title`},this.error?o("div",{"data-fragment":!0},t(this.namesOfUnsupportedFiles.length>1?"design-system:fileUpload.cancelled_plural":"design-system:fileUpload.cancelled")):o("div",{"data-fragment":!0},t("design-system:fileUpload.title",{description:this.description}))),this.error?o("div",{className:`${m}__errored-files`},new Set(this.namesOfUnsupportedFiles.map((i,r)=>{const l=Math.floor(i.length/2);return o("div",{className:`${m}__errored-filename`,key:i},o("span",{className:`${m}__errored-filename-segment`},i.substr(0,l)),o("div",{className:`${m}__errored-filename-segment`},o("span",null,i.substr(l))),r<this.namesOfUnsupportedFiles.length-1?",":"")}))):o("span",null),o("div",{className:`${m}__instructions`},o("div",{"data-fragment":!0},o("span",null,s[0]),o("a",{href:"",onClick:this.handleBrowseLinkClick},s[1]),o("span",null,s[2]))),o("div",{className:`${m}__requirements`},this.acceptExtensions?o("span",null,"("," ",t("design-system:fileUpload.acceptedTypes",{fileTypes:this.acceptExtensionsDescription})," ",")"):"",this.maxSize?o("span",null,"("," ",t("design-system:fileUpload.maximumSize",{size:this.maxSize})," ",")"):"",this.customRequirement?o("span",null," ",this.customRequirement," "):""),this.downloadLabel&&o("div",{className:`sps-button sps-button--link ${m}__download-button`,onClick:this.handleDownloadButtonClick},o("button",{type:"button"},o("i",{className:"sps-icon sps-icon-download-cloud","aria-hidden":"true"})," ",this.downloadLabel)))),this.dismissable&&!this.processing&&o("div",{className:`sps-button sps-button--icon ${m}__close-button`,onClick:this.dismiss},o("button",{type:"button",title:t("design-system:fileUpload.close")},o("i",{className:"sps-icon sps-icon-x","aria-hidden":"true"}))),o("form",null,o("input",{type:"file",accept:this.accept||"*/*",multiple:this.multiple||null,onChange:this.handleFileInputChange})))}parseAndValidateMaxSize(t){try{this.maxSizeBytes=c.parseFileSize(t)}catch{throw new Error(`Could not parse "${t}" as a file size.`)}}processAcceptExtensions(t){const s=(Array.isArray(t)?t:t.trim().split(/\s?,\s?/)).map(r=>r.replace(/^\./,"")),i=s.map(r=>`.${r}`.toLowerCase());this.acceptExtensionsDescription=i.map((r,l)=>l>0&&l===i.length-1?`or ${r}`:r).join(i.length>2?", ":" "),this.acceptMIMETypes.clear();for(const r of s)for(const l of me[r.toUpperCase()].split(","))this.acceptMIMETypes.add(l);this.accept=i.concat(Array.from(this.acceptMIMETypes)).join(",")}selectFiles(t){this.namesOfUnsupportedFiles=[];const n=Array.from(t);for(const s of n)this.acceptExtensions&&!this.acceptMIMETypes.has(s.type)&&this.namesOfUnsupportedFiles.push(s.name),this.maxSize&&s.size>this.maxSizeBytes&&this.namesOfUnsupportedFiles.indexOf(s.name)===-1&&this.namesOfUnsupportedFiles.push(s.name);this.namesOfUnsupportedFiles.length?(this.error=!0,this.fileInput.value=null,this.update()):(this.files=n,this.selection.dispatch(n))}handleDragOver(t){t.preventDefault(),t.stopPropagation()}handleDragEnter(t){t.preventDefault(),this.active=!0,this.error=!1,this.update()}handleDragLeave(t){t.preventDefault(),this.active=!1,this.update()}handleDrop(t){t.preventDefault(),t.stopPropagation(),this.active=!1,t.dataTransfer.items?this.selectFiles(Array.from(t.dataTransfer.items).map(n=>n.getAsFile())):this.selectFiles(t.dataTransfer.files),this.update()}handleBrowseLinkClick(t){t.preventDefault(),this.error=!1,this.update(),this.fileInput.click()}handleDownloadButtonClick(){this.download.dispatch()}handleFileInputChange(t){t.stopPropagation(),this.selectFiles(t.target.files)}},a.SpsFileUploadComponent.displayName=m,a.SpsFileUploadComponent.props={description:"string",multiple:"boolean",dismissable:"boolean",processing:"boolean",mini:"boolean",downloadLabel:"string",acceptExtensions:"Array<string> | string",maxSize:"string",customRequirement:"string",selection:{event:!0,type:"CustomEvent<Array<File>>"},dismissal:{event:!0,type:"CustomEvent<void>"},download:{event:!0,type:"CustomEvent<void>"}},f([p()],a.SpsFileUploadComponent.prototype,"description",2),f([p(Boolean)],a.SpsFileUploadComponent.prototype,"multiple",2),f([p(Boolean)],a.SpsFileUploadComponent.prototype,"shown",2),f([p(Boolean)],a.SpsFileUploadComponent.prototype,"dismissable",2),f([p(Boolean)],a.SpsFileUploadComponent.prototype,"processing",2),f([p(Boolean)],a.SpsFileUploadComponent.prototype,"mini",2),f([p(Boolean)],a.SpsFileUploadComponent.prototype,"constrainContentWidth",2),f([p()],a.SpsFileUploadComponent.prototype,"downloadLabel",2),f([p()],a.SpsFileUploadComponent.prototype,"acceptExtensions",2),f([p()],a.SpsFileUploadComponent.prototype,"maxSize",2),f([p()],a.SpsFileUploadComponent.prototype,"customRequirement",2),f([J()],a.SpsFileUploadComponent.prototype,"selection",2),f([J()],a.SpsFileUploadComponent.prototype,"dismissal",2),f([J()],a.SpsFileUploadComponent.prototype,"download",2),f([Y("input[type='file']")],a.SpsFileUploadComponent.prototype,"fileInput",2),f([z("dragover")],a.SpsFileUploadComponent.prototype,"handleDragOver",1),f([z("dragenter")],a.SpsFileUploadComponent.prototype,"handleDragEnter",1),f([z("dragleave")],a.SpsFileUploadComponent.prototype,"handleDragLeave",1),f([z("drop")],a.SpsFileUploadComponent.prototype,"handleDrop",1),a.SpsFileUploadComponent=f([x({tag:m})],a.SpsFileUploadComponent);const Xt={basic:{label:"Basic File Upload",description:c.code`
184
184
  <p>Simply allow the user to drag-and-drop or select either a single file or multiple files at once.</p>
185
- `,examples:{single:{description:"<p>Single file upload</p>",react:l.code`
185
+ `,examples:{single:{description:"<p>Single file upload</p>",react:c.code`
186
186
  function Component() {
187
187
  const ref = React.useRef()
188
188
 
@@ -205,7 +205,7 @@
205
205
  </div>
206
206
  )
207
207
  }
208
- `},multiple:{description:"<p>Multiple file upload</p>",react:l.code`
208
+ `},multiple:{description:"<p>Multiple file upload</p>",react:c.code`
209
209
  function Component() {
210
210
  const ref = React.useRef()
211
211
 
@@ -228,9 +228,9 @@
228
228
  </div>
229
229
  )
230
230
  }
231
- `}}},restrictions:{label:"Restrictions",description:l.code`
231
+ `}}},restrictions:{label:"Restrictions",description:c.code`
232
232
  <p>You can place restrictions on what files will be accepted with an extension whitelist and/or a maximum size.</p>
233
- `,examples:{size:{description:"<p>Maximum size</p>",react:l.code`
233
+ `,examples:{size:{description:"<p>Maximum size</p>",react:c.code`
234
234
  function Component() {
235
235
  const ref = React.useRef()
236
236
 
@@ -253,7 +253,7 @@
253
253
  </div>
254
254
  )
255
255
  }
256
- `},type:{description:"<p>File type whitelist</p>",react:l.code`
256
+ `},type:{description:"<p>File type whitelist</p>",react:c.code`
257
257
  function Component() {
258
258
  const ref = React.useRef()
259
259
 
@@ -281,7 +281,7 @@
281
281
  </div>
282
282
  )
283
283
  }
284
- `},both:{description:"<p>Both restrictions</p>",react:l.code`
284
+ `},both:{description:"<p>Both restrictions</p>",react:c.code`
285
285
  function Component() {
286
286
  const ref = React.useRef()
287
287
 
@@ -310,10 +310,10 @@
310
310
  </div>
311
311
  )
312
312
  }
313
- `}}},dismissable:{label:"Dismissable",description:l.code`
313
+ `}}},dismissable:{label:"Dismissable",description:c.code`
314
314
  <p>With this option, the file upload component can be dismissed by the user. If the user does dismiss it, you can
315
315
  show it again programmatically if you need to.</p>
316
- `,examples:{dismissable:{react:l.code`
316
+ `,examples:{dismissable:{react:c.code`
317
317
  function Component() {
318
318
  const [showFileUpload, setShowFileUpload] = React.useState(true)
319
319
  const ref = React.useRef()
@@ -346,10 +346,10 @@
346
346
  </div>
347
347
  )
348
348
  }
349
- `}}},downloadButton:{label:"Download Button",description:l.code`
349
+ `}}},downloadButton:{label:"Download Button",description:c.code`
350
350
  <p>You can optionally provide a button to download a file. Typically this will be a template for
351
351
  whatever the user is expected to upload. They can then fill out the template, save it, and upload it.</p>
352
- `,examples:{downloadButton:{react:l.code`
352
+ `,examples:{downloadButton:{react:c.code`
353
353
  function Component() {
354
354
  const ref = React.useRef()
355
355
 
@@ -377,10 +377,10 @@
377
377
  </div>
378
378
  )
379
379
  }
380
- `}}},mini:{label:"Mini File Upload",description:l.code`
380
+ `}}},mini:{label:"Mini File Upload",description:c.code`
381
381
  <p>When the file upload component is to be placed in a small container,
382
382
  it should be marked as a mini file upload so that everything fits.</p>
383
- `,examples:{single:{react:l.code`
383
+ `,examples:{single:{react:c.code`
384
384
  function Component() {
385
385
  const ref = React.useRef()
386
386
 
@@ -403,11 +403,11 @@
403
403
  </div>
404
404
  )
405
405
  }
406
- `}}},constrainContentWidth:{label:"Constrain Content Width",description:l.code`
406
+ `}}},constrainContentWidth:{label:"Constrain Content Width",description:c.code`
407
407
  <p>If this prop is provided, the content will be restricted to 50% of
408
408
  the overall width of the component. Consult your product designer if
409
409
  you're not sure whether to use this variant.</p>
410
- `,examples:{constrainContentWidth:{react:l.code`
410
+ `,examples:{constrainContentWidth:{react:c.code`
411
411
  function Component() {
412
412
  const ref = React.useRef()
413
413
 
@@ -430,7 +430,7 @@
430
430
  </div>
431
431
  )
432
432
  }
433
- `}}}};var Kt=Object.defineProperty,Qt=Object.getOwnPropertyDescriptor,N=(e,t,n,s)=>{for(var i=s>1?void 0:s?Qt(t,n):t,r=e.length-1,o;r>=0;r--)(o=e[r])&&(i=(s?o(t,n,i):o(i))||i);return s&&i&&Kt(t,n,i),i};const b="sps-insight-card";exports.SpsInsightCardComponent=class extends HTMLElement{constructor(){super(...arguments),this.kind=R.SpsInsightCardKind.GENERAL}get[P](){return[b,`${b}--${this.kind}`,this.detail&&this.detail.children.length?`${b}--has-detail`:null]}render({t}){const n=a("div",{className:`${b}__metric-count`},this.metric),s=a("div",{className:`${b}__description`},a("div",{className:`${b}__title`,style:{"-webkit-box-orient":"vertical"}},this.title),a("div",{className:`${b}__detail`},this.content)),i=this.partnercount,r=this.totalpartners,[o,p,u]=(i?t("design-system:insightCard.partnerCount",{count:i,total:r}):"").split("|");return a("div",{"data-fragment":!0},a("div",{className:`${b}__body`},this.icon?a("i",{className:`sps-icon sps-icon-${this.icon}`}):a("i",{className:`sps-icon sps-icon-${R.SpsInsightCardIcons[this.kind]}`}),n,s),i&&a("div",{className:`${b}__partner-count`},i===r?a("div",null,t("design-system:insightCard.all")):a("div",{"data-fragment":!0},a("div",null,o),a("div",null,p),a("div",null,u)),a("div",{className:`${b}__partners-text`},t("design-system:insightCard.partners"))))}};exports.SpsInsightCardComponent.displayName=b;exports.SpsInsightCardComponent.props={icon:"SpsIcon",kind:"SpsInsightCardKind",title:"string",metric:"number",partnerCount:"number",totalPartners:"number",secondary:"boolean"};N([c()],exports.SpsInsightCardComponent.prototype,"icon",2);N([c()],exports.SpsInsightCardComponent.prototype,"kind",2);N([c()],exports.SpsInsightCardComponent.prototype,"title",2);N([c()],exports.SpsInsightCardComponent.prototype,"metric",2);N([c()],exports.SpsInsightCardComponent.prototype,"partnerCount",2);N([c()],exports.SpsInsightCardComponent.prototype,"totalPartners",2);N([c()],exports.SpsInsightCardComponent.prototype,"secondary",2);N([Z()],exports.SpsInsightCardComponent.prototype,"content",2);N([Y(`.${b}__detail`)],exports.SpsInsightCardComponent.prototype,"detail",2);exports.SpsInsightCardComponent=N([D({tag:b})],exports.SpsInsightCardComponent);var Zt=Object.defineProperty,Jt=Object.getOwnPropertyDescriptor,me=(e,t,n,s)=>{for(var i=s>1?void 0:s?Jt(t,n):t,r=e.length-1,o;r>=0;r--)(o=e[r])&&(i=(s?o(t,n,i):o(i))||i);return s&&i&&Zt(t,n,i),i};const x="sps-insights";exports.SpsInsightsComponent=class extends HTMLElement{constructor(){super(),this.content=[],this.showAdditionalInsights=!1,this.toggleAdditionalInsights=this.toggleAdditionalInsights.bind(this)}get[P](){return[x,this.showAdditionalInsights&&`${x}--show-additional`,this.details&&Array.from(this.details).every(t=>!t.textContent)?`${x}--no-details`:null,this.content.length===6?`${x}--break-4`:null,this.content.length===7?`${x}--break-5`:null,this.content.length===8?`${x}--break-5`:null]}toggleAdditionalInsights(){this.showAdditionalInsights=!this.showAdditionalInsights,this.update()}render(){return a("div",{"data-fragment":!0},this.content,this.content.length>10&&a("div",{className:"sps-button sps-button--link",onClick:this.toggleAdditionalInsights},a("button",{type:"button"},this.showAdditionalInsights?"Hide ":"Show ","Additional Insights")))}};exports.SpsInsightsComponent.displayName=x;exports.SpsInsightsComponent.props={};me([Z()],exports.SpsInsightsComponent.prototype,"content",2);me([Ve(".sps-insight-card__detail")],exports.SpsInsightsComponent.prototype,"details",2);exports.SpsInsightsComponent=me([D({tag:x})],exports.SpsInsightsComponent);const Yt={basic:{label:"Basic Insight Cards",examples:{basic:{jsx:l.code`
433
+ `}}}};var Kt=Object.defineProperty,Qt=Object.getOwnPropertyDescriptor,N=(e,t,n,s)=>{for(var i=s>1?void 0:s?Qt(t,n):t,r=e.length-1,l;r>=0;r--)(l=e[r])&&(i=(s?l(t,n,i):l(i))||i);return s&&i&&Kt(t,n,i),i};const w="sps-insight-card";a.SpsInsightCardComponent=class extends HTMLElement{constructor(){super(...arguments),this.kind=A.SpsInsightCardKind.GENERAL}get[I](){return[w,`${w}--${this.kind}`,this.detail&&this.detail.children.length?`${w}--has-detail`:null]}render({t}){const n=o("div",{className:`${w}__metric-count`},this.metric),s=o("div",{className:`${w}__description`},o("div",{className:`${w}__title`,style:{"-webkit-box-orient":"vertical"}},this.title),o("div",{className:`${w}__detail`},this.content)),i=this.partnercount,r=this.totalpartners,[l,h,g]=(i?t("design-system:insightCard.partnerCount",{count:i,total:r}):"").split("|");return o("div",{"data-fragment":!0},o("div",{className:`${w}__body`},this.icon?o("i",{className:`sps-icon sps-icon-${this.icon}`}):o("i",{className:`sps-icon sps-icon-${A.SpsInsightCardIcons[this.kind]}`}),n,s),i&&o("div",{className:`${w}__partner-count`},i===r?o("div",null,t("design-system:insightCard.all")):o("div",{"data-fragment":!0},o("div",null,l),o("div",null,h),o("div",null,g)),o("div",{className:`${w}__partners-text`},t("design-system:insightCard.partners"))))}},a.SpsInsightCardComponent.displayName=w,a.SpsInsightCardComponent.props={icon:"SpsIcon",kind:"SpsInsightCardKind",title:"string",metric:"number",partnerCount:"number",totalPartners:"number",secondary:"boolean"},N([p()],a.SpsInsightCardComponent.prototype,"icon",2),N([p()],a.SpsInsightCardComponent.prototype,"kind",2),N([p()],a.SpsInsightCardComponent.prototype,"title",2),N([p()],a.SpsInsightCardComponent.prototype,"metric",2),N([p()],a.SpsInsightCardComponent.prototype,"partnerCount",2),N([p()],a.SpsInsightCardComponent.prototype,"totalPartners",2),N([p()],a.SpsInsightCardComponent.prototype,"secondary",2),N([Z()],a.SpsInsightCardComponent.prototype,"content",2),N([Y(`.${w}__detail`)],a.SpsInsightCardComponent.prototype,"detail",2),a.SpsInsightCardComponent=N([x({tag:w})],a.SpsInsightCardComponent);var Zt=Object.defineProperty,Jt=Object.getOwnPropertyDescriptor,ge=(e,t,n,s)=>{for(var i=s>1?void 0:s?Jt(t,n):t,r=e.length-1,l;r>=0;r--)(l=e[r])&&(i=(s?l(t,n,i):l(i))||i);return s&&i&&Zt(t,n,i),i};const O="sps-insights";a.SpsInsightsComponent=class extends HTMLElement{constructor(){super(),this.content=[],this.showAdditionalInsights=!1,this.toggleAdditionalInsights=this.toggleAdditionalInsights.bind(this)}get[I](){return[O,this.showAdditionalInsights&&`${O}--show-additional`,this.details&&Array.from(this.details).every(t=>!t.textContent)?`${O}--no-details`:null,this.content.length===6?`${O}--break-4`:null,this.content.length===7?`${O}--break-5`:null,this.content.length===8?`${O}--break-5`:null]}toggleAdditionalInsights(){this.showAdditionalInsights=!this.showAdditionalInsights,this.update()}render(){return o("div",{"data-fragment":!0},this.content,this.content.length>10&&o("div",{className:"sps-button sps-button--link",onClick:this.toggleAdditionalInsights},o("button",{type:"button"},this.showAdditionalInsights?"Hide ":"Show ","Additional Insights")))}},a.SpsInsightsComponent.displayName=O,a.SpsInsightsComponent.props={},ge([Z()],a.SpsInsightsComponent.prototype,"content",2),ge([He(".sps-insight-card__detail")],a.SpsInsightsComponent.prototype,"details",2),a.SpsInsightsComponent=ge([x({tag:O})],a.SpsInsightsComponent);const Yt={basic:{label:"Basic Insight Cards",examples:{basic:{jsx:c.code`
434
434
  <sps-insights>
435
435
  <sps-insight-card kind="general"
436
436
  metric="1234"
@@ -453,7 +453,7 @@
453
453
  title="Insight Card Title"
454
454
  ></sps-insight-card>
455
455
  </sps-insights>
456
- `}}},details:{label:"With Details",examples:{details:{jsx:l.code`
456
+ `}}},details:{label:"With Details",examples:{details:{jsx:c.code`
457
457
  <sps-insights>
458
458
  <sps-insight-card kind="general"
459
459
  metric="1234"
@@ -498,7 +498,7 @@
498
498
  <span className="gray600 font-weight-bold">Detail:</span> 792 units
499
499
  </sps-insight-card>
500
500
  </sps-insights>
501
- `}}},partner_count:{label:"Partner Count",examples:{partner_count:{jsx:l.code`
501
+ `}}},partner_count:{label:"Partner Count",examples:{partner_count:{jsx:c.code`
502
502
  <sps-insights>
503
503
  <sps-insight-card kind="general"
504
504
  metric="1234"
@@ -531,7 +531,7 @@
531
531
  totalPartners="250"
532
532
  ></sps-insight-card>
533
533
  </sps-insights>
534
- `}}},expansion:{label:"10+ Insight Cards",examples:{expansion:{jsx:l.code`
534
+ `}}},expansion:{label:"10+ Insight Cards",examples:{expansion:{jsx:c.code`
535
535
  <sps-insights>
536
536
  <sps-insight-card kind="general"
537
537
  metric="1234"
@@ -640,10 +640,10 @@
640
640
  <span className="gray600 font-weight-bold">Detail:</span> 792 units
641
641
  </sps-insight-card>
642
642
  </sps-insights>
643
- `}}},events:{label:"Adding a click handler",description:l.code`
643
+ `}}},events:{label:"Adding a click handler",description:c.code`
644
644
  <p>Attaching event handlers to native web components in React cannot be done the usual way at this time.
645
645
  Here is how to do it:</p>
646
- `,examples:{events:{react:l.code`
646
+ `,examples:{events:{react:c.code`
647
647
  function Component() {
648
648
  function handleClick() {
649
649
  window.alert("Insight card clicked");
@@ -675,7 +675,7 @@
675
675
  </sps-insights>
676
676
  );
677
677
  }
678
- `}}},alternateIcon:{label:"Using alternate icons",examples:{basic:{react:l.code`
678
+ `}}},alternateIcon:{label:"Using alternate icons",examples:{basic:{react:c.code`
679
679
  function DemoComponent() {
680
680
  return (
681
681
  <sps-insights>
@@ -712,9 +712,9 @@
712
712
  </sps-insights>
713
713
  )
714
714
  }
715
- `}}}};var Mt=Object.defineProperty,en=Object.getOwnPropertyDescriptor,E=(e,t,n,s)=>{for(var i=s>1?void 0:s?en(t,n):t,r=e.length-1,o;r>=0;r--)(o=e[r])&&(i=(s?o(t,n,i):o(i))||i);return s&&i&&Mt(t,n,i),i};exports.SpsNavTabComponent=class extends HTMLElement{constructor(){super(...arguments),this.active=!1,this.label="",this.tag=""}get[P](){return["sps-tabbed-nav__nav-item",this.active&&"sps-tabbed-nav__nav-item--active"]}render(){return a("a",{href:this.href,target:this.target,className:"sps-tabbed-nav__nav-item-link",tabIndex:0},this.icon&&a("i",{className:`sps-icon sps-icon-${this.icon}`}),this.label&&a("span",null,this.label),this.tag&&a("span",{className:"sps-tag sps-tag--default"},this.tag))}};exports.SpsNavTabComponent.displayName="sps-nav-tab";exports.SpsNavTabComponent.props={active:"boolean",label:"string",icon:"SpsIcon",tag:"string",href:"string",target:"string"};E([c()],exports.SpsNavTabComponent.prototype,"active",2);E([c()],exports.SpsNavTabComponent.prototype,"label",2);E([c()],exports.SpsNavTabComponent.prototype,"icon",2);E([c()],exports.SpsNavTabComponent.prototype,"tag",2);E([c()],exports.SpsNavTabComponent.prototype,"href",2);E([c()],exports.SpsNavTabComponent.prototype,"target",2);exports.SpsNavTabComponent=E([D({tag:"sps-nav-tab"})],exports.SpsNavTabComponent);var tn=Object.defineProperty,nn=Object.getOwnPropertyDescriptor,He=(e,t,n,s)=>{for(var i=s>1?void 0:s?nn(t,n):t,r=e.length-1,o;r>=0;r--)(o=e[r])&&(i=(s?o(t,n,i):o(i))||i);return s&&i&&tn(t,n,i),i};exports.SpsNavTabSetComponent=class extends HTMLElement{constructor(){super(...arguments),this.content=[]}render(){return a("nav",{className:"sps-tabbed-nav"},this.content)}};exports.SpsNavTabSetComponent.displayName="sps-nav-tab-set";exports.SpsNavTabSetComponent.props={};He([Z()],exports.SpsNavTabSetComponent.prototype,"content",2);exports.SpsNavTabSetComponent=He([D({tag:"sps-nav-tab-set"})],exports.SpsNavTabSetComponent);const sn={basic:{label:"Basic Navigation Tabs",description:l.code`
715
+ `}}}};var Mt=Object.defineProperty,en=Object.getOwnPropertyDescriptor,F=(e,t,n,s)=>{for(var i=s>1?void 0:s?en(t,n):t,r=e.length-1,l;r>=0;r--)(l=e[r])&&(i=(s?l(t,n,i):l(i))||i);return s&&i&&Mt(t,n,i),i};a.SpsNavTabComponent=class extends HTMLElement{constructor(){super(...arguments),this.active=!1,this.label="",this.tag=""}get[I](){return["sps-tabbed-nav__nav-item",this.active&&"sps-tabbed-nav__nav-item--active"]}render(){return o("a",{href:this.href,target:this.target,className:"sps-tabbed-nav__nav-item-link",tabIndex:0},this.icon&&o("i",{className:`sps-icon sps-icon-${this.icon}`}),this.label&&o("span",null,this.label),this.tag&&o("span",{className:"sps-tag sps-tag--default"},this.tag))}},a.SpsNavTabComponent.displayName="sps-nav-tab",a.SpsNavTabComponent.props={active:"boolean",label:"string",icon:"SpsIcon",tag:"string",href:"string",target:"string"},F([p()],a.SpsNavTabComponent.prototype,"active",2),F([p()],a.SpsNavTabComponent.prototype,"label",2),F([p()],a.SpsNavTabComponent.prototype,"icon",2),F([p()],a.SpsNavTabComponent.prototype,"tag",2),F([p()],a.SpsNavTabComponent.prototype,"href",2),F([p()],a.SpsNavTabComponent.prototype,"target",2),a.SpsNavTabComponent=F([x({tag:"sps-nav-tab"})],a.SpsNavTabComponent);var tn=Object.defineProperty,nn=Object.getOwnPropertyDescriptor,qe=(e,t,n,s)=>{for(var i=s>1?void 0:s?nn(t,n):t,r=e.length-1,l;r>=0;r--)(l=e[r])&&(i=(s?l(t,n,i):l(i))||i);return s&&i&&tn(t,n,i),i};a.SpsNavTabSetComponent=class extends HTMLElement{constructor(){super(...arguments),this.content=[]}render(){return o("nav",{className:"sps-tabbed-nav"},this.content)}},a.SpsNavTabSetComponent.displayName="sps-nav-tab-set",a.SpsNavTabSetComponent.props={},qe([Z()],a.SpsNavTabSetComponent.prototype,"content",2),a.SpsNavTabSetComponent=qe([x({tag:"sps-nav-tab-set"})],a.SpsNavTabSetComponent);const sn={basic:{label:"Basic Navigation Tabs",description:c.code`
716
716
  <p>Navigation tabs native web component</p>
717
- `,examples:{basic:{react:l.code`
717
+ `,examples:{basic:{react:c.code`
718
718
  function DemoComponent() {
719
719
  const tabs = [
720
720
  { label: "Tab A", icon: "chart-line" },
@@ -739,14 +739,14 @@
739
739
  </sps-nav-tab-set>
740
740
  )
741
741
  }
742
- `}}}};var rn=Object.defineProperty,an=Object.getOwnPropertyDescriptor,y=(e,t,n,s)=>{for(var i=s>1?void 0:s?an(t,n):t,r=e.length-1,o;r>=0;r--)(o=e[r])&&(i=(s?o(t,n,i):o(i))||i);return s&&i&&rn(t,n,i),i},qe=(e=>(e.FIT="fit",e.FILL="fill",e))(qe||{});const F="sps-photo";exports.SpsPhotoComponent=class extends HTMLElement{constructor(){super(...arguments),this.mode="fill"}get image(){return this.imageInternal}set image(t){this.imageInternal=t,t&&(this.waitForImgHeightInterval&&window.clearInterval(this.waitForImgHeightInterval),this.waitForImgHeightInterval=window.setInterval(()=>{const n=t.getBoundingClientRect();if(n.height){window.clearInterval(this.waitForImgHeightInterval),delete this.waitForImgHeightInterval;let s=n.width/n.height>1;this.fitWidth=s===(this.mode==="fit")}},1e3/60))}get[P](){return[F,this.fitWidth?`${F}--fit-width`:`${F}--fit-height`,this.placeholderIcon&&`${F}--placeholder`]}get[G](){return{fontSize:`${this.width*.05}rem`,width:`${this.width}rem`,height:`${.75*this.width}rem`}}connectedCallback(){this.waitForWidthInterval=window.setInterval(()=>{const t=this.getBoundingClientRect();t.width&&(this.setWidth(t.width),window.clearInterval(this.waitForWidthInterval),delete this.waitForWidthInterval)},1e3/60)}disconnectedCallback(){this.waitForWidthInterval&&window.clearInterval(this.waitForWidthInterval),this.waitForImgHeightInterval&&window.clearInterval(this.waitForImgHeightInterval)}render(){return this.src?this.width?a("img",{src:this.src,alt:this.altText}):a("span",null):a("i",{className:`sps-icon sps-icon-${this.placeholderIcon}`})}setWidth(t){if(t&&!this.width){const n=document.body.parentElement.style.fontSize||"16px",s=Number(n.substr(0,n.length-2));this.width=t/s}}};exports.SpsPhotoComponent.displayName=F;exports.SpsPhotoComponent.props={src:"string",altText:"string",mode:"SpsPhotoDisplayMode",placeholderIcon:"SpsIcon"};y([c()],exports.SpsPhotoComponent.prototype,"src",2);y([c()],exports.SpsPhotoComponent.prototype,"altText",2);y([c()],exports.SpsPhotoComponent.prototype,"mode",2);y([c()],exports.SpsPhotoComponent.prototype,"placeholderIcon",2);y([ue()],exports.SpsPhotoComponent.prototype,"width",2);y([ue()],exports.SpsPhotoComponent.prototype,"fitWidth",2);y([Y("img",{refresh:!0})],exports.SpsPhotoComponent.prototype,"image",1);exports.SpsPhotoComponent=y([D({tag:F})],exports.SpsPhotoComponent);const on={sizing:{label:"Sizing",description:l.code`
742
+ `}}}};var an=Object.defineProperty,rn=Object.getOwnPropertyDescriptor,D=(e,t,n,s)=>{for(var i=s>1?void 0:s?rn(t,n):t,r=e.length-1,l;r>=0;r--)(l=e[r])&&(i=(s?l(t,n,i):l(i))||i);return s&&i&&an(t,n,i),i},Ge=(e=>(e.FIT="fit",e.FILL="fill",e))(Ge||{});const U="sps-photo";a.SpsPhotoComponent=class extends HTMLElement{constructor(){super(...arguments),this.mode="fill"}get image(){return this.imageInternal}set image(t){this.imageInternal=t,t&&(this.waitForImgHeightInterval&&window.clearInterval(this.waitForImgHeightInterval),this.waitForImgHeightInterval=window.setInterval(()=>{const n=t.getBoundingClientRect();if(n.height){window.clearInterval(this.waitForImgHeightInterval),delete this.waitForImgHeightInterval;let s=n.width/n.height>1;this.fitWidth=s===(this.mode==="fit")}},1e3/60))}get[I](){return[U,this.fitWidth?`${U}--fit-width`:`${U}--fit-height`,this.placeholderIcon&&`${U}--placeholder`]}get[Q](){return{fontSize:`${this.width*.05}rem`,width:`${this.width}rem`,height:`${.75*this.width}rem`}}connectedCallback(){this.waitForWidthInterval=window.setInterval(()=>{const t=this.getBoundingClientRect();t.width&&(this.setWidth(t.width),window.clearInterval(this.waitForWidthInterval),delete this.waitForWidthInterval)},1e3/60)}disconnectedCallback(){this.waitForWidthInterval&&window.clearInterval(this.waitForWidthInterval),this.waitForImgHeightInterval&&window.clearInterval(this.waitForImgHeightInterval)}render(){return this.src?this.width?o("img",{src:this.src,alt:this.altText}):o("span",null):o("i",{className:`sps-icon sps-icon-${this.placeholderIcon}`})}setWidth(t){if(t&&!this.width){const n=document.body.parentElement.style.fontSize||"16px",s=Number(n.substr(0,n.length-2));this.width=t/s}}},a.SpsPhotoComponent.displayName=U,a.SpsPhotoComponent.props={src:"string",altText:"string",mode:"SpsPhotoDisplayMode",placeholderIcon:"SpsIcon"},D([p()],a.SpsPhotoComponent.prototype,"src",2),D([p()],a.SpsPhotoComponent.prototype,"altText",2),D([p()],a.SpsPhotoComponent.prototype,"mode",2),D([p()],a.SpsPhotoComponent.prototype,"placeholderIcon",2),D([fe()],a.SpsPhotoComponent.prototype,"width",2),D([fe()],a.SpsPhotoComponent.prototype,"fitWidth",2),D([Y("img",{refresh:!0})],a.SpsPhotoComponent.prototype,"image",1),a.SpsPhotoComponent=D([x({tag:U})],a.SpsPhotoComponent);const on={sizing:{label:"Sizing",description:c.code`
743
743
  <p>
744
744
  Photos are block elements, so a photo fills its container's width unless
745
745
  an explicit width is set. It is always a 4:3 aspect ratio. In this example,
746
746
  photos have been placed in cards which have different widths in the 12
747
747
  column grid.
748
748
  </p>
749
- `,examples:{basic:{jsx:l.code`
749
+ `,examples:{basic:{jsx:c.code`
750
750
  <div className="sfg-row">
751
751
  <div className="sfg-col-2">
752
752
  <sps-card>
@@ -764,7 +764,7 @@
764
764
  </sps-card>
765
765
  </div>
766
766
  </div>
767
- `}}},displayMode:{label:"Fill vs. Fit",description:l.code`
767
+ `}}},displayMode:{label:"Fill vs. Fit",description:c.code`
768
768
  <p>
769
769
  There are two display modes available:
770
770
  <ul>
@@ -772,7 +772,7 @@
772
772
  <li><b>"fit"</b> fits the entire image into the container, leaving any excess portions of the container blank.
773
773
  </ul>
774
774
  </p>
775
- `,examples:{landscape:{description:"<p>Landscape oriented photo (container outline added for illustrative purposes)</p>",jsx:l.code`
775
+ `,examples:{landscape:{description:"<p>Landscape oriented photo (container outline added for illustrative purposes)</p>",jsx:c.code`
776
776
  <div className="sfg-row">
777
777
  <div className="sfg-col-4">
778
778
  <sps-photo src="assets/images/photo-landscape.jpg" mode="fill"></sps-photo>
@@ -781,7 +781,7 @@
781
781
  <sps-photo src="assets/images/photo-landscape.jpg" mode="fit"></sps-photo>
782
782
  </div>
783
783
  </div>
784
- `},portrait:{description:"<p>Portrait oriented photo (container outline added for illustrative purposes)</p>",jsx:l.code`
784
+ `},portrait:{description:"<p>Portrait oriented photo (container outline added for illustrative purposes)</p>",jsx:c.code`
785
785
  <div className="sfg-row">
786
786
  <div className="sfg-col-4">
787
787
  <sps-photo src="assets/images/photo-portrait.jpg" mode="fill"></sps-photo>
@@ -790,7 +790,7 @@
790
790
  <sps-photo id="foo" src="assets/images/photo-portrait.jpg" mode="fit"></sps-photo>
791
791
  </div>
792
792
  </div>
793
- `}}},placeholder:{label:"Placeholders",description:l.code`
793
+ `}}},placeholder:{label:"Placeholders",description:c.code`
794
794
  <p>
795
795
  When an image is not provided for a particular use case (such as a user avatar,
796
796
  a company photo, item image, etc.), a placeholder should be shown in its place.
@@ -798,34 +798,34 @@
798
798
  The placeholder's icon, selected from our SPS icon set, should represent the
799
799
  type of image it is substituting for.
800
800
  </p>
801
- `,examples:{general:{description:"<p>General Photo</p>",jsx:l.code`
801
+ `,examples:{general:{description:"<p>General Photo</p>",jsx:c.code`
802
802
  <div className="sfg-row">
803
803
  <div className="sfg-col-3">
804
804
  <sps-photo placeholderIcon="photo"></sps-photo>
805
805
  </div>
806
806
  </div>
807
- `},photoAlt:{description:"<p>Photo Alt</p>",jsx:l.code`
807
+ `},photoAlt:{description:"<p>Photo Alt</p>",jsx:c.code`
808
808
  <div className="sfg-row">
809
809
  <div className="sfg-col-3">
810
810
  <sps-photo placeholderIcon="camera"></sps-photo>
811
811
  </div>
812
812
  </div>
813
- `},user:{description:"<p>User / Single Person</p>",jsx:l.code`
813
+ `},user:{description:"<p>User / Single Person</p>",jsx:c.code`
814
814
  <div className="sfg-row">
815
815
  <div className="sfg-col-3">
816
816
  <sps-photo placeholderIcon="user"></sps-photo>
817
817
  </div>
818
818
  </div>
819
- `},group:{description:"<p>Group / Multiple People</p>",jsx:l.code`
819
+ `},group:{description:"<p>Group / Multiple People</p>",jsx:c.code`
820
820
  <div className="sfg-row">
821
821
  <div className="sfg-col-3">
822
822
  <sps-photo placeholderIcon="group"></sps-photo>
823
823
  </div>
824
824
  </div>
825
- `},company:{description:"<p>Company / Building</p>",jsx:l.code`
825
+ `},company:{description:"<p>Company / Building</p>",jsx:c.code`
826
826
  <div className="sfg-row">
827
827
  <div className="sfg-col-3">
828
828
  <sps-photo placeholderIcon="building"></sps-photo>
829
829
  </div>
830
830
  </div>
831
- `}}}};exports.AttrBindings=re;exports.ClassBindings=P;exports.Component=D;exports.Content=Z;exports.EventDispatcher=J;exports.EventListener=j;exports.MANIFEST=Xe;exports.MIMEType=fe;exports.Prop=c;exports.QuerySelector=Y;exports.QuerySelectorAll=Ve;exports.SpsFileUploadExamples=Xt;exports.SpsInsightCardExamples=Yt;exports.SpsNavTabsExamples=sn;exports.SpsPhotoDisplayMode=qe;exports.SpsPhotoExamples=on;exports.StyleBindings=G;exports.Watch=ue;exports.h=a;exports.namespaceOverrideRegistrar=Vt;exports.register=Wt;exports.webComponentsUseI18n=jt;
831
+ `}}}};a.AttrBindings=ue,a.ClassBindings=I,a.Component=x,a.Content=Z,a.EventDispatcher=J,a.EventListener=z,a.MANIFEST=Xe,a.MIMEType=me,a.Prop=p,a.QuerySelector=Y,a.QuerySelectorAll=He,a.SpsFileUploadExamples=Xt,a.SpsInsightCardExamples=Yt,a.SpsNavTabsExamples=sn,a.SpsPhotoDisplayMode=Ge,a.SpsPhotoExamples=on,a.StyleBindings=Q,a.Watch=fe,a.h=o,a.namespaceOverrideRegistrar=Vt,a.register=Wt,a.webComponentsUseI18n=jt,Object.defineProperty(a,Symbol.toStringTag,{value:"Module"})});
package/dist/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@spscommerce/ds-web-components",
3
3
  "description": "SPS Design System Native Web Components",
4
- "version": "8.21.0",
4
+ "version": "8.21.2",
5
5
  "author": "SPS Commerce",
6
6
  "license": "UNLICENSED",
7
7
  "repository": "https://github.com/spscommerce/woodland/tree/main/packages/@spscommerce/ds-web-components",
@@ -16,14 +16,15 @@
16
16
  "build:create-dist": "mkdir -p dist && cp -r lib dist/ && cp package.json dist/ && cp README.md dist/ && cp global.d.ts dist/",
17
17
  "build:copy-dist": "node ../../scripts/copy-built-package.js ../../node_modules/@spscommerce/ds-web-components"
18
18
  },
19
- "main": "./lib/index.cjs.js",
20
- "module": "./lib/index.es.js",
19
+ "type": "module",
20
+ "module": "./lib/index.js",
21
+ "main": "./lib/index.umd.cjs",
21
22
  "types": "./lib/index.d.ts",
22
23
  "exports": {
23
24
  ".": {
24
- "import": "./lib/index.es.js",
25
- "require": "./lib/index.cjs.js",
26
- "default": "./lib/index.cjs.js",
25
+ "require": "./lib/index.umd.cjs",
26
+ "import": "./lib/index.js",
27
+ "default": "./lib/index.js",
27
28
  "types": "./lib/index.d.ts"
28
29
  }
29
30
  },
@@ -1,4 +1,4 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const R=require("@spscommerce/ds-shared"),l=require("@spscommerce/utils"),Xe={};var d={};Object.defineProperty(d,"__esModule",{value:!0});/**
1
+ (function(a,A){typeof exports=="object"&&typeof module<"u"?A(exports,require("@spscommerce/ds-shared"),require("@spscommerce/utils")):typeof define=="function"&&define.amd?define(["exports","@spscommerce/ds-shared","@spscommerce/utils"],A):(a=typeof globalThis<"u"?globalThis:a||self,A(a.DSWebComponents={},a.dsShared,a.utils))})(this,function(a,A,c){"use strict";const Xe={};var d={};Object.defineProperty(d,"__esModule",{value:!0});/**
2
2
  * @license
3
3
  * Copyright 2018 The Incremental DOM Authors. All Rights Reserved.
4
4
  *
@@ -13,7 +13,7 @@
13
13
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
14
  * See the License for the specific language governing permissions and
15
15
  * limitations under the License.
16
- */var ae={default:"__default"};/**
16
+ */var ee={default:"__default"};/**
17
17
  * @license
18
18
  * Copyright 2018 The Incremental DOM Authors. All Rights Reserved.
19
19
  *
@@ -28,7 +28,7 @@
28
28
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
29
29
  * See the License for the specific language governing permissions and
30
30
  * limitations under the License.
31
- */var Ke=Object.prototype.hasOwnProperty;function _e(){}_e.prototype=Object.create(null);function Qe(e,t){return Ke.call(e,t)}function Se(){return new _e}function oe(e,t){for(;e.length>t;)e.pop()}/**
31
+ */var Ke=Object.prototype.hasOwnProperty;function ve(){}ve.prototype=Object.create(null);function Qe(e,t){return Ke.call(e,t)}function Ce(){return new ve}function te(e,t){for(;e.length>t;)e.pop()}/**
32
32
  * @license
33
33
  * Copyright 2018 The Incremental DOM Authors. All Rights Reserved.
34
34
  *
@@ -43,7 +43,7 @@
43
43
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
44
44
  * See the License for the specific language governing permissions and
45
45
  * limitations under the License.
46
- */function Ze(e){if(e.lastIndexOf("xml:",0)===0)return"http://www.w3.org/XML/1998/namespace";if(e.lastIndexOf("xlink:",0)===0)return"http://www.w3.org/1999/xlink"}function Ne(e,t,n){if(n==null)e.removeAttribute(t);else{var s=Ze(t);s?e.setAttributeNS(s,t,String(n)):e.setAttribute(t,String(n))}}function xe(e,t,n){e[t]=n}function Je(e,t,n){t.indexOf("-")>=0?e.setProperty(t,n):e[t]=n}function Ye(e,t,n){if(typeof n=="string")e.style.cssText=n;else{e.style.cssText="";var s=e.style;for(var i in n)Qe(n,i)&&Je(s,i,n[i])}}function Me(e,t,n){var s=typeof n;s==="object"||s==="function"?xe(e,t,n):Ne(e,t,n)}var B=Se();B[ae.default]=Me;B.style=Ye;function U(e,t,n){var s=B[t]||B[ae.default];s(e,t,n)}/**
46
+ */function Ze(e){if(e.lastIndexOf("xml:",0)===0)return"http://www.w3.org/XML/1998/namespace";if(e.lastIndexOf("xlink:",0)===0)return"http://www.w3.org/1999/xlink"}function be(e,t,n){if(n==null)e.removeAttribute(t);else{var s=Ze(t);s?e.setAttributeNS(s,t,String(n)):e.setAttribute(t,String(n))}}function we(e,t,n){e[t]=n}function Je(e,t,n){t.indexOf("-")>=0?e.setProperty(t,n):e[t]=n}function Ye(e,t,n){if(typeof n=="string")e.style.cssText=n;else{e.style.cssText="";var s=e.style;for(var i in n)Qe(n,i)&&Je(s,i,n[i])}}function Me(e,t,n){var s=typeof n;s==="object"||s==="function"?we(e,t,n):be(e,t,n)}var R=Ce();R[ee.default]=Me,R.style=Ye;function B(e,t,n){var s=R[t]||R[ee.default];s(e,t,n)}/**
47
47
  * @license
48
48
  * Copyright 2018 The Incremental DOM Authors. All Rights Reserved.
49
49
  *
@@ -58,9 +58,9 @@
58
58
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
59
59
  * See the License for the specific language governing permissions and
60
60
  * limitations under the License.
61
- */var $=!1,ee=!1;function ye(e,t){if(!t)throw new Error("Cannot call "+e+"() unless in patch.")}function et(e,t){if(e!==t){for(var n=e,s=[];n&&n!==t;)s.push(n.nodeName.toLowerCase()),n=n.parentNode;throw new Error(`One or more tags were not closed:
61
+ */var $=!1,ne=!1;function _e(e,t){if(!t)throw new Error("Cannot call "+e+"() unless in patch.")}function et(e,t){if(e!==t){for(var n=e,s=[];n&&n!==t;)s.push(n.nodeName.toLowerCase()),n=n.parentNode;throw new Error(`One or more tags were not closed:
62
62
  `+s.join(`
63
- `))}}function tt(e){e||console.warn("patchOuter requires the node have a parent if there is a key.")}function k(e){if($)throw new Error(e+"() can not be called between elementOpenStart() and elementOpenEnd().")}function Ae(e){if(ee)throw new Error(e+"() may not be called inside an element that has called skip().")}function le(e){if(!$)throw new Error(e+"() can only be called after calling elementOpenStart().")}function nt(){if($)throw new Error("elementOpenEnd() must be called after calling elementOpenStart().")}function st(e,t){if(e!==t)throw new Error('Received a call to close "'+t+'" but "'+e+'" was open.')}function it(e,t){if(t!==null)throw new Error(e+"() must come before any child declarations inside the current element.")}function rt(e,t,n,s){X(e);var i=e,r=t,o=r.nextSibling===n&&r.previousSibling===s,p=r.nextSibling===i.nextSibling&&r.previousSibling===s,u=r===i;if(!o&&!p&&!u)throw new Error("There must be exactly one top level call corresponding to the patched element.")}function H(e){var t=$;return $=e,t}function q(e){var t=ee;return ee=e,t}function X(e){if(process.env.NODE_ENV!=="production"&&!e)throw new Error("Expected value to be defined");return e}/**
63
+ `))}}function tt(e){e||console.warn("patchOuter requires the node have a parent if there is a key.")}function k(e){if($)throw new Error(e+"() can not be called between elementOpenStart() and elementOpenEnd().")}function Se(e){if(ne)throw new Error(e+"() may not be called inside an element that has called skip().")}function se(e){if(!$)throw new Error(e+"() can only be called after calling elementOpenStart().")}function nt(){if($)throw new Error("elementOpenEnd() must be called after calling elementOpenStart().")}function st(e,t){if(e!==t)throw new Error('Received a call to close "'+t+'" but "'+e+'" was open.')}function it(e,t){if(t!==null)throw new Error(e+"() must come before any child declarations inside the current element.")}function at(e,t,n,s){H(e);var i=e,r=t,l=r.nextSibling===n&&r.previousSibling===s,h=r.nextSibling===i.nextSibling&&r.previousSibling===s,g=r===i;if(!l&&!h&&!g)throw new Error("There must be exactly one top level call corresponding to the patched element.")}function W(e){var t=$;return $=e,t}function V(e){var t=ne;return ne=e,t}function H(e){if(process.env.NODE_ENV!=="production"&&!e)throw new Error("Expected value to be defined");return e}/**
64
64
  * @license
65
65
  * Copyright 2018 The Incremental DOM Authors. All Rights Reserved.
66
66
  *
@@ -75,7 +75,7 @@
75
75
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
76
76
  * See the License for the specific language governing permissions and
77
77
  * limitations under the License.
78
- */var T={nodesCreated:null,nodesDeleted:null};/**
78
+ */var j={nodesCreated:null,nodesDeleted:null};/**
79
79
  * @license
80
80
  * Copyright 2018 The Incremental DOM Authors. All Rights Reserved.
81
81
  *
@@ -90,7 +90,7 @@
90
90
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
91
91
  * See the License for the specific language governing permissions and
92
92
  * limitations under the License.
93
- */var at=function(){function e(){this.created=[],this.deleted=[]}return e.prototype.markCreated=function(t){this.created.push(t)},e.prototype.markDeleted=function(t){this.deleted.push(t)},e.prototype.notifyChanges=function(){T.nodesCreated&&this.created.length>0&&T.nodesCreated(this.created),T.nodesDeleted&&this.deleted.length>0&&T.nodesDeleted(this.deleted)},e}();/**
93
+ */var rt=function(){function e(){this.created=[],this.deleted=[]}return e.prototype.markCreated=function(t){this.created.push(t)},e.prototype.markDeleted=function(t){this.deleted.push(t)},e.prototype.notifyChanges=function(){j.nodesCreated&&this.created.length>0&&j.nodesCreated(this.created),j.nodesDeleted&&this.deleted.length>0&&j.nodesDeleted(this.deleted)},e}();/**
94
94
  * @license
95
95
  * Copyright 2018 The Incremental DOM Authors. All Rights Reserved.
96
96
  *
@@ -105,7 +105,7 @@
105
105
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
106
106
  * See the License for the specific language governing permissions and
107
107
  * limitations under the License.
108
- */function ot(e){return e.nodeType===11||e.nodeType===9}function M(e){return e.nodeType===1}function lt(e){return e.nodeType===3}function ct(e,t){for(var n=[],s=e;s!==t;){var i=s;n.push(i),s=i.parentNode}return n}var pt=Node.prototype.getRootNode||function(){for(var e=this,t=e;e;)t=e,e=e.parentNode;return t};function dt(e){var t=pt.call(e);return ot(t)?t.activeElement:null}function ht(e,t){var n=dt(e);return!n||!e.contains(n)?[]:ct(n,t)}function ut(e,t,n){for(var s=t.nextSibling,i=n;i!==null&&i!==t;){var r=i.nextSibling;e.insertBefore(i,s),i=r}}/**
108
+ */function ot(e){return e.nodeType===11||e.nodeType===9}function ie(e){return e.nodeType===1}function lt(e){return e.nodeType===3}function ct(e,t){for(var n=[],s=e;s!==t;){var i=s;n.push(i),s=i.parentNode}return n}var pt=Node.prototype.getRootNode||function(){for(var e=this,t=e;e;)t=e,e=e.parentNode;return t};function dt(e){var t=pt.call(e);return ot(t)?t.activeElement:null}function ht(e,t){var n=dt(e);return!n||!e.contains(n)?[]:ct(n,t)}function ut(e,t,n){for(var s=t.nextSibling,i=n;i!==null&&i!==t;){var r=i.nextSibling;e.insertBefore(i,s),i=r}}/**
109
109
  * @license
110
110
  * Copyright 2018 The Incremental DOM Authors. All Rights Reserved.
111
111
  *
@@ -120,7 +120,7 @@
120
120
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
121
121
  * See the License for the specific language governing permissions and
122
122
  * limitations under the License.
123
- */var ft=function(){function e(t,n,s){this._attrsArr=null,this.staticsApplied=!1,this.nameOrCtor=t,this.key=n,this.text=s}return e.prototype.hasEmptyAttrsArr=function(){var t=this._attrsArr;return!t||!t.length},e.prototype.getAttrsArr=function(t){return this._attrsArr||(this._attrsArr=new Array(t))},e}();function ce(e,t,n,s){var i=new ft(t,n,s);return e.__incrementalDOMData=i,i}function L(e,t){return Oe(e,t)}function mt(e){return!!e.__incrementalDOMData}function gt(e){return X(e.__incrementalDOMData),L(e).key}function Oe(e,t){if(e.__incrementalDOMData)return e.__incrementalDOMData;var n=M(e)?e.localName:e.nodeName,s=M(e)?e.getAttribute("key")||t:null,i=lt(e)?e.data:void 0,r=ce(e,n,s,i);return M(e)&&vt(e,r),r}function Pe(e){Oe(e);for(var t=e.firstChild;t;t=t.nextSibling)Pe(t)}function De(e){e.__incrementalDOMData=null;for(var t=e.firstChild;t;t=t.nextSibling)De(t)}function vt(e,t){var n=e.attributes,s=n.length;if(s)for(var i=t.getAttrsArr(s),r=0,o=0;r<s;r+=1,o+=2){var p=n[r],u=p.name,f=p.value;i[o]=u,i[o+1]=f}}/**
123
+ */var ft=function(){function e(t,n,s){this._attrsArr=null,this.staticsApplied=!1,this.nameOrCtor=t,this.key=n,this.text=s}return e.prototype.hasEmptyAttrsArr=function(){var t=this._attrsArr;return!t||!t.length},e.prototype.getAttrsArr=function(t){return this._attrsArr||(this._attrsArr=new Array(t))},e}();function ae(e,t,n,s){var i=new ft(t,n,s);return e.__incrementalDOMData=i,i}function L(e,t){return Ne(e,t)}function mt(e){return!!e.__incrementalDOMData}function gt(e){return H(e.__incrementalDOMData),L(e).key}function Ne(e,t){if(e.__incrementalDOMData)return e.__incrementalDOMData;var n=ie(e)?e.localName:e.nodeName,s=ie(e)?e.getAttribute("key")||t:null,i=lt(e)?e.data:void 0,r=ae(e,n,s,i);return ie(e)&&vt(e,r),r}function ye(e){Ne(e);for(var t=e.firstChild;t;t=t.nextSibling)ye(t)}function Ae(e){e.__incrementalDOMData=null;for(var t=e.firstChild;t;t=t.nextSibling)Ae(t)}function vt(e,t){var n=e.attributes,s=n.length;if(s)for(var i=t.getAttrsArr(s),r=0,l=0;r<s;r+=1,l+=2){var h=n[r],g=h.name,v=h.value;i[l]=g,i[l+1]=v}}/**
124
124
  * @license
125
125
  * Copyright 2018 The Incremental DOM Authors. All Rights Reserved.
126
126
  *
@@ -135,7 +135,7 @@
135
135
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
136
136
  * See the License for the specific language governing permissions and
137
137
  * limitations under the License.
138
- */function Ct(e,t){return e==="svg"?"http://www.w3.org/2000/svg":e==="math"?"http://www.w3.org/1998/Math/MathML":t==null||L(t).nameOrCtor==="foreignObject"?null:t.namespaceURI}function bt(e,t,n,s){var i;if(typeof n=="function")i=new n;else{var r=Ct(n,t);r?i=e.createElementNS(r,n):i=e.createElement(n)}return ce(i,n,s),i}function wt(e){var t=e.createTextNode("");return ce(t,"#text",null),t}/**
138
+ */function Ct(e,t){return e==="svg"?"http://www.w3.org/2000/svg":e==="math"?"http://www.w3.org/1998/Math/MathML":t==null||L(t).nameOrCtor==="foreignObject"?null:t.namespaceURI}function bt(e,t,n,s){var i;if(typeof n=="function")i=new n;else{var r=Ct(n,t);r?i=e.createElementNS(r,n):i=e.createElement(n)}return ae(i,n,s),i}function wt(e){var t=e.createTextNode("");return ae(t,"#text",null),t}/**
139
139
  * @license
140
140
  * Copyright 2018 The Incremental DOM Authors. All Rights Reserved.
141
141
  *
@@ -150,7 +150,7 @@
150
150
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
151
151
  * See the License for the specific language governing permissions and
152
152
  * limitations under the License.
153
- */var I=null,h=null,v=null,O=null,W=[],V=[];function K(){return V}function Ee(e){var t=function(n,s,i){var r=I,o=O,p=W,u=V,f=h,C=v,S=!1,z=!1;I=new at,O=n.ownerDocument,V=[],v=n.parentNode,W=ht(n,v),process.env.NODE_ENV!=="production"&&(S=H(!1),z=q(!1));try{var Ge=e(n,s,i);return process.env.NODE_ENV!=="production"&&nt(),Ge}finally{O=o,V=u,h=f,v=C,W=p,I.notifyChanges(),H(S),q(z),I=r}};return t}var Ie=Ee(function(e,t,n){return h=e,Le(),t(n),Te(),process.env.NODE_ENV!=="production"&&et(h,e),e}),_t=Ee(function(e,t,n){var s={nextSibling:e},i=null,r=null;return process.env.NODE_ENV!=="production"&&(i=e.nextSibling,r=e.previousSibling),h=s,t(n),process.env.NODE_ENV!=="production"&&(tt(v),rt(s,h,i,r)),v&&ke(v,Q(),e.nextSibling),s===h?null:h});function ge(e,t,n){var s=L(e,n);return t==s.nameOrCtor&&n==s.key}function St(e,t,n){if(!e)return null;if(ge(e,t,n))return e;if(n){for(;e=e.nextSibling;)if(ge(e,t,n))return e}return null}function Nt(e,t){var n;return e==="#text"?n=wt(O):n=bt(O,v,e,t),I.markCreated(n),n}function Fe(e,t){var n=St(h,e,t),s=n||Nt(e,t);s!==h&&(W.indexOf(s)>=0?ut(v,s,h):v.insertBefore(s,h),h=s)}function ke(e,t,n){for(var s=e,i=t;i!==n;){var r=i.nextSibling;s.removeChild(i),I.markDeleted(i),i=r}}function Le(){v=h,h=null}function Q(){return h?h.nextSibling:v.firstChild}function pe(){h=Q()}function Te(){ke(v,Q(),null),h=v,v=v.parentNode}function Ue(e,t){return pe(),Fe(e,t),Le(),v}function Re(){return process.env.NODE_ENV!=="production"&&q(!1),Te(),h}function xt(){return pe(),Fe("#text",null),h}function yt(){return process.env.NODE_ENV!=="production"&&(ye("currentElement",O),k("currentElement")),v}function At(){return process.env.NODE_ENV!=="production"&&(ye("currentPointer",O),k("currentPointer")),Q()}function Ot(){process.env.NODE_ENV!=="production"&&(it("skip",h),q(!0)),h=v.lastChild}/**
153
+ */var T=null,u=null,C=null,P=null,q=[],G=[];function X(){return G}function Oe(e){var t=function(n,s,i){var r=T,l=P,h=q,g=G,v=u,_=C,y=!1,M=!1;T=new rt,P=n.ownerDocument,G=[],C=n.parentNode,q=ht(n,C),process.env.NODE_ENV!=="production"&&(y=W(!1),M=V(!1));try{var ln=e(n,s,i);return process.env.NODE_ENV!=="production"&&nt(),ln}finally{P=l,G=g,u=v,C=_,q=h,T.notifyChanges(),W(y),V(M),T=r}};return t}var De=Oe(function(e,t,n){return u=e,xe(),t(n),Fe(),process.env.NODE_ENV!=="production"&&et(u,e),e}),_t=Oe(function(e,t,n){var s={nextSibling:e},i=null,r=null;return process.env.NODE_ENV!=="production"&&(i=e.nextSibling,r=e.previousSibling),u=s,t(n),process.env.NODE_ENV!=="production"&&(tt(C),at(s,u,i,r)),C&&Ie(C,K(),e.nextSibling),s===u?null:u});function Pe(e,t,n){var s=L(e,n);return t==s.nameOrCtor&&n==s.key}function St(e,t,n){if(!e)return null;if(Pe(e,t,n))return e;if(n){for(;e=e.nextSibling;)if(Pe(e,t,n))return e}return null}function Nt(e,t){var n;return e==="#text"?n=wt(P):n=bt(P,C,e,t),T.markCreated(n),n}function Ee(e,t){var n=St(u,e,t),s=n||Nt(e,t);s!==u&&(q.indexOf(s)>=0?ut(C,s,u):C.insertBefore(s,u),u=s)}function Ie(e,t,n){for(var s=e,i=t;i!==n;){var r=i.nextSibling;s.removeChild(i),T.markDeleted(i),i=r}}function xe(){C=u,u=null}function K(){return u?u.nextSibling:C.firstChild}function re(){u=K()}function Fe(){Ie(C,K(),null),u=C,C=C.parentNode}function ke(e,t){return re(),Ee(e,t),xe(),C}function Le(){return process.env.NODE_ENV!=="production"&&V(!1),Fe(),u}function yt(){return re(),Ee("#text",null),u}function At(){return process.env.NODE_ENV!=="production"&&(_e("currentElement",P),k("currentElement")),C}function Ot(){return process.env.NODE_ENV!=="production"&&(_e("currentPointer",P),k("currentPointer")),K()}function Dt(){process.env.NODE_ENV!=="production"&&(it("skip",u),V(!0)),u=C.lastChild}/**
154
154
  * @license
155
155
  * Copyright 2018 The Incremental DOM Authors. All Rights Reserved.
156
156
  *
@@ -165,7 +165,7 @@
165
165
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
166
166
  * See the License for the specific language governing permissions and
167
167
  * limitations under the License.
168
- */var ve=3,_=Se();function Pt(e,t,n){if(t.staticsApplied=!0,!(!n||!n.length)){if(t.hasEmptyAttrsArr()){for(var s=0;s<n.length;s+=2)U(e,n[s],n[s+1]);return}for(var s=0;s<n.length;s+=2)_[n[s]]=s+1;for(var i=t.getAttrsArr(0),r=0,s=0;s<i.length;s+=2){var o=i[s],p=i[s+1],u=_[o];if(u){n[u]===p&&delete _[o];continue}i[r]=o,i[r+1]=p,r+=2}oe(i,r);for(var o in _)U(e,o,n[_[o]]),delete _[o]}}function de(e,t,n){process.env.NODE_ENV!=="production"&&(k("elementOpen"),Ae("elementOpen"));var s=Ue(e,t),i=L(s);i.staticsApplied||Pt(s,i,n);var r=Math.max(0,arguments.length-ve),o=i.hasEmptyAttrsArr();if(!r&&o)return s;for(var p=i.getAttrsArr(r),u=ve,f=0;u<arguments.length;u+=2,f+=2){var C=arguments[u];if(o)p[f]=C;else if(p[f]!==C)break;var S=arguments[u+1];(o||p[f+1]!==S)&&(p[f+1]=S,U(s,C,S))}if(u<arguments.length||f<p.length){for(var z=f;f<p.length;f+=2)_[p[f]]=p[f+1];for(f=z;u<arguments.length;u+=2,f+=2){var C=arguments[u],S=arguments[u+1];_[C]!==S&&U(s,C,S),p[f]=C,p[f+1]=S,delete _[C]}oe(p,f);for(var C in _)U(s,C,void 0),delete _[C]}return s}function Dt(e,t,n){var s=K();process.env.NODE_ENV!=="production"&&(k("elementOpenStart"),H(!0)),s[0]=e,s[1]=t,s[2]=n}function Et(e){var t=K();process.env.NODE_ENV!=="production"&&(le("key"),X(t)),t[1]=e}function It(e,t){var n=K();process.env.NODE_ENV!=="production"&&le("attr"),n.push(e),n.push(t)}function Ft(){var e=K();process.env.NODE_ENV!=="production"&&(le("elementOpenEnd"),H(!1)),X(e);var t=de.apply(null,e);return oe(e,0),t}function Be(e){process.env.NODE_ENV!=="production"&&k("elementClose");var t=Re();return process.env.NODE_ENV!=="production"&&st(L(t).nameOrCtor,e),t}function kt(e,t,n){return de.apply(null,arguments),Be(e)}function Lt(e){process.env.NODE_ENV!=="production"&&(k("text"),Ae("text"));var t=xt(),n=L(t);if(n.text!==e){n.text=e;for(var s=e,i=1;i<arguments.length;i+=1){var r=arguments[i];s=r(s)}t.data=s}return t}/**
168
+ */var Te=3,S=Ce();function Pt(e,t,n){if(t.staticsApplied=!0,!(!n||!n.length)){if(t.hasEmptyAttrsArr()){for(var s=0;s<n.length;s+=2)B(e,n[s],n[s+1]);return}for(var s=0;s<n.length;s+=2)S[n[s]]=s+1;for(var i=t.getAttrsArr(0),r=0,s=0;s<i.length;s+=2){var l=i[s],h=i[s+1],g=S[l];if(g){n[g]===h&&delete S[l];continue}i[r]=l,i[r+1]=h,r+=2}te(i,r);for(var l in S)B(e,l,n[S[l]]),delete S[l]}}function oe(e,t,n){process.env.NODE_ENV!=="production"&&(k("elementOpen"),Se("elementOpen"));var s=ke(e,t),i=L(s);i.staticsApplied||Pt(s,i,n);var r=Math.max(0,arguments.length-Te),l=i.hasEmptyAttrsArr();if(!r&&l)return s;for(var h=i.getAttrsArr(r),g=Te,v=0;g<arguments.length;g+=2,v+=2){var _=arguments[g];if(l)h[v]=_;else if(h[v]!==_)break;var y=arguments[g+1];(l||h[v+1]!==y)&&(h[v+1]=y,B(s,_,y))}if(g<arguments.length||v<h.length){for(var M=v;v<h.length;v+=2)S[h[v]]=h[v+1];for(v=M;g<arguments.length;g+=2,v+=2){var _=arguments[g],y=arguments[g+1];S[_]!==y&&B(s,_,y),h[v]=_,h[v+1]=y,delete S[_]}te(h,v);for(var _ in S)B(s,_,void 0),delete S[_]}return s}function Et(e,t,n){var s=X();process.env.NODE_ENV!=="production"&&(k("elementOpenStart"),W(!0)),s[0]=e,s[1]=t,s[2]=n}function It(e){var t=X();process.env.NODE_ENV!=="production"&&(se("key"),H(t)),t[1]=e}function xt(e,t){var n=X();process.env.NODE_ENV!=="production"&&se("attr"),n.push(e),n.push(t)}function Ft(){var e=X();process.env.NODE_ENV!=="production"&&(se("elementOpenEnd"),W(!1)),H(e);var t=oe.apply(null,e);return te(e,0),t}function Ue(e){process.env.NODE_ENV!=="production"&&k("elementClose");var t=Le();return process.env.NODE_ENV!=="production"&&st(L(t).nameOrCtor,e),t}function kt(e,t,n){return oe.apply(null,arguments),Ue(e)}function Lt(e){process.env.NODE_ENV!=="production"&&(k("text"),Se("text"));var t=yt(),n=L(t);if(n.text!==e){n.text=e;for(var s=e,i=1;i<arguments.length;i+=1){var r=arguments[i];s=r(s)}t.data=s}return t}/**
169
169
  * @license
170
170
  * Copyright 2018 The Incremental DOM Authors. All Rights Reserved.
171
171
  *
@@ -180,9 +180,9 @@
180
180
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
181
181
  * See the License for the specific language governing permissions and
182
182
  * limitations under the License.
183
- */d.applyAttr=Ne;d.applyProp=xe;d.attributes=B;d.close=Re;var he=d.currentElement=yt,te=d.currentPointer=At;d.open=Ue;var Tt=d.patch=Ie;d.patchInner=Ie;d.patchOuter=_t;d.skip=Ot;var ne=d.skipNode=pe;d.getKey=gt;d.clearCache=De;d.importNode=Pe;d.isDataInitialized=mt;d.notifications=T;d.symbols=ae;var Ce=d.attr=It,Ut=d.elementClose=Be;d.elementOpen=de;var Rt=d.elementOpenEnd=Ft,Bt=d.elementOpenStart=Dt;d.elementVoid=kt;var $t=d.text=Lt;d.key=Et;function be(e){let t=te();return t instanceof Comment&&t.data!==e?t.data=e:(t=document.createComment(e),he().appendChild(t)),ne(),t}let $e=R.noI18nI18n;function jt(e){$e=e}function zt(){return $e}const A=Symbol("ComponentMetadata"),w=Object.freeze({has(e,t){return!!(e[A]&&Object.prototype.hasOwnProperty.call(e[A],t))},add(e,t){e[A]?Object.assign(e[A],t):e[A]=t},get(e,t,n){return e[A]&&e[A][t]||n}}),we=Symbol("ds-web-components:pragma:listeners-attached"),je="idom-pragma:content-begin",se="idom-pragma:content-end";function ie(e){for(const t of e)if(typeof t=="function")t();else if(typeof t=="string")$t(t);else if(t instanceof Set)ie(Array.from(t));else if(Array.isArray(t)&&t.length>0){let n=te();if(be(je),n===null){const s=he();for(let i=0;i<t.length;i+=1)s.contains(t[i])||s.appendChild(t[i]),ne()}for(;n&&n.data!==se;)ne(),n=te();be(se)}}function a(e,t,...n){if(t){for(const s of Object.keys(t))if(s.toUpperCase()==="DATA-FRAGMENT")return()=>ie(n)}return()=>{Bt(e);const s=[];if(t)for(const r of Object.keys(t))r.toUpperCase()==="CLASSNAME"?Ce("class",t[r]):/^on[A-Z]/.test(r)?s.push(r):Ce(r,t[r]);Rt(e);const i=he();if(!i[we]){for(const r of s)i.addEventListener(r.substr(2).toLowerCase(),t[r]);i[we]=!0}ie(n),Ut(e)}}function ze(e,t){customElements.get(e)||customElements.define(e,t)}function Wt(...e){for(const t of e)ze(w.get(t,"tag"),t)}function Vt(e){return function(...n){for(const s of n){const i=`${e}${w.get(s,"tag").substr(3)}`;ze(i,s)}}}const re=Symbol("Component Attribute Bindings"),P=Symbol("Component Class Bindings"),G=Symbol("Component Style Bindings"),Ht={__initialized:!1,__observer:null,__queuedUpdate:null,__managedClasses:new Set,__updateHostBindings(){const e=this;for(const t of Object.keys(e[re]||{}))e.setAttribute(t,e[re][t]);for(const t of Object.keys(e[G]||{}))e.style[t]=e[G][t];for(const t of e.__managedClasses)e.classList.remove(t);for(const t of(e[P]||[]).filter(Boolean))e.__managedClasses.add(t),e.classList.add(t);for(const t of(e.getAttribute("classname")||"").split(/\w+/).filter(Boolean))e.classList.add(t)},__updateChildQueries(e){const t=this;for(const n of w.get(t.constructor,"childQueries",[]))if(!e||e&&n.refresh){const s=n.all?t.querySelectorAll:t.querySelector;t[n.key]=s.call(t,n.selector)}},__gatherChildren(){const e=this;let t=Array.from(e.childNodes),n=null,s=t.length;for(let i=0;i<t.length;i+=1){const r=t[i];r instanceof Comment&&(r.data===je?n=i+1:r.data===se&&(s=i-1))}if(n===null)for(const i of t)i.parentNode.removeChild(i);else t=t.slice(n,s);w.has(e.constructor,"contentProp")&&(e[w.get(e.constructor,"contentProp")]=t)},__startMutObs(){const e=this;e.__observer||(e.__observer=new MutationObserver(()=>{e.contentChangedCallback&&e.contentChangedCallback(),e.__gatherChildren(),e.update()})),e.__observer.observe(e,{childList:!0})},__stopMutObs(){const e=this;e.__observer&&e.__observer.disconnect()},__doRender(){const e=this;e.__stopMutObs(),Tt(e,e.render(zt())),e.__startMutObs()},update(){const e=this;e.__initialized&&!e.__queuedUpdate&&(e.__queuedUpdate=window.requestAnimationFrame(()=>{e.__doRender(),setTimeout(()=>{e.__updateChildQueries(!0),e.__updateHostBindings()},0),e.__queuedUpdate=null}))},attributeChangedCallback(e,t,n){const s=this,i=n===""?!0:n;i!==t&&(s.__cbAttributeChanged&&s.__cbAttributeChanged(e,s[e],i),e!=="style"&&(s[e]=i),s.__initialized&&s.update())},connectedCallback(){const e=this;e.__cbConnected&&e.__cbConnected();const t=w.get(e.constructor,"eventListeners",[]);setTimeout(()=>{if(!e.__initialized){e.__gatherChildren();for(const[,n]of t)e[n]=e[n].bind(e);e.__initialized=!0}for(const[n,s]of t)e.addEventListener(n,e[s]);e.__doRender(),setTimeout(()=>{e.__updateChildQueries(),e.__updateHostBindings()},0)},0)},disconnectedCallback(){const e=this;e.__cbDisconnected&&e.__cbDisconnected();for(const[t,n]of w.get(e.constructor,"eventListeners",[]))e.removeEventListener(t,e[n]);e.__stopMutObs()}};function D(e){return t=>{w.add(t,e),Object.assign(t.prototype,{__cbAttributeChanged:t.prototype.attributeChangedCallback,__cbConnected:t.prototype.connectedCallback,__cbDisconnected:t.prototype.disconnectedCallback},Ht)}}function Z(){return(e,t)=>{w.add(e.constructor,{contentProp:t})}}function J(e){return(t,n)=>{Object.defineProperty(t,n,{get(){return Object.defineProperty(this,n,{value:{dispatch:s=>{const i=new CustomEvent(e||n,{detail:s});return this.dispatchEvent(i),i}}}),this[n]},configurable:!0})}}function j(e){return(t,n)=>{const s=w.get(t.constructor,"eventListeners",[]);s.push([e,n]),w.add(t.constructor,{eventListeners:s})}}function c(e){return(t,n)=>{const s=t.constructor,i=n.toLowerCase();if(s.observedAttributes=s.observedAttributes||["classname","className","style"],s.observedAttributes.push(n),s.observedAttributes.push(i),i!==n&&Object.defineProperty(t,n,{get(){return this[i]},set(r){this[i]=r}}),e){const r=Symbol.for(n);Object.defineProperty(t,i,{get(){return this[r]},set(o){let p=o;e===Boolean&&typeof o=="string"&&o.toLowerCase()==="false"?p=!1:p=e(o),this[r]=p}})}}}function We(e,t,n){return(s,i)=>{const r=w.get(s.constructor,"childQueries",[]);r.push({key:i,selector:e,all:n,refresh:t.refresh}),w.add(s.constructor,{childQueries:r})}}function Y(e,t={}){return We(e,t)}function Ve(e,t={}){return We(e,t,!0)}function ue(){return(e,t)=>{const n=Symbol(t);Object.defineProperties(e,{[n]:{writable:!0,enumerable:!1,configurable:!1,value:e[t]},[t]:{get(){return this[n]},set(s){this[n]!==s&&(this[n]=s,this.update())}}})}}var fe=(e=>(e["7Z"]="application/x-7z-compressed",e.AAC="audio/aac",e.ABW="application/x-abiword",e.ARC="application/octet-stream",e.AVI="video/x-msvideo",e.AZW="application/vnd.amazon.ebook",e.BIN="application/octet-stream",e.BMP="image/bmp",e.BZ="application/x-bzip",e.BZ2="application/x-bzip2",e.CER="application/pkix-cert",e.CSH="application/x-csh",e.CSS="text/css",e.CSV="text/csv,application/vnd.ms-excel",e.DOC="application/msword",e.DOCX="application/vnd.openxmlformats-officedocument.wordprocessingml.document",e.EOT="application/vnd.ms-fontobject",e.EPUB="application/epub+zip",e.ES="application/ecmascript",e.FLV="video/x-flv",e.GIF="image/gif",e.GZ="application/x-gzip",e.HTM="text/html",e.HTML="text/html",e.ICO="image/x-icon",e.ICS="text/calendar",e.JAR="application/java-archive",e.JPEG="image/jpeg",e.JPG="image/jpeg",e.JS="application/javascript",e.JSON="application/json",e.M3U="audio/x-mpequrl",e.MID="audio/midi",e.MIDI="audio/midi",e.MOV="video/quicktime",e.MP3="audio/mpeg3",e.MP4="video/mp4",e.MPEG="video/mpeg",e.MPKG="application/vnd.apple.installer+xml",e.ODP="application/vnd.oasis.opendocument.presentation",e.ODS="application/vnd.oasis.opendocument.spreadsheet",e.ODT="application/vnd.oasis.opendocument.text",e.OGA="audio/ogg",e.OGV="video/ogg",e.OGX="application/ogg",e.OTF="font/otf",e.PNG="image/png",e.PDF="application/pdf",e.PPT="application/vnd.ms-powerpoint",e.PPTX="application/vnd.openxmlformats-officedocument.presentationml.presentation",e.RAR="application/x-rar-compressed",e.RTF="application/rtf",e.SH="application/x-sh",e.SVG="image/svg+xml",e.SWF="application/x-shockwave-flash",e.TAR="application/x-tar",e.TIF="image/tiff",e.TIFF="image/tiff",e.TS="application/typescript",e.TTF="font/ttf",e.TXT="text/plain",e.VSD="application/vnd.visio",e.WAV="audio/wav",e.WEBA="audio/webm",e.WEBM="video/webm",e.WEBP="image/webp",e.WOFF="font/woff",e.WOFF2="font/woff2",e.XHTML="application/xhtml+xml",e.XLS="application/vnd.ms-excel",e.XLSX="application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",e.XML="application/xml",e.XUL="application/vnd.mozilla.xul+xml",e.ZIP="application/zip",e))(fe||{}),qt=Object.defineProperty,Gt=Object.getOwnPropertyDescriptor,g=(e,t,n,s)=>{for(var i=s>1?void 0:s?Gt(t,n):t,r=e.length-1,o;r>=0;r--)(o=e[r])&&(i=(s?o(t,n,i):o(i))||i);return s&&i&&qt(t,n,i),i};const m="sps-file-upload";exports.SpsFileUploadComponent=class extends HTMLElement{constructor(){super(),this.shown=!0,this.files=[],this.acceptMIMETypes=new Set,this.active=!1,this.error=!1,this.namesOfUnsupportedFiles=[],this.handleBrowseLinkClick=this.handleBrowseLinkClick.bind(this),this.handleDownloadButtonClick=this.handleDownloadButtonClick.bind(this),this.handleFileInputChange=this.handleFileInputChange.bind(this),this.dismiss=this.dismiss.bind(this)}get[P](){return[m,this.active&&`${m}--active`,this.error&&`${m}--error`,!this.shown&&`${m}--hidden`,this.mini&&`${m}--mini`,this.constrainContentWidth&&`${m}--constrained-content-width`]}connectedCallback(){this.description=this.description||(this.multiple?"Files":"File"),this.acceptExtensions&&this.processAcceptExtensions(this.acceptExtensions),this.maxSize&&this.parseAndValidateMaxSize(this.maxSize)}attributeChangedCallback(t,n,s){t==="acceptExtensions"&&this.processAcceptExtensions(s),t==="maxSize"&&this.parseAndValidateMaxSize(s)}dismiss(){this.dismissable&&(this.shown=!1,this.update(),this.dismissal.dispatch())}show(){this.dismissable&&(this.shown=!0,this.update())}render({t}){const n=this.error?R.SpsIcon.EXCLAMATION_CIRCLE:R.SpsIcon.UPLOAD_CLOUD,s=(this.multiple?t("design-system:fileUpload.instructions_plural"):t("design-system:fileUpload.instructions")).split("|");return a("div",{"data-fragment":!0},a("div",{className:`${m}__content`},this.processing?a("div",{"data-fragment":!0},a("i",{className:"sps-spinner sps-spinner--medium","aria-hidden":"true"}),a("div",{className:`${m}__instructions`},t("design-system:fileUpload.processing"))):a("div",{"data-fragment":!0},a("i",{className:`sps-icon sps-icon-${n} ${m}__icon-primary`,"aria-hidden":"true"}),a("div",{className:`${m}__title`},this.error?a("div",{"data-fragment":!0},t(this.namesOfUnsupportedFiles.length>1?"design-system:fileUpload.cancelled_plural":"design-system:fileUpload.cancelled")):a("div",{"data-fragment":!0},t("design-system:fileUpload.title",{description:this.description}))),this.error?a("div",{className:`${m}__errored-files`},new Set(this.namesOfUnsupportedFiles.map((i,r)=>{const o=Math.floor(i.length/2);return a("div",{className:`${m}__errored-filename`,key:i},a("span",{className:`${m}__errored-filename-segment`},i.substr(0,o)),a("div",{className:`${m}__errored-filename-segment`},a("span",null,i.substr(o))),r<this.namesOfUnsupportedFiles.length-1?",":"")}))):a("span",null),a("div",{className:`${m}__instructions`},a("div",{"data-fragment":!0},a("span",null,s[0]),a("a",{href:"",onClick:this.handleBrowseLinkClick},s[1]),a("span",null,s[2]))),a("div",{className:`${m}__requirements`},this.acceptExtensions?a("span",null,"("," ",t("design-system:fileUpload.acceptedTypes",{fileTypes:this.acceptExtensionsDescription})," ",")"):"",this.maxSize?a("span",null,"("," ",t("design-system:fileUpload.maximumSize",{size:this.maxSize})," ",")"):"",this.customRequirement?a("span",null," ",this.customRequirement," "):""),this.downloadLabel&&a("div",{className:`sps-button sps-button--link ${m}__download-button`,onClick:this.handleDownloadButtonClick},a("button",{type:"button"},a("i",{className:"sps-icon sps-icon-download-cloud","aria-hidden":"true"})," ",this.downloadLabel)))),this.dismissable&&!this.processing&&a("div",{className:`sps-button sps-button--icon ${m}__close-button`,onClick:this.dismiss},a("button",{type:"button",title:t("design-system:fileUpload.close")},a("i",{className:"sps-icon sps-icon-x","aria-hidden":"true"}))),a("form",null,a("input",{type:"file",accept:this.accept||"*/*",multiple:this.multiple||null,onChange:this.handleFileInputChange})))}parseAndValidateMaxSize(t){try{this.maxSizeBytes=l.parseFileSize(t)}catch{throw new Error(`Could not parse "${t}" as a file size.`)}}processAcceptExtensions(t){const s=(Array.isArray(t)?t:t.trim().split(/\s?,\s?/)).map(r=>r.replace(/^\./,"")),i=s.map(r=>`.${r}`.toLowerCase());this.acceptExtensionsDescription=i.map((r,o)=>o>0&&o===i.length-1?`or ${r}`:r).join(i.length>2?", ":" "),this.acceptMIMETypes.clear();for(const r of s)for(const o of fe[r.toUpperCase()].split(","))this.acceptMIMETypes.add(o);this.accept=i.concat(Array.from(this.acceptMIMETypes)).join(",")}selectFiles(t){this.namesOfUnsupportedFiles=[];const n=Array.from(t);for(const s of n)this.acceptExtensions&&!this.acceptMIMETypes.has(s.type)&&this.namesOfUnsupportedFiles.push(s.name),this.maxSize&&s.size>this.maxSizeBytes&&this.namesOfUnsupportedFiles.indexOf(s.name)===-1&&this.namesOfUnsupportedFiles.push(s.name);this.namesOfUnsupportedFiles.length?(this.error=!0,this.fileInput.value=null,this.update()):(this.files=n,this.selection.dispatch(n))}handleDragOver(t){t.preventDefault(),t.stopPropagation()}handleDragEnter(t){t.preventDefault(),this.active=!0,this.error=!1,this.update()}handleDragLeave(t){t.preventDefault(),this.active=!1,this.update()}handleDrop(t){t.preventDefault(),t.stopPropagation(),this.active=!1,t.dataTransfer.items?this.selectFiles(Array.from(t.dataTransfer.items).map(n=>n.getAsFile())):this.selectFiles(t.dataTransfer.files),this.update()}handleBrowseLinkClick(t){t.preventDefault(),this.error=!1,this.update(),this.fileInput.click()}handleDownloadButtonClick(){this.download.dispatch()}handleFileInputChange(t){t.stopPropagation(),this.selectFiles(t.target.files)}};exports.SpsFileUploadComponent.displayName=m;exports.SpsFileUploadComponent.props={description:"string",multiple:"boolean",dismissable:"boolean",processing:"boolean",mini:"boolean",downloadLabel:"string",acceptExtensions:"Array<string> | string",maxSize:"string",customRequirement:"string",selection:{event:!0,type:"CustomEvent<Array<File>>"},dismissal:{event:!0,type:"CustomEvent<void>"},download:{event:!0,type:"CustomEvent<void>"}};g([c()],exports.SpsFileUploadComponent.prototype,"description",2);g([c(Boolean)],exports.SpsFileUploadComponent.prototype,"multiple",2);g([c(Boolean)],exports.SpsFileUploadComponent.prototype,"shown",2);g([c(Boolean)],exports.SpsFileUploadComponent.prototype,"dismissable",2);g([c(Boolean)],exports.SpsFileUploadComponent.prototype,"processing",2);g([c(Boolean)],exports.SpsFileUploadComponent.prototype,"mini",2);g([c(Boolean)],exports.SpsFileUploadComponent.prototype,"constrainContentWidth",2);g([c()],exports.SpsFileUploadComponent.prototype,"downloadLabel",2);g([c()],exports.SpsFileUploadComponent.prototype,"acceptExtensions",2);g([c()],exports.SpsFileUploadComponent.prototype,"maxSize",2);g([c()],exports.SpsFileUploadComponent.prototype,"customRequirement",2);g([J()],exports.SpsFileUploadComponent.prototype,"selection",2);g([J()],exports.SpsFileUploadComponent.prototype,"dismissal",2);g([J()],exports.SpsFileUploadComponent.prototype,"download",2);g([Y("input[type='file']")],exports.SpsFileUploadComponent.prototype,"fileInput",2);g([j("dragover")],exports.SpsFileUploadComponent.prototype,"handleDragOver",1);g([j("dragenter")],exports.SpsFileUploadComponent.prototype,"handleDragEnter",1);g([j("dragleave")],exports.SpsFileUploadComponent.prototype,"handleDragLeave",1);g([j("drop")],exports.SpsFileUploadComponent.prototype,"handleDrop",1);exports.SpsFileUploadComponent=g([D({tag:m})],exports.SpsFileUploadComponent);const Xt={basic:{label:"Basic File Upload",description:l.code`
183
+ */d.applyAttr=be,d.applyProp=we,d.attributes=R,d.close=Le;var le=d.currentElement=At,ce=d.currentPointer=Ot;d.open=ke;var Tt=d.patch=De;d.patchInner=De,d.patchOuter=_t,d.skip=Dt;var pe=d.skipNode=re;d.getKey=gt,d.clearCache=Ae,d.importNode=ye,d.isDataInitialized=mt,d.notifications=j,d.symbols=ee;var Re=d.attr=xt,Ut=d.elementClose=Ue;d.elementOpen=oe;var Rt=d.elementOpenEnd=Ft,Bt=d.elementOpenStart=Et;d.elementVoid=kt;var $t=d.text=Lt;d.key=It;function Be(e){let t=ce();return t instanceof Comment&&t.data!==e?t.data=e:(t=document.createComment(e),le().appendChild(t)),pe(),t}let $e=A.noI18nI18n;function jt(e){$e=e}function zt(){return $e}const E=Symbol("ComponentMetadata"),b=Object.freeze({has(e,t){return!!(e[E]&&Object.prototype.hasOwnProperty.call(e[E],t))},add(e,t){e[E]?Object.assign(e[E],t):e[E]=t},get(e,t,n){return e[E]&&e[E][t]||n}}),je=Symbol("ds-web-components:pragma:listeners-attached"),ze="idom-pragma:content-begin",de="idom-pragma:content-end";function he(e){for(const t of e)if(typeof t=="function")t();else if(typeof t=="string")$t(t);else if(t instanceof Set)he(Array.from(t));else if(Array.isArray(t)&&t.length>0){let n=ce();if(Be(ze),n===null){const s=le();for(let i=0;i<t.length;i+=1)s.contains(t[i])||s.appendChild(t[i]),pe()}for(;n&&n.data!==de;)pe(),n=ce();Be(de)}}function o(e,t,...n){if(t){for(const s of Object.keys(t))if(s.toUpperCase()==="DATA-FRAGMENT")return()=>he(n)}return()=>{Bt(e);const s=[];if(t)for(const r of Object.keys(t))r.toUpperCase()==="CLASSNAME"?Re("class",t[r]):/^on[A-Z]/.test(r)?s.push(r):Re(r,t[r]);Rt(e);const i=le();if(!i[je]){for(const r of s)i.addEventListener(r.substr(2).toLowerCase(),t[r]);i[je]=!0}he(n),Ut(e)}}function We(e,t){customElements.get(e)||customElements.define(e,t)}function Wt(...e){for(const t of e)We(b.get(t,"tag"),t)}function Vt(e){return function(...n){for(const s of n){const i=`${e}${b.get(s,"tag").substr(3)}`;We(i,s)}}}const ue=Symbol("Component Attribute Bindings"),I=Symbol("Component Class Bindings"),Q=Symbol("Component Style Bindings"),Ht={__initialized:!1,__observer:null,__queuedUpdate:null,__managedClasses:new Set,__updateHostBindings(){const e=this;for(const t of Object.keys(e[ue]||{}))e.setAttribute(t,e[ue][t]);for(const t of Object.keys(e[Q]||{}))e.style[t]=e[Q][t];for(const t of e.__managedClasses)e.classList.remove(t);for(const t of(e[I]||[]).filter(Boolean))e.__managedClasses.add(t),e.classList.add(t);for(const t of(e.getAttribute("classname")||"").split(/\w+/).filter(Boolean))e.classList.add(t)},__updateChildQueries(e){const t=this;for(const n of b.get(t.constructor,"childQueries",[]))if(!e||e&&n.refresh){const s=n.all?t.querySelectorAll:t.querySelector;t[n.key]=s.call(t,n.selector)}},__gatherChildren(){const e=this;let t=Array.from(e.childNodes),n=null,s=t.length;for(let i=0;i<t.length;i+=1){const r=t[i];r instanceof Comment&&(r.data===ze?n=i+1:r.data===de&&(s=i-1))}if(n===null)for(const i of t)i.parentNode.removeChild(i);else t=t.slice(n,s);b.has(e.constructor,"contentProp")&&(e[b.get(e.constructor,"contentProp")]=t)},__startMutObs(){const e=this;e.__observer||(e.__observer=new MutationObserver(()=>{e.contentChangedCallback&&e.contentChangedCallback(),e.__gatherChildren(),e.update()})),e.__observer.observe(e,{childList:!0})},__stopMutObs(){const e=this;e.__observer&&e.__observer.disconnect()},__doRender(){const e=this;e.__stopMutObs(),Tt(e,e.render(zt())),e.__startMutObs()},update(){const e=this;e.__initialized&&!e.__queuedUpdate&&(e.__queuedUpdate=window.requestAnimationFrame(()=>{e.__doRender(),setTimeout(()=>{e.__updateChildQueries(!0),e.__updateHostBindings()},0),e.__queuedUpdate=null}))},attributeChangedCallback(e,t,n){const s=this,i=n===""?!0:n;i!==t&&(s.__cbAttributeChanged&&s.__cbAttributeChanged(e,s[e],i),e!=="style"&&(s[e]=i),s.__initialized&&s.update())},connectedCallback(){const e=this;e.__cbConnected&&e.__cbConnected();const t=b.get(e.constructor,"eventListeners",[]);setTimeout(()=>{if(!e.__initialized){e.__gatherChildren();for(const[,n]of t)e[n]=e[n].bind(e);e.__initialized=!0}for(const[n,s]of t)e.addEventListener(n,e[s]);e.__doRender(),setTimeout(()=>{e.__updateChildQueries(),e.__updateHostBindings()},0)},0)},disconnectedCallback(){const e=this;e.__cbDisconnected&&e.__cbDisconnected();for(const[t,n]of b.get(e.constructor,"eventListeners",[]))e.removeEventListener(t,e[n]);e.__stopMutObs()}};function x(e){return t=>{b.add(t,e),Object.assign(t.prototype,{__cbAttributeChanged:t.prototype.attributeChangedCallback,__cbConnected:t.prototype.connectedCallback,__cbDisconnected:t.prototype.disconnectedCallback},Ht)}}function Z(){return(e,t)=>{b.add(e.constructor,{contentProp:t})}}function J(e){return(t,n)=>{Object.defineProperty(t,n,{get(){return Object.defineProperty(this,n,{value:{dispatch:s=>{const i=new CustomEvent(e||n,{detail:s});return this.dispatchEvent(i),i}}}),this[n]},configurable:!0})}}function z(e){return(t,n)=>{const s=b.get(t.constructor,"eventListeners",[]);s.push([e,n]),b.add(t.constructor,{eventListeners:s})}}function p(e){return(t,n)=>{const s=t.constructor,i=n.toLowerCase();if(s.observedAttributes=s.observedAttributes||["classname","className","style"],s.observedAttributes.push(n),s.observedAttributes.push(i),i!==n&&Object.defineProperty(t,n,{get(){return this[i]},set(r){this[i]=r}}),e){const r=Symbol.for(n);Object.defineProperty(t,i,{get(){return this[r]},set(l){let h=l;e===Boolean&&typeof l=="string"&&l.toLowerCase()==="false"?h=!1:h=e(l),this[r]=h}})}}}function Ve(e,t,n){return(s,i)=>{const r=b.get(s.constructor,"childQueries",[]);r.push({key:i,selector:e,all:n,refresh:t.refresh}),b.add(s.constructor,{childQueries:r})}}function Y(e,t={}){return Ve(e,t)}function He(e,t={}){return Ve(e,t,!0)}function fe(){return(e,t)=>{const n=Symbol(t);Object.defineProperties(e,{[n]:{writable:!0,enumerable:!1,configurable:!1,value:e[t]},[t]:{get(){return this[n]},set(s){this[n]!==s&&(this[n]=s,this.update())}}})}}var me=(e=>(e["7Z"]="application/x-7z-compressed",e.AAC="audio/aac",e.ABW="application/x-abiword",e.ARC="application/octet-stream",e.AVI="video/x-msvideo",e.AZW="application/vnd.amazon.ebook",e.BIN="application/octet-stream",e.BMP="image/bmp",e.BZ="application/x-bzip",e.BZ2="application/x-bzip2",e.CER="application/pkix-cert",e.CSH="application/x-csh",e.CSS="text/css",e.CSV="text/csv,application/vnd.ms-excel",e.DOC="application/msword",e.DOCX="application/vnd.openxmlformats-officedocument.wordprocessingml.document",e.EOT="application/vnd.ms-fontobject",e.EPUB="application/epub+zip",e.ES="application/ecmascript",e.FLV="video/x-flv",e.GIF="image/gif",e.GZ="application/x-gzip",e.HTM="text/html",e.HTML="text/html",e.ICO="image/x-icon",e.ICS="text/calendar",e.JAR="application/java-archive",e.JPEG="image/jpeg",e.JPG="image/jpeg",e.JS="application/javascript",e.JSON="application/json",e.M3U="audio/x-mpequrl",e.MID="audio/midi",e.MIDI="audio/midi",e.MOV="video/quicktime",e.MP3="audio/mpeg3",e.MP4="video/mp4",e.MPEG="video/mpeg",e.MPKG="application/vnd.apple.installer+xml",e.ODP="application/vnd.oasis.opendocument.presentation",e.ODS="application/vnd.oasis.opendocument.spreadsheet",e.ODT="application/vnd.oasis.opendocument.text",e.OGA="audio/ogg",e.OGV="video/ogg",e.OGX="application/ogg",e.OTF="font/otf",e.PNG="image/png",e.PDF="application/pdf",e.PPT="application/vnd.ms-powerpoint",e.PPTX="application/vnd.openxmlformats-officedocument.presentationml.presentation",e.RAR="application/x-rar-compressed",e.RTF="application/rtf",e.SH="application/x-sh",e.SVG="image/svg+xml",e.SWF="application/x-shockwave-flash",e.TAR="application/x-tar",e.TIF="image/tiff",e.TIFF="image/tiff",e.TS="application/typescript",e.TTF="font/ttf",e.TXT="text/plain",e.VSD="application/vnd.visio",e.WAV="audio/wav",e.WEBA="audio/webm",e.WEBM="video/webm",e.WEBP="image/webp",e.WOFF="font/woff",e.WOFF2="font/woff2",e.XHTML="application/xhtml+xml",e.XLS="application/vnd.ms-excel",e.XLSX="application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",e.XML="application/xml",e.XUL="application/vnd.mozilla.xul+xml",e.ZIP="application/zip",e))(me||{}),qt=Object.defineProperty,Gt=Object.getOwnPropertyDescriptor,f=(e,t,n,s)=>{for(var i=s>1?void 0:s?Gt(t,n):t,r=e.length-1,l;r>=0;r--)(l=e[r])&&(i=(s?l(t,n,i):l(i))||i);return s&&i&&qt(t,n,i),i};const m="sps-file-upload";a.SpsFileUploadComponent=class extends HTMLElement{constructor(){super(),this.shown=!0,this.files=[],this.acceptMIMETypes=new Set,this.active=!1,this.error=!1,this.namesOfUnsupportedFiles=[],this.handleBrowseLinkClick=this.handleBrowseLinkClick.bind(this),this.handleDownloadButtonClick=this.handleDownloadButtonClick.bind(this),this.handleFileInputChange=this.handleFileInputChange.bind(this),this.dismiss=this.dismiss.bind(this)}get[I](){return[m,this.active&&`${m}--active`,this.error&&`${m}--error`,!this.shown&&`${m}--hidden`,this.mini&&`${m}--mini`,this.constrainContentWidth&&`${m}--constrained-content-width`]}connectedCallback(){this.description=this.description||(this.multiple?"Files":"File"),this.acceptExtensions&&this.processAcceptExtensions(this.acceptExtensions),this.maxSize&&this.parseAndValidateMaxSize(this.maxSize)}attributeChangedCallback(t,n,s){t==="acceptExtensions"&&this.processAcceptExtensions(s),t==="maxSize"&&this.parseAndValidateMaxSize(s)}dismiss(){this.dismissable&&(this.shown=!1,this.update(),this.dismissal.dispatch())}show(){this.dismissable&&(this.shown=!0,this.update())}render({t}){const n=this.error?A.SpsIcon.EXCLAMATION_CIRCLE:A.SpsIcon.UPLOAD_CLOUD,s=(this.multiple?t("design-system:fileUpload.instructions_plural"):t("design-system:fileUpload.instructions")).split("|");return o("div",{"data-fragment":!0},o("div",{className:`${m}__content`},this.processing?o("div",{"data-fragment":!0},o("i",{className:"sps-spinner sps-spinner--medium","aria-hidden":"true"}),o("div",{className:`${m}__instructions`},t("design-system:fileUpload.processing"))):o("div",{"data-fragment":!0},o("i",{className:`sps-icon sps-icon-${n} ${m}__icon-primary`,"aria-hidden":"true"}),o("div",{className:`${m}__title`},this.error?o("div",{"data-fragment":!0},t(this.namesOfUnsupportedFiles.length>1?"design-system:fileUpload.cancelled_plural":"design-system:fileUpload.cancelled")):o("div",{"data-fragment":!0},t("design-system:fileUpload.title",{description:this.description}))),this.error?o("div",{className:`${m}__errored-files`},new Set(this.namesOfUnsupportedFiles.map((i,r)=>{const l=Math.floor(i.length/2);return o("div",{className:`${m}__errored-filename`,key:i},o("span",{className:`${m}__errored-filename-segment`},i.substr(0,l)),o("div",{className:`${m}__errored-filename-segment`},o("span",null,i.substr(l))),r<this.namesOfUnsupportedFiles.length-1?",":"")}))):o("span",null),o("div",{className:`${m}__instructions`},o("div",{"data-fragment":!0},o("span",null,s[0]),o("a",{href:"",onClick:this.handleBrowseLinkClick},s[1]),o("span",null,s[2]))),o("div",{className:`${m}__requirements`},this.acceptExtensions?o("span",null,"("," ",t("design-system:fileUpload.acceptedTypes",{fileTypes:this.acceptExtensionsDescription})," ",")"):"",this.maxSize?o("span",null,"("," ",t("design-system:fileUpload.maximumSize",{size:this.maxSize})," ",")"):"",this.customRequirement?o("span",null," ",this.customRequirement," "):""),this.downloadLabel&&o("div",{className:`sps-button sps-button--link ${m}__download-button`,onClick:this.handleDownloadButtonClick},o("button",{type:"button"},o("i",{className:"sps-icon sps-icon-download-cloud","aria-hidden":"true"})," ",this.downloadLabel)))),this.dismissable&&!this.processing&&o("div",{className:`sps-button sps-button--icon ${m}__close-button`,onClick:this.dismiss},o("button",{type:"button",title:t("design-system:fileUpload.close")},o("i",{className:"sps-icon sps-icon-x","aria-hidden":"true"}))),o("form",null,o("input",{type:"file",accept:this.accept||"*/*",multiple:this.multiple||null,onChange:this.handleFileInputChange})))}parseAndValidateMaxSize(t){try{this.maxSizeBytes=c.parseFileSize(t)}catch{throw new Error(`Could not parse "${t}" as a file size.`)}}processAcceptExtensions(t){const s=(Array.isArray(t)?t:t.trim().split(/\s?,\s?/)).map(r=>r.replace(/^\./,"")),i=s.map(r=>`.${r}`.toLowerCase());this.acceptExtensionsDescription=i.map((r,l)=>l>0&&l===i.length-1?`or ${r}`:r).join(i.length>2?", ":" "),this.acceptMIMETypes.clear();for(const r of s)for(const l of me[r.toUpperCase()].split(","))this.acceptMIMETypes.add(l);this.accept=i.concat(Array.from(this.acceptMIMETypes)).join(",")}selectFiles(t){this.namesOfUnsupportedFiles=[];const n=Array.from(t);for(const s of n)this.acceptExtensions&&!this.acceptMIMETypes.has(s.type)&&this.namesOfUnsupportedFiles.push(s.name),this.maxSize&&s.size>this.maxSizeBytes&&this.namesOfUnsupportedFiles.indexOf(s.name)===-1&&this.namesOfUnsupportedFiles.push(s.name);this.namesOfUnsupportedFiles.length?(this.error=!0,this.fileInput.value=null,this.update()):(this.files=n,this.selection.dispatch(n))}handleDragOver(t){t.preventDefault(),t.stopPropagation()}handleDragEnter(t){t.preventDefault(),this.active=!0,this.error=!1,this.update()}handleDragLeave(t){t.preventDefault(),this.active=!1,this.update()}handleDrop(t){t.preventDefault(),t.stopPropagation(),this.active=!1,t.dataTransfer.items?this.selectFiles(Array.from(t.dataTransfer.items).map(n=>n.getAsFile())):this.selectFiles(t.dataTransfer.files),this.update()}handleBrowseLinkClick(t){t.preventDefault(),this.error=!1,this.update(),this.fileInput.click()}handleDownloadButtonClick(){this.download.dispatch()}handleFileInputChange(t){t.stopPropagation(),this.selectFiles(t.target.files)}},a.SpsFileUploadComponent.displayName=m,a.SpsFileUploadComponent.props={description:"string",multiple:"boolean",dismissable:"boolean",processing:"boolean",mini:"boolean",downloadLabel:"string",acceptExtensions:"Array<string> | string",maxSize:"string",customRequirement:"string",selection:{event:!0,type:"CustomEvent<Array<File>>"},dismissal:{event:!0,type:"CustomEvent<void>"},download:{event:!0,type:"CustomEvent<void>"}},f([p()],a.SpsFileUploadComponent.prototype,"description",2),f([p(Boolean)],a.SpsFileUploadComponent.prototype,"multiple",2),f([p(Boolean)],a.SpsFileUploadComponent.prototype,"shown",2),f([p(Boolean)],a.SpsFileUploadComponent.prototype,"dismissable",2),f([p(Boolean)],a.SpsFileUploadComponent.prototype,"processing",2),f([p(Boolean)],a.SpsFileUploadComponent.prototype,"mini",2),f([p(Boolean)],a.SpsFileUploadComponent.prototype,"constrainContentWidth",2),f([p()],a.SpsFileUploadComponent.prototype,"downloadLabel",2),f([p()],a.SpsFileUploadComponent.prototype,"acceptExtensions",2),f([p()],a.SpsFileUploadComponent.prototype,"maxSize",2),f([p()],a.SpsFileUploadComponent.prototype,"customRequirement",2),f([J()],a.SpsFileUploadComponent.prototype,"selection",2),f([J()],a.SpsFileUploadComponent.prototype,"dismissal",2),f([J()],a.SpsFileUploadComponent.prototype,"download",2),f([Y("input[type='file']")],a.SpsFileUploadComponent.prototype,"fileInput",2),f([z("dragover")],a.SpsFileUploadComponent.prototype,"handleDragOver",1),f([z("dragenter")],a.SpsFileUploadComponent.prototype,"handleDragEnter",1),f([z("dragleave")],a.SpsFileUploadComponent.prototype,"handleDragLeave",1),f([z("drop")],a.SpsFileUploadComponent.prototype,"handleDrop",1),a.SpsFileUploadComponent=f([x({tag:m})],a.SpsFileUploadComponent);const Xt={basic:{label:"Basic File Upload",description:c.code`
184
184
  <p>Simply allow the user to drag-and-drop or select either a single file or multiple files at once.</p>
185
- `,examples:{single:{description:"<p>Single file upload</p>",react:l.code`
185
+ `,examples:{single:{description:"<p>Single file upload</p>",react:c.code`
186
186
  function Component() {
187
187
  const ref = React.useRef()
188
188
 
@@ -205,7 +205,7 @@
205
205
  </div>
206
206
  )
207
207
  }
208
- `},multiple:{description:"<p>Multiple file upload</p>",react:l.code`
208
+ `},multiple:{description:"<p>Multiple file upload</p>",react:c.code`
209
209
  function Component() {
210
210
  const ref = React.useRef()
211
211
 
@@ -228,9 +228,9 @@
228
228
  </div>
229
229
  )
230
230
  }
231
- `}}},restrictions:{label:"Restrictions",description:l.code`
231
+ `}}},restrictions:{label:"Restrictions",description:c.code`
232
232
  <p>You can place restrictions on what files will be accepted with an extension whitelist and/or a maximum size.</p>
233
- `,examples:{size:{description:"<p>Maximum size</p>",react:l.code`
233
+ `,examples:{size:{description:"<p>Maximum size</p>",react:c.code`
234
234
  function Component() {
235
235
  const ref = React.useRef()
236
236
 
@@ -253,7 +253,7 @@
253
253
  </div>
254
254
  )
255
255
  }
256
- `},type:{description:"<p>File type whitelist</p>",react:l.code`
256
+ `},type:{description:"<p>File type whitelist</p>",react:c.code`
257
257
  function Component() {
258
258
  const ref = React.useRef()
259
259
 
@@ -281,7 +281,7 @@
281
281
  </div>
282
282
  )
283
283
  }
284
- `},both:{description:"<p>Both restrictions</p>",react:l.code`
284
+ `},both:{description:"<p>Both restrictions</p>",react:c.code`
285
285
  function Component() {
286
286
  const ref = React.useRef()
287
287
 
@@ -310,10 +310,10 @@
310
310
  </div>
311
311
  )
312
312
  }
313
- `}}},dismissable:{label:"Dismissable",description:l.code`
313
+ `}}},dismissable:{label:"Dismissable",description:c.code`
314
314
  <p>With this option, the file upload component can be dismissed by the user. If the user does dismiss it, you can
315
315
  show it again programmatically if you need to.</p>
316
- `,examples:{dismissable:{react:l.code`
316
+ `,examples:{dismissable:{react:c.code`
317
317
  function Component() {
318
318
  const [showFileUpload, setShowFileUpload] = React.useState(true)
319
319
  const ref = React.useRef()
@@ -346,10 +346,10 @@
346
346
  </div>
347
347
  )
348
348
  }
349
- `}}},downloadButton:{label:"Download Button",description:l.code`
349
+ `}}},downloadButton:{label:"Download Button",description:c.code`
350
350
  <p>You can optionally provide a button to download a file. Typically this will be a template for
351
351
  whatever the user is expected to upload. They can then fill out the template, save it, and upload it.</p>
352
- `,examples:{downloadButton:{react:l.code`
352
+ `,examples:{downloadButton:{react:c.code`
353
353
  function Component() {
354
354
  const ref = React.useRef()
355
355
 
@@ -377,10 +377,10 @@
377
377
  </div>
378
378
  )
379
379
  }
380
- `}}},mini:{label:"Mini File Upload",description:l.code`
380
+ `}}},mini:{label:"Mini File Upload",description:c.code`
381
381
  <p>When the file upload component is to be placed in a small container,
382
382
  it should be marked as a mini file upload so that everything fits.</p>
383
- `,examples:{single:{react:l.code`
383
+ `,examples:{single:{react:c.code`
384
384
  function Component() {
385
385
  const ref = React.useRef()
386
386
 
@@ -403,11 +403,11 @@
403
403
  </div>
404
404
  )
405
405
  }
406
- `}}},constrainContentWidth:{label:"Constrain Content Width",description:l.code`
406
+ `}}},constrainContentWidth:{label:"Constrain Content Width",description:c.code`
407
407
  <p>If this prop is provided, the content will be restricted to 50% of
408
408
  the overall width of the component. Consult your product designer if
409
409
  you're not sure whether to use this variant.</p>
410
- `,examples:{constrainContentWidth:{react:l.code`
410
+ `,examples:{constrainContentWidth:{react:c.code`
411
411
  function Component() {
412
412
  const ref = React.useRef()
413
413
 
@@ -430,7 +430,7 @@
430
430
  </div>
431
431
  )
432
432
  }
433
- `}}}};var Kt=Object.defineProperty,Qt=Object.getOwnPropertyDescriptor,N=(e,t,n,s)=>{for(var i=s>1?void 0:s?Qt(t,n):t,r=e.length-1,o;r>=0;r--)(o=e[r])&&(i=(s?o(t,n,i):o(i))||i);return s&&i&&Kt(t,n,i),i};const b="sps-insight-card";exports.SpsInsightCardComponent=class extends HTMLElement{constructor(){super(...arguments),this.kind=R.SpsInsightCardKind.GENERAL}get[P](){return[b,`${b}--${this.kind}`,this.detail&&this.detail.children.length?`${b}--has-detail`:null]}render({t}){const n=a("div",{className:`${b}__metric-count`},this.metric),s=a("div",{className:`${b}__description`},a("div",{className:`${b}__title`,style:{"-webkit-box-orient":"vertical"}},this.title),a("div",{className:`${b}__detail`},this.content)),i=this.partnercount,r=this.totalpartners,[o,p,u]=(i?t("design-system:insightCard.partnerCount",{count:i,total:r}):"").split("|");return a("div",{"data-fragment":!0},a("div",{className:`${b}__body`},this.icon?a("i",{className:`sps-icon sps-icon-${this.icon}`}):a("i",{className:`sps-icon sps-icon-${R.SpsInsightCardIcons[this.kind]}`}),n,s),i&&a("div",{className:`${b}__partner-count`},i===r?a("div",null,t("design-system:insightCard.all")):a("div",{"data-fragment":!0},a("div",null,o),a("div",null,p),a("div",null,u)),a("div",{className:`${b}__partners-text`},t("design-system:insightCard.partners"))))}};exports.SpsInsightCardComponent.displayName=b;exports.SpsInsightCardComponent.props={icon:"SpsIcon",kind:"SpsInsightCardKind",title:"string",metric:"number",partnerCount:"number",totalPartners:"number",secondary:"boolean"};N([c()],exports.SpsInsightCardComponent.prototype,"icon",2);N([c()],exports.SpsInsightCardComponent.prototype,"kind",2);N([c()],exports.SpsInsightCardComponent.prototype,"title",2);N([c()],exports.SpsInsightCardComponent.prototype,"metric",2);N([c()],exports.SpsInsightCardComponent.prototype,"partnerCount",2);N([c()],exports.SpsInsightCardComponent.prototype,"totalPartners",2);N([c()],exports.SpsInsightCardComponent.prototype,"secondary",2);N([Z()],exports.SpsInsightCardComponent.prototype,"content",2);N([Y(`.${b}__detail`)],exports.SpsInsightCardComponent.prototype,"detail",2);exports.SpsInsightCardComponent=N([D({tag:b})],exports.SpsInsightCardComponent);var Zt=Object.defineProperty,Jt=Object.getOwnPropertyDescriptor,me=(e,t,n,s)=>{for(var i=s>1?void 0:s?Jt(t,n):t,r=e.length-1,o;r>=0;r--)(o=e[r])&&(i=(s?o(t,n,i):o(i))||i);return s&&i&&Zt(t,n,i),i};const x="sps-insights";exports.SpsInsightsComponent=class extends HTMLElement{constructor(){super(),this.content=[],this.showAdditionalInsights=!1,this.toggleAdditionalInsights=this.toggleAdditionalInsights.bind(this)}get[P](){return[x,this.showAdditionalInsights&&`${x}--show-additional`,this.details&&Array.from(this.details).every(t=>!t.textContent)?`${x}--no-details`:null,this.content.length===6?`${x}--break-4`:null,this.content.length===7?`${x}--break-5`:null,this.content.length===8?`${x}--break-5`:null]}toggleAdditionalInsights(){this.showAdditionalInsights=!this.showAdditionalInsights,this.update()}render(){return a("div",{"data-fragment":!0},this.content,this.content.length>10&&a("div",{className:"sps-button sps-button--link",onClick:this.toggleAdditionalInsights},a("button",{type:"button"},this.showAdditionalInsights?"Hide ":"Show ","Additional Insights")))}};exports.SpsInsightsComponent.displayName=x;exports.SpsInsightsComponent.props={};me([Z()],exports.SpsInsightsComponent.prototype,"content",2);me([Ve(".sps-insight-card__detail")],exports.SpsInsightsComponent.prototype,"details",2);exports.SpsInsightsComponent=me([D({tag:x})],exports.SpsInsightsComponent);const Yt={basic:{label:"Basic Insight Cards",examples:{basic:{jsx:l.code`
433
+ `}}}};var Kt=Object.defineProperty,Qt=Object.getOwnPropertyDescriptor,N=(e,t,n,s)=>{for(var i=s>1?void 0:s?Qt(t,n):t,r=e.length-1,l;r>=0;r--)(l=e[r])&&(i=(s?l(t,n,i):l(i))||i);return s&&i&&Kt(t,n,i),i};const w="sps-insight-card";a.SpsInsightCardComponent=class extends HTMLElement{constructor(){super(...arguments),this.kind=A.SpsInsightCardKind.GENERAL}get[I](){return[w,`${w}--${this.kind}`,this.detail&&this.detail.children.length?`${w}--has-detail`:null]}render({t}){const n=o("div",{className:`${w}__metric-count`},this.metric),s=o("div",{className:`${w}__description`},o("div",{className:`${w}__title`,style:{"-webkit-box-orient":"vertical"}},this.title),o("div",{className:`${w}__detail`},this.content)),i=this.partnercount,r=this.totalpartners,[l,h,g]=(i?t("design-system:insightCard.partnerCount",{count:i,total:r}):"").split("|");return o("div",{"data-fragment":!0},o("div",{className:`${w}__body`},this.icon?o("i",{className:`sps-icon sps-icon-${this.icon}`}):o("i",{className:`sps-icon sps-icon-${A.SpsInsightCardIcons[this.kind]}`}),n,s),i&&o("div",{className:`${w}__partner-count`},i===r?o("div",null,t("design-system:insightCard.all")):o("div",{"data-fragment":!0},o("div",null,l),o("div",null,h),o("div",null,g)),o("div",{className:`${w}__partners-text`},t("design-system:insightCard.partners"))))}},a.SpsInsightCardComponent.displayName=w,a.SpsInsightCardComponent.props={icon:"SpsIcon",kind:"SpsInsightCardKind",title:"string",metric:"number",partnerCount:"number",totalPartners:"number",secondary:"boolean"},N([p()],a.SpsInsightCardComponent.prototype,"icon",2),N([p()],a.SpsInsightCardComponent.prototype,"kind",2),N([p()],a.SpsInsightCardComponent.prototype,"title",2),N([p()],a.SpsInsightCardComponent.prototype,"metric",2),N([p()],a.SpsInsightCardComponent.prototype,"partnerCount",2),N([p()],a.SpsInsightCardComponent.prototype,"totalPartners",2),N([p()],a.SpsInsightCardComponent.prototype,"secondary",2),N([Z()],a.SpsInsightCardComponent.prototype,"content",2),N([Y(`.${w}__detail`)],a.SpsInsightCardComponent.prototype,"detail",2),a.SpsInsightCardComponent=N([x({tag:w})],a.SpsInsightCardComponent);var Zt=Object.defineProperty,Jt=Object.getOwnPropertyDescriptor,ge=(e,t,n,s)=>{for(var i=s>1?void 0:s?Jt(t,n):t,r=e.length-1,l;r>=0;r--)(l=e[r])&&(i=(s?l(t,n,i):l(i))||i);return s&&i&&Zt(t,n,i),i};const O="sps-insights";a.SpsInsightsComponent=class extends HTMLElement{constructor(){super(),this.content=[],this.showAdditionalInsights=!1,this.toggleAdditionalInsights=this.toggleAdditionalInsights.bind(this)}get[I](){return[O,this.showAdditionalInsights&&`${O}--show-additional`,this.details&&Array.from(this.details).every(t=>!t.textContent)?`${O}--no-details`:null,this.content.length===6?`${O}--break-4`:null,this.content.length===7?`${O}--break-5`:null,this.content.length===8?`${O}--break-5`:null]}toggleAdditionalInsights(){this.showAdditionalInsights=!this.showAdditionalInsights,this.update()}render(){return o("div",{"data-fragment":!0},this.content,this.content.length>10&&o("div",{className:"sps-button sps-button--link",onClick:this.toggleAdditionalInsights},o("button",{type:"button"},this.showAdditionalInsights?"Hide ":"Show ","Additional Insights")))}},a.SpsInsightsComponent.displayName=O,a.SpsInsightsComponent.props={},ge([Z()],a.SpsInsightsComponent.prototype,"content",2),ge([He(".sps-insight-card__detail")],a.SpsInsightsComponent.prototype,"details",2),a.SpsInsightsComponent=ge([x({tag:O})],a.SpsInsightsComponent);const Yt={basic:{label:"Basic Insight Cards",examples:{basic:{jsx:c.code`
434
434
  <sps-insights>
435
435
  <sps-insight-card kind="general"
436
436
  metric="1234"
@@ -453,7 +453,7 @@
453
453
  title="Insight Card Title"
454
454
  ></sps-insight-card>
455
455
  </sps-insights>
456
- `}}},details:{label:"With Details",examples:{details:{jsx:l.code`
456
+ `}}},details:{label:"With Details",examples:{details:{jsx:c.code`
457
457
  <sps-insights>
458
458
  <sps-insight-card kind="general"
459
459
  metric="1234"
@@ -498,7 +498,7 @@
498
498
  <span className="gray600 font-weight-bold">Detail:</span> 792 units
499
499
  </sps-insight-card>
500
500
  </sps-insights>
501
- `}}},partner_count:{label:"Partner Count",examples:{partner_count:{jsx:l.code`
501
+ `}}},partner_count:{label:"Partner Count",examples:{partner_count:{jsx:c.code`
502
502
  <sps-insights>
503
503
  <sps-insight-card kind="general"
504
504
  metric="1234"
@@ -531,7 +531,7 @@
531
531
  totalPartners="250"
532
532
  ></sps-insight-card>
533
533
  </sps-insights>
534
- `}}},expansion:{label:"10+ Insight Cards",examples:{expansion:{jsx:l.code`
534
+ `}}},expansion:{label:"10+ Insight Cards",examples:{expansion:{jsx:c.code`
535
535
  <sps-insights>
536
536
  <sps-insight-card kind="general"
537
537
  metric="1234"
@@ -640,10 +640,10 @@
640
640
  <span className="gray600 font-weight-bold">Detail:</span> 792 units
641
641
  </sps-insight-card>
642
642
  </sps-insights>
643
- `}}},events:{label:"Adding a click handler",description:l.code`
643
+ `}}},events:{label:"Adding a click handler",description:c.code`
644
644
  <p>Attaching event handlers to native web components in React cannot be done the usual way at this time.
645
645
  Here is how to do it:</p>
646
- `,examples:{events:{react:l.code`
646
+ `,examples:{events:{react:c.code`
647
647
  function Component() {
648
648
  function handleClick() {
649
649
  window.alert("Insight card clicked");
@@ -675,7 +675,7 @@
675
675
  </sps-insights>
676
676
  );
677
677
  }
678
- `}}},alternateIcon:{label:"Using alternate icons",examples:{basic:{react:l.code`
678
+ `}}},alternateIcon:{label:"Using alternate icons",examples:{basic:{react:c.code`
679
679
  function DemoComponent() {
680
680
  return (
681
681
  <sps-insights>
@@ -712,9 +712,9 @@
712
712
  </sps-insights>
713
713
  )
714
714
  }
715
- `}}}};var Mt=Object.defineProperty,en=Object.getOwnPropertyDescriptor,E=(e,t,n,s)=>{for(var i=s>1?void 0:s?en(t,n):t,r=e.length-1,o;r>=0;r--)(o=e[r])&&(i=(s?o(t,n,i):o(i))||i);return s&&i&&Mt(t,n,i),i};exports.SpsNavTabComponent=class extends HTMLElement{constructor(){super(...arguments),this.active=!1,this.label="",this.tag=""}get[P](){return["sps-tabbed-nav__nav-item",this.active&&"sps-tabbed-nav__nav-item--active"]}render(){return a("a",{href:this.href,target:this.target,className:"sps-tabbed-nav__nav-item-link",tabIndex:0},this.icon&&a("i",{className:`sps-icon sps-icon-${this.icon}`}),this.label&&a("span",null,this.label),this.tag&&a("span",{className:"sps-tag sps-tag--default"},this.tag))}};exports.SpsNavTabComponent.displayName="sps-nav-tab";exports.SpsNavTabComponent.props={active:"boolean",label:"string",icon:"SpsIcon",tag:"string",href:"string",target:"string"};E([c()],exports.SpsNavTabComponent.prototype,"active",2);E([c()],exports.SpsNavTabComponent.prototype,"label",2);E([c()],exports.SpsNavTabComponent.prototype,"icon",2);E([c()],exports.SpsNavTabComponent.prototype,"tag",2);E([c()],exports.SpsNavTabComponent.prototype,"href",2);E([c()],exports.SpsNavTabComponent.prototype,"target",2);exports.SpsNavTabComponent=E([D({tag:"sps-nav-tab"})],exports.SpsNavTabComponent);var tn=Object.defineProperty,nn=Object.getOwnPropertyDescriptor,He=(e,t,n,s)=>{for(var i=s>1?void 0:s?nn(t,n):t,r=e.length-1,o;r>=0;r--)(o=e[r])&&(i=(s?o(t,n,i):o(i))||i);return s&&i&&tn(t,n,i),i};exports.SpsNavTabSetComponent=class extends HTMLElement{constructor(){super(...arguments),this.content=[]}render(){return a("nav",{className:"sps-tabbed-nav"},this.content)}};exports.SpsNavTabSetComponent.displayName="sps-nav-tab-set";exports.SpsNavTabSetComponent.props={};He([Z()],exports.SpsNavTabSetComponent.prototype,"content",2);exports.SpsNavTabSetComponent=He([D({tag:"sps-nav-tab-set"})],exports.SpsNavTabSetComponent);const sn={basic:{label:"Basic Navigation Tabs",description:l.code`
715
+ `}}}};var Mt=Object.defineProperty,en=Object.getOwnPropertyDescriptor,F=(e,t,n,s)=>{for(var i=s>1?void 0:s?en(t,n):t,r=e.length-1,l;r>=0;r--)(l=e[r])&&(i=(s?l(t,n,i):l(i))||i);return s&&i&&Mt(t,n,i),i};a.SpsNavTabComponent=class extends HTMLElement{constructor(){super(...arguments),this.active=!1,this.label="",this.tag=""}get[I](){return["sps-tabbed-nav__nav-item",this.active&&"sps-tabbed-nav__nav-item--active"]}render(){return o("a",{href:this.href,target:this.target,className:"sps-tabbed-nav__nav-item-link",tabIndex:0},this.icon&&o("i",{className:`sps-icon sps-icon-${this.icon}`}),this.label&&o("span",null,this.label),this.tag&&o("span",{className:"sps-tag sps-tag--default"},this.tag))}},a.SpsNavTabComponent.displayName="sps-nav-tab",a.SpsNavTabComponent.props={active:"boolean",label:"string",icon:"SpsIcon",tag:"string",href:"string",target:"string"},F([p()],a.SpsNavTabComponent.prototype,"active",2),F([p()],a.SpsNavTabComponent.prototype,"label",2),F([p()],a.SpsNavTabComponent.prototype,"icon",2),F([p()],a.SpsNavTabComponent.prototype,"tag",2),F([p()],a.SpsNavTabComponent.prototype,"href",2),F([p()],a.SpsNavTabComponent.prototype,"target",2),a.SpsNavTabComponent=F([x({tag:"sps-nav-tab"})],a.SpsNavTabComponent);var tn=Object.defineProperty,nn=Object.getOwnPropertyDescriptor,qe=(e,t,n,s)=>{for(var i=s>1?void 0:s?nn(t,n):t,r=e.length-1,l;r>=0;r--)(l=e[r])&&(i=(s?l(t,n,i):l(i))||i);return s&&i&&tn(t,n,i),i};a.SpsNavTabSetComponent=class extends HTMLElement{constructor(){super(...arguments),this.content=[]}render(){return o("nav",{className:"sps-tabbed-nav"},this.content)}},a.SpsNavTabSetComponent.displayName="sps-nav-tab-set",a.SpsNavTabSetComponent.props={},qe([Z()],a.SpsNavTabSetComponent.prototype,"content",2),a.SpsNavTabSetComponent=qe([x({tag:"sps-nav-tab-set"})],a.SpsNavTabSetComponent);const sn={basic:{label:"Basic Navigation Tabs",description:c.code`
716
716
  <p>Navigation tabs native web component</p>
717
- `,examples:{basic:{react:l.code`
717
+ `,examples:{basic:{react:c.code`
718
718
  function DemoComponent() {
719
719
  const tabs = [
720
720
  { label: "Tab A", icon: "chart-line" },
@@ -739,14 +739,14 @@
739
739
  </sps-nav-tab-set>
740
740
  )
741
741
  }
742
- `}}}};var rn=Object.defineProperty,an=Object.getOwnPropertyDescriptor,y=(e,t,n,s)=>{for(var i=s>1?void 0:s?an(t,n):t,r=e.length-1,o;r>=0;r--)(o=e[r])&&(i=(s?o(t,n,i):o(i))||i);return s&&i&&rn(t,n,i),i},qe=(e=>(e.FIT="fit",e.FILL="fill",e))(qe||{});const F="sps-photo";exports.SpsPhotoComponent=class extends HTMLElement{constructor(){super(...arguments),this.mode="fill"}get image(){return this.imageInternal}set image(t){this.imageInternal=t,t&&(this.waitForImgHeightInterval&&window.clearInterval(this.waitForImgHeightInterval),this.waitForImgHeightInterval=window.setInterval(()=>{const n=t.getBoundingClientRect();if(n.height){window.clearInterval(this.waitForImgHeightInterval),delete this.waitForImgHeightInterval;let s=n.width/n.height>1;this.fitWidth=s===(this.mode==="fit")}},1e3/60))}get[P](){return[F,this.fitWidth?`${F}--fit-width`:`${F}--fit-height`,this.placeholderIcon&&`${F}--placeholder`]}get[G](){return{fontSize:`${this.width*.05}rem`,width:`${this.width}rem`,height:`${.75*this.width}rem`}}connectedCallback(){this.waitForWidthInterval=window.setInterval(()=>{const t=this.getBoundingClientRect();t.width&&(this.setWidth(t.width),window.clearInterval(this.waitForWidthInterval),delete this.waitForWidthInterval)},1e3/60)}disconnectedCallback(){this.waitForWidthInterval&&window.clearInterval(this.waitForWidthInterval),this.waitForImgHeightInterval&&window.clearInterval(this.waitForImgHeightInterval)}render(){return this.src?this.width?a("img",{src:this.src,alt:this.altText}):a("span",null):a("i",{className:`sps-icon sps-icon-${this.placeholderIcon}`})}setWidth(t){if(t&&!this.width){const n=document.body.parentElement.style.fontSize||"16px",s=Number(n.substr(0,n.length-2));this.width=t/s}}};exports.SpsPhotoComponent.displayName=F;exports.SpsPhotoComponent.props={src:"string",altText:"string",mode:"SpsPhotoDisplayMode",placeholderIcon:"SpsIcon"};y([c()],exports.SpsPhotoComponent.prototype,"src",2);y([c()],exports.SpsPhotoComponent.prototype,"altText",2);y([c()],exports.SpsPhotoComponent.prototype,"mode",2);y([c()],exports.SpsPhotoComponent.prototype,"placeholderIcon",2);y([ue()],exports.SpsPhotoComponent.prototype,"width",2);y([ue()],exports.SpsPhotoComponent.prototype,"fitWidth",2);y([Y("img",{refresh:!0})],exports.SpsPhotoComponent.prototype,"image",1);exports.SpsPhotoComponent=y([D({tag:F})],exports.SpsPhotoComponent);const on={sizing:{label:"Sizing",description:l.code`
742
+ `}}}};var an=Object.defineProperty,rn=Object.getOwnPropertyDescriptor,D=(e,t,n,s)=>{for(var i=s>1?void 0:s?rn(t,n):t,r=e.length-1,l;r>=0;r--)(l=e[r])&&(i=(s?l(t,n,i):l(i))||i);return s&&i&&an(t,n,i),i},Ge=(e=>(e.FIT="fit",e.FILL="fill",e))(Ge||{});const U="sps-photo";a.SpsPhotoComponent=class extends HTMLElement{constructor(){super(...arguments),this.mode="fill"}get image(){return this.imageInternal}set image(t){this.imageInternal=t,t&&(this.waitForImgHeightInterval&&window.clearInterval(this.waitForImgHeightInterval),this.waitForImgHeightInterval=window.setInterval(()=>{const n=t.getBoundingClientRect();if(n.height){window.clearInterval(this.waitForImgHeightInterval),delete this.waitForImgHeightInterval;let s=n.width/n.height>1;this.fitWidth=s===(this.mode==="fit")}},1e3/60))}get[I](){return[U,this.fitWidth?`${U}--fit-width`:`${U}--fit-height`,this.placeholderIcon&&`${U}--placeholder`]}get[Q](){return{fontSize:`${this.width*.05}rem`,width:`${this.width}rem`,height:`${.75*this.width}rem`}}connectedCallback(){this.waitForWidthInterval=window.setInterval(()=>{const t=this.getBoundingClientRect();t.width&&(this.setWidth(t.width),window.clearInterval(this.waitForWidthInterval),delete this.waitForWidthInterval)},1e3/60)}disconnectedCallback(){this.waitForWidthInterval&&window.clearInterval(this.waitForWidthInterval),this.waitForImgHeightInterval&&window.clearInterval(this.waitForImgHeightInterval)}render(){return this.src?this.width?o("img",{src:this.src,alt:this.altText}):o("span",null):o("i",{className:`sps-icon sps-icon-${this.placeholderIcon}`})}setWidth(t){if(t&&!this.width){const n=document.body.parentElement.style.fontSize||"16px",s=Number(n.substr(0,n.length-2));this.width=t/s}}},a.SpsPhotoComponent.displayName=U,a.SpsPhotoComponent.props={src:"string",altText:"string",mode:"SpsPhotoDisplayMode",placeholderIcon:"SpsIcon"},D([p()],a.SpsPhotoComponent.prototype,"src",2),D([p()],a.SpsPhotoComponent.prototype,"altText",2),D([p()],a.SpsPhotoComponent.prototype,"mode",2),D([p()],a.SpsPhotoComponent.prototype,"placeholderIcon",2),D([fe()],a.SpsPhotoComponent.prototype,"width",2),D([fe()],a.SpsPhotoComponent.prototype,"fitWidth",2),D([Y("img",{refresh:!0})],a.SpsPhotoComponent.prototype,"image",1),a.SpsPhotoComponent=D([x({tag:U})],a.SpsPhotoComponent);const on={sizing:{label:"Sizing",description:c.code`
743
743
  <p>
744
744
  Photos are block elements, so a photo fills its container's width unless
745
745
  an explicit width is set. It is always a 4:3 aspect ratio. In this example,
746
746
  photos have been placed in cards which have different widths in the 12
747
747
  column grid.
748
748
  </p>
749
- `,examples:{basic:{jsx:l.code`
749
+ `,examples:{basic:{jsx:c.code`
750
750
  <div className="sfg-row">
751
751
  <div className="sfg-col-2">
752
752
  <sps-card>
@@ -764,7 +764,7 @@
764
764
  </sps-card>
765
765
  </div>
766
766
  </div>
767
- `}}},displayMode:{label:"Fill vs. Fit",description:l.code`
767
+ `}}},displayMode:{label:"Fill vs. Fit",description:c.code`
768
768
  <p>
769
769
  There are two display modes available:
770
770
  <ul>
@@ -772,7 +772,7 @@
772
772
  <li><b>"fit"</b> fits the entire image into the container, leaving any excess portions of the container blank.
773
773
  </ul>
774
774
  </p>
775
- `,examples:{landscape:{description:"<p>Landscape oriented photo (container outline added for illustrative purposes)</p>",jsx:l.code`
775
+ `,examples:{landscape:{description:"<p>Landscape oriented photo (container outline added for illustrative purposes)</p>",jsx:c.code`
776
776
  <div className="sfg-row">
777
777
  <div className="sfg-col-4">
778
778
  <sps-photo src="assets/images/photo-landscape.jpg" mode="fill"></sps-photo>
@@ -781,7 +781,7 @@
781
781
  <sps-photo src="assets/images/photo-landscape.jpg" mode="fit"></sps-photo>
782
782
  </div>
783
783
  </div>
784
- `},portrait:{description:"<p>Portrait oriented photo (container outline added for illustrative purposes)</p>",jsx:l.code`
784
+ `},portrait:{description:"<p>Portrait oriented photo (container outline added for illustrative purposes)</p>",jsx:c.code`
785
785
  <div className="sfg-row">
786
786
  <div className="sfg-col-4">
787
787
  <sps-photo src="assets/images/photo-portrait.jpg" mode="fill"></sps-photo>
@@ -790,7 +790,7 @@
790
790
  <sps-photo id="foo" src="assets/images/photo-portrait.jpg" mode="fit"></sps-photo>
791
791
  </div>
792
792
  </div>
793
- `}}},placeholder:{label:"Placeholders",description:l.code`
793
+ `}}},placeholder:{label:"Placeholders",description:c.code`
794
794
  <p>
795
795
  When an image is not provided for a particular use case (such as a user avatar,
796
796
  a company photo, item image, etc.), a placeholder should be shown in its place.
@@ -798,34 +798,34 @@
798
798
  The placeholder's icon, selected from our SPS icon set, should represent the
799
799
  type of image it is substituting for.
800
800
  </p>
801
- `,examples:{general:{description:"<p>General Photo</p>",jsx:l.code`
801
+ `,examples:{general:{description:"<p>General Photo</p>",jsx:c.code`
802
802
  <div className="sfg-row">
803
803
  <div className="sfg-col-3">
804
804
  <sps-photo placeholderIcon="photo"></sps-photo>
805
805
  </div>
806
806
  </div>
807
- `},photoAlt:{description:"<p>Photo Alt</p>",jsx:l.code`
807
+ `},photoAlt:{description:"<p>Photo Alt</p>",jsx:c.code`
808
808
  <div className="sfg-row">
809
809
  <div className="sfg-col-3">
810
810
  <sps-photo placeholderIcon="camera"></sps-photo>
811
811
  </div>
812
812
  </div>
813
- `},user:{description:"<p>User / Single Person</p>",jsx:l.code`
813
+ `},user:{description:"<p>User / Single Person</p>",jsx:c.code`
814
814
  <div className="sfg-row">
815
815
  <div className="sfg-col-3">
816
816
  <sps-photo placeholderIcon="user"></sps-photo>
817
817
  </div>
818
818
  </div>
819
- `},group:{description:"<p>Group / Multiple People</p>",jsx:l.code`
819
+ `},group:{description:"<p>Group / Multiple People</p>",jsx:c.code`
820
820
  <div className="sfg-row">
821
821
  <div className="sfg-col-3">
822
822
  <sps-photo placeholderIcon="group"></sps-photo>
823
823
  </div>
824
824
  </div>
825
- `},company:{description:"<p>Company / Building</p>",jsx:l.code`
825
+ `},company:{description:"<p>Company / Building</p>",jsx:c.code`
826
826
  <div className="sfg-row">
827
827
  <div className="sfg-col-3">
828
828
  <sps-photo placeholderIcon="building"></sps-photo>
829
829
  </div>
830
830
  </div>
831
- `}}}};exports.AttrBindings=re;exports.ClassBindings=P;exports.Component=D;exports.Content=Z;exports.EventDispatcher=J;exports.EventListener=j;exports.MANIFEST=Xe;exports.MIMEType=fe;exports.Prop=c;exports.QuerySelector=Y;exports.QuerySelectorAll=Ve;exports.SpsFileUploadExamples=Xt;exports.SpsInsightCardExamples=Yt;exports.SpsNavTabsExamples=sn;exports.SpsPhotoDisplayMode=qe;exports.SpsPhotoExamples=on;exports.StyleBindings=G;exports.Watch=ue;exports.h=a;exports.namespaceOverrideRegistrar=Vt;exports.register=Wt;exports.webComponentsUseI18n=jt;
831
+ `}}}};a.AttrBindings=ue,a.ClassBindings=I,a.Component=x,a.Content=Z,a.EventDispatcher=J,a.EventListener=z,a.MANIFEST=Xe,a.MIMEType=me,a.Prop=p,a.QuerySelector=Y,a.QuerySelectorAll=He,a.SpsFileUploadExamples=Xt,a.SpsInsightCardExamples=Yt,a.SpsNavTabsExamples=sn,a.SpsPhotoDisplayMode=Ge,a.SpsPhotoExamples=on,a.StyleBindings=Q,a.Watch=fe,a.h=o,a.namespaceOverrideRegistrar=Vt,a.register=Wt,a.webComponentsUseI18n=jt,Object.defineProperty(a,Symbol.toStringTag,{value:"Module"})});
package/package.json CHANGED
@@ -1,19 +1,20 @@
1
1
  {
2
2
  "name": "@spscommerce/ds-web-components",
3
3
  "description": "SPS Design System Native Web Components",
4
- "version": "8.21.0",
4
+ "version": "8.21.2",
5
5
  "author": "SPS Commerce",
6
6
  "license": "UNLICENSED",
7
7
  "repository": "https://github.com/spscommerce/woodland/tree/main/packages/@spscommerce/ds-web-components",
8
8
  "homepage": "https://github.com/spscommerce/woodland/tree/main/packages/@spscommerce/ds-web-components#readme",
9
- "main": "./lib/index.cjs.js",
10
- "module": "./lib/index.es.js",
9
+ "type": "module",
10
+ "module": "./lib/index.js",
11
+ "main": "./lib/index.umd.cjs",
11
12
  "types": "./lib/index.d.ts",
12
13
  "exports": {
13
14
  ".": {
14
- "import": "./lib/index.es.js",
15
- "require": "./lib/index.cjs.js",
16
- "default": "./lib/index.cjs.js",
15
+ "require": "./lib/index.umd.cjs",
16
+ "import": "./lib/index.js",
17
+ "default": "./lib/index.js",
17
18
  "types": "./lib/index.d.ts"
18
19
  }
19
20
  },
@@ -25,7 +26,7 @@
25
26
  },
26
27
  "peerDependencies": {
27
28
  "@spscommerce/utils": "^7.0.0",
28
- "@spscommerce/ds-shared": "8.21.0"
29
+ "@spscommerce/ds-shared": "8.21.2"
29
30
  },
30
31
  "devDependencies": {
31
32
  "@spscommerce/utils": "^7.0.0",
@@ -34,8 +35,8 @@
34
35
  "package-json": "10.0.0",
35
36
  "react": "^16.9.0",
36
37
  "react-dom": "^16.9.0",
37
- "@spscommerce/ds-shared": "8.21.0",
38
- "test": "8.21.0"
38
+ "@spscommerce/ds-shared": "8.21.2",
39
+ "test": "8.21.2"
39
40
  },
40
41
  "scripts": {
41
42
  "build": "pnpm run build:js && pnpm run build:types && pnpm run build:create-dist && pnpm run build:copy-dist",
package/vite.config.mjs CHANGED
@@ -8,8 +8,8 @@ export default defineConfig({
8
8
  build: {
9
9
  lib: {
10
10
  entry: path.resolve(__dirname, "src/index.ts"),
11
- formats: ["es", "cjs"],
12
- fileName: (format) => `index.${format}.js`,
11
+ name: "DSWebComponents",
12
+ fileName: "index",
13
13
  },
14
14
  outDir: path.resolve(__dirname, "./lib"),
15
15
  emptyOutDir: false,
File without changes
File without changes