@learncard/react 2.7.14 → 2.7.16

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (65) hide show
  1. package/dist/cjs/{CertificateDisplayCard-96545851.js → CertificateDisplayCard-11ebf814.js} +3 -3
  2. package/dist/cjs/{CertificateDisplayCard-96545851.js.map → CertificateDisplayCard-11ebf814.js.map} +1 -1
  3. package/dist/cjs/{MeritBadgeDisplayCard-d153be39.js → MeritBadgeDisplayCard-70930ef2.js} +3 -3
  4. package/dist/cjs/{MeritBadgeDisplayCard-d153be39.js.map → MeritBadgeDisplayCard-70930ef2.js.map} +1 -1
  5. package/dist/cjs/{MeritBadgeSkillsCount-bfd5681a.js → MeritBadgeSkillsCount-41a273ae.js} +2 -2
  6. package/dist/cjs/{MeritBadgeSkillsCount-bfd5681a.js.map → MeritBadgeSkillsCount-41a273ae.js.map} +1 -1
  7. package/dist/cjs/{VCCard-85e20a61.js → VCCard-7cf6e8de.js} +4 -4
  8. package/dist/cjs/{VCCard-85e20a61.js.map → VCCard-7cf6e8de.js.map} +1 -1
  9. package/dist/cjs/{VCDisplayBackFace-bf564112.js → VCDisplayBackFace-9c064eef.js} +3 -3
  10. package/dist/cjs/{VCDisplayBackFace-bf564112.js.map → VCDisplayBackFace-9c064eef.js.map} +1 -1
  11. package/dist/cjs/{VCDisplayCard-a2dbebac.js → VCDisplayCard-929fe8b9.js} +3 -3
  12. package/dist/cjs/{VCDisplayCard-a2dbebac.js.map → VCDisplayCard-929fe8b9.js.map} +1 -1
  13. package/dist/cjs/{VCDisplayCard2-e779aa25.js → VCDisplayCard2-caca1aa2.js} +253 -227
  14. package/dist/cjs/VCDisplayCard2-caca1aa2.js.map +1 -0
  15. package/dist/cjs/{VCVerificationPill-fb2ad16b.js → VCVerificationPill-09953688.js} +2 -2
  16. package/dist/cjs/{VCVerificationPill-fb2ad16b.js.map → VCVerificationPill-09953688.js.map} +1 -1
  17. package/dist/cjs/{credential.helpers-c1f43597.js → credential.helpers-afb94f02.js} +2 -2
  18. package/dist/cjs/{credential.helpers-c1f43597.js.map → credential.helpers-afb94f02.js.map} +1 -1
  19. package/dist/cjs/index.js +10 -10
  20. package/dist/cjs/index13.js +10 -10
  21. package/dist/cjs/index21.js +4 -4
  22. package/dist/cjs/index37.js +10 -10
  23. package/dist/cjs/index38.js +4 -4
  24. package/dist/cjs/index39.js +5 -5
  25. package/dist/cjs/index40.js +5 -5
  26. package/dist/cjs/index41.js +1 -1
  27. package/dist/cjs/index44.js +2 -2
  28. package/dist/cjs/index6.js +3 -3
  29. package/dist/cjs/{types.esm-e15a100d.js → types.esm-c33cbec2.js} +2 -2
  30. package/dist/cjs/types.esm-c33cbec2.js.map +1 -0
  31. package/dist/esm/{CertificateDisplayCard-0db06790.js → CertificateDisplayCard-b69fd06f.js} +3 -3
  32. package/dist/esm/{CertificateDisplayCard-0db06790.js.map → CertificateDisplayCard-b69fd06f.js.map} +1 -1
  33. package/dist/esm/{MeritBadgeDisplayCard-3ac56267.js → MeritBadgeDisplayCard-575a61ed.js} +3 -3
  34. package/dist/esm/{MeritBadgeDisplayCard-3ac56267.js.map → MeritBadgeDisplayCard-575a61ed.js.map} +1 -1
  35. package/dist/esm/{MeritBadgeSkillsCount-f2b1ab14.js → MeritBadgeSkillsCount-8f371ab1.js} +2 -2
  36. package/dist/esm/{MeritBadgeSkillsCount-f2b1ab14.js.map → MeritBadgeSkillsCount-8f371ab1.js.map} +1 -1
  37. package/dist/esm/{VCCard-1ae6ae1b.js → VCCard-af6c0f15.js} +4 -4
  38. package/dist/esm/{VCCard-1ae6ae1b.js.map → VCCard-af6c0f15.js.map} +1 -1
  39. package/dist/esm/{VCDisplayBackFace-f05a047b.js → VCDisplayBackFace-c618851f.js} +3 -3
  40. package/dist/esm/{VCDisplayBackFace-f05a047b.js.map → VCDisplayBackFace-c618851f.js.map} +1 -1
  41. package/dist/esm/{VCDisplayCard-3e11b093.js → VCDisplayCard-fb298063.js} +3 -3
  42. package/dist/esm/{VCDisplayCard-3e11b093.js.map → VCDisplayCard-fb298063.js.map} +1 -1
  43. package/dist/esm/{VCDisplayCard2-e8a1f9f5.js → VCDisplayCard2-95c022ae.js} +253 -227
  44. package/dist/esm/VCDisplayCard2-95c022ae.js.map +1 -0
  45. package/dist/esm/{VCVerificationPill-7e5c5fbe.js → VCVerificationPill-dc9dda81.js} +2 -2
  46. package/dist/esm/{VCVerificationPill-7e5c5fbe.js.map → VCVerificationPill-dc9dda81.js.map} +1 -1
  47. package/dist/esm/{credential.helpers-3d9244b6.js → credential.helpers-cdc2f4a3.js} +2 -2
  48. package/dist/esm/{credential.helpers-3d9244b6.js.map → credential.helpers-cdc2f4a3.js.map} +1 -1
  49. package/dist/esm/index.js +10 -10
  50. package/dist/esm/index13.js +10 -10
  51. package/dist/esm/index21.js +4 -4
  52. package/dist/esm/index37.js +10 -10
  53. package/dist/esm/index38.js +4 -4
  54. package/dist/esm/index39.js +5 -5
  55. package/dist/esm/index40.js +5 -5
  56. package/dist/esm/index41.js +1 -1
  57. package/dist/esm/index44.js +2 -2
  58. package/dist/esm/index6.js +3 -3
  59. package/dist/esm/{types.esm-099d2f24.js → types.esm-4ec5392e.js} +2 -2
  60. package/dist/esm/types.esm-4ec5392e.js.map +1 -0
  61. package/package.json +3 -3
  62. package/dist/cjs/VCDisplayCard2-e779aa25.js.map +0 -1
  63. package/dist/cjs/types.esm-e15a100d.js.map +0 -1
  64. package/dist/esm/VCDisplayCard2-e8a1f9f5.js.map +0 -1
  65. package/dist/esm/types.esm-099d2f24.js.map +0 -1
@@ -2,11 +2,11 @@ import React, { useRef, useEffect, useState, createContext, Component, Children,
2
2
  import './index-4fa491c1.js';
3
3
  import { a as VCVerificationCheckWithSpinner } from './VCVerificationCheck-80249524.js';
4
4
  import DefaultFace from './default-face.jpeg';
5
- import { a as getColorForVerificationStatus, j as format$1, h as getNameFromProfile, b as getInfoFromCredential, i as getImageFromProfile, k as getCategoryColor, g as getTotalCountOfSkills, c as categorizeSkills } from './credential.helpers-3d9244b6.js';
5
+ import { a as getColorForVerificationStatus, j as format$1, h as getNameFromProfile, b as getInfoFromCredential, i as getImageFromProfile, k as getCategoryColor, g as getTotalCountOfSkills, c as categorizeSkills } from './credential.helpers-cdc2f4a3.js';
6
6
  import { g as getBaseUrl, a as VideoIcon, C as Camera, G as GenericDocumentIcon, L as LinkIcon, p as prettyBytes, c as capitalize, X, E as ExclamationPoint, A as AcuteCheckmark, I as InfoIcon, b as LeftArrow, d as SkillsBox, t as truncateWithEllipsis, V as VERIFIER_STATES$1, i as VerifierStateBadgeAndText, P as PersonBadge, j as VerifiedBadge, U as UnknownVerifierBadge, k as RedFlag } from './VerifierStateBadgeAndText-86214479.js';
7
7
  import { L as Lightbox } from './Lightbox-a1aab9ea.js';
8
- import { V as VerificationStatusEnum } from './types.esm-099d2f24.js';
9
- import { A as AlignmentsBox, b as CertificateDisplayCard } from './CertificateDisplayCard-0db06790.js';
8
+ import { V as VerificationStatusEnum } from './types.esm-4ec5392e.js';
9
+ import { A as AlignmentsBox, b as CertificateDisplayCard } from './CertificateDisplayCard-b69fd06f.js';
10
10
  import { I as IDIcon, Q as QRCodeIcon, A as AwardRibbon } from './QRCodeIcon-e9569804.js';
11
11
  import { a as LCCategoryEnum } from './index-28917993.js';
12
12
  import { P as PuzzlePiece } from './PuzzlePiece-1fb12c2e.js';
@@ -22,7 +22,7 @@ import './medical.svg';
22
22
  import './social.svg';
23
23
  import './stem.svg';
24
24
  import './trade.svg';
25
- import { a as MeritBadgeDisplayCard } from './MeritBadgeDisplayCard-3ac56267.js';
25
+ import { a as MeritBadgeDisplayCard } from './MeritBadgeDisplayCard-575a61ed.js';
26
26
 
27
27
  const RoundedX = ({ className = "" }) => {
28
28
  return /* @__PURE__ */ React.createElement("svg", {
@@ -455,6 +455,188 @@ const TruncateTextBox = ({
455
455
  }, "Close"))), children);
456
456
  };
457
457
 
458
+ /*! @license Rematrix v0.2.2
459
+
460
+ Copyright 2018 Fisssion LLC.
461
+
462
+ Permission is hereby granted, free of charge, to any person obtaining a copy
463
+ of this software and associated documentation files (the "Software"), to deal
464
+ in the Software without restriction, including without limitation the rights
465
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
466
+ copies of the Software, and to permit persons to whom the Software is
467
+ furnished to do so, subject to the following conditions:
468
+
469
+ The above copyright notice and this permission notice shall be included in
470
+ all copies or substantial portions of the Software.
471
+
472
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
473
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
474
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
475
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
476
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
477
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
478
+ THE SOFTWARE.
479
+ */
480
+ /**
481
+ * @module Rematrix
482
+ */
483
+
484
+ /**
485
+ * Transformation matrices in the browser come in two flavors:
486
+ *
487
+ * - `matrix` using 6 values (short)
488
+ * - `matrix3d` using 16 values (long)
489
+ *
490
+ * This utility follows this [conversion guide](https://goo.gl/EJlUQ1)
491
+ * to expand short form matrices to their equivalent long form.
492
+ *
493
+ * @param {array} source - Accepts both short and long form matrices.
494
+ * @return {array}
495
+ */
496
+ function format(source) {
497
+ if (source.constructor !== Array) {
498
+ throw new TypeError('Expected array.')
499
+ }
500
+ if (source.length === 16) {
501
+ return source
502
+ }
503
+ if (source.length === 6) {
504
+ var matrix = identity();
505
+ matrix[0] = source[0];
506
+ matrix[1] = source[1];
507
+ matrix[4] = source[2];
508
+ matrix[5] = source[3];
509
+ matrix[12] = source[4];
510
+ matrix[13] = source[5];
511
+ return matrix
512
+ }
513
+ throw new RangeError('Expected array with either 6 or 16 values.')
514
+ }
515
+
516
+ /**
517
+ * Returns a matrix representing no transformation. The product of any matrix
518
+ * multiplied by the identity matrix will be the original matrix.
519
+ *
520
+ * > **Tip:** Similar to how `5 * 1 === 5`, where `1` is the identity.
521
+ *
522
+ * @return {array}
523
+ */
524
+ function identity() {
525
+ var matrix = [];
526
+ for (var i = 0; i < 16; i++) {
527
+ i % 5 == 0 ? matrix.push(1) : matrix.push(0);
528
+ }
529
+ return matrix
530
+ }
531
+
532
+ /**
533
+ * Returns a 4x4 matrix describing the combined transformations
534
+ * of both arguments.
535
+ *
536
+ * > **Note:** Order is very important. For example, rotating 45°
537
+ * along the Z-axis, followed by translating 500 pixels along the
538
+ * Y-axis... is not the same as translating 500 pixels along the
539
+ * Y-axis, followed by rotating 45° along on the Z-axis.
540
+ *
541
+ * @param {array} m - Accepts both short and long form matrices.
542
+ * @param {array} x - Accepts both short and long form matrices.
543
+ * @return {array}
544
+ */
545
+ function multiply(m, x) {
546
+ var fm = format(m);
547
+ var fx = format(x);
548
+ var product = [];
549
+
550
+ for (var i = 0; i < 4; i++) {
551
+ var row = [fm[i], fm[i + 4], fm[i + 8], fm[i + 12]];
552
+ for (var j = 0; j < 4; j++) {
553
+ var k = j * 4;
554
+ var col = [fx[k], fx[k + 1], fx[k + 2], fx[k + 3]];
555
+ var result =
556
+ row[0] * col[0] + row[1] * col[1] + row[2] * col[2] + row[3] * col[3];
557
+
558
+ product[i + k] = result;
559
+ }
560
+ }
561
+
562
+ return product
563
+ }
564
+
565
+ /**
566
+ * Attempts to return a 4x4 matrix describing the CSS transform
567
+ * matrix passed in, but will return the identity matrix as a
568
+ * fallback.
569
+ *
570
+ * **Tip:** In virtually all cases, this method is used to convert
571
+ * a CSS matrix (retrieved as a `string` from computed styles) to
572
+ * its equivalent array format.
573
+ *
574
+ * @param {string} source - String containing a valid CSS `matrix` or `matrix3d` property.
575
+ * @return {array}
576
+ */
577
+ function parse(source) {
578
+ if (typeof source === 'string') {
579
+ var match = source.match(/matrix(3d)?\(([^)]+)\)/);
580
+ if (match) {
581
+ var raw = match[2].split(', ').map(parseFloat);
582
+ return format(raw)
583
+ }
584
+ }
585
+ return identity()
586
+ }
587
+
588
+ /**
589
+ * Returns a 4x4 matrix describing X-axis scaling.
590
+ *
591
+ * @param {number} scalar - Decimal multiplier.
592
+ * @return {array}
593
+ */
594
+ function scaleX(scalar) {
595
+ var matrix = identity();
596
+ matrix[0] = scalar;
597
+ return matrix
598
+ }
599
+
600
+ /**
601
+ * Returns a 4x4 matrix describing Y-axis scaling.
602
+ *
603
+ * @param {number} scalar - Decimal multiplier.
604
+ * @return {array}
605
+ */
606
+ function scaleY(scalar) {
607
+ var matrix = identity();
608
+ matrix[5] = scalar;
609
+ return matrix
610
+ }
611
+
612
+ /**
613
+ * Returns a 4x4 matrix describing X-axis translation.
614
+ *
615
+ * @param {number} distance - Measured in pixels.
616
+ * @return {array}
617
+ */
618
+ function translateX(distance) {
619
+ var matrix = identity();
620
+ matrix[12] = distance;
621
+ return matrix
622
+ }
623
+
624
+ /**
625
+ * Returns a 4x4 matrix describing Y-axis translation.
626
+ *
627
+ * @param {number} distance - Measured in pixels.
628
+ * @return {array}
629
+ */
630
+ function translateY(distance) {
631
+ var matrix = identity();
632
+ matrix[13] = distance;
633
+ return matrix
634
+ }
635
+
636
+ var e=function(t){return "number"==typeof t},i=function(t){return "function"==typeof t},n=function(t){return "[object Object]"===Object.prototype.toString.call(t)},r=function(t){return Array.prototype.slice.apply(t)},s$1=function(t){var e=t.reduce(function(t,e){return t[e]=(t[e]||0)+1,t},{});return Object.keys(e).filter(function(t){return e[t]>1})};function a(t){return [].slice.call(arguments,1).forEach(function(e){if(e)for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);}),t}var o,l=function(t,e,i){return t+(e-t)*i},p={__proto__:null,isNumber:e,isFunction:i,isObject:n,toArray:r,getDuplicateValsAsStrings:s$1,assign:a,tweenProp:l},c$1="data-flip-id",u$1="data-inverse-flip-id",d$1="data-portal-key",f$1="data-exit-container",h$1={__proto__:null,DATA_FLIP_ID:c$1,DATA_INVERSE_FLIP_ID:u$1,DATA_FLIP_COMPONENT_ID:"data-flip-component-id",DATA_FLIP_CONFIG:"data-flip-config",DATA_PORTAL_KEY:d$1,DATA_EXIT_CONTAINER:f$1},g$1={noWobble:{stiffness:200,damping:26},gentle:{stiffness:120,damping:14},veryGentle:{stiffness:130,damping:17},wobbly:{stiffness:180,damping:12},stiff:{stiffness:260,damping:26}},m$1=function(t){return n(t)?t:Object.keys(g$1).indexOf(t)>-1?g$1[t]:{}};"undefined"!=typeof window&&(o=window.requestAnimationFrame);var v$1=o=o||function(t){window.setTimeout(t,1e3/60);},y$1=Date.now(),_="object"==typeof performance&&"function"==typeof performance.now?function(){return performance.now()}:function(){return Date.now()-y$1};function S(t,e){var i=t.indexOf(e);-1!==i&&t.splice(i,1);}var E=/*#__PURE__*/function(){function t(){}return t.prototype.run=function(){var t=this;v$1(function(){t.springSystem.loop(_());});},t}(),A=function(){this.position=0,this.velocity=0;},C=0,b=.001,I=/*#__PURE__*/function(){function t(t){this._id="s"+C++,this._springSystem=t,this.listeners=[],this._startValue=0,this._currentState=new A,this._displacementFromRestThreshold=.001,this._endValue=0,this._overshootClampingEnabled=!1,this._previousState=new A,this._restSpeedThreshold=.001,this._tempState=new A,this._timeAccumulator=0,this._wasAtRest=!0,this._cachedSpringConfig={};}var e=t.prototype;return e.getId=function(){return this._id},e.destroy=function(){this.listeners=[],this._springSystem.deregisterSpring(this);},e.setSpringConfig=function(t){return this._springConfig=t,this},e.getCurrentValue=function(){return this._currentState.position},e.getDisplacementDistanceForState=function(t){return Math.abs(this._endValue-t.position)},e.setEndValue=function(t){if(t===this._endValue)return this;if(this.prevEndValue=t,this._endValue===t&&this.isAtRest())return this;this._startValue=this.getCurrentValue(),this._endValue=t,this._springSystem.activateSpring(this.getId());for(var e=0,i=this.listeners.length;e<i;e++){var n=this.listeners[e].onSpringEndStateChange;n&&n(this);}return this},e.setVelocity=function(t){return t===this._currentState.velocity||(this._currentState.velocity=t,this._springSystem.activateSpring(this.getId())),this},e.setCurrentValue=function(t){this._startValue=t,this._currentState.position=t;for(var e=0,i=this.listeners.length;e<i;e++){var n=this.listeners[e];n.onSpringUpdate&&n.onSpringUpdate(this);}return this},e.setAtRest=function(){return this._endValue=this._currentState.position,this._tempState.position=this._currentState.position,this._currentState.velocity=0,this},e.setOvershootClampingEnabled=function(t){return this._overshootClampingEnabled=t,this},e.isOvershooting=function(){var t=this._startValue,e=this._endValue;return this._springConfig.tension>0&&(t<e&&this.getCurrentValue()>e||t>e&&this.getCurrentValue()<e)},e.advance=function(t,e){var i=this.isAtRest();if(!i||!this._wasAtRest){var n=e;e>.064&&(n=.064),this._timeAccumulator+=n;for(var r,s,a,o,l,p,c=this._springConfig.tension,u=this._springConfig.friction,d=this._currentState.position,f=this._currentState.velocity,h=this._tempState.position,g=this._tempState.velocity;this._timeAccumulator>=b;)this._timeAccumulator-=b,this._timeAccumulator<b&&(this._previousState.position=d,this._previousState.velocity=f),s=c*(this._endValue-h)-u*f,o=c*(this._endValue-(h=d+(r=f)*b*.5))-u*(g=f+s*b*.5),p=c*(this._endValue-(h=d+(a=g)*b*.5))-u*(g=f+o*b*.5),h=d+(l=g)*b,d+=1/6*(r+2*(a+l)+(g=f+p*b))*b,f+=1/6*(s+2*(o+p)+(c*(this._endValue-h)-u*g))*b;this._tempState.position=h,this._tempState.velocity=g,this._currentState.position=d,this._currentState.velocity=f,this._timeAccumulator>0&&this._interpolate(this._timeAccumulator/b),(this.isAtRest()||this._overshootClampingEnabled&&this.isOvershooting())&&(this._springConfig.tension>0?(this._startValue=this._endValue,this._currentState.position=this._endValue):(this._endValue=this._currentState.position,this._startValue=this._endValue),this.setVelocity(0),i=!0);var m=!1;this._wasAtRest&&(this._wasAtRest=!1,m=!0);var v=!1;i&&(this._wasAtRest=!0,v=!0),this.notifyPositionUpdated(m,v);}},e.notifyPositionUpdated=function(t,e){var i=this;this.listeners.filter(Boolean).forEach(function(n){t&&n.onSpringActivate&&!i._onActivateCalled&&(n.onSpringActivate(i),i._onActivateCalled=!0),n.onSpringUpdate&&n.onSpringUpdate(i),e&&n.onSpringAtRest&&n.onSpringAtRest(i);});},e.systemShouldAdvance=function(){return !this.isAtRest()||!this.wasAtRest()},e.wasAtRest=function(){return this._wasAtRest},e.isAtRest=function(){return Math.abs(this._currentState.velocity)<this._restSpeedThreshold&&(this.getDisplacementDistanceForState(this._currentState)<=this._displacementFromRestThreshold||0===this._springConfig.tension)},e._interpolate=function(t){this._currentState.position=this._currentState.position*t+this._previousState.position*(1-t),this._currentState.velocity=this._currentState.velocity*t+this._previousState.velocity*(1-t);},e.addListener=function(t){return this.listeners.push(t),this},e.addOneTimeListener=function(t){var e=this;return Object.keys(t).forEach(function(i){var n;t[i]=(n=t[i],function(){n.apply(void 0,[].slice.call(arguments)),e.removeListener(t);});}),this.listeners.push(t),this},e.removeListener=function(t){return S(this.listeners,t),this},t}(),w=/*#__PURE__*/function(){function t(t){this.looper=t||new E,this.looper.springSystem=this,this.listeners=[],this._activeSprings=[],this._idleSpringIndices=[],this._isIdle=!0,this._lastTimeMillis=-1,this._springRegistry={};}var e=t.prototype;return e.createSpring=function(t,e){return this.createSpringWithConfig({tension:t,friction:e})},e.createSpringWithConfig=function(t){var e=new I(this);return this.registerSpring(e),e.setSpringConfig(t),e},e.getIsIdle=function(){return this._isIdle},e.registerSpring=function(t){this._springRegistry[t.getId()]=t;},e.deregisterSpring=function(t){S(this._activeSprings,t),delete this._springRegistry[t.getId()];},e.advance=function(t,e){for(var i=this;this._idleSpringIndices.length>0;)this._idleSpringIndices.pop();for(this._activeSprings.filter(Boolean).forEach(function(n){n.systemShouldAdvance()?n.advance(t/1e3,e/1e3):i._idleSpringIndices.push(i._activeSprings.indexOf(n));});this._idleSpringIndices.length>0;){var n=this._idleSpringIndices.pop();n>=0&&this._activeSprings.splice(n,1);}},e.loop=function(t){var e;-1===this._lastTimeMillis&&(this._lastTimeMillis=t-1);var i=t-this._lastTimeMillis;this._lastTimeMillis=t;var n=0,r=this.listeners.length;for(n=0;n<r;n++)(e=this.listeners[n]).onBeforeIntegrate&&e.onBeforeIntegrate(this);for(this.advance(t,i),0===this._activeSprings.length&&(this._isIdle=!0,this._lastTimeMillis=-1),n=0;n<r;n++)(e=this.listeners[n]).onAfterIntegrate&&e.onAfterIntegrate(this);this._isIdle||this.looper.run();},e.activateSpring=function(t){var e=this._springRegistry[t];-1===this._activeSprings.indexOf(e)&&this._activeSprings.push(e),this.getIsIdle()&&(this._isIdle=!1,this.looper.run());},t}(),O=new w,x=function(t){var e=t.springConfig,i=e.overshootClamping,n=t.getOnUpdateFunc,r=t.onAnimationEnd,s=t.onSpringActivate,a=O.createSpring(e.stiffness,e.damping);a.setOvershootClampingEnabled(!!i);var o={onSpringActivate:s,onSpringAtRest:function(){a.destroy(),r();},onSpringUpdate:n({spring:a,onAnimationEnd:r})};return a.addListener(o),a},U=function(t){var e=x(t);return e.setEndValue(1),e},V=function(t,e){if(void 0===e&&(e={}),t&&t.length){e.reverse&&t.reverse();var i,n="number"!=typeof(i=e.speed)?1.1:1+Math.min(Math.max(5*i,0),5),r=1/Math.max(Math.min(t.length,100),10),s=t.map(function(t,e){var i=t.getOnUpdateFunc;return t.getOnUpdateFunc=function(t){var a=i(t);return function(t){var i=t.getCurrentValue();(i=i<.01?0:i>.99?1:i)>=r&&s[e+1]&&s[e+1](Math.max(Math.min(i*n,1),0)),a(t);}},t}).map(function(t){var e=x(t);if(e)return e.setEndValue.bind(e)}).filter(Boolean);s[0]&&s[0](1);}},F=function(t){return [0,1,4,5,12,13].map(function(e){return t[e]})},P=function(t){return t.top<window.innerHeight&&t.bottom>0&&t.left<window.innerWidth&&t.right>0};function D(t){return JSON.parse(t.dataset.flipConfig||"{}")}var R=function(t,e){var i;return a(t,((i={})[e[0]]=e[1],i))},T=function(t,e){return r(e?document.querySelectorAll("["+d$1+'="'+e+'"]'):t.querySelectorAll("["+c$1+"]"))},M=function(t){return t.map(function(t){return [t,t.getBoundingClientRect()]})},L=function(n){var o=n.cachedOrderedFlipIds,p=void 0===o?[]:o,f=n.inProgressAnimations,h=void 0===f?{}:f,v=n.flippedElementPositionsBeforeUpdate,y=void 0===v?{}:v,_=n.flipCallbacks,S=void 0===_?{}:_,E=n.containerEl,A=n.applyTransformOrigin,C=n.spring,b=n.debug,I=n.portalKey,w=n.staggerConfig,O=void 0===w?{}:w,x=n.decisionData,j=void 0===x?{}:x,B=n.handleEnterUpdateDelete,N=n.onComplete,L=n.onStart;if(!window.matchMedia("(prefers-reduced-motion: reduce)").matches){var q,X=M(T((q={element:E,portalKey:I}).element,q.portalKey)).map(function(t){var e=t[0],i=t[1],n=window.getComputedStyle(e);return [e.dataset.flipId,{element:e,rect:i,opacity:parseFloat(n.opacity),transform:n.transform}]}).reduce(R,{}),Y=function(t){var e=t.containerEl,i=t.portalKey;return i?function(t){return function(e){return r(document.querySelectorAll("["+d$1+'="'+t+'"]'+e))}}(i):e?function(t){var e=Math.random().toFixed(5);return t.dataset.flipperId=e,function(i){return r(t.querySelectorAll('[data-flipper-id="'+e+'"] '+i))}}(e):function(){return []}}({containerEl:E,portalKey:I}),W=function(t){return function(e){return t("["+c$1+'="'+e+'"]')[0]}}(Y),K=function(t){return y[t]&&X[t]},H=Object.keys(y).concat(Object.keys(X)).filter(function(t){return !K(t)}),J={flipCallbacks:S,getElement:W,flippedElementPositionsBeforeUpdate:y,flippedElementPositionsAfterUpdate:X,inProgressAnimations:h,decisionData:j},z=function(t){var e,i=t.unflippedIds,n=t.flipCallbacks,r=t.getElement,s=t.flippedElementPositionsBeforeUpdate,a=t.flippedElementPositionsAfterUpdate,o=t.inProgressAnimations,l=t.decisionData,p=i.filter(function(t){return a[t]}).filter(function(t){return n[t]&&n[t].onAppear}),c=i.filter(function(t){return s[t]&&n[t]&&n[t].onExit}),u=new Promise(function(t){e=t;}),d=[],f=0,h=c.map(function(t,i){var r=s[t].domDataForExitAnimations,a=r.element,p=r.parent,c=r.childPosition,u=c.top,h=c.left,g=c.width,m=c.height;"static"===getComputedStyle(p).position&&(p.style.position="relative"),a.style.transform="matrix(1, 0, 0, 1, 0, 0)",a.style.position="absolute",a.style.top=u+"px",a.style.left=h+"px",a.style.height=m+"px",a.style.width=g+"px";var v=d.filter(function(t){return t[0]===p})[0];v||(v=[p,document.createDocumentFragment()],d.push(v)),v[1].appendChild(a),f+=1;var y=function(){try{p.removeChild(a);}catch(t){}finally{0==(f-=1)&&e();}};return o[t]={stop:y},function(){return n[t].onExit(a,i,y,l)}});return d.forEach(function(t){t[0].appendChild(t[1]);}),h.length||e(),{hideEnteringElements:function(){p.forEach(function(t){var e=r(t);e&&(e.style.opacity="0");});},animateEnteringElements:function(){p.forEach(function(t,e){var i=r(t);i&&n[t].onAppear(i,e,l);});},animateExitingElements:function(){return h.forEach(function(t){return t()}),u}}}(a({},J,{unflippedIds:H})),G=z.hideEnteringElements,Q=z.animateEnteringElements,Z=z.animateExitingElements,$=a({},J,{containerEl:E,flippedIds:p.filter(K),applyTransformOrigin:A,spring:C,debug:b,staggerConfig:O,scopedSelector:Y,onComplete:N});L&&L(E,j);var tt=function(n){var o,p=n.flippedIds,c=n.flipCallbacks,d=n.inProgressAnimations,f=n.flippedElementPositionsBeforeUpdate,h=n.flippedElementPositionsAfterUpdate,v=n.applyTransformOrigin,y=n.spring,_=n.getElement,S=n.debug,E=n.staggerConfig,A=void 0===E?{}:E,C=n.decisionData,b=void 0===C?{}:C,I=n.onComplete,w=n.containerEl,O=new Promise(function(t){o=t;});if(I&&O.then(function(){return I(w,b)}),!p.length)return function(){return o([]),O};var x=[],R=_(p[0]),T=R?R.ownerDocument.querySelector("body"):document.querySelector("body");s$1(p);var M=p.map(function(n){var s=f[n].rect,p=h[n].rect,_=f[n].opacity,S=h[n].opacity,E=p.width<1||p.height<1,A=h[n].element;if(!P(s)&&!P(p))return !1;if(!A)return !1;var C,I,w,O=D(A),U=(w=(I=void 0===(C={flipperSpring:y,flippedSpring:O.spring})?{}:C).flippedSpring,a({},g$1.noWobble,m$1(I.flipperSpring),m$1(w))),V=!0===O.stagger?"default":O.stagger,R={element:A,id:n,stagger:V,springConfig:U};if(c[n]&&c[n].shouldFlip&&!c[n].shouldFlip(b.previous,b.current))return !1;var k=Math.abs(s.left-p.left)+Math.abs(s.top-p.top),j=Math.abs(s.width-p.width)+Math.abs(s.height-p.height),B=Math.abs(S-_);if(0===s.height&&0===p.height||0===s.width&&0===p.width||k<.5&&j<.5&&B<.01)return !1;var N=parse(h[n].transform),L={matrix:N},q={matrix:[]},X=[N];O.translate&&(X.push(translateX(s.left-p.left)),X.push(translateY(s.top-p.top))),O.scale&&(X.push(scaleX(Math.max(s.width,1)/Math.max(p.width,1))),X.push(scaleY(Math.max(s.height,1)/Math.max(p.height,1)))),O.opacity&&(q.opacity=_,L.opacity=S);var Y=[];if(!c[n]||!c[n].shouldInvert||c[n].shouldInvert(b.previous,b.current)){var W=function(t,e){return r(t.querySelectorAll("["+u$1+'="'+e+'"]'))}(A,n);Y=W.map(function(t){return [t,D(t)]});}q.matrix=F(X.reduce(multiply)),L.matrix=F(L.matrix);var K,H=function(t){var i=t.element,n=t.invertedChildren,r=t.body;return function(t){var s=t.matrix,a=t.opacity,o=t.forceMinVals;if(e(a)&&(i.style.opacity=a+""),o&&(i.style.minHeight="1px",i.style.minWidth="1px"),s){var l=function(t){return "matrix("+t.join(", ")+")"}(s);i.style.transform=l,n&&function(t){var e=t.matrix,i=t.body;t.invertedChildren.forEach(function(t){var n=t[0],r=t[1];if(i.contains(n)){var s=e[0],a=e[3],o=e[5],l={translateX:0,translateY:0,scaleX:1,scaleY:1},p="";r.translate&&(l.translateX=-e[4]/s,l.translateY=-o/a,p+="translate("+l.translateX+"px, "+l.translateY+"px)"),r.scale&&(l.scaleX=1/s,l.scaleY=1/a,p+=" scale("+l.scaleX+", "+l.scaleY+")"),n.style.transform=p;}});}({invertedChildren:n,matrix:s,body:r});}}}({element:A,invertedChildren:Y,body:T});if(c[n]&&c[n].onComplete){var J=c[n].onComplete;K=function(){return J(A,b)};}var z=e(q.opacity)&&e(L.opacity)&&q.opacity!==L.opacity,G=!1;return a({},R,{stagger:V,springConfig:U,getOnUpdateFunc:function(t){var e=t.spring,i=t.onAnimationEnd;return d[n]={destroy:e.destroy.bind(e),onAnimationEnd:i},function(t){c[n]&&c[n].onSpringUpdate&&c[n].onSpringUpdate(t.getCurrentValue()),G||(G=!0,c[n]&&c[n].onStart&&c[n].onStart(A,b));var e=t.getCurrentValue();if(T.contains(A)){var i={matrix:[]};i.matrix=q.matrix.map(function(t,i){return l(t,L.matrix[i],e)}),z&&(i.opacity=l(q.opacity,L.opacity,e)),H(i);}else t.destroy();}},initializeFlip:function(){H({matrix:q.matrix,opacity:z?q.opacity:void 0,forceMinVals:E}),c[n]&&c[n].onStartImmediate&&c[n].onStartImmediate(A,b),O.transformOrigin?A.style.transformOrigin=O.transformOrigin:v&&(A.style.transformOrigin="0 0"),Y.forEach(function(t){var e=t[0],i=t[1];i.transformOrigin?e.style.transformOrigin=i.transformOrigin:v&&(e.style.transformOrigin="0 0");});},onAnimationEnd:function(t){delete d[n],i(K)&&K(),A.style.transform="",Y.forEach(function(t){t[0].style.transform="";}),E&&A&&(A.style.minHeight="",A.style.minWidth=""),t||(x.push(n),x.length>=M.length&&o(x));},delayUntil:O.delayUntil})}).filter(Boolean);if(M.forEach(function(t){return (0, t.initializeFlip)()}),S)return function(){};var k=M.filter(function(t){return t.delayUntil&&(e=t.delayUntil,M.filter(function(t){return t.id===e}).length);var e;}),j={},B={},N={};k.forEach(function(t){t.stagger?(N[t.stagger]=!0,B[t.delayUntil]?B[t.delayUntil].push(t.stagger):B[t.delayUntil]=[t.stagger]):j[t.delayUntil]?j[t.delayUntil].push(t):j[t.delayUntil]=[t];});var L=M.filter(function(t){return t.stagger}).reduce(function(t,e){return t[e.stagger]?t[e.stagger].push(e):t[e.stagger]=[e],t},{}),q=M.filter(function(t){return -1===k.indexOf(t)});return q.forEach(function(t){t.onSpringActivate=function(){j[t.id]&&j[t.id].forEach(U),B[t.id]&&Object.keys(B[t.id].reduce(function(t,e){var i;return a(t,((i={})[e]=!0,i))},{})).forEach(function(t){V(L[t],A[t]);});};}),function(){return M.length||o([]),q.filter(function(t){return !t.stagger}).forEach(U),Object.keys(L).forEach(function(t){N[t]||V(L[t],A[t]);}),O}}($);B?B({hideEnteringElements:G,animateEnteringElements:Q,animateExitingElements:Z,animateFlippedElements:tt}):(G(),Z().then(Q),tt());}},q=function(t){var e=t.element,i=t.flipCallbacks,n=void 0===i?{}:i,s=t.inProgressAnimations,o=void 0===s?{}:s,l=T(e,t.portalKey),p=r(e.querySelectorAll("["+u$1+"]")),c={},d=[],h={};l.filter(function(t){return n&&n[t.dataset.flipId]&&n[t.dataset.flipId].onExit}).forEach(function(t){var e=t.parentNode;if(t.closest){var i=t.closest("["+f$1+"]");i&&(e=i);}var n=d.findIndex(function(t){return t[0]===e});-1===n&&(d.push([e,e.getBoundingClientRect()]),n=d.length-1),c[t.dataset.flipId]=d[n][1],h[t.dataset.flipId]=e;});var g=M(l),m=g.map(function(t){var e=t[0],i=t[1],r={};if(n&&n[e.dataset.flipId]&&n[e.dataset.flipId].onExit){var s=c[e.dataset.flipId];a(r,{element:e,parent:h[e.dataset.flipId],childPosition:{top:i.top-s.top,left:i.left-s.left,width:i.width,height:i.height}});}return [e.dataset.flipId,{rect:i,opacity:parseFloat(window.getComputedStyle(e).opacity||"1"),domDataForExitAnimations:r}]}).reduce(R,{});return function(t,e){Object.keys(t).forEach(function(e){t[e].destroy&&t[e].destroy(),t[e].onAnimationEnd&&t[e].onAnimationEnd(!0),delete t[e];}),e.forEach(function(t){t.style.transform="",t.style.opacity="";});}(o,l.concat(p)),{flippedElementPositions:m,cachedOrderedFlipIds:g.map(function(t){return t[0].dataset.flipId})}};new w;
637
+
638
+ function s(){return s=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n]);}return e},s.apply(this,arguments)}function c(e,t){return c=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},c(e,t)}function d(e,t){if(null==e)return {};var r,n,i={},o=Object.keys(e);for(n=0;n<o.length;n++)t.indexOf(r=o[n])>=0||(i[r]=e[r]);return i}var f=/*#__PURE__*/createContext({}),u=/*#__PURE__*/createContext("portal"),h=/*#__PURE__*/function(r){var n,o;function p(){for(var e,t=arguments.length,n=new Array(t),i=0;i<t;i++)n[i]=arguments[i];return (e=r.call.apply(r,[this].concat(n))||this).inProgressAnimations={},e.flipCallbacks={},e.el=void 0,e}o=r,(n=p).prototype=Object.create(o.prototype),n.prototype.constructor=n,c(n,o);var l=p.prototype;return l.getSnapshotBeforeUpdate=function(t){return t.flipKey!==this.props.flipKey&&this.el?q({element:this.el,flipCallbacks:this.flipCallbacks,inProgressAnimations:this.inProgressAnimations,portalKey:this.props.portalKey}):null},l.componentDidUpdate=function(e,r,n){this.props.flipKey!==e.flipKey&&this.el&&L({flippedElementPositionsBeforeUpdate:n.flippedElementPositions,cachedOrderedFlipIds:n.cachedOrderedFlipIds,containerEl:this.el,inProgressAnimations:this.inProgressAnimations,flipCallbacks:this.flipCallbacks,applyTransformOrigin:this.props.applyTransformOrigin,spring:this.props.spring,debug:this.props.debug,portalKey:this.props.portalKey,staggerConfig:this.props.staggerConfig,handleEnterUpdateDelete:this.props.handleEnterUpdateDelete,decisionData:{previous:e.decisionData,current:this.props.decisionData},onComplete:this.props.onComplete,onStart:this.props.onStart});},l.render=function(){var e=this,t=this.props,r=t.portalKey,n=/*#__PURE__*/React.createElement(f.Provider,{value:this.flipCallbacks},/*#__PURE__*/React.createElement(t.element,{className:t.className,ref:function(t){return e.el=t}},this.props.children));return r&&(n=/*#__PURE__*/React.createElement(u.Provider,{value:r},n)),n},p}(Component);h.defaultProps={applyTransformOrigin:!0,element:"div"};var m=["children","flipId","inverseFlipId","portalKey"],y=["children","flipId","shouldFlip","shouldInvert","onAppear","onStart","onStartImmediate","onComplete","onExit","onSpringUpdate"],g=function(e){var t,i=e.children,o=e.flipId,p$1=e.inverseFlipId,s=e.portalKey,c=d(e,m),f=i,u=function(e){return "function"==typeof e}(f);if(!u)try{f=Children.only(i);}catch(e){throw new Error("Each Flipped component must wrap a single child")}c.scale||c.translate||c.opacity||p.assign(c,{translate:!0,scale:!0,opacity:!0});var h=((t={})[h$1.DATA_FLIP_CONFIG]=JSON.stringify(c),t);return void 0!==o?h[h$1.DATA_FLIP_ID]=String(o):p$1&&(h[h$1.DATA_INVERSE_FLIP_ID]=String(p$1)),void 0!==s&&(h[h$1.DATA_PORTAL_KEY]=s),u?f(h):/*#__PURE__*/cloneElement(f,h)},v=function(e){var t=e.children,n=e.flipId,o=e.shouldFlip,p$1=e.shouldInvert,l=e.onAppear,a=e.onStart,c=e.onStartImmediate,h=e.onComplete,m=e.onExit,v=e.onSpringUpdate,I=d(e,y);return t?I.inverseFlipId?/*#__PURE__*/React.createElement(g,s({},I),t):/*#__PURE__*/React.createElement(u.Consumer,null,function(e){return React.createElement(f.Consumer,null,function(d){return p.isObject(d)&&n&&(d[n]={shouldFlip:o,shouldInvert:p$1,onAppear:l,onStart:a,onStartImmediate:c,onComplete:h,onExit:m,onSpringUpdate:v}),/*#__PURE__*/React.createElement(g,s({flipId:n},I,{portalKey:e}),t)})}):null};v.displayName="Flipped";
639
+
458
640
  const VerificationRow = ({ verification }) => {
459
641
  var _a, _b;
460
642
  const [showInfo, setShowInfo] = useState(false);
@@ -534,7 +716,9 @@ const VC2BackFace = ({
534
716
  const criteria = (_a = achievement == null ? void 0 : achievement.criteria) == null ? void 0 : _a.narrative;
535
717
  const description = achievement == null ? void 0 : achievement.description;
536
718
  const alignment = achievement == null ? void 0 : achievement.alignment;
537
- return /* @__PURE__ */ React.createElement("section", {
719
+ return /* @__PURE__ */ React.createElement(v, {
720
+ inverseFlipId: "card"
721
+ }, /* @__PURE__ */ React.createElement("section", {
538
722
  className: "vc-back-face flex flex-col gap-[20px] w-full px-[15px] pb-[25px]"
539
723
  }, showBackButton && /* @__PURE__ */ React.createElement("div", {
540
724
  className: "w-full"
@@ -578,7 +762,7 @@ const VC2BackFace = ({
578
762
  style: "boost"
579
763
  }), verificationItems && verificationItems.length > 0 && /* @__PURE__ */ React.createElement(VerificationsBox, {
580
764
  verificationItems
581
- }));
765
+ })));
582
766
  };
583
767
 
584
768
  const VC2FrontFaceInfo = ({
@@ -624,7 +808,9 @@ const VC2FrontFaceInfo = ({
624
808
  verifierState = VERIFIER_STATES$1.unknownVerifier;
625
809
  }
626
810
  }
627
- return /* @__PURE__ */ React.createElement("section", {
811
+ return /* @__PURE__ */ React.createElement(v, {
812
+ inverseFlipId: "card"
813
+ }, /* @__PURE__ */ React.createElement("section", {
628
814
  className: "vc-front-face w-full px-[15px] flex flex-col items-center gap-[15px]"
629
815
  }, imageUrl && !customThumbComponent && /* @__PURE__ */ React.createElement("img", {
630
816
  className: "vc-front-image h-[130px] w-[130px] rounded-[10px]",
@@ -653,191 +839,9 @@ const VC2FrontFaceInfo = ({
653
839
  className: "font-[700]"
654
840
  }, issuerName))), /* @__PURE__ */ React.createElement(VerifierStateBadgeAndText, {
655
841
  verifierState
656
- })))));
842
+ }))))));
657
843
  };
658
844
 
659
- /*! @license Rematrix v0.2.2
660
-
661
- Copyright 2018 Fisssion LLC.
662
-
663
- Permission is hereby granted, free of charge, to any person obtaining a copy
664
- of this software and associated documentation files (the "Software"), to deal
665
- in the Software without restriction, including without limitation the rights
666
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
667
- copies of the Software, and to permit persons to whom the Software is
668
- furnished to do so, subject to the following conditions:
669
-
670
- The above copyright notice and this permission notice shall be included in
671
- all copies or substantial portions of the Software.
672
-
673
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
674
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
675
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
676
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
677
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
678
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
679
- THE SOFTWARE.
680
- */
681
- /**
682
- * @module Rematrix
683
- */
684
-
685
- /**
686
- * Transformation matrices in the browser come in two flavors:
687
- *
688
- * - `matrix` using 6 values (short)
689
- * - `matrix3d` using 16 values (long)
690
- *
691
- * This utility follows this [conversion guide](https://goo.gl/EJlUQ1)
692
- * to expand short form matrices to their equivalent long form.
693
- *
694
- * @param {array} source - Accepts both short and long form matrices.
695
- * @return {array}
696
- */
697
- function format(source) {
698
- if (source.constructor !== Array) {
699
- throw new TypeError('Expected array.')
700
- }
701
- if (source.length === 16) {
702
- return source
703
- }
704
- if (source.length === 6) {
705
- var matrix = identity();
706
- matrix[0] = source[0];
707
- matrix[1] = source[1];
708
- matrix[4] = source[2];
709
- matrix[5] = source[3];
710
- matrix[12] = source[4];
711
- matrix[13] = source[5];
712
- return matrix
713
- }
714
- throw new RangeError('Expected array with either 6 or 16 values.')
715
- }
716
-
717
- /**
718
- * Returns a matrix representing no transformation. The product of any matrix
719
- * multiplied by the identity matrix will be the original matrix.
720
- *
721
- * > **Tip:** Similar to how `5 * 1 === 5`, where `1` is the identity.
722
- *
723
- * @return {array}
724
- */
725
- function identity() {
726
- var matrix = [];
727
- for (var i = 0; i < 16; i++) {
728
- i % 5 == 0 ? matrix.push(1) : matrix.push(0);
729
- }
730
- return matrix
731
- }
732
-
733
- /**
734
- * Returns a 4x4 matrix describing the combined transformations
735
- * of both arguments.
736
- *
737
- * > **Note:** Order is very important. For example, rotating 45°
738
- * along the Z-axis, followed by translating 500 pixels along the
739
- * Y-axis... is not the same as translating 500 pixels along the
740
- * Y-axis, followed by rotating 45° along on the Z-axis.
741
- *
742
- * @param {array} m - Accepts both short and long form matrices.
743
- * @param {array} x - Accepts both short and long form matrices.
744
- * @return {array}
745
- */
746
- function multiply(m, x) {
747
- var fm = format(m);
748
- var fx = format(x);
749
- var product = [];
750
-
751
- for (var i = 0; i < 4; i++) {
752
- var row = [fm[i], fm[i + 4], fm[i + 8], fm[i + 12]];
753
- for (var j = 0; j < 4; j++) {
754
- var k = j * 4;
755
- var col = [fx[k], fx[k + 1], fx[k + 2], fx[k + 3]];
756
- var result =
757
- row[0] * col[0] + row[1] * col[1] + row[2] * col[2] + row[3] * col[3];
758
-
759
- product[i + k] = result;
760
- }
761
- }
762
-
763
- return product
764
- }
765
-
766
- /**
767
- * Attempts to return a 4x4 matrix describing the CSS transform
768
- * matrix passed in, but will return the identity matrix as a
769
- * fallback.
770
- *
771
- * **Tip:** In virtually all cases, this method is used to convert
772
- * a CSS matrix (retrieved as a `string` from computed styles) to
773
- * its equivalent array format.
774
- *
775
- * @param {string} source - String containing a valid CSS `matrix` or `matrix3d` property.
776
- * @return {array}
777
- */
778
- function parse(source) {
779
- if (typeof source === 'string') {
780
- var match = source.match(/matrix(3d)?\(([^)]+)\)/);
781
- if (match) {
782
- var raw = match[2].split(', ').map(parseFloat);
783
- return format(raw)
784
- }
785
- }
786
- return identity()
787
- }
788
-
789
- /**
790
- * Returns a 4x4 matrix describing X-axis scaling.
791
- *
792
- * @param {number} scalar - Decimal multiplier.
793
- * @return {array}
794
- */
795
- function scaleX(scalar) {
796
- var matrix = identity();
797
- matrix[0] = scalar;
798
- return matrix
799
- }
800
-
801
- /**
802
- * Returns a 4x4 matrix describing Y-axis scaling.
803
- *
804
- * @param {number} scalar - Decimal multiplier.
805
- * @return {array}
806
- */
807
- function scaleY(scalar) {
808
- var matrix = identity();
809
- matrix[5] = scalar;
810
- return matrix
811
- }
812
-
813
- /**
814
- * Returns a 4x4 matrix describing X-axis translation.
815
- *
816
- * @param {number} distance - Measured in pixels.
817
- * @return {array}
818
- */
819
- function translateX(distance) {
820
- var matrix = identity();
821
- matrix[12] = distance;
822
- return matrix
823
- }
824
-
825
- /**
826
- * Returns a 4x4 matrix describing Y-axis translation.
827
- *
828
- * @param {number} distance - Measured in pixels.
829
- * @return {array}
830
- */
831
- function translateY(distance) {
832
- var matrix = identity();
833
- matrix[13] = distance;
834
- return matrix
835
- }
836
-
837
- var e=function(t){return "number"==typeof t},i=function(t){return "function"==typeof t},n=function(t){return "[object Object]"===Object.prototype.toString.call(t)},r=function(t){return Array.prototype.slice.apply(t)},s$1=function(t){var e=t.reduce(function(t,e){return t[e]=(t[e]||0)+1,t},{});return Object.keys(e).filter(function(t){return e[t]>1})};function a(t){return [].slice.call(arguments,1).forEach(function(e){if(e)for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);}),t}var o,l=function(t,e,i){return t+(e-t)*i},p={__proto__:null,isNumber:e,isFunction:i,isObject:n,toArray:r,getDuplicateValsAsStrings:s$1,assign:a,tweenProp:l},c$1="data-flip-id",u$1="data-inverse-flip-id",d$1="data-portal-key",f$1="data-exit-container",h$1={__proto__:null,DATA_FLIP_ID:c$1,DATA_INVERSE_FLIP_ID:u$1,DATA_FLIP_COMPONENT_ID:"data-flip-component-id",DATA_FLIP_CONFIG:"data-flip-config",DATA_PORTAL_KEY:d$1,DATA_EXIT_CONTAINER:f$1},g$1={noWobble:{stiffness:200,damping:26},gentle:{stiffness:120,damping:14},veryGentle:{stiffness:130,damping:17},wobbly:{stiffness:180,damping:12},stiff:{stiffness:260,damping:26}},m$1=function(t){return n(t)?t:Object.keys(g$1).indexOf(t)>-1?g$1[t]:{}};"undefined"!=typeof window&&(o=window.requestAnimationFrame);var v$1=o=o||function(t){window.setTimeout(t,1e3/60);},y$1=Date.now(),_="object"==typeof performance&&"function"==typeof performance.now?function(){return performance.now()}:function(){return Date.now()-y$1};function S(t,e){var i=t.indexOf(e);-1!==i&&t.splice(i,1);}var E=/*#__PURE__*/function(){function t(){}return t.prototype.run=function(){var t=this;v$1(function(){t.springSystem.loop(_());});},t}(),A=function(){this.position=0,this.velocity=0;},C=0,b=.001,I=/*#__PURE__*/function(){function t(t){this._id="s"+C++,this._springSystem=t,this.listeners=[],this._startValue=0,this._currentState=new A,this._displacementFromRestThreshold=.001,this._endValue=0,this._overshootClampingEnabled=!1,this._previousState=new A,this._restSpeedThreshold=.001,this._tempState=new A,this._timeAccumulator=0,this._wasAtRest=!0,this._cachedSpringConfig={};}var e=t.prototype;return e.getId=function(){return this._id},e.destroy=function(){this.listeners=[],this._springSystem.deregisterSpring(this);},e.setSpringConfig=function(t){return this._springConfig=t,this},e.getCurrentValue=function(){return this._currentState.position},e.getDisplacementDistanceForState=function(t){return Math.abs(this._endValue-t.position)},e.setEndValue=function(t){if(t===this._endValue)return this;if(this.prevEndValue=t,this._endValue===t&&this.isAtRest())return this;this._startValue=this.getCurrentValue(),this._endValue=t,this._springSystem.activateSpring(this.getId());for(var e=0,i=this.listeners.length;e<i;e++){var n=this.listeners[e].onSpringEndStateChange;n&&n(this);}return this},e.setVelocity=function(t){return t===this._currentState.velocity||(this._currentState.velocity=t,this._springSystem.activateSpring(this.getId())),this},e.setCurrentValue=function(t){this._startValue=t,this._currentState.position=t;for(var e=0,i=this.listeners.length;e<i;e++){var n=this.listeners[e];n.onSpringUpdate&&n.onSpringUpdate(this);}return this},e.setAtRest=function(){return this._endValue=this._currentState.position,this._tempState.position=this._currentState.position,this._currentState.velocity=0,this},e.setOvershootClampingEnabled=function(t){return this._overshootClampingEnabled=t,this},e.isOvershooting=function(){var t=this._startValue,e=this._endValue;return this._springConfig.tension>0&&(t<e&&this.getCurrentValue()>e||t>e&&this.getCurrentValue()<e)},e.advance=function(t,e){var i=this.isAtRest();if(!i||!this._wasAtRest){var n=e;e>.064&&(n=.064),this._timeAccumulator+=n;for(var r,s,a,o,l,p,c=this._springConfig.tension,u=this._springConfig.friction,d=this._currentState.position,f=this._currentState.velocity,h=this._tempState.position,g=this._tempState.velocity;this._timeAccumulator>=b;)this._timeAccumulator-=b,this._timeAccumulator<b&&(this._previousState.position=d,this._previousState.velocity=f),s=c*(this._endValue-h)-u*f,o=c*(this._endValue-(h=d+(r=f)*b*.5))-u*(g=f+s*b*.5),p=c*(this._endValue-(h=d+(a=g)*b*.5))-u*(g=f+o*b*.5),h=d+(l=g)*b,d+=1/6*(r+2*(a+l)+(g=f+p*b))*b,f+=1/6*(s+2*(o+p)+(c*(this._endValue-h)-u*g))*b;this._tempState.position=h,this._tempState.velocity=g,this._currentState.position=d,this._currentState.velocity=f,this._timeAccumulator>0&&this._interpolate(this._timeAccumulator/b),(this.isAtRest()||this._overshootClampingEnabled&&this.isOvershooting())&&(this._springConfig.tension>0?(this._startValue=this._endValue,this._currentState.position=this._endValue):(this._endValue=this._currentState.position,this._startValue=this._endValue),this.setVelocity(0),i=!0);var m=!1;this._wasAtRest&&(this._wasAtRest=!1,m=!0);var v=!1;i&&(this._wasAtRest=!0,v=!0),this.notifyPositionUpdated(m,v);}},e.notifyPositionUpdated=function(t,e){var i=this;this.listeners.filter(Boolean).forEach(function(n){t&&n.onSpringActivate&&!i._onActivateCalled&&(n.onSpringActivate(i),i._onActivateCalled=!0),n.onSpringUpdate&&n.onSpringUpdate(i),e&&n.onSpringAtRest&&n.onSpringAtRest(i);});},e.systemShouldAdvance=function(){return !this.isAtRest()||!this.wasAtRest()},e.wasAtRest=function(){return this._wasAtRest},e.isAtRest=function(){return Math.abs(this._currentState.velocity)<this._restSpeedThreshold&&(this.getDisplacementDistanceForState(this._currentState)<=this._displacementFromRestThreshold||0===this._springConfig.tension)},e._interpolate=function(t){this._currentState.position=this._currentState.position*t+this._previousState.position*(1-t),this._currentState.velocity=this._currentState.velocity*t+this._previousState.velocity*(1-t);},e.addListener=function(t){return this.listeners.push(t),this},e.addOneTimeListener=function(t){var e=this;return Object.keys(t).forEach(function(i){var n;t[i]=(n=t[i],function(){n.apply(void 0,[].slice.call(arguments)),e.removeListener(t);});}),this.listeners.push(t),this},e.removeListener=function(t){return S(this.listeners,t),this},t}(),w=/*#__PURE__*/function(){function t(t){this.looper=t||new E,this.looper.springSystem=this,this.listeners=[],this._activeSprings=[],this._idleSpringIndices=[],this._isIdle=!0,this._lastTimeMillis=-1,this._springRegistry={};}var e=t.prototype;return e.createSpring=function(t,e){return this.createSpringWithConfig({tension:t,friction:e})},e.createSpringWithConfig=function(t){var e=new I(this);return this.registerSpring(e),e.setSpringConfig(t),e},e.getIsIdle=function(){return this._isIdle},e.registerSpring=function(t){this._springRegistry[t.getId()]=t;},e.deregisterSpring=function(t){S(this._activeSprings,t),delete this._springRegistry[t.getId()];},e.advance=function(t,e){for(var i=this;this._idleSpringIndices.length>0;)this._idleSpringIndices.pop();for(this._activeSprings.filter(Boolean).forEach(function(n){n.systemShouldAdvance()?n.advance(t/1e3,e/1e3):i._idleSpringIndices.push(i._activeSprings.indexOf(n));});this._idleSpringIndices.length>0;){var n=this._idleSpringIndices.pop();n>=0&&this._activeSprings.splice(n,1);}},e.loop=function(t){var e;-1===this._lastTimeMillis&&(this._lastTimeMillis=t-1);var i=t-this._lastTimeMillis;this._lastTimeMillis=t;var n=0,r=this.listeners.length;for(n=0;n<r;n++)(e=this.listeners[n]).onBeforeIntegrate&&e.onBeforeIntegrate(this);for(this.advance(t,i),0===this._activeSprings.length&&(this._isIdle=!0,this._lastTimeMillis=-1),n=0;n<r;n++)(e=this.listeners[n]).onAfterIntegrate&&e.onAfterIntegrate(this);this._isIdle||this.looper.run();},e.activateSpring=function(t){var e=this._springRegistry[t];-1===this._activeSprings.indexOf(e)&&this._activeSprings.push(e),this.getIsIdle()&&(this._isIdle=!1,this.looper.run());},t}(),O=new w,x=function(t){var e=t.springConfig,i=e.overshootClamping,n=t.getOnUpdateFunc,r=t.onAnimationEnd,s=t.onSpringActivate,a=O.createSpring(e.stiffness,e.damping);a.setOvershootClampingEnabled(!!i);var o={onSpringActivate:s,onSpringAtRest:function(){a.destroy(),r();},onSpringUpdate:n({spring:a,onAnimationEnd:r})};return a.addListener(o),a},U=function(t){var e=x(t);return e.setEndValue(1),e},V=function(t,e){if(void 0===e&&(e={}),t&&t.length){e.reverse&&t.reverse();var i,n="number"!=typeof(i=e.speed)?1.1:1+Math.min(Math.max(5*i,0),5),r=1/Math.max(Math.min(t.length,100),10),s=t.map(function(t,e){var i=t.getOnUpdateFunc;return t.getOnUpdateFunc=function(t){var a=i(t);return function(t){var i=t.getCurrentValue();(i=i<.01?0:i>.99?1:i)>=r&&s[e+1]&&s[e+1](Math.max(Math.min(i*n,1),0)),a(t);}},t}).map(function(t){var e=x(t);if(e)return e.setEndValue.bind(e)}).filter(Boolean);s[0]&&s[0](1);}},F=function(t){return [0,1,4,5,12,13].map(function(e){return t[e]})},P=function(t){return t.top<window.innerHeight&&t.bottom>0&&t.left<window.innerWidth&&t.right>0};function D(t){return JSON.parse(t.dataset.flipConfig||"{}")}var R=function(t,e){var i;return a(t,((i={})[e[0]]=e[1],i))},T=function(t,e){return r(e?document.querySelectorAll("["+d$1+'="'+e+'"]'):t.querySelectorAll("["+c$1+"]"))},M=function(t){return t.map(function(t){return [t,t.getBoundingClientRect()]})},L=function(n){var o=n.cachedOrderedFlipIds,p=void 0===o?[]:o,f=n.inProgressAnimations,h=void 0===f?{}:f,v=n.flippedElementPositionsBeforeUpdate,y=void 0===v?{}:v,_=n.flipCallbacks,S=void 0===_?{}:_,E=n.containerEl,A=n.applyTransformOrigin,C=n.spring,b=n.debug,I=n.portalKey,w=n.staggerConfig,O=void 0===w?{}:w,x=n.decisionData,j=void 0===x?{}:x,B=n.handleEnterUpdateDelete,N=n.onComplete,L=n.onStart;if(!window.matchMedia("(prefers-reduced-motion: reduce)").matches){var q,X=M(T((q={element:E,portalKey:I}).element,q.portalKey)).map(function(t){var e=t[0],i=t[1],n=window.getComputedStyle(e);return [e.dataset.flipId,{element:e,rect:i,opacity:parseFloat(n.opacity),transform:n.transform}]}).reduce(R,{}),Y=function(t){var e=t.containerEl,i=t.portalKey;return i?function(t){return function(e){return r(document.querySelectorAll("["+d$1+'="'+t+'"]'+e))}}(i):e?function(t){var e=Math.random().toFixed(5);return t.dataset.flipperId=e,function(i){return r(t.querySelectorAll('[data-flipper-id="'+e+'"] '+i))}}(e):function(){return []}}({containerEl:E,portalKey:I}),W=function(t){return function(e){return t("["+c$1+'="'+e+'"]')[0]}}(Y),K=function(t){return y[t]&&X[t]},H=Object.keys(y).concat(Object.keys(X)).filter(function(t){return !K(t)}),J={flipCallbacks:S,getElement:W,flippedElementPositionsBeforeUpdate:y,flippedElementPositionsAfterUpdate:X,inProgressAnimations:h,decisionData:j},z=function(t){var e,i=t.unflippedIds,n=t.flipCallbacks,r=t.getElement,s=t.flippedElementPositionsBeforeUpdate,a=t.flippedElementPositionsAfterUpdate,o=t.inProgressAnimations,l=t.decisionData,p=i.filter(function(t){return a[t]}).filter(function(t){return n[t]&&n[t].onAppear}),c=i.filter(function(t){return s[t]&&n[t]&&n[t].onExit}),u=new Promise(function(t){e=t;}),d=[],f=0,h=c.map(function(t,i){var r=s[t].domDataForExitAnimations,a=r.element,p=r.parent,c=r.childPosition,u=c.top,h=c.left,g=c.width,m=c.height;"static"===getComputedStyle(p).position&&(p.style.position="relative"),a.style.transform="matrix(1, 0, 0, 1, 0, 0)",a.style.position="absolute",a.style.top=u+"px",a.style.left=h+"px",a.style.height=m+"px",a.style.width=g+"px";var v=d.filter(function(t){return t[0]===p})[0];v||(v=[p,document.createDocumentFragment()],d.push(v)),v[1].appendChild(a),f+=1;var y=function(){try{p.removeChild(a);}catch(t){}finally{0==(f-=1)&&e();}};return o[t]={stop:y},function(){return n[t].onExit(a,i,y,l)}});return d.forEach(function(t){t[0].appendChild(t[1]);}),h.length||e(),{hideEnteringElements:function(){p.forEach(function(t){var e=r(t);e&&(e.style.opacity="0");});},animateEnteringElements:function(){p.forEach(function(t,e){var i=r(t);i&&n[t].onAppear(i,e,l);});},animateExitingElements:function(){return h.forEach(function(t){return t()}),u}}}(a({},J,{unflippedIds:H})),G=z.hideEnteringElements,Q=z.animateEnteringElements,Z=z.animateExitingElements,$=a({},J,{containerEl:E,flippedIds:p.filter(K),applyTransformOrigin:A,spring:C,debug:b,staggerConfig:O,scopedSelector:Y,onComplete:N});L&&L(E,j);var tt=function(n){var o,p=n.flippedIds,c=n.flipCallbacks,d=n.inProgressAnimations,f=n.flippedElementPositionsBeforeUpdate,h=n.flippedElementPositionsAfterUpdate,v=n.applyTransformOrigin,y=n.spring,_=n.getElement,S=n.debug,E=n.staggerConfig,A=void 0===E?{}:E,C=n.decisionData,b=void 0===C?{}:C,I=n.onComplete,w=n.containerEl,O=new Promise(function(t){o=t;});if(I&&O.then(function(){return I(w,b)}),!p.length)return function(){return o([]),O};var x=[],R=_(p[0]),T=R?R.ownerDocument.querySelector("body"):document.querySelector("body");s$1(p);var M=p.map(function(n){var s=f[n].rect,p=h[n].rect,_=f[n].opacity,S=h[n].opacity,E=p.width<1||p.height<1,A=h[n].element;if(!P(s)&&!P(p))return !1;if(!A)return !1;var C,I,w,O=D(A),U=(w=(I=void 0===(C={flipperSpring:y,flippedSpring:O.spring})?{}:C).flippedSpring,a({},g$1.noWobble,m$1(I.flipperSpring),m$1(w))),V=!0===O.stagger?"default":O.stagger,R={element:A,id:n,stagger:V,springConfig:U};if(c[n]&&c[n].shouldFlip&&!c[n].shouldFlip(b.previous,b.current))return !1;var k=Math.abs(s.left-p.left)+Math.abs(s.top-p.top),j=Math.abs(s.width-p.width)+Math.abs(s.height-p.height),B=Math.abs(S-_);if(0===s.height&&0===p.height||0===s.width&&0===p.width||k<.5&&j<.5&&B<.01)return !1;var N=parse(h[n].transform),L={matrix:N},q={matrix:[]},X=[N];O.translate&&(X.push(translateX(s.left-p.left)),X.push(translateY(s.top-p.top))),O.scale&&(X.push(scaleX(Math.max(s.width,1)/Math.max(p.width,1))),X.push(scaleY(Math.max(s.height,1)/Math.max(p.height,1)))),O.opacity&&(q.opacity=_,L.opacity=S);var Y=[];if(!c[n]||!c[n].shouldInvert||c[n].shouldInvert(b.previous,b.current)){var W=function(t,e){return r(t.querySelectorAll("["+u$1+'="'+e+'"]'))}(A,n);Y=W.map(function(t){return [t,D(t)]});}q.matrix=F(X.reduce(multiply)),L.matrix=F(L.matrix);var K,H=function(t){var i=t.element,n=t.invertedChildren,r=t.body;return function(t){var s=t.matrix,a=t.opacity,o=t.forceMinVals;if(e(a)&&(i.style.opacity=a+""),o&&(i.style.minHeight="1px",i.style.minWidth="1px"),s){var l=function(t){return "matrix("+t.join(", ")+")"}(s);i.style.transform=l,n&&function(t){var e=t.matrix,i=t.body;t.invertedChildren.forEach(function(t){var n=t[0],r=t[1];if(i.contains(n)){var s=e[0],a=e[3],o=e[5],l={translateX:0,translateY:0,scaleX:1,scaleY:1},p="";r.translate&&(l.translateX=-e[4]/s,l.translateY=-o/a,p+="translate("+l.translateX+"px, "+l.translateY+"px)"),r.scale&&(l.scaleX=1/s,l.scaleY=1/a,p+=" scale("+l.scaleX+", "+l.scaleY+")"),n.style.transform=p;}});}({invertedChildren:n,matrix:s,body:r});}}}({element:A,invertedChildren:Y,body:T});if(c[n]&&c[n].onComplete){var J=c[n].onComplete;K=function(){return J(A,b)};}var z=e(q.opacity)&&e(L.opacity)&&q.opacity!==L.opacity,G=!1;return a({},R,{stagger:V,springConfig:U,getOnUpdateFunc:function(t){var e=t.spring,i=t.onAnimationEnd;return d[n]={destroy:e.destroy.bind(e),onAnimationEnd:i},function(t){c[n]&&c[n].onSpringUpdate&&c[n].onSpringUpdate(t.getCurrentValue()),G||(G=!0,c[n]&&c[n].onStart&&c[n].onStart(A,b));var e=t.getCurrentValue();if(T.contains(A)){var i={matrix:[]};i.matrix=q.matrix.map(function(t,i){return l(t,L.matrix[i],e)}),z&&(i.opacity=l(q.opacity,L.opacity,e)),H(i);}else t.destroy();}},initializeFlip:function(){H({matrix:q.matrix,opacity:z?q.opacity:void 0,forceMinVals:E}),c[n]&&c[n].onStartImmediate&&c[n].onStartImmediate(A,b),O.transformOrigin?A.style.transformOrigin=O.transformOrigin:v&&(A.style.transformOrigin="0 0"),Y.forEach(function(t){var e=t[0],i=t[1];i.transformOrigin?e.style.transformOrigin=i.transformOrigin:v&&(e.style.transformOrigin="0 0");});},onAnimationEnd:function(t){delete d[n],i(K)&&K(),A.style.transform="",Y.forEach(function(t){t[0].style.transform="";}),E&&A&&(A.style.minHeight="",A.style.minWidth=""),t||(x.push(n),x.length>=M.length&&o(x));},delayUntil:O.delayUntil})}).filter(Boolean);if(M.forEach(function(t){return (0, t.initializeFlip)()}),S)return function(){};var k=M.filter(function(t){return t.delayUntil&&(e=t.delayUntil,M.filter(function(t){return t.id===e}).length);var e;}),j={},B={},N={};k.forEach(function(t){t.stagger?(N[t.stagger]=!0,B[t.delayUntil]?B[t.delayUntil].push(t.stagger):B[t.delayUntil]=[t.stagger]):j[t.delayUntil]?j[t.delayUntil].push(t):j[t.delayUntil]=[t];});var L=M.filter(function(t){return t.stagger}).reduce(function(t,e){return t[e.stagger]?t[e.stagger].push(e):t[e.stagger]=[e],t},{}),q=M.filter(function(t){return -1===k.indexOf(t)});return q.forEach(function(t){t.onSpringActivate=function(){j[t.id]&&j[t.id].forEach(U),B[t.id]&&Object.keys(B[t.id].reduce(function(t,e){var i;return a(t,((i={})[e]=!0,i))},{})).forEach(function(t){V(L[t],A[t]);});};}),function(){return M.length||o([]),q.filter(function(t){return !t.stagger}).forEach(U),Object.keys(L).forEach(function(t){N[t]||V(L[t],A[t]);}),O}}($);B?B({hideEnteringElements:G,animateEnteringElements:Q,animateExitingElements:Z,animateFlippedElements:tt}):(G(),Z().then(Q),tt());}},q=function(t){var e=t.element,i=t.flipCallbacks,n=void 0===i?{}:i,s=t.inProgressAnimations,o=void 0===s?{}:s,l=T(e,t.portalKey),p=r(e.querySelectorAll("["+u$1+"]")),c={},d=[],h={};l.filter(function(t){return n&&n[t.dataset.flipId]&&n[t.dataset.flipId].onExit}).forEach(function(t){var e=t.parentNode;if(t.closest){var i=t.closest("["+f$1+"]");i&&(e=i);}var n=d.findIndex(function(t){return t[0]===e});-1===n&&(d.push([e,e.getBoundingClientRect()]),n=d.length-1),c[t.dataset.flipId]=d[n][1],h[t.dataset.flipId]=e;});var g=M(l),m=g.map(function(t){var e=t[0],i=t[1],r={};if(n&&n[e.dataset.flipId]&&n[e.dataset.flipId].onExit){var s=c[e.dataset.flipId];a(r,{element:e,parent:h[e.dataset.flipId],childPosition:{top:i.top-s.top,left:i.left-s.left,width:i.width,height:i.height}});}return [e.dataset.flipId,{rect:i,opacity:parseFloat(window.getComputedStyle(e).opacity||"1"),domDataForExitAnimations:r}]}).reduce(R,{});return function(t,e){Object.keys(t).forEach(function(e){t[e].destroy&&t[e].destroy(),t[e].onAnimationEnd&&t[e].onAnimationEnd(!0),delete t[e];}),e.forEach(function(t){t.style.transform="",t.style.opacity="";});}(o,l.concat(p)),{flippedElementPositions:m,cachedOrderedFlipIds:g.map(function(t){return t[0].dataset.flipId})}};new w;
838
-
839
- function s(){return s=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n]);}return e},s.apply(this,arguments)}function c(e,t){return c=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},c(e,t)}function d(e,t){if(null==e)return {};var r,n,i={},o=Object.keys(e);for(n=0;n<o.length;n++)t.indexOf(r=o[n])>=0||(i[r]=e[r]);return i}var f=/*#__PURE__*/createContext({}),u=/*#__PURE__*/createContext("portal"),h=/*#__PURE__*/function(r){var n,o;function p(){for(var e,t=arguments.length,n=new Array(t),i=0;i<t;i++)n[i]=arguments[i];return (e=r.call.apply(r,[this].concat(n))||this).inProgressAnimations={},e.flipCallbacks={},e.el=void 0,e}o=r,(n=p).prototype=Object.create(o.prototype),n.prototype.constructor=n,c(n,o);var l=p.prototype;return l.getSnapshotBeforeUpdate=function(t){return t.flipKey!==this.props.flipKey&&this.el?q({element:this.el,flipCallbacks:this.flipCallbacks,inProgressAnimations:this.inProgressAnimations,portalKey:this.props.portalKey}):null},l.componentDidUpdate=function(e,r,n){this.props.flipKey!==e.flipKey&&this.el&&L({flippedElementPositionsBeforeUpdate:n.flippedElementPositions,cachedOrderedFlipIds:n.cachedOrderedFlipIds,containerEl:this.el,inProgressAnimations:this.inProgressAnimations,flipCallbacks:this.flipCallbacks,applyTransformOrigin:this.props.applyTransformOrigin,spring:this.props.spring,debug:this.props.debug,portalKey:this.props.portalKey,staggerConfig:this.props.staggerConfig,handleEnterUpdateDelete:this.props.handleEnterUpdateDelete,decisionData:{previous:e.decisionData,current:this.props.decisionData},onComplete:this.props.onComplete,onStart:this.props.onStart});},l.render=function(){var e=this,t=this.props,r=t.portalKey,n=/*#__PURE__*/React.createElement(f.Provider,{value:this.flipCallbacks},/*#__PURE__*/React.createElement(t.element,{className:t.className,ref:function(t){return e.el=t}},this.props.children));return r&&(n=/*#__PURE__*/React.createElement(u.Provider,{value:r},n)),n},p}(Component);h.defaultProps={applyTransformOrigin:!0,element:"div"};var m=["children","flipId","inverseFlipId","portalKey"],y=["children","flipId","shouldFlip","shouldInvert","onAppear","onStart","onStartImmediate","onComplete","onExit","onSpringUpdate"],g=function(e){var t,i=e.children,o=e.flipId,p$1=e.inverseFlipId,s=e.portalKey,c=d(e,m),f=i,u=function(e){return "function"==typeof e}(f);if(!u)try{f=Children.only(i);}catch(e){throw new Error("Each Flipped component must wrap a single child")}c.scale||c.translate||c.opacity||p.assign(c,{translate:!0,scale:!0,opacity:!0});var h=((t={})[h$1.DATA_FLIP_CONFIG]=JSON.stringify(c),t);return void 0!==o?h[h$1.DATA_FLIP_ID]=String(o):p$1&&(h[h$1.DATA_INVERSE_FLIP_ID]=String(p$1)),void 0!==s&&(h[h$1.DATA_PORTAL_KEY]=s),u?f(h):/*#__PURE__*/cloneElement(f,h)},v=function(e){var t=e.children,n=e.flipId,o=e.shouldFlip,p$1=e.shouldInvert,l=e.onAppear,a=e.onStart,c=e.onStartImmediate,h=e.onComplete,m=e.onExit,v=e.onSpringUpdate,I=d(e,y);return t?I.inverseFlipId?/*#__PURE__*/React.createElement(g,s({},I),t):/*#__PURE__*/React.createElement(u.Consumer,null,function(e){return React.createElement(f.Consumer,null,function(d){return p.isObject(d)&&n&&(d[n]={shouldFlip:o,shouldInvert:p$1,onAppear:l,onStart:a,onStartImmediate:c,onComplete:h,onExit:m,onSpringUpdate:v}),/*#__PURE__*/React.createElement(g,s({flipId:n},I,{portalKey:e}),t)})}):null};v.displayName="Flipped";
840
-
841
845
  const VCDisplayCardCategoryType = ({
842
846
  categoryType = LCCategoryEnum.achievement
843
847
  }) => {
@@ -905,13 +909,24 @@ const VCIDDisplayFrontFace = ({
905
909
  const isSelfVerified = verifierState === VERIFIER_STATES.selfVerified;
906
910
  const achievement = "achievement" in (credential == null ? void 0 : credential.credentialSubject) ? (_a = credential == null ? void 0 : credential.credentialSubject) == null ? void 0 : _a.achievement : void 0;
907
911
  const description = achievement == null ? void 0 : achievement.description;
908
- return /* @__PURE__ */ React.createElement("section", {
912
+ return /* @__PURE__ */ React.createElement(h, {
913
+ className: "w-full",
914
+ flipKey: isFront
915
+ }, /* @__PURE__ */ React.createElement(v, {
916
+ flipId: "face"
917
+ }, /* @__PURE__ */ React.createElement("section", {
909
918
  className: "vc-front-face w-full flex flex-col items-center gap-[15px]"
910
- }, customThumbComponent && customThumbComponent, /* @__PURE__ */ React.createElement("div", {
919
+ }, /* @__PURE__ */ React.createElement(v, {
920
+ inverseFlipId: "face"
921
+ }, customThumbComponent && customThumbComponent), /* @__PURE__ */ React.createElement(v, {
922
+ inverseFlipId: "face"
923
+ }, /* @__PURE__ */ React.createElement("div", {
911
924
  className: "text-white w-full flex items-center justify-center font-poppins"
912
925
  }, /* @__PURE__ */ React.createElement(IDIcon, {
913
926
  className: "text-white mr-1"
914
- }), " ID"), /* @__PURE__ */ React.createElement("div", {
927
+ }), " ID")), /* @__PURE__ */ React.createElement(v, {
928
+ inverseFlipId: "face"
929
+ }, /* @__PURE__ */ React.createElement("div", {
915
930
  className: "w-full relative"
916
931
  }, !hideQRCode && /* @__PURE__ */ React.createElement("button", {
917
932
  onClick: (e) => {
@@ -925,7 +940,9 @@ const VCIDDisplayFrontFace = ({
925
940
  src: IDSleeve,
926
941
  alt: "id-sleeve",
927
942
  className: "w-full object-cover"
928
- })), /* @__PURE__ */ React.createElement("div", {
943
+ }))), /* @__PURE__ */ React.createElement(v, {
944
+ inverseFlipId: "face"
945
+ }, /* @__PURE__ */ React.createElement("div", {
929
946
  className: "w-full bg-white relative mt-[-70px] px-6 pb-4 pt-4"
930
947
  }, description && !customIDDescription && /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement(TruncateTextBox, {
931
948
  text: description,
@@ -959,7 +976,7 @@ const VCIDDisplayFrontFace = ({
959
976
  className: "uppercase font-poppins text-base font-[500] text-red-mastercard flex gap-[3px] items-center"
960
977
  }, /* @__PURE__ */ React.createElement(RedFlag, {
961
978
  className: "w-[20px] h-[20px]"
962
- }), "Untrusted Verifier"))));
979
+ }), "Untrusted Verifier")))))));
963
980
  };
964
981
 
965
982
  const VCIDDisplayCard = ({
@@ -1008,13 +1025,9 @@ const VCIDDisplayCard = ({
1008
1025
  style: backgroundStyle,
1009
1026
  role: "button",
1010
1027
  onClick: () => setIsFront(!isFront)
1011
- }, /* @__PURE__ */ React.createElement(v, {
1012
- flipId: "scroll-container"
1013
1028
  }, /* @__PURE__ */ React.createElement("div", {
1014
1029
  className: "vc-card-content-scroll-container w-full min-h-full flex flex-col justify-start items-center rounded-t-[30px] rounded-b-[30px] scrollbar-hide pt-[20px]"
1015
- }, isFront && /* @__PURE__ */ React.createElement(v, {
1016
- flipId: "face"
1017
- }, /* @__PURE__ */ React.createElement(VCIDDisplayFrontFace, {
1030
+ }, isFront && /* @__PURE__ */ React.createElement(VCIDDisplayFrontFace, {
1018
1031
  isFront: _isFront,
1019
1032
  setIsFront,
1020
1033
  showDetailsBtn,
@@ -1024,9 +1037,7 @@ const VCIDDisplayCard = ({
1024
1037
  qrCodeOnClick,
1025
1038
  hideQRCode,
1026
1039
  customIDDescription
1027
- })), !isFront && /* @__PURE__ */ React.createElement(v, {
1028
- flipId: "face"
1029
- }, /* @__PURE__ */ React.createElement(VC2BackFace, {
1040
+ }), !isFront && /* @__PURE__ */ React.createElement(VC2BackFace, {
1030
1041
  credential,
1031
1042
  verificationItems,
1032
1043
  issueHistory,
@@ -1040,7 +1051,7 @@ const VCIDDisplayCard = ({
1040
1051
  customIssueHistoryComponent,
1041
1052
  enableLightbox,
1042
1053
  customSkillsComponent
1043
- }))))))));
1054
+ }))))));
1044
1055
  };
1045
1056
 
1046
1057
  const VCDisplayCard2 = ({
@@ -1209,15 +1220,21 @@ const VCDisplayCard2 = ({
1209
1220
  className: "vc-display-card font-mouse flex flex-col items-center border-solid border-[5px] border-white rounded-[30px] z-10 min-h-[800px] max-w-[400px] relative bg-white shadow-3xl",
1210
1221
  role: "button",
1211
1222
  onClick: () => setIsFront(!isFront)
1223
+ }, /* @__PURE__ */ React.createElement(v, {
1224
+ inverseFlipId: "card"
1212
1225
  }, /* @__PURE__ */ React.createElement(RibbonEnd, {
1213
1226
  side: "left",
1214
1227
  className: "absolute left-[-30px] top-[50px] z-0",
1215
1228
  height: "100"
1216
- }), /* @__PURE__ */ React.createElement(RibbonEnd, {
1229
+ })), /* @__PURE__ */ React.createElement(v, {
1230
+ inverseFlipId: "card"
1231
+ }, /* @__PURE__ */ React.createElement(RibbonEnd, {
1217
1232
  side: "right",
1218
1233
  className: "absolute right-[-30px] top-[50px] z-0",
1219
1234
  height: "100"
1220
- }), /* @__PURE__ */ React.createElement("h1", {
1235
+ })), /* @__PURE__ */ React.createElement(v, {
1236
+ inverseFlipId: "card"
1237
+ }, /* @__PURE__ */ React.createElement("h1", {
1221
1238
  ref: headerRef,
1222
1239
  className: "vc-card-header px-[20px] pb-[10px] pt-[3px] overflow-visible mt-[40px] absolute text-center bg-white border-y-[5px] border-[#EEF2FF] shadow-bottom w-[calc(100%_+_16px)] rounded-t-[8px] z-50",
1223
1240
  style: { wordBreak: "break-word" }
@@ -1229,19 +1246,22 @@ const VCDisplayCard2 = ({
1229
1246
  minFontSize: 20,
1230
1247
  width: ((headerWidth != null ? headerWidth : 290) - 40).toString(),
1231
1248
  className: "vc-card-header-main-title text-[#18224E] leading-[100%] text-shadow text-[32px]"
1232
- })), isFront && handleXClick && /* @__PURE__ */ React.createElement("button", {
1249
+ }))), isFront && handleXClick && /* @__PURE__ */ React.createElement(v, {
1250
+ inverseFlipId: "card"
1251
+ }, /* @__PURE__ */ React.createElement("button", {
1233
1252
  className: "vc-card-x-button absolute top-[-25px] bg-white rounded-full h-[50px] w-[50px] flex items-center justify-center z-50",
1234
1253
  onClick: handleXClick
1235
- }, /* @__PURE__ */ React.createElement(RoundedX, null)), /* @__PURE__ */ React.createElement("div", {
1236
- className: "relative pt-[114px] vc-card-content-container flex flex-col items-center grow min-h-0 w-full rounded-t-[30px] bg-[#353E64] rounded-b-[200px]",
1237
- style: backgroundStyle
1254
+ }, /* @__PURE__ */ React.createElement(RoundedX, null))), /* @__PURE__ */ React.createElement("div", {
1255
+ className: "relative pt-[114px] vc-card-content-container flex flex-col items-center grow min-h-0 w-full rounded-t-[30px] bg-[#353E64] rounded-b-[200px]"
1238
1256
  }, /* @__PURE__ */ React.createElement(v, {
1239
- flipId: "scroll-container"
1257
+ inverseFlipId: "card",
1258
+ scale: true
1240
1259
  }, /* @__PURE__ */ React.createElement("div", {
1241
- className: "vc-card-content-scroll-container w-full pt-[20px] min-h-full flex flex-col justify-start items-center rounded-t-[30px] rounded-b-[200px] scrollbar-hide pb-[50px]"
1242
- }, isFront && /* @__PURE__ */ React.createElement(v, {
1243
- flipId: "face"
1244
- }, /* @__PURE__ */ React.createElement(VC2FrontFaceInfo, {
1260
+ className: "absolute top-0 left-0 w-full h-full rounded-b-[200px] rounded-t-[30px]",
1261
+ style: backgroundStyle
1262
+ })), /* @__PURE__ */ React.createElement("div", {
1263
+ className: "vc-card-content-scroll-container w-full pt-[20px] min-h-full flex flex-col justify-start items-center rounded-t-[30px] rounded-b-[200px] scrollbar-hide pb-[50px] z-50"
1264
+ }, isFront && /* @__PURE__ */ React.createElement(VC2FrontFaceInfo, {
1245
1265
  credential,
1246
1266
  issuee,
1247
1267
  subjectDID,
@@ -1254,9 +1274,7 @@ const VCDisplayCard2 = ({
1254
1274
  createdAt: createdAt != null ? createdAt : "",
1255
1275
  imageUrl,
1256
1276
  trustedAppRegistry
1257
- })), !isFront && /* @__PURE__ */ React.createElement(v, {
1258
- flipId: "face"
1259
- }, /* @__PURE__ */ React.createElement(VC2BackFace, {
1277
+ }), !isFront && /* @__PURE__ */ React.createElement(VC2BackFace, {
1260
1278
  credential,
1261
1279
  verificationItems,
1262
1280
  issueHistory,
@@ -1270,26 +1288,32 @@ const VCDisplayCard2 = ({
1270
1288
  customIssueHistoryComponent,
1271
1289
  enableLightbox,
1272
1290
  customSkillsComponent
1273
- })), isFront && /* @__PURE__ */ React.createElement(VCDisplayCardSkillsCount, {
1291
+ }), /* @__PURE__ */ React.createElement(v, {
1292
+ inverseFlipId: "card"
1293
+ }, isFront && /* @__PURE__ */ React.createElement(VCDisplayCardSkillsCount, {
1274
1294
  skills: credential == null ? void 0 : credential.skills,
1275
1295
  onClick: () => setIsFront(!isFront)
1276
- }), (!hideNavButtons || showDetailsBtn) && /* @__PURE__ */ React.createElement(React.Fragment, null, isFront && customFrontButton, (isFront && !customFrontButton || isFront && showDetailsBtn) && /* @__PURE__ */ React.createElement(v, {
1277
- flipId: "details-back-button"
1296
+ })), (!hideNavButtons || showDetailsBtn) && /* @__PURE__ */ React.createElement(React.Fragment, null, isFront && customFrontButton, (isFront && !customFrontButton || isFront && showDetailsBtn) && /* @__PURE__ */ React.createElement(v, {
1297
+ inverseFlipId: "card"
1278
1298
  }, /* @__PURE__ */ React.createElement("button", {
1279
1299
  type: "button",
1280
1300
  className: "vc-toggle-side-button text-white shadow-bottom bg-[#00000099] px-[30px] py-[8px] rounded-[40px] text-[28px] tracking-[0.75px] uppercase leading-[28px] mt-[40px] w-fit select-none",
1281
1301
  onClick: () => setIsFront(!isFront)
1282
1302
  }, "Details")), !isFront && /* @__PURE__ */ React.createElement(v, {
1283
- flipId: "details-back-button"
1303
+ inverseFlipId: "card"
1284
1304
  }, /* @__PURE__ */ React.createElement("button", {
1285
1305
  type: "button",
1286
1306
  className: "vc-toggle-side-button text-white shadow-bottom bg-[#00000099] px-[30px] py-[8px] rounded-[40px] text-[28px] tracking-[0.75px] uppercase leading-[28px] mt-[40px] w-fit select-none",
1287
1307
  onClick: () => setIsFront(!isFront)
1288
1308
  }, /* @__PURE__ */ React.createElement("span", {
1289
1309
  className: "flex gap-[10px] items-center"
1290
- }, /* @__PURE__ */ React.createElement(LeftArrow, null), "Back"))))))), /* @__PURE__ */ React.createElement("footer", {
1310
+ }, /* @__PURE__ */ React.createElement(LeftArrow, null), "Back")))))), /* @__PURE__ */ React.createElement("footer", {
1291
1311
  className: "vc-card-footer w-full flex justify-between p-[5px] mt-[5px]"
1292
- }, customFooterComponent && customFooterComponent, !customFooterComponent && /* @__PURE__ */ React.createElement(React.Fragment, null, worstVerificationStatus === VerificationStatusEnum.Failed ? /* @__PURE__ */ React.createElement("div", {
1312
+ }, /* @__PURE__ */ React.createElement(v, {
1313
+ inverseFlipId: "card"
1314
+ }, customFooterComponent && customFooterComponent), /* @__PURE__ */ React.createElement(v, {
1315
+ inverseFlipId: "card"
1316
+ }, !customFooterComponent && /* @__PURE__ */ React.createElement(React.Fragment, null, worstVerificationStatus === VerificationStatusEnum.Failed ? /* @__PURE__ */ React.createElement("div", {
1293
1317
  className: "w-[40px]",
1294
1318
  role: "presentation"
1295
1319
  }) : /* @__PURE__ */ React.createElement(VCVerificationCheckWithSpinner, {
@@ -1305,9 +1329,11 @@ const VCDisplayCard2 = ({
1305
1329
  style: { color: statusColor }
1306
1330
  }, worstVerificationStatus)), /* @__PURE__ */ React.createElement("div", {
1307
1331
  className: "vc-footer-icon rounded-[20px] h-[40px] w-[40px] flex items-center justify-center overflow-hidden",
1308
- style: { backgroundColor: (_f = bottomRightIcon == null ? void 0 : bottomRightIcon.color) != null ? _f : "#6366F1" }
1309
- }, (_g = bottomRightIcon == null ? void 0 : bottomRightIcon.image) != null ? _g : /* @__PURE__ */ React.createElement(AwardRibbon, null)))))));
1332
+ style: {
1333
+ backgroundColor: (_f = bottomRightIcon == null ? void 0 : bottomRightIcon.color) != null ? _f : "#6366F1"
1334
+ }
1335
+ }, (_g = bottomRightIcon == null ? void 0 : bottomRightIcon.image) != null ? _g : /* @__PURE__ */ React.createElement(AwardRibbon, null))))))));
1310
1336
  };
1311
1337
 
1312
1338
  export { VCDisplayCard2 as V, VCDisplayCardSkillsCount as a, VCIDDisplayCard as b };
1313
- //# sourceMappingURL=VCDisplayCard2-e8a1f9f5.js.map
1339
+ //# sourceMappingURL=VCDisplayCard2-95c022ae.js.map